| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008 |
- /**
- * @license
- * Cesium - https://github.com/CesiumGS/cesium
- * Version 1.142.0
- *
- * Copyright 2011-2022 Cesium Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Columbus View (Pat. Pend.)
- *
- * Portions licensed separately.
- * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
- */
-
- "use strict";var yMe=Object.create;var YI=Object.defineProperty;var xMe=Object.getOwnPropertyDescriptor;var bMe=Object.getOwnPropertyNames;var CMe=Object.getPrototypeOf,TMe=Object.prototype.hasOwnProperty;var EMe=(e,t,n)=>t in e?YI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var vMe=(e,t)=>()=>(e&&(t=e(e=0)),t);var zi=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Mre=(e,t)=>{for(var n in t)YI(e,n,{get:t[n],enumerable:!0})},Bre=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of bMe(t))!TMe.call(e,o)&&o!==n&&YI(e,o,{get:()=>t[o],enumerable:!(i=xMe(t,o))||i.enumerable});return e};var Yr=(e,t,n)=>(n=e!=null?yMe(CMe(e)):{},Bre(t||!e||!e.__esModule?YI(n,"default",{value:e,enumerable:!0}):n,e)),Th=e=>Bre(YI({},"__esModule",{value:!0}),e);var lt=(e,t,n)=>EMe(e,typeof t!="symbol"?t+"":t,n);var M4=zi((Szt,Lre)=>{var I0=function(e){e==null&&(e=new Date().getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,e.constructor==Array?this.init_by_array(e,e.length):this.init_seed(e)};I0.prototype.init_seed=function(e){for(this.mt[0]=e>>>0,this.mti=1;this.mti<this.N;this.mti++){var e=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30;this.mt[this.mti]=(((e&4294901760)>>>16)*1812433253<<16)+(e&65535)*1812433253+this.mti,this.mt[this.mti]>>>=0}};I0.prototype.init_by_array=function(e,t){var n,i,o;for(this.init_seed(19650218),n=1,i=0,o=this.N>t?this.N:t;o;o--){var r=this.mt[n-1]^this.mt[n-1]>>>30;this.mt[n]=(this.mt[n]^(((r&4294901760)>>>16)*1664525<<16)+(r&65535)*1664525)+e[i]+i,this.mt[n]>>>=0,n++,i++,n>=this.N&&(this.mt[0]=this.mt[this.N-1],n=1),i>=t&&(i=0)}for(o=this.N-1;o;o--){var r=this.mt[n-1]^this.mt[n-1]>>>30;this.mt[n]=(this.mt[n]^(((r&4294901760)>>>16)*1566083941<<16)+(r&65535)*1566083941)-n,this.mt[n]>>>=0,n++,n>=this.N&&(this.mt[0]=this.mt[this.N-1],n=1)}this.mt[0]=2147483648};I0.prototype.random_int=function(){var e,t=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var n;for(this.mti==this.N+1&&this.init_seed(5489),n=0;n<this.N-this.M;n++)e=this.mt[n]&this.UPPER_MASK|this.mt[n+1]&this.LOWER_MASK,this.mt[n]=this.mt[n+this.M]^e>>>1^t[e&1];for(;n<this.N-1;n++)e=this.mt[n]&this.UPPER_MASK|this.mt[n+1]&this.LOWER_MASK,this.mt[n]=this.mt[n+(this.M-this.N)]^e>>>1^t[e&1];e=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^e>>>1^t[e&1],this.mti=0}return e=this.mt[this.mti++],e^=e>>>11,e^=e<<7&2636928640,e^=e<<15&4022730752,e^=e>>>18,e>>>0};I0.prototype.random_int31=function(){return this.random_int()>>>1};I0.prototype.random_incl=function(){return this.random_int()*(1/4294967295)};I0.prototype.random=function(){return this.random_int()*(1/4294967296)};I0.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)};I0.prototype.random_long=function(){var e=this.random_int()>>>5,t=this.random_int()>>>6;return(e*67108864+t)*(1/9007199254740992)};Lre.exports=I0});var uae=zi((mE,pE)=>{/*! https://mths.be/punycode v1.4.0 by @mathias */(function(e){var t=typeof mE=="object"&&mE&&!mE.nodeType&&mE,n=typeof pE=="object"&&pE&&!pE.nodeType&&pE,i=typeof global=="object"&&global;(i.global===i||i.window===i||i.self===i)&&(e=i);var o,r=2147483647,a=36,s=1,c=26,u=38,f=700,d=72,p=128,g="-",m=/^xn--/,A=/[^\x20-\x7E]/,y=/[\x2E\u3002\uFF0E\uFF61]/g,x={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},b=a-s,C=Math.floor,E=String.fromCharCode,S;function w(k){throw new RangeError(x[k])}function P(k,U){for(var F=k.length,H=[];F--;)H[F]=U(k[F]);return H}function R(k,U){var F=k.split("@"),H="";F.length>1&&(H=F[0]+"@",k=F[1]),k=k.replace(y,".");var q=k.split("."),J=P(q,U).join(".");return H+J}function B(k){for(var U=[],F=0,H=k.length,q,J;F<H;)q=k.charCodeAt(F++),q>=55296&&q<=56319&&F<H?(J=k.charCodeAt(F++),(J&64512)==56320?U.push(((q&1023)<<10)+(J&1023)+65536):(U.push(q),F--)):U.push(q);return U}function L(k){return P(k,function(U){var F="";return U>65535&&(U-=65536,F+=E(U>>>10&1023|55296),U=56320|U&1023),F+=E(U),F}).join("")}function _(k){return k-48<10?k-22:k-65<26?k-65:k-97<26?k-97:a}function T(k,U){return k+22+75*(k<26)-((U!=0)<<5)}function v(k,U,F){var H=0;for(k=F?C(k/f):k>>1,k+=C(k/U);k>b*c>>1;H+=a)k=C(k/b);return C(H+(b+1)*k/(k+u))}function I(k){var U=[],F=k.length,H,q=0,J=p,W=d,Z,K,le,me,ae,be,ge,we,Ee;for(Z=k.lastIndexOf(g),Z<0&&(Z=0),K=0;K<Z;++K)k.charCodeAt(K)>=128&&w("not-basic"),U.push(k.charCodeAt(K));for(le=Z>0?Z+1:0;le<F;){for(me=q,ae=1,be=a;le>=F&&w("invalid-input"),ge=_(k.charCodeAt(le++)),(ge>=a||ge>C((r-q)/ae))&&w("overflow"),q+=ge*ae,we=be<=W?s:be>=W+c?c:be-W,!(ge<we);be+=a)Ee=a-we,ae>C(r/Ee)&&w("overflow"),ae*=Ee;H=U.length+1,W=v(q-me,H,me==0),C(q/H)>r-J&&w("overflow"),J+=C(q/H),q%=H,U.splice(q++,0,J)}return L(U)}function O(k){var U,F,H,q,J,W,Z,K,le,me,ae,be=[],ge,we,Ee,Be;for(k=B(k),ge=k.length,U=p,F=0,J=d,W=0;W<ge;++W)ae=k[W],ae<128&&be.push(E(ae));for(H=q=be.length,q&&be.push(g);H<ge;){for(Z=r,W=0;W<ge;++W)ae=k[W],ae>=U&&ae<Z&&(Z=ae);for(we=H+1,Z-U>C((r-F)/we)&&w("overflow"),F+=(Z-U)*we,U=Z,W=0;W<ge;++W)if(ae=k[W],ae<U&&++F>r&&w("overflow"),ae==U){for(K=F,le=a;me=le<=J?s:le>=J+c?c:le-J,!(K<me);le+=a)Be=K-me,Ee=a-me,be.push(E(T(me+Be%Ee,0))),K=C(Be/Ee);be.push(E(T(K,0))),J=v(F,we,H==q),F=0,++H}++F,++U}return be.join("")}function N(k){return R(k,function(U){return m.test(U)?I(U.slice(4).toLowerCase()):U})}function j(k){return R(k,function(U){return A.test(U)?"xn--"+O(U):U})}if(o={version:"1.3.2",ucs2:{decode:B,encode:L},decode:I,encode:O,toASCII:j,toUnicode:N},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return o});else if(t&&n)if(pE.exports==t)n.exports=o;else for(S in o)o.hasOwnProperty(S)&&(t[S]=o[S]);else e.punycode=o})(mE)});var dae=zi((fae,$4)=>{/*!
- * URI.js - Mutating URLs
- * IPv6 Support
- *
- * Version: 1.19.11
- *
- * Author: Rodney Rehm
- * Web: http://medialize.github.io/URI.js/
- *
- * Licensed under
- * MIT License http://www.opensource.org/licenses/mit-license
- *
- */(function(e,t){"use strict";typeof $4=="object"&&$4.exports?$4.exports=t():typeof define=="function"&&define.amd?define(t):e.IPv6=t(e)})(fae,function(e){"use strict";var t=e&&e.IPv6;function n(o){var r=o.toLowerCase(),a=r.split(":"),s=a.length,c=8;a[0]===""&&a[1]===""&&a[2]===""?(a.shift(),a.shift()):a[0]===""&&a[1]===""?a.shift():a[s-1]===""&&a[s-2]===""&&a.pop(),s=a.length,a[s-1].indexOf(".")!==-1&&(c=7);var u;for(u=0;u<s&&a[u]!=="";u++);if(u<c)for(a.splice(u,1,"0000");a.length<c;)a.splice(u,0,"0000");for(var f,d=0;d<c;d++){f=a[d].split("");for(var p=0;p<3&&(f[0]==="0"&&f.length>1);p++)f.splice(0,1);a[d]=f.join("")}var g=-1,m=0,A=0,y=-1,x=!1;for(d=0;d<c;d++)x?a[d]==="0"?A+=1:(x=!1,A>m&&(g=y,m=A)):a[d]==="0"&&(x=!0,y=d,A=1);A>m&&(g=y,m=A),m>1&&a.splice(g,m,""),s=a.length;var b="";for(a[0]===""&&(b=":"),d=0;d<s&&(b+=a[d],d!==s-1);d++)b+=":";return a[s-1]===""&&(b+=":"),b}function i(){return e.IPv6===this&&(e.IPv6=t),this}return{best:n,noConflict:i}})});var mae=zi((hae,J4)=>{/*!
- * URI.js - Mutating URLs
- * Second Level Domain (SLD) Support
- *
- * Version: 1.19.11
- *
- * Author: Rodney Rehm
- * Web: http://medialize.github.io/URI.js/
- *
- * Licensed under
- * MIT License http://www.opensource.org/licenses/mit-license
- *
- */(function(e,t){"use strict";typeof J4=="object"&&J4.exports?J4.exports=t():typeof define=="function"&&define.amd?define(t):e.SecondLevelDomains=t(e)})(hae,function(e){"use strict";var t=e&&e.SecondLevelDomains,n={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(i){var o=i.lastIndexOf(".");if(o<=0||o>=i.length-1)return!1;var r=i.lastIndexOf(".",o-1);if(r<=0||r>=o-1)return!1;var a=n.list[i.slice(o+1)];return a?a.indexOf(" "+i.slice(r+1,o)+" ")>=0:!1},is:function(i){var o=i.lastIndexOf(".");if(o<=0||o>=i.length-1)return!1;var r=i.lastIndexOf(".",o-1);if(r>=0)return!1;var a=n.list[i.slice(o+1)];return a?a.indexOf(" "+i.slice(0,o)+" ")>=0:!1},get:function(i){var o=i.lastIndexOf(".");if(o<=0||o>=i.length-1)return null;var r=i.lastIndexOf(".",o-1);if(r<=0||r>=o-1)return null;var a=n.list[i.slice(o+1)];return!a||a.indexOf(" "+i.slice(r+1,o)+" ")<0?null:i.slice(r+1)},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=t),this}};return n})});var uf=zi((pae,Z4)=>{/*!
- * URI.js - Mutating URLs
- *
- * Version: 1.19.11
- *
- * Author: Rodney Rehm
- * Web: http://medialize.github.io/URI.js/
- *
- * Licensed under
- * MIT License http://www.opensource.org/licenses/mit-license
- *
- */(function(e,t){"use strict";typeof Z4=="object"&&Z4.exports?Z4.exports=t(uae(),dae(),mae()):typeof define=="function"&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],t):e.URI=t(e.punycode,e.IPv6,e.SecondLevelDomains,e)})(pae,function(e,t,n,i){"use strict";var o=i&&i.URI;function r(T,v){var I=arguments.length>=1,O=arguments.length>=2;if(!(this instanceof r))return I?O?new r(T,v):new r(T):new r;if(T===void 0){if(I)throw new TypeError("undefined is not a valid argument for URI");typeof location<"u"?T=location.href+"":T=""}if(T===null&&I)throw new TypeError("null is not a valid argument for URI");return this.href(T),v!==void 0?this.absoluteTo(v):this}function a(T){return/^[0-9]+$/.test(T)}r.version="1.19.11";var s=r.prototype,c=Object.prototype.hasOwnProperty;function u(T){return T.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function f(T){return T===void 0?"Undefined":String(Object.prototype.toString.call(T)).slice(8,-1)}function d(T){return f(T)==="Array"}function p(T,v){var I={},O,N;if(f(v)==="RegExp")I=null;else if(d(v))for(O=0,N=v.length;O<N;O++)I[v[O]]=!0;else I[v]=!0;for(O=0,N=T.length;O<N;O++){var j=I&&I[T[O]]!==void 0||!I&&v.test(T[O]);j&&(T.splice(O,1),N--,O--)}return T}function g(T,v){var I,O;if(d(v)){for(I=0,O=v.length;I<O;I++)if(!g(T,v[I]))return!1;return!0}var N=f(v);for(I=0,O=T.length;I<O;I++)if(N==="RegExp"){if(typeof T[I]=="string"&&T[I].match(v))return!0}else if(T[I]===v)return!0;return!1}function m(T,v){if(!d(T)||!d(v)||T.length!==v.length)return!1;T.sort(),v.sort();for(var I=0,O=T.length;I<O;I++)if(T[I]!==v[I])return!1;return!0}function A(T){var v=/^\/+|\/+$/g;return T.replace(v,"")}r._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:r.preventInvalidHostname,duplicateQueryParameters:r.duplicateQueryParameters,escapeQuerySpace:r.escapeQuerySpace}},r.preventInvalidHostname=!1,r.duplicateQueryParameters=!1,r.escapeQuerySpace=!0,r.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,r.idn_expression=/[^a-z0-9\._-]/i,r.punycode_expression=/(xn--)/i,r.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,r.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,r.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/ig,r.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},r.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,r.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,r.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},r.hostProtocols=["http","https"],r.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,r.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},r.getDomAttribute=function(T){if(!(!T||!T.nodeName)){var v=T.nodeName.toLowerCase();if(!(v==="input"&&T.type!=="image"))return r.domAttributes[v]}};function y(T){return escape(T)}function x(T){return encodeURIComponent(T).replace(/[!'()*]/g,y).replace(/\*/g,"%2A")}r.encode=x,r.decode=decodeURIComponent,r.iso8859=function(){r.encode=escape,r.decode=unescape},r.unicode=function(){r.encode=x,r.decode=decodeURIComponent},r.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/ig,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/ig,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},r.encodeQuery=function(T,v){var I=r.encode(T+"");return v===void 0&&(v=r.escapeQuerySpace),v?I.replace(/%20/g,"+"):I},r.decodeQuery=function(T,v){T+="",v===void 0&&(v=r.escapeQuerySpace);try{return r.decode(v?T.replace(/\+/g,"%20"):T)}catch{return T}};var b={encode:"encode",decode:"decode"},C,E=function(T,v){return function(I){try{return r[v](I+"").replace(r.characters[T][v].expression,function(O){return r.characters[T][v].map[O]})}catch{return I}}};for(C in b)r[C+"PathSegment"]=E("pathname",b[C]),r[C+"UrnPathSegment"]=E("urnpath",b[C]);var S=function(T,v,I){return function(O){var N;I?N=function(F){return r[v](r[I](F))}:N=r[v];for(var j=(O+"").split(T),k=0,U=j.length;k<U;k++)j[k]=N(j[k]);return j.join(T)}};r.decodePath=S("/","decodePathSegment"),r.decodeUrnPath=S(":","decodeUrnPathSegment"),r.recodePath=S("/","encodePathSegment","decode"),r.recodeUrnPath=S(":","encodeUrnPathSegment","decode"),r.encodeReserved=E("reserved","encode"),r.parse=function(T,v){var I;return v||(v={preventInvalidHostname:r.preventInvalidHostname}),T=T.replace(r.leading_whitespace_expression,""),T=T.replace(r.ascii_tab_whitespace,""),I=T.indexOf("#"),I>-1&&(v.fragment=T.substring(I+1)||null,T=T.substring(0,I)),I=T.indexOf("?"),I>-1&&(v.query=T.substring(I+1)||null,T=T.substring(0,I)),T=T.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://"),T=T.replace(/^[/\\]{2,}/i,"//"),T.substring(0,2)==="//"?(v.protocol=null,T=T.substring(2),T=r.parseAuthority(T,v)):(I=T.indexOf(":"),I>-1&&(v.protocol=T.substring(0,I)||null,v.protocol&&!v.protocol.match(r.protocol_expression)?v.protocol=void 0:T.substring(I+1,I+3).replace(/\\/g,"/")==="//"?(T=T.substring(I+3),T=r.parseAuthority(T,v)):(T=T.substring(I+1),v.urn=!0))),v.path=T,v},r.parseHost=function(T,v){T||(T=""),T=T.replace(/\\/g,"/");var I=T.indexOf("/"),O,N;if(I===-1&&(I=T.length),T.charAt(0)==="[")O=T.indexOf("]"),v.hostname=T.substring(1,O)||null,v.port=T.substring(O+2,I)||null,v.port==="/"&&(v.port=null);else{var j=T.indexOf(":"),k=T.indexOf("/"),U=T.indexOf(":",j+1);U!==-1&&(k===-1||U<k)?(v.hostname=T.substring(0,I)||null,v.port=null):(N=T.substring(0,I).split(":"),v.hostname=N[0]||null,v.port=N[1]||null)}return v.hostname&&T.substring(I).charAt(0)!=="/"&&(I++,T="/"+T),v.preventInvalidHostname&&r.ensureValidHostname(v.hostname,v.protocol),v.port&&r.ensureValidPort(v.port),T.substring(I)||"/"},r.parseAuthority=function(T,v){return T=r.parseUserinfo(T,v),r.parseHost(T,v)},r.parseUserinfo=function(T,v){var I=T,O=T.indexOf("\\");O!==-1&&(T=T.replace(/\\/g,"/"));var N=T.indexOf("/"),j=T.lastIndexOf("@",N>-1?N:T.length-1),k;return j>-1&&(N===-1||j<N)?(k=T.substring(0,j).split(":"),v.username=k[0]?r.decode(k[0]):null,k.shift(),v.password=k[0]?r.decode(k.join(":")):null,T=I.substring(j+1)):(v.username=null,v.password=null),T},r.parseQuery=function(T,v){if(!T)return{};if(T=T.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,""),!T)return{};for(var I={},O=T.split("&"),N=O.length,j,k,U,F=0;F<N;F++)j=O[F].split("="),k=r.decodeQuery(j.shift(),v),U=j.length?r.decodeQuery(j.join("="),v):null,k!=="__proto__"&&(c.call(I,k)?((typeof I[k]=="string"||I[k]===null)&&(I[k]=[I[k]]),I[k].push(U)):I[k]=U);return I},r.build=function(T){var v="",I=!1;return T.protocol&&(v+=T.protocol+":"),!T.urn&&(v||T.hostname)&&(v+="//",I=!0),v+=r.buildAuthority(T)||"",typeof T.path=="string"&&(T.path.charAt(0)!=="/"&&I&&(v+="/"),v+=T.path),typeof T.query=="string"&&T.query&&(v+="?"+T.query),typeof T.fragment=="string"&&T.fragment&&(v+="#"+T.fragment),v},r.buildHost=function(T){var v="";if(T.hostname)r.ip6_expression.test(T.hostname)?v+="["+T.hostname+"]":v+=T.hostname;else return"";return T.port&&(v+=":"+T.port),v},r.buildAuthority=function(T){return r.buildUserinfo(T)+r.buildHost(T)},r.buildUserinfo=function(T){var v="";return T.username&&(v+=r.encode(T.username)),T.password&&(v+=":"+r.encode(T.password)),v&&(v+="@"),v},r.buildQuery=function(T,v,I){var O="",N,j,k,U;for(j in T)if(j!=="__proto__"&&c.call(T,j))if(d(T[j]))for(N={},k=0,U=T[j].length;k<U;k++)T[j][k]!==void 0&&N[T[j][k]+""]===void 0&&(O+="&"+r.buildQueryParameter(j,T[j][k],I),v!==!0&&(N[T[j][k]+""]=!0));else T[j]!==void 0&&(O+="&"+r.buildQueryParameter(j,T[j],I));return O.substring(1)},r.buildQueryParameter=function(T,v,I){return r.encodeQuery(T,I)+(v!==null?"="+r.encodeQuery(v,I):"")},r.addQuery=function(T,v,I){if(typeof v=="object")for(var O in v)c.call(v,O)&&r.addQuery(T,O,v[O]);else if(typeof v=="string"){if(T[v]===void 0){T[v]=I;return}else typeof T[v]=="string"&&(T[v]=[T[v]]);d(I)||(I=[I]),T[v]=(T[v]||[]).concat(I)}else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter")},r.setQuery=function(T,v,I){if(typeof v=="object")for(var O in v)c.call(v,O)&&r.setQuery(T,O,v[O]);else if(typeof v=="string")T[v]=I===void 0?null:I;else throw new TypeError("URI.setQuery() accepts an object, string as the name parameter")},r.removeQuery=function(T,v,I){var O,N,j;if(d(v))for(O=0,N=v.length;O<N;O++)T[v[O]]=void 0;else if(f(v)==="RegExp")for(j in T)v.test(j)&&(T[j]=void 0);else if(typeof v=="object")for(j in v)c.call(v,j)&&r.removeQuery(T,j,v[j]);else if(typeof v=="string")I!==void 0?f(I)==="RegExp"?!d(T[v])&&I.test(T[v])?T[v]=void 0:T[v]=p(T[v],I):T[v]===String(I)&&(!d(I)||I.length===1)?T[v]=void 0:d(T[v])&&(T[v]=p(T[v],I)):T[v]=void 0;else throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter")},r.hasQuery=function(T,v,I,O){switch(f(v)){case"String":break;case"RegExp":for(var N in T)if(c.call(T,N)&&v.test(N)&&(I===void 0||r.hasQuery(T,N,I)))return!0;return!1;case"Object":for(var j in v)if(c.call(v,j)&&!r.hasQuery(T,j,v[j]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(f(I)){case"Undefined":return v in T;case"Boolean":var k=!!(d(T[v])?T[v].length:T[v]);return I===k;case"Function":return!!I(T[v],v,T);case"Array":if(!d(T[v]))return!1;var U=O?g:m;return U(T[v],I);case"RegExp":return d(T[v])?O?g(T[v],I):!1:!!(T[v]&&T[v].match(I));case"Number":I=String(I);case"String":return d(T[v])?O?g(T[v],I):!1:T[v]===I;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},r.joinPaths=function(){for(var T=[],v=[],I=0,O=0;O<arguments.length;O++){var N=new r(arguments[O]);T.push(N);for(var j=N.segment(),k=0;k<j.length;k++)typeof j[k]=="string"&&v.push(j[k]),j[k]&&I++}if(!v.length||!I)return new r("");var U=new r("").segment(v);return(T[0].path()===""||T[0].path().slice(0,1)==="/")&&U.path("/"+U.path()),U.normalize()},r.commonPath=function(T,v){var I=Math.min(T.length,v.length),O;for(O=0;O<I;O++)if(T.charAt(O)!==v.charAt(O)){O--;break}return O<1?T.charAt(0)===v.charAt(0)&&T.charAt(0)==="/"?"/":"":((T.charAt(O)!=="/"||v.charAt(O)!=="/")&&(O=T.substring(0,O).lastIndexOf("/")),T.substring(0,O+1))},r.withinString=function(T,v,I){I||(I={});var O=I.start||r.findUri.start,N=I.end||r.findUri.end,j=I.trim||r.findUri.trim,k=I.parens||r.findUri.parens,U=/[a-z0-9-]=["']?$/i;for(O.lastIndex=0;;){var F=O.exec(T);if(!F)break;var H=F.index;if(I.ignoreHtml){var q=T.slice(Math.max(H-3,0),H);if(q&&U.test(q))continue}for(var J=H+T.slice(H).search(N),W=T.slice(H,J),Z=-1;;){var K=k.exec(W);if(!K)break;var le=K.index+K[0].length;Z=Math.max(Z,le)}if(Z>-1?W=W.slice(0,Z)+W.slice(Z).replace(j,""):W=W.replace(j,""),!(W.length<=F[0].length)&&!(I.ignore&&I.ignore.test(W))){J=H+W.length;var me=v(W,H,J,T);if(me===void 0){O.lastIndex=J;continue}me=String(me),T=T.slice(0,H)+me+T.slice(J),O.lastIndex=H+me.length}}return O.lastIndex=0,T},r.ensureValidHostname=function(T,v){var I=!!T,O=!!v,N=!1;if(O&&(N=g(r.hostProtocols,v)),N&&!I)throw new TypeError("Hostname cannot be empty, if protocol is "+v);if(T&&T.match(r.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+T+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(T).match(r.invalid_hostname_characters))throw new TypeError('Hostname "'+T+'" contains characters other than [A-Z0-9.-:_]')}},r.ensureValidPort=function(T){if(T){var v=Number(T);if(!(a(v)&&v>0&&v<65536))throw new TypeError('Port "'+T+'" is not a valid port')}},r.noConflict=function(T){if(T){var v={URI:this.noConflict()};return i.URITemplate&&typeof i.URITemplate.noConflict=="function"&&(v.URITemplate=i.URITemplate.noConflict()),i.IPv6&&typeof i.IPv6.noConflict=="function"&&(v.IPv6=i.IPv6.noConflict()),i.SecondLevelDomains&&typeof i.SecondLevelDomains.noConflict=="function"&&(v.SecondLevelDomains=i.SecondLevelDomains.noConflict()),v}else i.URI===this&&(i.URI=o);return this},s.build=function(T){return T===!0?this._deferred_build=!0:(T===void 0||this._deferred_build)&&(this._string=r.build(this._parts),this._deferred_build=!1),this},s.clone=function(){return new r(this)},s.valueOf=s.toString=function(){return this.build(!1)._string};function w(T){return function(v,I){return v===void 0?this._parts[T]||"":(this._parts[T]=v||null,this.build(!I),this)}}function P(T,v){return function(I,O){return I===void 0?this._parts[T]||"":(I!==null&&(I=I+"",I.charAt(0)===v&&(I=I.substring(1))),this._parts[T]=I,this.build(!O),this)}}s.protocol=w("protocol"),s.username=w("username"),s.password=w("password"),s.hostname=w("hostname"),s.port=w("port"),s.query=P("query","?"),s.fragment=P("fragment","#"),s.search=function(T,v){var I=this.query(T,v);return typeof I=="string"&&I.length?"?"+I:I},s.hash=function(T,v){var I=this.fragment(T,v);return typeof I=="string"&&I.length?"#"+I:I},s.pathname=function(T,v){if(T===void 0||T===!0){var I=this._parts.path||(this._parts.hostname?"/":"");return T?(this._parts.urn?r.decodeUrnPath:r.decodePath)(I):I}else return this._parts.urn?this._parts.path=T?r.recodeUrnPath(T):"":this._parts.path=T?r.recodePath(T):"/",this.build(!v),this},s.path=s.pathname,s.href=function(T,v){var I;if(T===void 0)return this.toString();this._string="",this._parts=r._parts();var O=T instanceof r,N=typeof T=="object"&&(T.hostname||T.path||T.pathname);if(T.nodeName){var j=r.getDomAttribute(T);T=T[j]||"",N=!1}if(!O&&N&&T.pathname!==void 0&&(T=T.toString()),typeof T=="string"||T instanceof String)this._parts=r.parse(String(T),this._parts);else if(O||N){var k=O?T._parts:T;for(I in k)I!=="query"&&c.call(this._parts,I)&&(this._parts[I]=k[I]);k.query&&this.query(k.query,!1)}else throw new TypeError("invalid input");return this.build(!v),this},s.is=function(T){var v=!1,I=!1,O=!1,N=!1,j=!1,k=!1,U=!1,F=!this._parts.urn;switch(this._parts.hostname&&(F=!1,I=r.ip4_expression.test(this._parts.hostname),O=r.ip6_expression.test(this._parts.hostname),v=I||O,N=!v,j=N&&n&&n.has(this._parts.hostname),k=N&&r.idn_expression.test(this._parts.hostname),U=N&&r.punycode_expression.test(this._parts.hostname)),T.toLowerCase()){case"relative":return F;case"absolute":return!F;case"domain":case"name":return N;case"sld":return j;case"ip":return v;case"ip4":case"ipv4":case"inet4":return I;case"ip6":case"ipv6":case"inet6":return O;case"idn":return k;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return U}return null};var R=s.protocol,B=s.port,L=s.hostname;s.protocol=function(T,v){if(T&&(T=T.replace(/:(\/\/)?$/,""),!T.match(r.protocol_expression)))throw new TypeError('Protocol "'+T+`" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]`);return R.call(this,T,v)},s.scheme=s.protocol,s.port=function(T,v){return this._parts.urn?T===void 0?"":this:(T!==void 0&&(T===0&&(T=null),T&&(T+="",T.charAt(0)===":"&&(T=T.substring(1)),r.ensureValidPort(T))),B.call(this,T,v))},s.hostname=function(T,v){if(this._parts.urn)return T===void 0?"":this;if(T!==void 0){var I={preventInvalidHostname:this._parts.preventInvalidHostname},O=r.parseHost(T,I);if(O!=="/")throw new TypeError('Hostname "'+T+'" contains characters other than [A-Z0-9.-]');T=I.hostname,this._parts.preventInvalidHostname&&r.ensureValidHostname(T,this._parts.protocol)}return L.call(this,T,v)},s.origin=function(T,v){if(this._parts.urn)return T===void 0?"":this;if(T===void 0){var I=this.protocol(),O=this.authority();return O?(I?I+"://":"")+this.authority():""}else{var N=r(T);return this.protocol(N.protocol()).authority(N.authority()).build(!v),this}},s.host=function(T,v){if(this._parts.urn)return T===void 0?"":this;if(T===void 0)return this._parts.hostname?r.buildHost(this._parts):"";var I=r.parseHost(T,this._parts);if(I!=="/")throw new TypeError('Hostname "'+T+'" contains characters other than [A-Z0-9.-]');return this.build(!v),this},s.authority=function(T,v){if(this._parts.urn)return T===void 0?"":this;if(T===void 0)return this._parts.hostname?r.buildAuthority(this._parts):"";var I=r.parseAuthority(T,this._parts);if(I!=="/")throw new TypeError('Hostname "'+T+'" contains characters other than [A-Z0-9.-]');return this.build(!v),this},s.userinfo=function(T,v){if(this._parts.urn)return T===void 0?"":this;if(T===void 0){var I=r.buildUserinfo(this._parts);return I&&I.substring(0,I.length-1)}else return T[T.length-1]!=="@"&&(T+="@"),r.parseUserinfo(T,this._parts),this.build(!v),this},s.resource=function(T,v){var I;return T===void 0?this.path()+this.search()+this.hash():(I=r.parse(T),this._parts.path=I.path,this._parts.query=I.query,this._parts.fragment=I.fragment,this.build(!v),this)},s.subdomain=function(T,v){if(this._parts.urn)return T===void 0?"":this;if(T===void 0){if(!this._parts.hostname||this.is("IP"))return"";var I=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,I)||""}else{var O=this._parts.hostname.length-this.domain().length,N=this._parts.hostname.substring(0,O),j=new RegExp("^"+u(N));if(T&&T.charAt(T.length-1)!=="."&&(T+="."),T.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");return T&&r.ensureValidHostname(T,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(j,T),this.build(!v),this}},s.domain=function(T,v){if(this._parts.urn)return T===void 0?"":this;if(typeof T=="boolean"&&(v=T,T=void 0),T===void 0){if(!this._parts.hostname||this.is("IP"))return"";var I=this._parts.hostname.match(/\./g);if(I&&I.length<2)return this._parts.hostname;var O=this._parts.hostname.length-this.tld(v).length-1;return O=this._parts.hostname.lastIndexOf(".",O-1)+1,this._parts.hostname.substring(O)||""}else{if(!T)throw new TypeError("cannot set domain empty");if(T.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");if(r.ensureValidHostname(T,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=T;else{var N=new RegExp(u(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(N,T)}return this.build(!v),this}},s.tld=function(T,v){if(this._parts.urn)return T===void 0?"":this;if(typeof T=="boolean"&&(v=T,T=void 0),T===void 0){if(!this._parts.hostname||this.is("IP"))return"";var I=this._parts.hostname.lastIndexOf("."),O=this._parts.hostname.substring(I+1);return v!==!0&&n&&n.list[O.toLowerCase()]&&n.get(this._parts.hostname)||O}else{var N;if(T)if(T.match(/[^a-zA-Z0-9-]/))if(n&&n.is(T))N=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(N,T);else throw new TypeError('TLD "'+T+'" contains characters other than [A-Z0-9]');else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");N=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(N,T)}else throw new TypeError("cannot set TLD empty");return this.build(!v),this}},s.directory=function(T,v){if(this._parts.urn)return T===void 0?"":this;if(T===void 0||T===!0){if(!this._parts.path&&!this._parts.hostname)return"";if(this._parts.path==="/")return"/";var I=this._parts.path.length-this.filename().length-1,O=this._parts.path.substring(0,I)||(this._parts.hostname?"/":"");return T?r.decodePath(O):O}else{var N=this._parts.path.length-this.filename().length,j=this._parts.path.substring(0,N),k=new RegExp("^"+u(j));return this.is("relative")||(T||(T="/"),T.charAt(0)!=="/"&&(T="/"+T)),T&&T.charAt(T.length-1)!=="/"&&(T+="/"),T=r.recodePath(T),this._parts.path=this._parts.path.replace(k,T),this.build(!v),this}},s.filename=function(T,v){if(this._parts.urn)return T===void 0?"":this;if(typeof T!="string"){if(!this._parts.path||this._parts.path==="/")return"";var I=this._parts.path.lastIndexOf("/"),O=this._parts.path.substring(I+1);return T?r.decodePathSegment(O):O}else{var N=!1;T.charAt(0)==="/"&&(T=T.substring(1)),T.match(/\.?\//)&&(N=!0);var j=new RegExp(u(this.filename())+"$");return T=r.recodePath(T),this._parts.path=this._parts.path.replace(j,T),N?this.normalizePath(v):this.build(!v),this}},s.suffix=function(T,v){if(this._parts.urn)return T===void 0?"":this;if(T===void 0||T===!0){if(!this._parts.path||this._parts.path==="/")return"";var I=this.filename(),O=I.lastIndexOf("."),N,j;return O===-1?"":(N=I.substring(O+1),j=/^[a-z0-9%]+$/i.test(N)?N:"",T?r.decodePathSegment(j):j)}else{T.charAt(0)==="."&&(T=T.substring(1));var k=this.suffix(),U;if(k)T?U=new RegExp(u(k)+"$"):U=new RegExp(u("."+k)+"$");else{if(!T)return this;this._parts.path+="."+r.recodePath(T)}return U&&(T=r.recodePath(T),this._parts.path=this._parts.path.replace(U,T)),this.build(!v),this}},s.segment=function(T,v,I){var O=this._parts.urn?":":"/",N=this.path(),j=N.substring(0,1)==="/",k=N.split(O);if(T!==void 0&&typeof T!="number"&&(I=v,v=T,T=void 0),T!==void 0&&typeof T!="number")throw new Error('Bad segment "'+T+'", must be 0-based integer');if(j&&k.shift(),T<0&&(T=Math.max(k.length+T,0)),v===void 0)return T===void 0?k:k[T];if(T===null||k[T]===void 0)if(d(v)){k=[];for(var U=0,F=v.length;U<F;U++)!v[U].length&&(!k.length||!k[k.length-1].length)||(k.length&&!k[k.length-1].length&&k.pop(),k.push(A(v[U])))}else(v||typeof v=="string")&&(v=A(v),k[k.length-1]===""?k[k.length-1]=v:k.push(v));else v?k[T]=A(v):k.splice(T,1);return j&&k.unshift(""),this.path(k.join(O),I)},s.segmentCoded=function(T,v,I){var O,N,j;if(typeof T!="number"&&(I=v,v=T,T=void 0),v===void 0){if(O=this.segment(T,v,I),!d(O))O=O!==void 0?r.decode(O):void 0;else for(N=0,j=O.length;N<j;N++)O[N]=r.decode(O[N]);return O}if(!d(v))v=typeof v=="string"||v instanceof String?r.encode(v):v;else for(N=0,j=v.length;N<j;N++)v[N]=r.encode(v[N]);return this.segment(T,v,I)};var _=s.query;return s.query=function(T,v){if(T===!0)return r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof T=="function"){var I=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace),O=T.call(this,I);return this._parts.query=r.buildQuery(O||I,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!v),this}else return T!==void 0&&typeof T!="string"?(this._parts.query=r.buildQuery(T,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!v),this):_.call(this,T,v)},s.setQuery=function(T,v,I){var O=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof T=="string"||T instanceof String)O[T]=v!==void 0?v:null;else if(typeof T=="object")for(var N in T)c.call(T,N)&&(O[N]=T[N]);else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");return this._parts.query=r.buildQuery(O,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof T!="string"&&(I=v),this.build(!I),this},s.addQuery=function(T,v,I){var O=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return r.addQuery(O,T,v===void 0?null:v),this._parts.query=r.buildQuery(O,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof T!="string"&&(I=v),this.build(!I),this},s.removeQuery=function(T,v,I){var O=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return r.removeQuery(O,T,v),this._parts.query=r.buildQuery(O,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof T!="string"&&(I=v),this.build(!I),this},s.hasQuery=function(T,v,I){var O=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return r.hasQuery(O,T,v,I)},s.setSearch=s.setQuery,s.addSearch=s.addQuery,s.removeSearch=s.removeQuery,s.hasSearch=s.hasQuery,s.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},s.normalizeProtocol=function(T){return typeof this._parts.protocol=="string"&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!T)),this},s.normalizeHostname=function(T){return this._parts.hostname&&(this.is("IDN")&&e?this._parts.hostname=e.toASCII(this._parts.hostname):this.is("IPv6")&&t&&(this._parts.hostname=t.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!T)),this},s.normalizePort=function(T){return typeof this._parts.protocol=="string"&&this._parts.port===r.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!T)),this},s.normalizePath=function(T){var v=this._parts.path;if(!v)return this;if(this._parts.urn)return this._parts.path=r.recodeUrnPath(this._parts.path),this.build(!T),this;if(this._parts.path==="/")return this;v=r.recodePath(v);var I,O="",N,j;for(v.charAt(0)!=="/"&&(I=!0,v="/"+v),(v.slice(-3)==="/.."||v.slice(-2)==="/.")&&(v+="/"),v=v.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),I&&(O=v.substring(1).match(/^(\.\.\/)+/)||"",O&&(O=O[0]));N=v.search(/\/\.\.(\/|$)/),N!==-1;){if(N===0){v=v.substring(3);continue}j=v.substring(0,N).lastIndexOf("/"),j===-1&&(j=N),v=v.substring(0,j)+v.substring(N+3)}return I&&this.is("relative")&&(v=O+v.substring(1)),this._parts.path=v,this.build(!T),this},s.normalizePathname=s.normalizePath,s.normalizeQuery=function(T){return typeof this._parts.query=="string"&&(this._parts.query.length?this.query(r.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!T)),this},s.normalizeFragment=function(T){return this._parts.fragment||(this._parts.fragment=null,this.build(!T)),this},s.normalizeSearch=s.normalizeQuery,s.normalizeHash=s.normalizeFragment,s.iso8859=function(){var T=r.encode,v=r.decode;r.encode=escape,r.decode=decodeURIComponent;try{this.normalize()}finally{r.encode=T,r.decode=v}return this},s.unicode=function(){var T=r.encode,v=r.decode;r.encode=x,r.decode=unescape;try{this.normalize()}finally{r.encode=T,r.decode=v}return this},s.readable=function(){var T=this.clone();T.username("").password("").normalize();var v="";if(T._parts.protocol&&(v+=T._parts.protocol+"://"),T._parts.hostname&&(T.is("punycode")&&e?(v+=e.toUnicode(T._parts.hostname),T._parts.port&&(v+=":"+T._parts.port)):v+=T.host()),T._parts.hostname&&T._parts.path&&T._parts.path.charAt(0)!=="/"&&(v+="/"),v+=T.path(!0),T._parts.query){for(var I="",O=0,N=T._parts.query.split("&"),j=N.length;O<j;O++){var k=(N[O]||"").split("=");I+="&"+r.decodeQuery(k[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),k[1]!==void 0&&(I+="="+r.decodeQuery(k[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}v+="?"+I.substring(1)}return v+=r.decodeQuery(T.hash(),!0),v},s.absoluteTo=function(T){var v=this.clone(),I=["protocol","username","password","hostname","port"],O,N,j;if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(T instanceof r||(T=new r(T)),v._parts.protocol||(v._parts.protocol=T._parts.protocol,this._parts.hostname))return v;for(N=0;j=I[N];N++)v._parts[j]=T._parts[j];return v._parts.path?(v._parts.path.substring(-2)===".."&&(v._parts.path+="/"),v.path().charAt(0)!=="/"&&(O=T.directory(),O=O||(T.path().indexOf("/")===0?"/":""),v._parts.path=(O?O+"/":"")+v._parts.path,v.normalizePath())):(v._parts.path=T._parts.path,v._parts.query||(v._parts.query=T._parts.query)),v.build(),v},s.relativeTo=function(T){var v=this.clone().normalize(),I,O,N,j,k;if(v._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(T=new r(T).normalize(),I=v._parts,O=T._parts,j=v.path(),k=T.path(),j.charAt(0)!=="/")throw new Error("URI is already relative");if(k.charAt(0)!=="/")throw new Error("Cannot calculate a URI relative to another relative URI");if(I.protocol===O.protocol&&(I.protocol=null),I.username!==O.username||I.password!==O.password||I.protocol!==null||I.username!==null||I.password!==null)return v.build();if(I.hostname===O.hostname&&I.port===O.port)I.hostname=null,I.port=null;else return v.build();if(j===k)return I.path="",v.build();if(N=r.commonPath(j,k),!N)return v.build();var U=O.path.substring(N.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return I.path=U+I.path.substring(N.length)||"./",v.build()},s.equals=function(T){var v=this.clone(),I=new r(T),O={},N={},j={},k,U,F;if(v.normalize(),I.normalize(),v.toString()===I.toString())return!0;if(k=v.query(),U=I.query(),v.query(""),I.query(""),v.toString()!==I.toString()||k.length!==U.length)return!1;O=r.parseQuery(k,this._parts.escapeQuerySpace),N=r.parseQuery(U,this._parts.escapeQuerySpace);for(F in O)if(c.call(O,F)){if(d(O[F])){if(!m(O[F],N[F]))return!1}else if(O[F]!==N[F])return!1;j[F]=!0}for(F in N)if(c.call(N,F)&&!j[F])return!1;return!0},s.preventInvalidHostname=function(T){return this._parts.preventInvalidHostname=!!T,this},s.duplicateQueryParameters=function(T){return this._parts.duplicateQueryParameters=!!T,this},s.escapeQuerySpace=function(T){return this._parts.escapeQuerySpace=!!T,this},r})});var Oge=zi((JHn,Rge)=>{"use strict";Rge.exports=Ant;var bN=1e20;function Ant(e,t){t||(t={});var n=t.cutoff==null?.25:t.cutoff,i=t.radius==null?8:t.radius,o=t.channel||0,r,a,s,c,u,f,d,p,g,m,A;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!t.width||!t.height)throw Error("For raw data width and height should be provided by options");r=t.width,a=t.height,c=e,t.stride?f=t.stride:f=Math.floor(e.length/r/a)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(p=e,d=p.getContext("2d"),r=p.width,a=p.height,g=d.getImageData(0,0,r,a),c=g.data,f=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(p=e.canvas,d=e,r=p.width,a=p.height,g=d.getImageData(0,0,r,a),c=g.data,f=4):window.ImageData&&e instanceof window.ImageData&&(g=e,r=e.width,a=e.height,c=g.data,f=4);if(s=Math.max(r,a),window.Uint8ClampedArray&&c instanceof window.Uint8ClampedArray||window.Uint8Array&&c instanceof window.Uint8Array)for(u=c,c=Array(r*a),m=0,A=Math.floor(u.length/f);m<A;m++)c[m]=u[m*f+o]/255;else if(f!==1)throw Error("Raw data can have only 1 value per pixel");var y=Array(r*a),x=Array(r*a),b=Array(s),C=Array(s),E=Array(s+1),S=Array(s);for(m=0,A=r*a;m<A;m++){var w=c[m];y[m]=w===1?0:w===0?bN:Math.pow(Math.max(0,.5-w),2),x[m]=w===1?bN:w===0?0:Math.pow(Math.max(0,w-.5),2)}Dge(y,r,a,b,C,S,E),Dge(x,r,a,b,C,S,E);var P=window.Float32Array?new Float32Array(r*a):new Array(r*a);for(m=0,A=r*a;m<A;m++)P[m]=Math.min(Math.max(1-((y[m]-x[m])/i+n),0),1);return P}function Dge(e,t,n,i,o,r,a){for(var s=0;s<t;s++){for(var c=0;c<n;c++)i[c]=e[c*t+s];for(Pge(i,o,r,a,n),c=0;c<n;c++)e[c*t+s]=o[c]}for(c=0;c<n;c++){for(s=0;s<t;s++)i[s]=e[c*t+s];for(Pge(i,o,r,a,t),s=0;s<t;s++)e[c*t+s]=Math.sqrt(o[s])}}function Pge(e,t,n,i,o){n[0]=0,i[0]=-bN,i[1]=+bN;for(var r=1,a=0;r<o;r++){for(var s=(e[r]+r*r-(e[n[a]]+n[a]*n[a]))/(2*r-2*n[a]);s<=i[a];)a--,s=(e[r]+r*r-(e[n[a]]+n[a]*n[a]))/(2*r-2*n[a]);a++,n[a]=r,i[a]=s,i[a+1]=+bN}for(r=0,a=0;r<o;r++){for(;i[a+1]<r;)a++;t[r]=(r-n[a])*(r-n[a])+e[n[a]]}}});var kge=zi((p6n,Qj)=>{function Int(){var e=0,t=1,n=2,i=3,o=4,r=5,a=6,s=7,c=8,u=9,f=10,d=11,p=12,g=13,m=14,A=15,y=16,x=17,b=0,C=1,E=2,S=3,w=4;function P(_,T){return 55296<=_.charCodeAt(T)&&_.charCodeAt(T)<=56319&&56320<=_.charCodeAt(T+1)&&_.charCodeAt(T+1)<=57343}function R(_,T){T===void 0&&(T=0);var v=_.charCodeAt(T);if(55296<=v&&v<=56319&&T<_.length-1){var I=v,O=_.charCodeAt(T+1);return 56320<=O&&O<=57343?(I-55296)*1024+(O-56320)+65536:I}if(56320<=v&&v<=57343&&T>=1){var I=_.charCodeAt(T-1),O=v;return 55296<=I&&I<=56319?(I-55296)*1024+(O-56320)+65536:O}return v}function B(_,T,v){var I=[_].concat(T).concat([v]),O=I[I.length-2],N=v,j=I.lastIndexOf(m);if(j>1&&I.slice(1,j).every(function(F){return F==i})&&[i,g,x].indexOf(_)==-1)return E;var k=I.lastIndexOf(o);if(k>0&&I.slice(1,k).every(function(F){return F==o})&&[p,o].indexOf(O)==-1)return I.filter(function(F){return F==o}).length%2==1?S:w;if(O==e&&N==t)return b;if(O==n||O==e||O==t)return N==m&&T.every(function(F){return F==i})?E:C;if(N==n||N==e||N==t)return C;if(O==a&&(N==a||N==s||N==u||N==f))return b;if((O==u||O==s)&&(N==s||N==c))return b;if((O==f||O==c)&&N==c)return b;if(N==i||N==A)return b;if(N==r)return b;if(O==p)return b;var U=I.indexOf(i)!=-1?I.lastIndexOf(i)-1:I.length-2;return[g,x].indexOf(I[U])!=-1&&I.slice(U+1,-1).every(function(F){return F==i})&&N==m||O==A&&[y,x].indexOf(N)!=-1?b:T.indexOf(o)!=-1?E:O==o&&N==o?b:C}this.nextBreak=function(_,T){if(T===void 0&&(T=0),T<0)return 0;if(T>=_.length-1)return _.length;for(var v=L(R(_,T)),I=[],O=T+1;O<_.length;O++)if(!P(_,O-1)){var N=L(R(_,O));if(B(v,I,N))return O;I.push(N)}return _.length},this.splitGraphemes=function(_){for(var T=[],v=0,I;(I=this.nextBreak(_,v))<_.length;)T.push(_.slice(v,I)),v=I;return v<_.length&&T.push(_.slice(v)),T},this.iterateGraphemes=function(_){var T=0,v={next:(function(){var I,O;return(O=this.nextBreak(_,T))<_.length?(I=_.slice(T,O),T=O,{value:I,done:!1}):T<_.length?(I=_.slice(T),T=_.length,{value:I,done:!1}):{value:void 0,done:!0}}).bind(this)};return typeof Symbol<"u"&&Symbol.iterator&&(v[Symbol.iterator]=function(){return v}),v},this.countGraphemes=function(_){for(var T=0,v=0,I;(I=this.nextBreak(_,v))<_.length;)v=I,T++;return v<_.length&&T++,T};function L(_){return 1536<=_&&_<=1541||_==1757||_==1807||_==2274||_==3406||_==69821||70082<=_&&_<=70083||_==72250||72326<=_&&_<=72329||_==73030?p:_==13?e:_==10?t:0<=_&&_<=9||11<=_&&_<=12||14<=_&&_<=31||127<=_&&_<=159||_==173||_==1564||_==6158||_==8203||8206<=_&&_<=8207||_==8232||_==8233||8234<=_&&_<=8238||8288<=_&&_<=8292||_==8293||8294<=_&&_<=8303||55296<=_&&_<=57343||_==65279||65520<=_&&_<=65528||65529<=_&&_<=65531||113824<=_&&_<=113827||119155<=_&&_<=119162||_==917504||_==917505||917506<=_&&_<=917535||917632<=_&&_<=917759||918e3<=_&&_<=921599?n:768<=_&&_<=879||1155<=_&&_<=1159||1160<=_&&_<=1161||1425<=_&&_<=1469||_==1471||1473<=_&&_<=1474||1476<=_&&_<=1477||_==1479||1552<=_&&_<=1562||1611<=_&&_<=1631||_==1648||1750<=_&&_<=1756||1759<=_&&_<=1764||1767<=_&&_<=1768||1770<=_&&_<=1773||_==1809||1840<=_&&_<=1866||1958<=_&&_<=1968||2027<=_&&_<=2035||2070<=_&&_<=2073||2075<=_&&_<=2083||2085<=_&&_<=2087||2089<=_&&_<=2093||2137<=_&&_<=2139||2260<=_&&_<=2273||2275<=_&&_<=2306||_==2362||_==2364||2369<=_&&_<=2376||_==2381||2385<=_&&_<=2391||2402<=_&&_<=2403||_==2433||_==2492||_==2494||2497<=_&&_<=2500||_==2509||_==2519||2530<=_&&_<=2531||2561<=_&&_<=2562||_==2620||2625<=_&&_<=2626||2631<=_&&_<=2632||2635<=_&&_<=2637||_==2641||2672<=_&&_<=2673||_==2677||2689<=_&&_<=2690||_==2748||2753<=_&&_<=2757||2759<=_&&_<=2760||_==2765||2786<=_&&_<=2787||2810<=_&&_<=2815||_==2817||_==2876||_==2878||_==2879||2881<=_&&_<=2884||_==2893||_==2902||_==2903||2914<=_&&_<=2915||_==2946||_==3006||_==3008||_==3021||_==3031||_==3072||3134<=_&&_<=3136||3142<=_&&_<=3144||3146<=_&&_<=3149||3157<=_&&_<=3158||3170<=_&&_<=3171||_==3201||_==3260||_==3263||_==3266||_==3270||3276<=_&&_<=3277||3285<=_&&_<=3286||3298<=_&&_<=3299||3328<=_&&_<=3329||3387<=_&&_<=3388||_==3390||3393<=_&&_<=3396||_==3405||_==3415||3426<=_&&_<=3427||_==3530||_==3535||3538<=_&&_<=3540||_==3542||_==3551||_==3633||3636<=_&&_<=3642||3655<=_&&_<=3662||_==3761||3764<=_&&_<=3769||3771<=_&&_<=3772||3784<=_&&_<=3789||3864<=_&&_<=3865||_==3893||_==3895||_==3897||3953<=_&&_<=3966||3968<=_&&_<=3972||3974<=_&&_<=3975||3981<=_&&_<=3991||3993<=_&&_<=4028||_==4038||4141<=_&&_<=4144||4146<=_&&_<=4151||4153<=_&&_<=4154||4157<=_&&_<=4158||4184<=_&&_<=4185||4190<=_&&_<=4192||4209<=_&&_<=4212||_==4226||4229<=_&&_<=4230||_==4237||_==4253||4957<=_&&_<=4959||5906<=_&&_<=5908||5938<=_&&_<=5940||5970<=_&&_<=5971||6002<=_&&_<=6003||6068<=_&&_<=6069||6071<=_&&_<=6077||_==6086||6089<=_&&_<=6099||_==6109||6155<=_&&_<=6157||6277<=_&&_<=6278||_==6313||6432<=_&&_<=6434||6439<=_&&_<=6440||_==6450||6457<=_&&_<=6459||6679<=_&&_<=6680||_==6683||_==6742||6744<=_&&_<=6750||_==6752||_==6754||6757<=_&&_<=6764||6771<=_&&_<=6780||_==6783||6832<=_&&_<=6845||_==6846||6912<=_&&_<=6915||_==6964||6966<=_&&_<=6970||_==6972||_==6978||7019<=_&&_<=7027||7040<=_&&_<=7041||7074<=_&&_<=7077||7080<=_&&_<=7081||7083<=_&&_<=7085||_==7142||7144<=_&&_<=7145||_==7149||7151<=_&&_<=7153||7212<=_&&_<=7219||7222<=_&&_<=7223||7376<=_&&_<=7378||7380<=_&&_<=7392||7394<=_&&_<=7400||_==7405||_==7412||7416<=_&&_<=7417||7616<=_&&_<=7673||7675<=_&&_<=7679||_==8204||8400<=_&&_<=8412||8413<=_&&_<=8416||_==8417||8418<=_&&_<=8420||8421<=_&&_<=8432||11503<=_&&_<=11505||_==11647||11744<=_&&_<=11775||12330<=_&&_<=12333||12334<=_&&_<=12335||12441<=_&&_<=12442||_==42607||42608<=_&&_<=42610||42612<=_&&_<=42621||42654<=_&&_<=42655||42736<=_&&_<=42737||_==43010||_==43014||_==43019||43045<=_&&_<=43046||43204<=_&&_<=43205||43232<=_&&_<=43249||43302<=_&&_<=43309||43335<=_&&_<=43345||43392<=_&&_<=43394||_==43443||43446<=_&&_<=43449||_==43452||_==43493||43561<=_&&_<=43566||43569<=_&&_<=43570||43573<=_&&_<=43574||_==43587||_==43596||_==43644||_==43696||43698<=_&&_<=43700||43703<=_&&_<=43704||43710<=_&&_<=43711||_==43713||43756<=_&&_<=43757||_==43766||_==44005||_==44008||_==44013||_==64286||65024<=_&&_<=65039||65056<=_&&_<=65071||65438<=_&&_<=65439||_==66045||_==66272||66422<=_&&_<=66426||68097<=_&&_<=68099||68101<=_&&_<=68102||68108<=_&&_<=68111||68152<=_&&_<=68154||_==68159||68325<=_&&_<=68326||_==69633||69688<=_&&_<=69702||69759<=_&&_<=69761||69811<=_&&_<=69814||69817<=_&&_<=69818||69888<=_&&_<=69890||69927<=_&&_<=69931||69933<=_&&_<=69940||_==70003||70016<=_&&_<=70017||70070<=_&&_<=70078||70090<=_&&_<=70092||70191<=_&&_<=70193||_==70196||70198<=_&&_<=70199||_==70206||_==70367||70371<=_&&_<=70378||70400<=_&&_<=70401||_==70460||_==70462||_==70464||_==70487||70502<=_&&_<=70508||70512<=_&&_<=70516||70712<=_&&_<=70719||70722<=_&&_<=70724||_==70726||_==70832||70835<=_&&_<=70840||_==70842||_==70845||70847<=_&&_<=70848||70850<=_&&_<=70851||_==71087||71090<=_&&_<=71093||71100<=_&&_<=71101||71103<=_&&_<=71104||71132<=_&&_<=71133||71219<=_&&_<=71226||_==71229||71231<=_&&_<=71232||_==71339||_==71341||71344<=_&&_<=71349||_==71351||71453<=_&&_<=71455||71458<=_&&_<=71461||71463<=_&&_<=71467||72193<=_&&_<=72198||72201<=_&&_<=72202||72243<=_&&_<=72248||72251<=_&&_<=72254||_==72263||72273<=_&&_<=72278||72281<=_&&_<=72283||72330<=_&&_<=72342||72344<=_&&_<=72345||72752<=_&&_<=72758||72760<=_&&_<=72765||_==72767||72850<=_&&_<=72871||72874<=_&&_<=72880||72882<=_&&_<=72883||72885<=_&&_<=72886||73009<=_&&_<=73014||_==73018||73020<=_&&_<=73021||73023<=_&&_<=73029||_==73031||92912<=_&&_<=92916||92976<=_&&_<=92982||94095<=_&&_<=94098||113821<=_&&_<=113822||_==119141||119143<=_&&_<=119145||119150<=_&&_<=119154||119163<=_&&_<=119170||119173<=_&&_<=119179||119210<=_&&_<=119213||119362<=_&&_<=119364||121344<=_&&_<=121398||121403<=_&&_<=121452||_==121461||_==121476||121499<=_&&_<=121503||121505<=_&&_<=121519||122880<=_&&_<=122886||122888<=_&&_<=122904||122907<=_&&_<=122913||122915<=_&&_<=122916||122918<=_&&_<=122922||125136<=_&&_<=125142||125252<=_&&_<=125258||917536<=_&&_<=917631||917760<=_&&_<=917999?i:127462<=_&&_<=127487?o:_==2307||_==2363||2366<=_&&_<=2368||2377<=_&&_<=2380||2382<=_&&_<=2383||2434<=_&&_<=2435||2495<=_&&_<=2496||2503<=_&&_<=2504||2507<=_&&_<=2508||_==2563||2622<=_&&_<=2624||_==2691||2750<=_&&_<=2752||_==2761||2763<=_&&_<=2764||2818<=_&&_<=2819||_==2880||2887<=_&&_<=2888||2891<=_&&_<=2892||_==3007||3009<=_&&_<=3010||3014<=_&&_<=3016||3018<=_&&_<=3020||3073<=_&&_<=3075||3137<=_&&_<=3140||3202<=_&&_<=3203||_==3262||3264<=_&&_<=3265||3267<=_&&_<=3268||3271<=_&&_<=3272||3274<=_&&_<=3275||3330<=_&&_<=3331||3391<=_&&_<=3392||3398<=_&&_<=3400||3402<=_&&_<=3404||3458<=_&&_<=3459||3536<=_&&_<=3537||3544<=_&&_<=3550||3570<=_&&_<=3571||_==3635||_==3763||3902<=_&&_<=3903||_==3967||_==4145||4155<=_&&_<=4156||4182<=_&&_<=4183||_==4228||_==6070||6078<=_&&_<=6085||6087<=_&&_<=6088||6435<=_&&_<=6438||6441<=_&&_<=6443||6448<=_&&_<=6449||6451<=_&&_<=6456||6681<=_&&_<=6682||_==6741||_==6743||6765<=_&&_<=6770||_==6916||_==6965||_==6971||6973<=_&&_<=6977||6979<=_&&_<=6980||_==7042||_==7073||7078<=_&&_<=7079||_==7082||_==7143||7146<=_&&_<=7148||_==7150||7154<=_&&_<=7155||7204<=_&&_<=7211||7220<=_&&_<=7221||_==7393||7410<=_&&_<=7411||_==7415||43043<=_&&_<=43044||_==43047||43136<=_&&_<=43137||43188<=_&&_<=43203||43346<=_&&_<=43347||_==43395||43444<=_&&_<=43445||43450<=_&&_<=43451||43453<=_&&_<=43456||43567<=_&&_<=43568||43571<=_&&_<=43572||_==43597||_==43755||43758<=_&&_<=43759||_==43765||44003<=_&&_<=44004||44006<=_&&_<=44007||44009<=_&&_<=44010||_==44012||_==69632||_==69634||_==69762||69808<=_&&_<=69810||69815<=_&&_<=69816||_==69932||_==70018||70067<=_&&_<=70069||70079<=_&&_<=70080||70188<=_&&_<=70190||70194<=_&&_<=70195||_==70197||70368<=_&&_<=70370||70402<=_&&_<=70403||_==70463||70465<=_&&_<=70468||70471<=_&&_<=70472||70475<=_&&_<=70477||70498<=_&&_<=70499||70709<=_&&_<=70711||70720<=_&&_<=70721||_==70725||70833<=_&&_<=70834||_==70841||70843<=_&&_<=70844||_==70846||_==70849||71088<=_&&_<=71089||71096<=_&&_<=71099||_==71102||71216<=_&&_<=71218||71227<=_&&_<=71228||_==71230||_==71340||71342<=_&&_<=71343||_==71350||71456<=_&&_<=71457||_==71462||72199<=_&&_<=72200||_==72249||72279<=_&&_<=72280||_==72343||_==72751||_==72766||_==72873||_==72881||_==72884||94033<=_&&_<=94078||_==119142||_==119149?r:4352<=_&&_<=4447||43360<=_&&_<=43388?a:4448<=_&&_<=4519||55216<=_&&_<=55238?s:4520<=_&&_<=4607||55243<=_&&_<=55291?c:_==44032||_==44060||_==44088||_==44116||_==44144||_==44172||_==44200||_==44228||_==44256||_==44284||_==44312||_==44340||_==44368||_==44396||_==44424||_==44452||_==44480||_==44508||_==44536||_==44564||_==44592||_==44620||_==44648||_==44676||_==44704||_==44732||_==44760||_==44788||_==44816||_==44844||_==44872||_==44900||_==44928||_==44956||_==44984||_==45012||_==45040||_==45068||_==45096||_==45124||_==45152||_==45180||_==45208||_==45236||_==45264||_==45292||_==45320||_==45348||_==45376||_==45404||_==45432||_==45460||_==45488||_==45516||_==45544||_==45572||_==45600||_==45628||_==45656||_==45684||_==45712||_==45740||_==45768||_==45796||_==45824||_==45852||_==45880||_==45908||_==45936||_==45964||_==45992||_==46020||_==46048||_==46076||_==46104||_==46132||_==46160||_==46188||_==46216||_==46244||_==46272||_==46300||_==46328||_==46356||_==46384||_==46412||_==46440||_==46468||_==46496||_==46524||_==46552||_==46580||_==46608||_==46636||_==46664||_==46692||_==46720||_==46748||_==46776||_==46804||_==46832||_==46860||_==46888||_==46916||_==46944||_==46972||_==47e3||_==47028||_==47056||_==47084||_==47112||_==47140||_==47168||_==47196||_==47224||_==47252||_==47280||_==47308||_==47336||_==47364||_==47392||_==47420||_==47448||_==47476||_==47504||_==47532||_==47560||_==47588||_==47616||_==47644||_==47672||_==47700||_==47728||_==47756||_==47784||_==47812||_==47840||_==47868||_==47896||_==47924||_==47952||_==47980||_==48008||_==48036||_==48064||_==48092||_==48120||_==48148||_==48176||_==48204||_==48232||_==48260||_==48288||_==48316||_==48344||_==48372||_==48400||_==48428||_==48456||_==48484||_==48512||_==48540||_==48568||_==48596||_==48624||_==48652||_==48680||_==48708||_==48736||_==48764||_==48792||_==48820||_==48848||_==48876||_==48904||_==48932||_==48960||_==48988||_==49016||_==49044||_==49072||_==49100||_==49128||_==49156||_==49184||_==49212||_==49240||_==49268||_==49296||_==49324||_==49352||_==49380||_==49408||_==49436||_==49464||_==49492||_==49520||_==49548||_==49576||_==49604||_==49632||_==49660||_==49688||_==49716||_==49744||_==49772||_==49800||_==49828||_==49856||_==49884||_==49912||_==49940||_==49968||_==49996||_==50024||_==50052||_==50080||_==50108||_==50136||_==50164||_==50192||_==50220||_==50248||_==50276||_==50304||_==50332||_==50360||_==50388||_==50416||_==50444||_==50472||_==50500||_==50528||_==50556||_==50584||_==50612||_==50640||_==50668||_==50696||_==50724||_==50752||_==50780||_==50808||_==50836||_==50864||_==50892||_==50920||_==50948||_==50976||_==51004||_==51032||_==51060||_==51088||_==51116||_==51144||_==51172||_==51200||_==51228||_==51256||_==51284||_==51312||_==51340||_==51368||_==51396||_==51424||_==51452||_==51480||_==51508||_==51536||_==51564||_==51592||_==51620||_==51648||_==51676||_==51704||_==51732||_==51760||_==51788||_==51816||_==51844||_==51872||_==51900||_==51928||_==51956||_==51984||_==52012||_==52040||_==52068||_==52096||_==52124||_==52152||_==52180||_==52208||_==52236||_==52264||_==52292||_==52320||_==52348||_==52376||_==52404||_==52432||_==52460||_==52488||_==52516||_==52544||_==52572||_==52600||_==52628||_==52656||_==52684||_==52712||_==52740||_==52768||_==52796||_==52824||_==52852||_==52880||_==52908||_==52936||_==52964||_==52992||_==53020||_==53048||_==53076||_==53104||_==53132||_==53160||_==53188||_==53216||_==53244||_==53272||_==53300||_==53328||_==53356||_==53384||_==53412||_==53440||_==53468||_==53496||_==53524||_==53552||_==53580||_==53608||_==53636||_==53664||_==53692||_==53720||_==53748||_==53776||_==53804||_==53832||_==53860||_==53888||_==53916||_==53944||_==53972||_==54e3||_==54028||_==54056||_==54084||_==54112||_==54140||_==54168||_==54196||_==54224||_==54252||_==54280||_==54308||_==54336||_==54364||_==54392||_==54420||_==54448||_==54476||_==54504||_==54532||_==54560||_==54588||_==54616||_==54644||_==54672||_==54700||_==54728||_==54756||_==54784||_==54812||_==54840||_==54868||_==54896||_==54924||_==54952||_==54980||_==55008||_==55036||_==55064||_==55092||_==55120||_==55148||_==55176?u:44033<=_&&_<=44059||44061<=_&&_<=44087||44089<=_&&_<=44115||44117<=_&&_<=44143||44145<=_&&_<=44171||44173<=_&&_<=44199||44201<=_&&_<=44227||44229<=_&&_<=44255||44257<=_&&_<=44283||44285<=_&&_<=44311||44313<=_&&_<=44339||44341<=_&&_<=44367||44369<=_&&_<=44395||44397<=_&&_<=44423||44425<=_&&_<=44451||44453<=_&&_<=44479||44481<=_&&_<=44507||44509<=_&&_<=44535||44537<=_&&_<=44563||44565<=_&&_<=44591||44593<=_&&_<=44619||44621<=_&&_<=44647||44649<=_&&_<=44675||44677<=_&&_<=44703||44705<=_&&_<=44731||44733<=_&&_<=44759||44761<=_&&_<=44787||44789<=_&&_<=44815||44817<=_&&_<=44843||44845<=_&&_<=44871||44873<=_&&_<=44899||44901<=_&&_<=44927||44929<=_&&_<=44955||44957<=_&&_<=44983||44985<=_&&_<=45011||45013<=_&&_<=45039||45041<=_&&_<=45067||45069<=_&&_<=45095||45097<=_&&_<=45123||45125<=_&&_<=45151||45153<=_&&_<=45179||45181<=_&&_<=45207||45209<=_&&_<=45235||45237<=_&&_<=45263||45265<=_&&_<=45291||45293<=_&&_<=45319||45321<=_&&_<=45347||45349<=_&&_<=45375||45377<=_&&_<=45403||45405<=_&&_<=45431||45433<=_&&_<=45459||45461<=_&&_<=45487||45489<=_&&_<=45515||45517<=_&&_<=45543||45545<=_&&_<=45571||45573<=_&&_<=45599||45601<=_&&_<=45627||45629<=_&&_<=45655||45657<=_&&_<=45683||45685<=_&&_<=45711||45713<=_&&_<=45739||45741<=_&&_<=45767||45769<=_&&_<=45795||45797<=_&&_<=45823||45825<=_&&_<=45851||45853<=_&&_<=45879||45881<=_&&_<=45907||45909<=_&&_<=45935||45937<=_&&_<=45963||45965<=_&&_<=45991||45993<=_&&_<=46019||46021<=_&&_<=46047||46049<=_&&_<=46075||46077<=_&&_<=46103||46105<=_&&_<=46131||46133<=_&&_<=46159||46161<=_&&_<=46187||46189<=_&&_<=46215||46217<=_&&_<=46243||46245<=_&&_<=46271||46273<=_&&_<=46299||46301<=_&&_<=46327||46329<=_&&_<=46355||46357<=_&&_<=46383||46385<=_&&_<=46411||46413<=_&&_<=46439||46441<=_&&_<=46467||46469<=_&&_<=46495||46497<=_&&_<=46523||46525<=_&&_<=46551||46553<=_&&_<=46579||46581<=_&&_<=46607||46609<=_&&_<=46635||46637<=_&&_<=46663||46665<=_&&_<=46691||46693<=_&&_<=46719||46721<=_&&_<=46747||46749<=_&&_<=46775||46777<=_&&_<=46803||46805<=_&&_<=46831||46833<=_&&_<=46859||46861<=_&&_<=46887||46889<=_&&_<=46915||46917<=_&&_<=46943||46945<=_&&_<=46971||46973<=_&&_<=46999||47001<=_&&_<=47027||47029<=_&&_<=47055||47057<=_&&_<=47083||47085<=_&&_<=47111||47113<=_&&_<=47139||47141<=_&&_<=47167||47169<=_&&_<=47195||47197<=_&&_<=47223||47225<=_&&_<=47251||47253<=_&&_<=47279||47281<=_&&_<=47307||47309<=_&&_<=47335||47337<=_&&_<=47363||47365<=_&&_<=47391||47393<=_&&_<=47419||47421<=_&&_<=47447||47449<=_&&_<=47475||47477<=_&&_<=47503||47505<=_&&_<=47531||47533<=_&&_<=47559||47561<=_&&_<=47587||47589<=_&&_<=47615||47617<=_&&_<=47643||47645<=_&&_<=47671||47673<=_&&_<=47699||47701<=_&&_<=47727||47729<=_&&_<=47755||47757<=_&&_<=47783||47785<=_&&_<=47811||47813<=_&&_<=47839||47841<=_&&_<=47867||47869<=_&&_<=47895||47897<=_&&_<=47923||47925<=_&&_<=47951||47953<=_&&_<=47979||47981<=_&&_<=48007||48009<=_&&_<=48035||48037<=_&&_<=48063||48065<=_&&_<=48091||48093<=_&&_<=48119||48121<=_&&_<=48147||48149<=_&&_<=48175||48177<=_&&_<=48203||48205<=_&&_<=48231||48233<=_&&_<=48259||48261<=_&&_<=48287||48289<=_&&_<=48315||48317<=_&&_<=48343||48345<=_&&_<=48371||48373<=_&&_<=48399||48401<=_&&_<=48427||48429<=_&&_<=48455||48457<=_&&_<=48483||48485<=_&&_<=48511||48513<=_&&_<=48539||48541<=_&&_<=48567||48569<=_&&_<=48595||48597<=_&&_<=48623||48625<=_&&_<=48651||48653<=_&&_<=48679||48681<=_&&_<=48707||48709<=_&&_<=48735||48737<=_&&_<=48763||48765<=_&&_<=48791||48793<=_&&_<=48819||48821<=_&&_<=48847||48849<=_&&_<=48875||48877<=_&&_<=48903||48905<=_&&_<=48931||48933<=_&&_<=48959||48961<=_&&_<=48987||48989<=_&&_<=49015||49017<=_&&_<=49043||49045<=_&&_<=49071||49073<=_&&_<=49099||49101<=_&&_<=49127||49129<=_&&_<=49155||49157<=_&&_<=49183||49185<=_&&_<=49211||49213<=_&&_<=49239||49241<=_&&_<=49267||49269<=_&&_<=49295||49297<=_&&_<=49323||49325<=_&&_<=49351||49353<=_&&_<=49379||49381<=_&&_<=49407||49409<=_&&_<=49435||49437<=_&&_<=49463||49465<=_&&_<=49491||49493<=_&&_<=49519||49521<=_&&_<=49547||49549<=_&&_<=49575||49577<=_&&_<=49603||49605<=_&&_<=49631||49633<=_&&_<=49659||49661<=_&&_<=49687||49689<=_&&_<=49715||49717<=_&&_<=49743||49745<=_&&_<=49771||49773<=_&&_<=49799||49801<=_&&_<=49827||49829<=_&&_<=49855||49857<=_&&_<=49883||49885<=_&&_<=49911||49913<=_&&_<=49939||49941<=_&&_<=49967||49969<=_&&_<=49995||49997<=_&&_<=50023||50025<=_&&_<=50051||50053<=_&&_<=50079||50081<=_&&_<=50107||50109<=_&&_<=50135||50137<=_&&_<=50163||50165<=_&&_<=50191||50193<=_&&_<=50219||50221<=_&&_<=50247||50249<=_&&_<=50275||50277<=_&&_<=50303||50305<=_&&_<=50331||50333<=_&&_<=50359||50361<=_&&_<=50387||50389<=_&&_<=50415||50417<=_&&_<=50443||50445<=_&&_<=50471||50473<=_&&_<=50499||50501<=_&&_<=50527||50529<=_&&_<=50555||50557<=_&&_<=50583||50585<=_&&_<=50611||50613<=_&&_<=50639||50641<=_&&_<=50667||50669<=_&&_<=50695||50697<=_&&_<=50723||50725<=_&&_<=50751||50753<=_&&_<=50779||50781<=_&&_<=50807||50809<=_&&_<=50835||50837<=_&&_<=50863||50865<=_&&_<=50891||50893<=_&&_<=50919||50921<=_&&_<=50947||50949<=_&&_<=50975||50977<=_&&_<=51003||51005<=_&&_<=51031||51033<=_&&_<=51059||51061<=_&&_<=51087||51089<=_&&_<=51115||51117<=_&&_<=51143||51145<=_&&_<=51171||51173<=_&&_<=51199||51201<=_&&_<=51227||51229<=_&&_<=51255||51257<=_&&_<=51283||51285<=_&&_<=51311||51313<=_&&_<=51339||51341<=_&&_<=51367||51369<=_&&_<=51395||51397<=_&&_<=51423||51425<=_&&_<=51451||51453<=_&&_<=51479||51481<=_&&_<=51507||51509<=_&&_<=51535||51537<=_&&_<=51563||51565<=_&&_<=51591||51593<=_&&_<=51619||51621<=_&&_<=51647||51649<=_&&_<=51675||51677<=_&&_<=51703||51705<=_&&_<=51731||51733<=_&&_<=51759||51761<=_&&_<=51787||51789<=_&&_<=51815||51817<=_&&_<=51843||51845<=_&&_<=51871||51873<=_&&_<=51899||51901<=_&&_<=51927||51929<=_&&_<=51955||51957<=_&&_<=51983||51985<=_&&_<=52011||52013<=_&&_<=52039||52041<=_&&_<=52067||52069<=_&&_<=52095||52097<=_&&_<=52123||52125<=_&&_<=52151||52153<=_&&_<=52179||52181<=_&&_<=52207||52209<=_&&_<=52235||52237<=_&&_<=52263||52265<=_&&_<=52291||52293<=_&&_<=52319||52321<=_&&_<=52347||52349<=_&&_<=52375||52377<=_&&_<=52403||52405<=_&&_<=52431||52433<=_&&_<=52459||52461<=_&&_<=52487||52489<=_&&_<=52515||52517<=_&&_<=52543||52545<=_&&_<=52571||52573<=_&&_<=52599||52601<=_&&_<=52627||52629<=_&&_<=52655||52657<=_&&_<=52683||52685<=_&&_<=52711||52713<=_&&_<=52739||52741<=_&&_<=52767||52769<=_&&_<=52795||52797<=_&&_<=52823||52825<=_&&_<=52851||52853<=_&&_<=52879||52881<=_&&_<=52907||52909<=_&&_<=52935||52937<=_&&_<=52963||52965<=_&&_<=52991||52993<=_&&_<=53019||53021<=_&&_<=53047||53049<=_&&_<=53075||53077<=_&&_<=53103||53105<=_&&_<=53131||53133<=_&&_<=53159||53161<=_&&_<=53187||53189<=_&&_<=53215||53217<=_&&_<=53243||53245<=_&&_<=53271||53273<=_&&_<=53299||53301<=_&&_<=53327||53329<=_&&_<=53355||53357<=_&&_<=53383||53385<=_&&_<=53411||53413<=_&&_<=53439||53441<=_&&_<=53467||53469<=_&&_<=53495||53497<=_&&_<=53523||53525<=_&&_<=53551||53553<=_&&_<=53579||53581<=_&&_<=53607||53609<=_&&_<=53635||53637<=_&&_<=53663||53665<=_&&_<=53691||53693<=_&&_<=53719||53721<=_&&_<=53747||53749<=_&&_<=53775||53777<=_&&_<=53803||53805<=_&&_<=53831||53833<=_&&_<=53859||53861<=_&&_<=53887||53889<=_&&_<=53915||53917<=_&&_<=53943||53945<=_&&_<=53971||53973<=_&&_<=53999||54001<=_&&_<=54027||54029<=_&&_<=54055||54057<=_&&_<=54083||54085<=_&&_<=54111||54113<=_&&_<=54139||54141<=_&&_<=54167||54169<=_&&_<=54195||54197<=_&&_<=54223||54225<=_&&_<=54251||54253<=_&&_<=54279||54281<=_&&_<=54307||54309<=_&&_<=54335||54337<=_&&_<=54363||54365<=_&&_<=54391||54393<=_&&_<=54419||54421<=_&&_<=54447||54449<=_&&_<=54475||54477<=_&&_<=54503||54505<=_&&_<=54531||54533<=_&&_<=54559||54561<=_&&_<=54587||54589<=_&&_<=54615||54617<=_&&_<=54643||54645<=_&&_<=54671||54673<=_&&_<=54699||54701<=_&&_<=54727||54729<=_&&_<=54755||54757<=_&&_<=54783||54785<=_&&_<=54811||54813<=_&&_<=54839||54841<=_&&_<=54867||54869<=_&&_<=54895||54897<=_&&_<=54923||54925<=_&&_<=54951||54953<=_&&_<=54979||54981<=_&&_<=55007||55009<=_&&_<=55035||55037<=_&&_<=55063||55065<=_&&_<=55091||55093<=_&&_<=55119||55121<=_&&_<=55147||55149<=_&&_<=55175||55177<=_&&_<=55203?f:_==9757||_==9977||9994<=_&&_<=9997||_==127877||127938<=_&&_<=127940||_==127943||127946<=_&&_<=127948||128066<=_&&_<=128067||128070<=_&&_<=128080||_==128110||128112<=_&&_<=128120||_==128124||128129<=_&&_<=128131||128133<=_&&_<=128135||_==128170||128372<=_&&_<=128373||_==128378||_==128400||128405<=_&&_<=128406||128581<=_&&_<=128583||128587<=_&&_<=128591||_==128675||128692<=_&&_<=128694||_==128704||_==128716||129304<=_&&_<=129308||129310<=_&&_<=129311||_==129318||129328<=_&&_<=129337||129341<=_&&_<=129342||129489<=_&&_<=129501?g:127995<=_&&_<=127999?m:_==8205?A:_==9792||_==9794||9877<=_&&_<=9878||_==9992||_==10084||_==127752||_==127806||_==127859||_==127891||_==127908||_==127912||_==127979||_==127981||_==128139||128187<=_&&_<=128188||_==128295||_==128300||_==128488||_==128640||_==128658?y:128102<=_&&_<=128105?x:d}return this}typeof Qj<"u"&&Qj.exports&&(Qj.exports=Int)});var $Ce=zi((uH,QCe)=>{(function(e,t){typeof uH=="object"&&typeof QCe<"u"?t(uH):typeof define=="function"&&define.amd?define(["exports"],t):(e=e||self,t(e.topojson=e.topojson||{}))})(uH,function(e){"use strict";function t(C){return C}function n(C){if(C==null)return t;var E,S,w=C.scale[0],P=C.scale[1],R=C.translate[0],B=C.translate[1];return function(L,_){_||(E=S=0);var T=2,v=L.length,I=new Array(v);for(I[0]=(E+=L[0])*w+R,I[1]=(S+=L[1])*P+B;T<v;)I[T]=L[T],++T;return I}}function i(C){var E=n(C.transform),S,w=1/0,P=w,R=-w,B=-w;function L(T){T=E(T),T[0]<w&&(w=T[0]),T[0]>R&&(R=T[0]),T[1]<P&&(P=T[1]),T[1]>B&&(B=T[1])}function _(T){switch(T.type){case"GeometryCollection":T.geometries.forEach(_);break;case"Point":L(T.coordinates);break;case"MultiPoint":T.coordinates.forEach(L);break}}C.arcs.forEach(function(T){for(var v=-1,I=T.length,O;++v<I;)O=E(T[v],v),O[0]<w&&(w=O[0]),O[0]>R&&(R=O[0]),O[1]<P&&(P=O[1]),O[1]>B&&(B=O[1])});for(S in C.objects)_(C.objects[S]);return[w,P,R,B]}function o(C,E){for(var S,w=C.length,P=w-E;P<--w;)S=C[P],C[P++]=C[w],C[w]=S}function r(C,E){return typeof E=="string"&&(E=C.objects[E]),E.type==="GeometryCollection"?{type:"FeatureCollection",features:E.geometries.map(function(S){return a(C,S)})}:a(C,E)}function a(C,E){var S=E.id,w=E.bbox,P=E.properties==null?{}:E.properties,R=s(C,E);return S==null&&w==null?{type:"Feature",properties:P,geometry:R}:w==null?{type:"Feature",id:S,properties:P,geometry:R}:{type:"Feature",id:S,bbox:w,properties:P,geometry:R}}function s(C,E){var S=n(C.transform),w=C.arcs;function P(v,I){I.length&&I.pop();for(var O=w[v<0?~v:v],N=0,j=O.length;N<j;++N)I.push(S(O[N],N));v<0&&o(I,j)}function R(v){return S(v)}function B(v){for(var I=[],O=0,N=v.length;O<N;++O)P(v[O],I);return I.length<2&&I.push(I[0]),I}function L(v){for(var I=B(v);I.length<4;)I.push(I[0]);return I}function _(v){return v.map(L)}function T(v){var I=v.type,O;switch(I){case"GeometryCollection":return{type:I,geometries:v.geometries.map(T)};case"Point":O=R(v.coordinates);break;case"MultiPoint":O=v.coordinates.map(R);break;case"LineString":O=B(v.arcs);break;case"MultiLineString":O=v.arcs.map(B);break;case"Polygon":O=_(v.arcs);break;case"MultiPolygon":O=v.arcs.map(_);break;default:return null}return{type:I,coordinates:O}}return T(E)}function c(C,E){var S={},w={},P={},R=[],B=-1;E.forEach(function(T,v){var I=C.arcs[T<0?~T:T],O;I.length<3&&!I[1][0]&&!I[1][1]&&(O=E[++B],E[B]=T,E[v]=O)}),E.forEach(function(T){var v=L(T),I=v[0],O=v[1],N,j;if(N=P[I])if(delete P[N.end],N.push(T),N.end=O,j=w[O]){delete w[j.start];var k=j===N?N:N.concat(j);w[k.start=N.start]=P[k.end=j.end]=k}else w[N.start]=P[N.end]=N;else if(N=w[O])if(delete w[N.start],N.unshift(T),N.start=I,j=P[I]){delete P[j.end];var U=j===N?N:j.concat(N);w[U.start=j.start]=P[U.end=N.end]=U}else w[N.start]=P[N.end]=N;else N=[T],w[N.start=I]=P[N.end=O]=N});function L(T){var v=C.arcs[T<0?~T:T],I=v[0],O;return C.transform?(O=[0,0],v.forEach(function(N){O[0]+=N[0],O[1]+=N[1]})):O=v[v.length-1],T<0?[O,I]:[I,O]}function _(T,v){for(var I in T){var O=T[I];delete v[O.start],delete O.start,delete O.end,O.forEach(function(N){S[N<0?~N:N]=1}),R.push(O)}}return _(P,w),_(w,P),E.forEach(function(T){S[T<0?~T:T]||R.push([T])}),R}function u(C){return s(C,f.apply(this,arguments))}function f(C,E,S){var w,P,R;if(arguments.length>1)w=d(C,E,S);else for(P=0,w=new Array(R=C.arcs.length);P<R;++P)w[P]=P;return{type:"MultiLineString",arcs:c(C,w)}}function d(C,E,S){var w=[],P=[],R;function B(I){var O=I<0?~I:I;(P[O]||(P[O]=[])).push({i:I,g:R})}function L(I){I.forEach(B)}function _(I){I.forEach(L)}function T(I){I.forEach(_)}function v(I){switch(R=I,I.type){case"GeometryCollection":I.geometries.forEach(v);break;case"LineString":L(I.arcs);break;case"MultiLineString":case"Polygon":_(I.arcs);break;case"MultiPolygon":T(I.arcs);break}}return v(E),P.forEach(S==null?function(I){w.push(I[0].i)}:function(I){S(I[0].g,I[I.length-1].g)&&w.push(I[0].i)}),w}function p(C){for(var E=-1,S=C.length,w,P=C[S-1],R=0;++E<S;)w=P,P=C[E],R+=w[0]*P[1]-w[1]*P[0];return Math.abs(R)}function g(C){return s(C,m.apply(this,arguments))}function m(C,E){var S={},w=[],P=[];E.forEach(R);function R(_){switch(_.type){case"GeometryCollection":_.geometries.forEach(R);break;case"Polygon":B(_.arcs);break;case"MultiPolygon":_.arcs.forEach(B);break}}function B(_){_.forEach(function(T){T.forEach(function(v){(S[v=v<0?~v:v]||(S[v]=[])).push(_)})}),w.push(_)}function L(_){return p(s(C,{type:"Polygon",arcs:[_]}).coordinates[0])}return w.forEach(function(_){if(!_._){var T=[],v=[_];for(_._=1,P.push(T);_=v.pop();)T.push(_),_.forEach(function(I){I.forEach(function(O){S[O<0?~O:O].forEach(function(N){N._||(N._=1,v.push(N))})})})}}),w.forEach(function(_){delete _._}),{type:"MultiPolygon",arcs:P.map(function(_){var T=[],v;if(_.forEach(function(k){k.forEach(function(U){U.forEach(function(F){S[F<0?~F:F].length<2&&T.push(F)})})}),T=c(C,T),(v=T.length)>1)for(var I=1,O=L(T[0]),N,j;I<v;++I)(N=L(T[I]))>O&&(j=T[0],T[0]=T[I],T[I]=j,O=N);return T}).filter(function(_){return _.length>0})}}function A(C,E){for(var S=0,w=C.length;S<w;){var P=S+w>>>1;C[P]<E?S=P+1:w=P}return S}function y(C){var E={},S=C.map(function(){return[]});function w(k,U){k.forEach(function(F){F<0&&(F=~F);var H=E[F];H?H.push(U):E[F]=[U]})}function P(k,U){k.forEach(function(F){w(F,U)})}function R(k,U){k.type==="GeometryCollection"?k.geometries.forEach(function(F){R(F,U)}):k.type in B&&B[k.type](k.arcs,U)}var B={LineString:w,MultiLineString:P,Polygon:P,MultiPolygon:function(k,U){k.forEach(function(F){P(F,U)})}};C.forEach(R);for(var L in E)for(var _=E[L],T=_.length,v=0;v<T;++v)for(var I=v+1;I<T;++I){var O=_[v],N=_[I],j;(j=S[O])[L=A(j,N)]!==N&&j.splice(L,0,N),(j=S[N])[L=A(j,O)]!==O&&j.splice(L,0,O)}return S}function x(C){if(C==null)return t;var E,S,w=C.scale[0],P=C.scale[1],R=C.translate[0],B=C.translate[1];return function(L,_){_||(E=S=0);var T=2,v=L.length,I=new Array(v),O=Math.round((L[0]-R)/w),N=Math.round((L[1]-B)/P);for(I[0]=O-E,E=O,I[1]=N-S,S=N;T<v;)I[T]=L[T],++T;return I}}function b(C,E){if(C.transform)throw new Error("already quantized");if(!E||!E.scale){if(!((B=Math.floor(E))>=2))throw new Error("n must be \u22652");_=C.bbox||i(C);var S=_[0],w=_[1],P=_[2],R=_[3],B;E={scale:[P-S?(P-S)/(B-1):1,R-w?(R-w)/(B-1):1],translate:[S,w]}}else _=C.bbox;var L=x(E),_,T,v=C.objects,I={};function O(k){return L(k)}function N(k){var U;switch(k.type){case"GeometryCollection":U={type:"GeometryCollection",geometries:k.geometries.map(N)};break;case"Point":U={type:"Point",coordinates:O(k.coordinates)};break;case"MultiPoint":U={type:"MultiPoint",coordinates:k.coordinates.map(O)};break;default:return k}return k.id!=null&&(U.id=k.id),k.bbox!=null&&(U.bbox=k.bbox),k.properties!=null&&(U.properties=k.properties),U}function j(k){var U=0,F=1,H=k.length,q,J=new Array(H);for(J[0]=L(k[0],0);++U<H;)((q=L(k[U],U))[0]||q[1])&&(J[F++]=q);return F===1&&(J[F++]=[0,0]),J.length=F,J}for(T in v)I[T]=N(v[T]);return{type:"Topology",bbox:_,transform:E,objects:I,arcs:C.arcs.map(j)}}e.bbox=i,e.feature=r,e.merge=g,e.mergeArcs=m,e.mesh=u,e.meshArcs=f,e.neighbors=y,e.quantize=b,e.transform=n,e.untransform=x,Object.defineProperty(e,"__esModule",{value:!0})})});var Mm={};Mre(Mm,{__addDisposableResource:()=>VTe,__assign:()=>hH,__asyncDelegator:()=>MTe,__asyncGenerator:()=>OTe,__asyncValues:()=>BTe,__await:()=>Ew,__awaiter:()=>STe,__classPrivateFieldGet:()=>kTe,__classPrivateFieldIn:()=>UTe,__classPrivateFieldSet:()=>zTe,__createBinding:()=>pH,__decorate:()=>yTe,__disposeResources:()=>jTe,__esDecorate:()=>bTe,__exportStar:()=>ITe,__extends:()=>_Te,__generator:()=>wTe,__importDefault:()=>FTe,__importStar:()=>NTe,__makeTemplateObject:()=>LTe,__metadata:()=>vTe,__param:()=>xTe,__propKey:()=>TTe,__read:()=>OJ,__rest:()=>ATe,__rewriteRelativeImportExtension:()=>GTe,__runInitializers:()=>CTe,__setFunctionName:()=>ETe,__spread:()=>DTe,__spreadArray:()=>RTe,__spreadArrays:()=>PTe,__values:()=>mH,default:()=>Jmt});function _Te(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");PJ(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function ATe(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]]);return n}function yTe(e,t,n,i){var o=arguments.length,r=o<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(r=(o<3?a(r):o>3?a(t,n,r):a(t,n))||r);return o>3&&r&&Object.defineProperty(t,n,r),r}function xTe(e,t){return function(n,i){t(n,i,e)}}function bTe(e,t,n,i,o,r){function a(x){if(x!==void 0&&typeof x!="function")throw new TypeError("Function expected");return x}for(var s=i.kind,c=s==="getter"?"get":s==="setter"?"set":"value",u=!t&&e?i.static?e:e.prototype:null,f=t||(u?Object.getOwnPropertyDescriptor(u,i.name):{}),d,p=!1,g=n.length-1;g>=0;g--){var m={};for(var A in i)m[A]=A==="access"?{}:i[A];for(var A in i.access)m.access[A]=i.access[A];m.addInitializer=function(x){if(p)throw new TypeError("Cannot add initializers after decoration has completed");r.push(a(x||null))};var y=(0,n[g])(s==="accessor"?{get:f.get,set:f.set}:f[c],m);if(s==="accessor"){if(y===void 0)continue;if(y===null||typeof y!="object")throw new TypeError("Object expected");(d=a(y.get))&&(f.get=d),(d=a(y.set))&&(f.set=d),(d=a(y.init))&&o.unshift(d)}else(d=a(y))&&(s==="field"?o.unshift(d):f[c]=d)}u&&Object.defineProperty(u,i.name,f),p=!0}function CTe(e,t,n){for(var i=arguments.length>2,o=0;o<t.length;o++)n=i?t[o].call(e,n):t[o].call(e);return i?n:void 0}function TTe(e){return typeof e=="symbol"?e:"".concat(e)}function ETe(e,t,n){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function vTe(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function STe(e,t,n,i){function o(r){return r instanceof n?r:new n(function(a){a(r)})}return new(n||(n=Promise))(function(r,a){function s(f){try{u(i.next(f))}catch(d){a(d)}}function c(f){try{u(i.throw(f))}catch(d){a(d)}}function u(f){f.done?r(f.value):o(f.value).then(s,c)}u((i=i.apply(e,t||[])).next())})}function wTe(e,t){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,o,r,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(f){return c([u,f])}}function c(u){if(i)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(n=0)),n;)try{if(i=1,o&&(r=u[0]&2?o.return:u[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,u[1])).done)return r;switch(o=0,r&&(u=[u[0]&2,r.value]),u[0]){case 0:case 1:r=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,o=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(r=n.trys,!(r=r.length>0&&r[r.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!r||u[1]>r[0]&&u[1]<r[3])){n.label=u[1];break}if(u[0]===6&&n.label<r[1]){n.label=r[1],r=u;break}if(r&&n.label<r[2]){n.label=r[2],n.ops.push(u);break}r[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(f){u=[6,f],o=0}finally{i=r=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function ITe(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&pH(t,e,n)}function mH(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function OJ(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var i=n.call(e),o,r=[],a;try{for(;(t===void 0||t-- >0)&&!(o=i.next()).done;)r.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return r}function DTe(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(OJ(arguments[t]));return e}function PTe(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var i=Array(e),o=0,t=0;t<n;t++)for(var r=arguments[t],a=0,s=r.length;a<s;a++,o++)i[o]=r[a];return i}function RTe(e,t,n){if(n||arguments.length===2)for(var i=0,o=t.length,r;i<o;i++)(r||!(i in t))&&(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function Ew(e){return this instanceof Ew?(this.v=e,this):new Ew(e)}function OTe(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=n.apply(e,t||[]),o,r=[];return o=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",a),o[Symbol.asyncIterator]=function(){return this},o;function a(g){return function(m){return Promise.resolve(m).then(g,d)}}function s(g,m){i[g]&&(o[g]=function(A){return new Promise(function(y,x){r.push([g,A,y,x])>1||c(g,A)})},m&&(o[g]=m(o[g])))}function c(g,m){try{u(i[g](m))}catch(A){p(r[0][3],A)}}function u(g){g.value instanceof Ew?Promise.resolve(g.value.v).then(f,d):p(r[0][2],g)}function f(g){c("next",g)}function d(g){c("throw",g)}function p(g,m){g(m),r.shift(),r.length&&c(r[0][0],r[0][1])}}function MTe(e){var t,n;return t={},i("next"),i("throw",function(o){throw o}),i("return"),t[Symbol.iterator]=function(){return this},t;function i(o,r){t[o]=e[o]?function(a){return(n=!n)?{value:Ew(e[o](a)),done:!1}:r?r(a):a}:r}}function BTe(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof mH=="function"?mH(e):e[Symbol.iterator](),n={},i("next"),i("throw"),i("return"),n[Symbol.asyncIterator]=function(){return this},n);function i(r){n[r]=e[r]&&function(a){return new Promise(function(s,c){a=e[r](a),o(s,c,a.done,a.value)})}}function o(r,a,s,c){Promise.resolve(c).then(function(u){r({value:u,done:s})},a)}}function LTe(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function NTe(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=RJ(e),i=0;i<n.length;i++)n[i]!=="default"&&pH(t,e,n[i]);return Qmt(t,e),t}function FTe(e){return e&&e.__esModule?e:{default:e}}function kTe(e,t,n,i){if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?i:n==="a"?i.call(e):i?i.value:t.get(e)}function zTe(e,t,n,i,o){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?o.call(e,n):o?o.value=n:t.set(e,n),n}function UTe(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function VTe(e,t,n){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var i,o;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");i=t[Symbol.asyncDispose]}if(i===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");i=t[Symbol.dispose],n&&(o=i)}if(typeof i!="function")throw new TypeError("Object not disposable.");o&&(i=function(){try{o.call(this)}catch(r){return Promise.reject(r)}}),e.stack.push({value:t,dispose:i,async:n})}else n&&e.stack.push({async:!0});return t}function jTe(e){function t(r){e.error=e.hasError?new $mt(r,e.error,"An error was suppressed during disposal."):r,e.hasError=!0}var n,i=0;function o(){for(;n=e.stack.pop();)try{if(!n.async&&i===1)return i=0,e.stack.push(n),Promise.resolve().then(o);if(n.dispose){var r=n.dispose.call(n.value);if(n.async)return i|=2,Promise.resolve(r).then(o,function(a){return t(a),o()})}else i|=1}catch(a){t(a)}if(i===1)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}return o()}function GTe(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(n,i,o,r,a){return i?t?".jsx":".js":o&&(!r||!a)?n:o+r+"."+a.toLowerCase()+"js"}):e}var PJ,hH,pH,Qmt,RJ,$mt,Jmt,Bm=vMe(()=>{PJ=function(e,t){return PJ=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},PJ(e,t)};hH=function(){return hH=Object.assign||function(t){for(var n,i=1,o=arguments.length;i<o;i++){n=arguments[i];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},hH.apply(this,arguments)};pH=Object.create?(function(e,t,n,i){i===void 0&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]});Qmt=Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t},RJ=function(e){return RJ=Object.getOwnPropertyNames||function(t){var n=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[n.length]=i);return n},RJ(e)};$mt=typeof SuppressedError=="function"?SuppressedError:function(e,t,n){var i=new Error(n);return i.name="SuppressedError",i.error=e,i.suppressed=t,i};Jmt={__extends:_Te,__assign:hH,__rest:ATe,__decorate:yTe,__param:xTe,__esDecorate:bTe,__runInitializers:CTe,__propKey:TTe,__setFunctionName:ETe,__metadata:vTe,__awaiter:STe,__generator:wTe,__createBinding:pH,__exportStar:ITe,__values:mH,__read:OJ,__spread:DTe,__spreadArrays:PTe,__spreadArray:RTe,__await:Ew,__asyncGenerator:OTe,__asyncDelegator:MTe,__asyncValues:BTe,__makeTemplateObject:LTe,__importStar:NTe,__importDefault:FTe,__classPrivateFieldGet:kTe,__classPrivateFieldSet:zTe,__classPrivateFieldIn:UTe,__addDisposableResource:VTe,__disposeResources:jTe,__rewriteRelativeImportExtension:GTe}});var HTe=zi(gH=>{"use strict";Object.defineProperty(gH,"__esModule",{value:!0});gH.version=void 0;gH.version="4.1.5"});var vy=zi(Ey=>{"use strict";Object.defineProperty(Ey,"__esModule",{value:!0});Ey.hasOwnProperty=void 0;Ey.isBoolean=Zmt;Ey.ellipsis=ept;Ey.removeWithPredicate=tpt;Ey.assertNever=npt;Ey.hasOwnProperty=Object.prototype.hasOwnProperty;function Zmt(e){return typeof e=="boolean"}function ept(e,t,n){var i;return e.length>t&&(n==null?(n="…",i=3):i=n.length,e=e.substring(0,t-i)+n),e}function tpt(e,t){for(var n=e.length-1;n>=0;n--)t(e[n])===!0&&e.splice(n,1)}function npt(e){throw new Error("Unhandled case for value: '".concat(e,"'"))}});var _H=zi(Yp=>{"use strict";Object.defineProperty(Yp,"__esModule",{value:!0});Yp.HtmlTag=Yp.whitespaceRe=void 0;var ipt=vy();Yp.whitespaceRe=/\s+/;var opt=(function(){function e(t){t===void 0&&(t={}),this.tagName="",this.attrs={},this.innerHTML="",this.tagName=t.tagName||"",this.attrs=t.attrs||{},this.innerHTML=t.innerHtml||t.innerHTML||""}return e.prototype.setTagName=function(t){return this.tagName=t,this},e.prototype.getTagName=function(){return this.tagName},e.prototype.setAttr=function(t,n){var i=this.getAttrs();return i[t]=n,this},e.prototype.getAttr=function(t){return this.getAttrs()[t]},e.prototype.setAttrs=function(t){return Object.assign(this.getAttrs(),t),this},e.prototype.getAttrs=function(){return this.attrs},e.prototype.setClass=function(t){return this.setAttr("class",t)},e.prototype.addClass=function(t){for(var n=this.getClass(),i=n?n.split(Yp.whitespaceRe):[],o=t.split(Yp.whitespaceRe),r;r=o.shift();)i.indexOf(r)===-1&&i.push(r);return this.getAttrs().class=i.join(" "),this},e.prototype.removeClass=function(t){for(var n=this.getClass(),i=n?n.split(Yp.whitespaceRe):[],o=t.split(Yp.whitespaceRe),r;i.length&&(r=o.shift());){var a=i.indexOf(r);a!==-1&&i.splice(a,1)}return this.getAttrs().class=i.join(" "),this},e.prototype.getClass=function(){return this.getAttrs().class||""},e.prototype.hasClass=function(t){return(" "+this.getClass()+" ").indexOf(" "+t+" ")!==-1},e.prototype.setInnerHTML=function(t){return this.innerHTML=t,this},e.prototype.setInnerHtml=function(t){return this.setInnerHTML(t)},e.prototype.getInnerHTML=function(){return this.innerHTML||""},e.prototype.getInnerHtml=function(){return this.getInnerHTML()},e.prototype.toAnchorString=function(){var t=this.getTagName(),n=this.buildAttrsStr();return n=n?" "+n:"",["<",t,n,">",this.getInnerHtml(),"</",t,">"].join("")},e.prototype.buildAttrsStr=function(){var t=this.getAttrs(),n=[];for(var i in t)ipt.hasOwnProperty.call(t,i)&&n.push(i+'="'+t[i]+'"');return n.join(" ")},e})();Yp.HtmlTag=opt});var qTe=zi(BJ=>{"use strict";Object.defineProperty(BJ,"__esModule",{value:!0});BJ.truncateSmart=rpt;function rpt(e,t,n){var i,o;if(n==null?(n="…",o=3,i=8):(o=n.length,i=n.length),e.length<=t)return e;var r=t-o,a=apt(e);if(a.query){var s=a.query.match(/^(.*?)(?=(\?|#))(.*?)$/i);s&&(a.query=a.query.substr(0,s[1].length),e=WTe(a))}if(e.length<=t||(a.host&&(a.host=a.host.replace(/^www\./,""),e=WTe(a)),e.length<=t))return e;var c="";if(a.host&&(c+=a.host),c.length>=r)return a.host.length===t?(a.host.substr(0,t-o)+n).substr(0,r+i):MJ(c,r,n).substr(0,r+i);var u="";if(a.path&&(u+="/"+a.path),a.query&&(u+="?"+a.query),u)if((c+u).length>=r){if((c+u).length==t)return(c+u).substr(0,t);var f=r-c.length;return(c+MJ(u,f,n)).substr(0,r+i)}else c+=u;if(a.fragment){var d="#"+a.fragment;if((c+d).length>=r){if((c+d).length==t)return(c+d).substr(0,t);var p=r-c.length;return(c+MJ(d,p,n)).substr(0,r+i)}else c+=d}if(a.scheme&&a.host){var g=a.scheme+"://";if((c+g).length<r)return(g+c).substr(0,t)}if(c.length<=t)return c;var m="";return r>0&&(m=c.substr(-1*Math.floor(r/2))),(c.substr(0,Math.ceil(r/2))+n+m).substr(0,r+i)}function apt(e){var t={},n=e,i=n.match(/^([a-z]+):\/\//i);return i&&(t.scheme=i[1],n=n.slice(i[0].length)),i=n.match(/^(.*?)(?=(\?|#|\/|$))/i),i&&(t.host=i[1],n=n.slice(i[0].length)),i=n.match(/^\/(.*?)(?=(\?|#|$))/i),i&&(t.path=i[1],n=n.slice(i[0].length)),i=n.match(/^\?(.*?)(?=(#|$))/i),i&&(t.query=i[1],n=n.slice(i[0].length)),i=n.match(/^#(.*?)$/i),i&&(t.fragment=i[1]),t}function WTe(e){var t="";return e.scheme&&e.host&&(t+=e.scheme+"://"),e.host&&(t+=e.host),e.path&&(t+="/"+e.path),e.query&&(t+="?"+e.query),e.fragment&&(t+="#"+e.fragment),t}function MJ(e,t,n){var i=t/2,o=Math.ceil(i),r=-1*Math.floor(i),a="";return r<0&&(a=e.substr(r)),e.substr(0,o)+n+a}});var YTe=zi(LJ=>{"use strict";Object.defineProperty(LJ,"__esModule",{value:!0});LJ.truncateMiddle=spt;function spt(e,t,n){if(e.length<=t)return e;var i,o;n==null?(n="…",i=8,o=3):(i=n.length,o=n.length);var r=t-o,a="";return r>0&&(a=e.substr(-1*Math.floor(r/2))),(e.substr(0,Math.ceil(r/2))+n+a).substr(0,r+i)}});var XTe=zi(NJ=>{"use strict";Object.defineProperty(NJ,"__esModule",{value:!0});NJ.truncateEnd=lpt;var cpt=vy();function lpt(e,t,n){return(0,cpt.ellipsis)(e,t,n)}});var FJ=zi(AH=>{"use strict";Object.defineProperty(AH,"__esModule",{value:!0});AH.AnchorTagBuilder=void 0;var upt=_H(),fpt=qTe(),dpt=YTe(),hpt=XTe(),mpt=(function(){function e(t){t===void 0&&(t={}),this.newWindow=!1,this.truncate={},this.className="",this.newWindow=t.newWindow||!1,this.truncate=t.truncate||{},this.className=t.className||""}return e.prototype.build=function(t){return new upt.HtmlTag({tagName:"a",attrs:this.createAttrs(t),innerHtml:this.processAnchorText(t.getAnchorText())})},e.prototype.createAttrs=function(t){var n={href:t.getAnchorHref()},i=this.createCssClass(t);return i&&(n.class=i),this.newWindow&&(n.target="_blank",n.rel="noopener noreferrer"),this.truncate.length&&this.truncate.length<t.getAnchorText().length&&(n.title=t.getAnchorHref()),n},e.prototype.createCssClass=function(t){var n=this.className;if(n){for(var i=[n],o=t.getCssClassSuffixes(),r=0,a=o.length;r<a;r++)i.push(n+"-"+o[r]);return i.join(" ")}else return""},e.prototype.processAnchorText=function(t){return t=this.doTruncate(t),t},e.prototype.doTruncate=function(t){var n=this.truncate;if(!n.length)return t;var i=n.length,o=n.location;return o==="smart"?(0,fpt.truncateSmart)(t,i):o==="middle"?(0,dpt.truncateMiddle)(t,i):(0,hpt.truncateEnd)(t,i)},e})();AH.AnchorTagBuilder=mpt});var VC=zi(yH=>{"use strict";Object.defineProperty(yH,"__esModule",{value:!0});yH.AbstractMatch=void 0;var ppt=(function(){function e(t){this._=null,this.matchedText="",this.offset=0,this.tagBuilder=t.tagBuilder,this.matchedText=t.matchedText,this.offset=t.offset}return e.prototype.getMatchedText=function(){return this.matchedText},e.prototype.setOffset=function(t){this.offset=t},e.prototype.getOffset=function(){return this.offset},e.prototype.getCssClassSuffixes=function(){return[this.type]},e.prototype.buildTag=function(){return this.tagBuilder.build(this)},e})();yH.AbstractMatch=ppt});var jC=zi(Gf=>{"use strict";Object.defineProperty(Gf,"__esModule",{value:!0});Gf.isControlChar=gpt;Gf.isAsciiLetterChar=_pt;Gf.isDigitChar=Apt;Gf.isQuoteChar=ypt;Gf.isWhitespaceChar=xpt;Gf.isAlphaNumericOrMarkChar=bpt;Gf.isValidEmailLocalPartSpecialChar=Cpt;Gf.isUrlSuffixAllowedSpecialChar=Tpt;Gf.isUrlSuffixNotAllowedAsFinalChar=Ept;Gf.isOpenBraceChar=vpt;Gf.isCloseBraceChar=Spt;function gpt(e){return e>=0&&e<=31||e==127}function _pt(e){return e>=65&&e<=90||e>=97&&e<=122}function Apt(e){return e>=48&&e<=57}function ypt(e){return e==34||e==39}function xpt(e){return e<8232?e<160?e>=9&&e<=13||e==32:e<5760?e==160:e==5760||e>=8192&&e<=8202:e<8287?e>=8232&&e<=8233||e==8239:e<12288?e==8287:e==12288||e==65279}function bpt(e){return e<4800?e<2949?e<2451?e<1425?e<768?e<192?e<169?e<65?e>=48&&e<=57:e>=65&&e<=90||e>=97&&e<=122:e<181?e>=169&&e<=170||e==174:e==181||e==186:e<710?e<216?e>=192&&e<=214:e>=216&&e<=246||e>=248&&e<=705:e<748?e>=710&&e<=721||e>=736&&e<=740:e==748||e==750:e<910?e<895?e<886?e>=768&&e<=884:e>=886&&e<=887||e>=890&&e<=893:e<904?e==895||e==902:e>=904&&e<=906||e==908:e<1155?e<931?e>=910&&e<=929:e>=931&&e<=1013||e>=1015&&e<=1153:e<1369?e>=1155&&e<=1327||e>=1329&&e<=1366:e==1369||e>=1377&&e<=1415:e<1808?e<1552?e<1476?e<1471?e>=1425&&e<=1469:e==1471||e>=1473&&e<=1474:e<1488?e>=1476&&e<=1477||e==1479:e>=1488&&e<=1514||e>=1520&&e<=1522:e<1749?e<1568?e>=1552&&e<=1562:e>=1568&&e<=1641||e>=1646&&e<=1747:e<1770?e>=1749&&e<=1756||e>=1759&&e<=1768:e>=1770&&e<=1788||e==1791:e<2230?e<2042?e<1869?e>=1808&&e<=1866:e>=1869&&e<=1969||e>=1984&&e<=2037:e<2112?e==2042||e>=2048&&e<=2093:e>=2112&&e<=2139||e>=2208&&e<=2228:e<2406?e<2260?e>=2230&&e<=2237:e>=2260&&e<=2273||e>=2275&&e<=2403:e<2437?e>=2406&&e<=2415||e>=2417&&e<=2435:e>=2437&&e<=2444||e>=2447&&e<=2448:e<2693?e<2579?e<2519?e<2486?e<2474?e>=2451&&e<=2472:e>=2474&&e<=2480||e==2482:e<2503?e>=2486&&e<=2489||e>=2492&&e<=2500:e>=2503&&e<=2504||e>=2507&&e<=2510:e<2534?e<2524?e==2519:e>=2524&&e<=2525||e>=2527&&e<=2531:e<2565?e>=2534&&e<=2545||e>=2561&&e<=2563:e>=2565&&e<=2570||e>=2575&&e<=2576:e<2631?e<2613?e<2602?e>=2579&&e<=2600:e>=2602&&e<=2608||e>=2610&&e<=2611:e<2620?e>=2613&&e<=2614||e>=2616&&e<=2617:e==2620||e>=2622&&e<=2626:e<2649?e<2635?e>=2631&&e<=2632:e>=2635&&e<=2637||e==2641:e<2662?e>=2649&&e<=2652||e==2654:e>=2662&&e<=2677||e>=2689&&e<=2691:e<2821?e<2759?e<2730?e<2703?e>=2693&&e<=2701:e>=2703&&e<=2705||e>=2707&&e<=2728:e<2741?e>=2730&&e<=2736||e>=2738&&e<=2739:e>=2741&&e<=2745||e>=2748&&e<=2757:e<2784?e<2763?e>=2759&&e<=2761:e>=2763&&e<=2765||e==2768:e<2809?e>=2784&&e<=2787||e>=2790&&e<=2799:e==2809||e>=2817&&e<=2819:e<2887?e<2858?e<2831?e>=2821&&e<=2828:e>=2831&&e<=2832||e>=2835&&e<=2856:e<2869?e>=2858&&e<=2864||e>=2866&&e<=2867:e>=2869&&e<=2873||e>=2876&&e<=2884:e<2911?e<2902?e>=2887&&e<=2888||e>=2891&&e<=2893:e>=2902&&e<=2903||e>=2908&&e<=2909:e<2929?e>=2911&&e<=2915||e>=2918&&e<=2927:e==2929||e>=2946&&e<=2947:e<3517?e<3205?e<3046?e<2984?e<2969?e<2958?e>=2949&&e<=2954:e>=2958&&e<=2960||e>=2962&&e<=2965:e<2974?e>=2969&&e<=2970||e==2972:e>=2974&&e<=2975||e>=2979&&e<=2980:e<3014?e<2990?e>=2984&&e<=2986:e>=2990&&e<=3001||e>=3006&&e<=3010:e<3024?e>=3014&&e<=3016||e>=3018&&e<=3021:e==3024||e==3031:e<3142?e<3086?e<3072?e>=3046&&e<=3055:e>=3072&&e<=3075||e>=3077&&e<=3084:e<3114?e>=3086&&e<=3088||e>=3090&&e<=3112:e>=3114&&e<=3129||e>=3133&&e<=3140:e<3160?e<3146?e>=3142&&e<=3144:e>=3146&&e<=3149||e>=3157&&e<=3158:e<3174?e>=3160&&e<=3162||e>=3168&&e<=3171:e>=3174&&e<=3183||e>=3200&&e<=3203:e<3333?e<3274?e<3242?e<3214?e>=3205&&e<=3212:e>=3214&&e<=3216||e>=3218&&e<=3240:e<3260?e>=3242&&e<=3251||e>=3253&&e<=3257:e>=3260&&e<=3268||e>=3270&&e<=3272:e<3296?e<3285?e>=3274&&e<=3277:e>=3285&&e<=3286||e==3294:e<3313?e>=3296&&e<=3299||e>=3302&&e<=3311:e>=3313&&e<=3314||e>=3329&&e<=3331:e<3423?e<3389?e<3342?e>=3333&&e<=3340:e>=3342&&e<=3344||e>=3346&&e<=3386:e<3402?e>=3389&&e<=3396||e>=3398&&e<=3400:e>=3402&&e<=3406||e>=3412&&e<=3415:e<3458?e<3430?e>=3423&&e<=3427:e>=3430&&e<=3439||e>=3450&&e<=3455:e<3482?e>=3458&&e<=3459||e>=3461&&e<=3478:e>=3482&&e<=3505||e>=3507&&e<=3515:e<3804?e<3722?e<3570?e<3535?e<3520?e==3517:e>=3520&&e<=3526||e==3530:e<3544?e>=3535&&e<=3540||e==3542:e>=3544&&e<=3551||e>=3558&&e<=3567:e<3664?e<3585?e>=3570&&e<=3571:e>=3585&&e<=3642||e>=3648&&e<=3662:e<3716?e>=3664&&e<=3673||e>=3713&&e<=3714:e==3716||e>=3719&&e<=3720:e<3754?e<3737?e<3725?e==3722:e==3725||e>=3732&&e<=3735:e<3749?e>=3737&&e<=3743||e>=3745&&e<=3747:e==3749||e==3751:e<3776?e<3757?e>=3754&&e<=3755:e>=3757&&e<=3769||e>=3771&&e<=3773:e<3784?e>=3776&&e<=3780||e==3782:e>=3784&&e<=3789||e>=3792&&e<=3801:e<4176?e<3902?e<3872?e<3840?e>=3804&&e<=3807:e==3840||e>=3864&&e<=3865:e<3895?e>=3872&&e<=3881||e==3893:e==3895||e==3897:e<3974?e<3913?e>=3902&&e<=3911:e>=3913&&e<=3948||e>=3953&&e<=3972:e<4038?e>=3974&&e<=3991||e>=3993&&e<=4028:e==4038||e>=4096&&e<=4169:e<4688?e<4301?e<4256?e>=4176&&e<=4253:e>=4256&&e<=4293||e==4295:e<4348?e==4301||e>=4304&&e<=4346:e>=4348&&e<=4680||e>=4682&&e<=4685:e<4746?e<4698?e>=4688&&e<=4694||e==4696:e>=4698&&e<=4701||e>=4704&&e<=4744:e<4786?e>=4746&&e<=4749||e>=4752&&e<=4784:e>=4786&&e<=4789||e>=4792&&e<=4798:e<11035?e<7416?e<6176?e<5873?e<4992?e<4824?e<4802?e==4800:e>=4802&&e<=4805||e>=4808&&e<=4822:e<4888?e>=4824&&e<=4880||e>=4882&&e<=4885:e>=4888&&e<=4954||e>=4957&&e<=4959:e<5121?e<5024?e>=4992&&e<=5007:e>=5024&&e<=5109||e>=5112&&e<=5117:e<5761?e>=5121&&e<=5740||e>=5743&&e<=5759:e>=5761&&e<=5786||e>=5792&&e<=5866:e<6002?e<5920?e<5888?e>=5873&&e<=5880:e>=5888&&e<=5900||e>=5902&&e<=5908:e<5984?e>=5920&&e<=5940||e>=5952&&e<=5971:e>=5984&&e<=5996||e>=5998&&e<=6e3:e<6108?e<6016?e>=6002&&e<=6003:e>=6016&&e<=6099||e==6103:e<6155?e>=6108&&e<=6109||e>=6112&&e<=6121:e>=6155&&e<=6157||e>=6160&&e<=6169:e<6783?e<6512?e<6400?e<6272?e>=6176&&e<=6263:e>=6272&&e<=6314||e>=6320&&e<=6389:e<6448?e>=6400&&e<=6430||e>=6432&&e<=6443:e>=6448&&e<=6459||e>=6470&&e<=6509:e<6608?e<6528?e>=6512&&e<=6516:e>=6528&&e<=6571||e>=6576&&e<=6601:e<6688?e>=6608&&e<=6617||e>=6656&&e<=6683:e>=6688&&e<=6750||e>=6752&&e<=6780:e<7040?e<6832?e<6800?e>=6783&&e<=6793:e>=6800&&e<=6809||e==6823:e<6992?e>=6832&&e<=6846||e>=6912&&e<=6987:e>=6992&&e<=7001||e>=7019&&e<=7027:e<7245?e<7168?e>=7040&&e<=7155:e>=7168&&e<=7223||e>=7232&&e<=7241:e<7376?e>=7245&&e<=7293||e>=7296&&e<=7304:e>=7376&&e<=7378||e>=7380&&e<=7414:e<8450?e<8130?e<8025?e<7960?e<7424?e>=7416&&e<=7417:e>=7424&&e<=7669||e>=7675&&e<=7957:e<8008?e>=7960&&e<=7965||e>=7968&&e<=8005:e>=8008&&e<=8013||e>=8016&&e<=8023:e<8031?e<8027?e==8025:e==8027||e==8029:e<8118?e>=8031&&e<=8061||e>=8064&&e<=8116:e>=8118&&e<=8124||e==8126:e<8205?e<8150?e<8134?e>=8130&&e<=8132:e>=8134&&e<=8140||e>=8144&&e<=8147:e<8178?e>=8150&&e<=8155||e>=8160&&e<=8172:e>=8178&&e<=8180||e>=8182&&e<=8188:e<8305?e<8252?e==8205:e==8252||e==8265:e<8336?e==8305||e==8319:e>=8336&&e<=8348||e>=8400&&e<=8432:e<8579?e<8486?e<8469?e<8455?e==8450:e==8455||e>=8458&&e<=8467:e<8482?e==8469||e>=8473&&e<=8477:e==8482||e==8484:e<8495?e<8488?e==8486:e==8488||e>=8490&&e<=8493:e<8517?e>=8495&&e<=8505||e>=8508&&e<=8511:e>=8517&&e<=8521||e==8526:e<9410?e<9e3?e<8592?e>=8579&&e<=8580:e>=8592&&e<=8703||e>=8986&&e<=8987:e<9193?e==9e3||e==9167:e>=9193&&e<=9203||e>=9208&&e<=9210:e<9723?e<9654?e==9410||e>=9642&&e<=9643:e==9654||e==9664:e<10548?e>=9723&&e<=9726||e>=9728&&e<=10175:e>=10548&&e<=10549||e>=11013&&e<=11015:e<43259?e<12445?e<11688?e<11520?e<11264?e<11088?e>=11035&&e<=11036:e==11088||e==11093:e<11360?e>=11264&&e<=11310||e>=11312&&e<=11358:e>=11360&&e<=11492||e>=11499&&e<=11507:e<11568?e<11559?e>=11520&&e<=11557:e==11559||e==11565:e<11647?e>=11568&&e<=11623||e==11631:e>=11647&&e<=11670||e>=11680&&e<=11686:e<11744?e<11712?e<11696?e>=11688&&e<=11694:e>=11696&&e<=11702||e>=11704&&e<=11710:e<11728?e>=11712&&e<=11718||e>=11720&&e<=11726:e>=11728&&e<=11734||e>=11736&&e<=11742:e<12330?e<11823?e>=11744&&e<=11775:e==11823||e>=12293&&e<=12294:e<12353?e>=12330&&e<=12341||e>=12347&&e<=12349:e>=12353&&e<=12438||e>=12441&&e<=12442:e<42512?e<12951?e<12549?e<12449?e>=12445&&e<=12447:e>=12449&&e<=12538||e>=12540&&e<=12543:e<12704?e>=12549&&e<=12589||e>=12593&&e<=12686:e>=12704&&e<=12730||e>=12784&&e<=12799:e<19968?e<12953?e==12951:e==12953||e>=13312&&e<=19893:e<42192?e>=19968&&e<=40917||e>=40960&&e<=42124:e>=42192&&e<=42237||e>=42240&&e<=42508:e<42891?e<42623?e<42560?e>=42512&&e<=42539:e>=42560&&e<=42610||e>=42612&&e<=42621:e<42775?e>=42623&&e<=42725||e>=42736&&e<=42737:e>=42775&&e<=42783||e>=42786&&e<=42888:e<43072?e<42928?e>=42891&&e<=42926:e>=42928&&e<=42935||e>=42999&&e<=43047:e<43216?e>=43072&&e<=43123||e>=43136&&e<=43205:e>=43216&&e<=43225||e>=43232&&e<=43255:e<55243?e<43744?e<43488?e<43312?e<43261?e==43259:e==43261||e>=43264&&e<=43309:e<43392?e>=43312&&e<=43347||e>=43360&&e<=43388:e>=43392&&e<=43456||e>=43471&&e<=43481:e<43600?e<43520?e>=43488&&e<=43518:e>=43520&&e<=43574||e>=43584&&e<=43597:e<43642?e>=43600&&e<=43609||e>=43616&&e<=43638:e>=43642&&e<=43714||e>=43739&&e<=43741:e<43824?e<43785?e<43762?e>=43744&&e<=43759:e>=43762&&e<=43766||e>=43777&&e<=43782:e<43808?e>=43785&&e<=43790||e>=43793&&e<=43798:e>=43808&&e<=43814||e>=43816&&e<=43822:e<44012?e<43868?e>=43824&&e<=43866:e>=43868&&e<=43877||e>=43888&&e<=44010:e<44032?e>=44012&&e<=44013||e>=44016&&e<=44025:e>=44032&&e<=55203||e>=55216&&e<=55238:e<64848?e<64298?e<64112?e<55296?e>=55243&&e<=55291:e>=55296&&e<=57343||e>=63744&&e<=64109:e<64275?e>=64112&&e<=64217||e>=64256&&e<=64262:e>=64275&&e<=64279||e>=64285&&e<=64296:e<64320?e<64312?e>=64298&&e<=64310:e>=64312&&e<=64316||e==64318:e<64326?e>=64320&&e<=64321||e>=64323&&e<=64324:e>=64326&&e<=64433||e>=64467&&e<=64829:e<65296?e<65024?e<64914?e>=64848&&e<=64911:e>=64914&&e<=64967||e>=65008&&e<=65019:e<65136?e>=65024&&e<=65039||e>=65056&&e<=65071:e>=65136&&e<=65140||e>=65142&&e<=65276:e<65474?e<65345?e>=65296&&e<=65305||e>=65313&&e<=65338:e>=65345&&e<=65370||e>=65382&&e<=65470:e<65490?e>=65474&&e<=65479||e>=65482&&e<=65487:e>=65490&&e<=65495||e>=65498&&e<=65500}function Cpt(e){return e<47?e<42?e==33||e>=35&&e<=39:e>=42&&e<=43||e==45:e<63?e==47||e==61:e<94?e==63:e>=94&&e<=96||e>=123&&e<=126}function Tpt(e){return e<91?e<47?e>=35&&e<=43||e==45:e<61?e==47:e==61||e==64:e<95?e==91||e==93:e<123?e==95:e>=123&&e<=126||e==10003}function Ept(e){return e<58?e<44?e==33:e==44||e==46:e<63?e>=58&&e<=59:e==63||e==94}function vpt(e){return e<91?e==40:e==91||e==123}function Spt(e){return e<93?e==41:e==93||e==125}});var KTe=zi(xH=>{"use strict";Object.defineProperty(xH,"__esModule",{value:!0});xH.tldRegex=void 0;xH.tldRegex=/^(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|travelersinsurance|vermögensberatung|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbah1a3hjkrd|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--mgbcpq6gpa1a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbc0a9azcg|xn--nqv7fs00ema|americanfamily|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq480n2rg|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|wolterskluwer|xn--cckwcxetd|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--4dbrk0ce|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nextdirect|properties|protection|prudential|realestate|republican|restaurant|schaeffler|tatamotors|technology|university|vlaanderen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--q7ce6a|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|institute|insurance|kuokgroup|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|pramerica|richardli|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--qxa6a|xn--tckwe|xn--vhquv|yodobashi|موريتانيا|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|builders|business|capetown|catering|catholic|cipriani|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|mckinsey|memorial|merckmsd|mortgage|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|softbank|software|stcgroup|supplies|training|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|banamex|bauhaus|bestbuy|booking|brother|capital|caravan|careers|channel|charity|chintai|citadel|clubmed|college|cologne|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hotmail|hyundai|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lanxess|lasalle|latrobe|leclerc|limited|lincoln|markets|monster|netbank|netflix|network|neustar|okinawa|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|singles|staples|storage|support|surgery|systems|temasek|theater|theatre|tickets|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|yamaxun|youtube|zuerich|католик|البحرين|الجزائر|العليان|پاکستان|كاثوليك|இந்தியா|abbott|abbvie|africa|agency|airbus|airtel|alipay|alsace|alstom|amazon|anquan|aramco|author|bayern|beauty|berlin|bharti|bostik|boston|broker|camera|career|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kindle|kosher|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|monash|mormon|moscow|museum|nagoya|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|pictet|quebec|racing|realty|reisen|repair|report|review|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|walter|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dance|deals|delta|drive|dubai|earth|edeka|email|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|irish|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|loans|locus|lotte|lotto|mango|media|miami|money|movie|music|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|ישראל|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|aero|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|dvag|erni|fage|fail|fans|farm|fast|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kids|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|read|reit|rent|rest|rich|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scot|seat|seek|sexy|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|アマゾン|グーグル|クラウド|ポイント|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|ceo|cfa|cfd|com|cpa|crs|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gay|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|llp|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|scb|sew|sex|sfr|ski|sky|soy|spa|srl|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ລາວ|ストア|セール|みんな|中文网|亚马逊|天主教|我爱你|新加坡|淡马锡|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|ευ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|广东|微博|慈善|手机|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)$/});var bH=zi(Ho=>{"use strict";Object.defineProperty(Ho,"__esModule",{value:!0});Ho.isDomainLabelStartChar=Ho.isSchemeStartChar=Ho.tldUrlHostRe=Ho.schemeUrlRe=Ho.invalidSchemeRe=Ho.httpSchemePrefixRe=Ho.httpSchemeRe=void 0;Ho.isSchemeChar=Ipt;Ho.isDomainLabelChar=Dpt;Ho.isPathChar=Ppt;Ho.isUrlSuffixStartChar=Rpt;Ho.isKnownTld=QTe;Ho.isValidSchemeUrl=Opt;Ho.isValidTldMatch=Mpt;Ho.isValidIpV4Address=Npt;var GC=jC(),wpt=KTe();Ho.httpSchemeRe=/https?:\/\//i;Ho.httpSchemePrefixRe=new RegExp("^"+Ho.httpSchemeRe.source,"i");Ho.invalidSchemeRe=/^(javascript|vbscript):/i;Ho.schemeUrlRe=/^[A-Za-z][-.+A-Za-z0-9]*:(\/\/)?([^:/]*)/;Ho.tldUrlHostRe=/^(?:\/\/)?([^/#?:]+)/;Ho.isSchemeStartChar=GC.isAsciiLetterChar;function Ipt(e){return(0,GC.isAsciiLetterChar)(e)||(0,GC.isDigitChar)(e)||e===43||e===45||e===46}Ho.isDomainLabelStartChar=GC.isAlphaNumericOrMarkChar;function Dpt(e){return e===95||(0,Ho.isDomainLabelStartChar)(e)}function Ppt(e){return(0,GC.isAlphaNumericOrMarkChar)(e)||(0,GC.isUrlSuffixAllowedSpecialChar)(e)||(0,GC.isUrlSuffixNotAllowedAsFinalChar)(e)}function Rpt(e){return e===47||e===63||e===35}function QTe(e){return wpt.tldRegex.test(e.toLowerCase())}function Opt(e){if(Ho.invalidSchemeRe.test(e))return!1;var t=e.match(Ho.schemeUrlRe);if(!t)return!1;var n=!!t[1],i=t[2];return n?!0:!(i.indexOf(".")===-1||!/[A-Za-z]/.test(i))}function Mpt(e){var t=e.match(Ho.tldUrlHostRe);if(!t)return!1;var n=t[0],i=n.split(".");if(i.length<2)return!1;var o=i[i.length-1];return!!QTe(o)}var Bpt=/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,Lpt=/[:/?#]/;function Npt(e){var t=e.split(Lpt,1)[0];return Bpt.test(t)}});var kJ=zi(CH=>{"use strict";Object.defineProperty(CH,"__esModule",{value:!0});CH.UrlMatch=void 0;var Fpt=(Bm(),Th(Mm)),kpt=VC(),zpt=bH(),Upt=/^(https?:\/\/)?(?:www\.)?/i,Vpt=/^\/\//,jpt=(function(e){Fpt.__extends(t,e);function t(n){var i=e.call(this,n)||this;return i.type="url",i.url="",i.urlMatchType="scheme",i.protocolRelativeMatch=!1,i.stripPrefix={scheme:!0,www:!0},i.stripTrailingSlash=!0,i.decodePercentEncoding=!0,i.protocolPrepended=!1,i.urlMatchType=n.urlMatchType,i.url=n.url,i.protocolRelativeMatch=n.protocolRelativeMatch,i.stripPrefix=n.stripPrefix,i.stripTrailingSlash=n.stripTrailingSlash,i.decodePercentEncoding=n.decodePercentEncoding,i}return t.prototype.getType=function(){return"url"},t.prototype.getUrlMatchType=function(){return this.urlMatchType},t.prototype.getUrl=function(){var n=this.url;return!this.protocolRelativeMatch&&this.urlMatchType!=="scheme"&&!this.protocolPrepended&&(n=this.url="http://"+n,this.protocolPrepended=!0),n},t.prototype.getAnchorHref=function(){var n=this.getUrl();return n.replace(/&/g,"&")},t.prototype.getAnchorText=function(){var n=this.getMatchedText();return this.protocolRelativeMatch&&(n=Wpt(n)),this.stripPrefix.scheme&&(n=Gpt(n)),this.stripPrefix.www&&(n=Hpt(n)),this.stripTrailingSlash&&(n=qpt(n)),this.decodePercentEncoding&&(n=Ypt(n)),n},t})(kpt.AbstractMatch);CH.UrlMatch=jpt;function Gpt(e){return e.replace(zpt.httpSchemePrefixRe,"")}function Hpt(e){return e.includes("www.")?e.replace(Upt,"$1"):e}function Wpt(e){return e.replace(Vpt,"")}function qpt(e){return e.charAt(e.length-1)==="/"&&(e=e.slice(0,-1)),e}function Ypt(e){var t=e.replace(/%(?:22|26|27|3C|3E)/gi,function(n){return n==="%22"?""":n==="%26"?"&":n==="%27"?"'":n==="%3C"||n==="%3c"?"<":">"});if(t.includes("%"))try{return decodeURIComponent(t)}catch{}return t}});var JTe=zi(m_=>{"use strict";Object.defineProperty(m_,"__esModule",{value:!0});m_.isEmailLocalPartStartChar=m_.mailtoSchemePrefixRe=void 0;m_.isEmailLocalPartChar=Kpt;m_.isValidEmail=Qpt;var $Te=jC(),Xpt=bH();m_.mailtoSchemePrefixRe=/^mailto:/i;m_.isEmailLocalPartStartChar=$Te.isAlphaNumericOrMarkChar;function Kpt(e){return(0,m_.isEmailLocalPartStartChar)(e)||(0,$Te.isValidEmailLocalPartSpecialChar)(e)}function Qpt(e){var t=e.split(".").pop();return(0,Xpt.isKnownTld)(t)}});var zJ=zi(TH=>{"use strict";Object.defineProperty(TH,"__esModule",{value:!0});TH.EmailMatch=void 0;var $pt=(Bm(),Th(Mm)),Jpt=VC(),Zpt=(function(e){$pt.__extends(t,e);function t(n){var i=e.call(this,n)||this;return i.type="email",i.email="",i.email=n.email,i}return t.prototype.getType=function(){return"email"},t.prototype.getEmail=function(){return this.email},t.prototype.getAnchorHref=function(){return"mailto:"+this.email},t.prototype.getAnchorText=function(){return this.email},t})(Jpt.AbstractMatch);TH.EmailMatch=Zpt});var UJ=zi(vw=>{"use strict";Object.defineProperty(vw,"__esModule",{value:!0});vw.hashtagServices=void 0;vw.isHashtagTextChar=t0t;vw.isValidHashtag=n0t;var e0t=jC();function t0t(e){return e===95||(0,e0t.isAlphaNumericOrMarkChar)(e)}function n0t(e){return e.length<=140}vw.hashtagServices=["twitter","facebook","instagram","tiktok","youtube"]});var VJ=zi(EH=>{"use strict";Object.defineProperty(EH,"__esModule",{value:!0});EH.HashtagMatch=void 0;var i0t=(Bm(),Th(Mm)),o0t=vy(),r0t=VC(),a0t=(function(e){i0t.__extends(t,e);function t(n){var i=e.call(this,n)||this;return i.type="hashtag",i.serviceName="twitter",i.hashtag="",i.serviceName=n.serviceName,i.hashtag=n.hashtag,i}return t.prototype.getType=function(){return"hashtag"},t.prototype.getServiceName=function(){return this.serviceName},t.prototype.getHashtag=function(){return this.hashtag},t.prototype.getAnchorHref=function(){var n=this.serviceName,i=this.hashtag;switch(n){case"twitter":return"https://twitter.com/hashtag/"+i;case"facebook":return"https://www.facebook.com/hashtag/"+i;case"instagram":return"https://instagram.com/explore/tags/"+i;case"tiktok":return"https://www.tiktok.com/tag/"+i;case"youtube":return"https://youtube.com/hashtag/"+i;default:(0,o0t.assertNever)(n)}},t.prototype.getAnchorText=function(){return"#"+this.hashtag},t.prototype.getCssClassSuffixes=function(){var n=e.prototype.getCssClassSuffixes.call(this),i=this.getServiceName();return i&&n.push(i),n},t})(r0t.AbstractMatch);EH.HashtagMatch=a0t});var jJ=zi(Sw=>{"use strict";Object.defineProperty(Sw,"__esModule",{value:!0});Sw.mentionServices=void 0;Sw.isMentionTextChar=c0t;Sw.isValidMention=l0t;var ZTe=jC(),s0t={twitter:/^@\w{1,15}$/,instagram:/^@[_\w]{1,30}$/,soundcloud:/^@[-a-z0-9_]{3,25}$/,tiktok:/^@[.\w]{1,23}[\w]$/,youtube:/^@[-.·\w]{3,30}$/};function c0t(e){return e===45||e===46||e===95||(0,ZTe.isAsciiLetterChar)(e)||(0,ZTe.isDigitChar)(e)}function l0t(e,t){var n=s0t[t];return n.test(e)}Sw.mentionServices=["twitter","instagram","soundcloud","tiktok","youtube"]});var GJ=zi(vH=>{"use strict";Object.defineProperty(vH,"__esModule",{value:!0});vH.MentionMatch=void 0;var u0t=(Bm(),Th(Mm)),f0t=vy(),d0t=VC(),h0t=(function(e){u0t.__extends(t,e);function t(n){var i=e.call(this,n)||this;return i.type="mention",i.serviceName="twitter",i.mention="",i.mention=n.mention,i.serviceName=n.serviceName,i}return t.prototype.getType=function(){return"mention"},t.prototype.getMention=function(){return this.mention},t.prototype.getServiceName=function(){return this.serviceName},t.prototype.getAnchorHref=function(){switch(this.serviceName){case"twitter":return"https://twitter.com/"+this.mention;case"instagram":return"https://instagram.com/"+this.mention;case"soundcloud":return"https://soundcloud.com/"+this.mention;case"tiktok":return"https://www.tiktok.com/@"+this.mention;case"youtube":return"https://youtube.com/@"+this.mention;default:(0,f0t.assertNever)(this.serviceName)}},t.prototype.getAnchorText=function(){return"@"+this.mention},t.prototype.getCssClassSuffixes=function(){var n=e.prototype.getCssClassSuffixes.call(this),i=this.getServiceName();return i&&n.push(i),n},t})(d0t.AbstractMatch);vH.MentionMatch=h0t});var eEe=zi(ak=>{"use strict";Object.defineProperty(ak,"__esModule",{value:!0});ak.isPhoneNumberSeparatorChar=A0t;ak.isPhoneNumberControlChar=y0t;ak.isValidPhoneNumber=x0t;var m0t=/[-. ()]/,p0t=/(?:(?:(?:(\+)?\d{1,3}[-. ]?)?\(?\d{3}\)?[-. ]?\d{3}[-. ]?\d{4})|(?:(\+)(?:9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-. ]?(?:\d[-. ]?){6,12}\d+))([,;]+[0-9]+#?)*/,g0t=/(0([1-9]-?[1-9]\d{3}|[1-9]{2}-?\d{3}|[1-9]{2}\d{1}-?\d{2}|[1-9]{2}\d{2}-?\d{1})-?\d{4}|0[789]0-?\d{4}-?\d{4}|050-?\d{4}-?\d{4})/,_0t=new RegExp("^".concat(p0t.source,"|").concat(g0t.source,"$"));function A0t(e){return e===45||e===46||e===32}function y0t(e){return e===44||e===59}function x0t(e){var t=e.charAt(0)==="+"||m0t.test(e);return t&&_0t.test(e)}});var HJ=zi(SH=>{"use strict";Object.defineProperty(SH,"__esModule",{value:!0});SH.PhoneMatch=void 0;var b0t=(Bm(),Th(Mm)),C0t=VC(),T0t=(function(e){b0t.__extends(t,e);function t(n){var i=e.call(this,n)||this;return i.type="phone",i.number="",i.plusSign=!1,i.number=n.number,i.plusSign=n.plusSign,i}return t.prototype.getType=function(){return"phone"},t.prototype.getPhoneNumber=function(){return this.number},t.prototype.getNumber=function(){return this.getPhoneNumber()},t.prototype.getAnchorHref=function(){return"tel:"+(this.plusSign?"+":"")+this.number},t.prototype.getAnchorText=function(){return this.matchedText},t})(C0t.AbstractMatch);SH.PhoneMatch=T0t});var KJ=zi(PH=>{"use strict";Object.defineProperty(PH,"__esModule",{value:!0});PH.parseMatches=P0t;PH.excludeUnbalancedTrailingBracesAndPunctuation=iEe;var E0t=kJ(),wH=vy(),wr=bH(),ww=JTe(),v0t=zJ(),YJ=UJ(),S0t=VJ(),XJ=jJ(),w0t=GJ(),Iw=eEe(),I0t=HJ(),ts=jC(),D0t=(function(){function e(t,n){this.charIdx=0,this.matches=[],this._stateMachines=[],this.schemeUrlMachinesCount=0,this.text=t,this.tagBuilder=n.tagBuilder,this.stripPrefix=n.stripPrefix,this.stripTrailingSlash=n.stripTrailingSlash,this.decodePercentEncoding=n.decodePercentEncoding,this.hashtagServiceName=n.hashtagServiceName,this.mentionServiceName=n.mentionServiceName}return Object.defineProperty(e.prototype,"stateMachines",{get:function(){return this._stateMachines},enumerable:!1,configurable:!0}),e.prototype.addMachine=function(t){this._stateMachines.push(t),nEe(t)&&this.schemeUrlMachinesCount++},e.prototype.removeMachine=function(t){this._stateMachines=this._stateMachines.filter(function(n){return n!==t}),nEe(t)&&this.schemeUrlMachinesCount--},e.prototype.hasSchemeUrlMachine=function(){return this.schemeUrlMachinesCount>0},e})();function P0t(e,t){for(var n=new D0t(e,t);n.charIdx<n.text.length;n.charIdx++){var i=e.charAt(n.charIdx),o=e.charCodeAt(n.charIdx);if(n.stateMachines.length===0)IH(n,i,o);else{for(var r=n.stateMachines.length-1;r>=0;r--){var a=n.stateMachines[r];switch(a.state){case 11:N0t(n,a,o);break;case 12:F0t(n,a,o);break;case 0:R0t(n,a,o);break;case 1:O0t(n,a,o);break;case 2:M0t(n,a,o);break;case 3:B0t(n,a,o);break;case 4:L0t(n,a,i,o);break;case 5:k0t(n,a,o);break;case 6:z0t(n,a,i,o);break;case 7:U0t(n,a,i,o);break;case 13:V0t(n,a,o);break;case 14:j0t(n,a,o);break;case 8:G0t(n,a,o);break;case 9:H0t(n,a,o);break;case 10:W0t(n,a,o);break;case 15:q0t(n,a,i,o);break;case 16:Y0t(n,a,i,o);break;case 17:X0t(n,a,i,o);break;case 18:K0t(n,a,i,o);break;case 19:Q0t(n,a,i,o);break;case 20:$0t(n,a,o);break;case 21:J0t(n,a,o);break;case 22:HC(n,a,o);break;case 23:Z0t(n,a,o);break;case 24:egt(n,a,o);break;case 25:tgt(n,a,o);break;case 26:ngt(n,a,o);break;case 27:igt(n,a,o);break;case 28:ogt(n,a,o);break;case 29:rgt(n,a,o);break;case 30:agt(n,a,o);break;case 31:sgt(n,a,o);break;case 32:lgt(n,a,i,o);break;case 33:ugt(n,a,o);break;case 34:fgt(n,a,o);break;case 35:dgt(n,a,o);break;case 36:hgt(n,a,i,o);break;case 37:cgt(n,a,i,o);break;case 38:mgt(n,a,i,o);break;case 39:pgt(n,a,i,o);break;case 40:ggt(n,a,o);break;case 41:_gt(n,a,o);break;default:(0,wH.assertNever)(a.state)}}if(!n.hasSchemeUrlMachine()&&n.charIdx>0&&(0,wr.isSchemeStartChar)(o)){var s=n.text.charCodeAt(n.charIdx-1);(0,wr.isSchemeStartChar)(s)||n.addMachine(DH(n.charIdx,0))}}}for(var c=n.stateMachines.length-1;c>=0;c--)n.stateMachines.forEach(function(u){return Sa(n,u)});return n.matches}function IH(e,t,n){var i=e.charIdx;if(n===35)e.addMachine(bgt(i,28));else if(n===64)e.addMachine(Cgt(i,30));else if(n===47)e.addMachine(qJ(i,11));else if(n===43)e.addMachine(WJ(i,37));else if(n===40)e.addMachine(WJ(i,32));else{if((0,ts.isDigitChar)(n)&&(e.addMachine(WJ(i,38)),e.addMachine(ygt(i,13))),(0,ww.isEmailLocalPartStartChar)(n)){var o=t.toLowerCase()==="m"?15:22;e.addMachine(xgt(i,o))}(0,wr.isSchemeStartChar)(n)&&e.addMachine(DH(i,0)),(0,ts.isAlphaNumericOrMarkChar)(n)&&e.addMachine(qJ(i,5))}}function R0t(e,t,n){n===58?t.state=2:n===45?t.state=1:(0,wr.isSchemeChar)(n)||e.removeMachine(t)}function O0t(e,t,n){var i=e.charIdx;n===45||(n===47?(e.removeMachine(t),e.addMachine(qJ(i,11))):(0,wr.isSchemeChar)(n)?t.state=0:e.removeMachine(t))}function M0t(e,t,n){var i=e.charIdx;n===47?t.state=3:n===46?e.removeMachine(t):(0,wr.isDomainLabelStartChar)(n)?(t.state=5,(0,wr.isSchemeStartChar)(n)&&e.addMachine(DH(i,0))):e.removeMachine(t)}function B0t(e,t,n){n===47?t.state=4:(0,wr.isPathChar)(n)?(t.state=10,t.acceptStateReached=!0):Sa(e,t)}function L0t(e,t,n,i){i===47?(t.state=10,t.acceptStateReached=!0):(0,wr.isDomainLabelStartChar)(i)?(t.state=5,t.acceptStateReached=!0):e.removeMachine(t)}function N0t(e,t,n){n===47?t.state=12:e.removeMachine(t)}function F0t(e,t,n){(0,wr.isDomainLabelStartChar)(n)?t.state=5:e.removeMachine(t)}function k0t(e,t,n){n===46?t.state=7:n===45?t.state=6:n===58?t.state=8:(0,wr.isUrlSuffixStartChar)(n)?t.state=10:(0,wr.isDomainLabelChar)(n)||Sa(e,t)}function z0t(e,t,n,i){i===45||(i===46?Sa(e,t):(0,wr.isDomainLabelStartChar)(i)?t.state=5:Sa(e,t))}function U0t(e,t,n,i){i===46?Sa(e,t):(0,wr.isDomainLabelStartChar)(i)?(t.state=5,t.acceptStateReached=!0):Sa(e,t)}function V0t(e,t,n){n===46?t.state=14:n===58?t.state=8:(0,ts.isDigitChar)(n)||((0,wr.isUrlSuffixStartChar)(n)?t.state=10:(0,ts.isAlphaNumericOrMarkChar)(n)?e.removeMachine(t):Sa(e,t))}function j0t(e,t,n){(0,ts.isDigitChar)(n)?(t.octetsEncountered++,t.octetsEncountered===4&&(t.acceptStateReached=!0),t.state=13):Sa(e,t)}function G0t(e,t,n){(0,ts.isDigitChar)(n)?t.state=9:Sa(e,t)}function H0t(e,t,n){(0,ts.isDigitChar)(n)||((0,wr.isUrlSuffixStartChar)(n)?t.state=10:Sa(e,t))}function W0t(e,t,n){(0,wr.isPathChar)(n)||Sa(e,t)}function q0t(e,t,n,i){n.toLowerCase()==="a"?t.state=16:HC(e,t,i)}function Y0t(e,t,n,i){n.toLowerCase()==="i"?t.state=17:HC(e,t,i)}function X0t(e,t,n,i){n.toLowerCase()==="l"?t.state=18:HC(e,t,i)}function K0t(e,t,n,i){n.toLowerCase()==="t"?t.state=19:HC(e,t,i)}function Q0t(e,t,n,i){n.toLowerCase()==="o"?t.state=20:HC(e,t,i)}function $0t(e,t,n){n===58?t.state=21:HC(e,t,n)}function J0t(e,t,n){(0,ww.isEmailLocalPartChar)(n)?t.state=22:e.removeMachine(t)}function HC(e,t,n){n===46?t.state=23:n===64?t.state=24:(0,ww.isEmailLocalPartChar)(n)?t.state=22:e.removeMachine(t)}function Z0t(e,t,n){n===46||n===64?e.removeMachine(t):(0,ww.isEmailLocalPartChar)(n)?t.state=22:e.removeMachine(t)}function egt(e,t,n){(0,wr.isDomainLabelStartChar)(n)?t.state=25:e.removeMachine(t)}function tgt(e,t,n){n===46?t.state=27:n===45?t.state=26:(0,wr.isDomainLabelChar)(n)||Sa(e,t)}function ngt(e,t,n){n===45||n===46?Sa(e,t):(0,wr.isDomainLabelChar)(n)?t.state=25:Sa(e,t)}function igt(e,t,n){n===46||n===45?Sa(e,t):(0,wr.isDomainLabelStartChar)(n)?(t.state=25,t.acceptStateReached=!0):Sa(e,t)}function ogt(e,t,n){(0,YJ.isHashtagTextChar)(n)?(t.state=29,t.acceptStateReached=!0):e.removeMachine(t)}function rgt(e,t,n){(0,YJ.isHashtagTextChar)(n)||Sa(e,t)}function agt(e,t,n){(0,XJ.isMentionTextChar)(n)?(t.state=31,t.acceptStateReached=!0):e.removeMachine(t)}function sgt(e,t,n){(0,XJ.isMentionTextChar)(n)||((0,ts.isAlphaNumericOrMarkChar)(n)?e.removeMachine(t):Sa(e,t))}function cgt(e,t,n,i){(0,ts.isDigitChar)(i)?t.state=38:(e.removeMachine(t),IH(e,n,i))}function lgt(e,t,n,i){(0,ts.isDigitChar)(i)?t.state=33:e.removeMachine(t),IH(e,n,i)}function ugt(e,t,n){(0,ts.isDigitChar)(n)?t.state=34:e.removeMachine(t)}function fgt(e,t,n){(0,ts.isDigitChar)(n)?t.state=35:e.removeMachine(t)}function dgt(e,t,n){n===41?t.state=36:e.removeMachine(t)}function hgt(e,t,n,i){(0,ts.isDigitChar)(i)?t.state=38:(0,Iw.isPhoneNumberSeparatorChar)(i)?t.state=39:e.removeMachine(t)}function mgt(e,t,n,i){var o=e.charIdx;t.acceptStateReached=!0,(0,Iw.isPhoneNumberControlChar)(i)?t.state=40:i===35?t.state=41:(0,ts.isDigitChar)(i)||(i===40?t.state=32:(0,Iw.isPhoneNumberSeparatorChar)(i)?t.state=39:(Sa(e,t),(0,wr.isSchemeStartChar)(i)&&e.addMachine(DH(o,0))))}function pgt(e,t,n,i){(0,ts.isDigitChar)(i)?t.state=38:i===40?t.state=32:(Sa(e,t),IH(e,n,i))}function ggt(e,t,n){(0,Iw.isPhoneNumberControlChar)(n)||(n===35?t.state=41:(0,ts.isDigitChar)(n)?t.state=38:Sa(e,t))}function _gt(e,t,n){(0,Iw.isPhoneNumberControlChar)(n)?t.state=40:(0,ts.isDigitChar)(n)?e.removeMachine(t):Sa(e,t)}function Sa(e,t){var n=e.matches,i=e.text,o=e.charIdx,r=e.tagBuilder,a=e.stripPrefix,s=e.stripTrailingSlash,c=e.decodePercentEncoding,u=e.hashtagServiceName,f=e.mentionServiceName;if(e.removeMachine(t),!!t.acceptStateReached){var d=t.startIdx,p=i.slice(t.startIdx,o);switch(p=iEe(p),t.type){case 0:{var g=i.charCodeAt(t.startIdx-1);if(g===64)return;switch(t.matchType){case 0:{var m=wr.httpSchemeRe.exec(p);if(m&&(d=d+m.index,p=p.slice(m.index)),!(0,wr.isValidSchemeUrl)(p))return;break}case 1:{if(!(0,wr.isValidTldMatch)(p))return;break}case 2:{if(!(0,wr.isValidIpV4Address)(p))return;break}default:(0,wH.assertNever)(t)}n.push(new E0t.UrlMatch({tagBuilder:r,matchedText:p,offset:d,urlMatchType:Agt(t.matchType),url:p,protocolRelativeMatch:p.slice(0,2)==="//",stripPrefix:a,stripTrailingSlash:s,decodePercentEncoding:c}));break}case 1:{(0,ww.isValidEmail)(p)&&n.push(new v0t.EmailMatch({tagBuilder:r,matchedText:p,offset:d,email:p.replace(ww.mailtoSchemePrefixRe,"")}));break}case 2:{(0,YJ.isValidHashtag)(p)&&n.push(new S0t.HashtagMatch({tagBuilder:r,matchedText:p,offset:d,serviceName:u,hashtag:p.slice(1)}));break}case 3:{(0,XJ.isValidMention)(p,f)&&n.push(new w0t.MentionMatch({tagBuilder:r,matchedText:p,offset:d,serviceName:f,mention:p.slice(1)}));break}case 4:{if(p=p.replace(/ +$/g,""),(0,Iw.isValidPhoneNumber)(p)){var A=p.replace(/[^0-9,;#]/g,"");n.push(new I0t.PhoneMatch({tagBuilder:r,matchedText:p,offset:d,number:A,plusSign:p.charAt(0)==="+"}))}break}default:(0,wH.assertNever)(t)}}}function Agt(e){switch(e){case 0:return"scheme";case 1:return"tld";case 2:return"ipV4";default:(0,wH.assertNever)(e)}}var tEe={")":"(","}":"{","]":"["};function iEe(e){for(var t={"(":0,"{":0,"[":0},n=0;n<e.length;n++){var i=e.charAt(n),o=e.charCodeAt(n);(0,ts.isOpenBraceChar)(o)?t[i]++:(0,ts.isCloseBraceChar)(o)&&t[tEe[i]]--}for(var r=e.length-1;r>=0;){var i=e.charAt(r),o=e.charCodeAt(r);if((0,ts.isCloseBraceChar)(o)){var a=tEe[i];if(t[a]<0)t[a]++,r--;else break}else if((0,ts.isUrlSuffixNotAllowedAsFinalChar)(o))r--;else break}return e.slice(0,r+1)}function DH(e,t){return{type:0,startIdx:e,state:t,acceptStateReached:!1,matchType:0}}function qJ(e,t){return{type:0,startIdx:e,state:t,acceptStateReached:!1,matchType:1}}function ygt(e,t){return{type:0,startIdx:e,state:t,acceptStateReached:!1,matchType:2,octetsEncountered:1}}function xgt(e,t){return{type:1,startIdx:e,state:t,acceptStateReached:!1}}function bgt(e,t){return{type:2,startIdx:e,state:t,acceptStateReached:!1}}function Cgt(e,t){return{type:3,startIdx:e,state:t,acceptStateReached:!1}}function WJ(e,t){return{type:4,startIdx:e,state:t,acceptStateReached:!1}}function nEe(e){return e.type===0&&e.matchType===0}});var oEe=zi(JJ=>{"use strict";Object.defineProperty(JJ,"__esModule",{value:!0});JJ.parseHtml=vgt;var _l=(Bm(),Th(Mm)),lu=jC(),Tgt=vy(),Xp=(function(){function e(t){t===void 0&&(t={}),this.idx=t.idx!==void 0?t.idx:-1,this.type=t.type||"tag",this.name=t.name||"",this.isOpening=!!t.isOpening,this.isClosing=!!t.isClosing}return e})(),$J=new Xp,Egt=(function(){function e(t,n){this.charIdx=0,this.state=0,this.currentDataIdx=0,this.currentTag=$J,this.html=t,this.callbacks=n}return e})();function vgt(e,t){for(var n=new Egt(e,t),i=e.length;n.charIdx<i;){var o=e.charAt(n.charIdx),r=e.charCodeAt(n.charIdx);switch(n.state){case 0:Sgt(n,o);break;case 1:wgt(n,o,r);break;case 2:Dgt(n,o,r);break;case 3:Igt(n,o,r);break;case 4:Pgt(n,o,r);break;case 5:Rgt(n,o,r);break;case 6:Ogt(n,o,r);break;case 7:Mgt(n,o,r);break;case 8:Bgt(n,o);break;case 9:Lgt(n,o);break;case 10:Ngt(n,o,r);break;case 11:Fgt(n,o,r);break;case 12:kgt(n,o);break;case 13:zgt(n);break;case 14:Ugt(n,o);break;case 15:Vgt(n,o);break;case 16:jgt(n,o);break;case 17:Ggt(n,o);break;case 18:Hgt(n,o);break;case 19:Wgt(n,o);break;case 20:qgt(n,o);break;default:(0,Tgt.assertNever)(n.state)}n.charIdx++}n.currentDataIdx<n.charIdx&&Ygt(n)}function Sgt(e,t){t==="<"&&Kp(e)}function wgt(e,t,n){t==="!"?e.state=13:t==="/"?(e.state=2,e.currentTag=new Xp(_l.__assign(_l.__assign({},e.currentTag),{isClosing:!0}))):t==="<"?Kp(e):(0,lu.isAsciiLetterChar)(n)?(e.state=3,e.currentTag=new Xp(_l.__assign(_l.__assign({},e.currentTag),{isOpening:!0}))):(e.state=0,e.currentTag=$J)}function Igt(e,t,n){(0,lu.isWhitespaceChar)(n)?(e.currentTag=new Xp(_l.__assign(_l.__assign({},e.currentTag),{name:QJ(e)})),e.state=4):t==="<"?Kp(e):t==="/"?(e.currentTag=new Xp(_l.__assign(_l.__assign({},e.currentTag),{name:QJ(e)})),e.state=12):t===">"?(e.currentTag=new Xp(_l.__assign(_l.__assign({},e.currentTag),{name:QJ(e)})),Qp(e)):!(0,lu.isAsciiLetterChar)(n)&&!(0,lu.isDigitChar)(n)&&t!==":"&&oh(e)}function Dgt(e,t,n){t===">"?oh(e):(0,lu.isAsciiLetterChar)(n)?e.state=3:oh(e)}function Pgt(e,t,n){(0,lu.isWhitespaceChar)(n)||(t==="/"?e.state=12:t===">"?Qp(e):t==="<"?Kp(e):t==="="||(0,lu.isQuoteChar)(n)||(0,lu.isControlChar)(n)?oh(e):e.state=5)}function Rgt(e,t,n){(0,lu.isWhitespaceChar)(n)?e.state=6:t==="/"?e.state=12:t==="="?e.state=7:t===">"?Qp(e):t==="<"?Kp(e):(0,lu.isQuoteChar)(n)&&oh(e)}function Ogt(e,t,n){(0,lu.isWhitespaceChar)(n)||(t==="/"?e.state=12:t==="="?e.state=7:t===">"?Qp(e):t==="<"?Kp(e):(0,lu.isQuoteChar)(n)?oh(e):e.state=5)}function Mgt(e,t,n){(0,lu.isWhitespaceChar)(n)||(t==='"'?e.state=8:t==="'"?e.state=9:/[>=`]/.test(t)?oh(e):t==="<"?Kp(e):e.state=10)}function Bgt(e,t){t==='"'&&(e.state=11)}function Lgt(e,t){t==="'"&&(e.state=11)}function Ngt(e,t,n){(0,lu.isWhitespaceChar)(n)?e.state=4:t===">"?Qp(e):t==="<"&&Kp(e)}function Fgt(e,t,n){(0,lu.isWhitespaceChar)(n)?e.state=4:t==="/"?e.state=12:t===">"?Qp(e):t==="<"?Kp(e):(e.state=4,Xgt(e))}function kgt(e,t){t===">"?(e.currentTag=new Xp(_l.__assign(_l.__assign({},e.currentTag),{isClosing:!0})),Qp(e)):oh(e)}function zgt(e){var t=e.html,n=e.charIdx;t.slice(n,n+2)==="--"?(e.charIdx++,e.currentTag=new Xp(_l.__assign(_l.__assign({},e.currentTag),{type:"comment"})),e.state=14):t.slice(n,n+7).toUpperCase()==="DOCTYPE"?(e.charIdx+=6,e.currentTag=new Xp(_l.__assign(_l.__assign({},e.currentTag),{type:"doctype"})),e.state=20):oh(e)}function Ugt(e,t){t==="-"?e.state=15:t===">"?oh(e):e.state=16}function Vgt(e,t){t==="-"?e.state=18:t===">"?oh(e):e.state=16}function jgt(e,t){t==="-"&&(e.state=17)}function Ggt(e,t){t==="-"?e.state=18:e.state=16}function Hgt(e,t){t===">"?Qp(e):t==="!"?e.state=19:t==="-"||(e.state=16)}function Wgt(e,t){t==="-"?e.state=17:t===">"?Qp(e):e.state=16}function qgt(e,t){t===">"?Qp(e):t==="<"&&Kp(e)}function oh(e){e.state=0,e.currentTag=$J}function Kp(e){e.state=1,e.currentTag=new Xp({idx:e.charIdx})}function Qp(e){var t=e.html.slice(e.currentDataIdx,e.currentTag.idx);t&&e.callbacks.onText(t,e.currentDataIdx);var n=e.currentTag;n.type==="comment"?e.callbacks.onComment(n.idx):n.type==="doctype"?e.callbacks.onDoctype(n.idx):(n.isOpening&&e.callbacks.onOpenTag(n.name,n.idx),n.isClosing&&e.callbacks.onCloseTag(n.name,n.idx)),oh(e),e.currentDataIdx=e.charIdx+1}function Ygt(e){var t=e.html.slice(e.currentDataIdx,e.charIdx);e.callbacks.onText(t,e.currentDataIdx),e.currentDataIdx=e.charIdx+1}function QJ(e){var t=e.currentTag.idx+(e.currentTag.isClosing?2:1);return e.html.slice(t,e.charIdx).toLowerCase()}function Xgt(e){e.charIdx--}});var RH=zi(eZ=>{"use strict";Object.defineProperty(eZ,"__esModule",{value:!0});var ZJ=(Bm(),Th(Mm)),Kgt=HTe(),Gs=vy(),Qgt=FJ(),$gt=_H(),Jgt=KJ(),Zgt=oEe(),e_t=jJ(),t_t=UJ(),n_t=(function(){function e(t){t===void 0&&(t={}),this.version=e.version,this.urls={},this.email=!0,this.phone=!0,this.hashtag=!1,this.mention=!1,this.newWindow=!0,this.stripPrefix={scheme:!0,www:!0},this.stripTrailingSlash=!0,this.decodePercentEncoding=!0,this.truncate={length:0,location:"end"},this.className="",this.replaceFn=null,this.context=void 0,this.sanitizeHtml=!1,this.tagBuilder=null,this.urls=i_t(t.urls),this.email=(0,Gs.isBoolean)(t.email)?t.email:this.email,this.phone=(0,Gs.isBoolean)(t.phone)?t.phone:this.phone,this.hashtag=t.hashtag||this.hashtag,this.mention=t.mention||this.mention,this.newWindow=(0,Gs.isBoolean)(t.newWindow)?t.newWindow:this.newWindow,this.stripPrefix=o_t(t.stripPrefix),this.stripTrailingSlash=(0,Gs.isBoolean)(t.stripTrailingSlash)?t.stripTrailingSlash:this.stripTrailingSlash,this.decodePercentEncoding=(0,Gs.isBoolean)(t.decodePercentEncoding)?t.decodePercentEncoding:this.decodePercentEncoding,this.sanitizeHtml=t.sanitizeHtml||!1;var n=this.mention;if(n!==!1&&e_t.mentionServices.indexOf(n)===-1)throw new Error("invalid `mention` cfg '".concat(n,"' - see docs"));var i=this.hashtag;if(i!==!1&&t_t.hashtagServices.indexOf(i)===-1)throw new Error("invalid `hashtag` cfg '".concat(i,"' - see docs"));this.truncate=r_t(t.truncate),this.className=t.className||this.className,this.replaceFn=t.replaceFn||this.replaceFn,this.context=t.context||this}return e.link=function(t,n){var i=new e(n);return i.link(t)},e.parse=function(t,n){var i=new e(n);return i.parse(t)},e.prototype.parse=function(t){var n=this,i=["a","style","script"],o=0,r=[];return(0,Zgt.parseHtml)(t,{onOpenTag:function(a){i.indexOf(a)>=0&&o++},onText:function(a,s){if(o===0){var c=/( | |<|<|>|>|"|"|')/gi,u=a.split(c),f=s;u.forEach(function(d,p){if(p%2===0){var g=n.parseText(d,f);r.push.apply(r,ZJ.__spreadArray([],ZJ.__read(g),!1))}f+=d.length})}},onCloseTag:function(a){i.indexOf(a)>=0&&(o=Math.max(o-1,0))},onComment:function(){},onDoctype:function(){}}),r=this.compactMatches(r),r=this.removeUnwantedMatches(r),r},e.prototype.compactMatches=function(t){t.sort(a_t);for(var n=0;n<t.length-1;){var i=t[n],o=i.getOffset(),r=i.getMatchedText().length;if(n+1<t.length&&t[n+1].getOffset()===o){var a=t[n+1].getMatchedText().length>r?n:n+1;t.splice(a,1);continue}n++}return t},e.prototype.removeUnwantedMatches=function(t){return this.hashtag||(0,Gs.removeWithPredicate)(t,function(n){return n.getType()==="hashtag"}),this.email||(0,Gs.removeWithPredicate)(t,function(n){return n.getType()==="email"}),this.phone||(0,Gs.removeWithPredicate)(t,function(n){return n.getType()==="phone"}),this.mention||(0,Gs.removeWithPredicate)(t,function(n){return n.getType()==="mention"}),this.urls.schemeMatches||(0,Gs.removeWithPredicate)(t,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="scheme"}),this.urls.tldMatches||(0,Gs.removeWithPredicate)(t,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="tld"}),this.urls.ipV4Matches||(0,Gs.removeWithPredicate)(t,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="ipV4"}),t},e.prototype.parseText=function(t,n){n=n||0;for(var i=(0,Jgt.parseMatches)(t,{tagBuilder:this.getTagBuilder(),stripPrefix:this.stripPrefix,stripTrailingSlash:this.stripTrailingSlash,decodePercentEncoding:this.decodePercentEncoding,hashtagServiceName:this.hashtag,mentionServiceName:this.mention||"twitter"}),o=0,r=i.length;o<r;o++)i[o].setOffset(n+i[o].getOffset());return i},e.prototype.link=function(t){if(!t)return"";this.sanitizeHtml&&(t=t.replace(/</g,"<").replace(/>/g,">"));for(var n=this.parse(t),i=new Array(n.length*2+1),o=0,r=0,a=n.length;r<a;r++){var s=n[r];i.push(t.substring(o,s.getOffset())),i.push(this.createMatchReturnVal(s)),o=s.getOffset()+s.getMatchedText().length}return i.push(t.substring(o)),i.join("")},e.prototype.createMatchReturnVal=function(t){var n;if(this.replaceFn&&(n=this.replaceFn.call(this.context,t)),typeof n=="string")return n;if(n===!1)return t.getMatchedText();if(n instanceof $gt.HtmlTag)return n.toAnchorString();var i=t.buildTag();return i.toAnchorString()},e.prototype.getTagBuilder=function(){var t=this.tagBuilder;return t||(t=this.tagBuilder=new Qgt.AnchorTagBuilder({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),t},e.version=Kgt.version,e})();eZ.default=n_t;function i_t(e){return e==null&&(e=!0),(0,Gs.isBoolean)(e)?{schemeMatches:e,tldMatches:e,ipV4Matches:e}:{schemeMatches:(0,Gs.isBoolean)(e.schemeMatches)?e.schemeMatches:!0,tldMatches:(0,Gs.isBoolean)(e.tldMatches)?e.tldMatches:!0,ipV4Matches:(0,Gs.isBoolean)(e.ipV4Matches)?e.ipV4Matches:!0}}function o_t(e){return e==null&&(e=!0),(0,Gs.isBoolean)(e)?{scheme:e,www:e}:{scheme:(0,Gs.isBoolean)(e.scheme)?e.scheme:!0,www:(0,Gs.isBoolean)(e.www)?e.www:!0}}function r_t(e){return typeof e=="number"?{length:e,location:"end"}:ZJ.__assign({length:Number.POSITIVE_INFINITY,location:"end"},e)}function a_t(e,t){return e.getOffset()-t.getOffset()}});var aEe=zi(rEe=>{"use strict";Object.defineProperty(rEe,"__esModule",{value:!0})});var sEe=zi(p_=>{"use strict";Object.defineProperty(p_,"__esModule",{value:!0});var WC=(Bm(),Th(Mm));WC.__exportStar(aEe(),p_);WC.__exportStar(zJ(),p_);WC.__exportStar(VJ(),p_);WC.__exportStar(VC(),p_);WC.__exportStar(GJ(),p_);WC.__exportStar(HJ(),p_);WC.__exportStar(kJ(),p_)});var cEe=zi(tZ=>{"use strict";Object.defineProperty(tZ,"__esModule",{value:!0});var s_t=(Bm(),Th(Mm));s_t.__exportStar(KJ(),tZ)});var nZ=zi((Lm,uEe)=>{"use strict";Lm=uEe.exports=RH().default;Object.defineProperty(Lm,"__esModule",{value:!0});Lm.Autolinker=void 0;var Dw=(Bm(),Th(Mm)),lEe=Dw.__importDefault(RH());Lm.Autolinker=lEe.default;Lm.default=lEe.default;Dw.__exportStar(RH(),Lm);Dw.__exportStar(FJ(),Lm);Dw.__exportStar(_H(),Lm);Dw.__exportStar(sEe(),Lm);Dw.__exportStar(cEe(),Lm)});var gie=zi((T$i,cV)=>{/*!
- * protobuf.js v8.5.0 (c) 2016, daniel wirtz
- * compiled fri, 29 may 2026 22:57:25 utc
- * licensed under the bsd-3-clause license
- * see: https://github.com/dcodeio/protobuf.js for details
- */(function(e){"use strict";(function(n,i,o){function r(s){var c=i[s];return c||n[s][0].call(c=i[s]={exports:{}},r,c,c.exports),c.exports}var a=r(o[0]);a.util.global.protobuf=a,typeof define=="function"&&define.amd&&define(["long"],function(s){return s&&s.isLong&&(a.util.Long=s,a.configure()),a}),typeof cV=="object"&&cV&&cV.exports&&(cV.exports=a)})({1:[function(t,n,i){"use strict";var o=i;o.build="minimal",o.Writer=t(16),o.BufferWriter=t(17),o.Reader=t(2),o.BufferReader=t(3),o.util=t(13),o.rpc=t(5),o.roots=t(4),o.configure=r;function r(){o.util._configure(),o.Writer._configure(o.BufferWriter),o.Reader._configure(o.BufferReader)}r()},{13:13,16:16,17:17,2:2,3:3,4:4,5:5}],2:[function(t,n,i){"use strict";n.exports=u;var o=t(13),r,a=o.LongBits,s=o.utf8;function c(A,y){return RangeError("index out of range: "+A.pos+" + "+(y||1)+" > "+A.len)}function u(A){this.buf=A,this.pos=0,this.len=A.length,this.discardUnknown=u.discardUnknown}var f=typeof Uint8Array<"u"?function(y){if(y instanceof Uint8Array||Array.isArray(y))return new u(y);throw Error("illegal buffer")}:function(y){if(Array.isArray(y))return new u(y);throw Error("illegal buffer")},d=function(){return o.Buffer?function(x){return(u.create=function(C){return o.Buffer.isBuffer(C)?new r(C):f(C)})(x)}:f};u.create=d(),u.prototype._slice=o.Array.prototype.subarray||o.Array.prototype.slice,u.prototype.raw=function(y,x){return Array.isArray(this.buf)?this.buf.slice(y,x):y===x?new this.buf.constructor(0):this._slice.call(this.buf,y,x)},u.prototype.uint32=function(){var y=this.buf,x=this.pos,b=(y[x]&127)>>>0;if(y[x++]<128)return this.pos=x,b;if(b=(b|(y[x]&127)<<7)>>>0,y[x++]<128)return this.pos=x,b;if(b=(b|(y[x]&127)<<14)>>>0,y[x++]<128)return this.pos=x,b;if(b=(b|(y[x]&127)<<21)>>>0,y[x++]<128)return this.pos=x,b;if(b=(b|(y[x]&15)<<28)>>>0,y[x++]<128)return this.pos=x,b;for(var C=0;C<5;++C){if(x>=this.len)throw this.pos=x,c(this);if(y[x++]<128)return this.pos=x,b}throw this.pos=x,Error("invalid varint encoding")},u.prototype.tag=function(){var y=this.buf,x=this.pos,b=(y[x]&127)>>>0;if(y[x++]<128)return this.pos=x,b;if(b=(b|(y[x]&127)<<7)>>>0,y[x++]<128)return this.pos=x,b;if(b=(b|(y[x]&127)<<14)>>>0,y[x++]<128)return this.pos=x,b;if(b=(b|(y[x]&127)<<21)>>>0,y[x++]<128)return this.pos=x,b;if(b=(b|(y[x]&15)<<28)>>>0,y[x]<128&&(y[x]&112)===0)return this.pos=x+1,b;throw this.pos=x+1,Error("invalid tag encoding")},u.prototype.int32=function(){return this.uint32()|0},u.prototype.sint32=function(){var y=this.uint32();return y>>>1^-(y&1)|0};function p(){var A=new a(0,0),y=0;if(this.len-this.pos>4){for(;y<4;++y)if(A.lo=(A.lo|(this.buf[this.pos]&127)<<y*7)>>>0,this.buf[this.pos++]<128)return A;if(A.lo=(A.lo|(this.buf[this.pos]&127)<<28)>>>0,A.hi=(A.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return A;y=0}else{for(;y<3;++y){if(this.pos>=this.len)throw c(this);if(A.lo=(A.lo|(this.buf[this.pos]&127)<<y*7)>>>0,this.buf[this.pos++]<128)return A}return A.lo=(A.lo|(this.buf[this.pos++]&127)<<y*7)>>>0,A}if(this.len-this.pos>4){for(;y<5;++y)if(A.hi=(A.hi|(this.buf[this.pos]&127)<<y*7+3)>>>0,this.buf[this.pos++]<128)return A}else for(;y<5;++y){if(this.pos>=this.len)throw c(this);if(A.hi=(A.hi|(this.buf[this.pos]&127)<<y*7+3)>>>0,this.buf[this.pos++]<128)return A}throw Error("invalid varint encoding")}u.prototype.bool=function(){for(var y=!1,x,b=0;b<10;++b){if(this.pos>=this.len)throw c(this);if(x=this.buf[this.pos++],x&127&&(y=!0),x<128)return y}throw Error("invalid varint encoding")};function g(A,y){return(A[y-4]|A[y-3]<<8|A[y-2]<<16|A[y-1]<<24)>>>0}u.prototype.fixed32=function(){if(this.pos+4>this.len)throw c(this,4);return g(this.buf,this.pos+=4)},u.prototype.sfixed32=function(){if(this.pos+4>this.len)throw c(this,4);return g(this.buf,this.pos+=4)|0};function m(){if(this.pos+8>this.len)throw c(this,8);return new a(g(this.buf,this.pos+=4),g(this.buf,this.pos+=4))}u.prototype.float=function(){if(this.pos+4>this.len)throw c(this,4);var y=o.float.readFloatLE(this.buf,this.pos);return this.pos+=4,y},u.prototype.double=function(){if(this.pos+8>this.len)throw c(this,4);var y=o.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,y},u.prototype.bytes=function(){var y=this.uint32(),x=this.pos,b=this.pos+y;if(b>this.len)throw c(this,y);return this.pos=b,this.raw(x,b)},u.prototype.string=function(){var y=this.uint32(),x=this.pos,b=this.pos+y;if(b>this.len)throw c(this,y);return this.pos=b,s.read(this.buf,x,b)},u.prototype.skip=function(y){if(typeof y=="number"){if(this.pos+y>this.len)throw c(this,y);this.pos+=y}else do if(this.pos>=this.len)throw c(this);while(this.buf[this.pos++]&128);return this},u.recursionLimit=o.recursionLimit,u.discardUnknown=!1,u.prototype.skipType=function(A,y,x){if(y===e&&(y=0),y>u.recursionLimit)throw Error("max depth exceeded");if(x===0)throw Error("illegal tag: field number 0");switch(A){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){var b=this.tag(),C=b>>>3;if(A=b&7,!C)throw Error("illegal tag: field number 0");if(A===4){if(x!==e&&C!==x)throw Error("invalid end group tag");break}this.skipType(A,y+1,C)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+A+" at offset "+this.pos)}return this},u._configure=function(A){r=A,u.create=d(),r._configure();var y=o.Long?"toLong":"toNumber";o.merge(u.prototype,{int64:function(){return p.call(this)[y](!1)},uint64:function(){return p.call(this)[y](!0)},sint64:function(){return p.call(this).zzDecode()[y](!1)},fixed64:function(){return m.call(this)[y](!0)},sfixed64:function(){return m.call(this)[y](!1)}})}},{13:13}],3:[function(t,n,i){"use strict";n.exports=a;var o=t(2);(a.prototype=Object.create(o.prototype)).constructor=a;var r=t(13);function a(s){o.call(this,s)}a._configure=function(){r.Buffer&&(a.prototype._slice=r.Buffer.prototype.slice)},a.prototype.raw=function(c,u){return c===u?r.Buffer.alloc(0):this._slice.call(this.buf,c,u)},a.prototype.string=function(){var c=this.uint32(),u=this.pos,f=this.pos+c;if(f>this.len)throw RangeError("index out of range: "+this.pos+" + "+c+" > "+this.len);return this.pos=f,this.buf.utf8Slice?this.buf.utf8Slice(u,f):this.buf.toString("utf-8",u,f)},a._configure()},{13:13,2:2}],4:[function(t,n,i){"use strict";n.exports=Object.create(null)},{}],5:[function(t,n,i){"use strict";var o=i;o.Service=t(6)},{6:6}],6:[function(t,n,i){"use strict";n.exports=r;var o=t(13);(r.prototype=Object.create(o.EventEmitter.prototype)).constructor=r;function r(a,s,c){if(typeof a!="function")throw TypeError("rpcImpl must be a function");o.EventEmitter.call(this),this.rpcImpl=a,this.requestDelimited=!!s,this.responseDelimited=!!c}r.prototype.rpcCall=function a(s,c,u,f,d){if(!f)throw TypeError("request must be specified");var p=this;if(!d)return o.asPromise(a,p,s,c,u,f);if(!p.rpcImpl)return setTimeout(function(){d(Error("already ended"))},0),e;try{return p.rpcImpl(s,c[p.requestDelimited?"encodeDelimited":"encode"](f).finish(),function(m,A){if(m)return p.emit("error",m,s),d(m);if(A===null)return p.end(!0),e;if(!(A instanceof u))try{A=u[p.responseDelimited?"decodeDelimited":"decode"](A)}catch(y){return p.emit("error",y,s),d(y)}return p.emit("data",A,s),d(null,A)})}catch(g){return p.emit("error",g,s),setTimeout(function(){d(g)},0),e}},r.prototype.end=function(s){return this.rpcImpl&&(s||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{13:13}],7:[function(t,n,i){"use strict";n.exports=o;function o(r,a){for(var s=new Array(arguments.length-1),c=0,u=2,f=!0;u<arguments.length;)s[c++]=arguments[u++];return new Promise(function(p,g){s[c]=function(A){if(f)if(f=!1,A)g(A);else{for(var y=new Array(arguments.length-1),x=0;x<y.length;)y[x++]=arguments[x];p.apply(null,y)}};try{r.apply(a||null,s)}catch(m){f&&(f=!1,g(m))}})}},{}],8:[function(t,n,i){"use strict";var o=i;o.length=function(g){var m=g.length;if(!m)return 0;for(;m>0&&g.charAt(m-1)==="=";)--m;return Math.floor(m*3/4)};for(var r=new Array(64),a=new Array(123),s=0;s<64;)a[r[s]=s<26?s+65:s<52?s+71:s<62?s-4:s-59|43]=s++;a[45]=62,a[95]=63,o.encode=function(g,m,A){for(var y=null,x=[],b=0,C=0,E;m<A;){var S=g[m++];switch(C){case 0:x[b++]=r[S>>2],E=(S&3)<<4,C=1;break;case 1:x[b++]=r[E|S>>4],E=(S&15)<<2,C=2;break;case 2:x[b++]=r[E|S>>6],x[b++]=r[S&63],C=0;break}b>8191&&((y||(y=[])).push(String.fromCharCode.apply(String,x)),b=0)}return C&&(x[b++]=r[E],x[b++]=61,C===1&&(x[b++]=61)),y?(b&&y.push(String.fromCharCode.apply(String,x.slice(0,b))),y.join("")):String.fromCharCode.apply(String,x.slice(0,b))};var c="invalid encoding";o.decode=function(g,m,A){for(var y=A,x=0,b,C=0;C<g.length;){var E=g.charCodeAt(C++);if(E===61&&x>1)break;if((E=a[E])===e)throw Error(c);switch(x){case 0:b=E,x=1;break;case 1:m[A++]=b<<2|(E&48)>>4,b=E,x=2;break;case 2:m[A++]=(b&15)<<4|(E&60)>>2,b=E,x=3;break;case 3:m[A++]=(b&3)<<6|E,x=0;break}}if(x===1)throw Error(c);return A-y};var u=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,f=/[-_]/,d=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2}(?:==)?|[A-Za-z0-9_-]{3}=?)?$/;o.test=function(g){return u.test(g)||f.test(g)&&d.test(g)}},{}],9:[function(t,n,i){"use strict";n.exports=o;function o(){this._listeners=Object.create(null)}o.prototype.on=function(a,s,c){return(this._listeners[a]||(this._listeners[a]=[])).push({fn:s,ctx:c||this}),this},o.prototype.off=function(a,s){if(a===e)this._listeners=Object.create(null);else if(s===e)this._listeners[a]=[];else{var c=this._listeners[a];if(!c)return this;for(var u=0;u<c.length;)c[u].fn===s?c.splice(u,1):++u}return this},o.prototype.emit=function(a){var s=this._listeners[a];if(s){for(var c=[],u=1;u<arguments.length;)c.push(arguments[u++]);for(u=0;u<s.length;)s[u].fn.apply(s[u++].ctx,c)}return this}},{}],10:[function(t,n,i){"use strict";n.exports=o(o);function o(u){return typeof Float32Array<"u"?(function(){var f=new Float32Array([-0]),d=new Uint8Array(f.buffer),p=d[3]===128;function g(x,b,C){f[0]=x,b[C]=d[0],b[C+1]=d[1],b[C+2]=d[2],b[C+3]=d[3]}function m(x,b,C){f[0]=x,b[C]=d[3],b[C+1]=d[2],b[C+2]=d[1],b[C+3]=d[0]}u.writeFloatLE=p?g:m,u.writeFloatBE=p?m:g;function A(x,b){return d[0]=x[b],d[1]=x[b+1],d[2]=x[b+2],d[3]=x[b+3],f[0]}function y(x,b){return d[3]=x[b],d[2]=x[b+1],d[1]=x[b+2],d[0]=x[b+3],f[0]}u.readFloatLE=p?A:y,u.readFloatBE=p?y:A})():(function(){function f(p,g,m,A){var y=g<0?1:0;if(y&&(g=-g),g===0)p(1/g>0?0:2147483648,m,A);else if(isNaN(g))p(2143289344,m,A);else if(g>34028234663852886e22)p((y<<31|2139095040)>>>0,m,A);else if(g<11754943508222875e-54)p((y<<31|Math.round(g/1401298464324817e-60))>>>0,m,A);else{var x=Math.floor(Math.log(g)/Math.LN2),b=Math.round(g*Math.pow(2,-x)*8388608)&8388607;p((y<<31|x+127<<23|b)>>>0,m,A)}}u.writeFloatLE=f.bind(null,r),u.writeFloatBE=f.bind(null,a);function d(p,g,m){var A=p(g,m),y=(A>>31)*2+1,x=A>>>23&255,b=A&8388607;return x===255?b?NaN:y*(1/0):x===0?y*1401298464324817e-60*b:y*Math.pow(2,x-150)*(b+8388608)}u.readFloatLE=d.bind(null,s),u.readFloatBE=d.bind(null,c)})(),typeof Float64Array<"u"?(function(){var f=new Float64Array([-0]),d=new Uint8Array(f.buffer),p=d[7]===128;function g(x,b,C){f[0]=x,b[C]=d[0],b[C+1]=d[1],b[C+2]=d[2],b[C+3]=d[3],b[C+4]=d[4],b[C+5]=d[5],b[C+6]=d[6],b[C+7]=d[7]}function m(x,b,C){f[0]=x,b[C]=d[7],b[C+1]=d[6],b[C+2]=d[5],b[C+3]=d[4],b[C+4]=d[3],b[C+5]=d[2],b[C+6]=d[1],b[C+7]=d[0]}u.writeDoubleLE=p?g:m,u.writeDoubleBE=p?m:g;function A(x,b){return d[0]=x[b],d[1]=x[b+1],d[2]=x[b+2],d[3]=x[b+3],d[4]=x[b+4],d[5]=x[b+5],d[6]=x[b+6],d[7]=x[b+7],f[0]}function y(x,b){return d[7]=x[b],d[6]=x[b+1],d[5]=x[b+2],d[4]=x[b+3],d[3]=x[b+4],d[2]=x[b+5],d[1]=x[b+6],d[0]=x[b+7],f[0]}u.readDoubleLE=p?A:y,u.readDoubleBE=p?y:A})():(function(){function f(p,g,m,A,y,x){var b=A<0?1:0;if(b&&(A=-A),A===0)p(0,y,x+g),p(1/A>0?0:2147483648,y,x+m);else if(isNaN(A))p(0,y,x+g),p(2146959360,y,x+m);else if(A>17976931348623157e292)p(0,y,x+g),p((b<<31|2146435072)>>>0,y,x+m);else{var C;if(A<22250738585072014e-324)C=A/5e-324,p(C>>>0,y,x+g),p((b<<31|C/4294967296)>>>0,y,x+m);else{var E=Math.floor(Math.log(A)/Math.LN2);E===1024&&(E=1023),C=A*Math.pow(2,-E),p(C*4503599627370496>>>0,y,x+g),p((b<<31|E+1023<<20|C*1048576&1048575)>>>0,y,x+m)}}}u.writeDoubleLE=f.bind(null,r,0,4),u.writeDoubleBE=f.bind(null,a,4,0);function d(p,g,m,A,y){var x=p(A,y+g),b=p(A,y+m),C=(b>>31)*2+1,E=b>>>20&2047,S=4294967296*(b&1048575)+x;return E===2047?S?NaN:C*(1/0):E===0?C*5e-324*S:C*Math.pow(2,E-1075)*(S+4503599627370496)}u.readDoubleLE=d.bind(null,s,0,4),u.readDoubleBE=d.bind(null,c,4,0)})(),u}function r(u,f,d){f[d]=u&255,f[d+1]=u>>>8&255,f[d+2]=u>>>16&255,f[d+3]=u>>>24}function a(u,f,d){f[d]=u>>>24,f[d+1]=u>>>16&255,f[d+2]=u>>>8&255,f[d+3]=u&255}function s(u,f){return(u[f]|u[f+1]<<8|u[f+2]<<16|u[f+3]<<24)>>>0}function c(u,f){return(u[f]<<24|u[f+1]<<16|u[f+2]<<8|u[f+3])>>>0}},{}],11:[function(t,n,i){"use strict";n.exports=o;function o(r){try{if(typeof t!="function")return null;var a=t(r);return a&&(a.length||Object.keys(a).length)?a:null}catch{return null}}},{}],12:[function(t,n,i){"use strict";n.exports=r;var o=t(13);function r(u,f){this.lo=u>>>0,this.hi=f>>>0}var a=r.zero=new r(0,0);a.toNumber=function(){return 0},a.zzEncode=a.zzDecode=function(){return this},a.length=function(){return 1};var s=r.zeroHash="\0\0\0\0\0\0\0\0";r.fromNumber=function(f){if(f===0)return a;var d=f<0;d&&(f=-f);var p=f>>>0,g=(f-p)/4294967296>>>0;return d&&(g=~g>>>0,p=~p>>>0,++p>4294967295&&(p=0,++g>4294967295&&(g=0))),new r(p,g)},r.from=function(f){if(typeof f=="number")return r.fromNumber(f);if(o.isString(f))if(o.Long)f=o.Long.fromString(f);else return r.fromNumber(parseInt(f,10));return f.low||f.high?new r(f.low>>>0,f.high>>>0):a},r.prototype.toNumber=function(f){if(!f&&this.hi>>>31){var d=~this.lo+1>>>0,p=~this.hi>>>0;return d||(p=p+1>>>0),-(d+p*4294967296)}return this.lo+this.hi*4294967296},r.prototype.toLong=function(f){return o.Long?new o.Long(this.lo|0,this.hi|0,!!f):{low:this.lo|0,high:this.hi|0,unsigned:!!f}};var c=String.prototype.charCodeAt;r.fromHash=function(f){return f===s?a:new r((c.call(f,0)|c.call(f,1)<<8|c.call(f,2)<<16|c.call(f,3)<<24)>>>0,(c.call(f,4)|c.call(f,5)<<8|c.call(f,6)<<16|c.call(f,7)<<24)>>>0)},r.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},r.prototype.zzEncode=function(){var f=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^f)>>>0,this.lo=(this.lo<<1^f)>>>0,this},r.prototype.zzDecode=function(){var f=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^f)>>>0,this.hi=(this.hi>>>1^f)>>>0,this},r.prototype.length=function(){var f=this.lo,d=(this.lo>>>28|this.hi<<4)>>>0,p=this.hi>>>24;return p===0?d===0?f<16384?f<128?1:2:f<2097152?3:4:d<16384?d<128?5:6:d<2097152?7:8:p<128?9:10}},{13:13}],13:[function(t,n,i){"use strict";var o=i;o.asPromise=t(7),o.base64=t(8),o.EventEmitter=t(9),o.float=t(10),o.inquire=t(11),o.utf8=t(15),o.pool=t(14),o.LongBits=t(12);function r(c){return c==="__proto__"||c==="prototype"||c==="constructor"}o.isUnsafeProperty=r,o.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node),o.global=o.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||this,o.emptyArray=Object.freeze?Object.freeze([]):[],o.emptyObject=Object.freeze?Object.freeze({}):{},o.isInteger=Number.isInteger||function(u){return typeof u=="number"&&isFinite(u)&&Math.floor(u)===u},o.isString=function(u){return typeof u=="string"||u instanceof String},o.isObject=function(u){return u&&typeof u=="object"},o.isset=o.isSet=function(u,f){var d=u[f];return d!=null&&u.hasOwnProperty(f)?typeof d!="object"||(Array.isArray(d)?d.length:Object.keys(d).length)>0:!1},o.Buffer=(function(){try{var c=o.global.Buffer;return c.prototype.utf8Write?c:null}catch{return null}})(),o._Buffer_from=null,o._Buffer_allocUnsafe=null,o.newBuffer=function(u){return typeof u=="number"?o.Buffer?o._Buffer_allocUnsafe(u):new o.Array(u):o.Buffer?o._Buffer_from(u):typeof Uint8Array>"u"?u:new Uint8Array(u)},o.Array=typeof Uint8Array<"u"?Uint8Array:Array,o.Long=o.global.dcodeIO&&o.global.dcodeIO.Long||o.global.Long||(function(){try{var c=t("long");return c&&c.isLong?c:null}catch{return null}})(),o.key2Re=/^(?:true|false|0|1)$/,o.key32Re=/^-?(?:0|[1-9][0-9]*)$/,o.key64Re=/^(?:[\x00-\xff]{8}|-?(?:0|[1-9][0-9]*))$/,o.longToHash=function(u){return u?o.LongBits.from(u).toHash():o.LongBits.zeroHash},o.longFromHash=function(u,f){var d=o.LongBits.fromHash(u);return o.Long?o.Long.fromBits(d.lo,d.hi,f):d.toNumber(!!f)},o.longFromKey=function(u,f){return o.key64Re.test(u)&&!o.key32Re.test(u)?o.longFromHash(u,f):u},o.boolFromKey=function(u){return u==="true"||u==="1"};function a(c){var u=typeof arguments[arguments.length-1]=="boolean",f=u?arguments.length-1:arguments.length;u=u&&arguments[arguments.length-1];for(var d=1;d<f;++d){var p=arguments[d];if(p)for(var g=Object.keys(p),m=0;m<g.length;++m)!r(g[m])&&(c[g[m]]===e||!u)&&(c[g[m]]=p[g[m]])}return c}o.merge=a,o.nestingLimit=32,o.recursionLimit=100,o.makeProp=function(u,f,d){Object.prototype.hasOwnProperty.call(u,f)||Object.defineProperty(u,f,{enumerable:d===e?!0:d,configurable:!0,writable:!0})},o.lcFirst=function(u){return u.charAt(0).toLowerCase()+u.substring(1)};function s(c){function u(f,d){if(!(this instanceof u))return new u(f,d);Object.defineProperty(this,"message",{get:function(){return f}}),Error.captureStackTrace?Error.captureStackTrace(this,u):Object.defineProperty(this,"stack",{value:new Error().stack||""}),d&&a(this,d)}return u.prototype=Object.create(Error.prototype,{constructor:{value:u,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return c},set:e,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),u}o.newError=s,o.ProtocolError=s("ProtocolError"),o.oneOfGetter=function(u){for(var f={},d=0;d<u.length;++d)f[u[d]]=1;return function(){for(var p=Object.keys(this),g=p.length-1;g>-1;--g)if(f[p[g]]===1&&this[p[g]]!==e&&this[p[g]]!==null)return p[g]}},o.oneOfSetter=function(u){return function(f){for(var d=0;d<u.length;++d)u[d]!==f&&delete this[u[d]]}},o.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},o._configure=function(){var c=o.Buffer;if(!c){o._Buffer_from=o._Buffer_allocUnsafe=null;return}o._Buffer_from=c.from!==Uint8Array.from&&c.from||function(f,d){return new c(f,d)},o._Buffer_allocUnsafe=c.allocUnsafe||function(f){return new c(f)}}},{10:10,11:11,12:12,14:14,15:15,7:7,8:8,9:9,long:"long"}],14:[function(t,n,i){"use strict";n.exports=o;function o(r,a,s){var c=s||8192,u=c>>>1,f=null,d=c;return function(g){if(g<1||g>u)return r(g);d+g>c&&(f=r(c),d=0);var m=a.call(f,d,d+=g);return d&7&&(d=(d|7)+1),m}}},{}],15:[function(t,n,i){"use strict";var o=i,r="\uFFFD";o.length=function(c){for(var u=0,f=0,d=0;d<c.length;++d)f=c.charCodeAt(d),f<128?u+=1:f<2048?u+=2:(f&64512)===55296&&(c.charCodeAt(d+1)&64512)===56320?(++d,u+=4):u+=3;return u};function a(s,c,u,f){for(var d=c;d<u;){var p=s[d++];if(p<=127)f+=String.fromCharCode(p);else if(p>=192&&p<224){var g=(p&31)<<6|s[d++]&63;f+=g>=128?String.fromCharCode(g):r}else if(p>=224&&p<240){var m=(p&15)<<12|(s[d++]&63)<<6|s[d++]&63;f+=m>=2048?String.fromCharCode(m):r}else if(p>=240){var A=(p&7)<<18|(s[d++]&63)<<12|(s[d++]&63)<<6|s[d++]&63;A<65536||A>1114111?f+=r:(A-=65536,f+=String.fromCharCode(55296+(A>>10)),f+=String.fromCharCode(56320+(A&1023)))}}return f}o.read=function(c,u,f){if(f-u<1)return"";for(var d="",p=u,g,m,A,y,x,b,C,E;p+7<f;p+=8){if(g=c[p],m=c[p+1],A=c[p+2],y=c[p+3],x=c[p+4],b=c[p+5],C=c[p+6],E=c[p+7],(g|m|A|y|x|b|C|E)&128)return a(c,p,f,d);d+=String.fromCharCode(g,m,A,y,x,b,C,E)}for(;p<f;++p){if(g=c[p],g&128)return a(c,p,f,d);d+=String.fromCharCode(g)}return d},o.write=function(c,u,f){for(var d=f,p,g,m=0;m<c.length;++m)p=c.charCodeAt(m),p<128?u[f++]=p:p<2048?(u[f++]=p>>6|192,u[f++]=p&63|128):(p&64512)===55296&&((g=c.charCodeAt(m+1))&64512)===56320?(p=65536+((p&1023)<<10)+(g&1023),++m,u[f++]=p>>18|240,u[f++]=p>>12&63|128,u[f++]=p>>6&63|128,u[f++]=p&63|128):(u[f++]=p>>12|224,u[f++]=p>>6&63|128,u[f++]=p&63|128);return f-d}},{}],16:[function(t,n,i){"use strict";n.exports=p;var o=t(13),r,a=o.LongBits,s=o.base64,c=o.utf8;function u(S,w,P){this.fn=S,this.len=w,this.next=e,this.val=P}function f(){}function d(S){this.head=S.head,this.tail=S.tail,this.len=S.len,this.next=S.states}function p(){this.len=0,this.head=new u(f,0,0),this.tail=this.head,this.states=null}var g=function(){return o.Buffer?function(){return(p.create=function(){return new r})()}:function(){return new p}};p.create=g(),p.alloc=function(w){return new o.Array(w)},o.Array!==Array&&(p.alloc=o.pool(p.alloc,o.Array.prototype.subarray)),p.prototype._push=function(w,P,R){return this.tail=this.tail.next=new u(w,P,R),this.len+=P,this};function m(S,w,P){w[P]=S&255}function A(S,w,P){for(var R=0;R<S.length;)w[P++]=S.charCodeAt(R++)}function y(S,w,P){for(;S>127;)w[P++]=S&127|128,S>>>=7;w[P]=S}function x(S,w){this.len=S,this.next=e,this.val=w}x.prototype=Object.create(u.prototype),x.prototype.fn=y,p.prototype.uint32=function(w){return this.len+=(this.tail=this.tail.next=new x((w=w>>>0)<128?1:w<16384?2:w<2097152?3:w<268435456?4:5,w)).len,this},p.prototype.int32=function(w){return(w|=0)<0?this._push(b,10,a.fromNumber(w)):this.uint32(w)},p.prototype.sint32=function(w){return this.uint32((w<<1^w>>31)>>>0)};function b(S,w,P){for(var R=S.lo,B=S.hi;B;)w[P++]=R&127|128,R=(R>>>7|B<<25)>>>0,B>>>=7;for(;R>127;)w[P++]=R&127|128,R=R>>>7;w[P++]=R}p.prototype.uint64=function(w){var P=a.from(w);return this._push(b,P.length(),P)},p.prototype.int64=p.prototype.uint64,p.prototype.sint64=function(w){var P=a.from(w).zzEncode();return this._push(b,P.length(),P)},p.prototype.bool=function(w){return this._push(m,1,w?1:0)};function C(S,w,P){w[P]=S&255,w[P+1]=S>>>8&255,w[P+2]=S>>>16&255,w[P+3]=S>>>24}p.prototype.fixed32=function(w){return this._push(C,4,w>>>0)},p.prototype.sfixed32=p.prototype.fixed32,p.prototype.fixed64=function(w){var P=a.from(w);return this._push(C,4,P.lo)._push(C,4,P.hi)},p.prototype.sfixed64=p.prototype.fixed64,p.prototype.float=function(w){return this._push(o.float.writeFloatLE,4,w)},p.prototype.double=function(w){return this._push(o.float.writeDoubleLE,8,w)};var E=o.Array.prototype.set?function(w,P,R){P.set(w,R)}:function(w,P,R){for(var B=0;B<w.length;++B)P[R+B]=w[B]};p.prototype.bytes=function(w){var P=w.length>>>0;if(!P)return this._push(m,1,0);if(o.isString(w)){var R=p.alloc(P=s.length(w));s.decode(w,R,0),w=R}return this.uint32(P)._push(E,P,w)},p.prototype.raw=function(w){var P=w.length>>>0;return P?this._push(E,P,w):this},p.prototype.string=function(w){var P=c.length(w);return P?this.uint32(P)._push(P===w.length?A:c.write,P,w):this._push(m,1,0)},p.prototype.fork=function(){return this.states=new d(this),this.head=this.tail=new u(f,0,0),this.len=0,this},p.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new u(f,0,0),this.len=0),this},p.prototype.ldelim=function(){var w=this.head,P=this.tail,R=this.len;return this.reset().uint32(R),R&&(this.tail.next=w.next,this.tail=P,this.len+=R),this},p.prototype.finish=function(){return this.finishInto(this.constructor.alloc(this.len),0)},p.prototype.finishInto=function(w,P){P===e&&(P=0);for(var R=this.head.next,B=P;R;)R.fn(R.val,w,B),B+=R.len,R=R.next;return w},p._configure=function(S){r=S,p.create=g(),r._configure()}},{13:13}],17:[function(t,n,i){"use strict";n.exports=a;var o=t(16);(a.prototype=Object.create(o.prototype)).constructor=a;var r=t(13);function a(){o.call(this)}a._configure=function(){a.alloc=r._Buffer_allocUnsafe,a.writeBytesBuffer=r.Buffer&&r.Buffer.prototype instanceof Uint8Array&&r.Buffer.prototype.set.name==="set"?function(f,d,p){d.set(f,p)}:function(f,d,p){if(f.copy)f.copy(d,p,0,f.length);else for(var g=0;g<f.length;)d[p++]=f[g++]}},a.prototype.bytes=function(f){r.isString(f)&&(f=r._Buffer_from(f,"base64"));var d=f.length>>>0;return this.uint32(d),d&&this._push(a.writeBytesBuffer,d,f),this},a.prototype.raw=function(f){var d=f.length>>>0;return d?this._push(a.writeBytesBuffer,d,f):this};function s(u,f,d){for(var p=0;p<u.length;)f[d++]=u.charCodeAt(p++)}function c(u,f,d){u.length<40?r.utf8.write(u,f,d):f.utf8Write?f.utf8Write(u,d):f.write(u,d)}a.prototype.string=function(f){var d=r.Buffer.byteLength(f);return this.uint32(d),d&&this._push(d===f.length&&d<40?s:c,d,f),this},a._configure()},{13:13,16:16}]},{},[1])})()});var wRe=zi((wZi,Z5)=>{/* Copyright 2015-2018 Esri. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 @preserve */(function(){var e=(function(){var o={};o.defaultNoDataValue=-34027999387901484e22,o.decode=function(f,d){d=d||{};var p=d.encodedMaskData||d.encodedMaskData===null,g=c(f,d.inputOffset||0,p),m=d.noDataValue!==null?d.noDataValue:o.defaultNoDataValue,A=r(g,d.pixelType||Float32Array,d.encodedMaskData,m,d.returnMask),y={width:g.width,height:g.height,pixelData:A.resultPixels,minValue:A.minValue,maxValue:g.pixels.maxValue,noDataValue:m};return A.resultMask&&(y.maskData=A.resultMask),d.returnEncodedMask&&g.mask&&(y.encodedMaskData=g.mask.bitset?g.mask.bitset:null),d.returnFileInfo&&(y.fileInfo=a(g),d.computeUsedBitDepths&&(y.fileInfo.bitDepths=s(g))),y};var r=function(f,d,p,g,m){var A=0,y=f.pixels.numBlocksX,x=f.pixels.numBlocksY,b=Math.floor(f.width/y),C=Math.floor(f.height/x),E=2*f.maxZError,S=Number.MAX_VALUE,w;p=p||(f.mask?f.mask.bitset:null);var P,R;P=new d(f.width*f.height),m&&p&&(R=new Uint8Array(f.width*f.height));for(var B=new Float32Array(b*C),L,_,T=0;T<=x;T++){var v=T!==x?C:f.height%x;if(v!==0)for(var I=0;I<=y;I++){var O=I!==y?b:f.width%y;if(O!==0){var N=T*f.width*C+I*b,j=f.width-O,k=f.pixels.blocks[A],U,F,H;k.encoding<2?(k.encoding===0?U=k.rawData:(u(k.stuffedData,k.bitsPerPixel,k.numValidPixels,k.offset,E,B,f.pixels.maxValue),U=B),F=0):k.encoding===2?H=0:H=k.offset;var q;if(p)for(_=0;_<v;_++){for(N&7&&(q=p[N>>3],q<<=N&7),L=0;L<O;L++)N&7||(q=p[N>>3]),q&128?(R&&(R[N]=1),w=k.encoding<2?U[F++]:H,S=S>w?w:S,P[N++]=w):(R&&(R[N]=0),P[N++]=g),q<<=1;N+=j}else if(k.encoding<2)for(_=0;_<v;_++){for(L=0;L<O;L++)w=U[F++],S=S>w?w:S,P[N++]=w;N+=j}else for(S=S>H?H:S,_=0;_<v;_++){for(L=0;L<O;L++)P[N++]=H;N+=j}if(k.encoding===1&&F!==k.numValidPixels)throw"Block and Mask do not match";A++}}}return{resultPixels:P,resultMask:R,minValue:S}},a=function(f){return{fileIdentifierString:f.fileIdentifierString,fileVersion:f.fileVersion,imageType:f.imageType,height:f.height,width:f.width,maxZError:f.maxZError,eofOffset:f.eofOffset,mask:f.mask?{numBlocksX:f.mask.numBlocksX,numBlocksY:f.mask.numBlocksY,numBytes:f.mask.numBytes,maxValue:f.mask.maxValue}:null,pixels:{numBlocksX:f.pixels.numBlocksX,numBlocksY:f.pixels.numBlocksY,numBytes:f.pixels.numBytes,maxValue:f.pixels.maxValue,noDataValue:f.noDataValue}}},s=function(f){for(var d=f.pixels.numBlocksX*f.pixels.numBlocksY,p={},g=0;g<d;g++){var m=f.pixels.blocks[g];m.encoding===0?p.float32=!0:m.encoding===1?p[m.bitsPerPixel]=!0:p[0]=!0}return Object.keys(p)},c=function(f,d,p){var g={},m=new Uint8Array(f,d,10);if(g.fileIdentifierString=String.fromCharCode.apply(null,m),g.fileIdentifierString.trim()!=="CntZImage")throw"Unexpected file identifier string: "+g.fileIdentifierString;d+=10;var A=new DataView(f,d,24);if(g.fileVersion=A.getInt32(0,!0),g.imageType=A.getInt32(4,!0),g.height=A.getUint32(8,!0),g.width=A.getUint32(12,!0),g.maxZError=A.getFloat64(16,!0),d+=24,!p)if(A=new DataView(f,d,16),g.mask={},g.mask.numBlocksY=A.getUint32(0,!0),g.mask.numBlocksX=A.getUint32(4,!0),g.mask.numBytes=A.getUint32(8,!0),g.mask.maxValue=A.getFloat32(12,!0),d+=16,g.mask.numBytes>0){var y=new Uint8Array(Math.ceil(g.width*g.height/8));A=new DataView(f,d,g.mask.numBytes);var x=A.getInt16(0,!0),b=2,C=0;do{if(x>0)for(;x--;)y[C++]=A.getUint8(b++);else{var E=A.getUint8(b++);for(x=-x;x--;)y[C++]=E}x=A.getInt16(b,!0),b+=2}while(b<g.mask.numBytes);if(x!==-32768||C<y.length)throw"Unexpected end of mask RLE encoding";g.mask.bitset=y,d+=g.mask.numBytes}else(g.mask.numBytes|g.mask.numBlocksY|g.mask.maxValue)===0&&(g.mask.bitset=new Uint8Array(Math.ceil(g.width*g.height/8)));A=new DataView(f,d,16),g.pixels={},g.pixels.numBlocksY=A.getUint32(0,!0),g.pixels.numBlocksX=A.getUint32(4,!0),g.pixels.numBytes=A.getUint32(8,!0),g.pixels.maxValue=A.getFloat32(12,!0),d+=16;var S=g.pixels.numBlocksX,w=g.pixels.numBlocksY,P=S+(g.width%S>0?1:0),R=w+(g.height%w>0?1:0);g.pixels.blocks=new Array(P*R);for(var B=0,L=0;L<R;L++)for(var _=0;_<P;_++){var T=0,v=f.byteLength-d;A=new DataView(f,d,Math.min(10,v));var I={};g.pixels.blocks[B++]=I;var O=A.getUint8(0);if(T++,I.encoding=O&63,I.encoding>3)throw"Invalid block encoding ("+I.encoding+")";if(I.encoding===2){d++;continue}if(O!==0&&O!==2){if(O>>=6,I.offsetType=O,O===2)I.offset=A.getInt8(1),T++;else if(O===1)I.offset=A.getInt16(1,!0),T+=2;else if(O===0)I.offset=A.getFloat32(1,!0),T+=4;else throw"Invalid block offset type";if(I.encoding===1)if(O=A.getUint8(T),T++,I.bitsPerPixel=O&63,O>>=6,I.numValidPixelsType=O,O===2)I.numValidPixels=A.getUint8(T),T++;else if(O===1)I.numValidPixels=A.getUint16(T,!0),T+=2;else if(O===0)I.numValidPixels=A.getUint32(T,!0),T+=4;else throw"Invalid valid pixel count type"}if(d+=T,I.encoding!==3){var N,j;if(I.encoding===0){var k=(g.pixels.numBytes-1)/4;if(k!==Math.floor(k))throw"uncompressed block has invalid length";N=new ArrayBuffer(k*4),j=new Uint8Array(N),j.set(new Uint8Array(f,d,k*4));var U=new Float32Array(N);I.rawData=U,d+=k*4}else if(I.encoding===1){var F=Math.ceil(I.numValidPixels*I.bitsPerPixel/8),H=Math.ceil(F/4);N=new ArrayBuffer(H*4),j=new Uint8Array(N),j.set(new Uint8Array(f,d,F)),I.stuffedData=new Uint32Array(N),d+=F}}}return g.eofOffset=d,g},u=function(f,d,p,g,m,A,y){var x=(1<<d)-1,b=0,C,E=0,S,w,P=Math.ceil((y-g)/m),R=f.length*4-Math.ceil(d*p/8);for(f[f.length-1]<<=8*R,C=0;C<p;C++){if(E===0&&(w=f[b++],E=32),E>=d)S=w>>>E-d&x,E-=d;else{var B=d-E;S=(w&x)<<B&x,w=f[b++],E=32-B,S+=w>>>E}A[C]=S<P?g+S*m:y}return A};return o})(),t=(function(){"use strict";var o={unstuff:function(c,u,f,d,p,g,m,A){var y=(1<<f)-1,x=0,b,C=0,E,S,w,P,R=c.length*4-Math.ceil(f*d/8);if(c[c.length-1]<<=8*R,p)for(b=0;b<d;b++)C===0&&(S=c[x++],C=32),C>=f?(E=S>>>C-f&y,C-=f):(w=f-C,E=(S&y)<<w&y,S=c[x++],C=32-w,E+=S>>>C),u[b]=p[E];else for(P=Math.ceil((A-g)/m),b=0;b<d;b++)C===0&&(S=c[x++],C=32),C>=f?(E=S>>>C-f&y,C-=f):(w=f-C,E=(S&y)<<w&y,S=c[x++],C=32-w,E+=S>>>C),u[b]=E<P?g+E*m:A},unstuffLUT:function(c,u,f,d,p,g){var m=(1<<u)-1,A=0,y=0,x=0,b=0,C=0,E,S=[],w=c.length*4-Math.ceil(u*f/8);c[c.length-1]<<=8*w;var P=Math.ceil((g-d)/p);for(y=0;y<f;y++)b===0&&(E=c[A++],b=32),b>=u?(C=E>>>b-u&m,b-=u):(x=u-b,C=(E&m)<<x&m,E=c[A++],b=32-x,C+=E>>>b),S[y]=C<P?d+C*p:g;return S.unshift(d),S},unstuff2:function(c,u,f,d,p,g,m,A){var y=(1<<f)-1,x=0,b,C=0,E=0,S,w,P;if(p)for(b=0;b<d;b++)C===0&&(w=c[x++],C=32,E=0),C>=f?(S=w>>>E&y,C-=f,E+=f):(P=f-C,S=w>>>E&y,w=c[x++],C=32-P,S|=(w&(1<<P)-1)<<f-P,E=P),u[b]=p[S];else{var R=Math.ceil((A-g)/m);for(b=0;b<d;b++)C===0&&(w=c[x++],C=32,E=0),C>=f?(S=w>>>E&y,C-=f,E+=f):(P=f-C,S=w>>>E&y,w=c[x++],C=32-P,S|=(w&(1<<P)-1)<<f-P,E=P),u[b]=S<R?g+S*m:A}return u},unstuffLUT2:function(c,u,f,d,p,g){var m=(1<<u)-1,A=0,y=0,x=0,b=0,C=0,E=0,S,w=[],P=Math.ceil((g-d)/p);for(y=0;y<f;y++)b===0&&(S=c[A++],b=32,E=0),b>=u?(C=S>>>E&m,b-=u,E+=u):(x=u-b,C=S>>>E&m,S=c[A++],b=32-x,C|=(S&(1<<x)-1)<<u-x,E=x),w[y]=C<P?d+C*p:g;return w.unshift(d),w},originalUnstuff:function(c,u,f,d){var p=(1<<f)-1,g=0,m,A=0,y,x,b,C=c.length*4-Math.ceil(f*d/8);for(c[c.length-1]<<=8*C,m=0;m<d;m++)A===0&&(x=c[g++],A=32),A>=f?(y=x>>>A-f&p,A-=f):(b=f-A,y=(x&p)<<b&p,x=c[g++],A=32-b,y+=x>>>A),u[m]=y;return u},originalUnstuff2:function(c,u,f,d){var p=(1<<f)-1,g=0,m,A=0,y=0,x,b,C;for(m=0;m<d;m++)A===0&&(b=c[g++],A=32,y=0),A>=f?(x=b>>>y&p,A-=f,y+=f):(C=f-A,x=b>>>y&p,b=c[g++],A=32-C,x|=(b&(1<<C)-1)<<f-C,y=C),u[m]=x;return u}},r={HUFFMAN_LUT_BITS_MAX:12,computeChecksumFletcher32:function(c){for(var u=65535,f=65535,d=c.length,p=Math.floor(d/2),g=0;p;){var m=p>=359?359:p;p-=m;do u+=c[g++]<<8,f+=u+=c[g++];while(--m);u=(u&65535)+(u>>>16),f=(f&65535)+(f>>>16)}return d&1&&(f+=u+=c[g]<<8),u=(u&65535)+(u>>>16),f=(f&65535)+(f>>>16),(f<<16|u)>>>0},readHeaderInfo:function(c,u){var f=u.ptr,d=new Uint8Array(c,f,6),p={};if(p.fileIdentifierString=String.fromCharCode.apply(null,d),p.fileIdentifierString.lastIndexOf("Lerc2",0)!==0)throw"Unexpected file identifier string (expect Lerc2 ): "+p.fileIdentifierString;f+=6;var g=new DataView(c,f,8),m=g.getInt32(0,!0);p.fileVersion=m,f+=4,m>=3&&(p.checksum=g.getUint32(4,!0),f+=4),g=new DataView(c,f,12),p.height=g.getUint32(0,!0),p.width=g.getUint32(4,!0),f+=8,m>=4?(p.numDims=g.getUint32(8,!0),f+=4):p.numDims=1,g=new DataView(c,f,40),p.numValidPixel=g.getUint32(0,!0),p.microBlockSize=g.getInt32(4,!0),p.blobSize=g.getInt32(8,!0),p.imageType=g.getInt32(12,!0),p.maxZError=g.getFloat64(16,!0),p.zMin=g.getFloat64(24,!0),p.zMax=g.getFloat64(32,!0),f+=40,u.headerInfo=p,u.ptr=f;var A,y;if(m>=3&&(y=m>=4?52:48,A=this.computeChecksumFletcher32(new Uint8Array(c,f-y,p.blobSize-14)),A!==p.checksum))throw"Checksum failed.";return!0},checkMinMaxRanges:function(c,u){var f=u.headerInfo,d=this.getDataTypeArray(f.imageType),p=f.numDims*this.getDataTypeSize(f.imageType),g=this.readSubArray(c,u.ptr,d,p),m=this.readSubArray(c,u.ptr+p,d,p);u.ptr+=2*p;var A,y=!0;for(A=0;A<f.numDims;A++)if(g[A]!==m[A]){y=!1;break}return f.minValues=g,f.maxValues=m,y},readSubArray:function(c,u,f,d){var p;if(f===Uint8Array)p=new Uint8Array(c,u,d);else{var g=new ArrayBuffer(d),m=new Uint8Array(g);m.set(new Uint8Array(c,u,d)),p=new f(g)}return p},readMask:function(c,u){var f=u.ptr,d=u.headerInfo,p=d.width*d.height,g=d.numValidPixel,m=new DataView(c,f,4),A={};if(A.numBytes=m.getUint32(0,!0),f+=4,(g===0||p===g)&&A.numBytes!==0)throw"invalid mask";var y,x;if(g===0)y=new Uint8Array(Math.ceil(p/8)),A.bitset=y,x=new Uint8Array(p),u.pixels.resultMask=x,f+=A.numBytes;else if(A.numBytes>0){y=new Uint8Array(Math.ceil(p/8)),m=new DataView(c,f,A.numBytes);var b=m.getInt16(0,!0),C=2,E=0,S=0;do{if(b>0)for(;b--;)y[E++]=m.getUint8(C++);else for(S=m.getUint8(C++),b=-b;b--;)y[E++]=S;b=m.getInt16(C,!0),C+=2}while(C<A.numBytes);if(b!==-32768||E<y.length)throw"Unexpected end of mask RLE encoding";x=new Uint8Array(p);var w=0,P=0;for(P=0;P<p;P++)P&7?(w=y[P>>3],w<<=P&7):w=y[P>>3],w&128&&(x[P]=1);u.pixels.resultMask=x,A.bitset=y,f+=A.numBytes}return u.ptr=f,u.mask=A,!0},readDataOneSweep:function(c,u,f){var d=u.ptr,p=u.headerInfo,g=p.numDims,m=p.width*p.height,A=p.imageType,y=p.numValidPixel*r.getDataTypeSize(A)*g,x,b=u.pixels.resultMask;if(f===Uint8Array)x=new Uint8Array(c,d,y);else{var C=new ArrayBuffer(y),E=new Uint8Array(C);E.set(new Uint8Array(c,d,y)),x=new f(C)}if(x.length===m*g)u.pixels.resultPixels=x;else{u.pixels.resultPixels=new f(m*g);var S=0,w=0,P=0,R=0;if(g>1)for(P=0;P<g;P++)for(R=P*m,w=0;w<m;w++)b[w]&&(u.pixels.resultPixels[R+w]=x[S++]);else for(w=0;w<m;w++)b[w]&&(u.pixels.resultPixels[w]=x[S++])}return d+=y,u.ptr=d,!0},readHuffmanTree:function(c,u){var f=this.HUFFMAN_LUT_BITS_MAX,d=new DataView(c,u.ptr,16);u.ptr+=16;var p=d.getInt32(0,!0);if(p<2)throw"unsupported Huffman version";var g=d.getInt32(4,!0),m=d.getInt32(8,!0),A=d.getInt32(12,!0);if(m>=A)return!1;var y=new Uint32Array(A-m);r.decodeBits(c,u,y);var x=[],b,C,E,S;for(b=m;b<A;b++)C=b-(b<g?0:g),x[C]={first:y[b-m],second:null};var w=c.byteLength-u.ptr,P=Math.ceil(w/4),R=new ArrayBuffer(P*4),B=new Uint8Array(R);B.set(new Uint8Array(c,u.ptr,w));var L=new Uint32Array(R),_=0,T,v=0;for(T=L[0],b=m;b<A;b++)C=b-(b<g?0:g),S=x[C].first,S>0&&(x[C].second=T<<_>>>32-S,32-_>=S?(_+=S,_===32&&(_=0,v++,T=L[v])):(_+=S-32,v++,T=L[v],x[C].second|=T>>>32-_));var I=0,O=0,N=new a;for(b=0;b<x.length;b++)x[b]!==void 0&&(I=Math.max(I,x[b].first));I>=f?O=f:O=I,I>=30&&console.log("WARning, large NUM LUT BITS IS "+I);var j=[],k,U,F,H,q,J;for(b=m;b<A;b++)if(C=b-(b<g?0:g),S=x[C].first,S>0)if(k=[S,C],S<=O)for(U=x[C].second<<O-S,F=1<<O-S,E=0;E<F;E++)j[U|E]=k;else for(U=x[C].second,J=N,H=S-1;H>=0;H--)q=U>>>H&1,q?(J.right||(J.right=new a),J=J.right):(J.left||(J.left=new a),J=J.left),H===0&&!J.val&&(J.val=k[1]);return{decodeLut:j,numBitsLUTQick:O,numBitsLUT:I,tree:N,stuffedData:L,srcPtr:v,bitPos:_}},readHuffman:function(c,u,f){var d=u.headerInfo,p=d.numDims,g=u.headerInfo.height,m=u.headerInfo.width,A=m*g,y=this.readHuffmanTree(c,u),x=y.decodeLut,b=y.tree,C=y.stuffedData,E=y.srcPtr,S=y.bitPos,w=y.numBitsLUTQick,P=y.numBitsLUT,R=u.headerInfo.imageType===0?128:0,B,L,_,T=u.pixels.resultMask,v,I,O,N,j,k,U,F=0;S>0&&(E++,S=0);var H=C[E],q=u.encodeMode===1,J=new f(A*p),W=J,Z;for(Z=0;Z<d.numDims;Z++){if(p>1&&(W=new f(J.buffer,A*Z,A),F=0),u.headerInfo.numValidPixel===m*g)for(k=0,N=0;N<g;N++)for(j=0;j<m;j++,k++){if(L=0,v=H<<S>>>32-w,I=v,32-S<w&&(v|=C[E+1]>>>64-S-w,I=v),x[I])L=x[I][1],S+=x[I][0];else for(v=H<<S>>>32-P,I=v,32-S<P&&(v|=C[E+1]>>>64-S-P,I=v),B=b,U=0;U<P;U++)if(O=v>>>P-U-1&1,B=O?B.right:B.left,!(B.left||B.right)){L=B.val,S=S+U+1;break}S>=32&&(S-=32,E++,H=C[E]),_=L-R,q?(j>0?_+=F:N>0?_+=W[k-m]:_+=F,_&=255,W[k]=_,F=_):W[k]=_}else for(k=0,N=0;N<g;N++)for(j=0;j<m;j++,k++)if(T[k]){if(L=0,v=H<<S>>>32-w,I=v,32-S<w&&(v|=C[E+1]>>>64-S-w,I=v),x[I])L=x[I][1],S+=x[I][0];else for(v=H<<S>>>32-P,I=v,32-S<P&&(v|=C[E+1]>>>64-S-P,I=v),B=b,U=0;U<P;U++)if(O=v>>>P-U-1&1,B=O?B.right:B.left,!(B.left||B.right)){L=B.val,S=S+U+1;break}S>=32&&(S-=32,E++,H=C[E]),_=L-R,q?(j>0&&T[k-1]?_+=F:N>0&&T[k-m]?_+=W[k-m]:_+=F,_&=255,W[k]=_,F=_):W[k]=_}u.ptr=u.ptr+(E+1)*4+(S>0?4:0)}u.pixels.resultPixels=J},decodeBits:function(c,u,f,d,p){{var g=u.headerInfo,m=g.fileVersion,A=0,y=new DataView(c,u.ptr,5),x=y.getUint8(0);A++;var b=x>>6,C=b===0?4:3-b,E=(x&32)>0,S=x&31,w=0;if(C===1)w=y.getUint8(A),A++;else if(C===2)w=y.getUint16(A,!0),A+=2;else if(C===4)w=y.getUint32(A,!0),A+=4;else throw"Invalid valid pixel count type";var P=2*g.maxZError,R,B,L,_,T,v,I,O,N,j,k=g.numDims>1?g.maxValues[p]:g.zMax;if(E){for(u.counter.lut++,O=y.getUint8(A),N=S,A++,_=Math.ceil((O-1)*S/8),T=Math.ceil(_/4),B=new ArrayBuffer(T*4),L=new Uint8Array(B),u.ptr+=A,L.set(new Uint8Array(c,u.ptr,_)),I=new Uint32Array(B),u.ptr+=_,j=0;O-1>>>j;)j++;_=Math.ceil(w*j/8),T=Math.ceil(_/4),B=new ArrayBuffer(T*4),L=new Uint8Array(B),L.set(new Uint8Array(c,u.ptr,_)),R=new Uint32Array(B),u.ptr+=_,m>=3?v=o.unstuffLUT2(I,S,O-1,d,P,k):v=o.unstuffLUT(I,S,O-1,d,P,k),m>=3?o.unstuff2(R,f,j,w,v):o.unstuff(R,f,j,w,v)}else u.counter.bitstuffer++,j=S,u.ptr+=A,j>0&&(_=Math.ceil(w*j/8),T=Math.ceil(_/4),B=new ArrayBuffer(T*4),L=new Uint8Array(B),L.set(new Uint8Array(c,u.ptr,_)),R=new Uint32Array(B),u.ptr+=_,m>=3?d==null?o.originalUnstuff2(R,f,j,w):o.unstuff2(R,f,j,w,!1,d,P,k):d==null?o.originalUnstuff(R,f,j,w):o.unstuff(R,f,j,w,!1,d,P,k))}},readTiles:function(c,u,f){var d=u.headerInfo,p=d.width,g=d.height,m=d.microBlockSize,A=d.imageType,y=r.getDataTypeSize(A),x=Math.ceil(p/m),b=Math.ceil(g/m);u.pixels.numBlocksY=b,u.pixels.numBlocksX=x,u.pixels.ptr=0;var C=0,E=0,S=0,w=0,P=0,R=0,B=0,L=0,_=0,T=0,v=0,I=0,O=0,N=0,j=0,k=0,U,F,H,q,J,W,Z=new f(m*m),K=g%m||m,le=p%m||m,me,ae,be=d.numDims,ge,we=u.pixels.resultMask,Ee=u.pixels.resultPixels;for(S=0;S<b;S++)for(P=S!==b-1?m:K,w=0;w<x;w++)for(R=w!==x-1?m:le,v=S*p*m+w*m,I=p-R,ge=0;ge<be;ge++){if(be>1&&(Ee=new f(u.pixels.resultPixels.buffer,p*g*ge*y,p*g)),B=c.byteLength-u.ptr,U=new DataView(c,u.ptr,Math.min(10,B)),F={},k=0,L=U.getUint8(0),k++,_=L>>6&255,T=L>>2&15,T!==(w*m>>3&15))throw"integrity issue";if(W=L&3,W>3)throw u.ptr+=k,"Invalid block encoding ("+W+")";if(W===2){u.counter.constant++,u.ptr+=k;continue}else if(W===0){if(u.counter.uncompressed++,u.ptr+=k,O=P*R*y,N=c.byteLength-u.ptr,O=O<N?O:N,H=new ArrayBuffer(O%y===0?O:O+y-O%y),q=new Uint8Array(H),q.set(new Uint8Array(c,u.ptr,O)),J=new f(H),j=0,we)for(C=0;C<P;C++){for(E=0;E<R;E++)we[v]&&(Ee[v]=J[j++]),v++;v+=I}else for(C=0;C<P;C++){for(E=0;E<R;E++)Ee[v++]=J[j++];v+=I}u.ptr+=j*y}else if(me=r.getDataTypeUsed(A,_),ae=r.getOnePixel(F,k,me,U),k+=r.getDataTypeSize(me),W===3)if(u.ptr+=k,u.counter.constantoffset++,we)for(C=0;C<P;C++){for(E=0;E<R;E++)we[v]&&(Ee[v]=ae),v++;v+=I}else for(C=0;C<P;C++){for(E=0;E<R;E++)Ee[v++]=ae;v+=I}else if(u.ptr+=k,r.decodeBits(c,u,Z,ae,ge),k=0,we)for(C=0;C<P;C++){for(E=0;E<R;E++)we[v]&&(Ee[v]=Z[k++]),v++;v+=I}else for(C=0;C<P;C++){for(E=0;E<R;E++)Ee[v++]=Z[k++];v+=I}}},formatFileInfo:function(c){return{fileIdentifierString:c.headerInfo.fileIdentifierString,fileVersion:c.headerInfo.fileVersion,imageType:c.headerInfo.imageType,height:c.headerInfo.height,width:c.headerInfo.width,numValidPixel:c.headerInfo.numValidPixel,microBlockSize:c.headerInfo.microBlockSize,blobSize:c.headerInfo.blobSize,maxZError:c.headerInfo.maxZError,pixelType:r.getPixelType(c.headerInfo.imageType),eofOffset:c.eofOffset,mask:c.mask?{numBytes:c.mask.numBytes}:null,pixels:{numBlocksX:c.pixels.numBlocksX,numBlocksY:c.pixels.numBlocksY,maxValue:c.headerInfo.zMax,minValue:c.headerInfo.zMin,noDataValue:c.noDataValue}}},constructConstantSurface:function(c){var u=c.headerInfo.zMax,f=c.headerInfo.numDims,d=c.headerInfo.height*c.headerInfo.width,p=d*f,g=0,m=0,A=0,y=c.pixels.resultMask;if(y)if(f>1)for(g=0;g<f;g++)for(A=g*d,m=0;m<d;m++)y[m]&&(c.pixels.resultPixels[A+m]=u);else for(m=0;m<d;m++)y[m]&&(c.pixels.resultPixels[m]=u);else if(c.pixels.resultPixels.fill)c.pixels.resultPixels.fill(u);else for(m=0;m<p;m++)c.pixels.resultPixels[m]=u},getDataTypeArray:function(c){var u;switch(c){case 0:u=Int8Array;break;case 1:u=Uint8Array;break;case 2:u=Int16Array;break;case 3:u=Uint16Array;break;case 4:u=Int32Array;break;case 5:u=Uint32Array;break;case 6:u=Float32Array;break;case 7:u=Float64Array;break;default:u=Float32Array}return u},getPixelType:function(c){var u;switch(c){case 0:u="S8";break;case 1:u="U8";break;case 2:u="S16";break;case 3:u="U16";break;case 4:u="S32";break;case 5:u="U32";break;case 6:u="F32";break;case 7:u="F64";break;default:u="F32"}return u},isValidPixelValue:function(c,u){if(u==null)return!1;var f;switch(c){case 0:f=u>=-128&&u<=127;break;case 1:f=u>=0&&u<=255;break;case 2:f=u>=-32768&&u<=32767;break;case 3:f=u>=0&&u<=65536;break;case 4:f=u>=-2147483648&&u<=2147483647;break;case 5:f=u>=0&&u<=4294967296;break;case 6:f=u>=-34027999387901484e22&&u<=34027999387901484e22;break;case 7:f=u>=5e-324&&u<=17976931348623157e292;break;default:f=!1}return f},getDataTypeSize:function(c){var u=0;switch(c){case 0:case 1:u=1;break;case 2:case 3:u=2;break;case 4:case 5:case 6:u=4;break;case 7:u=8;break;default:u=c}return u},getDataTypeUsed:function(c,u){var f=c;switch(c){case 2:case 4:f=c-u;break;case 3:case 5:f=c-2*u;break;case 6:u===0?f=c:u===1?f=2:f=1;break;case 7:u===0?f=c:f=c-2*u+1;break;default:f=c;break}return f},getOnePixel:function(c,u,f,d){var p=0;switch(f){case 0:p=d.getInt8(u);break;case 1:p=d.getUint8(u);break;case 2:p=d.getInt16(u,!0);break;case 3:p=d.getUint16(u,!0);break;case 4:p=d.getInt32(u,!0);break;case 5:p=d.getUInt32(u,!0);break;case 6:p=d.getFloat32(u,!0);break;case 7:p=d.getFloat64(u,!0);break;default:throw"the decoder does not understand this pixel type"}return p}},a=function(c,u,f){this.val=c,this.left=u,this.right=f},s={decode:function(c,u){u=u||{};var f=u.noDataValue,d=0,p={};if(p.ptr=u.inputOffset||0,p.pixels={},!!r.readHeaderInfo(c,p)){var g=p.headerInfo,m=g.fileVersion,A=r.getDataTypeArray(g.imageType);r.readMask(c,p),g.numValidPixel!==g.width*g.height&&!p.pixels.resultMask&&(p.pixels.resultMask=u.maskData);var y=g.width*g.height;if(p.pixels.resultPixels=new A(y*g.numDims),p.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0},g.numValidPixel!==0)if(g.zMax===g.zMin)r.constructConstantSurface(p);else if(m>=4&&r.checkMinMaxRanges(c,p))r.constructConstantSurface(p);else{var x=new DataView(c,p.ptr,2),b=x.getUint8(0);if(p.ptr++,b)r.readDataOneSweep(c,p,A);else if(m>1&&g.imageType<=1&&Math.abs(g.maxZError-.5)<1e-5){var C=x.getUint8(1);if(p.ptr++,p.encodeMode=C,C>2||m<4&&C>1)throw"Invalid Huffman flag "+C;C?r.readHuffman(c,p,A):r.readTiles(c,p,A)}else r.readTiles(c,p,A)}p.eofOffset=p.ptr;var E;u.inputOffset?(E=p.headerInfo.blobSize+u.inputOffset-p.ptr,Math.abs(E)>=1&&(p.eofOffset=u.inputOffset+p.headerInfo.blobSize)):(E=p.headerInfo.blobSize-p.ptr,Math.abs(E)>=1&&(p.eofOffset=p.headerInfo.blobSize));var S={width:g.width,height:g.height,pixelData:p.pixels.resultPixels,minValue:g.zMin,maxValue:g.zMax,validPixelCount:g.numValidPixel,dimCount:g.numDims,dimStats:{minValues:g.minValues,maxValues:g.maxValues},maskData:p.pixels.resultMask};if(p.pixels.resultMask&&r.isValidPixelValue(g.imageType,f)){var w=p.pixels.resultMask;for(d=0;d<y;d++)w[d]||(S.pixelData[d]=f);S.noDataValue=f}return p.noDataValue=f,u.returnFileInfo&&(S.fileInfo=r.formatFileInfo(p)),S}},getBandCount:function(c){var u=0,f=0,d={};for(d.ptr=0,d.pixels={};f<c.byteLength-58;)r.readHeaderInfo(c,d),f+=d.headerInfo.blobSize,u++,d.ptr=f;return u}};return s})(),n=(function(){var o=new ArrayBuffer(4),r=new Uint8Array(o),a=new Uint32Array(o);return a[0]=1,r[0]===1})(),i={decode:function(o,r){if(!n)throw"Big endian system is not supported.";r=r||{};var a=r.inputOffset||0,s=new Uint8Array(o,a,10),c=String.fromCharCode.apply(null,s),u,f;if(c.trim()==="CntZImage")u=e,f=1;else if(c.substring(0,5)==="Lerc2")u=t,f=2;else throw"Unexpected file identifier string: "+c;for(var d=0,p=o.byteLength-10,g,m=[],A,y,x={width:0,height:0,pixels:[],pixelType:r.pixelType,mask:null,statistics:[]};a<p;){var b=u.decode(o,{inputOffset:a,encodedMaskData:g,maskData:y,returnMask:d===0,returnEncodedMask:d===0,returnFileInfo:!0,pixelType:r.pixelType||null,noDataValue:r.noDataValue||null});a=b.fileInfo.eofOffset,d===0&&(g=b.encodedMaskData,y=b.maskData,x.width=b.width,x.height=b.height,x.dimCount=b.dimCount||1,x.pixelType=b.pixelType||b.fileInfo.pixelType,x.mask=b.maskData),f>1&&b.fileInfo.mask&&b.fileInfo.mask.numBytes>0&&m.push(b.maskData),d++,x.pixels.push(b.pixelData),x.statistics.push({minValue:b.minValue,maxValue:b.maxValue,noDataValue:b.noDataValue,dimStats:b.dimStats})}var C,E,S;if(f>1&&m.length>1){for(S=x.width*x.height,x.bandMasks=m,y=new Uint8Array(S),y.set(m[0]),C=1;C<m.length;C++)for(A=m[C],E=0;E<S;E++)y[E]=y[E]&A[E];x.maskData=y}return x}};typeof define=="function"&&define.amd?define([],function(){return i}):typeof Z5<"u"&&Z5.exports?Z5.exports=i:this.Lerc=i})()});var uMe=zi((v4,Cre)=>{/*! NoSleep.min.js v0.12.0 - git.io/vfn01 - Rich Tibbett - MIT license */(function(e,t){typeof v4=="object"&&typeof Cre=="object"?Cre.exports=t():typeof define=="function"&&define.amd?define([],t):typeof v4=="object"?v4.NoSleep=t():e.NoSleep=t()})(v4,(function(){return(function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(i,o,r){n.o(i,o)||Object.defineProperty(i,o,{enumerable:!0,get:r})},n.r=function(i){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},n.t=function(i,o){if(1&o&&(i=n(i)),8&o||4&o&&typeof i=="object"&&i&&i.__esModule)return i;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:i}),2&o&&typeof i!="string")for(var a in i)n.d(r,a,function(s){return i[s]}.bind(null,a));return r},n.n=function(i){var o=i&&i.__esModule?function(){return i.default}:function(){return i};return n.d(o,"a",o),o},n.o=function(i,o){return Object.prototype.hasOwnProperty.call(i,o)},n.p="",n(n.s=0)})([function(e,t,n){"use strict";var i=(function(){function f(d,p){for(var g=0;g<p.length;g++){var m=p[g];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(d,m.key,m)}}return function(d,p,g){return p&&f(d.prototype,p),g&&f(d,g),d}})(),o=n(1),r=o.webm,a=o.mp4,s=function(){return typeof navigator<"u"&&parseFloat((""+(/CPU.*OS ([0-9_]{3,4})[0-9_]{0,1}|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))<10&&!window.MSStream},c=function(){return"wakeLock"in navigator},u=(function(){function f(){var d=this;if((function(g,m){if(!(g instanceof m))throw new TypeError("Cannot call a class as a function")})(this,f),this.enabled=!1,c()){this._wakeLock=null;var p=function(){d._wakeLock!==null&&document.visibilityState==="visible"&&d.enable()};document.addEventListener("visibilitychange",p),document.addEventListener("fullscreenchange",p)}else s()?this.noSleepTimer=null:(this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("title","No Sleep"),this.noSleepVideo.setAttribute("playsinline",""),this._addSourceToVideo(this.noSleepVideo,"webm",r),this._addSourceToVideo(this.noSleepVideo,"mp4",a),this.noSleepVideo.addEventListener("loadedmetadata",(function(){d.noSleepVideo.duration<=1?d.noSleepVideo.setAttribute("loop",""):d.noSleepVideo.addEventListener("timeupdate",(function(){d.noSleepVideo.currentTime>.5&&(d.noSleepVideo.currentTime=Math.random())}))})))}return i(f,[{key:"_addSourceToVideo",value:function(d,p,g){var m=document.createElement("source");m.src=g,m.type="video/"+p,d.appendChild(m)}},{key:"enable",value:function(){var d=this;return c()?navigator.wakeLock.request("screen").then((function(p){d._wakeLock=p,d.enabled=!0,console.log("Wake Lock active."),d._wakeLock.addEventListener("release",(function(){console.log("Wake Lock released.")}))})).catch((function(p){throw d.enabled=!1,console.error(p.name+", "+p.message),p})):s()?(this.disable(),console.warn(`
- NoSleep enabled for older iOS devices. This can interrupt
- active or long-running network requests from completing successfully.
- See https://github.com/richtr/NoSleep.js/issues/15 for more details.
- `),this.noSleepTimer=window.setInterval((function(){document.hidden||(window.location.href=window.location.href.split("#")[0],window.setTimeout(window.stop,0))}),15e3),this.enabled=!0,Promise.resolve()):this.noSleepVideo.play().then((function(p){return d.enabled=!0,p})).catch((function(p){throw d.enabled=!1,p}))}},{key:"disable",value:function(){c()?(this._wakeLock&&this._wakeLock.release(),this._wakeLock=null):s()?this.noSleepTimer&&(console.warn(`
- NoSleep now disabled for older iOS devices.
- `),window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):this.noSleepVideo.pause(),this.enabled=!1}},{key:"isEnabled",get:function(){return this.enabled}}]),f})();e.exports=u},function(e,t,n){"use strict";e.exports={webm:"data:video/webm;base64,GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChHdlYm1Ch4EEQoWBAhhTgGcBAAAAAAAVkhFNm3RALE27i1OrhBVJqWZTrIHfTbuMU6uEFlSua1OsggEwTbuMU6uEHFO7a1OsghV17AEAAAAAAACkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmAQAAAAAAAEUq17GDD0JATYCNTGF2ZjU1LjMzLjEwMFdBjUxhdmY1NS4zMy4xMDBzpJBlrrXf3DCDVB8KcgbMpcr+RImIQJBgAAAAAAAWVK5rAQAAAAAAD++uAQAAAAAAADLXgQFzxYEBnIEAIrWcg3VuZIaFVl9WUDiDgQEj44OEAmJaAOABAAAAAAAABrCBsLqBkK4BAAAAAAAPq9eBAnPFgQKcgQAitZyDdW5khohBX1ZPUkJJU4OBAuEBAAAAAAAAEZ+BArWIQOdwAAAAAABiZIEgY6JPbwIeVgF2b3JiaXMAAAAAAoC7AAAAAAAAgLUBAAAAAAC4AQN2b3JiaXMtAAAAWGlwaC5PcmcgbGliVm9yYmlzIEkgMjAxMDExMDEgKFNjaGF1ZmVudWdnZXQpAQAAABUAAABlbmNvZGVyPUxhdmM1NS41Mi4xMDIBBXZvcmJpcyVCQ1YBAEAAACRzGCpGpXMWhBAaQlAZ4xxCzmvsGUJMEYIcMkxbyyVzkCGkoEKIWyiB0JBVAABAAACHQXgUhIpBCCGEJT1YkoMnPQghhIg5eBSEaUEIIYQQQgghhBBCCCGERTlokoMnQQgdhOMwOAyD5Tj4HIRFOVgQgydB6CCED0K4moOsOQghhCQ1SFCDBjnoHITCLCiKgsQwuBaEBDUojILkMMjUgwtCiJqDSTX4GoRnQXgWhGlBCCGEJEFIkIMGQcgYhEZBWJKDBjm4FITLQagahCo5CB+EIDRkFQCQAACgoiiKoigKEBqyCgDIAAAQQFEUx3EcyZEcybEcCwgNWQUAAAEACAAAoEiKpEiO5EiSJFmSJVmSJVmS5omqLMuyLMuyLMsyEBqyCgBIAABQUQxFcRQHCA1ZBQBkAAAIoDiKpViKpWiK54iOCISGrAIAgAAABAAAEDRDUzxHlETPVFXXtm3btm3btm3btm3btm1blmUZCA1ZBQBAAAAQ0mlmqQaIMAMZBkJDVgEACAAAgBGKMMSA0JBVAABAAACAGEoOogmtOd+c46BZDppKsTkdnEi1eZKbirk555xzzsnmnDHOOeecopxZDJoJrTnnnMSgWQqaCa0555wnsXnQmiqtOeeccc7pYJwRxjnnnCateZCajbU555wFrWmOmkuxOeecSLl5UptLtTnnnHPOOeecc84555zqxekcnBPOOeecqL25lpvQxTnnnE/G6d6cEM4555xzzjnnnHPOOeecIDRkFQAABABAEIaNYdwpCNLnaCBGEWIaMulB9+gwCRqDnELq0ehopJQ6CCWVcVJKJwgNWQUAAAIAQAghhRRSSCGFFFJIIYUUYoghhhhyyimnoIJKKqmooowyyyyzzDLLLLPMOuyssw47DDHEEEMrrcRSU2011lhr7jnnmoO0VlprrbVSSimllFIKQkNWAQAgAAAEQgYZZJBRSCGFFGKIKaeccgoqqIDQkFUAACAAgAAAAABP8hzRER3RER3RER3RER3R8RzPESVREiVREi3TMjXTU0VVdWXXlnVZt31b2IVd933d933d+HVhWJZlWZZlWZZlWZZlWZZlWZYgNGQVAAACAAAghBBCSCGFFFJIKcYYc8w56CSUEAgNWQUAAAIACAAAAHAUR3EcyZEcSbIkS9IkzdIsT/M0TxM9URRF0zRV0RVdUTdtUTZl0zVdUzZdVVZtV5ZtW7Z125dl2/d93/d93/d93/d93/d9XQdCQ1YBABIAADqSIymSIimS4ziOJElAaMgqAEAGAEAAAIriKI7jOJIkSZIlaZJneZaomZrpmZ4qqkBoyCoAABAAQAAAAAAAAIqmeIqpeIqoeI7oiJJomZaoqZoryqbsuq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq4LhIasAgAkAAB0JEdyJEdSJEVSJEdygNCQVQCADACAAAAcwzEkRXIsy9I0T/M0TxM90RM901NFV3SB0JBVAAAgAIAAAAAAAAAMybAUy9EcTRIl1VItVVMt1VJF1VNVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVN0zRNEwgNWQkAkAEAkBBTLS3GmgmLJGLSaqugYwxS7KWxSCpntbfKMYUYtV4ah5RREHupJGOKQcwtpNApJq3WVEKFFKSYYyoVUg5SIDRkhQAQmgHgcBxAsixAsiwAAAAAAAAAkDQN0DwPsDQPAAAAAAAAACRNAyxPAzTPAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABA0jRA8zxA8zwAAAAAAAAA0DwP8DwR8EQRAAAAAAAAACzPAzTRAzxRBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABA0jRA8zxA8zwAAAAAAAAAsDwP8EQR0DwRAAAAAAAAACzPAzxRBDzRAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEOAAABBgIRQasiIAiBMAcEgSJAmSBM0DSJYFTYOmwTQBkmVB06BpME0AAAAAAAAAAAAAJE2DpkHTIIoASdOgadA0iCIAAAAAAAAAAAAAkqZB06BpEEWApGnQNGgaRBEAAAAAAAAAAAAAzzQhihBFmCbAM02IIkQRpgkAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAGHAAAAgwoQwUGrIiAIgTAHA4imUBAIDjOJYFAACO41gWAABYliWKAABgWZooAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAYcAAACDChDBQashIAiAIAcCiKZQHHsSzgOJYFJMmyAJYF0DyApgFEEQAIAAAocAAACLBBU2JxgEJDVgIAUQAABsWxLE0TRZKkaZoniiRJ0zxPFGma53meacLzPM80IYqiaJoQRVE0TZimaaoqME1VFQAAUOAAABBgg6bE4gCFhqwEAEICAByKYlma5nmeJ4qmqZokSdM8TxRF0TRNU1VJkqZ5niiKommapqqyLE3zPFEURdNUVVWFpnmeKIqiaaqq6sLzPE8URdE0VdV14XmeJ4qiaJqq6roQRVE0TdNUTVV1XSCKpmmaqqqqrgtETxRNU1Vd13WB54miaaqqq7ouEE3TVFVVdV1ZBpimaaqq68oyQFVV1XVdV5YBqqqqruu6sgxQVdd1XVmWZQCu67qyLMsCAAAOHAAAAoygk4wqi7DRhAsPQKEhKwKAKAAAwBimFFPKMCYhpBAaxiSEFEImJaXSUqogpFJSKRWEVEoqJaOUUmopVRBSKamUCkIqJZVSAADYgQMA2IGFUGjISgAgDwCAMEYpxhhzTiKkFGPOOScRUoox55yTSjHmnHPOSSkZc8w556SUzjnnnHNSSuacc845KaVzzjnnnJRSSuecc05KKSWEzkEnpZTSOeecEwAAVOAAABBgo8jmBCNBhYasBABSAQAMjmNZmuZ5omialiRpmud5niiapiZJmuZ5nieKqsnzPE8URdE0VZXneZ4oiqJpqirXFUXTNE1VVV2yLIqmaZqq6rowTdNUVdd1XZimaaqq67oubFtVVdV1ZRm2raqq6rqyDFzXdWXZloEsu67s2rIAAPAEBwCgAhtWRzgpGgssNGQlAJABAEAYg5BCCCFlEEIKIYSUUggJAAAYcAAACDChDBQashIASAUAAIyx1lprrbXWQGettdZaa62AzFprrbXWWmuttdZaa6211lJrrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmstpZRSSimllFJKKaWUUkoppZRSSgUA+lU4APg/2LA6wknRWGChISsBgHAAAMAYpRhzDEIppVQIMeacdFRai7FCiDHnJKTUWmzFc85BKCGV1mIsnnMOQikpxVZjUSmEUlJKLbZYi0qho5JSSq3VWIwxqaTWWoutxmKMSSm01FqLMRYjbE2ptdhqq7EYY2sqLbQYY4zFCF9kbC2m2moNxggjWywt1VprMMYY3VuLpbaaizE++NpSLDHWXAAAd4MDAESCjTOsJJ0VjgYXGrISAAgJACAQUooxxhhzzjnnpFKMOeaccw5CCKFUijHGnHMOQgghlIwx5pxzEEIIIYRSSsaccxBCCCGEkFLqnHMQQgghhBBKKZ1zDkIIIYQQQimlgxBCCCGEEEoopaQUQgghhBBCCKmklEIIIYRSQighlZRSCCGEEEIpJaSUUgohhFJCCKGElFJKKYUQQgillJJSSimlEkoJJYQSUikppRRKCCGUUkpKKaVUSgmhhBJKKSWllFJKIYQQSikFAAAcOAAABBhBJxlVFmGjCRcegEJDVgIAZAAAkKKUUiktRYIipRikGEtGFXNQWoqocgxSzalSziDmJJaIMYSUk1Qy5hRCDELqHHVMKQYtlRhCxhik2HJLoXMOAAAAQQCAgJAAAAMEBTMAwOAA4XMQdAIERxsAgCBEZohEw0JweFAJEBFTAUBigkIuAFRYXKRdXECXAS7o4q4DIQQhCEEsDqCABByccMMTb3jCDU7QKSp1IAAAAAAADADwAACQXAAREdHMYWRobHB0eHyAhIiMkAgAAAAAABcAfAAAJCVAREQ0cxgZGhscHR4fICEiIyQBAIAAAgAAAAAggAAEBAQAAAAAAAIAAAAEBB9DtnUBAAAAAAAEPueBAKOFggAAgACjzoEAA4BwBwCdASqwAJAAAEcIhYWIhYSIAgIABhwJ7kPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99YAD+/6tQgKOFggADgAqjhYIAD4AOo4WCACSADqOZgQArADECAAEQEAAYABhYL/QACIBDmAYAAKOFggA6gA6jhYIAT4AOo5mBAFMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAGSADqOFggB6gA6jmYEAewAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIAj4AOo5mBAKMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAKSADqOFggC6gA6jmYEAywAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIAz4AOo4WCAOSADqOZgQDzADECAAEQEAAYABhYL/QACIBDmAYAAKOFggD6gA6jhYIBD4AOo5iBARsAEQIAARAQFGAAYWC/0AAiAQ5gGACjhYIBJIAOo4WCATqADqOZgQFDADECAAEQEAAYABhYL/QACIBDmAYAAKOFggFPgA6jhYIBZIAOo5mBAWsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAXqADqOFggGPgA6jmYEBkwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIBpIAOo4WCAbqADqOZgQG7ADECAAEQEAAYABhYL/QACIBDmAYAAKOFggHPgA6jmYEB4wAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIB5IAOo4WCAfqADqOZgQILADECAAEQEAAYABhYL/QACIBDmAYAAKOFggIPgA6jhYICJIAOo5mBAjMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAjqADqOFggJPgA6jmYECWwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYICZIAOo4WCAnqADqOZgQKDADECAAEQEAAYABhYL/QACIBDmAYAAKOFggKPgA6jhYICpIAOo5mBAqsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCArqADqOFggLPgA6jmIEC0wARAgABEBAUYABhYL/QACIBDmAYAKOFggLkgA6jhYIC+oAOo5mBAvsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAw+ADqOZgQMjADECAAEQEAAYABhYL/QACIBDmAYAAKOFggMkgA6jhYIDOoAOo5mBA0sAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCA0+ADqOFggNkgA6jmYEDcwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIDeoAOo4WCA4+ADqOZgQObADECAAEQEAAYABhYL/QACIBDmAYAAKOFggOkgA6jhYIDuoAOo5mBA8MAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCA8+ADqOFggPkgA6jhYID+oAOo4WCBA+ADhxTu2sBAAAAAAAAEbuPs4EDt4r3gQHxghEr8IEK",mp4:"data:video/mp4;base64,AAAAHGZ0eXBNNFYgAAACAGlzb21pc28yYXZjMQAAAAhmcmVlAAAGF21kYXTeBAAAbGliZmFhYyAxLjI4AABCAJMgBDIARwAAArEGBf//rdxF6b3m2Ui3lizYINkj7u94MjY0IC0gY29yZSAxNDIgcjIgOTU2YzhkOCAtIEguMjY0L01QRUctNCBBVkMgY29kZWMgLSBDb3B5bGVmdCAyMDAzLTIwMTQgLSBodHRwOi8vd3d3LnZpZGVvbGFuLm9yZy94MjY0Lmh0bWwgLSBvcHRpb25zOiBjYWJhYz0wIHJlZj0zIGRlYmxvY2s9MTowOjAgYW5hbHlzZT0weDE6MHgxMTEgbWU9aGV4IHN1Ym1lPTcgcHN5PTEgcHN5X3JkPTEuMDA6MC4wMCBtaXhlZF9yZWY9MSBtZV9yYW5nZT0xNiBjaHJvbWFfbWU9MSB0cmVsbGlzPTEgOHg4ZGN0PTAgY3FtPTAgZGVhZHpvbmU9MjEsMTEgZmFzdF9wc2tpcD0xIGNocm9tYV9xcF9vZmZzZXQ9LTIgdGhyZWFkcz02IGxvb2thaGVhZF90aHJlYWRzPTEgc2xpY2VkX3RocmVhZHM9MCBucj0wIGRlY2ltYXRlPTEgaW50ZXJsYWNlZD0wIGJsdXJheV9jb21wYXQ9MCBjb25zdHJhaW5lZF9pbnRyYT0wIGJmcmFtZXM9MCB3ZWlnaHRwPTAga2V5aW50PTI1MCBrZXlpbnRfbWluPTI1IHNjZW5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByY19sb29rYWhlYWQ9NDAgcmM9Y3JmIG1idHJlZT0xIGNyZj0yMy4wIHFjb21wPTAuNjAgcXBtaW49MCBxcG1heD02OSBxcHN0ZXA9NCB2YnZfbWF4cmF0ZT03NjggdmJ2X2J1ZnNpemU9MzAwMCBjcmZfbWF4PTAuMCBuYWxfaHJkPW5vbmUgZmlsbGVyPTAgaXBfcmF0aW89MS40MCBhcT0xOjEuMDAAgAAAAFZliIQL8mKAAKvMnJycnJycnJycnXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXiEASZACGQAjgCEASZACGQAjgAAAAAdBmjgX4GSAIQBJkAIZACOAAAAAB0GaVAX4GSAhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGagC/AySEASZACGQAjgAAAAAZBmqAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZrAL8DJIQBJkAIZACOAAAAABkGa4C/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmwAvwMkhAEmQAhkAI4AAAAAGQZsgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGbQC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm2AvwMkhAEmQAhkAI4AAAAAGQZuAL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGboC/AySEASZACGQAjgAAAAAZBm8AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZvgL8DJIQBJkAIZACOAAAAABkGaAC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmiAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpAL8DJIQBJkAIZACOAAAAABkGaYC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmoAvwMkhAEmQAhkAI4AAAAAGQZqgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGawC/AySEASZACGQAjgAAAAAZBmuAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZsAL8DJIQBJkAIZACOAAAAABkGbIC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm0AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZtgL8DJIQBJkAIZACOAAAAABkGbgCvAySEASZACGQAjgCEASZACGQAjgAAAAAZBm6AnwMkhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AAAAhubW9vdgAAAGxtdmhkAAAAAAAAAAAAAAAAAAAD6AAABDcAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAzB0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAABAAAAAAAAA+kAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAALAAAACQAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAPpAAAAAAABAAAAAAKobWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAB1MAAAdU5VxAAAAAAALWhkbHIAAAAAAAAAAHZpZGUAAAAAAAAAAAAAAABWaWRlb0hhbmRsZXIAAAACU21pbmYAAAAUdm1oZAAAAAEAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAhNzdGJsAAAAr3N0c2QAAAAAAAAAAQAAAJ9hdmMxAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAALAAkABIAAAASAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGP//AAAALWF2Y0MBQsAN/+EAFWdCwA3ZAsTsBEAAAPpAADqYA8UKkgEABWjLg8sgAAAAHHV1aWRraEDyXyRPxbo5pRvPAyPzAAAAAAAAABhzdHRzAAAAAAAAAAEAAAAeAAAD6QAAABRzdHNzAAAAAAAAAAEAAAABAAAAHHN0c2MAAAAAAAAAAQAAAAEAAAABAAAAAQAAAIxzdHN6AAAAAAAAAAAAAAAeAAADDwAAAAsAAAALAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAAiHN0Y28AAAAAAAAAHgAAAEYAAANnAAADewAAA5gAAAO0AAADxwAAA+MAAAP2AAAEEgAABCUAAARBAAAEXQAABHAAAASMAAAEnwAABLsAAATOAAAE6gAABQYAAAUZAAAFNQAABUgAAAVkAAAFdwAABZMAAAWmAAAFwgAABd4AAAXxAAAGDQAABGh0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAACAAAAAAAABDcAAAAAAAAAAAAAAAEBAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAQkAAADcAABAAAAAAPgbWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAC7gAAAykBVxAAAAAAALWhkbHIAAAAAAAAAAHNvdW4AAAAAAAAAAAAAAABTb3VuZEhhbmRsZXIAAAADi21pbmYAAAAQc21oZAAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAADT3N0YmwAAABnc3RzZAAAAAAAAAABAAAAV21wNGEAAAAAAAAAAQAAAAAAAAAAAAIAEAAAAAC7gAAAAAAAM2VzZHMAAAAAA4CAgCIAAgAEgICAFEAVBbjYAAu4AAAADcoFgICAAhGQBoCAgAECAAAAIHN0dHMAAAAAAAAAAgAAADIAAAQAAAAAAQAAAkAAAAFUc3RzYwAAAAAAAAAbAAAAAQAAAAEAAAABAAAAAgAAAAIAAAABAAAAAwAAAAEAAAABAAAABAAAAAIAAAABAAAABgAAAAEAAAABAAAABwAAAAIAAAABAAAACAAAAAEAAAABAAAACQAAAAIAAAABAAAACgAAAAEAAAABAAAACwAAAAIAAAABAAAADQAAAAEAAAABAAAADgAAAAIAAAABAAAADwAAAAEAAAABAAAAEAAAAAIAAAABAAAAEQAAAAEAAAABAAAAEgAAAAIAAAABAAAAFAAAAAEAAAABAAAAFQAAAAIAAAABAAAAFgAAAAEAAAABAAAAFwAAAAIAAAABAAAAGAAAAAEAAAABAAAAGQAAAAIAAAABAAAAGgAAAAEAAAABAAAAGwAAAAIAAAABAAAAHQAAAAEAAAABAAAAHgAAAAIAAAABAAAAHwAAAAQAAAABAAAA4HN0c3oAAAAAAAAAAAAAADMAAAAaAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAACMc3RjbwAAAAAAAAAfAAAALAAAA1UAAANyAAADhgAAA6IAAAO+AAAD0QAAA+0AAAQAAAAEHAAABC8AAARLAAAEZwAABHoAAASWAAAEqQAABMUAAATYAAAE9AAABRAAAAUjAAAFPwAABVIAAAVuAAAFgQAABZ0AAAWwAAAFzAAABegAAAX7AAAGFwAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTUuMzMuMTAw"}}])}))});var Azt={};Mre(Azt,{AlphaMode:()=>Cp,AlphaPipelineStage:()=>LB,AnchorPointDirect:()=>zM,AnchorPointIndirect:()=>UM,Animation:()=>WV,AnimationViewModel:()=>qV,Appearance:()=>yo,ApproximateTerrainHeights:()=>vi,ArcGISTiledElevationTerrainProvider:()=>poe,ArcGisBaseMapType:()=>im,ArcGisMapServerImageryProvider:()=>Sg,ArcGisMapService:()=>Cf,ArcType:()=>on,ArticulationStageType:()=>cl,AssociativeArray:()=>Lt,Atmosphere:()=>bb,AtmospherePipelineStage:()=>pB,AttributeCompression:()=>nn,AttributeType:()=>Ft,AutoExposure:()=>Iz,AutomaticUniforms:()=>D0,Axis:()=>Li,AxisAlignedBoundingBox:()=>gf,Azure2DImageryProvider:()=>_L,B3dmLoader:()=>eB,B3dmParser:()=>$M,BaseLayerPicker:()=>XV,BaseLayerPickerViewModel:()=>YV,BatchTable:()=>Lx,BatchTableHierarchy:()=>ob,BatchTexture:()=>Yl,BatchTexturePipelineStage:()=>NB,Billboard:()=>So,BillboardCollection:()=>Df,BillboardGraphics:()=>Jc,BillboardLoadState:()=>ka,BillboardTexture:()=>Pg,BillboardVisualizer:()=>IR,BingMapsGeocoderService:()=>_oe,BingMapsImageryProvider:()=>sL,BingMapsStyle:()=>qv,BlendEquation:()=>Sc,BlendFunction:()=>Vo,BlendOption:()=>Di,BlendingState:()=>Jt,BoundingRectangle:()=>Je,BoundingSphere:()=>ce,BoundingSphereState:()=>bt,BoundingVolumeSemantics:()=>IA,BoxEmitter:()=>Qne,BoxGeometry:()=>Ec,BoxGeometryUpdater:()=>VO,BoxGraphics:()=>Gx,BoxOutlineGeometry:()=>Nh,BrdfLutGenerator:()=>S3,Buffer:()=>Ke,BufferLoader:()=>ub,BufferPoint:()=>Bc,BufferPointCollection:()=>ku,BufferPointMaterial:()=>mm,BufferPolygon:()=>za,BufferPolygonCollection:()=>zu,BufferPolygonMaterial:()=>pm,BufferPolyline:()=>rc,BufferPolylineCollection:()=>Uu,BufferPolylineMaterial:()=>gm,BufferPrimitive:()=>ia,BufferPrimitiveCollection:()=>Za,BufferPrimitiveMaterial:()=>tu,BufferUsage:()=>Oe,CPUStylingPipelineStage:()=>UB,CallbackPositionProperty:()=>jO,CallbackProperty:()=>jh,Camera:()=>bo,CameraEventAggregator:()=>Lz,CameraEventType:()=>Ji,CameraFlightPath:()=>I3,Cartesian2:()=>z,Cartesian3:()=>h,Cartesian4:()=>se,CartesianRectangle:()=>oS,Cartographic:()=>de,CartographicGeocoderService:()=>yoe,CatmullRomSpline:()=>xoe,Cesium3DContentGroup:()=>ib,Cesium3DTile:()=>Yd,Cesium3DTileBatchTable:()=>qh,Cesium3DTileColorBlendMode:()=>Iu,Cesium3DTileContent:()=>Jne,Cesium3DTileContentFactory:()=>iC,Cesium3DTileContentState:()=>er,Cesium3DTileContentType:()=>As,Cesium3DTileFeature:()=>Qa,Cesium3DTileFeatureTable:()=>Zh,Cesium3DTileOptimizationHint:()=>Gd,Cesium3DTileOptimizations:()=>CF,Cesium3DTilePass:()=>tr,Cesium3DTilePassState:()=>fh,Cesium3DTilePointFeature:()=>Rg,Cesium3DTileRefine:()=>ar,Cesium3DTileStyle:()=>Fg,Cesium3DTileStyleEngine:()=>IF,Cesium3DTileVectorFeature:()=>eC,Cesium3DTilesInspector:()=>e4,Cesium3DTilesInspectorViewModel:()=>ZV,Cesium3DTilesTerrainData:()=>MV,Cesium3DTilesTerrainGeometryProcessor:()=>LI,Cesium3DTilesTerrainProvider:()=>Soe,Cesium3DTilesVoxelProvider:()=>Zne,Cesium3DTileset:()=>xa,Cesium3DTilesetBaseTraversal:()=>BF,Cesium3DTilesetCache:()=>vF,Cesium3DTilesetGraphics:()=>Qx,Cesium3DTilesetHeatmap:()=>SF,Cesium3DTilesetMetadata:()=>hC,Cesium3DTilesetMostDetailedTraversal:()=>RF,Cesium3DTilesetSkipTraversal:()=>FF,Cesium3DTilesetStatistics:()=>_m,Cesium3DTilesetTraversal:()=>Us,Cesium3DTilesetVisualizer:()=>kF,CesiumInspector:()=>i4,CesiumInspectorViewModel:()=>n4,CesiumTerrainProvider:()=>KT,CesiumWidget:()=>HU,Check:()=>No,CheckerboardMaterialProperty:()=>SS,CircleEmitter:()=>ZU,CircleGeometry:()=>woe,CircleOutlineGeometry:()=>Ioe,ClassificationModelDrawCommand:()=>iN,ClassificationPipelineStage:()=>FB,ClassificationPrimitive:()=>zE,ClassificationType:()=>Wn,ClearCommand:()=>ai,ClippingPlane:()=>$a,ClippingPlaneCollection:()=>ma,ClippingPolygon:()=>Tv,ClippingPolygonCollection:()=>Qh,Clock:()=>Tm,ClockRange:()=>va,ClockStep:()=>Oo,ClockViewModel:()=>jV,CloudCollection:()=>oie,CloudType:()=>xI,Color:()=>V,ColorBlendMode:()=>sl,ColorGeometryInstanceAttribute:()=>Yt,ColorMaterialProperty:()=>Wt,Command:()=>cre,ComponentDatatype:()=>Y,Composite3DTileContent:()=>KO,CompositeEntityCollection:()=>l$,CompositeMaterialProperty:()=>IS,CompositePositionProperty:()=>cc,CompositeProperty:()=>hl,CompressedTextureBuffer:()=>pD,ComputeCommand:()=>wl,ComputeEngine:()=>mD,ConditionsExpression:()=>iF,ConeEmitter:()=>aie,ConstantPositionProperty:()=>zl,ConstantProperty:()=>ci,ConstantSpline:()=>oB,ContentMetadata:()=>hF,Context:()=>Px,ContextLimits:()=>Rt,CoplanarPolygonGeometry:()=>b2,CoplanarPolygonGeometryLibrary:()=>jg,CoplanarPolygonOutlineGeometry:()=>qd,CornerType:()=>Xi,CorrelationGroup:()=>VM,CorridorGeometry:()=>AC,CorridorGeometryLibrary:()=>no,CorridorGeometryUpdater:()=>YF,CorridorGraphics:()=>Wx,CorridorOutlineGeometry:()=>qF,Credit:()=>yt,CreditDisplay:()=>O3,CubeMap:()=>$r,CubeMapFace:()=>vD,CubeMapPanorama:()=>LT,CubicRealPolynomial:()=>Cx,CullFace:()=>Mi,CullingVolume:()=>Ka,CumulusCloud:()=>rd,CustomDataSource:()=>JF,CustomHeightmapTerrainProvider:()=>Doe,CustomShader:()=>A0,CustomShaderMode:()=>vg,CustomShaderPipelineStage:()=>YB,CustomShaderTranslucencyMode:()=>VA,CylinderGeometry:()=>ZF,CylinderGeometryLibrary:()=>yC,CylinderGeometryUpdater:()=>t2,CylinderGraphics:()=>qx,CylinderOutlineGeometry:()=>e2,CzmlDataSource:()=>f2,DataSource:()=>Ea,DataSourceClock:()=>Em,DataSourceCollection:()=>d2,DataSourceDisplay:()=>tk,DebugAppearance:()=>sie,DebugCameraPrimitive:()=>l0,DebugInspector:()=>Gz,DebugModelMatrixPrimitive:()=>tV,DefaultProxy:()=>Poe,DepthFunction:()=>tc,DepthPlane:()=>U3,DequantizationPipelineStage:()=>KB,DerivedCommand:()=>u0,DeveloperError:()=>_e,DeviceOrientationCameraController:()=>V3,DirectionalLight:()=>cie,DiscardEmptyTileImagePolicy:()=>Yv,DiscardMissingTileImagePolicy:()=>rL,DistanceDisplayCondition:()=>kt,DistanceDisplayConditionGeometryInstanceAttribute:()=>Hn,DoubleEndedPriorityQueue:()=>O_,DoublyLinkedList:()=>EF,DracoLoader:()=>cg,DrawCommand:()=>tt,DynamicAtmosphereLightingType:()=>mg,DynamicEnvironmentMapManager:()=>pg,DynamicGeometryBatch:()=>SC,DynamicGeometryUpdater:()=>xi,EarthOrientationParameters:()=>aD,EarthOrientationParametersSample:()=>Y_,EasingFunction:()=>wa,EdgeDetectionPipelineStage:()=>$B,EdgeDisplayMode:()=>Md,EdgeFramebuffer:()=>X3,EdgeVisibilityPipelineStage:()=>eL,EllipseGeometry:()=>cu,EllipseGeometryLibrary:()=>Hu,EllipseGeometryUpdater:()=>m2,EllipseGraphics:()=>Yx,EllipseOutlineGeometry:()=>Uf,Ellipsoid:()=>te,EllipsoidGeodesic:()=>Y0,EllipsoidGeometry:()=>js,EllipsoidGeometryUpdater:()=>g2,EllipsoidGraphics:()=>Xx,EllipsoidOutlineGeometry:()=>Of,EllipsoidPrimitive:()=>x3,EllipsoidRhumbLine:()=>wc,EllipsoidSurfaceAppearance:()=>lie,EllipsoidTangentPlane:()=>Ra,EllipsoidTerrainProvider:()=>a0,EllipsoidalOccluder:()=>bm,Empty3DTileContent:()=>Mp,EncodedCartesian3:()=>xn,Entity:()=>jo,EntityCluster:()=>Bf,EntityCollection:()=>Vs,EntityView:()=>ik,EquirectangularPanorama:()=>uie,Event:()=>ye,EventHelper:()=>Nr,Expression:()=>Sd,ExpressionNodeType:()=>St,ExtrapolationType:()=>Nf,FeatureDetection:()=>sn,FeatureIdPipelineStage:()=>UA,Fog:()=>j3,ForEach:()=>Fe,FrameRateMonitor:()=>aV,FrameState:()=>G3,Framebuffer:()=>fa,FramebufferManager:()=>yi,Frozen:()=>G,FrustumCommands:()=>K3,FrustumGeometry:()=>cT,FrustumOutlineGeometry:()=>L3,Fullscreen:()=>Xr,FullscreenButton:()=>r4,FullscreenButtonViewModel:()=>o4,GaussianSplat3DTileContent:()=>ey,GaussianSplatPrimitive:()=>dF,GaussianSplatRenderResources:()=>sF,GaussianSplatSorter:()=>tC,GaussianSplatTextureGenerator:()=>aF,GeoJsonDataSource:()=>Ty,GeoJsonLoader:()=>tB,GeoJsonPrimitive:()=>mie,GeocodeType:()=>ex,Geocoder:()=>s4,GeocoderService:()=>kI,GeocoderViewModel:()=>a4,GeographicProjection:()=>ji,GeographicTilingScheme:()=>Wi,Geometry:()=>At,Geometry3DTileContent:()=>JO,GeometryAttribute:()=>Me,GeometryAttributes:()=>pn,GeometryFactory:()=>Roe,GeometryInstance:()=>Ot,GeometryInstanceAttribute:()=>Zc,GeometryOffsetAttribute:()=>ln,GeometryPipeline:()=>kn,GeometryPipelineStage:()=>oL,GeometryType:()=>md,GeometryUpdater:()=>bi,GeometryUpdaterSet:()=>FC,GeometryVisualizer:()=>j2,GetFeatureInfoFormat:()=>om,Globe:()=>g3,GlobeDepth:()=>Q3,GlobeSurfaceShaderSet:()=>r3,GlobeSurfaceTile:()=>lh,GlobeSurfaceTileProvider:()=>s3,GlobeTranslucency:()=>c3,GlobeTranslucencyFramebuffer:()=>$3,GlobeTranslucencyState:()=>H3,GltfBufferViewLoader:()=>nv,GltfDracoLoader:()=>iv,GltfGpmLoader:()=>GM,GltfGpmLocal:()=>wv,GltfImageLoader:()=>ov,GltfIndexBufferLoader:()=>rv,GltfJsonLoader:()=>sv,GltfLoader:()=>bf,GltfLoaderUtil:()=>Ru,GltfMeshPrimitiveGpmLoader:()=>YM,GltfSpzLoader:()=>pM,GltfStructuralMetadataLoader:()=>FM,GltfTextureLoader:()=>fv,GltfVertexBufferLoader:()=>dv,Google2DImageryProvider:()=>gL,GoogleEarthEnterpriseImageryProvider:()=>bie,GoogleEarthEnterpriseMapsProvider:()=>uL,GoogleEarthEnterpriseMetadata:()=>M_,GoogleEarthEnterpriseTerrainData:()=>zI,GoogleEarthEnterpriseTerrainProvider:()=>Boe,GoogleEarthEnterpriseTileInformation:()=>lV,GoogleGeocoderService:()=>Noe,GoogleMaps:()=>ps,GoogleStreetViewCubeMapPanoramaProvider:()=>Cie,GpxDataSource:()=>uk,GregorianDate:()=>R0,GridImageryProvider:()=>Tie,GridMaterialProperty:()=>kS,GroundGeometryUpdater:()=>$n,GroundPolylineGeometry:()=>zx,GroundPolylinePrimitive:()=>Fh,GroundPrimitive:()=>Nl,GroupMetadata:()=>TS,HeadingPitchRange:()=>ih,HeadingPitchRoll:()=>Tc,Heap:()=>nD,HeightReference:()=>nt,HeightmapEncoding:()=>sh,HeightmapTerrainData:()=>kc,HeightmapTessellator:()=>qw,HermitePolynomialApproximation:()=>n2,HermiteSpline:()=>kA,HilbertOrder:()=>JE,HomeButton:()=>l4,HomeButtonViewModel:()=>c4,HorizontalOrigin:()=>Oi,I3SBuildingSceneLayerExplorer:()=>_re,I3SBuildingSceneLayerExplorerViewModel:()=>u4,I3SDataProvider:()=>$m,I3SDecoder:()=>uV,I3SFeature:()=>fV,I3SField:()=>dV,I3SGeometry:()=>CI,I3SLayer:()=>WT,I3SNode:()=>TI,I3SStatistics:()=>pV,I3SSublayer:()=>_V,I3SSymbology:()=>mV,I3dmLoader:()=>iB,I3dmParser:()=>nB,ITwinData:()=>wie,ITwinPlatform:()=>os,Iau2000Orientation:()=>A3,Iau2006XysData:()=>sD,Iau2006XysSample:()=>Ax,IauOrientationAxes:()=>y3,IauOrientationParameters:()=>_3,ImageBasedLighting:()=>nb,ImageBasedLightingPipelineStage:()=>_B,ImageMaterialProperty:()=>dA,Imagery:()=>nS,ImageryConfiguration:()=>hN,ImageryCoverage:()=>rS,ImageryFlags:()=>xL,ImageryInput:()=>CL,ImageryLayer:()=>ya,ImageryLayerCollection:()=>pC,ImageryLayerFeatureInfo:()=>nm,ImageryPipelineStage:()=>TL,ImageryProvider:()=>Tf,ImageryState:()=>Vn,Implicit3DTileContent:()=>_v,ImplicitAvailabilityBitstream:()=>ev,ImplicitMetadataView:()=>tv,ImplicitSubdivisionScheme:()=>La,ImplicitSubtree:()=>fg,ImplicitSubtreeCache:()=>$U,ImplicitSubtreeMetadata:()=>eM,ImplicitTileCoordinates:()=>Np,ImplicitTileset:()=>Lp,IndexDatatype:()=>Ue,InfoBox:()=>d4,InfoBoxViewModel:()=>f4,InspectorShared:()=>sf,InstanceAttributeSemantic:()=>Er,InstancingPipelineStage:()=>RB,InterpolationAlgorithm:()=>Foe,InterpolationType:()=>Jh,Intersect:()=>qt,IntersectionTests:()=>si,Intersections2D:()=>Jm,Interval:()=>Qr,InvertClassification:()=>aI,Ion:()=>Hh,IonGeocodeProviderType:()=>V_,IonGeocoderService:()=>ZT,IonImageryProvider:()=>Jl,IonImageryProviderFactory:()=>eS,IonResource:()=>ha,IonWorldImageryStyle:()=>Ig,Iso8601:()=>Qe,JobScheduler:()=>W3,JobType:()=>Pc,JsonMetadataTable:()=>gg,JulianDate:()=>Q,KTX2Transcoder:()=>gD,KeyboardEventModifier:()=>mr,KeyframeNode:()=>Bo,KmlCamera:()=>fk,KmlDataSource:()=>ZC,KmlLookAt:()=>Wk,KmlTour:()=>qk,KmlTourFlyTo:()=>Xk,KmlTourWait:()=>Kk,Label:()=>XA,LabelCollection:()=>Rp,LabelGraphics:()=>zh,LabelStyle:()=>sr,LabelVisualizer:()=>G2,LagrangePolynomialApproximation:()=>i2,LeapSecond:()=>ao,Light:()=>Iie,LightingModel:()=>Ip,LightingPipelineStage:()=>vL,LinearApproximation:()=>bC,LinearSpline:()=>FA,MVTDataProvider:()=>Lie,ManagedArray:()=>ql,MapMode2D:()=>hu,MapProjection:()=>Voe,MapboxImageryProvider:()=>fL,MapboxStyleImageryProvider:()=>Nie,MappedPositions:()=>bL,Material:()=>Hi,MaterialAppearance:()=>go,MaterialPipelineStage:()=>DL,MaterialProperty:()=>br,Math:()=>D,Matrix2:()=>Gi,Matrix3:()=>$,Matrix4:()=>M,Megatexture:()=>_U,MeshPrimitiveGpmLocal:()=>qM,MetadataClass:()=>Kh,MetadataClassProperty:()=>yp,MetadataComponentType:()=>Dt,MetadataEntity:()=>Un,MetadataEnum:()=>AM,MetadataEnumValue:()=>_M,MetadataPicking:()=>q3,MetadataPickingPipelineStage:()=>Sf,MetadataPipelineStage:()=>Bd,MetadataSchema:()=>Xl,MetadataSchemaLoader:()=>SA,MetadataSemantic:()=>Pd,MetadataTable:()=>wd,MetadataTableProperty:()=>nM,MetadataType:()=>dt,MipmapHint:()=>_d,Model:()=>wf,Model3DTileContent:()=>If,ModelAlphaOptions:()=>Mb,ModelAnimation:()=>cB,ModelAnimationChannel:()=>sB,ModelAnimationCollection:()=>lB,ModelAnimationLoop:()=>Ou,ModelAnimationState:()=>em,ModelArticulation:()=>yB,ModelArticulationStage:()=>AB,ModelClippingPlanesPipelineStage:()=>CB,ModelClippingPolygonsPipelineStage:()=>vB,ModelColorPipelineStage:()=>zA,ModelComponents:()=>_n,ModelDrawCommand:()=>rN,ModelDrawCommands:()=>cN,ModelFeature:()=>uB,ModelFeatureTable:()=>fB,ModelGraphics:()=>J0,ModelImagery:()=>mN,ModelImageryMapping:()=>Pb,ModelLightingOptions:()=>eN,ModelMatrixUpdateStage:()=>OB,ModelNode:()=>SB,ModelPrimitiveImagery:()=>Rb,ModelReader:()=>hs,ModelRenderResources:()=>YL,ModelRuntimeNode:()=>BB,ModelRuntimePrimitive:()=>WL,ModelSceneGraph:()=>lN,ModelSilhouettePipelineStage:()=>QL,ModelSkin:()=>qL,ModelSplitterPipelineStage:()=>JL,ModelStatistics:()=>uN,ModelType:()=>Br,ModelUtility:()=>ht,ModelVisualizer:()=>H2,Moon:()=>C3,MorphTargetsPipelineStage:()=>RL,MorphWeightSpline:()=>joe,MortonOrder:()=>iy,Multiple3DTileContent:()=>gF,MultisampleFramebuffer:()=>AR,NavigationHelpButton:()=>m4,NavigationHelpButtonViewModel:()=>h4,NearFarScalar:()=>zt,NeverTileDiscardPolicy:()=>kie,NodeRenderResources:()=>ZL,NodeStatisticsPipelineStage:()=>MB,NodeTransformationProperty:()=>Kx,OIT:()=>Z3,Occluder:()=>T3,OffsetGeometryInstanceAttribute:()=>po,OpenCageGeocoderService:()=>Hoe,OpenStreetMapImageryProvider:()=>N_,OrderedGroundPrimitiveCollection:()=>h2,OrientedBoundingBox:()=>Qt,OrthographicFrustum:()=>fn,OrthographicOffCenterFrustum:()=>da,Packable:()=>Woe,PackableForInterpolation:()=>qoe,Panorama:()=>zie,PanoramaProvider:()=>Uie,Particle:()=>II,ParticleBurst:()=>jie,ParticleEmitter:()=>Gie,ParticleSystem:()=>Hie,Pass:()=>Ie,PassState:()=>$c,PathGraphics:()=>Z0,PathVisualizer:()=>Y2,PeliasGeocoderService:()=>LV,PerInstanceColorAppearance:()=>dn,PerformanceDisplay:()=>C_,PerformanceWatchdog:()=>g4,PerformanceWatchdogViewModel:()=>p4,PerspectiveFrustum:()=>Vi,PerspectiveOffCenterFrustum:()=>du,PickDepth:()=>Y3,PickDepthFramebuffer:()=>tz,PickFramebuffer:()=>nz,PickId:()=>PD,PickedMetadataInfo:()=>TU,Picking:()=>cz,PickingPipelineStage:()=>OL,PinBuilder:()=>h_,PixelDatatype:()=>je,PixelFormat:()=>Xe,Plane:()=>en,PlaneGeometry:()=>_2,PlaneGeometryUpdater:()=>y2,PlaneGraphics:()=>BO,PlaneOutlineGeometry:()=>A2,PntsLoader:()=>dN,PntsParser:()=>Nb,PointCloud:()=>jU,PointCloudEyeDomeLighting:()=>Ag,PointCloudShading:()=>Ep,PointCloudStylingPipelineStage:()=>BL,PointGraphics:()=>$x,PointPrimitive:()=>Cs,PointPrimitiveCollection:()=>MS,PointVisualizer:()=>K2,PolygonGeometry:()=>hg,PolygonGeometryLibrary:()=>Yn,PolygonGeometryUpdater:()=>T2,PolygonGraphics:()=>Uh,PolygonHierarchy:()=>Ic,PolygonOutlineGeometry:()=>C2,PolygonPipeline:()=>ni,Polyline:()=>kd,PolylineArrowMaterialProperty:()=>US,PolylineCollection:()=>um,PolylineColorAppearance:()=>Oa,PolylineDashMaterialProperty:()=>jS,PolylineGeometry:()=>d_,PolylineGeometryUpdater:()=>J2,PolylineGlowMaterialProperty:()=>HS,PolylineGraphics:()=>el,PolylineMaterialAppearance:()=>nc,PolylineOutlineMaterialProperty:()=>fy,PolylinePipeline:()=>Yi,PolylineVisualizer:()=>ek,PolylineVolumeGeometry:()=>S2,PolylineVolumeGeometryLibrary:()=>Am,PolylineVolumeGeometryUpdater:()=>P2,PolylineVolumeGraphics:()=>Jx,PolylineVolumeOutlineGeometry:()=>D2,PositionProperty:()=>kh,PositionPropertyArray:()=>n_,PostProcessStage:()=>Do,PostProcessStageCollection:()=>Rz,PostProcessStageComposite:()=>Zu,PostProcessStageLibrary:()=>Zf,PostProcessStageSampleMode:()=>Jf,PostProcessStageTextureCache:()=>bT,PpeMetadata:()=>WM,PpeSource:()=>ore,PpeTexture:()=>HM,Primitive:()=>Dn,PrimitiveCollection:()=>su,PrimitiveLoadPlan:()=>vb,PrimitiveOutlineGenerator:()=>Eb,PrimitiveOutlinePipelineStage:()=>FL,PrimitivePipeline:()=>Nx,PrimitiveRenderResources:()=>tN,PrimitiveState:()=>Zr,PrimitiveStatisticsPipelineStage:()=>kL,PrimitiveType:()=>Re,ProjectionPicker:()=>A4,ProjectionPickerViewModel:()=>_4,Property:()=>X,PropertyArray:()=>qS,PropertyAttribute:()=>Cb,PropertyAttributeProperty:()=>MM,PropertyBag:()=>Vl,PropertyTable:()=>Ql,PropertyTexture:()=>_g,PropertyTextureProperty:()=>OM,ProviderViewModel:()=>ir,Proxy:()=>Yoe,QuadraticRealPolynomial:()=>Pl,QuadtreeOccluders:()=>l3,QuadtreePrimitive:()=>p3,QuadtreeTile:()=>u3,QuadtreeTileLoadState:()=>qs,QuadtreeTileProvider:()=>qie,QuantizedMeshTerrainData:()=>YT,QuarticRealPolynomial:()=>yD,Quaternion:()=>Le,QuaternionSpline:()=>aB,Queue:()=>RA,Ray:()=>gn,Rectangle:()=>oe,RectangleCollisionChecker:()=>zC,RectangleGeometry:()=>RC,RectangleGeometryLibrary:()=>xs,RectangleGeometryUpdater:()=>R2,RectangleGraphics:()=>Vh,RectangleOutlineGeometry:()=>aC,ReferenceFrame:()=>Bi,ReferenceProperty:()=>i_,RenderState:()=>Ve,Renderbuffer:()=>mf,RenderbufferFormat:()=>Ml,Request:()=>_r,RequestErrorEvent:()=>ip,RequestScheduler:()=>Xc,RequestState:()=>di,RequestType:()=>qa,Resource:()=>De,ResourceCache:()=>Ii,ResourceCacheKey:()=>Kl,ResourceCacheStatistics:()=>bM,ResourceLoader:()=>qi,ResourceLoaderState:()=>gt,Rotation:()=>$d,RuntimeError:()=>re,S2Cell:()=>rg,SDFSettings:()=>ks,SampledPositionProperty:()=>uc,SampledProperty:()=>kf,Sampler:()=>jt,ScaledPositionProperty:()=>Hp,Scene:()=>vU,SceneFramebuffer:()=>mT,SceneMode:()=>ie,SceneMode2DPipelineStage:()=>zL,SceneModePicker:()=>D4,SceneModePickerViewModel:()=>I4,SceneTransforms:()=>eo,SceneTransitioner:()=>Bz,ScreenSpaceCameraController:()=>kz,ScreenSpaceEventHandler:()=>td,ScreenSpaceEventType:()=>Sn,SelectedFeatureIdPipelineStage:()=>jA,SelectionIndicator:()=>b4,SelectionIndicatorViewModel:()=>x4,SensorVolumePortionToDisplay:()=>QS,ShaderBuilder:()=>V0,ShaderCache:()=>dR,ShaderDestination:()=>he,ShaderFunction:()=>bR,ShaderProgram:()=>Kt,ShaderSource:()=>He,ShaderStruct:()=>xR,ShadowMap:()=>v_,ShadowMapShader:()=>h0,ShadowMode:()=>vn,ShadowVolumeAppearance:()=>_f,SharedContext:()=>CR,ShowGeometryInstanceAttribute:()=>En,Simon1994PlanetaryPositions:()=>iA,SimplePolylineGeometry:()=>Xoe,SingleTileImageryProvider:()=>dL,SkinningPipelineStage:()=>VL,SkyAtmosphere:()=>IU,SkyBox:()=>MU,SpatialNode:()=>yU,Spdcf:()=>jM,SpecularEnvironmentCubeMap:()=>Gh,SphereEmitter:()=>Xie,SphereGeometry:()=>oV,SphereOutlineGeometry:()=>Hg,Spherical:()=>o2,Spline:()=>xo,SplitDirection:()=>Or,Splitter:()=>_I,StaticGeometryColorBatch:()=>th,StaticGeometryPerMaterialBatch:()=>nh,StaticGroundGeometryColorBatch:()=>gw,StaticGroundGeometryPerMaterialBatch:()=>V2,StaticGroundPolylinePerMaterialBatch:()=>Z2,StaticOutlineGeometryBatch:()=>yw,StencilConstants:()=>Gt,StencilFunction:()=>qn,StencilOperation:()=>vt,SteppedSpline:()=>rB,Stereographic:()=>al,StorageType:()=>MA,StripeMaterialProperty:()=>XS,StripeOrientation:()=>vm,StructuralMetadata:()=>Ls,StyleCommandsNeeded:()=>tm,StyleExpression:()=>Kie,Sun:()=>zU,SunLight:()=>U0,SunPostProcess:()=>Vz,SupportedImageFormats:()=>kM,SvgPathBindingHandler:()=>UV,Sync:()=>TR,TaskProcessor:()=>Gn,Terrain:()=>IV,TerrainData:()=>Qu,TerrainEncoding:()=>dr,TerrainFillMesh:()=>$w,TerrainMesh:()=>pc,TerrainOffsetProperty:()=>Zx,TerrainPicker:()=>t3,TerrainProvider:()=>Uo,TerrainQuantization:()=>Ws,TerrainState:()=>Io,Texture:()=>It,Texture3D:()=>ER,TextureAtlas:()=>Ox,TextureCache:()=>hR,TextureMagnificationFilter:()=>ti,TextureManager:()=>Yz,TextureMinificationFilter:()=>Vt,TexturePacker:()=>RE,TextureUniform:()=>Kz,TextureWrap:()=>un,TileAvailability:()=>Zm,TileBoundingRegion:()=>Rf,TileBoundingS2Cell:()=>xF,TileBoundingSphere:()=>Wg,TileBoundingVolume:()=>noe,TileCoordinatesImageryProvider:()=>PV,TileDiscardPolicy:()=>ooe,TileEdge:()=>Tn,TileImagery:()=>iS,TileMapServiceImageryProvider:()=>GA,TileMetadata:()=>mF,TileOrientedBoundingBox:()=>Vu,TileProviderError:()=>Go,TileReplacementQueue:()=>f3,TileSelectionResult:()=>oi,TileState:()=>roe,Tileset3DTileContent:()=>_N,TilesetMetadata:()=>bF,TilesetPipelineStage:()=>dB,TilingScheme:()=>Qoe,TimeConstants:()=>ii,TimeDynamicImagery:()=>Db,TimeDynamicPointCloud:()=>yI,TimeInterval:()=>wn,TimeIntervalCollection:()=>Ta,TimeIntervalCollectionPositionProperty:()=>o_,TimeIntervalCollectionProperty:()=>r_,TimeStandard:()=>ei,Timeline:()=>E4,TimelineHighlightRange:()=>C4,TimelineTrack:()=>T4,Tipsify:()=>xD,ToggleButtonViewModel:()=>ix,Tonemapper:()=>w_,TrackingReferenceFrame:()=>q0,Transforms:()=>pt,TranslationRotationScale:()=>hA,TranslucentTileClassification:()=>oz,TridiagonalSystemSolver:()=>Bv,TrustedServers:()=>AE,TweenCollection:()=>vT,UniformState:()=>_R,UniformType:()=>_0,UrlTemplate3DTilesDataProvider:()=>yV,UrlTemplateImageryProvider:()=>Aa,VERSION:()=>_zt,VRButton:()=>w4,VRButtonViewModel:()=>S4,VRTheWorldTerrainProvider:()=>$oe,VaryingType:()=>ire,Vector3DTileBatch:()=>Ap,Vector3DTileClampedPolylines:()=>kN,Vector3DTileContent:()=>UN,Vector3DTileGeometry:()=>og,Vector3DTilePoints:()=>RN,Vector3DTilePolygons:()=>ON,Vector3DTilePolylines:()=>Gb,Vector3DTilePrimitive:()=>sb,VectorGltf3DTileContent:()=>ZA,VelocityOrientationProperty:()=>a2,VelocityVectorProperty:()=>a_,VertexArray:()=>Fn,VertexArrayFacade:()=>j0,VertexAttributeSemantic:()=>it,VertexFormat:()=>Ne,VerticalExaggeration:()=>so,VerticalExaggerationPipelineStage:()=>GL,VerticalOrigin:()=>zn,VideoSynchronizer:()=>Joe,View:()=>_T,Viewer:()=>Ere,ViewportQuad:()=>aoe,Visibility:()=>Vr,Visualizer:()=>Nee,VoxelBoundsCollection:()=>P_,VoxelBoxShape:()=>RT,VoxelCell:()=>Hz,VoxelContent:()=>PT,VoxelCylinderShape:()=>OT,VoxelEllipsoidShape:()=>MT,VoxelInspector:()=>R4,VoxelInspectorViewModel:()=>P4,VoxelMetadataOrder:()=>y0,VoxelPrimitive:()=>Xy,VoxelProvider:()=>coe,VoxelRenderResources:()=>fU,VoxelShape:()=>loe,VoxelShapeType:()=>Ac,VoxelTraversal:()=>xU,VulkanConstants:()=>Zoe,WallGeometry:()=>M2,WallGeometryLibrary:()=>OC,WallGeometryUpdater:()=>N2,WallGraphics:()=>eg,WallOutlineGeometry:()=>L2,WebGLConstants:()=>ee,WebMapServiceImageryProvider:()=>mL,WebMapTileServiceImageryProvider:()=>pL,WebMercatorProjection:()=>li,WebMercatorTilingScheme:()=>vr,WindingOrder:()=>Ya,WireframeIndexGenerator:()=>aS,WireframePipelineStage:()=>HL,_shadersAcesTonemappingStage:()=>lz,_shadersAdditiveBlend:()=>zz,_shadersAdjustTranslucentFS:()=>sI,_shadersAllMaterialAppearanceFS:()=>RR,_shadersAllMaterialAppearanceVS:()=>OR,_shadersAmbientOcclusionGenerate:()=>uz,_shadersAmbientOcclusionModulate:()=>fz,_shadersAspectRampMaterial:()=>FR,_shadersAtmosphereCommon:()=>$h,_shadersAtmosphereStageFS:()=>hB,_shadersAtmosphereStageVS:()=>mB,_shadersBasicMaterialAppearanceFS:()=>MR,_shadersBasicMaterialAppearanceVS:()=>BR,_shadersBillboardCollectionFS:()=>AN,_shadersBillboardCollectionVS:()=>yN,_shadersBlackAndWhite:()=>dz,_shadersBloomComposite:()=>hz,_shadersBrdfLutGeneratorFS:()=>E3,_shadersBrightPass:()=>Uz,_shadersBrightness:()=>mz,_shadersBufferPointMaterialFS:()=>GN,_shadersBufferPointMaterialVS:()=>jN,_shadersBufferPolygonMaterialFS:()=>KN,_shadersBufferPolygonMaterialVS:()=>XN,_shadersBufferPolylineMaterialFS:()=>ZN,_shadersBufferPolylineMaterialVS:()=>JN,_shadersBumpMapMaterial:()=>kR,_shadersCPUStylingStageFS:()=>zB,_shadersCPUStylingStageVS:()=>kB,_shadersCheckerboardMaterial:()=>zR,_shadersCloudCollectionFS:()=>WU,_shadersCloudCollectionVS:()=>qU,_shadersCloudNoiseFS:()=>YU,_shadersCloudNoiseVS:()=>XU,_shadersCompareAndPackTranslucentDepth:()=>iz,_shadersCompositeOITFS:()=>J3,_shadersCompositeTranslucentClassification:()=>gT,_shadersComputeIrradianceFS:()=>wM,_shadersComputeRadianceMapFS:()=>IM,_shadersConstantLodStageFS:()=>IL,_shadersConstantLodStageVS:()=>wL,_shadersContrastBias:()=>pz,_shadersConvolveSpecularMapFS:()=>DM,_shadersConvolveSpecularMapVS:()=>PM,_shadersCubeMapPanoramaVS:()=>RU,_shadersCustomShaderStageFS:()=>jB,_shadersCustomShaderStageVS:()=>VB,_shadersCzmBuiltins:()=>Ix,_shadersDepthOfField:()=>gz,_shadersDepthPlaneFS:()=>N3,_shadersDepthPlaneVS:()=>F3,_shadersDepthView:()=>_z,_shadersDepthViewPacked:()=>nre,_shadersDotMaterial:()=>UR,_shadersEdgeDetection:()=>Az,_shadersEdgeDetectionStageFS:()=>QB,_shadersEdgeVisibilityStageFS:()=>JB,_shadersEdgeVisibilityStageVS:()=>ZB,_shadersElevationBandMaterial:()=>VR,_shadersElevationContourMaterial:()=>jR,_shadersElevationRampMaterial:()=>GR,_shadersEllipsoidFS:()=>Zw,_shadersEllipsoidSurfaceAppearanceFS:()=>nV,_shadersEllipsoidSurfaceAppearanceVS:()=>iV,_shadersEllipsoidVS:()=>eI,_shadersFXAA:()=>bz,_shadersFXAA3_11:()=>wz,_shadersFadeMaterial:()=>HR,_shadersFeatureIdStageFS:()=>GB,_shadersFeatureIdStageVS:()=>HB,_shadersFilmicTonemapping:()=>yz,_shadersGaussianBlur1D:()=>Wy,_shadersGeometryStageFS:()=>tL,_shadersGeometryStageVS:()=>nL,_shadersGlobeFS:()=>i3,_shadersGlobeVS:()=>o3,_shadersGridMaterial:()=>WR,_shadersGroundAtmosphere:()=>Xw,_shadersHSBToRGB:()=>SP,_shadersHSLToRGB:()=>wP,_shadersImageBasedLightingStageFS:()=>gB,_shadersInstancingStageCommon:()=>wB,_shadersInstancingStageVS:()=>IB,_shadersIntersectBox:()=>iU,_shadersIntersectCylinder:()=>oU,_shadersIntersectDepth:()=>tU,_shadersIntersectEllipsoid:()=>rU,_shadersIntersectLongitude:()=>hI,_shadersIntersectPlane:()=>nU,_shadersIntersection:()=>DT,_shadersIntersectionUtils:()=>eU,_shadersLegacyInstancingStageVS:()=>DB,_shadersLensFlare:()=>Cz,_shadersLightingStageFS:()=>EL,_shadersMaterialStageFS:()=>SL,_shadersMegatexture:()=>uU,_shadersMetadataStageFS:()=>WB,_shadersMetadataStageVS:()=>qB,_shadersModelClippingPlanesStageFS:()=>bB,_shadersModelClippingPolygonsStageFS:()=>EB,_shadersModelClippingPolygonsStageVS:()=>TB,_shadersModelColorStageFS:()=>xB,_shadersModelFS:()=>sN,_shadersModelSilhouetteStageFS:()=>XL,_shadersModelSilhouetteStageVS:()=>KL,_shadersModelSplitterStageFS:()=>$L,_shadersModelVS:()=>aN,_shadersModifiedReinhardTonemapping:()=>Tz,_shadersMorphTargetsStageVS:()=>PL,_shadersNightVision:()=>Ez,_shadersNormalMapMaterial:()=>qR,_shadersOctree:()=>lU,_shadersPassThrough:()=>Ju,_shadersPassThroughDepth:()=>jy,_shadersPbrNeutralTonemapping:()=>xz,_shadersPerInstanceColorAppearanceFS:()=>iO,_shadersPerInstanceColorAppearanceVS:()=>oO,_shadersPerInstanceFlatColorAppearanceFS:()=>Bx,_shadersPerInstanceFlatColorAppearanceVS:()=>rO,_shadersPointCloudEyeDomeLighting:()=>KM,_shadersPointCloudStylingStageVS:()=>ML,_shadersPointPrimitiveCollectionFS:()=>uy,_shadersPointPrimitiveCollectionVS:()=>XF,_shadersPolygonSignedDistanceFS:()=>SM,_shadersPolylineArrowMaterial:()=>YR,_shadersPolylineColorAppearanceVS:()=>bO,_shadersPolylineCommon:()=>kl,_shadersPolylineDashMaterial:()=>XR,_shadersPolylineFS:()=>Vx,_shadersPolylineGlowMaterial:()=>KR,_shadersPolylineMaterialAppearanceVS:()=>CO,_shadersPolylineOutlineMaterial:()=>QR,_shadersPolylineShadowVolumeFS:()=>_O,_shadersPolylineShadowVolumeMorphFS:()=>AO,_shadersPolylineShadowVolumeMorphVS:()=>yO,_shadersPolylineShadowVolumeVS:()=>xO,_shadersPolylineVS:()=>vN,_shadersPrimitiveGaussianSplatFS:()=>lF,_shadersPrimitiveGaussianSplatVS:()=>cF,_shadersPrimitiveOutlineStageFS:()=>NL,_shadersPrimitiveOutlineStageVS:()=>LL,_shadersRGBToHSB:()=>IP,_shadersRGBToHSL:()=>DP,_shadersRGBToXYZ:()=>PP,_shadersReinhardTonemapping:()=>vz,_shadersReprojectWebMercatorFS:()=>AL,_shadersReprojectWebMercatorVS:()=>yL,_shadersRimLightingMaterial:()=>$R,_shadersSelectedFeatureIdStageCommon:()=>Gv,_shadersShadowVolumeAppearanceFS:()=>FE,_shadersShadowVolumeAppearanceVS:()=>cO,_shadersShadowVolumeFS:()=>lA,_shadersSilhouette:()=>Sz,_shadersSkinningStageVS:()=>UL,_shadersSkyAtmosphereCommon:()=>mI,_shadersSkyAtmosphereFS:()=>SU,_shadersSkyAtmosphereVS:()=>wU,_shadersSkyBoxFS:()=>DU,_shadersSkyBoxVS:()=>PU,_shadersSlopeRampMaterial:()=>JR,_shadersStripeMaterial:()=>ZR,_shadersSunFS:()=>BU,_shadersSunTextureFS:()=>LU,_shadersSunVS:()=>NU,_shadersTexturedMaterialAppearanceFS:()=>LR,_shadersTexturedMaterialAppearanceVS:()=>NR,_shadersVector3DTileClampedPolylinesFS:()=>NN,_shadersVector3DTileClampedPolylinesVS:()=>LN,_shadersVector3DTilePolylinesVS:()=>MN,_shadersVectorTileVS:()=>$E,_shadersVerticalExaggerationStageVS:()=>jL,_shadersViewportQuadFS:()=>KU,_shadersViewportQuadVS:()=>yx,_shadersVoxelFS:()=>Jz,_shadersVoxelUtils:()=>$z,_shadersVoxelVS:()=>Zz,_shadersWater:()=>tO,_shadersWaterMaskMaterial:()=>eO,_shadersXYZToRGB:()=>RP,_shadersacesTonemapping:()=>OP,_shadersalphaWeight:()=>MP,_shadersantialias:()=>BP,_shadersapplyHSBShift:()=>LP,_shadersapproximateSphericalCoordinates:()=>NP,_shadersapproximateTanh:()=>FP,_shadersbackFacing:()=>kP,_shadersbranchFreeTernary:()=>zP,_shaderscascadeColor:()=>UP,_shaderscascadeDistance:()=>VP,_shaderscascadeMatrix:()=>jP,_shaderscascadeWeights:()=>GP,_shadersclipPolygons:()=>HP,_shaderscolumbusViewMorph:()=>WP,_shaderscomputeAtmosphereColor:()=>qP,_shaderscomputeGroundAtmosphereScattering:()=>YP,_shaderscomputePosition:()=>XP,_shaderscomputeScattering:()=>KP,_shaderscomputeTextureTransform:()=>QP,_shadersconvertLocalToBoxUv:()=>aU,_shadersconvertLocalToCylinderUv:()=>sU,_shadersconvertLocalToEllipsoidUv:()=>cU,_shaderscosineAndSine:()=>$P,_shadersdecodeRGB8:()=>JP,_shadersdecompressTextureCoordinates:()=>ZP,_shadersdegreesPerRadian:()=>RD,_shadersdepthClamp:()=>e1,_shadersdepthRange:()=>OD,_shadersdepthRangeStruct:()=>AP,_shaderseastNorthUpToEyeCoordinates:()=>t1,_shadersellipsoidContainsPoint:()=>n1,_shadersellipsoidTextureCoordinates:()=>i1,_shadersepsilon1:()=>MD,_shadersepsilon2:()=>BD,_shadersepsilon3:()=>LD,_shadersepsilon4:()=>ND,_shadersepsilon5:()=>FD,_shadersepsilon6:()=>kD,_shadersepsilon7:()=>zD,_shadersequalsEpsilon:()=>o1,_shaderseyeOffset:()=>r1,_shaderseyeToWindowCoordinates:()=>a1,_shadersfastApproximateAtan:()=>s1,_shadersfog:()=>c1,_shadersgammaCorrect:()=>l1,_shadersgeodeticSurfaceNormal:()=>u1,_shadersgetDefaultMaterial:()=>f1,_shadersgetDynamicAtmosphereLightDirection:()=>d1,_shadersgetLambertDiffuse:()=>h1,_shadersgetSpecular:()=>m1,_shadersgetWaterNoise:()=>p1,_shadershue:()=>g1,_shadersinfinity:()=>UD,_shadersinverseGamma:()=>_1,_shadersisEmpty:()=>A1,_shadersisFull:()=>y1,_shaderslatitudeToWebMercatorFraction:()=>x1,_shaderslineDistance:()=>b1,_shaderslinearToSrgb:()=>C1,_shadersluminance:()=>T1,_shadersmaterial:()=>yP,_shadersmaterialInput:()=>xP,_shadersmaximumComponent:()=>E1,_shadersmetersPerPixel:()=>v1,_shadersmodelMaterial:()=>bP,_shadersmodelToWindowCoordinates:()=>S1,_shadersmodelVertexOutput:()=>CP,_shadersmultiplyWithColorBalance:()=>w1,_shadersnearFarScalar:()=>I1,_shadersoctDecode:()=>D1,_shadersoneOverPi:()=>VD,_shadersoneOverTwoPi:()=>jD,_shaderspackDepth:()=>P1,_shaderspassCesium3DTile:()=>GD,_shaderspassCesium3DTileClassification:()=>HD,_shaderspassCesium3DTileClassificationIgnoreShow:()=>WD,_shaderspassCesium3DTileEdges:()=>qD,_shaderspassCesium3DTileEdgesDirect:()=>YD,_shaderspassClassification:()=>XD,_shaderspassCompute:()=>KD,_shaderspassEnvironment:()=>QD,_shaderspassGaussianSplats:()=>$D,_shaderspassGlobe:()=>JD,_shaderspassOpaque:()=>ZD,_shaderspassOverlay:()=>eP,_shaderspassTerrainClassification:()=>tP,_shaderspassTranslucent:()=>nP,_shaderspassVoxels:()=>iP,_shaderspbrLighting:()=>R1,_shaderspbrNeutralTonemapping:()=>O1,_shadersphong:()=>M1,_shaderspi:()=>oP,_shaderspiOverFour:()=>rP,_shaderspiOverSix:()=>aP,_shaderspiOverThree:()=>sP,_shaderspiOverTwo:()=>cP,_shadersplaneDistance:()=>B1,_shaderspointAlongRay:()=>L1,_shadersradiansPerDegree:()=>lP,_shadersray:()=>TP,_shadersrayEllipsoidIntersectionInterval:()=>N1,_shadersraySegment:()=>EP,_shadersraySphereIntersectionInterval:()=>F1,_shadersreadDepth:()=>k1,_shadersreadNonPerspective:()=>z1,_shadersreverseLogDepth:()=>U1,_shadersround:()=>V1,_shaderssaturation:()=>j1,_shaderssceneMode2D:()=>uP,_shaderssceneMode3D:()=>fP,_shaderssceneModeColumbusView:()=>dP,_shaderssceneModeMorphing:()=>hP,_shadersshadowDepthCompare:()=>G1,_shadersshadowParameters:()=>vP,_shadersshadowVisibility:()=>H1,_shaderssignNotZero:()=>W1,_shaderssolarRadius:()=>mP,_shaderssphericalHarmonics:()=>q1,_shaderssrgbToLinear:()=>Y1,_shaderstangentToEyeSpaceMatrix:()=>X1,_shaderstextureCube:()=>K1,_shadersthreePiOver2:()=>pP,_shaderstransformPlane:()=>Q1,_shaderstranslateRelativeToEye:()=>$1,_shaderstranslucentPhong:()=>J1,_shaderstranspose:()=>Z1,_shaderstwoPi:()=>gP,_shadersunpackClippingExtents:()=>eR,_shadersunpackDepth:()=>tR,_shadersunpackFloat:()=>nR,_shadersunpackTexture:()=>iR,_shadersunpackUint:()=>oR,_shadersvalueTransform:()=>rR,_shadersvertexLogDepth:()=>aR,_shaderswebMercatorMaxLatitude:()=>_P,_shaderswindowToEyeCoordinates:()=>sR,_shaderswriteDepthClamp:()=>cR,_shaderswriteLogDepth:()=>lR,_shaderswriteNonPerspective:()=>uR,addAllToArray:()=>Qn,addBuffer:()=>fM,addDefaults:()=>oM,addExtensionsRequired:()=>cM,addExtensionsUsed:()=>Id,addPipelineExtras:()=>CA,addToArray:()=>ds,appendForwardSlash:()=>JI,arrayRemoveDuplicates:()=>Fo,assert:()=>ZW,barycentricCoordinates:()=>bx,binarySearch:()=>_o,buildModuleUrl:()=>Xt,buildVectorGltfFromMVT:()=>xV,buildVoxelCustomShader:()=>dI,buildVoxelDrawCommands:()=>dU,clone:()=>We,combine:()=>wt,computeFlyToLocationForRectangle:()=>oT,createBillboardPointCallback:()=>zb,createColorRamp:()=>Wz,createCommand:()=>In,createDefaultImageryProviderViewModels:()=>KV,createDefaultTerrainProviderViewModels:()=>QV,createElevationBandMaterial:()=>uoe,createGooglePhotorealistic3DTileset:()=>foe,createGuid:()=>jn,createMaterialPropertyDescriptor:()=>$o,createOsmBuildingsAsync:()=>doe,createPropertyDescriptor:()=>pe,createRawPropertyDescriptor:()=>Ul,createTangentSpaceDebugPrimitive:()=>hoe,createTaskProcessorWorker:()=>rre,createUniform:()=>fD,createUniformArray:()=>dD,createVectorTileBuffersFromModelComponents:()=>oF,createWorldBathymetryAsync:()=>wV,createWorldImageryAsync:()=>Dg,createWorldTerrainAsync:()=>QT,decodeGoogleEarthEnterpriseData:()=>sV,decodeMVT:()=>CV,decodeVectorPolylinePositions:()=>zN,defer:()=>yu,defined:()=>l,demodernizeShader:()=>fR,deprecationWarning:()=>Ms,destroyObject:()=>fe,exportKml:()=>Vee,findAccessorMinMax:()=>gb,findContentMetadata:()=>oC,findGroupMetadata:()=>rC,findTileMetadata:()=>pF,forEachTextureInMaterial:()=>av,formatError:()=>Sp,freezeRenderState:()=>G7,getAbsoluteUri:()=>hd,getAccessorByteStride:()=>Pu,getBaseUri:()=>ZI,getBinaryAccessor:()=>vd,getClipAndStyleCode:()=>UU,getClippingFunction:()=>rT,getComponentReader:()=>ug,getElement:()=>On,getExtensionFromUri:()=>O0,getFilenameFromUri:()=>e_,getImageFromTypedArray:()=>qz,getImagePixels:()=>vh,getJsonFromTypedArray:()=>Cr,getMagic:()=>Wh,getMeshPrimitives:()=>XM,getMetadataClassProperty:()=>CU,getMetadataProperty:()=>EU,getStringFromTypedArray:()=>wu,getTimestamp:()=>Fi,hasExtension:()=>Ci,heightReferenceOnEntityPropertyChanged:()=>tg,isBitSet:()=>Tl,isBlobUri:()=>fx,isCrossOriginUrl:()=>K_,isDataUri:()=>Sh,isLeapYear:()=>Eh,knockout:()=>ve,knockout_3_5_1:()=>tE,knockout_es5:()=>zV,loadAndExecuteScript:()=>dx,loadCubeMap:()=>SR,loadImageFromTypedArray:()=>lg,loadKTX2:()=>Cu,mergeSort:()=>s0,moveTechniqueRenderStates:()=>sM,moveTechniquesToExtension:()=>lM,numberOfComponentsForType:()=>xf,objectToQuery:()=>hx,oneTimeWarning:()=>_t,parseBatchTable:()=>bg,parseFeatureMetadataLegacy:()=>NM,parseGlb:()=>pb,parseResponseHeaders:()=>eD,parseStructuralMetadata:()=>LM,pickModel:()=>sS,pointInsideTriangle:()=>ere,preprocess3DTileContent:()=>Vg,processVoxelProperties:()=>Qz,queryToObject:()=>ff,readAccessorPacked:()=>dM,removeExtension:()=>_b,removeExtensionsRequired:()=>rM,removeExtensionsUsed:()=>mb,removePipelineExtras:()=>aM,removeUnusedElements:()=>uM,renderBufferPointCollection:()=>YN,renderBufferPolygonCollection:()=>$N,renderBufferPolylineCollection:()=>nF,resizeImageToNextPowerOfTwo:()=>vA,sampleTerrain:()=>Zk,sampleTerrainMostDetailed:()=>iT,scaleToGeodeticSurface:()=>ux,srgbToLinear:()=>HT,subdivideArray:()=>lO,subscribeAndEvaluate:()=>yc,updateAccessorComponentTypes:()=>hM,updateVersion:()=>mM,usesExtension:()=>Mr,viewerCesium3DTilesInspectorMixin:()=>vre,viewerCesiumInspectorMixin:()=>Sre,viewerDragDropMixin:()=>Ire,viewerPerformanceWatchdogMixin:()=>Dre,viewerVoxelInspectorMixin:()=>Rre,webGLConstantToGlslType:()=>tre,wrapFunction:()=>FV,writeTextToCanvas:()=>Vb});module.exports=Th(Azt);function SMe(e){return e!=null}var l=SMe;function cx(e){this.name="DeveloperError",this.message=e;let t;try{throw new Error}catch(n){t=n.stack}this.stack=t}l(Object.create)&&(cx.prototype=Object.create(Error.prototype),cx.prototype.constructor=cx);cx.prototype.toString=function(){let e=`${this.name}: ${this.message}`;return l(this.stack)&&(e+=`
- ${this.stack.toString()}`),e};cx.throwInstantiationError=function(){throw new cx("This function defines an interface and should not be called directly.")};var _e=cx;var cs={};cs.typeOf={};function wMe(e){return`${e} is required, actual value was undefined`}function cE(e,t,n){return`Expected ${n} to be typeof ${t}, actual typeof was ${e}`}cs.defined=function(e,t){if(!l(t))throw new _e(wMe(e))};cs.typeOf.func=function(e,t){if(typeof t!="function")throw new _e(cE(typeof t,"function",e))};cs.typeOf.string=function(e,t){if(typeof t!="string")throw new _e(cE(typeof t,"string",e))};cs.typeOf.number=function(e,t){if(typeof t!="number")throw new _e(cE(typeof t,"number",e))};cs.typeOf.number.lessThan=function(e,t,n){if(cs.typeOf.number(e,t),t>=n)throw new _e(`Expected ${e} to be less than ${n}, actual value was ${t}`)};cs.typeOf.number.lessThanOrEquals=function(e,t,n){if(cs.typeOf.number(e,t),t>n)throw new _e(`Expected ${e} to be less than or equal to ${n}, actual value was ${t}`)};cs.typeOf.number.greaterThan=function(e,t,n){if(cs.typeOf.number(e,t),t<=n)throw new _e(`Expected ${e} to be greater than ${n}, actual value was ${t}`)};cs.typeOf.number.greaterThanOrEquals=function(e,t,n){if(cs.typeOf.number(e,t),t<n)throw new _e(`Expected ${e} to be greater than or equal to ${n}, actual value was ${t}`)};cs.typeOf.object=function(e,t){if(typeof t!="object")throw new _e(cE(typeof t,"object",e))};cs.typeOf.bool=function(e,t){if(typeof t!="boolean")throw new _e(cE(typeof t,"boolean",e))};cs.typeOf.bigint=function(e,t){if(typeof t!="bigint")throw new _e(cE(typeof t,"bigint",e))};cs.typeOf.number.equals=function(e,t,n,i){if(cs.typeOf.number(e,n),cs.typeOf.number(t,i),n!==i)throw new _e(`${e} must be equal to ${t}, the actual values are ${n} and ${i}`)};var No=cs;var J9=Yr(M4(),1);var mt={};mt.EPSILON1=.1;mt.EPSILON2=.01;mt.EPSILON3=.001;mt.EPSILON4=1e-4;mt.EPSILON5=1e-5;mt.EPSILON6=1e-6;mt.EPSILON7=1e-7;mt.EPSILON8=1e-8;mt.EPSILON9=1e-9;mt.EPSILON10=1e-10;mt.EPSILON11=1e-11;mt.EPSILON12=1e-12;mt.EPSILON13=1e-13;mt.EPSILON14=1e-14;mt.EPSILON15=1e-15;mt.EPSILON16=1e-16;mt.EPSILON17=1e-17;mt.EPSILON18=1e-18;mt.EPSILON19=1e-19;mt.EPSILON20=1e-20;mt.EPSILON21=1e-21;mt.GRAVITATIONALPARAMETER=3986004418e5;mt.SOLAR_RADIUS=6955e5;mt.LUNAR_RADIUS=1737400;mt.SIXTY_FOUR_KILOBYTES=64*1024;mt.FOUR_GIGABYTES=4*1024*1024*1024;mt.sign=Math.sign??function(t){return t=+t,t===0||t!==t?t:t>0?1:-1};mt.signNotZero=function(e){return e<0?-1:1};mt.toSNorm=function(e,t){return t=t??255,Math.round((mt.clamp(e,-1,1)*.5+.5)*t)};mt.fromSNorm=function(e,t){return t=t??255,mt.clamp(e,0,t)/t*2-1};mt.normalize=function(e,t,n){return n=Math.max(n-t,0),n===0?0:mt.clamp((e-t)/n,0,1)};mt.sinh=Math.sinh??function(t){return(Math.exp(t)-Math.exp(-t))/2};mt.cosh=Math.cosh??function(t){return(Math.exp(t)+Math.exp(-t))/2};mt.lerp=function(e,t,n){return(1-n)*e+n*t};mt.PI=Math.PI;mt.ONE_OVER_PI=1/Math.PI;mt.PI_OVER_TWO=Math.PI/2;mt.PI_OVER_THREE=Math.PI/3;mt.PI_OVER_FOUR=Math.PI/4;mt.PI_OVER_SIX=Math.PI/6;mt.THREE_PI_OVER_TWO=3*Math.PI/2;mt.TWO_PI=2*Math.PI;mt.ONE_OVER_TWO_PI=1/(2*Math.PI);mt.RADIANS_PER_DEGREE=Math.PI/180;mt.DEGREES_PER_RADIAN=180/Math.PI;mt.RADIANS_PER_ARCSECOND=mt.RADIANS_PER_DEGREE/3600;mt.toRadians=function(e){return e*mt.RADIANS_PER_DEGREE};mt.toDegrees=function(e){return e*mt.DEGREES_PER_RADIAN};mt.convertLongitudeRange=function(e){let t=mt.TWO_PI,n=e-Math.floor(e/t)*t;return n<-Math.PI?n+t:n>=Math.PI?n-t:n};mt.clampToLatitudeRange=function(e){return mt.clamp(e,-1*mt.PI_OVER_TWO,mt.PI_OVER_TWO)};mt.negativePiToPi=function(e){return e>=-mt.PI&&e<=mt.PI?e:mt.zeroToTwoPi(e+mt.PI)-mt.PI};mt.zeroToTwoPi=function(e){if(e>=0&&e<=mt.TWO_PI)return e;let t=mt.mod(e,mt.TWO_PI);return Math.abs(t)<mt.EPSILON14&&Math.abs(e)>mt.EPSILON14?mt.TWO_PI:t};mt.mod=function(e,t){return mt.sign(e)===mt.sign(t)&&Math.abs(e)<Math.abs(t)?e:(e%t+t)%t};mt.equalsEpsilon=function(e,t,n,i){n=n??0,i=i??n;let o=Math.abs(e-t);return o<=i||o<=n*Math.max(Math.abs(e),Math.abs(t))};mt.lessThan=function(e,t,n){return e-t<-n};mt.lessThanOrEquals=function(e,t,n){return e-t<n};mt.greaterThan=function(e,t,n){return e-t>n};mt.greaterThanOrEquals=function(e,t,n){return e-t>-n};var B4=[1];mt.factorial=function(e){let t=B4.length;if(e>=t){let n=B4[t-1];for(let i=t;i<=e;i++){let o=n*i;B4.push(o),n=o}}return B4[e]};mt.incrementWrap=function(e,t,n){return n=n??0,++e,e>t&&(e=n),e};mt.isPowerOfTwo=function(e){return e!==0&&(e&e-1)===0};mt.nextPowerOfTwo=function(e){return--e,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e,e};mt.previousPowerOfTwo=function(e){return e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,e|=e>>32,e=(e>>>0)-(e>>>1),e};mt.clamp=function(e,t,n){return e<t?t:e>n?n:e};var Nre=new J9.default;mt.setRandomNumberSeed=function(e){Nre=new J9.default(e)};mt.nextRandomNumber=function(){return Nre.random()};mt.randomBetween=function(e,t){return mt.nextRandomNumber()*(t-e)+e};mt.acosClamped=function(e){return Math.acos(mt.clamp(e,-1,1))};mt.asinClamped=function(e){return Math.asin(mt.clamp(e,-1,1))};mt.chordLength=function(e,t){return 2*t*Math.sin(e*.5)};mt.logBase=function(e,t){return Math.log(e)/Math.log(t)};mt.cbrt=Math.cbrt??function(t){let n=Math.pow(Math.abs(t),.3333333333333333);return t<0?-n:n};mt.log2=Math.log2??function(t){return Math.log(t)*Math.LOG2E};mt.fog=function(e,t){let n=e*t;return 1-Math.exp(-(n*n))};mt.fastApproximateAtan=function(e){return e*(-.1784*Math.abs(e)-.0663*e*e+1.0301)};mt.fastApproximateAtan2=function(e,t){let n,i=Math.abs(e);n=Math.abs(t);let o=Math.max(i,n);n=Math.min(i,n);let r=n/o;return i=mt.fastApproximateAtan(r),i=Math.abs(t)>Math.abs(e)?mt.PI_OVER_TWO-i:i,i=e<0?mt.PI-i:i,i=t<0?-i:i,i};var D=mt;var or=class e{constructor(t,n,i){this.x=t??0,this.y=n??0,this.z=i??0}static fromSpherical(t,n){l(n)||(n=new e);let i=t.clock,o=t.cone,r=t.magnitude??1,a=r*Math.sin(o);return n.x=a*Math.cos(i),n.y=a*Math.sin(i),n.z=r*Math.cos(o),n}static fromElements(t,n,i,o){return l(o)?(o.x=t,o.y=n,o.z=i,o):new e(t,n,i)}static clone(t,n){if(l(t))return l(n)?(n.x=t.x,n.y=t.y,n.z=t.z,n):new e(t.x,t.y,t.z)}static pack(t,n,i){return i=i??0,n[i++]=t.x,n[i++]=t.y,n[i]=t.z,n}static unpack(t,n,i){return n=n??0,l(i)||(i=new e),i.x=t[n++],i.y=t[n++],i.z=t[n],i}static packArray(t,n){let i=t.length,o=i*3;l(n)?!Array.isArray(n)&&n.length!==o||n.length!==o&&(n.length=o):n=new Array(o);for(let r=0;r<i;++r)e.pack(t[r],n,r*3);return n}static unpackArray(t,n){let i=t.length;l(n)?n.length=i/3:n=new Array(i/3);for(let o=0;o<i;o+=3){let r=o/3;n[r]=e.unpack(t,o,n[r])}return n}static maximumComponent(t){return Math.max(t.x,t.y,t.z)}static minimumComponent(t){return Math.min(t.x,t.y,t.z)}static minimumByComponent(t,n,i){return i.x=Math.min(t.x,n.x),i.y=Math.min(t.y,n.y),i.z=Math.min(t.z,n.z),i}static maximumByComponent(t,n,i){return i.x=Math.max(t.x,n.x),i.y=Math.max(t.y,n.y),i.z=Math.max(t.z,n.z),i}static clamp(t,n,i,o){let r=D.clamp(t.x,n.x,i.x),a=D.clamp(t.y,n.y,i.y),s=D.clamp(t.z,n.z,i.z);return o.x=r,o.y=a,o.z=s,o}static magnitudeSquared(t){return t.x*t.x+t.y*t.y+t.z*t.z}static magnitude(t){return Math.sqrt(e.magnitudeSquared(t))}static distance(t,n){return e.subtract(t,n,L4),e.magnitude(L4)}static distanceSquared(t,n){return e.subtract(t,n,L4),e.magnitudeSquared(L4)}static normalize(t,n){let i=e.magnitude(t);return n.x=t.x/i,n.y=t.y/i,n.z=t.z/i,n}static dot(t,n){return t.x*n.x+t.y*n.y+t.z*n.z}static multiplyComponents(t,n,i){return i.x=t.x*n.x,i.y=t.y*n.y,i.z=t.z*n.z,i}static divideComponents(t,n,i){return i.x=t.x/n.x,i.y=t.y/n.y,i.z=t.z/n.z,i}static add(t,n,i){return i.x=t.x+n.x,i.y=t.y+n.y,i.z=t.z+n.z,i}static subtract(t,n,i){return i.x=t.x-n.x,i.y=t.y-n.y,i.z=t.z-n.z,i}static multiplyByScalar(t,n,i){return i.x=t.x*n,i.y=t.y*n,i.z=t.z*n,i}static divideByScalar(t,n,i){return i.x=t.x/n,i.y=t.y/n,i.z=t.z/n,i}static negate(t,n){return n.x=-t.x,n.y=-t.y,n.z=-t.z,n}static abs(t,n){return n.x=Math.abs(t.x),n.y=Math.abs(t.y),n.z=Math.abs(t.z),n}static lerp(t,n,i,o){return e.multiplyByScalar(n,i,Fre),o=e.multiplyByScalar(t,1-i,o),e.add(Fre,o,o)}static angleBetween(t,n){e.normalize(t,N4),e.normalize(n,Z9);let i=e.dot(N4,Z9),o=e.magnitude(e.cross(N4,Z9,N4));return Math.atan2(o,i)}static mostOrthogonalAxis(t,n){let i=e.normalize(t,IMe);return e.abs(i,i),i.x<=i.y?i.x<=i.z?n=e.clone(e.UNIT_X,n):n=e.clone(e.UNIT_Z,n):i.y<=i.z?n=e.clone(e.UNIT_Y,n):n=e.clone(e.UNIT_Z,n),n}static projectVector(t,n,i){let o=e.dot(t,n)/e.dot(n,n);return e.multiplyByScalar(n,o,i)}static equals(t,n){return t===n||l(t)&&l(n)&&t.x===n.x&&t.y===n.y&&t.z===n.z}static equalsArray(t,n,i){return t.x===n[i]&&t.y===n[i+1]&&t.z===n[i+2]}static equalsEpsilon(t,n,i,o){return t===n||l(t)&&l(n)&&D.equalsEpsilon(t.x,n.x,i,o)&&D.equalsEpsilon(t.y,n.y,i,o)&&D.equalsEpsilon(t.z,n.z,i,o)}static cross(t,n,i){let o=t.x,r=t.y,a=t.z,s=n.x,c=n.y,u=n.z,f=r*u-a*c,d=a*s-o*u,p=o*c-r*s;return i.x=f,i.y=d,i.z=p,i}static midpoint(t,n,i){return i.x=(t.x+n.x)*.5,i.y=(t.y+n.y)*.5,i.z=(t.z+n.z)*.5,i}static fromDegrees(t,n,i,o,r){return t=D.toRadians(t),n=D.toRadians(n),e.fromRadians(t,n,i,o,r)}static fromRadians(t,n,i,o,r){i=i??0;let a=l(o)?o.radiiSquared:e._ellipsoidRadiiSquared,s=Math.cos(n);ud.x=s*Math.cos(t),ud.y=s*Math.sin(t),ud.z=Math.sin(n),ud=e.normalize(ud,ud),e.multiplyComponents(a,ud,lE);let c=Math.sqrt(e.dot(ud,lE));return lE=e.divideByScalar(lE,c,lE),ud=e.multiplyByScalar(ud,i,ud),l(r)||(r=new e),e.add(lE,ud,r)}static fromDegreesArray(t,n,i){let o=t.length;l(i)?i.length=o/2:i=new Array(o/2);for(let r=0;r<o;r+=2){let a=t[r],s=t[r+1],c=r/2;i[c]=e.fromDegrees(a,s,0,n,i[c])}return i}static fromRadiansArray(t,n,i){let o=t.length;l(i)?i.length=o/2:i=new Array(o/2);for(let r=0;r<o;r+=2){let a=t[r],s=t[r+1],c=r/2;i[c]=e.fromRadians(a,s,0,n,i[c])}return i}static fromDegreesArrayHeights(t,n,i){let o=t.length;l(i)?i.length=o/3:i=new Array(o/3);for(let r=0;r<o;r+=3){let a=t[r],s=t[r+1],c=t[r+2],u=r/3;i[u]=e.fromDegrees(a,s,c,n,i[u])}return i}static fromRadiansArrayHeights(t,n,i){let o=t.length;l(i)?i.length=o/3:i=new Array(o/3);for(let r=0;r<o;r+=3){let a=t[r],s=t[r+1],c=t[r+2],u=r/3;i[u]=e.fromRadians(a,s,c,n,i[u])}return i}clone(t){return e.clone(this,t)}equals(t){return e.equals(this,t)}equalsEpsilon(t,n,i){return e.equalsEpsilon(this,t,n,i)}toString(){return`(${this.x}, ${this.y}, ${this.z})`}};or.fromCartesian4=or.clone;or.packedLength=3;or.fromArray=or.unpack;var L4=new or,Fre=new or,N4=new or,Z9=new or,IMe=new or,ud=new or,lE=new or;or._ellipsoidRadiiSquared=new or(6378137*6378137,6378137*6378137,6356752314245179e-9*6356752314245179e-9);or.ZERO=Object.freeze(new or(0,0,0));or.ONE=Object.freeze(new or(1,1,1));or.UNIT_X=Object.freeze(new or(1,0,0));or.UNIT_Y=Object.freeze(new or(0,1,0));or.UNIT_Z=Object.freeze(new or(0,0,1));var h=or;var Wa=class e{constructor(t,n,i,o){this.x=t??0,this.y=n??0,this.z=i??0,this.w=o??0}static fromElements(t,n,i,o,r){return l(r)?(r.x=t,r.y=n,r.z=i,r.w=o,r):new e(t,n,i,o)}static fromColor(t,n){return l(n)?(n.x=t.red,n.y=t.green,n.z=t.blue,n.w=t.alpha,n):new e(t.red,t.green,t.blue,t.alpha)}static clone(t,n){if(l(t))return l(n)?(n.x=t.x,n.y=t.y,n.z=t.z,n.w=t.w,n):new e(t.x,t.y,t.z,t.w)}static pack(t,n,i){return i=i??0,n[i++]=t.x,n[i++]=t.y,n[i++]=t.z,n[i]=t.w,n}static unpack(t,n,i){return n=n??0,l(i)||(i=new e),i.x=t[n++],i.y=t[n++],i.z=t[n++],i.w=t[n],i}static packArray(t,n){let i=t.length,o=i*4;l(n)?!Array.isArray(n)&&n.length!==o||n.length!==o&&(n.length=o):n=new Array(o);for(let r=0;r<i;++r)e.pack(t[r],n,r*4);return n}static unpackArray(t,n){let i=t.length;l(n)?n.length=i/4:n=new Array(i/4);for(let o=0;o<i;o+=4){let r=o/4;n[r]=e.unpack(t,o,n[r])}return n}static maximumComponent(t){return Math.max(t.x,t.y,t.z,t.w)}static minimumComponent(t){return Math.min(t.x,t.y,t.z,t.w)}static minimumByComponent(t,n,i){return i.x=Math.min(t.x,n.x),i.y=Math.min(t.y,n.y),i.z=Math.min(t.z,n.z),i.w=Math.min(t.w,n.w),i}static maximumByComponent(t,n,i){return i.x=Math.max(t.x,n.x),i.y=Math.max(t.y,n.y),i.z=Math.max(t.z,n.z),i.w=Math.max(t.w,n.w),i}static clamp(t,n,i,o){let r=D.clamp(t.x,n.x,i.x),a=D.clamp(t.y,n.y,i.y),s=D.clamp(t.z,n.z,i.z),c=D.clamp(t.w,n.w,i.w);return o.x=r,o.y=a,o.z=s,o.w=c,o}static magnitudeSquared(t){return t.x*t.x+t.y*t.y+t.z*t.z+t.w*t.w}static magnitude(t){return Math.sqrt(e.magnitudeSquared(t))}static distance(t,n){return e.subtract(t,n,F4),e.magnitude(F4)}static distanceSquared(t,n){return e.subtract(t,n,F4),e.magnitudeSquared(F4)}static normalize(t,n){let i=e.magnitude(t);return n.x=t.x/i,n.y=t.y/i,n.z=t.z/i,n.w=t.w/i,n}static dot(t,n){return t.x*n.x+t.y*n.y+t.z*n.z+t.w*n.w}static multiplyComponents(t,n,i){return i.x=t.x*n.x,i.y=t.y*n.y,i.z=t.z*n.z,i.w=t.w*n.w,i}static divideComponents(t,n,i){return i.x=t.x/n.x,i.y=t.y/n.y,i.z=t.z/n.z,i.w=t.w/n.w,i}static add(t,n,i){return i.x=t.x+n.x,i.y=t.y+n.y,i.z=t.z+n.z,i.w=t.w+n.w,i}static subtract(t,n,i){return i.x=t.x-n.x,i.y=t.y-n.y,i.z=t.z-n.z,i.w=t.w-n.w,i}static multiplyByScalar(t,n,i){return i.x=t.x*n,i.y=t.y*n,i.z=t.z*n,i.w=t.w*n,i}static divideByScalar(t,n,i){return i.x=t.x/n,i.y=t.y/n,i.z=t.z/n,i.w=t.w/n,i}static negate(t,n){return n.x=-t.x,n.y=-t.y,n.z=-t.z,n.w=-t.w,n}static abs(t,n){return n.x=Math.abs(t.x),n.y=Math.abs(t.y),n.z=Math.abs(t.z),n.w=Math.abs(t.w),n}static lerp(t,n,i,o){return e.multiplyByScalar(n,i,kre),o=e.multiplyByScalar(t,1-i,o),e.add(kre,o,o)}static mostOrthogonalAxis(t,n){let i=e.normalize(t,DMe);return e.abs(i,i),i.x<=i.y?i.x<=i.z?i.x<=i.w?n=e.clone(e.UNIT_X,n):n=e.clone(e.UNIT_W,n):i.z<=i.w?n=e.clone(e.UNIT_Z,n):n=e.clone(e.UNIT_W,n):i.y<=i.z?i.y<=i.w?n=e.clone(e.UNIT_Y,n):n=e.clone(e.UNIT_W,n):i.z<=i.w?n=e.clone(e.UNIT_Z,n):n=e.clone(e.UNIT_W,n),n}static equals(t,n){return t===n||l(t)&&l(n)&&t.x===n.x&&t.y===n.y&&t.z===n.z&&t.w===n.w}static equalsArray(t,n,i){return t.x===n[i]&&t.y===n[i+1]&&t.z===n[i+2]&&t.w===n[i+3]}static equalsEpsilon(t,n,i,o){return t===n||l(t)&&l(n)&&D.equalsEpsilon(t.x,n.x,i,o)&&D.equalsEpsilon(t.y,n.y,i,o)&&D.equalsEpsilon(t.z,n.z,i,o)&&D.equalsEpsilon(t.w,n.w,i,o)}clone(t){return e.clone(this,t)}equals(t){return e.equals(this,t)}equalsEpsilon(t,n,i){return e.equalsEpsilon(this,t,n,i)}toString(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`}static packFloat(t,n){return l(n)||(n=new e),e7[0]=t,zre?(n.x=Wc[0],n.y=Wc[1],n.z=Wc[2],n.w=Wc[3]):(n.x=Wc[3],n.y=Wc[2],n.z=Wc[1],n.w=Wc[0]),n}static unpackFloat(t){return zre?(Wc[0]=t.x,Wc[1]=t.y,Wc[2]=t.z,Wc[3]=t.w):(Wc[0]=t.w,Wc[1]=t.z,Wc[2]=t.y,Wc[3]=t.x),e7[0]}};Wa.packedLength=4;Wa.fromArray=Wa.unpack;var F4=new Wa,kre=new Wa,DMe=new Wa;Wa.ZERO=Object.freeze(new Wa(0,0,0,0));Wa.ONE=Object.freeze(new Wa(1,1,1,1));Wa.UNIT_X=Object.freeze(new Wa(1,0,0,0));Wa.UNIT_Y=Object.freeze(new Wa(0,1,0,0));Wa.UNIT_Z=Object.freeze(new Wa(0,0,1,0));Wa.UNIT_W=Object.freeze(new Wa(0,0,0,1));var e7=new Float32Array(1),Wc=new Uint8Array(e7.buffer),PMe=new Uint32Array([287454020]),RMe=new Uint8Array(PMe.buffer),zre=RMe[0]===68,se=Wa;var t7={};t7.EMPTY_OBJECT=Object.freeze({});t7.EMPTY_ARRAY=Object.freeze([]);var G=t7;var ho=class e{constructor(t,n,i,o,r,a,s,c,u){this[0]=t??0,this[1]=o??0,this[2]=s??0,this[3]=n??0,this[4]=r??0,this[5]=c??0,this[6]=i??0,this[7]=a??0,this[8]=u??0}static pack(t,n,i){return i=i??0,n[i++]=t[0],n[i++]=t[1],n[i++]=t[2],n[i++]=t[3],n[i++]=t[4],n[i++]=t[5],n[i++]=t[6],n[i++]=t[7],n[i++]=t[8],n}static unpack(t,n,i){return n=n??0,l(i)||(i=new e),i[0]=t[n++],i[1]=t[n++],i[2]=t[n++],i[3]=t[n++],i[4]=t[n++],i[5]=t[n++],i[6]=t[n++],i[7]=t[n++],i[8]=t[n++],i}static packArray(t,n){let i=t.length,o=i*9;l(n)?!Array.isArray(n)&&n.length!==o||n.length!==o&&(n.length=o):n=new Array(o);for(let r=0;r<i;++r)e.pack(t[r],n,r*9);return n}static unpackArray(t,n){let i=t.length;l(n)?n.length=i/9:n=new Array(i/9);for(let o=0;o<i;o+=9){let r=o/9;n[r]=e.unpack(t,o,n[r])}return n}static clone(t,n){if(l(t))return l(n)?(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n):new e(t[0],t[3],t[6],t[1],t[4],t[7],t[2],t[5],t[8])}static fromColumnMajorArray(t,n){return e.clone(t,n)}static fromRowMajorArray(t,n){return l(n)?(n[0]=t[0],n[1]=t[3],n[2]=t[6],n[3]=t[1],n[4]=t[4],n[5]=t[7],n[6]=t[2],n[7]=t[5],n[8]=t[8],n):new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])}static fromQuaternion(t,n){let i=t.x*t.x,o=t.x*t.y,r=t.x*t.z,a=t.x*t.w,s=t.y*t.y,c=t.y*t.z,u=t.y*t.w,f=t.z*t.z,d=t.z*t.w,p=t.w*t.w,g=i-s-f+p,m=2*(o-d),A=2*(r+u),y=2*(o+d),x=-i+s-f+p,b=2*(c-a),C=2*(r-u),E=2*(c+a),S=-i-s+f+p;return l(n)?(n[0]=g,n[1]=y,n[2]=C,n[3]=m,n[4]=x,n[5]=E,n[6]=A,n[7]=b,n[8]=S,n):new e(g,m,A,y,x,b,C,E,S)}static fromHeadingPitchRoll(t,n){let i=Math.cos(-t.pitch),o=Math.cos(-t.heading),r=Math.cos(t.roll),a=Math.sin(-t.pitch),s=Math.sin(-t.heading),c=Math.sin(t.roll),u=i*o,f=-r*s+c*a*o,d=c*s+r*a*o,p=i*s,g=r*o+c*a*s,m=-c*o+r*a*s,A=-a,y=c*i,x=r*i;return l(n)?(n[0]=u,n[1]=p,n[2]=A,n[3]=f,n[4]=g,n[5]=y,n[6]=d,n[7]=m,n[8]=x,n):new e(u,f,d,p,g,m,A,y,x)}static fromScale(t,n){return l(n)?(n[0]=t.x,n[1]=0,n[2]=0,n[3]=0,n[4]=t.y,n[5]=0,n[6]=0,n[7]=0,n[8]=t.z,n):new e(t.x,0,0,0,t.y,0,0,0,t.z)}static fromUniformScale(t,n){return l(n)?(n[0]=t,n[1]=0,n[2]=0,n[3]=0,n[4]=t,n[5]=0,n[6]=0,n[7]=0,n[8]=t,n):new e(t,0,0,0,t,0,0,0,t)}static fromCrossProduct(t,n){return l(n)?(n[0]=0,n[1]=t.z,n[2]=-t.y,n[3]=-t.z,n[4]=0,n[5]=t.x,n[6]=t.y,n[7]=-t.x,n[8]=0,n):new e(0,-t.z,t.y,t.z,0,-t.x,-t.y,t.x,0)}static fromRotationX(t,n){let i=Math.cos(t),o=Math.sin(t);return l(n)?(n[0]=1,n[1]=0,n[2]=0,n[3]=0,n[4]=i,n[5]=o,n[6]=0,n[7]=-o,n[8]=i,n):new e(1,0,0,0,i,-o,0,o,i)}static fromRotationY(t,n){let i=Math.cos(t),o=Math.sin(t);return l(n)?(n[0]=i,n[1]=0,n[2]=-o,n[3]=0,n[4]=1,n[5]=0,n[6]=o,n[7]=0,n[8]=i,n):new e(i,0,o,0,1,0,-o,0,i)}static fromRotationZ(t,n){let i=Math.cos(t),o=Math.sin(t);return l(n)?(n[0]=i,n[1]=o,n[2]=0,n[3]=-o,n[4]=i,n[5]=0,n[6]=0,n[7]=0,n[8]=1,n):new e(i,-o,0,o,i,0,0,0,1)}static toArray(t,n){return l(n)?(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n):[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]}static getElementIndex(t,n){return t*3+n}static getColumn(t,n,i){let o=n*3,r=t[o],a=t[o+1],s=t[o+2];return i.x=r,i.y=a,i.z=s,i}static setColumn(t,n,i,o){o=e.clone(t,o);let r=n*3;return o[r]=i.x,o[r+1]=i.y,o[r+2]=i.z,o}static getRow(t,n,i){let o=t[n],r=t[n+3],a=t[n+6];return i.x=o,i.y=r,i.z=a,i}static setRow(t,n,i,o){return o=e.clone(t,o),o[n]=i.x,o[n+3]=i.y,o[n+6]=i.z,o}static setScale(t,n,i){let o=e.getScale(t,OMe),r=n.x/o.x,a=n.y/o.y,s=n.z/o.z;return i[0]=t[0]*r,i[1]=t[1]*r,i[2]=t[2]*r,i[3]=t[3]*a,i[4]=t[4]*a,i[5]=t[5]*a,i[6]=t[6]*s,i[7]=t[7]*s,i[8]=t[8]*s,i}static setUniformScale(t,n,i){let o=e.getScale(t,MMe),r=n/o.x,a=n/o.y,s=n/o.z;return i[0]=t[0]*r,i[1]=t[1]*r,i[2]=t[2]*r,i[3]=t[3]*a,i[4]=t[4]*a,i[5]=t[5]*a,i[6]=t[6]*s,i[7]=t[7]*s,i[8]=t[8]*s,i}static getScale(t,n){return n.x=h.magnitude(h.fromElements(t[0],t[1],t[2],n7)),n.y=h.magnitude(h.fromElements(t[3],t[4],t[5],n7)),n.z=h.magnitude(h.fromElements(t[6],t[7],t[8],n7)),n}static getMaximumScale(t){return e.getScale(t,Ure),h.maximumComponent(Ure)}static setRotation(t,n,i){let o=e.getScale(t,BMe);return i[0]=n[0]*o.x,i[1]=n[1]*o.x,i[2]=n[2]*o.x,i[3]=n[3]*o.y,i[4]=n[4]*o.y,i[5]=n[5]*o.y,i[6]=n[6]*o.z,i[7]=n[7]*o.z,i[8]=n[8]*o.z,i}static getRotation(t,n){let i=e.getScale(t,LMe);return n[0]=t[0]/i.x,n[1]=t[1]/i.x,n[2]=t[2]/i.x,n[3]=t[3]/i.y,n[4]=t[4]/i.y,n[5]=t[5]/i.y,n[6]=t[6]/i.z,n[7]=t[7]/i.z,n[8]=t[8]/i.z,n}static multiply(t,n,i){let o=t[0]*n[0]+t[3]*n[1]+t[6]*n[2],r=t[1]*n[0]+t[4]*n[1]+t[7]*n[2],a=t[2]*n[0]+t[5]*n[1]+t[8]*n[2],s=t[0]*n[3]+t[3]*n[4]+t[6]*n[5],c=t[1]*n[3]+t[4]*n[4]+t[7]*n[5],u=t[2]*n[3]+t[5]*n[4]+t[8]*n[5],f=t[0]*n[6]+t[3]*n[7]+t[6]*n[8],d=t[1]*n[6]+t[4]*n[7]+t[7]*n[8],p=t[2]*n[6]+t[5]*n[7]+t[8]*n[8];return i[0]=o,i[1]=r,i[2]=a,i[3]=s,i[4]=c,i[5]=u,i[6]=f,i[7]=d,i[8]=p,i}static add(t,n,i){return i[0]=t[0]+n[0],i[1]=t[1]+n[1],i[2]=t[2]+n[2],i[3]=t[3]+n[3],i[4]=t[4]+n[4],i[5]=t[5]+n[5],i[6]=t[6]+n[6],i[7]=t[7]+n[7],i[8]=t[8]+n[8],i}static subtract(t,n,i){return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],i[3]=t[3]-n[3],i[4]=t[4]-n[4],i[5]=t[5]-n[5],i[6]=t[6]-n[6],i[7]=t[7]-n[7],i[8]=t[8]-n[8],i}static multiplyByVector(t,n,i){let o=n.x,r=n.y,a=n.z,s=t[0]*o+t[3]*r+t[6]*a,c=t[1]*o+t[4]*r+t[7]*a,u=t[2]*o+t[5]*r+t[8]*a;return i.x=s,i.y=c,i.z=u,i}static multiplyByScalar(t,n,i){return i[0]=t[0]*n,i[1]=t[1]*n,i[2]=t[2]*n,i[3]=t[3]*n,i[4]=t[4]*n,i[5]=t[5]*n,i[6]=t[6]*n,i[7]=t[7]*n,i[8]=t[8]*n,i}static multiplyByScale(t,n,i){return i[0]=t[0]*n.x,i[1]=t[1]*n.x,i[2]=t[2]*n.x,i[3]=t[3]*n.y,i[4]=t[4]*n.y,i[5]=t[5]*n.y,i[6]=t[6]*n.z,i[7]=t[7]*n.z,i[8]=t[8]*n.z,i}static multiplyByUniformScale(t,n,i){return i[0]=t[0]*n,i[1]=t[1]*n,i[2]=t[2]*n,i[3]=t[3]*n,i[4]=t[4]*n,i[5]=t[5]*n,i[6]=t[6]*n,i[7]=t[7]*n,i[8]=t[8]*n,i}static negate(t,n){return n[0]=-t[0],n[1]=-t[1],n[2]=-t[2],n[3]=-t[3],n[4]=-t[4],n[5]=-t[5],n[6]=-t[6],n[7]=-t[7],n[8]=-t[8],n}static transpose(t,n){let i=t[0],o=t[3],r=t[6],a=t[1],s=t[4],c=t[7],u=t[2],f=t[5],d=t[8];return n[0]=i,n[1]=o,n[2]=r,n[3]=a,n[4]=s,n[5]=c,n[6]=u,n[7]=f,n[8]=d,n}static computeEigenDecomposition(t,n){let i=D.EPSILON20,o=10,r=0,a=0;l(n)||(n={});let s=n.unitary=e.clone(e.IDENTITY,n.unitary),c=n.diagonal=e.clone(t,n.diagonal),u=i*FMe(c);for(;a<o&&kMe(c)>u;)zMe(c,k4),e.transpose(k4,Vre),e.multiply(c,k4,c),e.multiply(Vre,c,c),e.multiply(s,k4,s),++r>2&&(++a,r=0);return n}static abs(t,n){return n[0]=Math.abs(t[0]),n[1]=Math.abs(t[1]),n[2]=Math.abs(t[2]),n[3]=Math.abs(t[3]),n[4]=Math.abs(t[4]),n[5]=Math.abs(t[5]),n[6]=Math.abs(t[6]),n[7]=Math.abs(t[7]),n[8]=Math.abs(t[8]),n}static determinant(t){let n=t[0],i=t[3],o=t[6],r=t[1],a=t[4],s=t[7],c=t[2],u=t[5],f=t[8];return n*(a*f-u*s)+r*(u*o-i*f)+c*(i*s-a*o)}static inverse(t,n){let i=t[0],o=t[1],r=t[2],a=t[3],s=t[4],c=t[5],u=t[6],f=t[7],d=t[8],p=e.determinant(t);n[0]=s*d-f*c,n[1]=f*r-o*d,n[2]=o*c-s*r,n[3]=u*c-a*d,n[4]=i*d-u*r,n[5]=a*r-i*c,n[6]=a*f-u*s,n[7]=u*o-i*f,n[8]=i*s-a*o;let g=1/p;return e.multiplyByScalar(n,g,n)}static inverseTranspose(t,n){return e.inverse(e.transpose(t,NMe),n)}static equals(t,n){return t===n||l(t)&&l(n)&&t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]}static equalsEpsilon(t,n,i){return i=i??0,t===n||l(t)&&l(n)&&Math.abs(t[0]-n[0])<=i&&Math.abs(t[1]-n[1])<=i&&Math.abs(t[2]-n[2])<=i&&Math.abs(t[3]-n[3])<=i&&Math.abs(t[4]-n[4])<=i&&Math.abs(t[5]-n[5])<=i&&Math.abs(t[6]-n[6])<=i&&Math.abs(t[7]-n[7])<=i&&Math.abs(t[8]-n[8])<=i}get length(){return e.packedLength}clone(t){return e.clone(this,t)}equals(t){return e.equals(this,t)}static equalsArray(t,n,i){return t[0]===n[i]&&t[1]===n[i+1]&&t[2]===n[i+2]&&t[3]===n[i+3]&&t[4]===n[i+4]&&t[5]===n[i+5]&&t[6]===n[i+6]&&t[7]===n[i+7]&&t[8]===n[i+8]}equalsEpsilon(t,n){return e.equalsEpsilon(this,t,n)}toString(){return`(${this[0]}, ${this[3]}, ${this[6]})
- (${this[1]}, ${this[4]}, ${this[7]})
- (${this[2]}, ${this[5]}, ${this[8]})`}};ho.packedLength=9;ho.fromArray=ho.unpack;ho.IDENTITY=Object.freeze(new ho(1,0,0,0,1,0,0,0,1));ho.ZERO=Object.freeze(new ho(0,0,0,0,0,0,0,0,0));ho.COLUMN0ROW0=0;ho.COLUMN0ROW1=1;ho.COLUMN0ROW2=2;ho.COLUMN1ROW0=3;ho.COLUMN1ROW1=4;ho.COLUMN1ROW2=5;ho.COLUMN2ROW0=6;ho.COLUMN2ROW1=7;ho.COLUMN2ROW2=8;var OMe=new h,MMe=new h,n7=new h,Ure=new h,BMe=new h,LMe=new h,k4=new ho,Vre=new ho,NMe=new ho;function FMe(e){let t=0;for(let n=0;n<9;++n){let i=e[n];t+=i*i}return Math.sqrt(t)}var i7=[1,0,0],o7=[2,2,1];function kMe(e){let t=0;for(let n=0;n<3;++n){let i=e[ho.getElementIndex(o7[n],i7[n])];t+=2*i*i}return Math.sqrt(t)}function zMe(e,t){let n=D.EPSILON15,i=0,o=1;for(let u=0;u<3;++u){let f=Math.abs(e[ho.getElementIndex(o7[u],i7[u])]);f>i&&(o=u,i=f)}let r=1,a=0,s=i7[o],c=o7[o];if(Math.abs(e[ho.getElementIndex(c,s)])>n){let u=e[ho.getElementIndex(c,c)],f=e[ho.getElementIndex(s,s)],d=e[ho.getElementIndex(c,s)],p=(u-f)/2/d,g;p<0?g=-1/(-p+Math.sqrt(1+p*p)):g=1/(p+Math.sqrt(1+p*p)),r=1/Math.sqrt(1+g*g),a=g*r}return t=ho.clone(ho.IDENTITY,t),t[ho.getElementIndex(s,s)]=t[ho.getElementIndex(c,c)]=r,t[ho.getElementIndex(c,s)]=a,t[ho.getElementIndex(s,c)]=-a,t}var $=ho;function XI(e){this.name="RuntimeError",this.message=e;let t;try{throw new Error}catch(n){t=n.stack}this.stack=t}l(Object.create)&&(XI.prototype=Object.create(Error.prototype),XI.prototype.constructor=XI);XI.prototype.toString=function(){let e=`${this.name}: ${this.message}`;return l(this.stack)&&(e+=`
- ${this.stack.toString()}`),e};var re=XI;var rr=class e{constructor(t,n,i,o,r,a,s,c,u,f,d,p,g,m,A,y){this[0]=t??0,this[1]=r??0,this[2]=u??0,this[3]=g??0,this[4]=n??0,this[5]=a??0,this[6]=f??0,this[7]=m??0,this[8]=i??0,this[9]=s??0,this[10]=d??0,this[11]=A??0,this[12]=o??0,this[13]=c??0,this[14]=p??0,this[15]=y??0}static pack(t,n,i){return i=i??0,n[i++]=t[0],n[i++]=t[1],n[i++]=t[2],n[i++]=t[3],n[i++]=t[4],n[i++]=t[5],n[i++]=t[6],n[i++]=t[7],n[i++]=t[8],n[i++]=t[9],n[i++]=t[10],n[i++]=t[11],n[i++]=t[12],n[i++]=t[13],n[i++]=t[14],n[i]=t[15],n}static unpack(t,n,i){return n=n??0,l(i)||(i=new e),i[0]=t[n++],i[1]=t[n++],i[2]=t[n++],i[3]=t[n++],i[4]=t[n++],i[5]=t[n++],i[6]=t[n++],i[7]=t[n++],i[8]=t[n++],i[9]=t[n++],i[10]=t[n++],i[11]=t[n++],i[12]=t[n++],i[13]=t[n++],i[14]=t[n++],i[15]=t[n],i}static packArray(t,n){let i=t.length,o=i*16;l(n)?!Array.isArray(n)&&n.length!==o||n.length!==o&&(n.length=o):n=new Array(o);for(let r=0;r<i;++r)e.pack(t[r],n,r*16);return n}static unpackArray(t,n){let i=t.length;l(n)?n.length=i/16:n=new Array(i/16);for(let o=0;o<i;o+=16){let r=o/16;n[r]=e.unpack(t,o,n[r])}return n}static clone(t,n){if(l(t))return l(n)?(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n):new e(t[0],t[4],t[8],t[12],t[1],t[5],t[9],t[13],t[2],t[6],t[10],t[14],t[3],t[7],t[11],t[15])}static fromColumnMajorArray(t,n){return e.clone(t,n)}static fromRowMajorArray(t,n){return l(n)?(n[0]=t[0],n[1]=t[4],n[2]=t[8],n[3]=t[12],n[4]=t[1],n[5]=t[5],n[6]=t[9],n[7]=t[13],n[8]=t[2],n[9]=t[6],n[10]=t[10],n[11]=t[14],n[12]=t[3],n[13]=t[7],n[14]=t[11],n[15]=t[15],n):new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}static fromRotationTranslation(t,n,i){return n=n??h.ZERO,l(i)?(i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=0,i[4]=t[3],i[5]=t[4],i[6]=t[5],i[7]=0,i[8]=t[6],i[9]=t[7],i[10]=t[8],i[11]=0,i[12]=n.x,i[13]=n.y,i[14]=n.z,i[15]=1,i):new e(t[0],t[3],t[6],n.x,t[1],t[4],t[7],n.y,t[2],t[5],t[8],n.z,0,0,0,1)}static fromTranslationQuaternionRotationScale(t,n,i,o){l(o)||(o=new e);let r=i.x,a=i.y,s=i.z,c=n.x*n.x,u=n.x*n.y,f=n.x*n.z,d=n.x*n.w,p=n.y*n.y,g=n.y*n.z,m=n.y*n.w,A=n.z*n.z,y=n.z*n.w,x=n.w*n.w,b=c-p-A+x,C=2*(u-y),E=2*(f+m),S=2*(u+y),w=-c+p-A+x,P=2*(g-d),R=2*(f-m),B=2*(g+d),L=-c-p+A+x;return o[0]=b*r,o[1]=S*r,o[2]=R*r,o[3]=0,o[4]=C*a,o[5]=w*a,o[6]=B*a,o[7]=0,o[8]=E*s,o[9]=P*s,o[10]=L*s,o[11]=0,o[12]=t.x,o[13]=t.y,o[14]=t.z,o[15]=1,o}static fromTranslationRotationScale(t,n){return e.fromTranslationQuaternionRotationScale(t.translation,t.rotation,t.scale,n)}static fromTranslation(t,n){return e.fromRotationTranslation($.IDENTITY,t,n)}static fromScale(t,n){return l(n)?(n[0]=t.x,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=t.y,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=t.z,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n):new e(t.x,0,0,0,0,t.y,0,0,0,0,t.z,0,0,0,0,1)}static fromUniformScale(t,n){return l(n)?(n[0]=t,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=t,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=t,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n):new e(t,0,0,0,0,t,0,0,0,0,t,0,0,0,0,1)}static fromRotation(t,n){return l(n)||(n=new e),n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=0,n[4]=t[3],n[5]=t[4],n[6]=t[5],n[7]=0,n[8]=t[6],n[9]=t[7],n[10]=t[8],n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n}static fromCamera(t,n){let i=t.position,o=t.direction,r=t.up;h.normalize(o,uE),h.normalize(h.cross(uE,r,fE),fE),h.normalize(h.cross(fE,uE,KI),KI);let a=fE.x,s=fE.y,c=fE.z,u=uE.x,f=uE.y,d=uE.z,p=KI.x,g=KI.y,m=KI.z,A=i.x,y=i.y,x=i.z,b=a*-A+s*-y+c*-x,C=p*-A+g*-y+m*-x,E=u*A+f*y+d*x;return l(n)?(n[0]=a,n[1]=p,n[2]=-u,n[3]=0,n[4]=s,n[5]=g,n[6]=-f,n[7]=0,n[8]=c,n[9]=m,n[10]=-d,n[11]=0,n[12]=b,n[13]=C,n[14]=E,n[15]=1,n):new e(a,s,c,b,p,g,m,C,-u,-f,-d,E,0,0,0,1)}static computePerspectiveFieldOfView(t,n,i,o,r){let s=1/Math.tan(t*.5),c=s/n,u=(o+i)/(i-o),f=2*o*i/(i-o);return r[0]=c,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=s,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=u,r[11]=-1,r[12]=0,r[13]=0,r[14]=f,r[15]=0,r}static computeOrthographicOffCenter(t,n,i,o,r,a,s){let c=1/(n-t),u=1/(o-i),f=1/(a-r),d=-(n+t)*c,p=-(o+i)*u,g=-(a+r)*f;return c*=2,u*=2,f*=-2,s[0]=c,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=u,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=f,s[11]=0,s[12]=d,s[13]=p,s[14]=g,s[15]=1,s}static computePerspectiveOffCenter(t,n,i,o,r,a,s){let c=2*r/(n-t),u=2*r/(o-i),f=(n+t)/(n-t),d=(o+i)/(o-i),p=-(a+r)/(a-r),g=-1,m=-2*a*r/(a-r);return s[0]=c,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=u,s[6]=0,s[7]=0,s[8]=f,s[9]=d,s[10]=p,s[11]=g,s[12]=0,s[13]=0,s[14]=m,s[15]=0,s}static computeInfinitePerspectiveOffCenter(t,n,i,o,r,a){let s=2*r/(n-t),c=2*r/(o-i),u=(n+t)/(n-t),f=(o+i)/(o-i),d=-1,p=-1,g=-2*r;return a[0]=s,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=c,a[6]=0,a[7]=0,a[8]=u,a[9]=f,a[10]=d,a[11]=p,a[12]=0,a[13]=0,a[14]=g,a[15]=0,a}static computeViewportTransformation(t,n,i,o){l(o)||(o=new e),t=t??G.EMPTY_OBJECT;let r=t.x??0,a=t.y??0,s=t.width??0,c=t.height??0;n=n??0,i=i??1;let u=s*.5,f=c*.5,d=(i-n)*.5,p=u,g=f,m=d,A=r+u,y=a+f,x=n+d,b=1;return o[0]=p,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=g,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=m,o[11]=0,o[12]=A,o[13]=y,o[14]=x,o[15]=b,o}static computeView(t,n,i,o,r){return r[0]=o.x,r[1]=i.x,r[2]=-n.x,r[3]=0,r[4]=o.y,r[5]=i.y,r[6]=-n.y,r[7]=0,r[8]=o.z,r[9]=i.z,r[10]=-n.z,r[11]=0,r[12]=-h.dot(o,t),r[13]=-h.dot(i,t),r[14]=h.dot(n,t),r[15]=1,r}static toArray(t,n){return l(n)?(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n):[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}static getElementIndex(t,n){return t*4+n}static getColumn(t,n,i){let o=n*4,r=t[o],a=t[o+1],s=t[o+2],c=t[o+3];return i.x=r,i.y=a,i.z=s,i.w=c,i}static setColumn(t,n,i,o){o=e.clone(t,o);let r=n*4;return o[r]=i.x,o[r+1]=i.y,o[r+2]=i.z,o[r+3]=i.w,o}static getRow(t,n,i){let o=t[n],r=t[n+4],a=t[n+8],s=t[n+12];return i.x=o,i.y=r,i.z=a,i.w=s,i}static setRow(t,n,i,o){return o=e.clone(t,o),o[n]=i.x,o[n+4]=i.y,o[n+8]=i.z,o[n+12]=i.w,o}static setTranslation(t,n,i){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3],i[4]=t[4],i[5]=t[5],i[6]=t[6],i[7]=t[7],i[8]=t[8],i[9]=t[9],i[10]=t[10],i[11]=t[11],i[12]=n.x,i[13]=n.y,i[14]=n.z,i[15]=t[15],i}static setScale(t,n,i){let o=e.getScale(t,UMe),r=n.x/o.x,a=n.y/o.y,s=n.z/o.z;return i[0]=t[0]*r,i[1]=t[1]*r,i[2]=t[2]*r,i[3]=t[3],i[4]=t[4]*a,i[5]=t[5]*a,i[6]=t[6]*a,i[7]=t[7],i[8]=t[8]*s,i[9]=t[9]*s,i[10]=t[10]*s,i[11]=t[11],i[12]=t[12],i[13]=t[13],i[14]=t[14],i[15]=t[15],i}static setUniformScale(t,n,i){let o=e.getScale(t,VMe),r=n/o.x,a=n/o.y,s=n/o.z;return i[0]=t[0]*r,i[1]=t[1]*r,i[2]=t[2]*r,i[3]=t[3],i[4]=t[4]*a,i[5]=t[5]*a,i[6]=t[6]*a,i[7]=t[7],i[8]=t[8]*s,i[9]=t[9]*s,i[10]=t[10]*s,i[11]=t[11],i[12]=t[12],i[13]=t[13],i[14]=t[14],i[15]=t[15],i}static getScale(t,n){return n.x=h.magnitude(h.fromElements(t[0],t[1],t[2],r7)),n.y=h.magnitude(h.fromElements(t[4],t[5],t[6],r7)),n.z=h.magnitude(h.fromElements(t[8],t[9],t[10],r7)),n}static getMaximumScale(t){return e.getScale(t,jre),h.maximumComponent(jre)}static setRotation(t,n,i){let o=e.getScale(t,jMe);return i[0]=n[0]*o.x,i[1]=n[1]*o.x,i[2]=n[2]*o.x,i[3]=t[3],i[4]=n[3]*o.y,i[5]=n[4]*o.y,i[6]=n[5]*o.y,i[7]=t[7],i[8]=n[6]*o.z,i[9]=n[7]*o.z,i[10]=n[8]*o.z,i[11]=t[11],i[12]=t[12],i[13]=t[13],i[14]=t[14],i[15]=t[15],i}static getRotation(t,n){let i=e.getScale(t,GMe);return n[0]=t[0]/i.x,n[1]=t[1]/i.x,n[2]=t[2]/i.x,n[3]=t[4]/i.y,n[4]=t[5]/i.y,n[5]=t[6]/i.y,n[6]=t[8]/i.z,n[7]=t[9]/i.z,n[8]=t[10]/i.z,n}static multiply(t,n,i){let o=t[0],r=t[1],a=t[2],s=t[3],c=t[4],u=t[5],f=t[6],d=t[7],p=t[8],g=t[9],m=t[10],A=t[11],y=t[12],x=t[13],b=t[14],C=t[15],E=n[0],S=n[1],w=n[2],P=n[3],R=n[4],B=n[5],L=n[6],_=n[7],T=n[8],v=n[9],I=n[10],O=n[11],N=n[12],j=n[13],k=n[14],U=n[15],F=o*E+c*S+p*w+y*P,H=r*E+u*S+g*w+x*P,q=a*E+f*S+m*w+b*P,J=s*E+d*S+A*w+C*P,W=o*R+c*B+p*L+y*_,Z=r*R+u*B+g*L+x*_,K=a*R+f*B+m*L+b*_,le=s*R+d*B+A*L+C*_,me=o*T+c*v+p*I+y*O,ae=r*T+u*v+g*I+x*O,be=a*T+f*v+m*I+b*O,ge=s*T+d*v+A*I+C*O,we=o*N+c*j+p*k+y*U,Ee=r*N+u*j+g*k+x*U,Be=a*N+f*j+m*k+b*U,ke=s*N+d*j+A*k+C*U;return i[0]=F,i[1]=H,i[2]=q,i[3]=J,i[4]=W,i[5]=Z,i[6]=K,i[7]=le,i[8]=me,i[9]=ae,i[10]=be,i[11]=ge,i[12]=we,i[13]=Ee,i[14]=Be,i[15]=ke,i}static add(t,n,i){return i[0]=t[0]+n[0],i[1]=t[1]+n[1],i[2]=t[2]+n[2],i[3]=t[3]+n[3],i[4]=t[4]+n[4],i[5]=t[5]+n[5],i[6]=t[6]+n[6],i[7]=t[7]+n[7],i[8]=t[8]+n[8],i[9]=t[9]+n[9],i[10]=t[10]+n[10],i[11]=t[11]+n[11],i[12]=t[12]+n[12],i[13]=t[13]+n[13],i[14]=t[14]+n[14],i[15]=t[15]+n[15],i}static subtract(t,n,i){return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],i[3]=t[3]-n[3],i[4]=t[4]-n[4],i[5]=t[5]-n[5],i[6]=t[6]-n[6],i[7]=t[7]-n[7],i[8]=t[8]-n[8],i[9]=t[9]-n[9],i[10]=t[10]-n[10],i[11]=t[11]-n[11],i[12]=t[12]-n[12],i[13]=t[13]-n[13],i[14]=t[14]-n[14],i[15]=t[15]-n[15],i}static multiplyTransformation(t,n,i){let o=t[0],r=t[1],a=t[2],s=t[4],c=t[5],u=t[6],f=t[8],d=t[9],p=t[10],g=t[12],m=t[13],A=t[14],y=n[0],x=n[1],b=n[2],C=n[4],E=n[5],S=n[6],w=n[8],P=n[9],R=n[10],B=n[12],L=n[13],_=n[14],T=o*y+s*x+f*b,v=r*y+c*x+d*b,I=a*y+u*x+p*b,O=o*C+s*E+f*S,N=r*C+c*E+d*S,j=a*C+u*E+p*S,k=o*w+s*P+f*R,U=r*w+c*P+d*R,F=a*w+u*P+p*R,H=o*B+s*L+f*_+g,q=r*B+c*L+d*_+m,J=a*B+u*L+p*_+A;return i[0]=T,i[1]=v,i[2]=I,i[3]=0,i[4]=O,i[5]=N,i[6]=j,i[7]=0,i[8]=k,i[9]=U,i[10]=F,i[11]=0,i[12]=H,i[13]=q,i[14]=J,i[15]=1,i}static multiplyByMatrix3(t,n,i){let o=t[0],r=t[1],a=t[2],s=t[4],c=t[5],u=t[6],f=t[8],d=t[9],p=t[10],g=n[0],m=n[1],A=n[2],y=n[3],x=n[4],b=n[5],C=n[6],E=n[7],S=n[8],w=o*g+s*m+f*A,P=r*g+c*m+d*A,R=a*g+u*m+p*A,B=o*y+s*x+f*b,L=r*y+c*x+d*b,_=a*y+u*x+p*b,T=o*C+s*E+f*S,v=r*C+c*E+d*S,I=a*C+u*E+p*S;return i[0]=w,i[1]=P,i[2]=R,i[3]=0,i[4]=B,i[5]=L,i[6]=_,i[7]=0,i[8]=T,i[9]=v,i[10]=I,i[11]=0,i[12]=t[12],i[13]=t[13],i[14]=t[14],i[15]=t[15],i}static multiplyByTranslation(t,n,i){let o=n.x,r=n.y,a=n.z,s=o*t[0]+r*t[4]+a*t[8]+t[12],c=o*t[1]+r*t[5]+a*t[9]+t[13],u=o*t[2]+r*t[6]+a*t[10]+t[14];return i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3],i[4]=t[4],i[5]=t[5],i[6]=t[6],i[7]=t[7],i[8]=t[8],i[9]=t[9],i[10]=t[10],i[11]=t[11],i[12]=s,i[13]=c,i[14]=u,i[15]=t[15],i}static multiplyByScale(t,n,i){let o=n.x,r=n.y,a=n.z;return o===1&&r===1&&a===1?e.clone(t,i):(i[0]=o*t[0],i[1]=o*t[1],i[2]=o*t[2],i[3]=t[3],i[4]=r*t[4],i[5]=r*t[5],i[6]=r*t[6],i[7]=t[7],i[8]=a*t[8],i[9]=a*t[9],i[10]=a*t[10],i[11]=t[11],i[12]=t[12],i[13]=t[13],i[14]=t[14],i[15]=t[15],i)}static multiplyByUniformScale(t,n,i){return i[0]=t[0]*n,i[1]=t[1]*n,i[2]=t[2]*n,i[3]=t[3],i[4]=t[4]*n,i[5]=t[5]*n,i[6]=t[6]*n,i[7]=t[7],i[8]=t[8]*n,i[9]=t[9]*n,i[10]=t[10]*n,i[11]=t[11],i[12]=t[12],i[13]=t[13],i[14]=t[14],i[15]=t[15],i}static multiplyByVector(t,n,i){let o=n.x,r=n.y,a=n.z,s=n.w,c=t[0]*o+t[4]*r+t[8]*a+t[12]*s,u=t[1]*o+t[5]*r+t[9]*a+t[13]*s,f=t[2]*o+t[6]*r+t[10]*a+t[14]*s,d=t[3]*o+t[7]*r+t[11]*a+t[15]*s;return i.x=c,i.y=u,i.z=f,i.w=d,i}static multiplyByPointAsVector(t,n,i){let o=n.x,r=n.y,a=n.z,s=t[0]*o+t[4]*r+t[8]*a,c=t[1]*o+t[5]*r+t[9]*a,u=t[2]*o+t[6]*r+t[10]*a;return i.x=s,i.y=c,i.z=u,i}static multiplyByPoint(t,n,i){let o=n.x,r=n.y,a=n.z,s=t[0]*o+t[4]*r+t[8]*a+t[12],c=t[1]*o+t[5]*r+t[9]*a+t[13],u=t[2]*o+t[6]*r+t[10]*a+t[14];return i.x=s,i.y=c,i.z=u,i}static multiplyByScalar(t,n,i){return i[0]=t[0]*n,i[1]=t[1]*n,i[2]=t[2]*n,i[3]=t[3]*n,i[4]=t[4]*n,i[5]=t[5]*n,i[6]=t[6]*n,i[7]=t[7]*n,i[8]=t[8]*n,i[9]=t[9]*n,i[10]=t[10]*n,i[11]=t[11]*n,i[12]=t[12]*n,i[13]=t[13]*n,i[14]=t[14]*n,i[15]=t[15]*n,i}static negate(t,n){return n[0]=-t[0],n[1]=-t[1],n[2]=-t[2],n[3]=-t[3],n[4]=-t[4],n[5]=-t[5],n[6]=-t[6],n[7]=-t[7],n[8]=-t[8],n[9]=-t[9],n[10]=-t[10],n[11]=-t[11],n[12]=-t[12],n[13]=-t[13],n[14]=-t[14],n[15]=-t[15],n}static transpose(t,n){let i=t[1],o=t[2],r=t[3],a=t[6],s=t[7],c=t[11];return n[0]=t[0],n[1]=t[4],n[2]=t[8],n[3]=t[12],n[4]=i,n[5]=t[5],n[6]=t[9],n[7]=t[13],n[8]=o,n[9]=a,n[10]=t[10],n[11]=t[14],n[12]=r,n[13]=s,n[14]=c,n[15]=t[15],n}static abs(t,n){return n[0]=Math.abs(t[0]),n[1]=Math.abs(t[1]),n[2]=Math.abs(t[2]),n[3]=Math.abs(t[3]),n[4]=Math.abs(t[4]),n[5]=Math.abs(t[5]),n[6]=Math.abs(t[6]),n[7]=Math.abs(t[7]),n[8]=Math.abs(t[8]),n[9]=Math.abs(t[9]),n[10]=Math.abs(t[10]),n[11]=Math.abs(t[11]),n[12]=Math.abs(t[12]),n[13]=Math.abs(t[13]),n[14]=Math.abs(t[14]),n[15]=Math.abs(t[15]),n}static equals(t,n){return t===n||l(t)&&l(n)&&t[12]===n[12]&&t[13]===n[13]&&t[14]===n[14]&&t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[8]===n[8]&&t[9]===n[9]&&t[10]===n[10]&&t[3]===n[3]&&t[7]===n[7]&&t[11]===n[11]&&t[15]===n[15]}static equalsEpsilon(t,n,i){return i=i??0,t===n||l(t)&&l(n)&&Math.abs(t[0]-n[0])<=i&&Math.abs(t[1]-n[1])<=i&&Math.abs(t[2]-n[2])<=i&&Math.abs(t[3]-n[3])<=i&&Math.abs(t[4]-n[4])<=i&&Math.abs(t[5]-n[5])<=i&&Math.abs(t[6]-n[6])<=i&&Math.abs(t[7]-n[7])<=i&&Math.abs(t[8]-n[8])<=i&&Math.abs(t[9]-n[9])<=i&&Math.abs(t[10]-n[10])<=i&&Math.abs(t[11]-n[11])<=i&&Math.abs(t[12]-n[12])<=i&&Math.abs(t[13]-n[13])<=i&&Math.abs(t[14]-n[14])<=i&&Math.abs(t[15]-n[15])<=i}static getTranslation(t,n){return n.x=t[12],n.y=t[13],n.z=t[14],n}static getMatrix3(t,n){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[4],n[4]=t[5],n[5]=t[6],n[6]=t[8],n[7]=t[9],n[8]=t[10],n}static inverse(t,n){let i=t[0],o=t[4],r=t[8],a=t[12],s=t[1],c=t[5],u=t[9],f=t[13],d=t[2],p=t[6],g=t[10],m=t[14],A=t[3],y=t[7],x=t[11],b=t[15],C=g*b,E=m*x,S=p*b,w=m*y,P=p*x,R=g*y,B=d*b,L=m*A,_=d*x,T=g*A,v=d*y,I=p*A,O=C*c+w*u+P*f-(E*c+S*u+R*f),N=E*s+B*u+T*f-(C*s+L*u+_*f),j=S*s+L*c+v*f-(w*s+B*c+I*f),k=R*s+_*c+I*u-(P*s+T*c+v*u),U=E*o+S*r+R*a-(C*o+w*r+P*a),F=C*i+L*r+_*a-(E*i+B*r+T*a),H=w*i+B*o+I*a-(S*i+L*o+v*a),q=P*i+T*o+v*r-(R*i+_*o+I*r);C=r*f,E=a*u,S=o*f,w=a*c,P=o*u,R=r*c,B=i*f,L=a*s,_=i*u,T=r*s,v=i*c,I=o*s;let J=C*y+w*x+P*b-(E*y+S*x+R*b),W=E*A+B*x+T*b-(C*A+L*x+_*b),Z=S*A+L*y+v*b-(w*A+B*y+I*b),K=R*A+_*y+I*x-(P*A+T*y+v*x),le=S*g+R*m+E*p-(P*m+C*p+w*g),me=_*m+C*d+L*g-(B*g+T*m+E*d),ae=B*p+I*m+w*d-(v*m+S*d+L*p),be=v*g+P*d+T*p-(_*p+I*g+R*d),ge=i*O+o*N+r*j+a*k;if(Math.abs(ge)<D.EPSILON21){if($.equalsEpsilon(e.getMatrix3(t,HMe),WMe,D.EPSILON7)&&se.equals(e.getRow(t,3,qMe),YMe))return n[0]=0,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=0,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=0,n[11]=0,n[12]=-t[12],n[13]=-t[13],n[14]=-t[14],n[15]=1,n;throw new re("matrix is not invertible because its determinate is zero.")}return ge=1/ge,n[0]=O*ge,n[1]=N*ge,n[2]=j*ge,n[3]=k*ge,n[4]=U*ge,n[5]=F*ge,n[6]=H*ge,n[7]=q*ge,n[8]=J*ge,n[9]=W*ge,n[10]=Z*ge,n[11]=K*ge,n[12]=le*ge,n[13]=me*ge,n[14]=ae*ge,n[15]=be*ge,n}static inverseTransformation(t,n){let i=t[0],o=t[1],r=t[2],a=t[4],s=t[5],c=t[6],u=t[8],f=t[9],d=t[10],p=t[12],g=t[13],m=t[14],A=-i*p-o*g-r*m,y=-a*p-s*g-c*m,x=-u*p-f*g-d*m;return n[0]=i,n[1]=a,n[2]=u,n[3]=0,n[4]=o,n[5]=s,n[6]=f,n[7]=0,n[8]=r,n[9]=c,n[10]=d,n[11]=0,n[12]=A,n[13]=y,n[14]=x,n[15]=1,n}static inverseTranspose(t,n){return e.inverse(e.transpose(t,XMe),n)}get length(){return e.packedLength}clone(t){return e.clone(this,t)}equals(t){return e.equals(this,t)}static equalsArray(t,n,i){return t[0]===n[i]&&t[1]===n[i+1]&&t[2]===n[i+2]&&t[3]===n[i+3]&&t[4]===n[i+4]&&t[5]===n[i+5]&&t[6]===n[i+6]&&t[7]===n[i+7]&&t[8]===n[i+8]&&t[9]===n[i+9]&&t[10]===n[i+10]&&t[11]===n[i+11]&&t[12]===n[i+12]&&t[13]===n[i+13]&&t[14]===n[i+14]&&t[15]===n[i+15]}equalsEpsilon(t,n){return e.equalsEpsilon(this,t,n)}toString(){return`(${this[0]}, ${this[4]}, ${this[8]}, ${this[12]})
- (${this[1]}, ${this[5]}, ${this[9]}, ${this[13]})
- (${this[2]}, ${this[6]}, ${this[10]}, ${this[14]})
- (${this[3]}, ${this[7]}, ${this[11]}, ${this[15]})`}};rr.packedLength=16;rr.fromArray=rr.unpack;rr.IDENTITY=Object.freeze(new rr(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1));rr.ZERO=Object.freeze(new rr(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0));rr.COLUMN0ROW0=0;rr.COLUMN0ROW1=1;rr.COLUMN0ROW2=2;rr.COLUMN0ROW3=3;rr.COLUMN1ROW0=4;rr.COLUMN1ROW1=5;rr.COLUMN1ROW2=6;rr.COLUMN1ROW3=7;rr.COLUMN2ROW0=8;rr.COLUMN2ROW1=9;rr.COLUMN2ROW2=10;rr.COLUMN2ROW3=11;rr.COLUMN3ROW0=12;rr.COLUMN3ROW1=13;rr.COLUMN3ROW2=14;rr.COLUMN3ROW3=15;var uE=new h,fE=new h,KI=new h,UMe=new h,VMe=new h,r7=new h,jre=new h,jMe=new h,GMe=new h,HMe=new $,WMe=new $,qMe=new se,YMe=new se(0,0,0,1),XMe=new rr,M=rr;var Gre={DEPTH_BUFFER_BIT:256,STENCIL_BUFFER_BIT:1024,COLOR_BUFFER_BIT:16384,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,ZERO:0,ONE:1,SRC_COLOR:768,ONE_MINUS_SRC_COLOR:769,SRC_ALPHA:770,ONE_MINUS_SRC_ALPHA:771,DST_ALPHA:772,ONE_MINUS_DST_ALPHA:773,DST_COLOR:774,ONE_MINUS_DST_COLOR:775,SRC_ALPHA_SATURATE:776,FUNC_ADD:32774,BLEND_EQUATION:32777,BLEND_EQUATION_RGB:32777,BLEND_EQUATION_ALPHA:34877,FUNC_SUBTRACT:32778,FUNC_REVERSE_SUBTRACT:32779,BLEND_DST_RGB:32968,BLEND_SRC_RGB:32969,BLEND_DST_ALPHA:32970,BLEND_SRC_ALPHA:32971,CONSTANT_COLOR:32769,ONE_MINUS_CONSTANT_COLOR:32770,CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,BLEND_COLOR:32773,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,ARRAY_BUFFER_BINDING:34964,ELEMENT_ARRAY_BUFFER_BINDING:34965,STREAM_DRAW:35040,STATIC_DRAW:35044,DYNAMIC_DRAW:35048,BUFFER_SIZE:34660,BUFFER_USAGE:34661,CURRENT_VERTEX_ATTRIB:34342,FRONT:1028,BACK:1029,FRONT_AND_BACK:1032,CULL_FACE:2884,BLEND:3042,DITHER:3024,STENCIL_TEST:2960,DEPTH_TEST:2929,SCISSOR_TEST:3089,POLYGON_OFFSET_FILL:32823,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_COVERAGE:32928,NO_ERROR:0,INVALID_ENUM:1280,INVALID_VALUE:1281,INVALID_OPERATION:1282,OUT_OF_MEMORY:1285,CW:2304,CCW:2305,LINE_WIDTH:2849,ALIASED_POINT_SIZE_RANGE:33901,ALIASED_LINE_WIDTH_RANGE:33902,CULL_FACE_MODE:2885,FRONT_FACE:2886,DEPTH_RANGE:2928,DEPTH_WRITEMASK:2930,DEPTH_CLEAR_VALUE:2931,DEPTH_FUNC:2932,STENCIL_CLEAR_VALUE:2961,STENCIL_FUNC:2962,STENCIL_FAIL:2964,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STENCIL_BACK_FUNC:34816,STENCIL_BACK_FAIL:34817,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,VIEWPORT:2978,SCISSOR_BOX:3088,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,UNPACK_ALIGNMENT:3317,PACK_ALIGNMENT:3333,MAX_TEXTURE_SIZE:3379,MAX_VIEWPORT_DIMS:3386,SUBPIXEL_BITS:3408,RED_BITS:3410,GREEN_BITS:3411,BLUE_BITS:3412,ALPHA_BITS:3413,DEPTH_BITS:3414,STENCIL_BITS:3415,POLYGON_OFFSET_UNITS:10752,POLYGON_OFFSET_FACTOR:32824,TEXTURE_BINDING_2D:32873,SAMPLE_BUFFERS:32936,SAMPLES:32937,SAMPLE_COVERAGE_VALUE:32938,SAMPLE_COVERAGE_INVERT:32939,COMPRESSED_TEXTURE_FORMATS:34467,DONT_CARE:4352,FASTEST:4353,NICEST:4354,GENERATE_MIPMAP_HINT:33170,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DEPTH_COMPONENT:6402,ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,FRAGMENT_SHADER:35632,VERTEX_SHADER:35633,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_FRAGMENT_UNIFORM_VECTORS:36349,SHADER_TYPE:35663,DELETE_STATUS:35712,LINK_STATUS:35714,VALIDATE_STATUS:35715,ATTACHED_SHADERS:35717,ACTIVE_UNIFORMS:35718,ACTIVE_ATTRIBUTES:35721,SHADING_LANGUAGE_VERSION:35724,CURRENT_PROGRAM:35725,NEVER:512,LESS:513,EQUAL:514,LEQUAL:515,GREATER:516,NOTEQUAL:517,GEQUAL:518,ALWAYS:519,KEEP:7680,REPLACE:7681,INCR:7682,DECR:7683,INVERT:5386,INCR_WRAP:34055,DECR_WRAP:34056,VENDOR:7936,RENDERER:7937,VERSION:7938,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TEXTURE_2D:3553,TEXTURE:5890,TEXTURE_CUBE_MAP:34067,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,MAX_CUBE_MAP_TEXTURE_SIZE:34076,TEXTURE0:33984,TEXTURE1:33985,TEXTURE2:33986,TEXTURE3:33987,TEXTURE4:33988,TEXTURE5:33989,TEXTURE6:33990,TEXTURE7:33991,TEXTURE8:33992,TEXTURE9:33993,TEXTURE10:33994,TEXTURE11:33995,TEXTURE12:33996,TEXTURE13:33997,TEXTURE14:33998,TEXTURE15:33999,TEXTURE16:34e3,TEXTURE17:34001,TEXTURE18:34002,TEXTURE19:34003,TEXTURE20:34004,TEXTURE21:34005,TEXTURE22:34006,TEXTURE23:34007,TEXTURE24:34008,TEXTURE25:34009,TEXTURE26:34010,TEXTURE27:34011,TEXTURE28:34012,TEXTURE29:34013,TEXTURE30:34014,TEXTURE31:34015,ACTIVE_TEXTURE:34016,REPEAT:10497,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,SAMPLER_2D:35678,SAMPLER_CUBE:35680,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,IMPLEMENTATION_COLOR_READ_TYPE:35738,IMPLEMENTATION_COLOR_READ_FORMAT:35739,COMPILE_STATUS:35713,LOW_FLOAT:36336,MEDIUM_FLOAT:36337,HIGH_FLOAT:36338,LOW_INT:36339,MEDIUM_INT:36340,HIGH_INT:36341,FRAMEBUFFER:36160,RENDERBUFFER:36161,RGBA4:32854,RGB5_A1:32855,RGB565:36194,DEPTH_COMPONENT16:33189,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,DEPTH_STENCIL:34041,RENDERBUFFER_WIDTH:36162,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_STENCIL_SIZE:36181,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,COLOR_ATTACHMENT0:36064,DEPTH_ATTACHMENT:36096,STENCIL_ATTACHMENT:36128,DEPTH_STENCIL_ATTACHMENT:33306,NONE:0,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_UNSUPPORTED:36061,FRAMEBUFFER_BINDING:36006,RENDERBUFFER_BINDING:36007,MAX_RENDERBUFFER_SIZE:34024,INVALID_FRAMEBUFFER_OPERATION:1286,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,CONTEXT_LOST_WEBGL:37442,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,BROWSER_DEFAULT_WEBGL:37444,COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGBA_ASTC_4x4_WEBGL:37808,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGBA_BPTC_UNORM:36492,HALF_FLOAT_OES:36193,DOUBLE:5130,READ_BUFFER:3074,UNPACK_ROW_LENGTH:3314,UNPACK_SKIP_ROWS:3315,UNPACK_SKIP_PIXELS:3316,PACK_ROW_LENGTH:3330,PACK_SKIP_ROWS:3331,PACK_SKIP_PIXELS:3332,COLOR:6144,DEPTH:6145,STENCIL:6146,RED:6403,RGB8:32849,RGBA8:32856,RGB10_A2:32857,TEXTURE_BINDING_3D:32874,UNPACK_SKIP_IMAGES:32877,UNPACK_IMAGE_HEIGHT:32878,TEXTURE_3D:32879,TEXTURE_WRAP_R:32882,MAX_3D_TEXTURE_SIZE:32883,UNSIGNED_INT_2_10_10_10_REV:33640,MAX_ELEMENTS_VERTICES:33e3,MAX_ELEMENTS_INDICES:33001,TEXTURE_MIN_LOD:33082,TEXTURE_MAX_LOD:33083,TEXTURE_BASE_LEVEL:33084,TEXTURE_MAX_LEVEL:33085,MIN:32775,MAX:32776,DEPTH_COMPONENT24:33190,MAX_TEXTURE_LOD_BIAS:34045,TEXTURE_COMPARE_MODE:34892,TEXTURE_COMPARE_FUNC:34893,CURRENT_QUERY:34917,QUERY_RESULT:34918,QUERY_RESULT_AVAILABLE:34919,STREAM_READ:35041,STREAM_COPY:35042,STATIC_READ:35045,STATIC_COPY:35046,DYNAMIC_READ:35049,DYNAMIC_COPY:35050,MAX_DRAW_BUFFERS:34852,DRAW_BUFFER0:34853,DRAW_BUFFER1:34854,DRAW_BUFFER2:34855,DRAW_BUFFER3:34856,DRAW_BUFFER4:34857,DRAW_BUFFER5:34858,DRAW_BUFFER6:34859,DRAW_BUFFER7:34860,DRAW_BUFFER8:34861,DRAW_BUFFER9:34862,DRAW_BUFFER10:34863,DRAW_BUFFER11:34864,DRAW_BUFFER12:34865,DRAW_BUFFER13:34866,DRAW_BUFFER14:34867,DRAW_BUFFER15:34868,MAX_FRAGMENT_UNIFORM_COMPONENTS:35657,MAX_VERTEX_UNIFORM_COMPONENTS:35658,SAMPLER_3D:35679,SAMPLER_2D_SHADOW:35682,FRAGMENT_SHADER_DERIVATIVE_HINT:35723,PIXEL_PACK_BUFFER:35051,PIXEL_UNPACK_BUFFER:35052,PIXEL_PACK_BUFFER_BINDING:35053,PIXEL_UNPACK_BUFFER_BINDING:35055,FLOAT_MAT2x3:35685,FLOAT_MAT2x4:35686,FLOAT_MAT3x2:35687,FLOAT_MAT3x4:35688,FLOAT_MAT4x2:35689,FLOAT_MAT4x3:35690,SRGB:35904,SRGB8:35905,SRGB8_ALPHA8:35907,COMPARE_REF_TO_TEXTURE:34894,RGBA32F:34836,RGB32F:34837,RGBA16F:34842,RGB16F:34843,VERTEX_ATTRIB_ARRAY_INTEGER:35069,MAX_ARRAY_TEXTURE_LAYERS:35071,MIN_PROGRAM_TEXEL_OFFSET:35076,MAX_PROGRAM_TEXEL_OFFSET:35077,MAX_VARYING_COMPONENTS:35659,TEXTURE_2D_ARRAY:35866,TEXTURE_BINDING_2D_ARRAY:35869,R11F_G11F_B10F:35898,UNSIGNED_INT_10F_11F_11F_REV:35899,RGB9_E5:35901,UNSIGNED_INT_5_9_9_9_REV:35902,TRANSFORM_FEEDBACK_BUFFER_MODE:35967,MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:35968,TRANSFORM_FEEDBACK_VARYINGS:35971,TRANSFORM_FEEDBACK_BUFFER_START:35972,TRANSFORM_FEEDBACK_BUFFER_SIZE:35973,TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:35976,RASTERIZER_DISCARD:35977,MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:35978,MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:35979,INTERLEAVED_ATTRIBS:35980,SEPARATE_ATTRIBS:35981,TRANSFORM_FEEDBACK_BUFFER:35982,TRANSFORM_FEEDBACK_BUFFER_BINDING:35983,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,RED_INTEGER:36244,RGB_INTEGER:36248,RGBA_INTEGER:36249,SAMPLER_2D_ARRAY:36289,SAMPLER_2D_ARRAY_SHADOW:36292,SAMPLER_CUBE_SHADOW:36293,UNSIGNED_INT_VEC2:36294,UNSIGNED_INT_VEC3:36295,UNSIGNED_INT_VEC4:36296,INT_SAMPLER_2D:36298,INT_SAMPLER_3D:36299,INT_SAMPLER_CUBE:36300,INT_SAMPLER_2D_ARRAY:36303,UNSIGNED_INT_SAMPLER_2D:36306,UNSIGNED_INT_SAMPLER_3D:36307,UNSIGNED_INT_SAMPLER_CUBE:36308,UNSIGNED_INT_SAMPLER_2D_ARRAY:36311,DEPTH_COMPONENT32F:36012,DEPTH32F_STENCIL8:36013,FLOAT_32_UNSIGNED_INT_24_8_REV:36269,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:33296,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:33297,FRAMEBUFFER_ATTACHMENT_RED_SIZE:33298,FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:33299,FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:33300,FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:33301,FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:33302,FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:33303,FRAMEBUFFER_DEFAULT:33304,UNSIGNED_INT_24_8:34042,DEPTH24_STENCIL8:35056,UNSIGNED_NORMALIZED:35863,DRAW_FRAMEBUFFER_BINDING:36006,READ_FRAMEBUFFER:36008,DRAW_FRAMEBUFFER:36009,READ_FRAMEBUFFER_BINDING:36010,RENDERBUFFER_SAMPLES:36011,FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:36052,MAX_COLOR_ATTACHMENTS:36063,COLOR_ATTACHMENT1:36065,COLOR_ATTACHMENT2:36066,COLOR_ATTACHMENT3:36067,COLOR_ATTACHMENT4:36068,COLOR_ATTACHMENT5:36069,COLOR_ATTACHMENT6:36070,COLOR_ATTACHMENT7:36071,COLOR_ATTACHMENT8:36072,COLOR_ATTACHMENT9:36073,COLOR_ATTACHMENT10:36074,COLOR_ATTACHMENT11:36075,COLOR_ATTACHMENT12:36076,COLOR_ATTACHMENT13:36077,COLOR_ATTACHMENT14:36078,COLOR_ATTACHMENT15:36079,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:36182,MAX_SAMPLES:36183,HALF_FLOAT:5131,RG:33319,RG_INTEGER:33320,R8:33321,RG8:33323,R16F:33325,R32F:33326,RG16F:33327,RG32F:33328,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,VERTEX_ARRAY_BINDING:34229,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,SIGNED_NORMALIZED:36764,COPY_READ_BUFFER:36662,COPY_WRITE_BUFFER:36663,COPY_READ_BUFFER_BINDING:36662,COPY_WRITE_BUFFER_BINDING:36663,UNIFORM_BUFFER:35345,UNIFORM_BUFFER_BINDING:35368,UNIFORM_BUFFER_START:35369,UNIFORM_BUFFER_SIZE:35370,MAX_VERTEX_UNIFORM_BLOCKS:35371,MAX_FRAGMENT_UNIFORM_BLOCKS:35373,MAX_COMBINED_UNIFORM_BLOCKS:35374,MAX_UNIFORM_BUFFER_BINDINGS:35375,MAX_UNIFORM_BLOCK_SIZE:35376,MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:35377,MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:35379,UNIFORM_BUFFER_OFFSET_ALIGNMENT:35380,ACTIVE_UNIFORM_BLOCKS:35382,UNIFORM_TYPE:35383,UNIFORM_SIZE:35384,UNIFORM_BLOCK_INDEX:35386,UNIFORM_OFFSET:35387,UNIFORM_ARRAY_STRIDE:35388,UNIFORM_MATRIX_STRIDE:35389,UNIFORM_IS_ROW_MAJOR:35390,UNIFORM_BLOCK_BINDING:35391,UNIFORM_BLOCK_DATA_SIZE:35392,UNIFORM_BLOCK_ACTIVE_UNIFORMS:35394,UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES:35395,UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:35396,UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:35398,INVALID_INDEX:4294967295,MAX_VERTEX_OUTPUT_COMPONENTS:37154,MAX_FRAGMENT_INPUT_COMPONENTS:37157,MAX_SERVER_WAIT_TIMEOUT:37137,OBJECT_TYPE:37138,SYNC_CONDITION:37139,SYNC_STATUS:37140,SYNC_FLAGS:37141,SYNC_FENCE:37142,SYNC_GPU_COMMANDS_COMPLETE:37143,UNSIGNALED:37144,SIGNALED:37145,ALREADY_SIGNALED:37146,TIMEOUT_EXPIRED:37147,CONDITION_SATISFIED:37148,WAIT_FAILED:37149,SYNC_FLUSH_COMMANDS_BIT:1,VERTEX_ATTRIB_ARRAY_DIVISOR:35070,ANY_SAMPLES_PASSED:35887,ANY_SAMPLES_PASSED_CONSERVATIVE:36202,SAMPLER_BINDING:35097,RGB10_A2UI:36975,INT_2_10_10_10_REV:36255,TRANSFORM_FEEDBACK:36386,TRANSFORM_FEEDBACK_PAUSED:36387,TRANSFORM_FEEDBACK_ACTIVE:36388,TRANSFORM_FEEDBACK_BINDING:36389,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_SRGB8_ETC2:37493,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37494,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37495,COMPRESSED_RGBA8_ETC2_EAC:37496,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37497,TEXTURE_IMMUTABLE_FORMAT:37167,MAX_ELEMENT_INDEX:36203,TEXTURE_IMMUTABLE_LEVELS:33503,MAX_TEXTURE_MAX_ANISOTROPY_EXT:34047};Object.freeze(Gre);var ee=Gre;var KMe=new h;function Bt(e){this._size=e.size,this._datatype=e.datatype,this.getValue=e.getValue}var Qs={};Qs[ee.FLOAT]="float";Qs[ee.FLOAT_VEC2]="vec2";Qs[ee.FLOAT_VEC3]="vec3";Qs[ee.FLOAT_VEC4]="vec4";Qs[ee.INT]="int";Qs[ee.INT_VEC2]="ivec2";Qs[ee.INT_VEC3]="ivec3";Qs[ee.INT_VEC4]="ivec4";Qs[ee.BOOL]="bool";Qs[ee.BOOL_VEC2]="bvec2";Qs[ee.BOOL_VEC3]="bvec3";Qs[ee.BOOL_VEC4]="bvec4";Qs[ee.FLOAT_MAT2]="mat2";Qs[ee.FLOAT_MAT3]="mat3";Qs[ee.FLOAT_MAT4]="mat4";Qs[ee.SAMPLER_2D]="sampler2D";Qs[ee.SAMPLER_CUBE]="samplerCube";Bt.prototype.getDeclaration=function(e){let t=`uniform ${Qs[this._datatype]} ${e}`,n=this._size;return n===1?t+=";":t+=`[${n.toString()}];`,t};var QMe={czm_viewport:new Bt({size:1,datatype:ee.FLOAT_VEC4,getValue:function(e){return e.viewportCartesian4}}),czm_viewportOrthographic:new Bt({size:1,datatype:ee.FLOAT_MAT4,getValue:function(e){return e.viewportOrthographic}}),czm_viewportTransformation:new Bt({size:1,datatype:ee.FLOAT_MAT4,getValue:function(e){return e.viewportTransformation}}),czm_globeDepthTexture:new Bt({size:1,datatype:ee.SAMPLER_2D,getValue:function(e){return e.globeDepthTexture}}),czm_edgeIdTexture:new Bt({size:1,datatype:ee.SAMPLER_2D,getValue:function(e){return e.edgeIdTexture}}),czm_edgeColorTexture:new Bt({size:1,datatype:ee.SAMPLER_2D,getValue:function(e){return e.edgeColorTexture}}),czm_edgeDepthTexture:new Bt({size:1,datatype:ee.SAMPLER_2D,getValue:function(e){return e.edgeDepthTexture}}),czm_model:new Bt({size:1,datatype:ee.FLOAT_MAT4,getValue:function(e){return e.model}}),czm_inverseModel:new Bt({size:1,datatype:ee.FLOAT_MAT4,getValue:function(e){return e.inverseModel}}),czm_view:new Bt({size:1,datatype:ee.FLOAT_MAT4,getValue:function(e){return e.view}}),czm_view3D:new Bt({size:1,datatype:ee.FLOAT_MAT4,getValue:function(e){return e.view3D}}),czm_viewRotation:new Bt({size:1,datatype:ee.FLOAT_MAT3,getValue:function(e){return e.viewRotation}}),czm_viewRotation3D:new Bt({size:1,datatype:ee.FLOAT_MAT3,getValue:function(e){return e.viewRotation3D}}),czm_inverseView:new Bt({size:1,datatype:ee.FLOAT_MAT4,getValue:function(e){return e.inverseView}}),czm_inverseView3D:new Bt({size:1,datatype:ee.FLOAT_MAT4,getValue:function(e){return e.inverseView3D}}),czm_inverseViewRotation:new Bt({size:1,datatype:ee.FLOAT_MAT3,getValue:function(e){return e.inverseViewRotation}}),czm_inverseViewRotation3D:new Bt({size:1,datatype:ee.FLOAT_MAT3,getValue:function(e){return e.inverseViewRotation3D}}),czm_projection:new Bt({size:1,datatype:ee.FLOAT_MAT4,getValue:function(e){return e.projection}}),czm_inverseProjection:new Bt({size:1,datatype:ee.FLOAT_MAT4,getValue:function(e){return e.inverseProjection}}),czm_infiniteProjection:new Bt({size:1,datatype:ee.FLOAT_MAT4,getValue:function(e){return e.infiniteProjection}}),czm_modelView:new Bt({size:1,datatype:ee.FLOAT_MAT4,getValue:function(e){return e.modelView}}),czm_modelView3D:new Bt({size:1,datatype:ee.FLOAT_MAT4,getValue:function(e){return e.modelView3D}}),czm_modelViewRelativeToEye:new Bt({size:1,datatype:ee.FLOAT_MAT4,getValue:function(e){return e.modelViewRelativeToEye}}),czm_inverseModelView:new Bt({size:1,datatype:ee.FLOAT_MAT4,getValue:function(e){return e.inverseModelView}}),czm_inverseModelView3D:new Bt({size:1,datatype:ee.FLOAT_MAT4,getValue:function(e){return e.inverseModelView3D}}),czm_viewProjection:new Bt({size:1,datatype:ee.FLOAT_MAT4,getValue:function(e){return e.viewProjection}}),czm_inverseViewProjection:new Bt({size:1,datatype:ee.FLOAT_MAT4,getValue:function(e){return e.inverseViewProjection}}),czm_modelViewProjection:new Bt({size:1,datatype:ee.FLOAT_MAT4,getValue:function(e){return e.modelViewProjection}}),czm_inverseModelViewProjection:new Bt({size:1,datatype:ee.FLOAT_MAT4,getValue:function(e){return e.inverseModelViewProjection}}),czm_modelViewProjectionRelativeToEye:new Bt({size:1,datatype:ee.FLOAT_MAT4,getValue:function(e){return e.modelViewProjectionRelativeToEye}}),czm_modelViewInfiniteProjection:new Bt({size:1,datatype:ee.FLOAT_MAT4,getValue:function(e){return e.modelViewInfiniteProjection}}),czm_orthographicIn3D:new Bt({size:1,datatype:ee.FLOAT,getValue:function(e){return e.orthographicIn3D?1:0}}),czm_normal:new Bt({size:1,datatype:ee.FLOAT_MAT3,getValue:function(e){return e.normal}}),czm_normal3D:new Bt({size:1,datatype:ee.FLOAT_MAT3,getValue:function(e){return e.normal3D}}),czm_inverseNormal:new Bt({size:1,datatype:ee.FLOAT_MAT3,getValue:function(e){return e.inverseNormal}}),czm_inverseNormal3D:new Bt({size:1,datatype:ee.FLOAT_MAT3,getValue:function(e){return e.inverseNormal3D}}),czm_eyeHeight:new Bt({size:1,datatype:ee.FLOAT,getValue:function(e){return e.eyeHeight}}),czm_eyeHeight2D:new Bt({size:1,datatype:ee.FLOAT_VEC2,getValue:function(e){return e.eyeHeight2D}}),czm_eyeEllipsoidNormalEC:new Bt({size:1,datatype:ee.FLOAT_VEC3,getValue:function(e){return e.eyeEllipsoidNormalEC}}),czm_eyeEllipsoidCurvature:new Bt({size:1,datatype:ee.FLOAT_VEC2,getValue:function(e){return e.eyeEllipsoidCurvature}}),czm_modelToEnu:new Bt({size:1,datatype:ee.FLOAT_MAT4,getValue:function(e){return e.modelToEnu}}),czm_enuToModel:new Bt({size:1,datatype:ee.FLOAT_MAT4,getValue:function(e){return e.enuToModel}}),czm_entireFrustum:new Bt({size:1,datatype:ee.FLOAT_VEC2,getValue:function(e){return e.entireFrustum}}),czm_currentFrustum:new Bt({size:1,datatype:ee.FLOAT_VEC2,getValue:function(e){return e.currentFrustum}}),czm_frustumPlanes:new Bt({size:1,datatype:ee.FLOAT_VEC4,getValue:function(e){return e.frustumPlanes}}),czm_farDepthFromNearPlusOne:new Bt({size:1,datatype:ee.FLOAT,getValue:function(e){return e.farDepthFromNearPlusOne}}),czm_log2FarDepthFromNearPlusOne:new Bt({size:1,datatype:ee.FLOAT,getValue:function(e){return e.log2FarDepthFromNearPlusOne}}),czm_oneOverLog2FarDepthFromNearPlusOne:new Bt({size:1,datatype:ee.FLOAT,getValue:function(e){return e.oneOverLog2FarDepthFromNearPlusOne}}),czm_sunPositionWC:new Bt({size:1,datatype:ee.FLOAT_VEC3,getValue:function(e){return e.sunPositionWC}}),czm_sunPositionColumbusView:new Bt({size:1,datatype:ee.FLOAT_VEC3,getValue:function(e){return e.sunPositionColumbusView}}),czm_sunDirectionEC:new Bt({size:1,datatype:ee.FLOAT_VEC3,getValue:function(e){return e.sunDirectionEC}}),czm_sunDirectionWC:new Bt({size:1,datatype:ee.FLOAT_VEC3,getValue:function(e){return e.sunDirectionWC}}),czm_moonDirectionEC:new Bt({size:1,datatype:ee.FLOAT_VEC3,getValue:function(e){return e.moonDirectionEC}}),czm_lightDirectionEC:new Bt({size:1,datatype:ee.FLOAT_VEC3,getValue:function(e){return e.lightDirectionEC}}),czm_lightDirectionWC:new Bt({size:1,datatype:ee.FLOAT_VEC3,getValue:function(e){return e.lightDirectionWC}}),czm_lightColor:new Bt({size:1,datatype:ee.FLOAT_VEC3,getValue:function(e){return e.lightColor}}),czm_lightColorHdr:new Bt({size:1,datatype:ee.FLOAT_VEC3,getValue:function(e){return e.lightColorHdr}}),czm_encodedCameraPositionMCHigh:new Bt({size:1,datatype:ee.FLOAT_VEC3,getValue:function(e){return e.encodedCameraPositionMCHigh}}),czm_encodedCameraPositionMCLow:new Bt({size:1,datatype:ee.FLOAT_VEC3,getValue:function(e){return e.encodedCameraPositionMCLow}}),czm_viewerPositionWC:new Bt({size:1,datatype:ee.FLOAT_VEC3,getValue:function(e){return M.getTranslation(e.inverseView,KMe)}}),czm_frameNumber:new Bt({size:1,datatype:ee.FLOAT,getValue:function(e){return e.frameState.frameNumber}}),czm_morphTime:new Bt({size:1,datatype:ee.FLOAT,getValue:function(e){return e.frameState.morphTime}}),czm_sceneMode:new Bt({size:1,datatype:ee.FLOAT,getValue:function(e){return e.frameState.mode}}),czm_pass:new Bt({size:1,datatype:ee.FLOAT,getValue:function(e){return e.pass}}),czm_backgroundColor:new Bt({size:1,datatype:ee.FLOAT_VEC4,getValue:function(e){return e.backgroundColor}}),czm_brdfLut:new Bt({size:1,datatype:ee.SAMPLER_2D,getValue:function(e){return e.brdfLut}}),czm_environmentMap:new Bt({size:1,datatype:ee.SAMPLER_CUBE,getValue:function(e){return e.environmentMap}}),czm_specularEnvironmentMaps:new Bt({size:1,datatype:ee.SAMPLER_CUBE,getValue:function(e){return e.specularEnvironmentMaps}}),czm_specularEnvironmentMapsMaximumLOD:new Bt({size:1,datatype:ee.FLOAT,getValue:function(e){return e.specularEnvironmentMapsMaximumLOD}}),czm_sphericalHarmonicCoefficients:new Bt({size:9,datatype:ee.FLOAT_VEC3,getValue:function(e){return e.sphericalHarmonicCoefficients}}),czm_temeToPseudoFixed:new Bt({size:1,datatype:ee.FLOAT_MAT3,getValue:function(e){return e.temeToPseudoFixedMatrix}}),czm_pixelRatio:new Bt({size:1,datatype:ee.FLOAT,getValue:function(e){return e.pixelRatio}}),czm_fogDensity:new Bt({size:1,datatype:ee.FLOAT,getValue:function(e){return e.fogDensity}}),czm_fogVisualDensityScalar:new Bt({size:1,datatype:ee.FLOAT,getValue:function(e){return e.fogVisualDensityScalar}}),czm_fogMinimumBrightness:new Bt({size:1,datatype:ee.FLOAT,getValue:function(e){return e.fogMinimumBrightness}}),czm_atmosphereHsbShift:new Bt({size:1,datatype:ee.FLOAT_VEC3,getValue:function(e){return e.atmosphereHsbShift}}),czm_atmosphereLightIntensity:new Bt({size:1,datatype:ee.FLOAT,getValue:function(e){return e.atmosphereLightIntensity}}),czm_atmosphereRayleighCoefficient:new Bt({size:1,datatype:ee.FLOAT_VEC3,getValue:function(e){return e.atmosphereRayleighCoefficient}}),czm_atmosphereRayleighScaleHeight:new Bt({size:1,datatype:ee.FLOAT,getValue:function(e){return e.atmosphereRayleighScaleHeight}}),czm_atmosphereMieCoefficient:new Bt({size:1,datatype:ee.FLOAT_VEC3,getValue:function(e){return e.atmosphereMieCoefficient}}),czm_atmosphereMieScaleHeight:new Bt({size:1,datatype:ee.FLOAT,getValue:function(e){return e.atmosphereMieScaleHeight}}),czm_atmosphereMieAnisotropy:new Bt({size:1,datatype:ee.FLOAT,getValue:function(e){return e.atmosphereMieAnisotropy}}),czm_atmosphereDynamicLighting:new Bt({size:1,datatype:ee.FLOAT,getValue:function(e){return e.atmosphereDynamicLighting}}),czm_splitPosition:new Bt({size:1,datatype:ee.FLOAT,getValue:function(e){return e.splitPosition}}),czm_geometricToleranceOverMeter:new Bt({size:1,datatype:ee.FLOAT,getValue:function(e){return e.geometricToleranceOverMeter}}),czm_minimumDisableDepthTestDistance:new Bt({size:1,datatype:ee.FLOAT,getValue:function(e){return e.minimumDisableDepthTestDistance}}),czm_invertClassificationColor:new Bt({size:1,datatype:ee.FLOAT_VEC4,getValue:function(e){return e.invertClassificationColor}}),czm_gamma:new Bt({size:1,datatype:ee.FLOAT,getValue:function(e){return e.gamma}}),czm_ellipsoidRadii:new Bt({size:1,datatype:ee.FLOAT_VEC3,getValue:function(e){return e.ellipsoid.radii}}),czm_ellipsoidInverseRadii:new Bt({size:1,datatype:ee.FLOAT_VEC3,getValue:function(e){return e.ellipsoid.oneOverRadii}})},D0=QMe;function $Me(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}var jn=$Me;function JMe(){return!0}function ZMe(e,t){t=t??"This object was destroyed, i.e., destroy() was called.";function n(){}for(let i in e)typeof e[i]=="function"&&(e[i]=n);e.isDestroyed=JMe}var fe=ZMe;var ls={UNSIGNED_BYTE:ee.UNSIGNED_BYTE,UNSIGNED_SHORT:ee.UNSIGNED_SHORT,UNSIGNED_INT:ee.UNSIGNED_INT};ls.getSizeInBytes=function(e){switch(e){case ls.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case ls.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case ls.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT}};ls.fromSizeInBytes=function(e){switch(e){case 2:return ls.UNSIGNED_SHORT;case 4:return ls.UNSIGNED_INT;case 1:return ls.UNSIGNED_BYTE}};ls.validate=function(e){return l(e)&&(e===ls.UNSIGNED_BYTE||e===ls.UNSIGNED_SHORT||e===ls.UNSIGNED_INT)};ls.createTypedArray=function(e,t){return e>=D.SIXTY_FOUR_KILOBYTES?new Uint32Array(t):new Uint16Array(t)};ls.createTypedArrayFromArrayBuffer=function(e,t,n,i){return e>=D.SIXTY_FOUR_KILOBYTES?new Uint32Array(t,n,i):new Uint16Array(t,n,i)};ls.fromTypedArray=function(e){if(e instanceof Uint8Array)return ls.UNSIGNED_BYTE;if(e instanceof Uint16Array)return ls.UNSIGNED_SHORT;if(e instanceof Uint32Array)return ls.UNSIGNED_INT};Object.freeze(ls);var Ue=ls;var lx={STREAM_DRAW:ee.STREAM_DRAW,STATIC_DRAW:ee.STATIC_DRAW,DYNAMIC_DRAW:ee.DYNAMIC_DRAW,DYNAMIC_READ:ee.DYNAMIC_READ};lx.validate=function(e){return e===lx.STREAM_DRAW||e===lx.STATIC_DRAW||e===lx.DYNAMIC_DRAW||e===lx.DYNAMIC_READ};Object.freeze(lx);var Oe=lx;function qc(e){e=e??G.EMPTY_OBJECT;let t=e.context._gl,n=e.bufferTarget,i=e.typedArray,o=e.sizeInBytes,r=e.usage,a=l(i);a&&(o=i.byteLength);let s=t.createBuffer();t.bindBuffer(n,s),t.bufferData(n,a?i:o,r),t.bindBuffer(n,null),this._id=jn(),this._gl=t,this._webgl2=e.context._webgl2,this._bufferTarget=n,this._sizeInBytes=o,this._usage=r,this._buffer=s,this.vertexArrayDestroyable=!0}qc.createPixelBuffer=function(e){if(!e.context._webgl2)throw new _e("A WebGL 2 context is required to create PixelBuffers.");return new qc({context:e.context,bufferTarget:ee.PIXEL_PACK_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage})};qc.createVertexBuffer=function(e){return new qc({context:e.context,bufferTarget:ee.ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage})};qc.createIndexBuffer=function(e){let t=e.context,n=e.indexDatatype,i=Ue.getSizeInBytes(n),o=new qc({context:t,bufferTarget:ee.ELEMENT_ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage}),r=o.sizeInBytes/i;return Object.defineProperties(o,{indexDatatype:{get:function(){return n}},bytesPerIndex:{get:function(){return i}},numberOfIndices:{get:function(){return r}}}),o};Object.defineProperties(qc.prototype,{sizeInBytes:{get:function(){return this._sizeInBytes}},usage:{get:function(){return this._usage}}});qc.prototype._getBuffer=function(){return this._buffer};qc.prototype._bind=function(){let e=this._gl,t=this._bufferTarget;e.bindBuffer(t,this._buffer)};qc.prototype._unBind=function(){let e=this._gl,t=this._bufferTarget;e.bindBuffer(t,null)};qc.prototype.copyFromArrayView=function(e,t){t=t??0;let n=this._gl,i=this._bufferTarget;n.bindBuffer(i,this._buffer),n.bufferSubData(i,t,e),n.bindBuffer(i,null)};qc.prototype.copyFromBuffer=function(e,t,n,i){let o=ee.COPY_READ_BUFFER,r=ee.COPY_WRITE_BUFFER,a=this._gl;a.bindBuffer(r,this._buffer),a.bindBuffer(o,e._buffer),a.copyBufferSubData(o,r,t,n,i),a.bindBuffer(r,null),a.bindBuffer(o,null)};qc.prototype.getBufferData=function(e,t,n,i){t=t??0,n=n??0;let o=this._gl,r=ee.COPY_READ_BUFFER;o.bindBuffer(r,this._buffer),o.getBufferSubData(r,t,e,n,i),o.bindBuffer(r,null)};qc.prototype.isDestroyed=function(){return!1};qc.prototype.destroy=function(){return this._gl.deleteBuffer(this._buffer),fe(this)};var Ke=qc;var q_,ca={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},Au={};Object.defineProperties(Au,{element:{get:function(){if(Au.supportsFullscreen())return document[ca.fullscreenElement]}},changeEventName:{get:function(){if(Au.supportsFullscreen())return ca.fullscreenchange}},errorEventName:{get:function(){if(Au.supportsFullscreen())return ca.fullscreenerror}},enabled:{get:function(){if(Au.supportsFullscreen())return document[ca.fullscreenEnabled]}},fullscreen:{get:function(){if(Au.supportsFullscreen())return Au.element!==null}}});Au.supportsFullscreen=function(){if(l(q_))return q_;q_=!1;let e=document.body;if(typeof e.requestFullscreen=="function")return ca.requestFullscreen="requestFullscreen",ca.exitFullscreen="exitFullscreen",ca.fullscreenEnabled="fullscreenEnabled",ca.fullscreenElement="fullscreenElement",ca.fullscreenchange="fullscreenchange",ca.fullscreenerror="fullscreenerror",q_=!0,q_;let t=["webkit","moz","o","ms","khtml"],n;for(let i=0,o=t.length;i<o;++i){let r=t[i];n=`${r}RequestFullscreen`,typeof e[n]=="function"?(ca.requestFullscreen=n,q_=!0):(n=`${r}RequestFullScreen`,typeof e[n]=="function"&&(ca.requestFullscreen=n,q_=!0)),n=`${r}ExitFullscreen`,typeof document[n]=="function"?ca.exitFullscreen=n:(n=`${r}CancelFullScreen`,typeof document[n]=="function"&&(ca.exitFullscreen=n)),n=`${r}FullscreenEnabled`,document[n]!==void 0?ca.fullscreenEnabled=n:(n=`${r}FullScreenEnabled`,document[n]!==void 0&&(ca.fullscreenEnabled=n)),n=`${r}FullscreenElement`,document[n]!==void 0?ca.fullscreenElement=n:(n=`${r}FullScreenElement`,document[n]!==void 0&&(ca.fullscreenElement=n)),n=`${r}fullscreenchange`,document[`on${n}`]!==void 0&&(r==="ms"&&(n="MSFullscreenChange"),ca.fullscreenchange=n),n=`${r}fullscreenerror`,document[`on${n}`]!==void 0&&(r==="ms"&&(n="MSFullscreenError"),ca.fullscreenerror=n)}return q_};Au.requestFullscreen=function(e,t){Au.supportsFullscreen()&&e[ca.requestFullscreen]({vrDisplay:t})};Au.exitFullscreen=function(){Au.supportsFullscreen()&&document[ca.exitFullscreen]()};Au._names=ca;var Xr=Au;var fd;typeof navigator<"u"?fd=navigator:fd={};function QI(e){let t=e.split(".");for(let n=0,i=t.length;n<i;++n)t[n]=parseInt(t[n],10);return t}var z4,Hre;function u7(){if(!l(z4)&&(z4=!1,!W4())){let e=/ Chrome\/([\.0-9]+)/.exec(fd.userAgent);e!==null&&(z4=!0,Hre=QI(e[1]))}return z4}function eBe(){return u7()&&Hre}var U4,Wre;function qre(){if(!l(U4)&&(U4=!1,!u7()&&!W4()&&/ Safari\/[\.0-9]+/.test(fd.userAgent))){let e=/ Version\/([\.0-9]+)/.exec(fd.userAgent);e!==null&&(U4=!0,Wre=QI(e[1]))}return U4}function tBe(){return qre()&&Wre}var V4,l7;function Yre(){if(!l(V4)){V4=!1;let e=/ AppleWebKit\/([\.0-9]+)(\+?)/.exec(fd.userAgent);e!==null&&(V4=!0,l7=QI(e[1]),l7.isNightly=!!e[2])}return V4}function nBe(){return Yre()&&l7}var j4,Xre;function W4(){if(!l(j4)){j4=!1;let e=/ Edg\/([\.0-9]+)/.exec(fd.userAgent);e!==null&&(j4=!0,Xre=QI(e[1]))}return j4}function iBe(){return W4()&&Xre}var G4,f7;function q4(){if(!l(G4)){G4=!1;let e=/Firefox\/([\.0-9]+)/.exec(fd.userAgent);e!==null&&(G4=!0,f7=QI(e[1]))}return G4}var a7;function oBe(){return l(a7)||(a7=/Windows/i.test(fd.appVersion)),a7}var s7;function rBe(){return l(s7)||(s7=navigator.platform==="iPhone"||navigator.platform==="iPod"||navigator.platform==="iPad"),s7}function aBe(){return q4()&&f7}var c7;function sBe(){return l(c7)||(c7=!q4()&&typeof PointerEvent<"u"&&(!l(fd.pointerEnabled)||fd.pointerEnabled)),c7}var Kre,H4;function Qre(){if(!l(H4)){let e=document.createElement("canvas");e.setAttribute("style","image-rendering: -moz-crisp-edges;image-rendering: pixelated;");let t=e.style.imageRendering;H4=l(t)&&t!=="",H4&&(Kre=t)}return H4}function cBe(){return Qre()?Kre:void 0}function Sl(){return Sl._result}Sl._promise=void 0;Sl._result=void 0;Sl.initialize=function(){return l(Sl._promise)||(Sl._promise=new Promise(e=>{let t=new Image;t.onload=function(){Sl._result=t.width>0&&t.height>0,e(Sl._result)},t.onerror=function(){Sl._result=!1,e(Sl._result)},t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"})),Sl._promise};Object.defineProperties(Sl,{initialized:{get:function(){return l(Sl._result)}}});var dE=[];typeof ArrayBuffer<"u"&&(dE.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),typeof Uint8ClampedArray<"u"&&dE.push(Uint8ClampedArray),typeof Uint8ClampedArray<"u"&&dE.push(Uint8ClampedArray),typeof BigInt64Array<"u"&&dE.push(BigInt64Array),typeof BigUint64Array<"u"&&dE.push(BigUint64Array));var dd={isChrome:u7,chromeVersion:eBe,isSafari:qre,safariVersion:tBe,isWebkit:Yre,webkitVersion:nBe,isEdge:W4,edgeVersion:iBe,isFirefox:q4,firefoxVersion:aBe,isWindows:oBe,isIPadOrIOS:rBe,hardwareConcurrency:fd.hardwareConcurrency??3,supportsPointerEvents:sBe,supportsImageRenderingPixelated:Qre,supportsWebP:Sl,imageRenderingValue:cBe,typedArrayTypes:dE};dd.supportsBasis=function(e){return dd.supportsWebAssembly()&&e.context.supportsBasis};dd.supportsFullscreen=function(){return Xr.supportsFullscreen()};dd.supportsTypedArrays=function(){return typeof ArrayBuffer<"u"};dd.supportsBigInt64Array=function(){return typeof BigInt64Array<"u"};dd.supportsBigUint64Array=function(){return typeof BigUint64Array<"u"};dd.supportsBigInt=function(){return typeof BigInt<"u"};dd.supportsWebWorkers=function(){return typeof Worker<"u"};dd.supportsWebAssembly=function(){return typeof WebAssembly<"u"};dd.supportsWebgl2=function(e){return e.context.webgl2};dd.supportsEsmWebWorkers=function(){return!q4()||parseInt(f7)>=114};var sn=dd;function d7(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n*6<1?e+(t-e)*6*n:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}var Ae=class e{constructor(t,n,i,o){this.red=t??1,this.green=n??1,this.blue=i??1,this.alpha=o??1}static fromCartesian4(t,n){return l(n)?(n.red=t.x,n.green=t.y,n.blue=t.z,n.alpha=t.w,n):new e(t.x,t.y,t.z,t.w)}static fromBytes(t,n,i,o,r){return t=e.byteToFloat(t??255),n=e.byteToFloat(n??255),i=e.byteToFloat(i??255),o=e.byteToFloat(o??255),l(r)?(r.red=t,r.green=n,r.blue=i,r.alpha=o,r):new e(t,n,i,o)}static fromAlpha(t,n,i){return l(i)?(i.red=t.red,i.green=t.green,i.blue=t.blue,i.alpha=n,i):new e(t.red,t.green,t.blue,n)}static fromRgba(t,n){return m7[0]=t,e.fromBytes(P0[0],P0[1],P0[2],P0[3],n)}static fromHsl(t,n,i,o,r){t=(t??0)%1,n=n??0,i=i??0,o=o??1;let a=i,s=i,c=i;if(n!==0){let u;i<.5?u=i*(1+n):u=i+n-i*n;let f=2*i-u;a=d7(f,u,t+1/3),s=d7(f,u,t),c=d7(f,u,t-1/3)}return l(r)?(r.red=a,r.green=s,r.blue=c,r.alpha=o,r):new e(a,s,c,o)}static fromRandom(t,n){t=t??G.EMPTY_OBJECT;let i=t.red;if(!l(i)){let s=t.minimumRed??0,c=t.maximumRed??1;i=s+D.nextRandomNumber()*(c-s)}let o=t.green;if(!l(o)){let s=t.minimumGreen??0,c=t.maximumGreen??1;o=s+D.nextRandomNumber()*(c-s)}let r=t.blue;if(!l(r)){let s=t.minimumBlue??0,c=t.maximumBlue??1;r=s+D.nextRandomNumber()*(c-s)}let a=t.alpha;if(!l(a)){let s=t.minimumAlpha??0,c=t.maximumAlpha??1;a=s+D.nextRandomNumber()*(c-s)}return l(n)?(n.red=i,n.green=o,n.blue=r,n.alpha=a,n):new e(i,o,r,a)}static fromCssColorString(t,n){l(n)||(n=new e),t=t.trim();let i=e[t.toUpperCase()];if(l(i))return e.clone(i,n),n;let o=lBe.exec(t);return o!==null?(n.red=parseInt(o[1],16)/15,n.green=parseInt(o[2],16)/15,n.blue=parseInt(o[3],16)/15,n.alpha=parseInt(o[4]??"f",16)/15,n):(o=uBe.exec(t),o!==null?(n.red=parseInt(o[1],16)/255,n.green=parseInt(o[2],16)/255,n.blue=parseInt(o[3],16)/255,n.alpha=parseInt(o[4]??"ff",16)/255,n):(o=fBe.exec(t),o!==null?(n.red=parseFloat(o[1])/(o[1].substr(-1)==="%"?100:255),n.green=parseFloat(o[2])/(o[2].substr(-1)==="%"?100:255),n.blue=parseFloat(o[3])/(o[3].substr(-1)==="%"?100:255),n.alpha=parseFloat(o[4]??"1.0"),n):(o=dBe.exec(t),o!==null?e.fromHsl(parseFloat(o[1])/360,parseFloat(o[2])/100,parseFloat(o[3])/100,parseFloat(o[4]??"1.0"),n):(n=void 0,n))))}static pack(t,n,i){return i=i??0,n[i++]=t.red,n[i++]=t.green,n[i++]=t.blue,n[i]=t.alpha,n}static unpack(t,n,i){return n=n??0,l(i)||(i=new e),i.red=t[n++],i.green=t[n++],i.blue=t[n++],i.alpha=t[n],i}static byteToFloat(t){return t/255}static floatToByte(t){return t===1?255:t*256|0}static clone(t,n){if(l(t))return l(n)?(n.red=t.red,n.green=t.green,n.blue=t.blue,n.alpha=t.alpha,n):new e(t.red,t.green,t.blue,t.alpha)}static equals(t,n){return t===n||l(t)&&l(n)&&t.red===n.red&&t.green===n.green&&t.blue===n.blue&&t.alpha===n.alpha}static equalsArray(t,n,i){return t.red===n[i]&&t.green===n[i+1]&&t.blue===n[i+2]&&t.alpha===n[i+3]}clone(t){return e.clone(this,t)}equals(t){return e.equals(this,t)}equalsEpsilon(t,n){return this===t||l(t)&&Math.abs(this.red-t.red)<=n&&Math.abs(this.green-t.green)<=n&&Math.abs(this.blue-t.blue)<=n&&Math.abs(this.alpha-t.alpha)<=n}toString(){return`(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`}toCssColorString(){let t=e.floatToByte(this.red),n=e.floatToByte(this.green),i=e.floatToByte(this.blue);return this.alpha===1?`rgb(${t},${n},${i})`:`rgba(${t},${n},${i},${this.alpha})`}toCssHexString(){let t=e.floatToByte(this.red).toString(16);t.length<2&&(t=`0${t}`);let n=e.floatToByte(this.green).toString(16);n.length<2&&(n=`0${n}`);let i=e.floatToByte(this.blue).toString(16);if(i.length<2&&(i=`0${i}`),this.alpha<1){let o=e.floatToByte(this.alpha).toString(16);return o.length<2&&(o=`0${o}`),`#${t}${n}${i}${o}`}return`#${t}${n}${i}`}toBytes(t){let n=e.floatToByte(this.red),i=e.floatToByte(this.green),o=e.floatToByte(this.blue),r=e.floatToByte(this.alpha);return l(t)?(t[0]=n,t[1]=i,t[2]=o,t[3]=r,t):[n,i,o,r]}static bytesToRgba(t,n,i,o){return P0[0]=t,P0[1]=n,P0[2]=i,P0[3]=o,m7[0]}toRgba(){return e.bytesToRgba(e.floatToByte(this.red),e.floatToByte(this.green),e.floatToByte(this.blue),e.floatToByte(this.alpha))}brighten(t,n){return t=1-t,n.red=1-(1-this.red)*t,n.green=1-(1-this.green)*t,n.blue=1-(1-this.blue)*t,n.alpha=this.alpha,n}darken(t,n){return t=1-t,n.red=this.red*t,n.green=this.green*t,n.blue=this.blue*t,n.alpha=this.alpha,n}withAlpha(t,n){return e.fromAlpha(this,t,n)}static add(t,n,i){return i.red=t.red+n.red,i.green=t.green+n.green,i.blue=t.blue+n.blue,i.alpha=t.alpha+n.alpha,i}static subtract(t,n,i){return i.red=t.red-n.red,i.green=t.green-n.green,i.blue=t.blue-n.blue,i.alpha=t.alpha-n.alpha,i}static multiply(t,n,i){return i.red=t.red*n.red,i.green=t.green*n.green,i.blue=t.blue*n.blue,i.alpha=t.alpha*n.alpha,i}static divide(t,n,i){return i.red=t.red/n.red,i.green=t.green/n.green,i.blue=t.blue/n.blue,i.alpha=t.alpha/n.alpha,i}static mod(t,n,i){return i.red=t.red%n.red,i.green=t.green%n.green,i.blue=t.blue%n.blue,i.alpha=t.alpha%n.alpha,i}static lerp(t,n,i,o){return o.red=D.lerp(t.red,n.red,i),o.green=D.lerp(t.green,n.green,i),o.blue=D.lerp(t.blue,n.blue,i),o.alpha=D.lerp(t.alpha,n.alpha,i),o}static multiplyByScalar(t,n,i){return i.red=t.red*n,i.green=t.green*n,i.blue=t.blue*n,i.alpha=t.alpha*n,i}static divideByScalar(t,n,i){return i.red=t.red/n,i.green=t.green/n,i.blue=t.blue/n,i.alpha=t.alpha/n,i}},h7,m7,P0;sn.supportsTypedArrays()&&(h7=new ArrayBuffer(4),m7=new Uint32Array(h7),P0=new Uint8Array(h7));var lBe=/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,uBe=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i,fBe=/^rgba?\s*\(\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i,dBe=/^hsla?\s*\(\s*([0-9.]+)\s*[,\s]+\s*([0-9.]+%)\s*[,\s]+\s*([0-9.]+%)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i;Ae.packedLength=4;Ae.ALICEBLUE=Object.freeze(Ae.fromCssColorString("#F0F8FF"));Ae.ANTIQUEWHITE=Object.freeze(Ae.fromCssColorString("#FAEBD7"));Ae.AQUA=Object.freeze(Ae.fromCssColorString("#00FFFF"));Ae.AQUAMARINE=Object.freeze(Ae.fromCssColorString("#7FFFD4"));Ae.AZURE=Object.freeze(Ae.fromCssColorString("#F0FFFF"));Ae.BEIGE=Object.freeze(Ae.fromCssColorString("#F5F5DC"));Ae.BISQUE=Object.freeze(Ae.fromCssColorString("#FFE4C4"));Ae.BLACK=Object.freeze(Ae.fromCssColorString("#000000"));Ae.BLANCHEDALMOND=Object.freeze(Ae.fromCssColorString("#FFEBCD"));Ae.BLUE=Object.freeze(Ae.fromCssColorString("#0000FF"));Ae.BLUEVIOLET=Object.freeze(Ae.fromCssColorString("#8A2BE2"));Ae.BROWN=Object.freeze(Ae.fromCssColorString("#A52A2A"));Ae.BURLYWOOD=Object.freeze(Ae.fromCssColorString("#DEB887"));Ae.CADETBLUE=Object.freeze(Ae.fromCssColorString("#5F9EA0"));Ae.CHARTREUSE=Object.freeze(Ae.fromCssColorString("#7FFF00"));Ae.CHOCOLATE=Object.freeze(Ae.fromCssColorString("#D2691E"));Ae.CORAL=Object.freeze(Ae.fromCssColorString("#FF7F50"));Ae.CORNFLOWERBLUE=Object.freeze(Ae.fromCssColorString("#6495ED"));Ae.CORNSILK=Object.freeze(Ae.fromCssColorString("#FFF8DC"));Ae.CRIMSON=Object.freeze(Ae.fromCssColorString("#DC143C"));Ae.CYAN=Object.freeze(Ae.fromCssColorString("#00FFFF"));Ae.DARKBLUE=Object.freeze(Ae.fromCssColorString("#00008B"));Ae.DARKCYAN=Object.freeze(Ae.fromCssColorString("#008B8B"));Ae.DARKGOLDENROD=Object.freeze(Ae.fromCssColorString("#B8860B"));Ae.DARKGRAY=Object.freeze(Ae.fromCssColorString("#A9A9A9"));Ae.DARKGREEN=Object.freeze(Ae.fromCssColorString("#006400"));Ae.DARKGREY=Ae.DARKGRAY;Ae.DARKKHAKI=Object.freeze(Ae.fromCssColorString("#BDB76B"));Ae.DARKMAGENTA=Object.freeze(Ae.fromCssColorString("#8B008B"));Ae.DARKOLIVEGREEN=Object.freeze(Ae.fromCssColorString("#556B2F"));Ae.DARKORANGE=Object.freeze(Ae.fromCssColorString("#FF8C00"));Ae.DARKORCHID=Object.freeze(Ae.fromCssColorString("#9932CC"));Ae.DARKRED=Object.freeze(Ae.fromCssColorString("#8B0000"));Ae.DARKSALMON=Object.freeze(Ae.fromCssColorString("#E9967A"));Ae.DARKSEAGREEN=Object.freeze(Ae.fromCssColorString("#8FBC8F"));Ae.DARKSLATEBLUE=Object.freeze(Ae.fromCssColorString("#483D8B"));Ae.DARKSLATEGRAY=Object.freeze(Ae.fromCssColorString("#2F4F4F"));Ae.DARKSLATEGREY=Ae.DARKSLATEGRAY;Ae.DARKTURQUOISE=Object.freeze(Ae.fromCssColorString("#00CED1"));Ae.DARKVIOLET=Object.freeze(Ae.fromCssColorString("#9400D3"));Ae.DEEPPINK=Object.freeze(Ae.fromCssColorString("#FF1493"));Ae.DEEPSKYBLUE=Object.freeze(Ae.fromCssColorString("#00BFFF"));Ae.DIMGRAY=Object.freeze(Ae.fromCssColorString("#696969"));Ae.DIMGREY=Ae.DIMGRAY;Ae.DODGERBLUE=Object.freeze(Ae.fromCssColorString("#1E90FF"));Ae.FIREBRICK=Object.freeze(Ae.fromCssColorString("#B22222"));Ae.FLORALWHITE=Object.freeze(Ae.fromCssColorString("#FFFAF0"));Ae.FORESTGREEN=Object.freeze(Ae.fromCssColorString("#228B22"));Ae.FUCHSIA=Object.freeze(Ae.fromCssColorString("#FF00FF"));Ae.GAINSBORO=Object.freeze(Ae.fromCssColorString("#DCDCDC"));Ae.GHOSTWHITE=Object.freeze(Ae.fromCssColorString("#F8F8FF"));Ae.GOLD=Object.freeze(Ae.fromCssColorString("#FFD700"));Ae.GOLDENROD=Object.freeze(Ae.fromCssColorString("#DAA520"));Ae.GRAY=Object.freeze(Ae.fromCssColorString("#808080"));Ae.GREEN=Object.freeze(Ae.fromCssColorString("#008000"));Ae.GREENYELLOW=Object.freeze(Ae.fromCssColorString("#ADFF2F"));Ae.GREY=Ae.GRAY;Ae.HONEYDEW=Object.freeze(Ae.fromCssColorString("#F0FFF0"));Ae.HOTPINK=Object.freeze(Ae.fromCssColorString("#FF69B4"));Ae.INDIANRED=Object.freeze(Ae.fromCssColorString("#CD5C5C"));Ae.INDIGO=Object.freeze(Ae.fromCssColorString("#4B0082"));Ae.IVORY=Object.freeze(Ae.fromCssColorString("#FFFFF0"));Ae.KHAKI=Object.freeze(Ae.fromCssColorString("#F0E68C"));Ae.LAVENDER=Object.freeze(Ae.fromCssColorString("#E6E6FA"));Ae.LAVENDAR_BLUSH=Object.freeze(Ae.fromCssColorString("#FFF0F5"));Ae.LAWNGREEN=Object.freeze(Ae.fromCssColorString("#7CFC00"));Ae.LEMONCHIFFON=Object.freeze(Ae.fromCssColorString("#FFFACD"));Ae.LIGHTBLUE=Object.freeze(Ae.fromCssColorString("#ADD8E6"));Ae.LIGHTCORAL=Object.freeze(Ae.fromCssColorString("#F08080"));Ae.LIGHTCYAN=Object.freeze(Ae.fromCssColorString("#E0FFFF"));Ae.LIGHTGOLDENRODYELLOW=Object.freeze(Ae.fromCssColorString("#FAFAD2"));Ae.LIGHTGRAY=Object.freeze(Ae.fromCssColorString("#D3D3D3"));Ae.LIGHTGREEN=Object.freeze(Ae.fromCssColorString("#90EE90"));Ae.LIGHTGREY=Ae.LIGHTGRAY;Ae.LIGHTPINK=Object.freeze(Ae.fromCssColorString("#FFB6C1"));Ae.LIGHTSEAGREEN=Object.freeze(Ae.fromCssColorString("#20B2AA"));Ae.LIGHTSKYBLUE=Object.freeze(Ae.fromCssColorString("#87CEFA"));Ae.LIGHTSLATEGRAY=Object.freeze(Ae.fromCssColorString("#778899"));Ae.LIGHTSLATEGREY=Ae.LIGHTSLATEGRAY;Ae.LIGHTSTEELBLUE=Object.freeze(Ae.fromCssColorString("#B0C4DE"));Ae.LIGHTYELLOW=Object.freeze(Ae.fromCssColorString("#FFFFE0"));Ae.LIME=Object.freeze(Ae.fromCssColorString("#00FF00"));Ae.LIMEGREEN=Object.freeze(Ae.fromCssColorString("#32CD32"));Ae.LINEN=Object.freeze(Ae.fromCssColorString("#FAF0E6"));Ae.MAGENTA=Object.freeze(Ae.fromCssColorString("#FF00FF"));Ae.MAROON=Object.freeze(Ae.fromCssColorString("#800000"));Ae.MEDIUMAQUAMARINE=Object.freeze(Ae.fromCssColorString("#66CDAA"));Ae.MEDIUMBLUE=Object.freeze(Ae.fromCssColorString("#0000CD"));Ae.MEDIUMORCHID=Object.freeze(Ae.fromCssColorString("#BA55D3"));Ae.MEDIUMPURPLE=Object.freeze(Ae.fromCssColorString("#9370DB"));Ae.MEDIUMSEAGREEN=Object.freeze(Ae.fromCssColorString("#3CB371"));Ae.MEDIUMSLATEBLUE=Object.freeze(Ae.fromCssColorString("#7B68EE"));Ae.MEDIUMSPRINGGREEN=Object.freeze(Ae.fromCssColorString("#00FA9A"));Ae.MEDIUMTURQUOISE=Object.freeze(Ae.fromCssColorString("#48D1CC"));Ae.MEDIUMVIOLETRED=Object.freeze(Ae.fromCssColorString("#C71585"));Ae.MIDNIGHTBLUE=Object.freeze(Ae.fromCssColorString("#191970"));Ae.MINTCREAM=Object.freeze(Ae.fromCssColorString("#F5FFFA"));Ae.MISTYROSE=Object.freeze(Ae.fromCssColorString("#FFE4E1"));Ae.MOCCASIN=Object.freeze(Ae.fromCssColorString("#FFE4B5"));Ae.NAVAJOWHITE=Object.freeze(Ae.fromCssColorString("#FFDEAD"));Ae.NAVY=Object.freeze(Ae.fromCssColorString("#000080"));Ae.OLDLACE=Object.freeze(Ae.fromCssColorString("#FDF5E6"));Ae.OLIVE=Object.freeze(Ae.fromCssColorString("#808000"));Ae.OLIVEDRAB=Object.freeze(Ae.fromCssColorString("#6B8E23"));Ae.ORANGE=Object.freeze(Ae.fromCssColorString("#FFA500"));Ae.ORANGERED=Object.freeze(Ae.fromCssColorString("#FF4500"));Ae.ORCHID=Object.freeze(Ae.fromCssColorString("#DA70D6"));Ae.PALEGOLDENROD=Object.freeze(Ae.fromCssColorString("#EEE8AA"));Ae.PALEGREEN=Object.freeze(Ae.fromCssColorString("#98FB98"));Ae.PALETURQUOISE=Object.freeze(Ae.fromCssColorString("#AFEEEE"));Ae.PALEVIOLETRED=Object.freeze(Ae.fromCssColorString("#DB7093"));Ae.PAPAYAWHIP=Object.freeze(Ae.fromCssColorString("#FFEFD5"));Ae.PEACHPUFF=Object.freeze(Ae.fromCssColorString("#FFDAB9"));Ae.PERU=Object.freeze(Ae.fromCssColorString("#CD853F"));Ae.PINK=Object.freeze(Ae.fromCssColorString("#FFC0CB"));Ae.PLUM=Object.freeze(Ae.fromCssColorString("#DDA0DD"));Ae.POWDERBLUE=Object.freeze(Ae.fromCssColorString("#B0E0E6"));Ae.PURPLE=Object.freeze(Ae.fromCssColorString("#800080"));Ae.RED=Object.freeze(Ae.fromCssColorString("#FF0000"));Ae.ROSYBROWN=Object.freeze(Ae.fromCssColorString("#BC8F8F"));Ae.ROYALBLUE=Object.freeze(Ae.fromCssColorString("#4169E1"));Ae.SADDLEBROWN=Object.freeze(Ae.fromCssColorString("#8B4513"));Ae.SALMON=Object.freeze(Ae.fromCssColorString("#FA8072"));Ae.SANDYBROWN=Object.freeze(Ae.fromCssColorString("#F4A460"));Ae.SEAGREEN=Object.freeze(Ae.fromCssColorString("#2E8B57"));Ae.SEASHELL=Object.freeze(Ae.fromCssColorString("#FFF5EE"));Ae.SIENNA=Object.freeze(Ae.fromCssColorString("#A0522D"));Ae.SILVER=Object.freeze(Ae.fromCssColorString("#C0C0C0"));Ae.SKYBLUE=Object.freeze(Ae.fromCssColorString("#87CEEB"));Ae.SLATEBLUE=Object.freeze(Ae.fromCssColorString("#6A5ACD"));Ae.SLATEGRAY=Object.freeze(Ae.fromCssColorString("#708090"));Ae.SLATEGREY=Ae.SLATEGRAY;Ae.SNOW=Object.freeze(Ae.fromCssColorString("#FFFAFA"));Ae.SPRINGGREEN=Object.freeze(Ae.fromCssColorString("#00FF7F"));Ae.STEELBLUE=Object.freeze(Ae.fromCssColorString("#4682B4"));Ae.TAN=Object.freeze(Ae.fromCssColorString("#D2B48C"));Ae.TEAL=Object.freeze(Ae.fromCssColorString("#008080"));Ae.THISTLE=Object.freeze(Ae.fromCssColorString("#D8BFD8"));Ae.TOMATO=Object.freeze(Ae.fromCssColorString("#FF6347"));Ae.TURQUOISE=Object.freeze(Ae.fromCssColorString("#40E0D0"));Ae.VIOLET=Object.freeze(Ae.fromCssColorString("#EE82EE"));Ae.WHEAT=Object.freeze(Ae.fromCssColorString("#F5DEB3"));Ae.WHITE=Object.freeze(Ae.fromCssColorString("#FFFFFF"));Ae.WHITESMOKE=Object.freeze(Ae.fromCssColorString("#F5F5F5"));Ae.YELLOW=Object.freeze(Ae.fromCssColorString("#FFFF00"));Ae.YELLOWGREEN=Object.freeze(Ae.fromCssColorString("#9ACD32"));Ae.TRANSPARENT=Object.freeze(new Ae(0,0,0,0));var V=Ae;function Y4(e){e=e??G.EMPTY_OBJECT,this.color=e.color,this.depth=e.depth,this.stencil=e.stencil,this.renderState=e.renderState,this.framebuffer=e.framebuffer,this.owner=e.owner,this.pass=e.pass}Y4.ALL=Object.freeze(new Y4({color:new V(0,0,0,0),depth:1,stencil:0}));Y4.prototype.execute=function(e,t){e.clear(this,t)};var ai=Y4;var $re={ENVIRONMENT:0,COMPUTE:1,GLOBE:2,TERRAIN_CLASSIFICATION:3,CESIUM_3D_TILE_EDGES:4,CESIUM_3D_TILE:5,CESIUM_3D_TILE_CLASSIFICATION:6,CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW:7,OPAQUE:8,TRANSLUCENT:9,VOXELS:10,GAUSSIAN_SPLATS:11,CESIUM_3D_TILE_EDGES_DIRECT:12,OVERLAY:13,NUMBER_OF_PASSES:14};Object.freeze($re);var Ie=$re;function Jre(e){e=e??G.EMPTY_OBJECT,this.vertexArray=e.vertexArray,this.fragmentShaderSource=e.fragmentShaderSource,this.shaderProgram=e.shaderProgram,this.uniformMap=e.uniformMap,this.outputTexture=e.outputTexture,this.preExecute=e.preExecute,this.postExecute=e.postExecute,this.canceled=e.canceled,this.persists=e.persists??!1,this.pass=Ie.COMPUTE,this.owner=e.owner}Jre.prototype.execute=function(e){e.execute(this)};var wl=Jre;var la=class e{constructor(t,n){this.x=t??0,this.y=n??0}static fromElements(t,n,i){return l(i)?(i.x=t,i.y=n,i):new e(t,n)}static clone(t,n){if(l(t))return l(n)?(n.x=t.x,n.y=t.y,n):new e(t.x,t.y)}static pack(t,n,i){return i=i??0,n[i++]=t.x,n[i]=t.y,n}static unpack(t,n,i){return n=n??0,l(i)||(i=new e),i.x=t[n++],i.y=t[n],i}static packArray(t,n){let i=t.length,o=i*2;l(n)?!Array.isArray(n)&&n.length!==o||n.length!==o&&(n.length=o):n=new Array(o);for(let r=0;r<i;++r)e.pack(t[r],n,r*2);return n}static unpackArray(t,n){let i=t.length;l(n)?n.length=i/2:n=new Array(i/2);for(let o=0;o<i;o+=2){let r=o/2;n[r]=e.unpack(t,o,n[r])}return n}static maximumComponent(t){return Math.max(t.x,t.y)}static minimumComponent(t){return Math.min(t.x,t.y)}static minimumByComponent(t,n,i){return i.x=Math.min(t.x,n.x),i.y=Math.min(t.y,n.y),i}static maximumByComponent(t,n,i){return i.x=Math.max(t.x,n.x),i.y=Math.max(t.y,n.y),i}static clamp(t,n,i,o){let r=D.clamp(t.x,n.x,i.x),a=D.clamp(t.y,n.y,i.y);return o.x=r,o.y=a,o}static magnitudeSquared(t){return t.x*t.x+t.y*t.y}static magnitude(t){return Math.sqrt(e.magnitudeSquared(t))}static distance(t,n){return e.subtract(t,n,X4),e.magnitude(X4)}static distanceSquared(t,n){return e.subtract(t,n,X4),e.magnitudeSquared(X4)}static normalize(t,n){let i=e.magnitude(t);return n.x=t.x/i,n.y=t.y/i,n}static dot(t,n){return t.x*n.x+t.y*n.y}static cross(t,n){return t.x*n.y-t.y*n.x}static multiplyComponents(t,n,i){return i.x=t.x*n.x,i.y=t.y*n.y,i}static divideComponents(t,n,i){return i.x=t.x/n.x,i.y=t.y/n.y,i}static add(t,n,i){return i.x=t.x+n.x,i.y=t.y+n.y,i}static subtract(t,n,i){return i.x=t.x-n.x,i.y=t.y-n.y,i}static multiplyByScalar(t,n,i){return i.x=t.x*n,i.y=t.y*n,i}static divideByScalar(t,n,i){return i.x=t.x/n,i.y=t.y/n,i}static negate(t,n){return n.x=-t.x,n.y=-t.y,n}static abs(t,n){return n.x=Math.abs(t.x),n.y=Math.abs(t.y),n}static lerp(t,n,i,o){return e.multiplyByScalar(n,i,Zre),o=e.multiplyByScalar(t,1-i,o),e.add(Zre,o,o)}static angleBetween(t,n){return e.normalize(t,eae),e.normalize(n,tae),D.acosClamped(e.dot(eae,tae))}static mostOrthogonalAxis(t,n){let i=e.normalize(t,hBe);return e.abs(i,i),i.x<=i.y?n=e.clone(e.UNIT_X,n):n=e.clone(e.UNIT_Y,n),n}static equals(t,n){return t===n||l(t)&&l(n)&&t.x===n.x&&t.y===n.y}static equalsArray(t,n,i){return t.x===n[i]&&t.y===n[i+1]}static equalsEpsilon(t,n,i,o){return t===n||l(t)&&l(n)&&D.equalsEpsilon(t.x,n.x,i,o)&&D.equalsEpsilon(t.y,n.y,i,o)}clone(t){return e.clone(this,t)}equals(t){return e.equals(this,t)}equalsEpsilon(t,n,i){return e.equalsEpsilon(this,t,n,i)}toString(){return`(${this.x}, ${this.y})`}};la.fromCartesian3=la.clone;la.fromCartesian4=la.clone;la.packedLength=2;la.fromArray=la.unpack;var X4=new la,Zre=new la,eae=new la,tae=new la,hBe=new la;la.ZERO=Object.freeze(new la(0,0));la.ONE=Object.freeze(new la(1,1));la.UNIT_X=Object.freeze(new la(1,0));la.UNIT_Y=Object.freeze(new la(0,1));var z=la;var mBe=new h,pBe=new h;function gBe(e,t,n,i,o){let r=e.x,a=e.y,s=e.z,c=t.x,u=t.y,f=t.z,d=r*r*c*c,p=a*a*u*u,g=s*s*f*f,m=d+p+g,A=Math.sqrt(1/m),y=h.multiplyByScalar(e,A,mBe);if(m<i)return isFinite(A)?h.clone(y,o):void 0;let x=n.x,b=n.y,C=n.z,E=pBe;E.x=y.x*x*2,E.y=y.y*b*2,E.z=y.z*C*2;let S=(1-A)*h.magnitude(e)/(.5*h.magnitude(E)),w=0,P,R,B,L,_,T,v,I,O,N,j;do{S-=w,B=1/(1+S*x),L=1/(1+S*b),_=1/(1+S*C),T=B*B,v=L*L,I=_*_,O=T*B,N=v*L,j=I*_,P=d*T+p*v+g*I-1,R=d*O*x+p*N*b+g*j*C;let k=-2*R;w=P/k}while(Math.abs(P)>D.EPSILON12);return l(o)?(o.x=r*B,o.y=a*L,o.z=s*_,o):new h(r*B,a*L,s*_)}var ux=gBe;var Il=class Il{constructor(t,n,i){this.longitude=t??0,this.latitude=n??0,this.height=i??0}static fromRadians(t,n,i,o){return i=i??0,l(o)?(o.longitude=t,o.latitude=n,o.height=i,o):new Il(t,n,i)}static fromDegrees(t,n,i,o){return t=D.toRadians(t),n=D.toRadians(n),Il.fromRadians(t,n,i,o)}static fromCartesian(t,n,i){let o=l(n)?n.oneOverRadii:Il._ellipsoidOneOverRadii,r=l(n)?n.oneOverRadiiSquared:Il._ellipsoidOneOverRadiiSquared,a=l(n)?n._centerToleranceSquared:Il._ellipsoidCenterToleranceSquared,s=ux(t,o,r,a,ABe);if(!l(s))return;let c=h.multiplyComponents(s,r,_Be);c=h.normalize(c,c);let u=h.subtract(t,s,yBe),f=Math.atan2(c.y,c.x),d=Math.asin(c.z),p=D.sign(h.dot(u,t))*h.magnitude(u);return l(i)?(i.longitude=f,i.latitude=d,i.height=p,i):new Il(f,d,p)}static toCartesian(t,n,i){return h.fromRadians(t.longitude,t.latitude,t.height,n,i)}static clone(t,n){if(l(t))return l(n)?(n.longitude=t.longitude,n.latitude=t.latitude,n.height=t.height,n):new Il(t.longitude,t.latitude,t.height)}static equals(t,n){return t===n||l(t)&&l(n)&&t.longitude===n.longitude&&t.latitude===n.latitude&&t.height===n.height}static equalsEpsilon(t,n,i){return i=i??0,t===n||l(t)&&l(n)&&Math.abs(t.longitude-n.longitude)<=i&&Math.abs(t.latitude-n.latitude)<=i&&Math.abs(t.height-n.height)<=i}clone(t){return Il.clone(this,t)}equals(t){return Il.equals(this,t)}equalsEpsilon(t,n){return Il.equalsEpsilon(this,t,n)}toString(){return`(${this.longitude}, ${this.latitude}, ${this.height})`}};lt(Il,"_ellipsoidOneOverRadii",new h(1/6378137,1/6378137,1/6356752314245179e-9)),lt(Il,"_ellipsoidOneOverRadiiSquared",new h(1/(6378137*6378137),1/(6378137*6378137),1/(6356752314245179e-9*6356752314245179e-9))),lt(Il,"_ellipsoidCenterToleranceSquared",D.EPSILON1);var $I=Il;$I.ZERO=Object.freeze(new $I(0,0,0));var _Be=new h,ABe=new h,yBe=new h,de=$I;function nae(e,t,n,i){t=t??0,n=n??0,i=i??0,e._radii=new h(t,n,i),e._radiiSquared=new h(t*t,n*n,i*i),e._radiiToTheFourth=new h(t*t*t*t,n*n*n*n,i*i*i*i),e._oneOverRadii=new h(t===0?0:1/t,n===0?0:1/n,i===0?0:1/i),e._oneOverRadiiSquared=new h(t===0?0:1/(t*t),n===0?0:1/(n*n),i===0?0:1/(i*i)),e._minimumRadius=Math.min(t,n,i),e._maximumRadius=Math.max(t,n,i),e._centerToleranceSquared=D.EPSILON1,e._radiiSquared.z!==0&&(e._squaredXOverSquaredZ=e._radiiSquared.x/e._radiiSquared.z)}var Dl=class e{constructor(t,n,i){this._radii=void 0,this._radiiSquared=void 0,this._radiiToTheFourth=void 0,this._oneOverRadii=void 0,this._oneOverRadiiSquared=void 0,this._minimumRadius=void 0,this._maximumRadius=void 0,this._centerToleranceSquared=void 0,this._squaredXOverSquaredZ=void 0,nae(this,t,n,i)}get radii(){return this._radii}get radiiSquared(){return this._radiiSquared}get radiiToTheFourth(){return this._radiiToTheFourth}get oneOverRadii(){return this._oneOverRadii}get oneOverRadiiSquared(){return this._oneOverRadiiSquared}get minimumRadius(){return this._minimumRadius}get maximumRadius(){return this._maximumRadius}static clone(t,n){if(!l(t))return;let i=t._radii;return l(n)?(h.clone(i,n._radii),h.clone(t._radiiSquared,n._radiiSquared),h.clone(t._radiiToTheFourth,n._radiiToTheFourth),h.clone(t._oneOverRadii,n._oneOverRadii),h.clone(t._oneOverRadiiSquared,n._oneOverRadiiSquared),n._minimumRadius=t._minimumRadius,n._maximumRadius=t._maximumRadius,n._centerToleranceSquared=t._centerToleranceSquared,n):new e(i.x,i.y,i.z)}static fromCartesian3(t,n){return l(n)||(n=new e),l(t)&&nae(n,t.x,t.y,t.z),n}static get default(){return e._default}static set default(t){e._default=t,h._ellipsoidRadiiSquared=t.radiiSquared,de._ellipsoidOneOverRadii=t.oneOverRadii,de._ellipsoidOneOverRadiiSquared=t.oneOverRadiiSquared,de._ellipsoidCenterToleranceSquared=t._centerToleranceSquared}clone(t){return e.clone(this,t)}static pack(t,n,i){return i=i??0,h.pack(t._radii,n,i),n}static unpack(t,n,i){n=n??0;let o=h.unpack(t,n);return e.fromCartesian3(o,i)}geodeticSurfaceNormalCartographic(t,n){let i=t.longitude,o=t.latitude,r=Math.cos(o),a=r*Math.cos(i),s=r*Math.sin(i),c=Math.sin(o);return l(n)||(n=new h),n.x=a,n.y=s,n.z=c,h.normalize(n,n)}geodeticSurfaceNormal(t,n){if(!h.equalsEpsilon(t,h.ZERO,D.EPSILON14))return l(n)||(n=new h),n=h.multiplyComponents(t,this._oneOverRadiiSquared,n),h.normalize(n,n)}cartographicToCartesian(t,n){let i=xBe,o=bBe;this.geodeticSurfaceNormalCartographic(t,i),h.multiplyComponents(this._radiiSquared,i,o);let r=Math.sqrt(h.dot(i,o));return h.divideByScalar(o,r,o),h.multiplyByScalar(i,t.height,i),l(n)||(n=new h),h.add(o,i,n)}cartographicArrayToCartesianArray(t,n){let i=t.length;l(n)?n.length=i:n=new Array(i);for(let o=0;o<i;o++)n[o]=this.cartographicToCartesian(t[o],n[o]);return n}cartesianToCartographic(t,n){let i=this.scaleToGeodeticSurface(t,TBe);if(!l(i))return;let o=this.geodeticSurfaceNormal(i,CBe),r=h.subtract(t,i,EBe),a=Math.atan2(o.y,o.x),s=Math.asin(o.z),c=D.sign(h.dot(r,t))*h.magnitude(r);return l(n)?(n.longitude=a,n.latitude=s,n.height=c,n):new de(a,s,c)}cartesianArrayToCartographicArray(t,n){let i=t.length;l(n)?n.length=i:n=new Array(i);for(let o=0;o<i;++o)n[o]=this.cartesianToCartographic(t[o],n[o]);return n}scaleToGeodeticSurface(t,n){return ux(t,this._oneOverRadii,this._oneOverRadiiSquared,this._centerToleranceSquared,n)}scaleToGeocentricSurface(t,n){l(n)||(n=new h);let i=t.x,o=t.y,r=t.z,a=this._oneOverRadiiSquared,s=1/Math.sqrt(i*i*a.x+o*o*a.y+r*r*a.z);return h.multiplyByScalar(t,s,n)}transformPositionToScaledSpace(t,n){return l(n)||(n=new h),h.multiplyComponents(t,this._oneOverRadii,n)}transformPositionFromScaledSpace(t,n){return l(n)||(n=new h),h.multiplyComponents(t,this._radii,n)}equals(t){return this===t||l(t)&&h.equals(this._radii,t._radii)}toString(){return this._radii.toString()}getSurfaceNormalIntersectionWithZAxis(t,n,i){n=n??0;let o=this._squaredXOverSquaredZ;if(l(i)||(i=new h),i.x=0,i.y=0,i.z=t.z*(1-o),!(Math.abs(i.z)>=this._radii.z-n))return i}getLocalCurvature(t,n){l(n)||(n=new z);let i=this.getSurfaceNormalIntersectionWithZAxis(t,0,vBe),o=h.distance(t,i),r=this.minimumRadius*o/this.maximumRadius**2,a=o*r**2;return z.fromElements(1/o,1/a,n)}surfaceArea(t){let n=t.west,i=t.east,o=t.south,r=t.north;for(;i<n;)i+=D.TWO_PI;let a=this._radiiSquared,s=a.x,c=a.y,u=a.z,f=s*c;return iae(o,r,function(d){let p=Math.cos(d),g=Math.sin(d);return Math.cos(d)*iae(n,i,function(m){let A=Math.cos(m),y=Math.sin(m);return Math.sqrt(f*g*g+u*(c*A*A+s*y*y)*p*p)})})}};Dl.WGS84=Object.freeze(new Dl(6378137,6378137,6356752314245179e-9));Dl.UNIT_SPHERE=Object.freeze(new Dl(1,1,1));Dl.MOON=Object.freeze(new Dl(D.LUNAR_RADIUS,D.LUNAR_RADIUS,D.LUNAR_RADIUS));Dl.MARS=Object.freeze(new Dl(3396190,3396190,3376200));Dl._default=Dl.WGS84;Dl.packedLength=h.packedLength;Dl.prototype.geocentricSurfaceNormal=h.normalize;var xBe=new h,bBe=new h,CBe=new h,TBe=new h,EBe=new h,vBe=new h,SBe=[.14887433898163,.43339539412925,.67940956829902,.86506336668898,.97390652851717,0],wBe=[.29552422471475,.26926671930999,.21908636251598,.14945134915058,.066671344308684,0];function iae(e,t,n){let i=.5*(t+e),o=.5*(t-e),r=0;for(let a=0;a<5;a++){let s=o*SBe[a];r+=wBe[a]*(n(i+s)+n(i-s))}return r*=o,r}var te=Dl;var p7=class{constructor(t){this._ellipsoid=t??te.default,this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}get ellipsoid(){return this._ellipsoid}project(t,n){let i=this._semimajorAxis,o=t.longitude*i,r=t.latitude*i,a=t.height;return l(n)?(n.x=o,n.y=r,n.z=a,n):new h(o,r,a)}unproject(t,n){let i=this._oneOverSemimajorAxis,o=t.x*i,r=t.y*i,a=t.z;return l(n)?(n.longitude=o,n.latitude=r,n.height=a,n):new de(o,r,a)}},ji=p7;var oae={OUTSIDE:-1,INTERSECTING:0,INSIDE:1};Object.freeze(oae);var qt=oae;function IBe(e,t,n){let i=0,o=e.length-1,r,a;for(;i<=o;){if(r=~~((i+o)/2),a=n(e[r],t),a<0){i=r+1;continue}if(a>0){o=r-1;continue}return r}return~(o+1)}var _o=IBe;function DBe(e,t,n,i,o){this.xPoleWander=e,this.yPoleWander=t,this.xPoleOffset=n,this.yPoleOffset=i,this.ut1MinusUtc=o}var Y_=DBe;function PBe(e){return e%4===0&&e%100!==0||e%400===0}var Eh=PBe;var rae=[31,28,31,30,31,30,31,31,30,31,30,31];function RBe(e,t,n,i,o,r,a,s){e=e??1,t=t??1,n=n??1,i=i??0,o=o??0,r=r??0,a=a??0,s=s??!1,this.year=e,this.month=t,this.day=n,this.hour=i,this.minute=o,this.second=r,this.millisecond=a,this.isLeapSecond=s;function A(){No.typeOf.number.greaterThanOrEquals("Year",e,1),No.typeOf.number.lessThanOrEquals("Year",e,9999),No.typeOf.number.greaterThanOrEquals("Month",t,1),No.typeOf.number.lessThanOrEquals("Month",t,12),No.typeOf.number.greaterThanOrEquals("Day",n,1),No.typeOf.number.lessThanOrEquals("Day",n,31),No.typeOf.number.greaterThanOrEquals("Hour",i,0),No.typeOf.number.lessThanOrEquals("Hour",i,23),No.typeOf.number.greaterThanOrEquals("Minute",o,0),No.typeOf.number.lessThanOrEquals("Minute",o,59),No.typeOf.bool("IsLeapSecond",s),No.typeOf.number.greaterThanOrEquals("Second",r,0),No.typeOf.number.lessThanOrEquals("Second",r,s?60:59),No.typeOf.number.greaterThanOrEquals("Millisecond",a,0),No.typeOf.number.lessThan("Millisecond",a,1e3)}function y(){let x=t===2&&Eh(e)?rae[t-1]+1:rae[t-1];if(n>x)throw new _e("Month and Day represents invalid date")}}var R0=RBe;function OBe(e,t){this.julianDate=e,this.offset=t}var ao=OBe;var aae={SECONDS_PER_MILLISECOND:.001,SECONDS_PER_MINUTE:60,MINUTES_PER_HOUR:60,HOURS_PER_DAY:24,SECONDS_PER_HOUR:3600,MINUTES_PER_DAY:1440,SECONDS_PER_DAY:86400,DAYS_PER_JULIAN_CENTURY:36525,PICOSECOND:1e-9,MODIFIED_JULIAN_DATE_DIFFERENCE:24000005e-1};Object.freeze(aae);var ii=aae;var sae={UTC:0,TAI:1};Object.freeze(sae);var ei=sae;var cae=new R0,g7=[31,28,31,30,31,30,31,31,30,31,30,31],_7=29;function y7(e,t){return fi.compare(e.julianDate,t.julianDate)}var hE=new ao;function K4(e){hE.julianDate=e;let t=fi.leapSeconds,n=_o(t,hE,y7);n<0&&(n=~n),n>=t.length&&(n=t.length-1);let i=t[n].offset;n>0&&fi.secondsDifference(t[n].julianDate,e)>i&&(n--,i=t[n].offset),fi.addSeconds(e,i,e)}function lae(e,t){hE.julianDate=e;let n=fi.leapSeconds,i=_o(n,hE,y7);if(i<0&&(i=~i),i===0)return fi.addSeconds(e,-n[0].offset,t);if(i>=n.length)return fi.addSeconds(e,-n[i-1].offset,t);let o=fi.secondsDifference(n[i].julianDate,e);if(o===0)return fi.addSeconds(e,-n[i].offset,t);if(!(o<=1))return fi.addSeconds(e,-n[--i].offset,t)}function X_(e,t,n){let i=t/ii.SECONDS_PER_DAY|0;return e+=i,t-=ii.SECONDS_PER_DAY*i,t<0&&(e--,t+=ii.SECONDS_PER_DAY),n.dayNumber=e,n.secondsOfDay=t,n}function A7(e,t,n,i,o,r,a){let s=(t-14)/12|0,c=e+4800+s,u=(1461*c/4|0)+(367*(t-2-12*s)/12|0)-(3*((c+100)/100|0)/4|0)+n-32075;i=i-12,i<0&&(i+=24);let f=r+(i*ii.SECONDS_PER_HOUR+o*ii.SECONDS_PER_MINUTE+a*ii.SECONDS_PER_MILLISECOND);return f>=43200&&(u-=1),[u,f]}var MBe=/^(\d{4})$/,BBe=/^(\d{4})-(\d{2})$/,LBe=/^(\d{4})-?(\d{3})$/,NBe=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,FBe=/^(\d{4})-?(\d{2})-?(\d{2})$/,x7=/([Z+\-])?(\d{2})?:?(\d{2})?$/,kBe=/^(\d{2})(\.\d+)?/.source+x7.source,zBe=/^(\d{2}):?(\d{2})(\.\d+)?/.source+x7.source,UBe=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+x7.source;var fi=class e{constructor(t,n,i){this.dayNumber=void 0,this.secondsOfDay=void 0,t=t??0,n=n??0,i=i??ei.UTC;let o=t|0;n=n+(t-o)*ii.SECONDS_PER_DAY,X_(o,n,this),i===ei.UTC&&K4(this)}static fromGregorianDate(t,n){let i=A7(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond);return l(n)?(X_(i[0],i[1],n),K4(n),n):new e(i[0],i[1],ei.UTC)}static fromDate(t,n){let i=A7(t.getUTCFullYear(),t.getUTCMonth()+1,t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds());return l(n)?(X_(i[0],i[1],n),K4(n),n):new e(i[0],i[1],ei.UTC)}static fromIso8601(t,n){t=t.replace(",",".");let i=t.split("T"),o,r=1,a=1,s=0,c=0,u=0,f=0,d=i[0],p=i[1],g,m;if(i=d.match(FBe),i!==null)o=+i[1],r=+i[2],a=+i[3];else if(i=d.match(BBe),i!==null)o=+i[1],r=+i[2];else if(i=d.match(MBe),i!==null)o=+i[1];else{let b;if(i=d.match(LBe),i!==null)o=+i[1],b=+i[2],m=Eh(o);else if(i=d.match(NBe),i!==null){o=+i[1];let C=+i[2],E=+i[3]||0,S=new Date(Date.UTC(o,0,4));b=C*7+E-S.getUTCDay()-3}g=new Date(Date.UTC(o,0,1)),g.setUTCDate(b),r=g.getUTCMonth()+1,a=g.getUTCDate()}m=Eh(o);let A;if(l(p)){i=p.match(UBe),i!==null?(s=+i[1],c=+i[2],u=+i[3],f=+(i[4]||0)*1e3,A=5):(i=p.match(zBe),i!==null?(s=+i[1],c=+i[2],u=+(i[3]||0)*60,A=4):(i=p.match(kBe),i!==null&&(s=+i[1],c=+(i[2]||0)*60,A=3)));let b=i[A],C=+i[A+1],E=+(i[A+2]||0);switch(b){case"+":s=s-C,c=c-E;break;case"-":s=s+C,c=c+E;break;case"Z":break;default:c=c+new Date(Date.UTC(o,r-1,a,s,c)).getTimezoneOffset();break}}let y=u===60;for(y&&u--;c>=60;)c-=60,s++;for(;s>=24;)s-=24,a++;for(g=m&&r===2?_7:g7[r-1];a>g;)a-=g,r++,r>12&&(r-=12,o++),g=m&&r===2?_7:g7[r-1];for(;c<0;)c+=60,s--;for(;s<0;)s+=24,a--;for(;a<1;)r--,r<1&&(r+=12,o--),g=m&&r===2?_7:g7[r-1],a+=g;let x=A7(o,r,a,s,c,u,f);return l(n)?(X_(x[0],x[1],n),K4(n)):n=new e(x[0],x[1],ei.UTC),y&&e.addSeconds(n,1,n),n}static now(t){return e.fromDate(new Date,t)}static toGregorianDate(t,n){let i=!1,o=lae(t,Q4);l(o)||(e.addSeconds(t,-1,Q4),o=lae(Q4,Q4),i=!0);let r=o.dayNumber,a=o.secondsOfDay;a>=43200&&(r+=1);let s=r+68569|0,c=4*s/146097|0;s=s-((146097*c+3)/4|0)|0;let u=4e3*(s+1)/1461001|0;s=s-(1461*u/4|0)+31|0;let f=80*s/2447|0,d=s-(2447*f/80|0)|0;s=f/11|0;let p=f+2-12*s|0,g=100*(c-49)+u+s|0,m=a/ii.SECONDS_PER_HOUR|0,A=a-m*ii.SECONDS_PER_HOUR,y=A/ii.SECONDS_PER_MINUTE|0;A=A-y*ii.SECONDS_PER_MINUTE;let x=A|0,b=(A-x)/ii.SECONDS_PER_MILLISECOND;return m+=12,m>23&&(m-=24),i&&(x+=1),l(n)?(n.year=g,n.month=p,n.day=d,n.hour=m,n.minute=y,n.second=x,n.millisecond=b,n.isLeapSecond=i,n):new R0(g,p,d,m,y,x,b,i)}static toDate(t){let n=e.toGregorianDate(t,cae),i=n.second;return n.isLeapSecond&&(i-=1),new Date(Date.UTC(n.year,n.month-1,n.day,n.hour,n.minute,i,n.millisecond))}static toIso8601(t,n){let i=e.toGregorianDate(t,cae),o=i.year,r=i.month,a=i.day,s=i.hour,c=i.minute,u=i.second,f=i.millisecond;o===1e4&&r===1&&a===1&&s===0&&c===0&&u===0&&f===0&&(o=9999,r=12,a=31,s=24);let d;if(!l(n)&&f!==0){let p=f*.01;return d=p<1e-6?p.toFixed(20).replace(".","").replace(/0+$/,""):p.toString().replace(".",""),`${o.toString().padStart(4,"0")}-${r.toString().padStart(2,"0")}-${a.toString().padStart(2,"0")}T${s.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}:${u.toString().padStart(2,"0")}.${d}Z`}return!l(n)||n===0?`${o.toString().padStart(4,"0")}-${r.toString().padStart(2,"0")}-${a.toString().padStart(2,"0")}T${s.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}:${u.toString().padStart(2,"0")}Z`:(d=(f*.01).toFixed(n).replace(".","").slice(0,n),`${o.toString().padStart(4,"0")}-${r.toString().padStart(2,"0")}-${a.toString().padStart(2,"0")}T${s.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}:${u.toString().padStart(2,"0")}.${d}Z`)}static clone(t,n){if(l(t))return l(n)?(n.dayNumber=t.dayNumber,n.secondsOfDay=t.secondsOfDay,n):new e(t.dayNumber,t.secondsOfDay,ei.TAI)}static compare(t,n){let i=t.dayNumber-n.dayNumber;return i!==0?i:t.secondsOfDay-n.secondsOfDay}static equals(t,n){return t===n||l(t)&&l(n)&&t.dayNumber===n.dayNumber&&t.secondsOfDay===n.secondsOfDay}static equalsEpsilon(t,n,i){return i=i??0,t===n||l(t)&&l(n)&&Math.abs(e.secondsDifference(t,n))<=i}static totalDays(t){return t.dayNumber+t.secondsOfDay/ii.SECONDS_PER_DAY}static secondsDifference(t,n){return(t.dayNumber-n.dayNumber)*ii.SECONDS_PER_DAY+(t.secondsOfDay-n.secondsOfDay)}static daysDifference(t,n){let i=t.dayNumber-n.dayNumber,o=(t.secondsOfDay-n.secondsOfDay)/ii.SECONDS_PER_DAY;return i+o}static computeTaiMinusUtc(t){hE.julianDate=t;let n=e.leapSeconds,i=_o(n,hE,y7);return i<0&&(i=~i,--i,i<0&&(i=0)),n[i].offset}static addSeconds(t,n,i){return X_(t.dayNumber,t.secondsOfDay+n,i)}static addMinutes(t,n,i){let o=t.secondsOfDay+n*ii.SECONDS_PER_MINUTE;return X_(t.dayNumber,o,i)}static addHours(t,n,i){let o=t.secondsOfDay+n*ii.SECONDS_PER_HOUR;return X_(t.dayNumber,o,i)}static addDays(t,n,i){let o=t.dayNumber+n;return X_(o,t.secondsOfDay,i)}static lessThan(t,n){return e.compare(t,n)<0}static lessThanOrEquals(t,n){return e.compare(t,n)<=0}static greaterThan(t,n){return e.compare(t,n)>0}static greaterThanOrEquals(t,n){return e.compare(t,n)>=0}clone(t){return e.clone(this,t)}equals(t){return e.equals(this,t)}equalsEpsilon(t,n){return e.equalsEpsilon(this,t,n)}toString(){return e.toIso8601(this)}},Q4=new fi(0,0,ei.TAI);fi.leapSeconds=[new ao(new fi(2441317,43210,ei.TAI),10),new ao(new fi(2441499,43211,ei.TAI),11),new ao(new fi(2441683,43212,ei.TAI),12),new ao(new fi(2442048,43213,ei.TAI),13),new ao(new fi(2442413,43214,ei.TAI),14),new ao(new fi(2442778,43215,ei.TAI),15),new ao(new fi(2443144,43216,ei.TAI),16),new ao(new fi(2443509,43217,ei.TAI),17),new ao(new fi(2443874,43218,ei.TAI),18),new ao(new fi(2444239,43219,ei.TAI),19),new ao(new fi(2444786,43220,ei.TAI),20),new ao(new fi(2445151,43221,ei.TAI),21),new ao(new fi(2445516,43222,ei.TAI),22),new ao(new fi(2446247,43223,ei.TAI),23),new ao(new fi(2447161,43224,ei.TAI),24),new ao(new fi(2447892,43225,ei.TAI),25),new ao(new fi(2448257,43226,ei.TAI),26),new ao(new fi(2448804,43227,ei.TAI),27),new ao(new fi(2449169,43228,ei.TAI),28),new ao(new fi(2449534,43229,ei.TAI),29),new ao(new fi(2450083,43230,ei.TAI),30),new ao(new fi(2450630,43231,ei.TAI),31),new ao(new fi(2451179,43232,ei.TAI),32),new ao(new fi(2453736,43233,ei.TAI),33),new ao(new fi(2454832,43234,ei.TAI),34),new ao(new fi(2456109,43235,ei.TAI),35),new ao(new fi(2457204,43236,ei.TAI),36),new ao(new fi(2457754,43237,ei.TAI),37)];var Q=fi;var Pae=Yr(uf(),1);function VBe(e){return(e.length===0||e[e.length-1]!=="/")&&(e=`${e}/`),e}var JI=VBe;function gae(e,t){if(e===null||typeof e!="object")return e;t=t??!1;let n=new e.constructor;for(let i in e)if(e.hasOwnProperty(i)){let o=e[i];t&&(o=gae(o,t)),n[i]=o}return n}var We=gae;function _ae(e,t,n){n=n??!1;let i={},o=l(e),r=l(t),a,s,c;if(o)for(a in e)e.hasOwnProperty(a)&&(s=e[a],r&&n&&typeof s=="object"&&t.hasOwnProperty(a)?(c=t[a],typeof c=="object"?i[a]=_ae(s,c,n):i[a]=s):i[a]=s);if(r)for(a in t)t.hasOwnProperty(a)&&!i.hasOwnProperty(a)&&(c=t[a],i[a]=c);return i}var wt=_ae;function jBe(){let e,t,n=new Promise(function(i,o){e=i,t=o});return{resolve:e,reject:t,promise:n}}var yu=jBe;var Aae=Yr(uf(),1);function b7(e,t){let n;return typeof document<"u"&&(n=document),b7._implementation(e,t,n)}b7._implementation=function(e,t,n){if(!l(t)){if(typeof n>"u")return e;t=n.baseURI??n.location.href}let i=new Aae.default(e);return i.scheme()!==""?i.toString():i.absoluteTo(t).toString()};var hd=b7;var yae=Yr(uf(),1);function GBe(e,t){let n="",i=e.lastIndexOf("/");return i!==-1&&(n=e.substring(0,i+1)),t&&(e=new yae.default(e),e.query().length!==0&&(n+=`?${e.query()}`),e.fragment().length!==0&&(n+=`#${e.fragment()}`)),n}var ZI=GBe;var xae=Yr(uf(),1);function HBe(e){let t=new xae.default(e);t.normalize();let n=t.path(),i=n.lastIndexOf("/");return i!==-1&&(n=n.substr(i+1)),i=n.lastIndexOf("."),i===-1?n="":n=n.substr(i+1),n}var O0=HBe;var bae={};function WBe(e,t,n){l(t)||(t=e.width),l(n)||(n=e.height);let i=bae[t];l(i)||(i={},bae[t]=i);let o=i[n];if(!l(o)){let r=document.createElement("canvas");r.width=t,r.height=n,o=r.getContext("2d",{willReadFrequently:!0}),o.globalCompositeOperation="copy",i[n]=o}return o.drawImage(e,0,0,t,n),o.getImageData(0,0,t,n).data}var vh=WBe;var qBe=/^blob:/i;function YBe(e){return qBe.test(e)}var fx=YBe;var np;function XBe(e){l(np)||(np=document.createElement("a")),np.href=window.location.href;let t=np.host,n=np.protocol;return np.href=e,np.href=np.href,n!==np.protocol||t!==np.host}var K_=XBe;var KBe=/^data:/i;function QBe(e){return KBe.test(e)}var Sh=QBe;function $Be(e){let t=document.createElement("script");return t.async=!0,t.src=e,new Promise((n,i)=>{window.crossOriginIsolated&&t.setAttribute("crossorigin","anonymous");let o=document.getElementsByTagName("head")[0];t.onload=function(){t.onload=void 0,o.removeChild(t),n()},t.onerror=function(r){i(r)},o.appendChild(t)})}var dx=$Be;function JBe(e){let t="";for(let n in e)if(e.hasOwnProperty(n)){let i=e[n],o=`${encodeURIComponent(n)}=`;if(Array.isArray(i))for(let r=0,a=i.length;r<a;++r)t+=`${o+encodeURIComponent(i[r])}&`;else t+=`${o+encodeURIComponent(i)}&`}return t=t.slice(0,-1),t}var hx=JBe;function ZBe(e){let t={};if(e==="")return t;let n=e.replace(/\+/g,"%20").split(/[&;]/);for(let i=0,o=n.length;i<o;++i){let r=n[i].split("="),a=decodeURIComponent(r[0]),s=r[1];l(s)?s=decodeURIComponent(s):s="";let c=t[a];typeof c=="string"?t[a]=[c,s]:Array.isArray(c)?c.push(s):t[a]=s}return t}var ff=ZBe;var Cae={UNISSUED:0,ISSUED:1,ACTIVE:2,RECEIVED:3,CANCELLED:4,FAILED:5};Object.freeze(Cae);var di=Cae;var Tae={TERRAIN:0,IMAGERY:1,TILES3D:2,OTHER:3};Object.freeze(Tae);var qa=Tae;function e8(e){e=e??G.EMPTY_OBJECT;let t=e.throttleByServer??!1,n=e.throttle??!1;this.url=e.url,this.requestFunction=e.requestFunction,this.cancelFunction=e.cancelFunction,this.priorityFunction=e.priorityFunction,this.priority=e.priority??0,this.throttle=n,this.throttleByServer=t,this.type=e.type??qa.OTHER,this.serverKey=e.serverKey,this.state=di.UNISSUED,this.deferred=void 0,this.cancelled=!1}e8.prototype.cancel=function(){this.cancelled=!0};e8.prototype.clone=function(e){return l(e)?(e.url=this.url,e.requestFunction=this.requestFunction,e.cancelFunction=this.cancelFunction,e.priorityFunction=this.priorityFunction,e.priority=this.priority,e.throttle=this.throttle,e.throttleByServer=this.throttleByServer,e.type=this.type,e.serverKey=this.serverKey,e.state=di.UNISSUED,e.deferred=void 0,e.cancelled=!1,e):new e8(this)};var _r=e8;function eLe(e){let t={};if(!e)return t;let n=e.split(`\r
- `);for(let i=0;i<n.length;++i){let o=n[i],r=o.indexOf(": ");if(r>0){let a=o.substring(0,r),s=o.substring(r+2);t[a]=s}}return t}var eD=eLe;function Eae(e,t,n){this.statusCode=e,this.response=t,this.responseHeaders=n,typeof this.responseHeaders=="string"&&(this.responseHeaders=eD(this.responseHeaders))}Eae.prototype.toString=function(){let e="Request has failed.";return l(this.statusCode)&&(e+=` Status Code: ${this.statusCode}`),e};var ip=Eae;var t8=Yr(uf(),1);function tD(){this._listeners=new Map,this._toRemove=new Map,this._toAdd=new Map,this._invokingListeners=!1,this._listenerCount=0}Object.defineProperties(tD.prototype,{numberOfListeners:{get:function(){return this._listenerCount}}});tD.prototype.addEventListener=function(e,t){let n=this,i=n._invokingListeners?n._toAdd:n._listeners;return T7(this,i,e,t)&&n._listenerCount++,function(){n.removeEventListener(e,t)}};function T7(e,t,n,i){t.has(n)||t.set(n,new Set);let o=t.get(n);return o.has(i)?!1:(o.add(i),!0)}tD.prototype.removeEventListener=function(e,t){let n=C7(this,this._listeners,e,t),i=C7(this,this._toAdd,e,t),o=n||i;return o&&this._listenerCount--,o};function C7(e,t,n,i){let o=t.get(n);if(!o||!o.has(i))return!1;if(e._invokingListeners){if(!T7(e,e._toRemove,n,i))return!1}else o.delete(i),o.size===0&&t.delete(n);return!0}tD.prototype.raiseEvent=function(){this._invokingListeners=!0;for(let[e,t]of this._listeners.entries())if(l(e))for(let n of t)e.apply(n,arguments);this._invokingListeners=!1;for(let[e,t]of this._toAdd.entries())for(let n of t)T7(this,this._listeners,e,n);this._toAdd.clear();for(let[e,t]of this._toRemove.entries())for(let n of t)C7(this,this._listeners,e,n);this._toRemove.clear()};var ye=tD;function mx(e){this._comparator=e.comparator,this._array=[],this._length=0,this._maximumLength=void 0}Object.defineProperties(mx.prototype,{length:{get:function(){return this._length}},internalArray:{get:function(){return this._array}},maximumLength:{get:function(){return this._maximumLength},set:function(e){let t=this._length;if(e<t){let n=this._array;for(let i=e;i<t;++i)n[i]=void 0;this._length=e,n.length=e}this._maximumLength=e}},comparator:{get:function(){return this._comparator}}});function E7(e,t,n){let i=e[t];e[t]=e[n],e[n]=i}mx.prototype.reserve=function(e){e=e??this._length,this._array.length=e};mx.prototype.heapify=function(e){e=e??0;let t=this._length,n=this._comparator,i=this._array,o=-1,r=!0;for(;r;){let a=2*(e+1),s=a-1;s<t&&n(i[s],i[e])<0?o=s:o=e,a<t&&n(i[a],i[o])<0&&(o=a),o!==e?(E7(i,o,e),e=o):r=!1}};mx.prototype.resort=function(){let e=this._length;for(let t=Math.ceil(e/2);t>=0;--t)this.heapify(t)};mx.prototype.insert=function(e){let t=this._array,n=this._comparator,i=this._maximumLength,o=this._length++;for(o<t.length?t[o]=e:t.push(e);o!==0;){let a=Math.floor((o-1)/2);if(n(t[o],t[a])<0)E7(t,o,a),o=a;else break}let r;return l(i)&&this._length>i&&(r=t[i],this._length=i),r};mx.prototype.pop=function(e){if(e=e??0,this._length===0)return;let t=this._array,n=t[e];return E7(t,e,--this._length),this.heapify(e),t[this._length]=void 0,n};var nD=mx;function tLe(e,t){return e.priority-t.priority}var Ao={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0},gE=20,Yc=new nD({comparator:tLe});Yc.maximumLength=gE;Yc.reserve(gE);var op=[],M0={},nLe=typeof document<"u"?new t8.default(document.location.href):new t8.default,n8=new ye;function Ar(){}Ar.maximumRequests=50;Ar.maximumRequestsPerServer=18;Ar.requestsByServer={};Ar.throttleRequests=!0;Ar.debugShowStatistics=!1;Ar.requestCompletedEvent=n8;Object.defineProperties(Ar,{statistics:{get:function(){return Ao}},priorityHeapLength:{get:function(){return gE},set:function(e){if(e<gE)for(;Yc.length>e;){let t=Yc.pop();px(t)}gE=e,Yc.maximumLength=e,Yc.reserve(e)}}});function vae(e){l(e.priorityFunction)&&(e.priority=e.priorityFunction())}Ar.serverHasOpenSlots=function(e,t){t=t??1;let n=Ar.requestsByServer[e]??Ar.maximumRequestsPerServer;return M0[e]+t<=n};Ar.heapHasOpenSlots=function(e){return Yc.length+e<=gE};function Sae(e){return e.state===di.UNISSUED&&(e.state=di.ISSUED,e.deferred=yu()),e.deferred.promise}function iLe(e){return function(t){if(e.state===di.CANCELLED)return;let n=e.deferred;--Ao.numberOfActiveRequests,--M0[e.serverKey],n8.raiseEvent(),e.state=di.RECEIVED,e.deferred=void 0,n.resolve(t)}}function oLe(e){return function(t){e.state!==di.CANCELLED&&(++Ao.numberOfFailedRequests,--Ao.numberOfActiveRequests,--M0[e.serverKey],n8.raiseEvent(t),e.state=di.FAILED,e.deferred.reject(t))}}function wae(e){let t=Sae(e);return e.state=di.ACTIVE,op.push(e),++Ao.numberOfActiveRequests,++Ao.numberOfActiveRequestsEver,++M0[e.serverKey],e.requestFunction().then(iLe(e)).catch(oLe(e)),t}function px(e){let t=e.state===di.ACTIVE;if(e.state=di.CANCELLED,++Ao.numberOfCancelledRequests,l(e.deferred)){let n=e.deferred;n.promise.catch(()=>{}),e.deferred=void 0,n.reject(new re(`Request cancelled: "${e.url}"`))}t&&(--Ao.numberOfActiveRequests,--M0[e.serverKey],++Ao.numberOfCancelledActiveRequests),l(e.cancelFunction)&&e.cancelFunction()}Ar.update=function(){let e,t,n=0,i=op.length;for(e=0;e<i;++e){if(t=op[e],t.cancelled&&px(t),t.state!==di.ACTIVE){++n;continue}n>0&&(op[e-n]=t)}op.length-=n;let o=Yc.internalArray,r=Yc.length;for(e=0;e<r;++e)vae(o[e]);Yc.resort();let a=Math.max(Ar.maximumRequests-op.length,0),s=0;for(;s<a&&Yc.length>0;){if(t=Yc.pop(),t.cancelled){px(t);continue}if(t.throttleByServer&&!Ar.serverHasOpenSlots(t.serverKey)){px(t);continue}wae(t),++s}rLe()};Ar.getServerKey=function(e){let t=new t8.default(e);t.scheme()===""&&(t=t.absoluteTo(nLe),t.normalize());let n=t.authority();/:/.test(n)||(n=`${n}:${t.scheme()==="https"?"443":"80"}`);let i=M0[n];return l(i)||(M0[n]=0),n};Ar.request=function(e){if(Sh(e.url)||fx(e.url))return n8.raiseEvent(),e.state=di.RECEIVED,e.requestFunction();if(++Ao.numberOfAttemptedRequests,l(e.serverKey)||(e.serverKey=Ar.getServerKey(e.url)),Ar.throttleRequests&&e.throttleByServer&&!Ar.serverHasOpenSlots(e.serverKey))return;if(!Ar.throttleRequests||!e.throttle)return wae(e);if(op.length>=Ar.maximumRequests)return;vae(e);let t=Yc.insert(e);if(l(t)){if(t===e)return;px(t)}return Sae(e)};function rLe(){Ar.debugShowStatistics&&(Ao.numberOfActiveRequests===0&&Ao.lastNumberOfActiveRequests>0&&(Ao.numberOfAttemptedRequests>0&&(console.log(`Number of attempted requests: ${Ao.numberOfAttemptedRequests}`),Ao.numberOfAttemptedRequests=0),Ao.numberOfCancelledRequests>0&&(console.log(`Number of cancelled requests: ${Ao.numberOfCancelledRequests}`),Ao.numberOfCancelledRequests=0),Ao.numberOfCancelledActiveRequests>0&&(console.log(`Number of cancelled active requests: ${Ao.numberOfCancelledActiveRequests}`),Ao.numberOfCancelledActiveRequests=0),Ao.numberOfFailedRequests>0&&(console.log(`Number of failed requests: ${Ao.numberOfFailedRequests}`),Ao.numberOfFailedRequests=0)),Ao.lastNumberOfActiveRequests=Ao.numberOfActiveRequests)}Ar.clearForSpecs=function(){for(;Yc.length>0;){let t=Yc.pop();px(t)}let e=op.length;for(let t=0;t<e;++t)px(op[t]);op.length=0,M0={},Ao.numberOfAttemptedRequests=0,Ao.numberOfActiveRequests=0,Ao.numberOfCancelledRequests=0,Ao.numberOfCancelledActiveRequests=0,Ao.numberOfFailedRequests=0,Ao.numberOfActiveRequestsEver=0,Ao.lastNumberOfActiveRequests=0};Ar.numberOfActiveRequestsByServer=function(e){return M0[e]};Ar.requestHeap=Yc;var Xc=Ar;var Iae=Yr(uf(),1);var iD={},_E={};iD.add=function(e,t){let n=`${e.toLowerCase()}:${t}`;l(_E[n])||(_E[n]=!0)};iD.remove=function(e,t){let n=`${e.toLowerCase()}:${t}`;l(_E[n])&&delete _E[n]};function aLe(e){let t=new Iae.default(e);t.normalize();let n=t.authority();if(n.length!==0){if(t.authority(n),n.indexOf("@")!==-1&&(n=n.split("@")[1]),n.indexOf(":")===-1){let i=t.scheme();if(i.length===0&&(i=window.location.protocol,i=i.substring(0,i.length-1)),i==="http")n+=":80";else if(i==="https")n+=":443";else return}return n}}iD.contains=function(e){let t=aLe(e);return!!(l(t)&&l(_E[t]))};iD.clear=function(){_E={}};var AE=iD;var Rae=(function(){try{let e=new XMLHttpRequest;return e.open("GET","#",!0),e.responseType="blob",e.responseType==="blob"}catch{return!1}})();function Nt(e){e=e??G.EMPTY_OBJECT,typeof e=="string"&&(e={url:e}),this._url=void 0,this._templateValues=rp(e.templateValues,{}),this._queryParameters=rp(e.queryParameters,{}),this.headers=rp(e.headers,{}),this.request=e.request??new _r,this.proxy=e.proxy,this.retryCallback=e.retryCallback,this.retryAttempts=e.retryAttempts??0,this._retryCount=0,e.parseUrl??!0?this.parseUrl(e.url,!0,!0):this._url=e.url,this._credits=e.credits}function rp(e,t){return l(e)?We(e):t}Nt.createIfNeeded=function(e){return e instanceof Nt?e.getDerivedResource({request:e.request}):typeof e!="string"?e:new Nt({url:e})};var yE;Nt.supportsImageBitmapOptions=function(){return l(yE)?yE:typeof createImageBitmap!="function"?(yE=Promise.resolve(!1),yE):(yE=Nt.fetchBlob({url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAAE4g3rEiDgAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADElEQVQI12Ng6GAAAAEUAIngE3ZiAAAAAElFTkSuQmCC"}).then(function(t){let n={imageOrientation:"flipY",premultiplyAlpha:"none",colorSpaceConversion:"none"};return Promise.all([createImageBitmap(t,n),createImageBitmap(t)])}).then(function(t){let n=vh(t[0]),i=vh(t[1]);return n[1]!==i[1]}).catch(function(){return!1}),yE)};Object.defineProperties(Nt,{isBlobSupported:{get:function(){return Rae}}});Object.defineProperties(Nt.prototype,{queryParameters:{get:function(){return this._queryParameters}},templateValues:{get:function(){return this._templateValues}},url:{get:function(){return this.getUrlComponent(!0,!0)},set:function(e){this.parseUrl(e,!1,!1)}},extension:{get:function(){return O0(this._url)}},isDataUri:{get:function(){return Sh(this._url)}},isBlobUri:{get:function(){return fx(this._url)}},isCrossOriginUrl:{get:function(){return K_(this._url)}},hasHeaders:{get:function(){return Object.keys(this.headers).length>0}},credits:{get:function(){return this._credits}}});Nt.prototype.toString=function(){return this.getUrlComponent(!0,!0)};Nt.prototype.parseUrl=function(e,t,n,i){let o=new Pae.default(e),r=sLe(o.query());this._queryParameters=t?o8(r,this.queryParameters,n):r,o.search(""),o.fragment(""),l(i)&&o.scheme()===""&&(o=o.absoluteTo(hd(i))),this._url=o.toString()};function sLe(e){return e.length===0?{}:e.indexOf("=")===-1?{[e]:void 0}:ff(e)}function o8(e,t,n){if(!n)return wt(e,t);let i=We(e,!0);for(let o in t)if(t.hasOwnProperty(o)){let r=i[o],a=t[o];l(r)?(Array.isArray(r)||(r=i[o]=[r]),i[o]=r.concat(a)):i[o]=Array.isArray(a)?a.slice():a}return i}Nt.prototype.getUrlComponent=function(e,t){if(this.isDataUri)return this._url;let n=this._url;e&&(n=`${n}${cLe(this.queryParameters)}`),n=n.replace(/%7B/g,"{").replace(/%7D/g,"}");let i=this._templateValues;return Object.keys(i).length>0&&(n=n.replace(/{(.*?)}/g,function(o,r){let a=i[r];return l(a)?encodeURIComponent(a):o})),t&&l(this.proxy)&&(n=this.proxy.getURL(n)),n};function cLe(e){let t=Object.keys(e);return t.length===0?"":t.length===1&&!l(e[t[0]])?`?${t[0]}`:`?${hx(e)}`}Nt.prototype.setQueryParameters=function(e,t){t?this._queryParameters=o8(this._queryParameters,e,!1):this._queryParameters=o8(e,this._queryParameters,!1)};Nt.prototype.appendQueryParameters=function(e){this._queryParameters=o8(e,this._queryParameters,!0)};Nt.prototype.setTemplateValues=function(e,t){t?this._templateValues=wt(this._templateValues,e):this._templateValues=wt(e,this._templateValues)};Nt.prototype.getDerivedResource=function(e){let t=this.clone();if(t._retryCount=0,l(e.url)){let n=e.preserveQueryParameters??!1;t.parseUrl(e.url,!0,n,this._url)}return l(e.queryParameters)&&(t._queryParameters=wt(e.queryParameters,t.queryParameters)),l(e.templateValues)&&(t._templateValues=wt(e.templateValues,t.templateValues)),l(e.headers)&&(t.headers=wt(e.headers,t.headers)),l(e.proxy)&&(t.proxy=e.proxy),l(e.request)&&(t.request=e.request),l(e.retryCallback)&&(t.retryCallback=e.retryCallback),l(e.retryAttempts)&&(t.retryAttempts=e.retryAttempts),t};Nt.prototype.retryOnError=function(e){let t=this.retryCallback;if(typeof t!="function"||this._retryCount>=this.retryAttempts)return Promise.resolve(!1);let n=this;return Promise.resolve(t(this,e)).then(function(i){return++n._retryCount,i})};Nt.prototype.clone=function(e){return l(e)?(e._url=this._url,e._queryParameters=We(this._queryParameters),e._templateValues=We(this._templateValues),e.headers=We(this.headers),e.proxy=this.proxy,e.retryCallback=this.retryCallback,e.retryAttempts=this.retryAttempts,e._retryCount=0,e.request=this.request.clone(),e):new Nt({url:this._url,queryParameters:this.queryParameters,templateValues:this.templateValues,headers:this.headers,proxy:this.proxy,retryCallback:this.retryCallback,retryAttempts:this.retryAttempts,request:this.request.clone(),parseUrl:!1,credits:l(this.credits)?this.credits.slice():void 0})};Nt.prototype.getBaseUri=function(e){return ZI(this.getUrlComponent(e),e)};Nt.prototype.appendForwardSlash=function(){this._url=JI(this._url)};Nt.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})};Nt.fetchArrayBuffer=function(e){return new Nt(e).fetchArrayBuffer()};Nt.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})};Nt.fetchBlob=function(e){return new Nt(e).fetchBlob()};Nt.prototype.fetchImage=function(e){e=e??G.EMPTY_OBJECT;let t=e.preferImageBitmap??!1,n=e.preferBlob??!1,i=e.flipY??!1,o=e.skipColorSpaceConversion??!1;if(v7(this.request),!Rae||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!n)return this._fetchImage({resource:this,flipY:i,skipColorSpaceConversion:o,preferImageBitmap:t});let r=this.fetchBlob();if(!l(r))return;let a,s,c,u;return Nt.supportsImageBitmapOptions().then(function(f){return a=f,s=a&&t,r}).then(function(f){if(!l(f))return;if(u=f,s)return Nt.createImageBitmapFromBlob(f,{flipY:i,premultiplyAlpha:!1,skipColorSpaceConversion:o});let d=window.URL.createObjectURL(f);return c=new Nt({url:d}),c._fetchImage({flipY:i,skipColorSpaceConversion:o,preferImageBitmap:!1})}).then(function(f){if(l(f))return f.blob=u,s||window.URL.revokeObjectURL(c.url),f}).catch(function(f){return l(c)&&window.URL.revokeObjectURL(c.url),f.blob=u,Promise.reject(f)})};Nt.prototype._fetchImage=function(e){let t=this,n=e.flipY,i=e.skipColorSpaceConversion,o=e.preferImageBitmap,r=t.request;r.url=t.url,r.requestFunction=function(){let s=!1;!t.isDataUri&&!t.isBlobUri&&(s=t.isCrossOriginUrl);let c=yu();return Nt._Implementations.createImage(r,s,c,n,i,o),c.promise};let a=Xc.request(r);if(l(a))return a.catch(function(s){return r.state!==di.FAILED?Promise.reject(s):t.retryOnError(s).then(function(c){return c?(r.state=di.UNISSUED,r.deferred=void 0,t._fetchImage({flipY:n,skipColorSpaceConversion:i,preferImageBitmap:o})):Promise.reject(s)})})};Nt.fetchImage=function(e){return new Nt(e).fetchImage({flipY:e.flipY,skipColorSpaceConversion:e.skipColorSpaceConversion,preferBlob:e.preferBlob,preferImageBitmap:e.preferImageBitmap})};Nt.prototype.fetchText=function(){return this.fetch({responseType:"text"})};Nt.fetchText=function(e){return new Nt(e).fetchText()};Nt.prototype.fetchJson=function(){let e=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(l(e))return e.then(function(t){if(l(t))return JSON.parse(t)})};Nt.fetchJson=function(e){return new Nt(e).fetchJson()};Nt.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})};Nt.fetchXML=function(e){return new Nt(e).fetchXML()};Nt.prototype.fetchJsonp=function(e){e=e??"callback",v7(this.request);let t;do t=`loadJsonp${D.nextRandomNumber().toString().substring(2,8)}`;while(l(window[t]));return Oae(this,e,t)};function Oae(e,t,n){let i={};i[t]=n,e.setQueryParameters(i);let o=e.request,r=e.url;o.url=r,o.requestFunction=function(){let s=yu();return window[n]=function(c){s.resolve(c);try{delete window[n]}catch{window[n]=void 0}},Nt._Implementations.loadAndExecuteScript(r,n,s),s.promise};let a=Xc.request(o);if(l(a))return a.catch(function(s){return o.state!==di.FAILED?Promise.reject(s):e.retryOnError(s).then(function(c){return c?(o.state=di.UNISSUED,o.deferred=void 0,Oae(e,t,n)):Promise.reject(s)})})}Nt.fetchJsonp=function(e){return new Nt(e).fetchJsonp(e.callbackParameterName)};Nt.prototype._makeRequest=function(e){let t=this;v7(t.request);let n=t.request,i=t.url;n.url=i,n.requestFunction=function(){let r=e.responseType,a=wt(e.headers,t.headers),s=e.overrideMimeType,c=e.method,u=e.data,f=yu(),d=Nt._Implementations.loadWithXhr(i,r,c,u,a,f,s);return l(d)&&l(d.abort)&&(n.cancelFunction=function(){d.abort()}),f.promise};let o=Xc.request(n);if(l(o))return o.then(function(r){return n.cancelFunction=void 0,r}).catch(function(r){return n.cancelFunction=void 0,n.state!==di.FAILED?Promise.reject(r):t.retryOnError(r).then(function(a){return a?(n.state=di.UNISSUED,n.deferred=void 0,t.fetch(e)):Promise.reject(r)})})};function v7(e){if(e.state===di.ISSUED||e.state===di.ACTIVE)throw new re("The Resource is already being fetched.");e.state=di.UNISSUED,e.deferred=void 0}var lLe=/^data:(.*?)(;base64)?,(.*)$/;function i8(e,t){let n=decodeURIComponent(t);return e?atob(n):n}function Dae(e,t){let n=i8(e,t),i=new ArrayBuffer(n.length),o=new Uint8Array(i);for(let r=0;r<n.length;r++)o[r]=n.charCodeAt(r);return i}function uLe(e,t){t=t??"";let n=e[1],i=!!e[2],o=e[3],r,a;switch(t){case"":case"text":return i8(i,o);case"arraybuffer":return Dae(i,o);case"blob":return r=Dae(i,o),new Blob([r],{type:n});case"document":return a=new DOMParser,a.parseFromString(i8(i,o),n);case"json":return JSON.parse(i8(i,o));default:}}Nt.prototype.fetch=function(e){return e=rp(e,{}),e.method="GET",this._makeRequest(e)};Nt.fetch=function(e){return new Nt(e).fetch({responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Nt.prototype.delete=function(e){return e=rp(e,{}),e.method="DELETE",this._makeRequest(e)};Nt.delete=function(e){return new Nt(e).delete({responseType:e.responseType,overrideMimeType:e.overrideMimeType,data:e.data})};Nt.prototype.head=function(e){return e=rp(e,{}),e.method="HEAD",this._makeRequest(e)};Nt.head=function(e){return new Nt(e).head({responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Nt.prototype.options=function(e){return e=rp(e,{}),e.method="OPTIONS",this._makeRequest(e)};Nt.options=function(e){return new Nt(e).options({responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Nt.prototype.post=function(e,t){return No.defined("data",e),t=rp(t,{}),t.method="POST",t.data=e,this._makeRequest(t)};Nt.post=function(e){return new Nt(e).post(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Nt.prototype.put=function(e,t){return No.defined("data",e),t=rp(t,{}),t.method="PUT",t.data=e,this._makeRequest(t)};Nt.put=function(e){return new Nt(e).put(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Nt.prototype.patch=function(e,t){return No.defined("data",e),t=rp(t,{}),t.method="PATCH",t.data=e,this._makeRequest(t)};Nt.patch=function(e){return new Nt(e).patch(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Nt._Implementations={};Nt._Implementations.loadImageElement=function(e,t,n){let i=new Image;i.onload=function(){i.naturalWidth===0&&i.naturalHeight===0&&i.width===0&&i.height===0&&(i.width=300,i.height=150),n.resolve(i)},i.onerror=function(o){n.reject(o)},t&&(AE.contains(e)?i.crossOrigin="use-credentials":i.crossOrigin=""),i.src=e};Nt._Implementations.createImage=function(e,t,n,i,o,r,a){let s=e.url;Nt.supportsImageBitmapOptions().then(function(c){if(!(c&&r)){Nt._Implementations.loadImageElement(s,t,n);return}let u="blob",f="GET",d=yu(),p=Nt._Implementations.loadWithXhr(s,u,f,void 0,a,d,void 0,void 0,void 0);return l(p)&&l(p.abort)&&(e.cancelFunction=function(){p.abort()}),d.promise.then(function(g){if(!l(g)){n.reject(new re(`Successfully retrieved ${s} but it contained no content.`));return}return Nt.createImageBitmapFromBlob(g,{flipY:i,premultiplyAlpha:!1,skipColorSpaceConversion:o})}).then(function(g){n.resolve(g)})}).catch(function(c){n.reject(c)})};Nt.createImageBitmapFromBlob=function(e,t){return No.defined("options",t),No.typeOf.bool("options.flipY",t.flipY),No.typeOf.bool("options.premultiplyAlpha",t.premultiplyAlpha),No.typeOf.bool("options.skipColorSpaceConversion",t.skipColorSpaceConversion),createImageBitmap(e,{imageOrientation:t.flipY?"flipY":"none",premultiplyAlpha:t.premultiplyAlpha?"premultiply":"none",colorSpaceConversion:t.skipColorSpaceConversion?"none":"default"})};function fLe(e,t,n,i,o,r,a){fetch(e,{method:n,headers:o}).then(async s=>{if(!s.ok){let c={};s.headers.forEach((u,f)=>{c[f]=u}),r.reject(new ip(s.status,s,c));return}switch(t){case"text":r.resolve(s.text());break;case"json":r.resolve(s.json());break;default:r.resolve(new Uint8Array(await s.arrayBuffer()).buffer);break}}).catch(()=>{r.reject(new ip)})}var dLe=typeof XMLHttpRequest>"u";Nt._Implementations.loadWithXhr=function(e,t,n,i,o,r,a){let s=lLe.exec(e);if(s!==null){r.resolve(uLe(s,t));return}if(dLe){fLe(e,t,n,i,o,r,a);return}let c=new XMLHttpRequest;if(AE.contains(e)&&(c.withCredentials=!0),c.open(n,e,!0),l(a)&&l(c.overrideMimeType)&&c.overrideMimeType(a),l(o))for(let f in o)o.hasOwnProperty(f)&&c.setRequestHeader(f,o[f]);l(t)&&(c.responseType=t);let u=!1;return typeof e=="string"&&(u=e.indexOf("file://")===0||typeof window<"u"&&window.location.origin==="file://"),c.onload=function(){if((c.status<200||c.status>=300)&&!(u&&c.status===0)){r.reject(new ip(c.status,c.response,c.getAllResponseHeaders()));return}let f=c.response,d=c.responseType;if(n==="HEAD"||n==="OPTIONS"){let g=c.getAllResponseHeaders().trim().split(/[\r\n]+/),m={};g.forEach(function(A){let y=A.split(": "),x=y.shift();m[x]=y.join(": ")}),r.resolve(m);return}if(c.status===204)r.resolve(void 0);else if(l(f)&&(!l(t)||d===t))r.resolve(f);else if(t==="json"&&typeof f=="string")try{r.resolve(JSON.parse(f))}catch(p){r.reject(p)}else(d===""||d==="document")&&l(c.responseXML)&&c.responseXML.hasChildNodes()?r.resolve(c.responseXML):(d===""||d==="text")&&l(c.responseText)?r.resolve(c.responseText):r.reject(new re("Invalid XMLHttpRequest response type."))},c.onerror=function(f){r.reject(new ip)},c.send(i),c};Nt._Implementations.loadAndExecuteScript=function(e,t,n){return dx(e,t).catch(function(i){n.reject(i)})};Nt._DefaultImplementations={};Nt._DefaultImplementations.createImage=Nt._Implementations.createImage;Nt._DefaultImplementations.loadWithXhr=Nt._Implementations.loadWithXhr;Nt._DefaultImplementations.loadAndExecuteScript=Nt._Implementations.loadAndExecuteScript;Nt.DEFAULT=Object.freeze(new Nt({url:typeof document>"u"?"":document.location.href.split("?")[0]}));var De=Nt;function rD(e){e=e??G.EMPTY_OBJECT,this._dates=void 0,this._samples=void 0,this._dateColumn=-1,this._xPoleWanderRadiansColumn=-1,this._yPoleWanderRadiansColumn=-1,this._ut1MinusUtcSecondsColumn=-1,this._xCelestialPoleOffsetRadiansColumn=-1,this._yCelestialPoleOffsetRadiansColumn=-1,this._taiMinusUtcSecondsColumn=-1,this._columnCount=0,this._lastIndex=-1,this._addNewLeapSeconds=e.addNewLeapSeconds??!0,l(e.data)?Mae(this,e.data):Mae(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}rD.fromUrl=async function(e,t){t=t??G.EMPTY_OBJECT;let n=De.createIfNeeded(e),i;try{i=await n.fetchJson()}catch{throw new re(`An error occurred while retrieving the EOP data from the URL ${n.url}.`)}return new rD({addNewLeapSeconds:t.addNewLeapSeconds,data:i})};rD.NONE=Object.freeze({compute:function(e,t){return l(t)?(t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0):t=new Y_(0,0,0,0,0),t}});rD.prototype.compute=function(e,t){if(!l(this._samples))return;if(l(t)||(t=new Y_(0,0,0,0,0)),this._samples.length===0)return t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0,t;let n=this._dates,i=this._lastIndex,o=0,r=0;if(l(i)){let s=n[i],c=n[i+1],u=Q.lessThanOrEquals(s,e),f=!l(c),d=f||Q.greaterThanOrEquals(c,e);if(u&&d)return o=i,!f&&c.equals(e)&&++o,r=o+1,Lae(this,n,this._samples,e,o,r,t),t}let a=_o(n,e,Q.compare,this._dateColumn);return a>=0?(a<n.length-1&&n[a+1].equals(e)&&++a,o=a,r=a):(r=~a,o=r-1,o<0&&(o=0)),this._lastIndex=o,Lae(this,n,this._samples,e,o,r,t),t};function hLe(e,t){return Q.compare(e.julianDate,t)}function Mae(e,t){if(!l(t.columnNames))throw new re("Error in loaded EOP data: The columnNames property is required.");if(!l(t.samples))throw new re("Error in loaded EOP data: The samples property is required.");let n=t.columnNames.indexOf("modifiedJulianDateUtc"),i=t.columnNames.indexOf("xPoleWanderRadians"),o=t.columnNames.indexOf("yPoleWanderRadians"),r=t.columnNames.indexOf("ut1MinusUtcSeconds"),a=t.columnNames.indexOf("xCelestialPoleOffsetRadians"),s=t.columnNames.indexOf("yCelestialPoleOffsetRadians"),c=t.columnNames.indexOf("taiMinusUtcSeconds");if(n<0||i<0||o<0||r<0||a<0||s<0||c<0)throw new re("Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns");let u=e._samples=t.samples,f=e._dates=[];e._dateColumn=n,e._xPoleWanderRadiansColumn=i,e._yPoleWanderRadiansColumn=o,e._ut1MinusUtcSecondsColumn=r,e._xCelestialPoleOffsetRadiansColumn=a,e._yCelestialPoleOffsetRadiansColumn=s,e._taiMinusUtcSecondsColumn=c,e._columnCount=t.columnNames.length,e._lastIndex=void 0;let d,p=e._addNewLeapSeconds;for(let g=0,m=u.length;g<m;g+=e._columnCount){let A=u[g+n],y=u[g+c],x=A+ii.MODIFIED_JULIAN_DATE_DIFFERENCE,b=new Q(x,y,ei.TAI);if(f.push(b),p){if(y!==d&&l(d)){let C=Q.leapSeconds,E=_o(C,b,hLe);if(E<0){let S=new ao(b,y);C.splice(~E,0,S)}}d=y}}}function Bae(e,t,n,i,o){let r=n*i;o.xPoleWander=t[r+e._xPoleWanderRadiansColumn],o.yPoleWander=t[r+e._yPoleWanderRadiansColumn],o.xPoleOffset=t[r+e._xCelestialPoleOffsetRadiansColumn],o.yPoleOffset=t[r+e._yCelestialPoleOffsetRadiansColumn],o.ut1MinusUtc=t[r+e._ut1MinusUtcSecondsColumn]}function oD(e,t,n){return t+e*(n-t)}function Lae(e,t,n,i,o,r,a){let s=e._columnCount;if(r>t.length-1)return a.xPoleWander=0,a.yPoleWander=0,a.xPoleOffset=0,a.yPoleOffset=0,a.ut1MinusUtc=0,a;let c=t[o],u=t[r];if(c.equals(u)||i.equals(c))return Bae(e,n,o,s,a),a;if(i.equals(u))return Bae(e,n,r,s,a),a;let f=Q.secondsDifference(i,c)/Q.secondsDifference(u,c),d=o*s,p=r*s,g=n[d+e._ut1MinusUtcSecondsColumn],m=n[p+e._ut1MinusUtcSecondsColumn],A=m-g;if(A>.5||A<-.5){let y=n[d+e._taiMinusUtcSecondsColumn],x=n[p+e._taiMinusUtcSecondsColumn];y!==x&&(u.equals(i)?g=m:m-=x-y)}return a.xPoleWander=oD(f,n[d+e._xPoleWanderRadiansColumn],n[p+e._xPoleWanderRadiansColumn]),a.yPoleWander=oD(f,n[d+e._yPoleWanderRadiansColumn],n[p+e._yPoleWanderRadiansColumn]),a.xPoleOffset=oD(f,n[d+e._xCelestialPoleOffsetRadiansColumn],n[p+e._xCelestialPoleOffsetRadiansColumn]),a.yPoleOffset=oD(f,n[d+e._yCelestialPoleOffsetRadiansColumn],n[p+e._yCelestialPoleOffsetRadiansColumn]),a.ut1MinusUtc=oD(f,g,m),a}var aD=rD;function Kc(e,t,n){this.heading=e??0,this.pitch=t??0,this.roll=n??0}Kc.fromQuaternion=function(e,t){l(t)||(t=new Kc);let n=2*(e.w*e.y-e.z*e.x),i=1-2*(e.x*e.x+e.y*e.y),o=2*(e.w*e.x+e.y*e.z),r=1-2*(e.y*e.y+e.z*e.z),a=2*(e.w*e.z+e.x*e.y);return t.heading=-Math.atan2(a,r),t.roll=Math.atan2(o,i),t.pitch=-D.asinClamped(n),t};Kc.fromDegrees=function(e,t,n,i){return l(i)||(i=new Kc),i.heading=e*D.RADIANS_PER_DEGREE,i.pitch=t*D.RADIANS_PER_DEGREE,i.roll=n*D.RADIANS_PER_DEGREE,i};Kc.clone=function(e,t){if(l(e))return l(t)?(t.heading=e.heading,t.pitch=e.pitch,t.roll=e.roll,t):new Kc(e.heading,e.pitch,e.roll)};Kc.equals=function(e,t){return e===t||l(e)&&l(t)&&e.heading===t.heading&&e.pitch===t.pitch&&e.roll===t.roll};Kc.equalsEpsilon=function(e,t,n,i){return e===t||l(e)&&l(t)&&D.equalsEpsilon(e.heading,t.heading,n,i)&&D.equalsEpsilon(e.pitch,t.pitch,n,i)&&D.equalsEpsilon(e.roll,t.roll,n,i)};Kc.prototype.clone=function(e){return Kc.clone(this,e)};Kc.prototype.equals=function(e){return Kc.equals(this,e)};Kc.prototype.equalsEpsilon=function(e,t,n){return Kc.equalsEpsilon(this,e,t,n)};Kc.prototype.toString=function(){return`(${this.heading}, ${this.pitch}, ${this.roll})`};var Tc=Kc;var Nae={},Fae=/((?:.*\/)|^)Cesium\.js(?:\?|\#|$)/;function mLe(){let e=document.getElementsByTagName("script");for(let t=0,n=e.length;t<n;++t){let i=e[t].getAttribute("src"),o=Fae.exec(i);if(o!==null)return o[1]}}var r8;function kae(e){return typeof document>"u"?e:(l(r8)||(r8=document.createElement("a")),r8.href=e,r8.href)}var gx;function zae(){if(l(gx))return gx;let e;return typeof CESIUM_BASE_URL<"u"?e=CESIUM_BASE_URL:l(Nae?.url)?e=hd(".",Nae.url):typeof define=="object"&&l(define.amd)&&!define.amd.toUrlUndefined&&l(require.toUrl)?e=hd("..",_x("Core/buildModuleUrl.js")):e=mLe(),gx=new De({url:kae(e)}),gx.appendForwardSlash(),gx}function pLe(e){return kae(require.toUrl(`../${e}`))}function Uae(e){return zae().getDerivedResource({url:e}).url}var a8;function _x(e){return l(a8)||(typeof define=="object"&&l(define.amd)&&!define.amd.toUrlUndefined&&l(require.toUrl)?a8=pLe:a8=Uae),a8(e)}_x._cesiumScriptRegex=Fae;_x._buildModuleUrlFromBaseUrl=Uae;_x._clearBaseResource=function(){gx=void 0};_x.setBaseUrl=function(e){gx=De.DEFAULT.getDerivedResource({url:e})};_x.getCesiumBaseUrl=zae;var Xt=_x;function gLe(e,t,n){this.x=e,this.y=t,this.s=n}var Ax=gLe;function s8(e){e=e??G.EMPTY_OBJECT,this._xysFileUrlTemplate=De.createIfNeeded(e.xysFileUrlTemplate),this._interpolationOrder=e.interpolationOrder??9,this._sampleZeroJulianEphemerisDate=e.sampleZeroJulianEphemerisDate??24423965e-1,this._sampleZeroDateTT=new Q(this._sampleZeroJulianEphemerisDate,0,ei.TAI),this._stepSizeDays=e.stepSizeDays??1,this._samplesPerXysFile=e.samplesPerXysFile??1e3,this._totalSamples=e.totalSamples??27426,this._samples=new Array(this._totalSamples*3),this._chunkDownloadsInProgress=[];let t=this._interpolationOrder,n=this._denominators=new Array(t+1),i=this._xTable=new Array(t+1),o=Math.pow(this._stepSizeDays,t);for(let r=0;r<=t;++r){n[r]=o,i[r]=r*this._stepSizeDays;for(let a=0;a<=t;++a)a!==r&&(n[r]*=r-a);n[r]=1/n[r]}this._work=new Array(t+1),this._coef=new Array(t+1)}var _Le=new Q(0,0,ei.TAI);function S7(e,t,n){let i=_Le;return i.dayNumber=t,i.secondsOfDay=n,Q.daysDifference(i,e._sampleZeroDateTT)}s8.prototype.preload=function(e,t,n,i){let o=S7(this,e,t),r=S7(this,n,i),a=o/this._stepSizeDays-this._interpolationOrder/2|0;a<0&&(a=0);let s=r/this._stepSizeDays-this._interpolationOrder/2|0+this._interpolationOrder;s>=this._totalSamples&&(s=this._totalSamples-1);let c=a/this._samplesPerXysFile|0,u=s/this._samplesPerXysFile|0,f=[];for(let d=c;d<=u;++d)f.push(w7(this,d));return Promise.all(f)};s8.prototype.computeXysRadians=function(e,t,n){let i=S7(this,e,t);if(i<0)return;let o=i/this._stepSizeDays|0;if(o>=this._totalSamples)return;let r=this._interpolationOrder,a=o-(r/2|0);a<0&&(a=0);let s=a+r;s>=this._totalSamples&&(s=this._totalSamples-1,a=s-r,a<0&&(a=0));let c=!1,u=this._samples;if(l(u[a*3])||(w7(this,a/this._samplesPerXysFile|0),c=!0),l(u[s*3])||(w7(this,s/this._samplesPerXysFile|0),c=!0),c)return;l(n)?(n.x=0,n.y=0,n.s=0):n=new Ax(0,0,0);let f=i-a*this._stepSizeDays,d=this._work,p=this._denominators,g=this._coef,m=this._xTable,A,y;for(A=0;A<=r;++A)d[A]=f-m[A];for(A=0;A<=r;++A){for(g[A]=1,y=0;y<=r;++y)y!==A&&(g[A]*=d[y]);g[A]*=p[A];let x=(a+A)*3;n.x+=g[A]*u[x++],n.y+=g[A]*u[x++],n.s+=g[A]*u[x]}return n};s8.prototype._updateChunkData=function(e,{samples:t}){this._chunkDownloadsInProgress[e]=void 0;let n=this._samplesPerXysFile,i=e*n*3;for(let o=0;o<t.length;++o)this._samples[i+o]=t[o]};async function ALe(e,t,n){try{let i=await e.fetchJson();n._updateChunkData(t,i)}catch{}}function w7(e,t){if(l(e._chunkDownloadsInProgress[t]))return e._chunkDownloadsInProgress[t];let n,i=e._xysFileUrlTemplate;l(i)?n=i.getDerivedResource({templateValues:{0:t}}):n=new De({url:Xt(`Assets/IAU2006_XYS/IAU2006_XYS_${t}.json`)});let o=ALe(n,t,e);return e._chunkDownloadsInProgress[t]=o,o}var sD=s8;function ct(e,t,n,i){this.x=e??0,this.y=t??0,this.z=n??0,this.w=i??0}var cD=new h;ct.fromAxisAngle=function(e,t,n){let i=t/2,o=Math.sin(i);cD=h.normalize(e,cD);let r=cD.x*o,a=cD.y*o,s=cD.z*o,c=Math.cos(i);return l(n)?(n.x=r,n.y=a,n.z=s,n.w=c,n):new ct(r,a,s,c)};var yLe=[1,2,0],xLe=new Array(3);ct.fromRotationMatrix=function(e,t){let n,i,o,r,a,s=e[$.COLUMN0ROW0],c=e[$.COLUMN1ROW1],u=e[$.COLUMN2ROW2],f=s+c+u;if(f>0)n=Math.sqrt(f+1),a=.5*n,n=.5/n,i=(e[$.COLUMN1ROW2]-e[$.COLUMN2ROW1])*n,o=(e[$.COLUMN2ROW0]-e[$.COLUMN0ROW2])*n,r=(e[$.COLUMN0ROW1]-e[$.COLUMN1ROW0])*n;else{let d=yLe,p=0;c>s&&(p=1),u>s&&u>c&&(p=2);let g=d[p],m=d[g];n=Math.sqrt(e[$.getElementIndex(p,p)]-e[$.getElementIndex(g,g)]-e[$.getElementIndex(m,m)]+1);let A=xLe;A[p]=.5*n,n=.5/n,a=(e[$.getElementIndex(m,g)]-e[$.getElementIndex(g,m)])*n,A[g]=(e[$.getElementIndex(g,p)]+e[$.getElementIndex(p,g)])*n,A[m]=(e[$.getElementIndex(m,p)]+e[$.getElementIndex(p,m)])*n,i=-A[0],o=-A[1],r=-A[2]}return l(t)?(t.x=i,t.y=o,t.z=r,t.w=a,t):new ct(i,o,r,a)};var Vae=new ct,jae=new ct,I7=new ct,Gae=new ct;ct.fromHeadingPitchRoll=function(e,t){return Gae=ct.fromAxisAngle(h.UNIT_X,e.roll,Vae),I7=ct.fromAxisAngle(h.UNIT_Y,-e.pitch,t),t=ct.multiply(I7,Gae,I7),jae=ct.fromAxisAngle(h.UNIT_Z,-e.heading,Vae),ct.multiply(jae,t,t)};var c8=new h,D7=new h,wh=new ct,Hae=new ct,l8=new ct;ct.packedLength=4;ct.pack=function(e,t,n){return n=n??0,t[n++]=e.x,t[n++]=e.y,t[n++]=e.z,t[n]=e.w,t};ct.unpack=function(e,t,n){return t=t??0,l(n)||(n=new ct),n.x=e[t],n.y=e[t+1],n.z=e[t+2],n.w=e[t+3],n};ct.packedInterpolationLength=3;ct.convertPackedArrayForInterpolation=function(e,t,n,i){ct.unpack(e,n*4,l8),ct.conjugate(l8,l8);for(let o=0,r=n-t+1;o<r;o++){let a=o*3;ct.unpack(e,(t+o)*4,wh),ct.multiply(wh,l8,wh),wh.w<0&&ct.negate(wh,wh),ct.computeAxis(wh,c8);let s=ct.computeAngle(wh);l(i)||(i=[]),i[a]=c8.x*s,i[a+1]=c8.y*s,i[a+2]=c8.z*s}};ct.unpackInterpolationResult=function(e,t,n,i,o){l(o)||(o=new ct),h.fromArray(e,0,D7);let r=h.magnitude(D7);return ct.unpack(t,i*4,Hae),r===0?ct.clone(ct.IDENTITY,wh):ct.fromAxisAngle(D7,r,wh),ct.multiply(wh,Hae,o)};ct.clone=function(e,t){if(l(e))return l(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new ct(e.x,e.y,e.z,e.w)};ct.conjugate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=e.w,t};ct.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w};ct.magnitude=function(e){return Math.sqrt(ct.magnitudeSquared(e))};ct.normalize=function(e,t){let n=1/ct.magnitude(e),i=e.x*n,o=e.y*n,r=e.z*n,a=e.w*n;return t.x=i,t.y=o,t.z=r,t.w=a,t};ct.inverse=function(e,t){let n=ct.magnitudeSquared(e);return t=ct.conjugate(e,t),ct.multiplyByScalar(t,1/n,t)};ct.add=function(e,t,n){return n.x=e.x+t.x,n.y=e.y+t.y,n.z=e.z+t.z,n.w=e.w+t.w,n};ct.subtract=function(e,t,n){return n.x=e.x-t.x,n.y=e.y-t.y,n.z=e.z-t.z,n.w=e.w-t.w,n};ct.negate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t};ct.dot=function(e,t){return e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w};ct.multiply=function(e,t,n){let i=e.x,o=e.y,r=e.z,a=e.w,s=t.x,c=t.y,u=t.z,f=t.w,d=a*s+i*f+o*u-r*c,p=a*c-i*u+o*f+r*s,g=a*u+i*c-o*s+r*f,m=a*f-i*s-o*c-r*u;return n.x=d,n.y=p,n.z=g,n.w=m,n};ct.multiplyByScalar=function(e,t,n){return n.x=e.x*t,n.y=e.y*t,n.z=e.z*t,n.w=e.w*t,n};ct.divideByScalar=function(e,t,n){return n.x=e.x/t,n.y=e.y/t,n.z=e.z/t,n.w=e.w/t,n};ct.computeAxis=function(e,t){let n=e.w;if(Math.abs(n-1)<D.EPSILON6||Math.abs(n+1)<D.EPSILON6)return t.x=1,t.y=t.z=0,t;let i=1/Math.sqrt(1-n*n);return t.x=e.x*i,t.y=e.y*i,t.z=e.z*i,t};ct.computeAngle=function(e){return Math.abs(e.w-1)<D.EPSILON6?0:2*Math.acos(e.w)};var P7=new ct;ct.lerp=function(e,t,n,i){return P7=ct.multiplyByScalar(t,n,P7),i=ct.multiplyByScalar(e,1-n,i),ct.add(P7,i,i)};var Wae=new ct,R7=new ct,O7=new ct;ct.slerp=function(e,t,n,i){let o=ct.dot(e,t),r=t;if(o<0&&(o=-o,r=Wae=ct.negate(t,Wae)),1-o<D.EPSILON6)return ct.lerp(e,r,n,i);let a=Math.acos(o);return R7=ct.multiplyByScalar(e,Math.sin((1-n)*a),R7),O7=ct.multiplyByScalar(r,Math.sin(n*a),O7),i=ct.add(R7,O7,i),ct.multiplyByScalar(i,1/Math.sin(a),i)};ct.log=function(e,t){let n=D.acosClamped(e.w),i=0;return n!==0&&(i=n/Math.sin(n)),h.multiplyByScalar(e,i,t)};ct.exp=function(e,t){let n=h.magnitude(e),i=0;return n!==0&&(i=Math.sin(n)/n),t.x=e.x*i,t.y=e.y*i,t.z=e.z*i,t.w=Math.cos(n),t};var bLe=new h,CLe=new h,lD=new ct,xE=new ct;ct.computeInnerQuadrangle=function(e,t,n,i){let o=ct.conjugate(t,lD);ct.multiply(o,n,xE);let r=ct.log(xE,bLe);ct.multiply(o,e,xE);let a=ct.log(xE,CLe);return h.add(r,a,r),h.multiplyByScalar(r,.25,r),h.negate(r,r),ct.exp(r,lD),ct.multiply(t,lD,i)};ct.squad=function(e,t,n,i,o,r){let a=ct.slerp(e,t,o,lD),s=ct.slerp(n,i,o,xE);return ct.slerp(a,s,2*o*(1-o),r)};var TLe=new ct,qae=1.9011074535173003,u8=sn.supportsTypedArrays()?new Float32Array(8):[],f8=sn.supportsTypedArrays()?new Float32Array(8):[],B0=sn.supportsTypedArrays()?new Float32Array(8):[],L0=sn.supportsTypedArrays()?new Float32Array(8):[];for(let e=0;e<7;++e){let t=e+1,n=2*t+1;u8[e]=1/(t*n),f8[e]=t/n}u8[7]=qae/136;f8[7]=qae*8/17;ct.fastSlerp=function(e,t,n,i){let o=ct.dot(e,t),r;o>=0?r=1:(r=-1,o=-o);let a=o-1,s=1-n,c=n*n,u=s*s;for(let g=7;g>=0;--g)B0[g]=(u8[g]*c-f8[g])*a,L0[g]=(u8[g]*u-f8[g])*a;let f=r*n*(1+B0[0]*(1+B0[1]*(1+B0[2]*(1+B0[3]*(1+B0[4]*(1+B0[5]*(1+B0[6]*(1+B0[7])))))))),d=s*(1+L0[0]*(1+L0[1]*(1+L0[2]*(1+L0[3]*(1+L0[4]*(1+L0[5]*(1+L0[6]*(1+L0[7])))))))),p=ct.multiplyByScalar(e,d,TLe);return ct.multiplyByScalar(t,f,i),ct.add(p,i,i)};ct.fastSquad=function(e,t,n,i,o,r){let a=ct.fastSlerp(e,t,o,lD),s=ct.fastSlerp(n,i,o,xE);return ct.fastSlerp(a,s,2*o*(1-o),r)};ct.equals=function(e,t){return e===t||l(e)&&l(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w};ct.equalsEpsilon=function(e,t,n){return n=n??0,e===t||l(e)&&l(t)&&Math.abs(e.x-t.x)<=n&&Math.abs(e.y-t.y)<=n&&Math.abs(e.z-t.z)<=n&&Math.abs(e.w-t.w)<=n};ct.ZERO=Object.freeze(new ct(0,0,0,0));ct.IDENTITY=Object.freeze(new ct(0,0,0,1));ct.prototype.clone=function(e){return ct.clone(this,e)};ct.prototype.equals=function(e){return ct.equals(this,e)};ct.prototype.equalsEpsilon=function(e,t){return ct.equalsEpsilon(this,e,t)};ct.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};var Le=ct;var hi={},M7={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},bE={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},B7={},xu={east:new h,north:new h,up:new h,west:new h,south:new h,down:new h},Q_=new h,$_=new h,J_=new h;hi.localFrameToFixedFrameGenerator=function(e,t){if(!M7.hasOwnProperty(e)||!M7[e].hasOwnProperty(t))throw new _e("firstAxis and secondAxis must be east, north, up, west, south or down.");let n=M7[e][t],i,o=e+t;return l(B7[o])?i=B7[o]:(i=function(r,a,s){if(l(s)||(s=new M),h.equalsEpsilon(r,h.ZERO,D.EPSILON14))h.unpack(bE[e],0,Q_),h.unpack(bE[t],0,$_),h.unpack(bE[n],0,J_);else if(D.equalsEpsilon(r.x,0,D.EPSILON14)&&D.equalsEpsilon(r.y,0,D.EPSILON14)){let c=D.sign(r.z);h.unpack(bE[e],0,Q_),e!=="east"&&e!=="west"&&h.multiplyByScalar(Q_,c,Q_),h.unpack(bE[t],0,$_),t!=="east"&&t!=="west"&&h.multiplyByScalar($_,c,$_),h.unpack(bE[n],0,J_),n!=="east"&&n!=="west"&&h.multiplyByScalar(J_,c,J_)}else{a=a??te.default,a.geodeticSurfaceNormal(r,xu.up);let c=xu.up,u=xu.east;u.x=-r.y,u.y=r.x,u.z=0,h.normalize(u,xu.east),h.cross(c,u,xu.north),h.multiplyByScalar(xu.up,-1,xu.down),h.multiplyByScalar(xu.east,-1,xu.west),h.multiplyByScalar(xu.north,-1,xu.south),Q_=xu[e],$_=xu[t],J_=xu[n]}return s[0]=Q_.x,s[1]=Q_.y,s[2]=Q_.z,s[3]=0,s[4]=$_.x,s[5]=$_.y,s[6]=$_.z,s[7]=0,s[8]=J_.x,s[9]=J_.y,s[10]=J_.z,s[11]=0,s[12]=r.x,s[13]=r.y,s[14]=r.z,s[15]=1,s},B7[o]=i),i};hi.eastNorthUpToFixedFrame=hi.localFrameToFixedFrameGenerator("east","north");hi.northEastDownToFixedFrame=hi.localFrameToFixedFrameGenerator("north","east");hi.northUpEastToFixedFrame=hi.localFrameToFixedFrameGenerator("north","up");hi.northWestUpToFixedFrame=hi.localFrameToFixedFrameGenerator("north","west");var ELe=new Le,vLe=new h(1,1,1),SLe=new M;hi.headingPitchRollToFixedFrame=function(e,t,n,i,o){i=i??hi.eastNorthUpToFixedFrame;let r=Le.fromHeadingPitchRoll(t,ELe),a=M.fromTranslationQuaternionRotationScale(h.ZERO,r,vLe,SLe);return o=i(e,n,o),M.multiply(o,a,o)};var wLe=new M,ILe=new $;hi.headingPitchRollQuaternion=function(e,t,n,i,o){let r=hi.headingPitchRollToFixedFrame(e,t,n,i,wLe),a=M.getMatrix3(r,ILe);return Le.fromRotationMatrix(a,o)};var DLe=new h(1,1,1),PLe=new h,Yae=new M,RLe=new M,OLe=new $,MLe=new Le;hi.fixedFrameToHeadingPitchRoll=function(e,t,n,i){t=t??te.default,n=n??hi.eastNorthUpToFixedFrame,l(i)||(i=new Tc);let o=M.getTranslation(e,PLe);if(h.equals(o,h.ZERO))return i.heading=0,i.pitch=0,i.roll=0,i;let r=M.inverseTransformation(n(o,t,Yae),Yae),a=M.setScale(e,DLe,RLe);a=M.setTranslation(a,h.ZERO,a),r=M.multiply(r,a,r);let s=Le.fromRotationMatrix(M.getMatrix3(r,OLe),MLe);return s=Le.normalize(s,s),Tc.fromQuaternion(s,i)};var BLe=6*3600+2460+50.54841,LLe=8640184812866e-6,NLe=.093104,FLe=-62e-7,kLe=11772758384668e-32,zLe=72921158553e-15,ULe=D.TWO_PI/86400,d8=new Q;hi.computeIcrfToCentralBodyFixedMatrix=function(e,t){let n=hi.computeIcrfToFixedMatrix(e,t);return l(n)||(n=hi.computeTemeToPseudoFixedMatrix(e,t)),n};hi.computeTemeToPseudoFixedMatrix=function(e,t){d8=Q.addSeconds(e,-Q.computeTaiMinusUtc(e),d8);let n=d8.dayNumber,i=d8.secondsOfDay,o,r=n-2451545;i>=43200?o=(r+.5)/ii.DAYS_PER_JULIAN_CENTURY:o=(r-.5)/ii.DAYS_PER_JULIAN_CENTURY;let s=(BLe+o*(LLe+o*(NLe+o*FLe)))*ULe%D.TWO_PI,c=zLe+kLe*(n-24515455e-1),u=(i+ii.SECONDS_PER_DAY*.5)%ii.SECONDS_PER_DAY,f=s+c*u,d=Math.cos(f),p=Math.sin(f);return l(t)?(t[0]=d,t[1]=-p,t[2]=0,t[3]=p,t[4]=d,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new $(d,p,0,-p,d,0,0,0,1)};hi.iau2006XysData=new sD;hi.earthOrientationParameters=aD.NONE;var F7=32.184,VLe=2451545;hi.preloadIcrfFixed=function(e){let t=e.start.dayNumber,n=e.start.secondsOfDay+F7,i=e.stop.dayNumber,o=e.stop.secondsOfDay+F7;return hi.iau2006XysData.preload(t,n,i,o)};hi.computeIcrfToFixedMatrix=function(e,t){l(t)||(t=new $);let n=hi.computeFixedToIcrfMatrix(e,t);if(l(n))return $.transpose(n,t)};var jLe=32.184,GLe=2451545,h8=new Tc,HLe=new $,WLe=new Q;hi.computeMoonFixedToIcrfMatrix=function(e,t){l(t)||(t=new $);let n=Q.addSeconds(e,jLe,WLe),i=Q.totalDays(n)-GLe,o=D.toRadians(12.112)-D.toRadians(.052992)*i,r=D.toRadians(24.224)-D.toRadians(.105984)*i,a=D.toRadians(227.645)+D.toRadians(13.012)*i,s=D.toRadians(261.105)+D.toRadians(13.340716)*i,c=D.toRadians(358)+D.toRadians(.9856)*i;return h8.pitch=D.toRadians(180)-D.toRadians(3.878)*Math.sin(o)-D.toRadians(.12)*Math.sin(r)+D.toRadians(.07)*Math.sin(a)-D.toRadians(.017)*Math.sin(s),h8.roll=D.toRadians(66.53-90)+D.toRadians(1.543)*Math.cos(o)+D.toRadians(.24)*Math.cos(r)-D.toRadians(.028)*Math.cos(a)+D.toRadians(.007)*Math.cos(s),h8.heading=D.toRadians(244.375-90)+D.toRadians(13.17635831)*i+D.toRadians(3.558)*Math.sin(o)+D.toRadians(.121)*Math.sin(r)-D.toRadians(.064)*Math.sin(a)+D.toRadians(.016)*Math.sin(s)+D.toRadians(.025)*Math.sin(c),$.fromHeadingPitchRoll(h8,HLe)};hi.computeIcrfToMoonFixedMatrix=function(e,t){l(t)||(t=new $);let n=hi.computeMoonFixedToIcrfMatrix(e,t);if(l(n))return $.transpose(n,t)};var qLe=new Ax(0,0,0),YLe=new Y_(0,0,0,0,0,0),L7=new $,N7=new $;hi.computeFixedToIcrfMatrix=function(e,t){l(t)||(t=new $);let n=hi.earthOrientationParameters.compute(e,YLe);if(!l(n))return;let i=e.dayNumber,o=e.secondsOfDay+F7,r=hi.iau2006XysData.computeXysRadians(i,o,qLe);if(!l(r))return;let a=r.x+n.xPoleOffset,s=r.y+n.yPoleOffset,c=1/(1+Math.sqrt(1-a*a-s*s)),u=L7;u[0]=1-c*a*a,u[3]=-c*a*s,u[6]=a,u[1]=-c*a*s,u[4]=1-c*s*s,u[7]=s,u[2]=-a,u[5]=-s,u[8]=1-c*(a*a+s*s);let f=$.fromRotationZ(-r.s,N7),d=$.multiply(u,f,L7),p=e.dayNumber,g=e.secondsOfDay-Q.computeTaiMinusUtc(e)+n.ut1MinusUtc,m=p-2451545,A=g/ii.SECONDS_PER_DAY,y=.779057273264+A+.00273781191135448*(m+A);y=y%1*D.TWO_PI;let x=$.fromRotationZ(y,N7),b=$.multiply(d,x,L7),C=Math.cos(n.xPoleWander),E=Math.cos(n.yPoleWander),S=Math.sin(n.xPoleWander),w=Math.sin(n.yPoleWander),P=i-VLe+o/ii.SECONDS_PER_DAY;P/=36525;let R=-47e-6*P*D.RADIANS_PER_DEGREE/3600,B=Math.cos(R),L=Math.sin(R),_=N7;return _[0]=C*B,_[1]=C*L,_[2]=S,_[3]=-E*L+w*S*B,_[4]=E*B+w*S*L,_[5]=-w*C,_[6]=-w*L-E*S*B,_[7]=w*B-E*S*L,_[8]=E*C,$.multiply(b,_,t)};var XLe=new se;hi.pointToWindowCoordinates=function(e,t,n,i){return i=hi.pointToGLWindowCoordinates(e,t,n,i),i.y=2*t[5]-i.y,i};hi.pointToGLWindowCoordinates=function(e,t,n,i){l(i)||(i=new z);let o=XLe;return M.multiplyByVector(e,se.fromElements(n.x,n.y,n.z,1,o),o),se.multiplyByScalar(o,1/o.w,o),M.multiplyByVector(t,o,o),z.fromCartesian4(o,i)};var KLe=new h,QLe=new h,$Le=new h;hi.rotationMatrixFromPositionVelocity=function(e,t,n,i){let o=(n??te.default).geodeticSurfaceNormal(e,KLe),r=h.cross(t,o,QLe);h.equalsEpsilon(r,h.ZERO,D.EPSILON6)&&(r=h.clone(h.UNIT_X,r));let a=h.cross(r,t,$Le);return h.normalize(a,a),h.cross(t,a,r),h.negate(r,r),h.normalize(r,r),l(i)||(i=new $),i[0]=t.x,i[1]=t.y,i[2]=t.z,i[3]=r.x,i[4]=r.y,i[5]=r.z,i[6]=a.x,i[7]=a.y,i[8]=a.z,i};hi.SWIZZLE_3D_TO_2D_MATRIX=Object.freeze(new M(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1));var Xae=new de,k7=new h,JLe=new h,ZLe=new $,z7=new M,Kae=new M;hi.basisTo2D=function(e,t,n){let i=M.getTranslation(t,JLe),o=e.ellipsoid,r;if(h.equals(i,h.ZERO))r=h.clone(h.ZERO,k7);else{let f=o.cartesianToCartographic(i,Xae);r=e.project(f,k7),h.fromElements(r.z,r.x,r.y,r)}let a=hi.eastNorthUpToFixedFrame(i,o,z7),s=M.inverseTransformation(a,Kae),c=M.getMatrix3(t,ZLe),u=M.multiplyByMatrix3(s,c,n);return M.multiply(hi.SWIZZLE_3D_TO_2D_MATRIX,u,n),M.setTranslation(n,r,n),n};hi.ellipsoidTo2DModelMatrix=function(e,t,n){let i=e.ellipsoid,o=hi.eastNorthUpToFixedFrame(t,i,z7),r=M.inverseTransformation(o,Kae),a=i.cartesianToCartographic(t,Xae),s=e.project(a,k7);h.fromElements(s.z,s.x,s.y,s);let c=M.fromTranslation(s,z7);return M.multiply(hi.SWIZZLE_3D_TO_2D_MATRIX,r,n),M.multiply(c,n,n),n};var pt=hi;var CE=class e{constructor(t,n,i,o){this.west=t??0,this.south=n??0,this.east=i??0,this.north=o??0}get width(){return e.computeWidth(this)}get height(){return e.computeHeight(this)}static pack(t,n,i){return i=i??0,n[i++]=t.west,n[i++]=t.south,n[i++]=t.east,n[i]=t.north,n}static unpack(t,n,i){return n=n??0,l(i)||(i=new e),i.west=t[n++],i.south=t[n++],i.east=t[n++],i.north=t[n],i}static computeWidth(t){let n=t.east,i=t.west;return n<i&&(n+=D.TWO_PI),n-i}static computeHeight(t){return t.north-t.south}static fromDegrees(t,n,i,o,r){return t=D.toRadians(t??0),n=D.toRadians(n??0),i=D.toRadians(i??0),o=D.toRadians(o??0),l(r)?(r.west=t,r.south=n,r.east=i,r.north=o,r):new e(t,n,i,o)}static fromRadians(t,n,i,o,r){return l(r)?(r.west=t??0,r.south=n??0,r.east=i??0,r.north=o??0,r):new e(t,n,i,o)}static fromCartographicArray(t,n){let i=Number.MAX_VALUE,o=-Number.MAX_VALUE,r=Number.MAX_VALUE,a=-Number.MAX_VALUE,s=Number.MAX_VALUE,c=-Number.MAX_VALUE;for(let u=0,f=t.length;u<f;u++){let d=t[u];i=Math.min(i,d.longitude),o=Math.max(o,d.longitude),s=Math.min(s,d.latitude),c=Math.max(c,d.latitude);let p=d.longitude>=0?d.longitude:d.longitude+D.TWO_PI;r=Math.min(r,p),a=Math.max(a,p)}return o-i>a-r&&(i=r,o=a,o>D.PI&&(o=o-D.TWO_PI),i>D.PI&&(i=i-D.TWO_PI)),l(n)?(n.west=i,n.south=s,n.east=o,n.north=c,n):new e(i,s,o,c)}static fromCartesianArray(t,n,i){n=n??te.default;let o=Number.MAX_VALUE,r=-Number.MAX_VALUE,a=Number.MAX_VALUE,s=-Number.MAX_VALUE,c=Number.MAX_VALUE,u=-Number.MAX_VALUE;for(let f=0,d=t.length;f<d;f++){let p=n.cartesianToCartographic(t[f]);o=Math.min(o,p.longitude),r=Math.max(r,p.longitude),c=Math.min(c,p.latitude),u=Math.max(u,p.latitude);let g=p.longitude>=0?p.longitude:p.longitude+D.TWO_PI;a=Math.min(a,g),s=Math.max(s,g)}return r-o>s-a&&(o=a,r=s,r>D.PI&&(r=r-D.TWO_PI),o>D.PI&&(o=o-D.TWO_PI)),l(i)?(i.west=o,i.south=c,i.east=r,i.north=u,i):new e(o,c,r,u)}static fromBoundingSphere(t,n,i){let o=t.center,r=t.radius;if(l(n)||(n=te.default),l(i)||(i=new e),h.equals(o,h.ZERO))return e.clone(e.MAX_VALUE,i),i;let a=pt.eastNorthUpToFixedFrame(o,n,eNe),s=M.multiplyByPointAsVector(a,h.UNIT_X,tNe);h.normalize(s,s);let c=M.multiplyByPointAsVector(a,h.UNIT_Y,nNe);h.normalize(c,c),h.multiplyByScalar(c,r,c),h.multiplyByScalar(s,r,s);let u=h.negate(c,oNe),f=h.negate(s,iNe),d=U7,p=d[0];return h.add(o,c,p),p=d[1],h.add(o,f,p),p=d[2],h.add(o,u,p),p=d[3],h.add(o,s,p),d[4]=o,e.fromCartesianArray(d,n,i)}static clone(t,n){if(l(t))return l(n)?(n.west=t.west,n.south=t.south,n.east=t.east,n.north=t.north,n):new e(t.west,t.south,t.east,t.north)}static equalsEpsilon(t,n,i){return i=i??0,t===n||l(t)&&l(n)&&Math.abs(t.west-n.west)<=i&&Math.abs(t.south-n.south)<=i&&Math.abs(t.east-n.east)<=i&&Math.abs(t.north-n.north)<=i}clone(t){return e.clone(this,t)}equals(t){return e.equals(this,t)}static equals(t,n){return t===n||l(t)&&l(n)&&t.west===n.west&&t.south===n.south&&t.east===n.east&&t.north===n.north}equalsEpsilon(t,n){return e.equalsEpsilon(this,t,n)}static _validate(t){}static southwest(t,n){return l(n)?(n.longitude=t.west,n.latitude=t.south,n.height=0,n):new de(t.west,t.south)}static northwest(t,n){return l(n)?(n.longitude=t.west,n.latitude=t.north,n.height=0,n):new de(t.west,t.north)}static northeast(t,n){return l(n)?(n.longitude=t.east,n.latitude=t.north,n.height=0,n):new de(t.east,t.north)}static southeast(t,n){return l(n)?(n.longitude=t.east,n.latitude=t.south,n.height=0,n):new de(t.east,t.south)}static center(t,n){let i=t.east,o=t.west;i<o&&(i+=D.TWO_PI);let r=D.negativePiToPi((o+i)*.5),a=(t.south+t.north)*.5;return l(n)?(n.longitude=r,n.latitude=a,n.height=0,n):new de(r,a)}static intersection(t,n,i){let o=t.east,r=t.west,a=n.east,s=n.west;o<r&&a>0?o+=D.TWO_PI:a<s&&o>0&&(a+=D.TWO_PI),o<r&&s<0?s+=D.TWO_PI:a<s&&r<0&&(r+=D.TWO_PI);let c=D.negativePiToPi(Math.max(r,s)),u=D.negativePiToPi(Math.min(o,a));if((t.west<t.east||n.west<n.east)&&u<=c)return;let f=Math.max(t.south,n.south),d=Math.min(t.north,n.north);if(!(f>=d))return l(i)?(i.west=c,i.south=f,i.east=u,i.north=d,i):new e(c,f,u,d)}static simpleIntersection(t,n,i){let o=Math.max(t.west,n.west),r=Math.max(t.south,n.south),a=Math.min(t.east,n.east),s=Math.min(t.north,n.north);if(!(r>=s||o>=a))return l(i)?(i.west=o,i.south=r,i.east=a,i.north=s,i):new e(o,r,a,s)}static union(t,n,i){l(i)||(i=new e);let o=t.east,r=t.west,a=n.east,s=n.west;o<r&&a>0?o+=D.TWO_PI:a<s&&o>0&&(a+=D.TWO_PI),o<r&&s<0?s+=D.TWO_PI:a<s&&r<0&&(r+=D.TWO_PI);let c=D.negativePiToPi(Math.min(r,s)),u=D.negativePiToPi(Math.max(o,a));return i.west=c,i.south=Math.min(t.south,n.south),i.east=u,i.north=Math.max(t.north,n.north),i}static expand(t,n,i){return l(i)||(i=new e),i.west=Math.min(t.west,n.longitude),i.south=Math.min(t.south,n.latitude),i.east=Math.max(t.east,n.longitude),i.north=Math.max(t.north,n.latitude),i}static contains(t,n){let i=n.longitude,o=n.latitude,r=t.west,a=t.east;return a<r&&(a+=D.TWO_PI,i<0&&(i+=D.TWO_PI)),(i>r||D.equalsEpsilon(i,r,D.EPSILON14))&&(i<a||D.equalsEpsilon(i,a,D.EPSILON14))&&o>=t.south&&o<=t.north}static subsample(t,n,i,o){n=n??te.default,i=i??0,l(o)||(o=[]);let r=0,a=t.north,s=t.south,c=t.east,u=t.west,f=rNe;f.height=i,f.longitude=u,f.latitude=a,o[r]=n.cartographicToCartesian(f,o[r]),r++,f.longitude=c,o[r]=n.cartographicToCartesian(f,o[r]),r++,f.latitude=s,o[r]=n.cartographicToCartesian(f,o[r]),r++,f.longitude=u,o[r]=n.cartographicToCartesian(f,o[r]),r++,a<0?f.latitude=a:s>0?f.latitude=s:f.latitude=0;for(let d=1;d<8;++d)f.longitude=-Math.PI+d*D.PI_OVER_TWO,e.contains(t,f)&&(o[r]=n.cartographicToCartesian(f,o[r]),r++);return f.latitude===0&&(f.longitude=u,o[r]=n.cartographicToCartesian(f,o[r]),r++,f.longitude=c,o[r]=n.cartographicToCartesian(f,o[r]),r++),o.length=r,o}static subsection(t,n,i,o,r,a){if(l(a)||(a=new e),t.west<=t.east){let c=t.east-t.west;a.west=t.west+n*c,a.east=t.west+o*c}else{let c=D.TWO_PI+t.east-t.west;a.west=D.negativePiToPi(t.west+n*c),a.east=D.negativePiToPi(t.west+o*c)}let s=t.north-t.south;return a.south=t.south+i*s,a.north=t.south+r*s,n===1&&(a.west=t.east),o===1&&(a.east=t.east),i===1&&(a.south=t.north),r===1&&(a.north=t.north),a}};CE.packedLength=4;var eNe=new M,tNe=new h,nNe=new h,iNe=new h,oNe=new h,U7=new Array(5);for(let e=0;e<U7.length;++e)U7[e]=new h;var rNe=new de;CE.MAX_VALUE=Object.freeze(new CE(-Math.PI,-D.PI_OVER_TWO,Math.PI,D.PI_OVER_TWO));var oe=CE;function ua(e,t,n,i){this.x=e??0,this.y=t??0,this.width=n??0,this.height=i??0}ua.packedLength=4;ua.pack=function(e,t,n){return n=n??0,t[n++]=e.x,t[n++]=e.y,t[n++]=e.width,t[n]=e.height,t};ua.unpack=function(e,t,n){return t=t??0,l(n)||(n=new ua),n.x=e[t++],n.y=e[t++],n.width=e[t++],n.height=e[t],n};ua.fromPoints=function(e,t){if(l(t)||(t=new ua),!l(e)||e.length===0)return t.x=0,t.y=0,t.width=0,t.height=0,t;let n=e.length,i=e[0].x,o=e[0].y,r=e[0].x,a=e[0].y;for(let s=1;s<n;s++){let c=e[s],u=c.x,f=c.y;i=Math.min(u,i),r=Math.max(u,r),o=Math.min(f,o),a=Math.max(f,a)}return t.x=i,t.y=o,t.width=r-i,t.height=a-o,t};var Qae=new ji,aNe=new de,sNe=new de;ua.fromRectangle=function(e,t,n){if(l(n)||(n=new ua),!l(e))return n.x=0,n.y=0,n.width=0,n.height=0,n;Qae._ellipsoid=te.default,t=t??Qae;let i=t.project(oe.southwest(e,aNe)),o=t.project(oe.northeast(e,sNe));return z.subtract(o,i,o),n.x=i.x,n.y=i.y,n.width=o.x,n.height=o.y,n};ua.clone=function(e,t){if(l(e))return l(t)?(t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,t):new ua(e.x,e.y,e.width,e.height)};ua.union=function(e,t,n){l(n)||(n=new ua);let i=Math.min(e.x,t.x),o=Math.min(e.y,t.y),r=Math.max(e.x+e.width,t.x+t.width),a=Math.max(e.y+e.height,t.y+t.height);return n.x=i,n.y=o,n.width=r-i,n.height=a-o,n};ua.expand=function(e,t,n){n=ua.clone(e,n);let i=t.x-n.x,o=t.y-n.y;return i>n.width?n.width=i:i<0&&(n.width-=i,n.x=t.x),o>n.height?n.height=o:o<0&&(n.height-=o,n.y=t.y),n};ua.intersect=function(e,t){let n=e.x,i=e.y,o=t.x,r=t.y;return n>o+t.width||n+e.width<o||i+e.height<r||i>r+t.height?qt.OUTSIDE:qt.INTERSECTING};ua.equals=function(e,t){return e===t||l(e)&&l(t)&&e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height};ua.prototype.clone=function(e){return ua.clone(this,e)};ua.prototype.intersect=function(e){return ua.intersect(this,e)};ua.prototype.equals=function(e){return ua.equals(this,e)};var Je=ua;var $s={POINTS:ee.POINTS,LINES:ee.LINES,LINE_LOOP:ee.LINE_LOOP,LINE_STRIP:ee.LINE_STRIP,TRIANGLES:ee.TRIANGLES,TRIANGLE_STRIP:ee.TRIANGLE_STRIP,TRIANGLE_FAN:ee.TRIANGLE_FAN};$s.isLines=function(e){return e===$s.LINES||e===$s.LINE_LOOP||e===$s.LINE_STRIP};$s.isTriangles=function(e){return e===$s.TRIANGLES||e===$s.TRIANGLE_STRIP||e===$s.TRIANGLE_FAN};$s.validate=function(e){return e===$s.POINTS||e===$s.LINES||e===$s.LINE_LOOP||e===$s.LINE_STRIP||e===$s.TRIANGLES||e===$s.TRIANGLE_STRIP||e===$s.TRIANGLE_FAN};Object.freeze($s);var Re=$s;var yx=`in vec4 position;
- in vec2 textureCoordinates;
-
- out vec2 v_textureCoordinates;
-
- void main()
- {
- gl_Position = position;
- v_textureCoordinates = textureCoordinates;
- }
- `;var Kr={CULL:1,OCCLUDE:2,EXECUTE_IN_CLOSEST_FRUSTUM:4,DEBUG_SHOW_BOUNDING_VOLUME:8,CAST_SHADOWS:16,RECEIVE_SHADOWS:32,PICK_ONLY:64,DEPTH_FOR_TRANSLUCENT_CLASSIFICATION:128},V7=class e{constructor(t=G.EMPTY_OBJECT){this._boundingVolume=t.boundingVolume,this._orientedBoundingBox=t.orientedBoundingBox,this._modelMatrix=t.modelMatrix,this._primitiveType=t.primitiveType??Re.TRIANGLES,this._vertexArray=t.vertexArray,this._count=t.count,this._offset=t.offset??0,this._instanceCount=t.instanceCount??0,this._shaderProgram=t.shaderProgram,this._uniformMap=t.uniformMap,this._renderState=t.renderState,this._framebuffer=t.framebuffer,this._pass=t.pass,this._owner=t.owner,this._debugOverlappingFrustums=0,this._pickId=t.pickId,this._pickMetadataAllowed=t.pickMetadataAllowed===!0,this._pickedMetadataInfo=void 0,this._flags=0,this.cull=t.cull??!0,this.occlude=t.occlude??!0,this.executeInClosestFrustum=t.executeInClosestFrustum??!1,this.debugShowBoundingVolume=t.debugShowBoundingVolume??!1,this.castShadows=t.castShadows??!1,this.receiveShadows=t.receiveShadows??!1,this.pickOnly=t.pickOnly??!1,this.depthForTranslucentClassification=t.depthForTranslucentClassification??!1,this.dirty=!0,this.lastDirtyTime=0,this.derivedCommands={}}get boundingVolume(){return this._boundingVolume}set boundingVolume(t){this._boundingVolume!==t&&(this._boundingVolume=t,this.dirty=!0)}get orientedBoundingBox(){return this._orientedBoundingBox}set orientedBoundingBox(t){this._orientedBoundingBox!==t&&(this._orientedBoundingBox=t,this.dirty=!0)}get cull(){return Qc(this,Kr.CULL)}set cull(t){Qc(this,Kr.CULL)!==t&&(Z_(this,Kr.CULL,t),this.dirty=!0)}get occlude(){return Qc(this,Kr.OCCLUDE)}set occlude(t){Qc(this,Kr.OCCLUDE)!==t&&(Z_(this,Kr.OCCLUDE,t),this.dirty=!0)}get modelMatrix(){return this._modelMatrix}set modelMatrix(t){this._modelMatrix!==t&&(this._modelMatrix=t,this.dirty=!0)}get primitiveType(){return this._primitiveType}set primitiveType(t){this._primitiveType!==t&&(this._primitiveType=t,this.dirty=!0)}get vertexArray(){return this._vertexArray}set vertexArray(t){this._vertexArray!==t&&(this._vertexArray=t,this.dirty=!0)}get count(){return this._count}set count(t){this._count!==t&&(this._count=t,this.dirty=!0)}get offset(){return this._offset}set offset(t){this._offset!==t&&(this._offset=t,this.dirty=!0)}get instanceCount(){return this._instanceCount}set instanceCount(t){this._instanceCount!==t&&(this._instanceCount=t,this.dirty=!0)}get shaderProgram(){return this._shaderProgram}set shaderProgram(t){this._shaderProgram!==t&&(this._shaderProgram=t,this.dirty=!0)}get castShadows(){return Qc(this,Kr.CAST_SHADOWS)}set castShadows(t){Qc(this,Kr.CAST_SHADOWS)!==t&&(Z_(this,Kr.CAST_SHADOWS,t),this.dirty=!0)}get receiveShadows(){return Qc(this,Kr.RECEIVE_SHADOWS)}set receiveShadows(t){Qc(this,Kr.RECEIVE_SHADOWS)!==t&&(Z_(this,Kr.RECEIVE_SHADOWS,t),this.dirty=!0)}get uniformMap(){return this._uniformMap}set uniformMap(t){this._uniformMap!==t&&(this._uniformMap=t,this.dirty=!0)}get renderState(){return this._renderState}set renderState(t){this._renderState!==t&&(this._renderState=t,this.dirty=!0)}get framebuffer(){return this._framebuffer}set framebuffer(t){this._framebuffer!==t&&(this._framebuffer=t,this.dirty=!0)}get pass(){return this._pass}set pass(t){this._pass!==t&&(this._pass=t,this.dirty=!0)}get executeInClosestFrustum(){return Qc(this,Kr.EXECUTE_IN_CLOSEST_FRUSTUM)}set executeInClosestFrustum(t){Qc(this,Kr.EXECUTE_IN_CLOSEST_FRUSTUM)!==t&&(Z_(this,Kr.EXECUTE_IN_CLOSEST_FRUSTUM,t),this.dirty=!0)}get owner(){return this._owner}set owner(t){this._owner!==t&&(this._owner=t,this.dirty=!0)}get debugShowBoundingVolume(){return Qc(this,Kr.DEBUG_SHOW_BOUNDING_VOLUME)}set debugShowBoundingVolume(t){Qc(this,Kr.DEBUG_SHOW_BOUNDING_VOLUME)!==t&&(Z_(this,Kr.DEBUG_SHOW_BOUNDING_VOLUME,t),this.dirty=!0)}get debugOverlappingFrustums(){return this._debugOverlappingFrustums}set debugOverlappingFrustums(t){this._debugOverlappingFrustums!==t&&(this._debugOverlappingFrustums=t,this.dirty=!0)}get pickId(){return this._pickId}set pickId(t){this._pickId!==t&&(this._pickId=t,this.dirty=!0)}get pickMetadataAllowed(){return this._pickMetadataAllowed}get pickedMetadataInfo(){return this._pickedMetadataInfo}set pickedMetadataInfo(t){this._pickedMetadataInfo!==t&&(this._pickedMetadataInfo=t,this.dirty=!0)}get pickOnly(){return Qc(this,Kr.PICK_ONLY)}set pickOnly(t){Qc(this,Kr.PICK_ONLY)!==t&&(Z_(this,Kr.PICK_ONLY,t),this.dirty=!0)}get depthForTranslucentClassification(){return Qc(this,Kr.DEPTH_FOR_TRANSLUCENT_CLASSIFICATION)}set depthForTranslucentClassification(t){Qc(this,Kr.DEPTH_FOR_TRANSLUCENT_CLASSIFICATION)!==t&&(Z_(this,Kr.DEPTH_FOR_TRANSLUCENT_CLASSIFICATION,t),this.dirty=!0)}static shallowClone(t,n){if(l(t))return l(n)||(n=new e),n._boundingVolume=t._boundingVolume,n._orientedBoundingBox=t._orientedBoundingBox,n._modelMatrix=t._modelMatrix,n._primitiveType=t._primitiveType,n._vertexArray=t._vertexArray,n._count=t._count,n._offset=t._offset,n._instanceCount=t._instanceCount,n._shaderProgram=t._shaderProgram,n._uniformMap=t._uniformMap,n._renderState=t._renderState,n._framebuffer=t._framebuffer,n._pass=t._pass,n._owner=t._owner,n._debugOverlappingFrustums=t._debugOverlappingFrustums,n._pickId=t._pickId,n._pickMetadataAllowed=t._pickMetadataAllowed,n._pickedMetadataInfo=t._pickedMetadataInfo,n._flags=t._flags,n.dirty=!0,n.lastDirtyTime=0,n}execute(t,n){t.draw(this,n)}};function Qc(e,t){return(e._flags&t)===t}function Z_(e,t,n){n?e._flags|=t:e._flags&=~t}var tt=V7;var Ei={UNSIGNED_BYTE:ee.UNSIGNED_BYTE,UNSIGNED_SHORT:ee.UNSIGNED_SHORT,UNSIGNED_INT:ee.UNSIGNED_INT,FLOAT:ee.FLOAT,HALF_FLOAT:ee.HALF_FLOAT_OES,UNSIGNED_INT_24_8:ee.UNSIGNED_INT_24_8,UNSIGNED_SHORT_4_4_4_4:ee.UNSIGNED_SHORT_4_4_4_4,UNSIGNED_SHORT_5_5_5_1:ee.UNSIGNED_SHORT_5_5_5_1,UNSIGNED_SHORT_5_6_5:ee.UNSIGNED_SHORT_5_6_5};Ei.toWebGLConstant=function(e,t){switch(e){case Ei.UNSIGNED_BYTE:return ee.UNSIGNED_BYTE;case Ei.UNSIGNED_SHORT:return ee.UNSIGNED_SHORT;case Ei.UNSIGNED_INT:return ee.UNSIGNED_INT;case Ei.FLOAT:return ee.FLOAT;case Ei.HALF_FLOAT:return t.webgl2?ee.HALF_FLOAT:ee.HALF_FLOAT_OES;case Ei.UNSIGNED_INT_24_8:return ee.UNSIGNED_INT_24_8;case Ei.UNSIGNED_SHORT_4_4_4_4:return ee.UNSIGNED_SHORT_4_4_4_4;case Ei.UNSIGNED_SHORT_5_5_5_1:return ee.UNSIGNED_SHORT_5_5_5_1;case Ei.UNSIGNED_SHORT_5_6_5:return Ei.UNSIGNED_SHORT_5_6_5}};Ei.isPacked=function(e){return e===Ei.UNSIGNED_INT_24_8||e===Ei.UNSIGNED_SHORT_4_4_4_4||e===Ei.UNSIGNED_SHORT_5_5_5_1||e===Ei.UNSIGNED_SHORT_5_6_5};Ei.sizeInBytes=function(e){switch(e){case Ei.UNSIGNED_BYTE:return 1;case Ei.UNSIGNED_SHORT:case Ei.UNSIGNED_SHORT_4_4_4_4:case Ei.UNSIGNED_SHORT_5_5_5_1:case Ei.UNSIGNED_SHORT_5_6_5:case Ei.HALF_FLOAT:return 2;case Ei.UNSIGNED_INT:case Ei.FLOAT:case Ei.UNSIGNED_INT_24_8:return 4}};Ei.validate=function(e){return e===Ei.UNSIGNED_BYTE||e===Ei.UNSIGNED_SHORT||e===Ei.UNSIGNED_INT||e===Ei.FLOAT||e===Ei.HALF_FLOAT||e===Ei.UNSIGNED_INT_24_8||e===Ei.UNSIGNED_SHORT_4_4_4_4||e===Ei.UNSIGNED_SHORT_5_5_5_1||e===Ei.UNSIGNED_SHORT_5_6_5};Ei.getTypedArrayConstructor=function(e){let t=Ei.sizeInBytes(e);return t===Uint8Array.BYTES_PER_ELEMENT?Uint8Array:t===Uint16Array.BYTES_PER_ELEMENT?Uint16Array:t===Float32Array.BYTES_PER_ELEMENT&&e===Ei.FLOAT?Float32Array:Uint32Array};Object.freeze(Ei);var je=Ei;var Ze={DEPTH_COMPONENT:ee.DEPTH_COMPONENT,DEPTH_STENCIL:ee.DEPTH_STENCIL,ALPHA:ee.ALPHA,RED:ee.RED,RG:ee.RG,RGB:ee.RGB,RGBA:ee.RGBA,RED_INTEGER:ee.RED_INTEGER,RG_INTEGER:ee.RG_INTEGER,RGB_INTEGER:ee.RGB_INTEGER,RGBA_INTEGER:ee.RGBA_INTEGER,LUMINANCE:ee.LUMINANCE,LUMINANCE_ALPHA:ee.LUMINANCE_ALPHA,RGB_DXT1:ee.COMPRESSED_RGB_S3TC_DXT1_EXT,RGBA_DXT1:ee.COMPRESSED_RGBA_S3TC_DXT1_EXT,RGBA_DXT3:ee.COMPRESSED_RGBA_S3TC_DXT3_EXT,RGBA_DXT5:ee.COMPRESSED_RGBA_S3TC_DXT5_EXT,RGB_PVRTC_4BPPV1:ee.COMPRESSED_RGB_PVRTC_4BPPV1_IMG,RGB_PVRTC_2BPPV1:ee.COMPRESSED_RGB_PVRTC_2BPPV1_IMG,RGBA_PVRTC_4BPPV1:ee.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,RGBA_PVRTC_2BPPV1:ee.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,RGBA_ASTC:ee.COMPRESSED_RGBA_ASTC_4x4_WEBGL,RGB_ETC1:ee.COMPRESSED_RGB_ETC1_WEBGL,RGB8_ETC2:ee.COMPRESSED_RGB8_ETC2,RGBA8_ETC2_EAC:ee.COMPRESSED_RGBA8_ETC2_EAC,RGBA_BC7:ee.COMPRESSED_RGBA_BPTC_UNORM};Ze.componentsLength=function(e){switch(e){case Ze.RGB:case Ze.RGB_INTEGER:return 3;case Ze.RGBA:case Ze.RGBA_INTEGER:return 4;case Ze.LUMINANCE_ALPHA:case Ze.RG:case Ze.RG_INTEGER:return 2;case Ze.ALPHA:case Ze.RED:case Ze.RED_INTEGER:case Ze.LUMINANCE:return 1;default:return 1}};Ze.validate=function(e){return e===Ze.DEPTH_COMPONENT||e===Ze.DEPTH_STENCIL||e===Ze.ALPHA||e===Ze.RED||e===Ze.RG||e===Ze.RGB||e===Ze.RGBA||e===Ze.RED_INTEGER||e===Ze.RG_INTEGER||e===Ze.RGB_INTEGER||e===Ze.RGBA_INTEGER||e===Ze.LUMINANCE||e===Ze.LUMINANCE_ALPHA||e===Ze.RGB_DXT1||e===Ze.RGBA_DXT1||e===Ze.RGBA_DXT3||e===Ze.RGBA_DXT5||e===Ze.RGB_PVRTC_4BPPV1||e===Ze.RGB_PVRTC_2BPPV1||e===Ze.RGBA_PVRTC_4BPPV1||e===Ze.RGBA_PVRTC_2BPPV1||e===Ze.RGBA_ASTC||e===Ze.RGB_ETC1||e===Ze.RGB8_ETC2||e===Ze.RGBA8_ETC2_EAC||e===Ze.RGBA_BC7};Ze.isColorFormat=function(e){return e===Ze.RED||e===Ze.ALPHA||e===Ze.RGB||e===Ze.RGBA||e===Ze.LUMINANCE||e===Ze.LUMINANCE_ALPHA};Ze.isDepthFormat=function(e){return e===Ze.DEPTH_COMPONENT||e===Ze.DEPTH_STENCIL};Ze.isCompressedFormat=function(e){return e===Ze.RGB_DXT1||e===Ze.RGBA_DXT1||e===Ze.RGBA_DXT3||e===Ze.RGBA_DXT5||e===Ze.RGB_PVRTC_4BPPV1||e===Ze.RGB_PVRTC_2BPPV1||e===Ze.RGBA_PVRTC_4BPPV1||e===Ze.RGBA_PVRTC_2BPPV1||e===Ze.RGBA_ASTC||e===Ze.RGB_ETC1||e===Ze.RGB8_ETC2||e===Ze.RGBA8_ETC2_EAC||e===Ze.RGBA_BC7};Ze.isDXTFormat=function(e){return e===Ze.RGB_DXT1||e===Ze.RGBA_DXT1||e===Ze.RGBA_DXT3||e===Ze.RGBA_DXT5};Ze.isPVRTCFormat=function(e){return e===Ze.RGB_PVRTC_4BPPV1||e===Ze.RGB_PVRTC_2BPPV1||e===Ze.RGBA_PVRTC_4BPPV1||e===Ze.RGBA_PVRTC_2BPPV1};Ze.isASTCFormat=function(e){return e===Ze.RGBA_ASTC};Ze.isETC1Format=function(e){return e===Ze.RGB_ETC1};Ze.isETC2Format=function(e){return e===Ze.RGB8_ETC2||e===Ze.RGBA8_ETC2_EAC};Ze.isBC7Format=function(e){return e===Ze.RGBA_BC7};Ze.compressedTextureSizeInBytes=function(e,t,n){switch(e){case Ze.RGB_DXT1:case Ze.RGBA_DXT1:case Ze.RGB_ETC1:case Ze.RGB8_ETC2:return Math.floor((t+3)/4)*Math.floor((n+3)/4)*8;case Ze.RGBA_DXT3:case Ze.RGBA_DXT5:case Ze.RGBA_ASTC:case Ze.RGBA8_ETC2_EAC:return Math.floor((t+3)/4)*Math.floor((n+3)/4)*16;case Ze.RGB_PVRTC_4BPPV1:case Ze.RGBA_PVRTC_4BPPV1:return Math.floor((Math.max(t,8)*Math.max(n,8)*4+7)/8);case Ze.RGB_PVRTC_2BPPV1:case Ze.RGBA_PVRTC_2BPPV1:return Math.floor((Math.max(t,16)*Math.max(n,8)*2+7)/8);case Ze.RGBA_BC7:return Math.ceil(t/4)*Math.ceil(n/4)*16;default:return 0}};Ze.textureSizeInBytes=function(e,t,n,i){let o=Ze.componentsLength(e);return je.isPacked(t)&&(o=1),o*je.sizeInBytes(t)*n*i};Ze.texture3DSizeInBytes=function(e,t,n,i,o){let r=Ze.componentsLength(e);return je.isPacked(t)&&(r=1),r*je.sizeInBytes(t)*n*i*o};Ze.alignmentInBytes=function(e,t,n){let i=Ze.textureSizeInBytes(e,t,n,1)%4;return i===0?4:i===2?2:1};Ze.createTypedArray=function(e,t,n,i){let o=je.getTypedArrayConstructor(t),r=Ze.componentsLength(e)*n*i;return new o(r)};Ze.flipY=function(e,t,n,i,o){if(o===1)return e;let r=Ze.createTypedArray(t,n,i,o),a=Ze.componentsLength(t),s=i*a;for(let c=0;c<o;++c){let u=c*i*a,f=(o-c-1)*i*a;for(let d=0;d<s;++d)r[f+d]=e[u+d]}return r};Ze.toInternalFormat=function(e,t,n){if(!n.webgl2)return e;if(e===Ze.DEPTH_STENCIL)return ee.DEPTH24_STENCIL8;if(e===Ze.DEPTH_COMPONENT){if(t===je.UNSIGNED_SHORT)return ee.DEPTH_COMPONENT16;if(t===je.UNSIGNED_INT)return ee.DEPTH_COMPONENT24}if(t===je.FLOAT)switch(e){case Ze.RGBA:return ee.RGBA32F;case Ze.RGB:return ee.RGB32F;case Ze.RG:return ee.RG32F;case Ze.RED:return ee.R32F}if(t===je.HALF_FLOAT)switch(e){case Ze.RGBA:return ee.RGBA16F;case Ze.RGB:return ee.RGB16F;case Ze.RG:return ee.RG16F;case Ze.RED:return ee.R16F}if(t===je.UNSIGNED_BYTE)switch(e){case Ze.RGBA:return ee.RGBA8;case Ze.RGB:return ee.RGB8;case Ze.RG:return ee.RG8;case Ze.RED:return ee.R8}if(t===je.INT)switch(e){case Ze.RGBA_INTEGER:return ee.RGBA32I;case Ze.RGB_INTEGER:return ee.RGB32I;case Ze.RG_INTEGER:return ee.RG32I;case Ze.RED_INTEGER:return ee.R32I}if(t===je.UNSIGNED_INT)switch(e){case Ze.RGBA_INTEGER:return ee.RGBA32UI;case Ze.RGB_INTEGER:return ee.RGB32UI;case Ze.RG_INTEGER:return ee.RG32UI;case Ze.RED_INTEGER:return ee.R32UI}return e};Object.freeze(Ze);var Xe=Ze;var Rr={_maximumCombinedTextureImageUnits:0,_maximumCubeMapSize:0,_maximumFragmentUniformVectors:0,_maximumTextureImageUnits:0,_maximumRenderbufferSize:0,_maximumTextureSize:0,_maximum3DTextureSize:0,_maximumVaryingVectors:0,_maximumVertexAttributes:0,_maximumVertexTextureImageUnits:0,_maximumVertexUniformVectors:0,_minimumAliasedLineWidth:0,_maximumAliasedLineWidth:0,_minimumAliasedPointSize:0,_maximumAliasedPointSize:0,_maximumViewportWidth:0,_maximumViewportHeight:0,_maximumTextureFilterAnisotropy:0,_maximumDrawBuffers:0,_maximumColorAttachments:0,_maximumSamples:0,_highpFloatSupported:!1,_highpIntSupported:!1};Object.defineProperties(Rr,{maximumCombinedTextureImageUnits:{get:function(){return Rr._maximumCombinedTextureImageUnits}},maximumCubeMapSize:{get:function(){return Rr._maximumCubeMapSize}},maximumFragmentUniformVectors:{get:function(){return Rr._maximumFragmentUniformVectors}},maximumTextureImageUnits:{get:function(){return Rr._maximumTextureImageUnits}},maximumRenderbufferSize:{get:function(){return Rr._maximumRenderbufferSize}},maximumTextureSize:{get:function(){return Rr._maximumTextureSize}},maximum3DTextureSize:{get:function(){return Rr._maximum3DTextureSize}},maximumVaryingVectors:{get:function(){return Rr._maximumVaryingVectors}},maximumVertexAttributes:{get:function(){return Rr._maximumVertexAttributes}},maximumVertexTextureImageUnits:{get:function(){return Rr._maximumVertexTextureImageUnits}},maximumVertexUniformVectors:{get:function(){return Rr._maximumVertexUniformVectors}},minimumAliasedLineWidth:{get:function(){return Rr._minimumAliasedLineWidth}},maximumAliasedLineWidth:{get:function(){return Rr._maximumAliasedLineWidth}},minimumAliasedPointSize:{get:function(){return Rr._minimumAliasedPointSize}},maximumAliasedPointSize:{get:function(){return Rr._maximumAliasedPointSize}},maximumViewportWidth:{get:function(){return Rr._maximumViewportWidth}},maximumViewportHeight:{get:function(){return Rr._maximumViewportHeight}},maximumTextureFilterAnisotropy:{get:function(){return Rr._maximumTextureFilterAnisotropy}},maximumDrawBuffers:{get:function(){return Rr._maximumDrawBuffers}},maximumColorAttachments:{get:function(){return Rr._maximumColorAttachments}},maximumSamples:{get:function(){return Rr._maximumSamples}},highpFloatSupported:{get:function(){return Rr._highpFloatSupported}},highpIntSupported:{get:function(){return Rr._highpIntSupported}}});var Rt=Rr;function j7(e,t,n){let i=e._gl;i.framebufferTexture2D(i.FRAMEBUFFER,t,n._target,n._texture,0)}function m8(e,t,n){let i=e._gl;i.framebufferRenderbuffer(i.FRAMEBUFFER,t,i.RENDERBUFFER,n._getRenderbuffer())}function Ih(e){e=e??G.EMPTY_OBJECT;let n=e.context._gl,i=Rt.maximumColorAttachments;if(this._gl=n,this._framebuffer=n.createFramebuffer(),this._colorTextures=[],this._colorRenderbuffers=[],this._activeColorAttachments=[],this._depthTexture=void 0,this._depthRenderbuffer=void 0,this._stencilRenderbuffer=void 0,this._depthStencilTexture=void 0,this._depthStencilRenderbuffer=void 0,this.destroyAttachments=e.destroyAttachments??!0,this._bind(),l(e.colorTextures)){let o=e.colorTextures,r=this._colorTextures.length=this._activeColorAttachments.length=o.length;for(let a=0;a<r;++a){let s=o[a],c=this._gl.COLOR_ATTACHMENT0+a;j7(this,c,s),this._activeColorAttachments[a]=c,this._colorTextures[a]=s}}if(l(e.colorRenderbuffers)){let o=e.colorRenderbuffers,r=this._colorRenderbuffers.length=this._activeColorAttachments.length=o.length;for(let a=0;a<r;++a){let s=o[a],c=this._gl.COLOR_ATTACHMENT0+a;m8(this,c,s),this._activeColorAttachments[a]=c,this._colorRenderbuffers[a]=s}}if(l(e.depthTexture)){let o=e.depthTexture;j7(this,this._gl.DEPTH_ATTACHMENT,o),this._depthTexture=o}if(l(e.depthRenderbuffer)){let o=e.depthRenderbuffer;m8(this,this._gl.DEPTH_ATTACHMENT,o),this._depthRenderbuffer=o}if(l(e.stencilRenderbuffer)){let o=e.stencilRenderbuffer;m8(this,this._gl.STENCIL_ATTACHMENT,o),this._stencilRenderbuffer=o}if(l(e.depthStencilTexture)){let o=e.depthStencilTexture;j7(this,this._gl.DEPTH_STENCIL_ATTACHMENT,o),this._depthStencilTexture=o}if(l(e.depthStencilRenderbuffer)){let o=e.depthStencilRenderbuffer;m8(this,this._gl.DEPTH_STENCIL_ATTACHMENT,o),this._depthStencilRenderbuffer=o}this._unBind()}Object.defineProperties(Ih.prototype,{status:{get:function(){this._bind();let e=this._gl.checkFramebufferStatus(this._gl.FRAMEBUFFER);return this._unBind(),e}},numberOfColorAttachments:{get:function(){return this._activeColorAttachments.length}},depthTexture:{get:function(){return this._depthTexture}},depthRenderbuffer:{get:function(){return this._depthRenderbuffer}},stencilRenderbuffer:{get:function(){return this._stencilRenderbuffer}},depthStencilTexture:{get:function(){return this._depthStencilTexture}},depthStencilRenderbuffer:{get:function(){return this._depthStencilRenderbuffer}},hasDepthAttachment:{get:function(){return!!(this.depthTexture||this.depthRenderbuffer||this.depthStencilTexture||this.depthStencilRenderbuffer)}}});Ih.prototype._bind=function(){let e=this._gl;e.bindFramebuffer(e.FRAMEBUFFER,this._framebuffer)};Ih.prototype._unBind=function(){let e=this._gl;e.bindFramebuffer(e.FRAMEBUFFER,null)};Ih.prototype.bindDraw=function(){let e=this._gl;e.bindFramebuffer(e.DRAW_FRAMEBUFFER,this._framebuffer)};Ih.prototype.bindRead=function(){let e=this._gl;e.bindFramebuffer(e.READ_FRAMEBUFFER,this._framebuffer)};Ih.prototype._getActiveColorAttachments=function(){return this._activeColorAttachments};Ih.prototype.getColorTexture=function(e){return this._colorTextures[e]};Ih.prototype.getColorRenderbuffer=function(e){return this._colorRenderbuffers[e]};Ih.prototype.isDestroyed=function(){return!1};Ih.prototype.destroy=function(){if(this.destroyAttachments){let e=this._colorTextures;for(let n=0;n<e.length;++n){let i=e[n];l(i)&&i.destroy()}let t=this._colorRenderbuffers;for(let n=0;n<t.length;++n){let i=t[n];l(i)&&i.destroy()}this._depthTexture=this._depthTexture&&this._depthTexture.destroy(),this._depthRenderbuffer=this._depthRenderbuffer&&this._depthRenderbuffer.destroy(),this._stencilRenderbuffer=this._stencilRenderbuffer&&this._stencilRenderbuffer.destroy(),this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._depthStencilRenderbuffer=this._depthStencilRenderbuffer&&this._depthStencilRenderbuffer.destroy()}return this._gl.deleteFramebuffer(this._framebuffer),fe(this)};var fa=Ih;var uD={CLOCKWISE:ee.CW,COUNTER_CLOCKWISE:ee.CCW};uD.validate=function(e){return e===uD.CLOCKWISE||e===uD.COUNTER_CLOCKWISE};Object.freeze(uD);var Ya=uD;function $ae(e){if(typeof e!="object"||e===null)return e;let t,n=Object.keys(e);for(let i=0;i<n.length;i++)t=n[i],e.hasOwnProperty(t)&&t!=="_applyFunctions"&&(e[t]=$ae(e[t]));return Object.freeze(e)}var G7=$ae;function sp(e){let t=e??G.EMPTY_OBJECT,n=t.cull??G.EMPTY_OBJECT,i=t.polygonOffset??G.EMPTY_OBJECT,o=t.scissorTest??G.EMPTY_OBJECT,r=o.rectangle??G.EMPTY_OBJECT,a=t.depthRange??G.EMPTY_OBJECT,s=t.depthTest??G.EMPTY_OBJECT,c=t.colorMask??G.EMPTY_OBJECT,u=t.blending??G.EMPTY_OBJECT,f=u.color??G.EMPTY_OBJECT,d=t.stencilTest??G.EMPTY_OBJECT,p=d.frontOperation??G.EMPTY_OBJECT,g=d.backOperation??G.EMPTY_OBJECT,m=t.sampleCoverage??G.EMPTY_OBJECT,A=t.viewport;this.frontFace=t.frontFace??Ya.COUNTER_CLOCKWISE,this.cull={enabled:n.enabled??!1,face:n.face??ee.BACK},this.lineWidth=t.lineWidth??1,this.polygonOffset={enabled:i.enabled??!1,factor:i.factor??0,units:i.units??0},this.scissorTest={enabled:o.enabled??!1,rectangle:Je.clone(r)},this.depthRange={near:a.near??0,far:a.far??1},this.depthTest={enabled:s.enabled??!1,func:s.func??ee.LESS},this.colorMask={red:c.red??!0,green:c.green??!0,blue:c.blue??!0,alpha:c.alpha??!0},this.depthMask=t.depthMask??!0,this.stencilMask=t.stencilMask??-1,this.blending={enabled:u.enabled??!1,color:new V(f.red??0,f.green??0,f.blue??0,f.alpha??0),equationRgb:u.equationRgb??ee.FUNC_ADD,equationAlpha:u.equationAlpha??ee.FUNC_ADD,functionSourceRgb:u.functionSourceRgb??ee.ONE,functionSourceAlpha:u.functionSourceAlpha??ee.ONE,functionDestinationRgb:u.functionDestinationRgb??ee.ZERO,functionDestinationAlpha:u.functionDestinationAlpha??ee.ZERO},this.stencilTest={enabled:d.enabled??!1,frontFunction:d.frontFunction??ee.ALWAYS,backFunction:d.backFunction??ee.ALWAYS,reference:d.reference??0,mask:d.mask??-1,frontOperation:{fail:p.fail??ee.KEEP,zFail:p.zFail??ee.KEEP,zPass:p.zPass??ee.KEEP},backOperation:{fail:g.fail??ee.KEEP,zFail:g.zFail??ee.KEEP,zPass:g.zPass??ee.KEEP}},this.sampleCoverage={enabled:m.enabled??!1,value:m.value??1,invert:m.invert??!1},this.viewport=l(A)?new Je(A.x,A.y,A.width,A.height):void 0,this.id=0,this._applyFunctions=[]}var cNe=0,ap={};sp.fromCache=function(e){let t=JSON.stringify(e),n=ap[t];if(l(n))return++n.referenceCount,n.state;let i=new sp(e),o=JSON.stringify(i);return n=ap[o],l(n)||(i.id=cNe++,n={referenceCount:0,state:i},ap[o]=n),++n.referenceCount,ap[t]={referenceCount:1,state:n.state},n.state};sp.removeFromCache=function(e){let t=new sp(e),n=JSON.stringify(t),i=ap[n],o=JSON.stringify(e),r=ap[o];l(r)&&(--r.referenceCount,r.referenceCount===0&&(delete ap[o],l(i)&&--i.referenceCount)),l(i)&&i.referenceCount===0&&delete ap[n]};sp.getCache=function(){return ap};sp.clearCache=function(){ap={}};function xx(e,t,n){n?e.enable(t):e.disable(t)}function Jae(e,t){e.frontFace(t.frontFace)}function Zae(e,t){let n=t.cull,i=n.enabled;xx(e,e.CULL_FACE,i),i&&e.cullFace(n.face)}function ese(e,t){e.lineWidth(t.lineWidth)}function tse(e,t){let n=t.polygonOffset,i=n.enabled;xx(e,e.POLYGON_OFFSET_FILL,i),i&&e.polygonOffset(n.factor,n.units)}function nse(e,t,n){let i=t.scissorTest,o=l(n.scissorTest)?n.scissorTest.enabled:i.enabled;if(xx(e,e.SCISSOR_TEST,o),o){let r=l(n.scissorTest)?n.scissorTest.rectangle:i.rectangle;e.scissor(r.x,r.y,r.width,r.height)}}function ise(e,t){let n=t.depthRange;e.depthRange(n.near,n.far)}function ose(e,t){let n=t.depthTest,i=n.enabled;xx(e,e.DEPTH_TEST,i),i&&e.depthFunc(n.func)}function rse(e,t){let n=t.colorMask;e.colorMask(n.red,n.green,n.blue,n.alpha)}function ase(e,t){e.depthMask(t.depthMask)}function sse(e,t){e.stencilMask(t.stencilMask)}function lNe(e,t){e.blendColor(t.red,t.green,t.blue,t.alpha)}function cse(e,t,n){let i=t.blending,o=l(n.blendingEnabled)?n.blendingEnabled:i.enabled;xx(e,e.BLEND,o),o&&(lNe(e,i.color),e.blendEquationSeparate(i.equationRgb,i.equationAlpha),e.blendFuncSeparate(i.functionSourceRgb,i.functionDestinationRgb,i.functionSourceAlpha,i.functionDestinationAlpha))}function lse(e,t){let n=t.stencilTest,i=n.enabled;if(xx(e,e.STENCIL_TEST,i),i){let o=n.frontFunction,r=n.backFunction,a=n.reference,s=n.mask;e.stencilFunc(o,a,s),e.stencilFuncSeparate(e.BACK,r,a,s),e.stencilFuncSeparate(e.FRONT,o,a,s);let c=n.frontOperation,u=c.fail,f=c.zFail,d=c.zPass;e.stencilOpSeparate(e.FRONT,u,f,d);let p=n.backOperation,g=p.fail,m=p.zFail,A=p.zPass;e.stencilOpSeparate(e.BACK,g,m,A)}}function use(e,t){let n=t.sampleCoverage,i=n.enabled;xx(e,e.SAMPLE_COVERAGE,i),i&&e.sampleCoverage(n.value,n.invert)}var uNe=new Je;function fse(e,t,n){let i=t.viewport??n.viewport;l(i)||(i=uNe,i.width=n.context.drawingBufferWidth,i.height=n.context.drawingBufferHeight),n.context.uniformState.viewport=i,e.viewport(i.x,i.y,i.width,i.height)}sp.apply=function(e,t,n){Jae(e,t),Zae(e,t),ese(e,t),tse(e,t),ise(e,t),ose(e,t),rse(e,t),ase(e,t),sse(e,t),lse(e,t),use(e,t),nse(e,t,n),cse(e,t,n),fse(e,t,n)};function fNe(e,t){let n=[];return e.frontFace!==t.frontFace&&n.push(Jae),(e.cull.enabled!==t.cull.enabled||e.cull.face!==t.cull.face)&&n.push(Zae),e.lineWidth!==t.lineWidth&&n.push(ese),(e.polygonOffset.enabled!==t.polygonOffset.enabled||e.polygonOffset.factor!==t.polygonOffset.factor||e.polygonOffset.units!==t.polygonOffset.units)&&n.push(tse),(e.depthRange.near!==t.depthRange.near||e.depthRange.far!==t.depthRange.far)&&n.push(ise),(e.depthTest.enabled!==t.depthTest.enabled||e.depthTest.func!==t.depthTest.func)&&n.push(ose),(e.colorMask.red!==t.colorMask.red||e.colorMask.green!==t.colorMask.green||e.colorMask.blue!==t.colorMask.blue||e.colorMask.alpha!==t.colorMask.alpha)&&n.push(rse),e.depthMask!==t.depthMask&&n.push(ase),e.stencilMask!==t.stencilMask&&n.push(sse),(e.stencilTest.enabled!==t.stencilTest.enabled||e.stencilTest.frontFunction!==t.stencilTest.frontFunction||e.stencilTest.backFunction!==t.stencilTest.backFunction||e.stencilTest.reference!==t.stencilTest.reference||e.stencilTest.mask!==t.stencilTest.mask||e.stencilTest.frontOperation.fail!==t.stencilTest.frontOperation.fail||e.stencilTest.frontOperation.zFail!==t.stencilTest.frontOperation.zFail||e.stencilTest.backOperation.fail!==t.stencilTest.backOperation.fail||e.stencilTest.backOperation.zFail!==t.stencilTest.backOperation.zFail||e.stencilTest.backOperation.zPass!==t.stencilTest.backOperation.zPass)&&n.push(lse),(e.sampleCoverage.enabled!==t.sampleCoverage.enabled||e.sampleCoverage.value!==t.sampleCoverage.value||e.sampleCoverage.invert!==t.sampleCoverage.invert)&&n.push(use),n}sp.partialApply=function(e,t,n,i,o,r){if(t!==n){let f=n._applyFunctions[t.id];l(f)||(f=fNe(t,n),n._applyFunctions[t.id]=f);let d=f.length;for(let p=0;p<d;++p)f[p](e,n)}let a=l(i.scissorTest)?i.scissorTest:t.scissorTest,s=l(o.scissorTest)?o.scissorTest:n.scissorTest;(a!==s||r)&&nse(e,n,o);let c=l(i.blendingEnabled)?i.blendingEnabled:t.blending.enabled,u=l(o.blendingEnabled)?o.blendingEnabled:n.blending.enabled;(c!==u||u&&t.blending!==n.blending)&&cse(e,n,o),(t!==n||i!==o||i.context!==o.context)&&fse(e,n,o)};sp.getState=function(e){return{frontFace:e.frontFace,cull:{enabled:e.cull.enabled,face:e.cull.face},lineWidth:e.lineWidth,polygonOffset:{enabled:e.polygonOffset.enabled,factor:e.polygonOffset.factor,units:e.polygonOffset.units},scissorTest:{enabled:e.scissorTest.enabled,rectangle:Je.clone(e.scissorTest.rectangle)},depthRange:{near:e.depthRange.near,far:e.depthRange.far},depthTest:{enabled:e.depthTest.enabled,func:e.depthTest.func},colorMask:{red:e.colorMask.red,green:e.colorMask.green,blue:e.colorMask.blue,alpha:e.colorMask.alpha},depthMask:e.depthMask,stencilMask:e.stencilMask,blending:{enabled:e.blending.enabled,color:V.clone(e.blending.color),equationRgb:e.blending.equationRgb,equationAlpha:e.blending.equationAlpha,functionSourceRgb:e.blending.functionSourceRgb,functionSourceAlpha:e.blending.functionSourceAlpha,functionDestinationRgb:e.blending.functionDestinationRgb,functionDestinationAlpha:e.blending.functionDestinationAlpha},stencilTest:{enabled:e.stencilTest.enabled,frontFunction:e.stencilTest.frontFunction,backFunction:e.stencilTest.backFunction,reference:e.stencilTest.reference,mask:e.stencilTest.mask,frontOperation:{fail:e.stencilTest.frontOperation.fail,zFail:e.stencilTest.frontOperation.zFail,zPass:e.stencilTest.frontOperation.zPass},backOperation:{fail:e.stencilTest.backOperation.fail,zFail:e.stencilTest.backOperation.zFail,zPass:e.stencilTest.backOperation.zPass}},sampleCoverage:{enabled:e.sampleCoverage.enabled,value:e.sampleCoverage.value,invert:e.sampleCoverage.invert},viewport:l(e.viewport)?Je.clone(e.viewport):void 0}};var Ve=sp;var bu=class e{constructor(t,n,i,o){this[0]=t??0,this[1]=i??0,this[2]=n??0,this[3]=o??0}static pack(t,n,i){return i=i??0,n[i++]=t[0],n[i++]=t[1],n[i++]=t[2],n[i++]=t[3],n}static unpack(t,n,i){return n=n??0,l(i)||(i=new e),i[0]=t[n++],i[1]=t[n++],i[2]=t[n++],i[3]=t[n++],i}static packArray(t,n){let i=t.length,o=i*4;l(n)?!Array.isArray(n)&&n.length!==o||n.length!==o&&(n.length=o):n=new Array(o);for(let r=0;r<i;++r)e.pack(t[r],n,r*4);return n}static unpackArray(t,n){let i=t.length;l(n)?n.length=i/4:n=new Array(i/4);for(let o=0;o<i;o+=4){let r=o/4;n[r]=e.unpack(t,o,n[r])}return n}static clone(t,n){if(l(t))return l(n)?(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n):new e(t[0],t[2],t[1],t[3])}static fromColumnMajorArray(t,n){return e.clone(t,n)}static fromRowMajorArray(t,n){return l(n)?(n[0]=t[0],n[1]=t[2],n[2]=t[1],n[3]=t[3],n):new e(t[0],t[1],t[2],t[3])}static fromScale(t,n){return l(n)?(n[0]=t.x,n[1]=0,n[2]=0,n[3]=t.y,n):new e(t.x,0,0,t.y)}static fromUniformScale(t,n){return l(n)?(n[0]=t,n[1]=0,n[2]=0,n[3]=t,n):new e(t,0,0,t)}static fromRotation(t,n){let i=Math.cos(t),o=Math.sin(t);return l(n)?(n[0]=i,n[1]=o,n[2]=-o,n[3]=i,n):new e(i,-o,o,i)}static toArray(t,n){return l(n)?(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n):[t[0],t[1],t[2],t[3]]}static getElementIndex(t,n){return t*2+n}static getColumn(t,n,i){let o=n*2,r=t[o],a=t[o+1];return i.x=r,i.y=a,i}static setColumn(t,n,i,o){o=e.clone(t,o);let r=n*2;return o[r]=i.x,o[r+1]=i.y,o}static getRow(t,n,i){let o=t[n],r=t[n+2];return i.x=o,i.y=r,i}static setRow(t,n,i,o){return o=e.clone(t,o),o[n]=i.x,o[n+2]=i.y,o}static setScale(t,n,i){let o=e.getScale(t,dNe),r=n.x/o.x,a=n.y/o.y;return i[0]=t[0]*r,i[1]=t[1]*r,i[2]=t[2]*a,i[3]=t[3]*a,i}static setUniformScale(t,n,i){let o=e.getScale(t,hNe),r=n/o.x,a=n/o.y;return i[0]=t[0]*r,i[1]=t[1]*r,i[2]=t[2]*a,i[3]=t[3]*a,i}static getScale(t,n){return n.x=z.magnitude(z.fromElements(t[0],t[1],dse)),n.y=z.magnitude(z.fromElements(t[2],t[3],dse)),n}static getMaximumScale(t){return e.getScale(t,hse),z.maximumComponent(hse)}static setRotation(t,n,i){let o=e.getScale(t,mNe);return i[0]=n[0]*o.x,i[1]=n[1]*o.x,i[2]=n[2]*o.y,i[3]=n[3]*o.y,i}static getRotation(t,n){let i=e.getScale(t,pNe);return n[0]=t[0]/i.x,n[1]=t[1]/i.x,n[2]=t[2]/i.y,n[3]=t[3]/i.y,n}static multiply(t,n,i){let o=t[0]*n[0]+t[2]*n[1],r=t[0]*n[2]+t[2]*n[3],a=t[1]*n[0]+t[3]*n[1],s=t[1]*n[2]+t[3]*n[3];return i[0]=o,i[1]=a,i[2]=r,i[3]=s,i}static add(t,n,i){return i[0]=t[0]+n[0],i[1]=t[1]+n[1],i[2]=t[2]+n[2],i[3]=t[3]+n[3],i}static subtract(t,n,i){return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],i[3]=t[3]-n[3],i}static multiplyByVector(t,n,i){let o=t[0]*n.x+t[2]*n.y,r=t[1]*n.x+t[3]*n.y;return i.x=o,i.y=r,i}static multiplyByScalar(t,n,i){return i[0]=t[0]*n,i[1]=t[1]*n,i[2]=t[2]*n,i[3]=t[3]*n,i}static multiplyByScale(t,n,i){return i[0]=t[0]*n.x,i[1]=t[1]*n.x,i[2]=t[2]*n.y,i[3]=t[3]*n.y,i}static multiplyByUniformScale(t,n,i){return i[0]=t[0]*n,i[1]=t[1]*n,i[2]=t[2]*n,i[3]=t[3]*n,i}static negate(t,n){return n[0]=-t[0],n[1]=-t[1],n[2]=-t[2],n[3]=-t[3],n}static transpose(t,n){let i=t[0],o=t[2],r=t[1],a=t[3];return n[0]=i,n[1]=o,n[2]=r,n[3]=a,n}static abs(t,n){return n[0]=Math.abs(t[0]),n[1]=Math.abs(t[1]),n[2]=Math.abs(t[2]),n[3]=Math.abs(t[3]),n}static equals(t,n){return t===n||l(t)&&l(n)&&t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]}static equalsArray(t,n,i){return t[0]===n[i]&&t[1]===n[i+1]&&t[2]===n[i+2]&&t[3]===n[i+3]}static equalsEpsilon(t,n,i){return i=i??0,t===n||l(t)&&l(n)&&Math.abs(t[0]-n[0])<=i&&Math.abs(t[1]-n[1])<=i&&Math.abs(t[2]-n[2])<=i&&Math.abs(t[3]-n[3])<=i}get length(){return e.packedLength}clone(t){return e.clone(this,t)}equals(t){return e.equals(this,t)}equalsEpsilon(t,n){return e.equalsEpsilon(this,t,n)}toString(){return`(${this[0]}, ${this[2]})
- (${this[1]}, ${this[3]})`}};bu.packedLength=4;bu.fromArray=bu.unpack;bu.IDENTITY=Object.freeze(new bu(1,0,0,1));bu.ZERO=Object.freeze(new bu(0,0,0,0));bu.COLUMN0ROW0=0;bu.COLUMN0ROW1=1;bu.COLUMN1ROW0=2;bu.COLUMN1ROW1=3;var dNe=new z,hNe=new z,dse=new z,hse=new z,mNe=new z,pNe=new z,Gi=bu;function gNe(e,t,n,i){switch(t.type){case e.FLOAT:return new H7(e,t,n,i);case e.FLOAT_VEC2:return new W7(e,t,n,i);case e.FLOAT_VEC3:return new q7(e,t,n,i);case e.FLOAT_VEC4:return new Y7(e,t,n,i);case e.SAMPLER_2D:case e.SAMPLER_3D:case e.SAMPLER_CUBE:return new p8(e,t,n,i);case e.UNSIGNED_INT_SAMPLER_2D:return new p8(e,t,n,i);case e.INT:case e.BOOL:return new X7(e,t,n,i);case e.INT_VEC2:case e.BOOL_VEC2:return new K7(e,t,n,i);case e.INT_VEC3:case e.BOOL_VEC3:return new Q7(e,t,n,i);case e.INT_VEC4:case e.BOOL_VEC4:return new $7(e,t,n,i);case e.FLOAT_MAT2:return new J7(e,t,n,i);case e.FLOAT_MAT3:return new Z7(e,t,n,i);case e.FLOAT_MAT4:return new eW(e,t,n,i);default:throw new re(`Unrecognized uniform type: ${t.type} for uniform "${n}".`)}}var H7=class{constructor(t,n,i,o){this.name=i,this.value=void 0,this._value=0,this._gl=t,this._location=o}set(){this.value!==this._value&&(this._value=this.value,this._gl.uniform1f(this._location,this.value))}},W7=class{constructor(t,n,i,o){this.name=i,this.value=void 0,this._value=new z,this._gl=t,this._location=o}set(){let t=this.value;z.equals(t,this._value)||(z.clone(t,this._value),this._gl.uniform2f(this._location,t.x,t.y))}},q7=class{constructor(t,n,i,o){this.name=i,this.value=void 0,this._value=void 0,this._gl=t,this._location=o}set(){let t=this.value;l(t.red)?V.equals(t,this._value)||(this._value=V.clone(t,this._value),this._gl.uniform3f(this._location,t.red,t.green,t.blue)):l(t.x)&&(h.equals(t,this._value)||(this._value=h.clone(t,this._value),this._gl.uniform3f(this._location,t.x,t.y,t.z)))}},Y7=class{constructor(t,n,i,o){this.name=i,this.value=void 0,this._value=void 0,this._gl=t,this._location=o}set(){let t=this.value;l(t.red)?V.equals(t,this._value)||(this._value=V.clone(t,this._value),this._gl.uniform4f(this._location,t.red,t.green,t.blue,t.alpha)):l(t.x)&&(se.equals(t,this._value)||(this._value=se.clone(t,this._value),this._gl.uniform4f(this._location,t.x,t.y,t.z,t.w)))}},p8=class{constructor(t,n,i,o){this.name=i,this.value=void 0,this._gl=t,this._location=o,this.textureUnitIndex=void 0}set(){let t=this._gl;t.activeTexture(t.TEXTURE0+this.textureUnitIndex);let n=this.value;t.bindTexture(n._target,n._texture)}_setSampler(t){return this.textureUnitIndex=t,this._gl.uniform1i(this._location,t),t+1}},X7=class{constructor(t,n,i,o){this.name=i,this.value=void 0,this._value=0,this._gl=t,this._location=o}set(){this.value!==this._value&&(this._value=this.value,this._gl.uniform1i(this._location,this.value))}},K7=class{constructor(t,n,i,o){this.name=i,this.value=void 0,this._value=new z,this._gl=t,this._location=o}set(){let t=this.value;z.equals(t,this._value)||(z.clone(t,this._value),this._gl.uniform2i(this._location,t.x,t.y))}},Q7=class{constructor(t,n,i,o){this.name=i,this.value=void 0,this._value=new h,this._gl=t,this._location=o}set(){let t=this.value;h.equals(t,this._value)||(h.clone(t,this._value),this._gl.uniform3i(this._location,t.x,t.y,t.z))}},$7=class{constructor(t,n,i,o){this.name=i,this.value=void 0,this._value=new se,this._gl=t,this._location=o}set(){let t=this.value;se.equals(t,this._value)||(se.clone(t,this._value),this._gl.uniform4i(this._location,t.x,t.y,t.z,t.w))}},_Ne=new Float32Array(4),J7=class{constructor(t,n,i,o){this.name=i,this.value=void 0,this._value=new Gi,this._gl=t,this._location=o}set(){if(!Gi.equalsArray(this.value,this._value,0)){Gi.clone(this.value,this._value);let t=Gi.toArray(this.value,_Ne);this._gl.uniformMatrix2fv(this._location,!1,t)}}},ANe=new Float32Array(9),Z7=class{constructor(t,n,i,o){this.name=i,this.value=void 0,this._value=new $,this._gl=t,this._location=o}set(){if(!$.equalsArray(this.value,this._value,0)){$.clone(this.value,this._value);let t=$.toArray(this.value,ANe);this._gl.uniformMatrix3fv(this._location,!1,t)}}},yNe=new Float32Array(16),eW=class{constructor(t,n,i,o){this.name=i,this.value=void 0,this._value=new M,this._gl=t,this._location=o}set(){if(!M.equalsArray(this.value,this._value,0)){M.clone(this.value,this._value);let t=M.toArray(this.value,yNe);this._gl.uniformMatrix4fv(this._location,!1,t)}}},fD=gNe;function xNe(e,t,n,i){switch(t.type){case e.FLOAT:return new tW(e,t,n,i);case e.FLOAT_VEC2:return new nW(e,t,n,i);case e.FLOAT_VEC3:return new iW(e,t,n,i);case e.FLOAT_VEC4:return new oW(e,t,n,i);case e.SAMPLER_2D:case e.SAMPLER_3D:case e.SAMPLER_CUBE:return new rW(e,t,n,i);case e.INT:case e.BOOL:return new aW(e,t,n,i);case e.INT_VEC2:case e.BOOL_VEC2:return new sW(e,t,n,i);case e.INT_VEC3:case e.BOOL_VEC3:return new cW(e,t,n,i);case e.INT_VEC4:case e.BOOL_VEC4:return new lW(e,t,n,i);case e.FLOAT_MAT2:return new uW(e,t,n,i);case e.FLOAT_MAT3:return new fW(e,t,n,i);case e.FLOAT_MAT4:return new dW(e,t,n,i);default:throw new re(`Unrecognized uniform type: ${t.type} for uniform "${n}".`)}}var tW=class{constructor(t,n,i,o){let r=o.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(r),this._gl=t,this._location=o[0]}set(){let t=this.value,n=t.length,i=this._value,o=!1;for(let r=0;r<n;++r){let a=t[r];a!==i[r]&&(i[r]=a,o=!0)}o&&this._gl.uniform1fv(this._location,i)}},nW=class{constructor(t,n,i,o){let r=o.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(r*2),this._gl=t,this._location=o[0]}set(){let t=this.value,n=t.length,i=this._value,o=!1,r=0;for(let a=0;a<n;++a){let s=t[a];z.equalsArray(s,i,r)||(z.pack(s,i,r),o=!0),r+=2}o&&this._gl.uniform2fv(this._location,i)}},iW=class{constructor(t,n,i,o){let r=o.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(r*3),this._gl=t,this._location=o[0]}set(){let t=this.value,n=t.length,i=this._value,o=!1,r=0;for(let a=0;a<n;++a){let s=t[a];l(s.red)?(s.red!==i[r]||s.green!==i[r+1]||s.blue!==i[r+2])&&(i[r]=s.red,i[r+1]=s.green,i[r+2]=s.blue,o=!0):l(s.x)&&(h.equalsArray(s,i,r)||(h.pack(s,i,r),o=!0)),r+=3}o&&this._gl.uniform3fv(this._location,i)}},oW=class{constructor(t,n,i,o){let r=o.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(r*4),this._gl=t,this._location=o[0]}set(){let t=this.value,n=t.length,i=this._value,o=!1,r=0;for(let a=0;a<n;++a){let s=t[a];l(s.red)?V.equalsArray(s,i,r)||(V.pack(s,i,r),o=!0):l(s.x)&&(se.equalsArray(s,i,r)||(se.pack(s,i,r),o=!0)),r+=4}o&&this._gl.uniform4fv(this._location,i)}},rW=class{constructor(t,n,i,o){let r=o.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(r),this._gl=t,this._locations=o,this.textureUnitIndex=void 0}set(){let t=this._gl,n=t.TEXTURE0+this.textureUnitIndex,i=this.value,o=i.length;for(let r=0;r<o;++r){let a=i[r];t.activeTexture(n+r),t.bindTexture(a._target,a._texture)}}_setSampler(t){this.textureUnitIndex=t;let n=this._locations,i=n.length;for(let o=0;o<i;++o){let r=t+o;this._gl.uniform1i(n[o],r)}return t+i}},aW=class{constructor(t,n,i,o){let r=o.length;this.name=i,this.value=new Array(r),this._value=new Int32Array(r),this._gl=t,this._location=o[0]}set(){let t=this.value,n=t.length,i=this._value,o=!1;for(let r=0;r<n;++r){let a=t[r];a!==i[r]&&(i[r]=a,o=!0)}o&&this._gl.uniform1iv(this._location,i)}},sW=class{constructor(t,n,i,o){let r=o.length;this.name=i,this.value=new Array(r),this._value=new Int32Array(r*2),this._gl=t,this._location=o[0]}set(){let t=this.value,n=t.length,i=this._value,o=!1,r=0;for(let a=0;a<n;++a){let s=t[a];z.equalsArray(s,i,r)||(z.pack(s,i,r),o=!0),r+=2}o&&this._gl.uniform2iv(this._location,i)}},cW=class{constructor(t,n,i,o){let r=o.length;this.name=i,this.value=new Array(r),this._value=new Int32Array(r*3),this._gl=t,this._location=o[0]}set(){let t=this.value,n=t.length,i=this._value,o=!1,r=0;for(let a=0;a<n;++a){let s=t[a];h.equalsArray(s,i,r)||(h.pack(s,i,r),o=!0),r+=3}o&&this._gl.uniform3iv(this._location,i)}},lW=class{constructor(t,n,i,o){let r=o.length;this.name=i,this.value=new Array(r),this._value=new Int32Array(r*4),this._gl=t,this._location=o[0]}set(){let t=this.value,n=t.length,i=this._value,o=!1,r=0;for(let a=0;a<n;++a){let s=t[a];se.equalsArray(s,i,r)||(se.pack(s,i,r),o=!0),r+=4}o&&this._gl.uniform4iv(this._location,i)}},uW=class{constructor(t,n,i,o){let r=o.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(r*4),this._gl=t,this._location=o[0]}set(){let t=this.value,n=t.length,i=this._value,o=!1,r=0;for(let a=0;a<n;++a){let s=t[a];Gi.equalsArray(s,i,r)||(Gi.pack(s,i,r),o=!0),r+=4}o&&this._gl.uniformMatrix2fv(this._location,!1,i)}},fW=class{constructor(t,n,i,o){let r=o.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(r*9),this._gl=t,this._location=o[0]}set(){let t=this.value,n=t.length,i=this._value,o=!1,r=0;for(let a=0;a<n;++a){let s=t[a];$.equalsArray(s,i,r)||($.pack(s,i,r),o=!0),r+=9}o&&this._gl.uniformMatrix3fv(this._location,!1,i)}},dW=class{constructor(t,n,i,o){let r=o.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(r*16),this._gl=t,this._location=o[0]}set(){let t=this.value,n=t.length,i=this._value,o=!1,r=0;for(let a=0;a<n;++a){let s=t[a];M.equalsArray(s,i,r)||(M.pack(s,i,r),o=!0),r+=16}o&&this._gl.uniformMatrix4fv(this._location,!1,i)}},dD=xNe;var bNe=0;function N0(e){let t=e.vertexShaderText,n=e.fragmentShaderText;typeof spector<"u"&&(t=t.replace(/^#line/gm,"//#line"),n=n.replace(/^#line/gm,"//#line"));let i=CNe(t,n);this._gl=e.gl,this._logShaderCompilation=e.logShaderCompilation,this._debugShaders=e.debugShaders,this._attributeLocations=e.attributeLocations,this._program=void 0,this._numberOfVertexAttributes=void 0,this._vertexAttributes=void 0,this._uniformsByName=void 0,this._uniforms=void 0,this._automaticUniforms=void 0,this._manualUniforms=void 0,this._duplicateUniformNames=i.duplicateUniformNames,this._cachedShader=void 0,this.maximumTextureUnitIndex=void 0,this._vertexShaderSource=e.vertexShaderSource,this._vertexShaderText=e.vertexShaderText,this._fragmentShaderSource=e.fragmentShaderSource,this._fragmentShaderText=i.fragmentShaderText,this.id=bNe++}N0.fromCache=function(e){return e=e??G.EMPTY_OBJECT,e.context.shaderCache.getShaderProgram(e)};N0.replaceCache=function(e){return e=e??G.EMPTY_OBJECT,e.context.shaderCache.replaceShaderProgram(e)};Object.defineProperties(N0.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},vertexAttributes:{get:function(){return g8(this),this._vertexAttributes}},numberOfVertexAttributes:{get:function(){return g8(this),this._numberOfVertexAttributes}},allUniforms:{get:function(){return g8(this),this._uniformsByName}}});function mse(e){let t=[],n=e.match(/uniform.*?(?![^{]*})(?=[=\[;])/g);if(l(n)){let i=n.length;for(let o=0;o<i;o++){let r=n[o].trim(),a=r.slice(r.lastIndexOf(" ")+1);t.push(a)}}return t}function CNe(e,t){let n={};if(!Rt.highpFloatSupported||!Rt.highpIntSupported){let i,o,r,a,s=mse(e),c=mse(t),u=s.length,f=c.length;for(i=0;i<u;i++)for(o=0;o<f;o++)if(s[i]===c[o]){r=s[i],a=`czm_mediump_${r}`;let d=new RegExp(`${r}\\b`,"g");t=t.replace(d,a),n[a]=r}}return{fragmentShaderText:t,duplicateUniformNames:n}}var cp="[Cesium WebGL] ";function TNe(e,t){let n=t._vertexShaderText,i=t._fragmentShaderText,o=e.createShader(e.VERTEX_SHADER);e.shaderSource(o,n),e.compileShader(o);let r=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(r,i),e.compileShader(r);let a=e.createProgram();e.attachShader(a,o),e.attachShader(a,r);let s=t._attributeLocations;if(l(s))for(let p in s)s.hasOwnProperty(p)&&e.bindAttribLocation(a,s[p],p);e.linkProgram(a);let c;if(e.getProgramParameter(a,e.LINK_STATUS))return t._logShaderCompilation&&(c=e.getShaderInfoLog(o),l(c)&&c.length>0&&console.log(`${cp}Vertex shader compile log: ${c}`),c=e.getShaderInfoLog(r),l(c)&&c.length>0&&console.log(`${cp}Fragment shader compile log: ${c}`),c=e.getProgramInfoLog(a),l(c)&&c.length>0&&console.log(`${cp}Shader program link log: ${c}`)),e.deleteShader(o),e.deleteShader(r),a;let u,f=t._debugShaders;throw e.getShaderParameter(r,e.COMPILE_STATUS)?e.getShaderParameter(o,e.COMPILE_STATUS)?(c=e.getProgramInfoLog(a),console.error(`${cp}Shader program link log: ${c}`),d(o,"vertex"),d(r,"fragment"),u=`Program failed to link. Link log: ${c}`):(c=e.getShaderInfoLog(o),console.error(`${cp}Vertex shader compile log: ${c}`),console.error(`${cp} Vertex shader source:
- ${n}`),u=`Vertex shader failed to compile. Compile log: ${c}`):(c=e.getShaderInfoLog(r),console.error(`${cp}Fragment shader compile log: ${c}`),console.error(`${cp} Fragment shader source:
- ${i}`),u=`Fragment shader failed to compile. Compile log: ${c}`),e.deleteShader(o),e.deleteShader(r),e.deleteProgram(a),new re(u);function d(p,g){if(!l(f))return;let m=f.getTranslatedShaderSource(p);if(m===""){console.error(`${cp}${g} shader translation failed.`);return}console.error(`${cp}Translated ${g} shaderSource:
- ${m}`)}}function ENe(e,t,n){let i={};for(let o=0;o<n;++o){let r=e.getActiveAttrib(t,o),a=e.getAttribLocation(t,r.name);i[r.name]={name:r.name,type:r.type,index:a}}return i}function vNe(e,t){let n={},i=[],o=[],r=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let a=0;a<r;++a){let s=e.getActiveUniform(t,a),c="[0]",u=s.name.indexOf(c,s.name.length-c.length)!==-1?s.name.slice(0,s.name.length-3):s.name;if(u.indexOf("gl_")!==0)if(s.name.indexOf("[")<0){let f=e.getUniformLocation(t,u);if(f!==null){let d=fD(e,s,u,f);n[u]=d,i.push(d),d._setSampler&&o.push(d)}}else{let f,d,p,g,m=u.indexOf("[");if(m>=0){if(f=n[u.slice(0,m)],!l(f))continue;d=f._locations,d.length<=1&&(p=f.value,g=e.getUniformLocation(t,u),g!==null&&(d.push(g),p.push(e.getUniform(t,g))))}else{d=[];for(let A=0;A<s.size;++A)g=e.getUniformLocation(t,`${u}[${A}]`),g!==null&&d.push(g);f=dD(e,s,u,d),n[u]=f,i.push(f),f._setSampler&&o.push(f)}}}return{uniformsByName:n,uniforms:i,samplerUniforms:o}}function SNe(e,t){let n=[],i=[];for(let o in t)if(t.hasOwnProperty(o)){let r=t[o],a=o,s=e._duplicateUniformNames[a];l(s)&&(r.name=s,a=s);let c=D0[a];l(c)?n.push({uniform:r,automaticUniform:c}):i.push(r)}return{automaticUniforms:n,manualUniforms:i}}function wNe(e,t,n){e.useProgram(t);let i=0,o=n.length;for(let r=0;r<o;++r)i=n[r]._setSampler(i);return e.useProgram(null),i}function g8(e){l(e._program)||pse(e)}function pse(e){let t=e._program,n=e._gl,i=TNe(n,e,e._debugShaders),o=n.getProgramParameter(i,n.ACTIVE_ATTRIBUTES),r=vNe(n,i),a=SNe(e,r.uniformsByName);e._program=i,e._numberOfVertexAttributes=o,e._vertexAttributes=ENe(n,i,o),e._uniformsByName=r.uniformsByName,e._uniforms=r.uniforms,e._automaticUniforms=a.automaticUniforms,e._manualUniforms=a.manualUniforms,e.maximumTextureUnitIndex=wNe(n,i,r.samplerUniforms),t&&e._gl.deleteProgram(t),typeof spector<"u"&&(e._program.__SPECTOR_rebuildProgram=function(s,c,u,f){let d=e._vertexShaderText,p=e._fragmentShaderText,g=/ ! = /g;e._vertexShaderText=s.replace(g," != "),e._fragmentShaderText=c.replace(g," != ");try{pse(e),u(e._program)}catch(m){e._vertexShaderText=d,e._fragmentShaderText=p;let y=/(?:Compile|Link) error: ([^]*)/.exec(m.message);f(y?y[1]:m.message)}})}N0.prototype._bind=function(){g8(this),this._gl.useProgram(this._program)};N0.prototype._setUniforms=function(e,t,n){let i,o;if(l(e)){let s=this._manualUniforms;for(i=s.length,o=0;o<i;++o){let c=s[o];c.value=e[c.name]()}}let r=this._automaticUniforms;for(i=r.length,o=0;o<i;++o){let s=r[o];s.uniform.value=s.automaticUniform.getValue(t)}let a=this._uniforms;for(i=a.length,o=0;o<i;++o)a[o].set();if(n){let s=this._gl,c=this._program;s.validateProgram(c)}};N0.prototype.isDestroyed=function(){return!1};N0.prototype.destroy=function(){this._cachedShader.cache.releaseShaderProgram(this)};N0.prototype.finalDestroy=function(){return this._gl.deleteProgram(this._program),fe(this)};var Kt=N0;function _8(e){this._context=e}var hD,INe=new tt({primitiveType:Re.TRIANGLES}),DNe=new ai({color:new V(0,0,0,0)});function PNe(e,t){return new fa({context:e,colorTextures:[t],destroyAttachments:!1})}function RNe(e,t){return Kt.fromCache({context:e,vertexShaderSource:yx,fragmentShaderSource:t,attributeLocations:{position:0,textureCoordinates:1}})}function ONe(e,t){return(!l(hD)||hD.viewport.width!==e||hD.viewport.height!==t)&&(hD=Ve.fromCache({viewport:new Je(0,0,e,t)})),hD}_8.prototype.execute=function(e){l(e.preExecute)&&e.preExecute(e);let t=e.outputTexture,n=t.width,i=t.height,o=this._context,r=l(e.vertexArray)?e.vertexArray:o.getViewportQuadVertexArray(),a=l(e.shaderProgram)?e.shaderProgram:RNe(o,e.fragmentShaderSource),s=PNe(o,t),c=ONe(n,i),u=e.uniformMap,f=DNe;f.framebuffer=s,f.renderState=c,f.execute(o);let d=INe;d.vertexArray=r,d.renderState=c,d.shaderProgram=a,d.uniformMap=u,d.framebuffer=s,d.execute(o),s.destroy(),e.persists||(a.destroy(),l(e.vertexArray)&&r.destroy()),l(e.postExecute)&&e.postExecute(t)};_8.prototype.isDestroyed=function(){return!1};_8.prototype.destroy=function(){return fe(this)};var mD=_8;var hn={BYTE:ee.BYTE,UNSIGNED_BYTE:ee.UNSIGNED_BYTE,SHORT:ee.SHORT,UNSIGNED_SHORT:ee.UNSIGNED_SHORT,INT:ee.INT,UNSIGNED_INT:ee.UNSIGNED_INT,FLOAT:ee.FLOAT,DOUBLE:ee.DOUBLE};hn.getSizeInBytes=function(e){switch(e){case hn.BYTE:return Int8Array.BYTES_PER_ELEMENT;case hn.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case hn.SHORT:return Int16Array.BYTES_PER_ELEMENT;case hn.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case hn.INT:return Int32Array.BYTES_PER_ELEMENT;case hn.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case hn.FLOAT:return Float32Array.BYTES_PER_ELEMENT;case hn.DOUBLE:return Float64Array.BYTES_PER_ELEMENT}};hn.fromTypedArray=function(e){if(e instanceof Int8Array)return hn.BYTE;if(e instanceof Uint8Array)return hn.UNSIGNED_BYTE;if(e instanceof Int16Array)return hn.SHORT;if(e instanceof Uint16Array)return hn.UNSIGNED_SHORT;if(e instanceof Int32Array)return hn.INT;if(e instanceof Uint32Array)return hn.UNSIGNED_INT;if(e instanceof Float32Array)return hn.FLOAT;if(e instanceof Float64Array)return hn.DOUBLE};hn.validate=function(e){return l(e)&&(e===hn.BYTE||e===hn.UNSIGNED_BYTE||e===hn.SHORT||e===hn.UNSIGNED_SHORT||e===hn.INT||e===hn.UNSIGNED_INT||e===hn.FLOAT||e===hn.DOUBLE)};hn.createTypedArray=function(e,t){switch(e){case hn.BYTE:return new Int8Array(t);case hn.UNSIGNED_BYTE:return new Uint8Array(t);case hn.SHORT:return new Int16Array(t);case hn.UNSIGNED_SHORT:return new Uint16Array(t);case hn.INT:return new Int32Array(t);case hn.UNSIGNED_INT:return new Uint32Array(t);case hn.FLOAT:return new Float32Array(t);case hn.DOUBLE:return new Float64Array(t)}};hn.createArrayBufferView=function(e,t,n,i){switch(n=n??0,i=i??(t.byteLength-n)/hn.getSizeInBytes(e),e){case hn.BYTE:return new Int8Array(t,n,i);case hn.UNSIGNED_BYTE:return new Uint8Array(t,n,i);case hn.SHORT:return new Int16Array(t,n,i);case hn.UNSIGNED_SHORT:return new Uint16Array(t,n,i);case hn.INT:return new Int32Array(t,n,i);case hn.UNSIGNED_INT:return new Uint32Array(t,n,i);case hn.FLOAT:return new Float32Array(t,n,i);case hn.DOUBLE:return new Float64Array(t,n,i)}};hn.fromName=function(e){switch(e){case"BYTE":return hn.BYTE;case"UNSIGNED_BYTE":return hn.UNSIGNED_BYTE;case"SHORT":return hn.SHORT;case"UNSIGNED_SHORT":return hn.UNSIGNED_SHORT;case"INT":return hn.INT;case"UNSIGNED_INT":return hn.UNSIGNED_INT;case"FLOAT":return hn.FLOAT;case"DOUBLE":return hn.DOUBLE}};hn.dequantize=function(e,t){switch(t){case hn.BYTE:return Math.max(e/127,-1);case hn.UNSIGNED_BYTE:return e/255;case hn.SHORT:return Math.max(e/32767,-1);case hn.UNSIGNED_SHORT:return e/65535;case hn.INT:return Math.max(e/2147483647,-1);case hn.UNSIGNED_INT:return e/4294967295}};Object.freeze(hn);var Y=hn;var gse={NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3};Object.freeze(gse);var md=gse;function hW(e){e=e??G.EMPTY_OBJECT,this.attributes=e.attributes,this.indices=e.indices,this.primitiveType=e.primitiveType??Re.TRIANGLES,this.boundingSphere=e.boundingSphere,this.geometryType=e.geometryType??md.NONE,this.boundingSphereCV=e.boundingSphereCV,this.offsetAttribute=e.offsetAttribute}hW.computeNumberOfVertices=function(e){let t=-1;for(let n in e.attributes)if(e.attributes.hasOwnProperty(n)&&l(e.attributes[n])&&l(e.attributes[n].values)){let i=e.attributes[n];t=i.values.length/i.componentsPerAttribute}return t};var MNe=new de,BNe=new h,_se=new M,LNe=[new de,new de,new de],NNe=[new z,new z,new z],FNe=[new z,new z,new z],kNe=new h,zNe=new Le,UNe=new M,VNe=new Gi;hW._textureCoordinateRotationPoints=function(e,t,n,i){let o,r=oe.center(i,MNe),a=de.toCartesian(r,n,BNe),s=pt.eastNorthUpToFixedFrame(a,n,_se),c=M.inverse(s,_se),u=NNe,f=LNe;f[0].longitude=i.west,f[0].latitude=i.south,f[1].longitude=i.west,f[1].latitude=i.north,f[2].longitude=i.east,f[2].latitude=i.south;let d=kNe;for(o=0;o<3;o++)de.toCartesian(f[o],n,d),d=M.multiplyByPointAsVector(c,d,d),u[o].x=d.x,u[o].y=d.y;let p=Le.fromAxisAngle(h.UNIT_Z,-t,zNe),g=$.fromQuaternion(p,UNe),m=e.length,A=Number.POSITIVE_INFINITY,y=Number.POSITIVE_INFINITY,x=Number.NEGATIVE_INFINITY,b=Number.NEGATIVE_INFINITY;for(o=0;o<m;o++)d=M.multiplyByPointAsVector(c,e[o],d),d=$.multiplyByVector(g,d,d),A=Math.min(A,d.x),y=Math.min(y,d.y),x=Math.max(x,d.x),b=Math.max(b,d.y);let C=Gi.fromRotation(t,VNe),E=FNe;E[0].x=A,E[0].y=y,E[1].x=A,E[1].y=b,E[2].x=x,E[2].y=y;let S=u[0],w=u[2].x-S.x,P=u[1].y-S.y;for(o=0;o<3;o++){let T=E[o];Gi.multiplyByVector(C,T,T),T.x=(T.x-S.x)/w,T.y=(T.y-S.y)/P}let R=E[0],B=E[1],L=E[2],_=new Array(6);return z.pack(R,_),z.pack(B,_,2),z.pack(L,_,4),_};var At=hW;function jNe(e){e=e??G.EMPTY_OBJECT,this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=e.normalize??!1,this.values=e.values}var Me=jNe;function TE(e,t,n,i,o){this._format=e,this._datatype=t,this._width=n,this._height=i,this._buffer=o}Object.defineProperties(TE.prototype,{internalFormat:{get:function(){return this._format}},pixelDatatype:{get:function(){return this._datatype}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},bufferView:{get:function(){return this._buffer}},arrayBufferView:{get:function(){return this._buffer}}});TE.clone=function(e){if(l(e))return new TE(e._format,e._datatype,e._width,e._height,e._buffer)};TE.prototype.clone=function(){return TE.clone(this)};var pD=TE;var Ase=Yr(uf(),1);function yse(){if(!l(Js._canTransferArrayBuffer)){let e=gW("transferTypedArrayTest");e.postMessage=e.webkitPostMessage??e.postMessage;let t=99,n=new Int8Array([t]);try{e.postMessage({array:n},[n.buffer])}catch{return Js._canTransferArrayBuffer=!1,Js._canTransferArrayBuffer}Js._canTransferArrayBuffer=new Promise(i=>{e.onmessage=function(o){let r=o.data.array,a=l(r)&&r[0]===t;i(a),e.terminate(),Js._canTransferArrayBuffer=a}})}return Js._canTransferArrayBuffer}var pW=new ye;function mW(e){let t;try{t=new Blob([e],{type:"application/javascript"})}catch{let o=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,r=new o;r.append(e),t=r.getBlob("application/javascript")}return(window.URL||window.webkitURL).createObjectURL(t)}function gW(e){let t=new Ase.default(e),n=t.scheme().length!==0&&t.fragment().length===0,i=e.replace(/\.js$/,""),o={},r,a;if(K_(e))a=e;else if(!n){let s=Xt(`${Js._workerModulePrefix}/${i}.js`);K_(s)&&(a=s)}if(a){let s=`import "${a}";`;return r=mW(s),o.type="module",new Worker(r,o)}if(!n&&typeof CESIUM_WORKERS<"u"){let s=`
- importScripts("${mW(CESIUM_WORKERS)}");
- CesiumWorkers["${i}"]();
- `;return r=mW(s),new Worker(r,o)}if(r=e,n||(r=Xt(`${Js._workerModulePrefix+i}.js`)),!sn.supportsEsmWebWorkers())throw new re("This browser is not supported. Please update your browser to continue.");return o.type="module",new Worker(r,o)}async function GNe(e,t){let n={modulePath:void 0,wasmBinaryFile:void 0,wasmBinary:void 0};if(!sn.supportsWebAssembly()){if(!l(t.fallbackModulePath))throw new re(`This browser does not support Web Assembly, and no backup module was provided for ${e._workerPath}`);return n.modulePath=Xt(t.fallbackModulePath),n}n.wasmBinaryFile=Xt(t.wasmBinaryFile);let i=await De.fetchArrayBuffer({url:n.wasmBinaryFile});return n.wasmBinary=i,n}function Js(e,t){this._workerPath=e,this._maximumActiveTasks=t??Number.POSITIVE_INFINITY,this._activeTasks=0,this._nextID=0,this._webAssemblyPromise=void 0}var HNe=(e,t,n,i)=>{let o=({data:r})=>{if(r.id===t){if(l(r.error)){let a=r.error;a.name==="RuntimeError"?(a=new re(r.error.message),a.stack=r.error.stack):a.name==="DeveloperError"?(a=new _e(r.error.message),a.stack=r.error.stack):a.name==="Error"&&(a=new Error(r.error.message),a.stack=r.error.stack),pW.raiseEvent(a),i(a)}else pW.raiseEvent(),n(r.result);e.removeEventListener("message",o)}};return o},WNe=[];async function qNe(e,t,n){let i=await Promise.resolve(yse());l(n)?i||(n.length=0):n=WNe;let o=e._nextID++,r=new Promise((a,s)=>{e._worker.addEventListener("message",HNe(e._worker,o,a,s))});return e._worker.postMessage({id:o,baseUrl:Xt.getCesiumBaseUrl().url,parameters:t,canTransferArrayBuffer:i},n),r}async function YNe(e,t,n){++e._activeTasks;try{let i=await qNe(e,t,n);return--e._activeTasks,i}catch(i){throw--e._activeTasks,i}}Js.prototype.scheduleTask=function(e,t){if(l(this._worker)||(this._worker=gW(this._workerPath)),!(this._activeTasks>=this._maximumActiveTasks))return YNe(this,e,t)};Js.prototype.initWebAssemblyModule=async function(e){if(l(this._webAssemblyPromise))return this._webAssemblyPromise;let t=async()=>{let n=this._worker=gW(this._workerPath),i=await GNe(this,e),o=await Promise.resolve(yse()),r,a=i.wasmBinary;l(a)&&o&&(r=[a]);let s=new Promise((c,u)=>{n.onmessage=function({data:f}){l(f)?c(f.result):u(new re("Could not configure wasm module"))}});return n.postMessage({canTransferArrayBuffer:o,parameters:{webAssemblyConfig:i}},r),s};return this._webAssemblyPromise=t(),this._webAssemblyPromise};Js.prototype.isDestroyed=function(){return!1};Js.prototype.destroy=function(){return l(this._worker)&&this._worker.terminate(),fe(this)};Js.taskCompletedEvent=pW;Js._defaultWorkerModulePrefix="Workers/";Js._workerModulePrefix=Js._defaultWorkerModulePrefix;Js._canTransferArrayBuffer=void 0;var Gn=Js;function F0(){}F0._transcodeTaskProcessor=new Gn("transcodeKTX2",Number.POSITIVE_INFINITY);F0._readyPromise=void 0;function XNe(){let e=F0._transcodeTaskProcessor.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/basis_transcoder.wasm"}).then(function(t){if(t)return F0._transcodeTaskProcessor;throw new re("KTX2 transcoder could not be initialized.")});F0._readyPromise=e}F0.transcode=function(e,t){return l(F0._readyPromise)||XNe(),F0._readyPromise.then(function(n){let i=e;e instanceof ArrayBuffer&&(i=new Uint8Array(e));let o={supportedTargetFormats:t,ktx2Buffer:i};return n.scheduleTask(o,[i.buffer])}).then(function(n){let i=n.length,o=Object.keys(n[0]);for(let r=0;r<i;r++){let a=n[r];for(let s=0;s<o.length;s++){let c=a[o[s]];a[o[s]]=new pD(c.internalFormat,c.datatype,c.width,c.height,c.levelBuffer)}}if(o.length===1){for(let r=0;r<i;++r)n[r]=n[r][o[0]];i===1&&(n=n[0])}return n}).catch(function(n){throw n})};var gD=F0;var xse;bse.setKTX2SupportedFormats=function(e,t,n,i,o,r){xse={s3tc:e,pvrtc:t,astc:n,etc:i,etc1:o,bc7:r}};function bse(e){let t;return e instanceof ArrayBuffer||ArrayBuffer.isView(e)?t=Promise.resolve(e):t=De.createIfNeeded(e).fetchArrayBuffer(),t.then(function(n){return gD.transcode(n,xse)})}var Cu=bse;function KNe(e,t){this.start=e??0,this.stop=t??0}var Qr=KNe;var A8=class e{constructor(t,n){this.center=h.clone(t??h.ZERO),this.radius=n??0}static fromPoints(t,n){if(l(n)||(n=new e),!l(t)||t.length===0)return n.center=h.clone(h.ZERO,n.center),n.radius=0,n;let i=h.clone(t[0],TW),o=h.clone(i,_W),r=h.clone(i,AW),a=h.clone(i,yW),s=h.clone(i,xW),c=h.clone(i,bW),u=h.clone(i,CW),f=t.length,d;for(d=1;d<f;d++){h.clone(t[d],i);let B=i.x,L=i.y,_=i.z;B<o.x&&h.clone(i,o),B>s.x&&h.clone(i,s),L<r.y&&h.clone(i,r),L>c.y&&h.clone(i,c),_<a.z&&h.clone(i,a),_>u.z&&h.clone(i,u)}let p=h.magnitudeSquared(h.subtract(s,o,Zs)),g=h.magnitudeSquared(h.subtract(c,r,Zs)),m=h.magnitudeSquared(h.subtract(u,a,Zs)),A=o,y=s,x=p;g>x&&(x=g,A=r,y=c),m>x&&(x=m,A=a,y=u);let b=EW;b.x=(A.x+y.x)*.5,b.y=(A.y+y.y)*.5,b.z=(A.z+y.z)*.5;let C=h.magnitudeSquared(h.subtract(y,b,Zs)),E=Math.sqrt(C),S=vW;S.x=o.x,S.y=r.y,S.z=a.z;let w=SW;w.x=s.x,w.y=c.y,w.z=u.z;let P=h.midpoint(S,w,wW),R=0;for(d=0;d<f;d++){h.clone(t[d],i);let B=h.magnitude(h.subtract(i,P,Zs));B>R&&(R=B);let L=h.magnitudeSquared(h.subtract(i,b,Zs));if(L>C){let _=Math.sqrt(L);E=(E+_)*.5,C=E*E;let T=_-E;b.x=(E*b.x+T*i.x)/_,b.y=(E*b.y+T*i.y)/_,b.z=(E*b.z+T*i.z)/_}}return E<R?(h.clone(b,n.center),n.radius=E):(h.clone(P,n.center),n.radius=R),n}static fromRectangle2D(t,n,i){return e.fromRectangleWithHeights2D(t,n,0,0,i)}static fromRectangleWithHeights2D(t,n,i,o,r){if(l(r)||(r=new e),!l(t))return r.center=h.clone(h.ZERO,r.center),r.radius=0,r;Cse._ellipsoid=te.default,n=n??Cse,oe.southwest(t,IW),IW.height=i,oe.northeast(t,DW),DW.height=o;let a=n.project(IW,$Ne),s=n.project(DW,JNe),c=s.x-a.x,u=s.y-a.y,f=s.z-a.z;r.radius=Math.sqrt(c*c+u*u+f*f)*.5;let d=r.center;return d.x=a.x+c*.5,d.y=a.y+u*.5,d.z=a.z+f*.5,r}static fromRectangle3D(t,n,i,o){if(n=n??te.default,i=i??0,l(o)||(o=new e),!l(t))return o.center=h.clone(h.ZERO,o.center),o.radius=0,o;let r=oe.subsample(t,n,i,ZNe);return e.fromPoints(r,o)}static fromVertices(t,n,i,o){if(l(o)||(o=new e),!l(t)||t.length===0)return o.center=h.clone(h.ZERO,o.center),o.radius=0,o;n=n??h.ZERO,i=i??3;let r=TW;r.x=t[0]+n.x,r.y=t[1]+n.y,r.z=t[2]+n.z;let a=h.clone(r,_W),s=h.clone(r,AW),c=h.clone(r,yW),u=h.clone(r,xW),f=h.clone(r,bW),d=h.clone(r,CW),p=t.length,g;for(g=0;g<p;g+=i){let _=t[g]+n.x,T=t[g+1]+n.y,v=t[g+2]+n.z;r.x=_,r.y=T,r.z=v,_<a.x&&h.clone(r,a),_>u.x&&h.clone(r,u),T<s.y&&h.clone(r,s),T>f.y&&h.clone(r,f),v<c.z&&h.clone(r,c),v>d.z&&h.clone(r,d)}let m=h.magnitudeSquared(h.subtract(u,a,Zs)),A=h.magnitudeSquared(h.subtract(f,s,Zs)),y=h.magnitudeSquared(h.subtract(d,c,Zs)),x=a,b=u,C=m;A>C&&(C=A,x=s,b=f),y>C&&(C=y,x=c,b=d);let E=EW;E.x=(x.x+b.x)*.5,E.y=(x.y+b.y)*.5,E.z=(x.z+b.z)*.5;let S=h.magnitudeSquared(h.subtract(b,E,Zs)),w=Math.sqrt(S),P=vW;P.x=a.x,P.y=s.y,P.z=c.z;let R=SW;R.x=u.x,R.y=f.y,R.z=d.z;let B=h.midpoint(P,R,wW),L=0;for(g=0;g<p;g+=i){r.x=t[g]+n.x,r.y=t[g+1]+n.y,r.z=t[g+2]+n.z;let _=h.magnitude(h.subtract(r,B,Zs));_>L&&(L=_);let T=h.magnitudeSquared(h.subtract(r,E,Zs));if(T>S){let v=Math.sqrt(T);w=(w+v)*.5,S=w*w;let I=v-w;E.x=(w*E.x+I*r.x)/v,E.y=(w*E.y+I*r.y)/v,E.z=(w*E.z+I*r.z)/v}}return w<L?(h.clone(E,o.center),o.radius=w):(h.clone(B,o.center),o.radius=L),o}static fromEncodedCartesianVertices(t,n,i){if(l(i)||(i=new e),!l(t)||!l(n)||t.length!==n.length||t.length===0)return i.center=h.clone(h.ZERO,i.center),i.radius=0,i;let o=TW;o.x=t[0]+n[0],o.y=t[1]+n[1],o.z=t[2]+n[2];let r=h.clone(o,_W),a=h.clone(o,AW),s=h.clone(o,yW),c=h.clone(o,xW),u=h.clone(o,bW),f=h.clone(o,CW),d=t.length,p;for(p=0;p<d;p+=3){let L=t[p]+n[p],_=t[p+1]+n[p+1],T=t[p+2]+n[p+2];o.x=L,o.y=_,o.z=T,L<r.x&&h.clone(o,r),L>c.x&&h.clone(o,c),_<a.y&&h.clone(o,a),_>u.y&&h.clone(o,u),T<s.z&&h.clone(o,s),T>f.z&&h.clone(o,f)}let g=h.magnitudeSquared(h.subtract(c,r,Zs)),m=h.magnitudeSquared(h.subtract(u,a,Zs)),A=h.magnitudeSquared(h.subtract(f,s,Zs)),y=r,x=c,b=g;m>b&&(b=m,y=a,x=u),A>b&&(b=A,y=s,x=f);let C=EW;C.x=(y.x+x.x)*.5,C.y=(y.y+x.y)*.5,C.z=(y.z+x.z)*.5;let E=h.magnitudeSquared(h.subtract(x,C,Zs)),S=Math.sqrt(E),w=vW;w.x=r.x,w.y=a.y,w.z=s.z;let P=SW;P.x=c.x,P.y=u.y,P.z=f.z;let R=h.midpoint(w,P,wW),B=0;for(p=0;p<d;p+=3){o.x=t[p]+n[p],o.y=t[p+1]+n[p+1],o.z=t[p+2]+n[p+2];let L=h.magnitude(h.subtract(o,R,Zs));L>B&&(B=L);let _=h.magnitudeSquared(h.subtract(o,C,Zs));if(_>E){let T=Math.sqrt(_);S=(S+T)*.5,E=S*S;let v=T-S;C.x=(S*C.x+v*o.x)/T,C.y=(S*C.y+v*o.y)/T,C.z=(S*C.z+v*o.z)/T}}return S<B?(h.clone(C,i.center),i.radius=S):(h.clone(R,i.center),i.radius=B),i}static fromCornerPoints(t,n,i){l(i)||(i=new e);let o=h.midpoint(t,n,i.center);return i.radius=h.distance(o,n),i}static fromEllipsoid(t,n){return l(n)||(n=new e),h.clone(h.ZERO,n.center),n.radius=t.maximumRadius,n}static fromBoundingSpheres(t,n){if(l(n)||(n=new e),!l(t)||t.length===0)return n.center=h.clone(h.ZERO,n.center),n.radius=0,n;let i=t.length;if(i===1)return e.clone(t[0],n);if(i===2)return e.union(t[0],t[1],n);let o=[],r;for(r=0;r<i;r++)o.push(t[r].center);n=e.fromPoints(o,n);let a=n.center,s=n.radius;for(r=0;r<i;r++){let c=t[r];s=Math.max(s,h.distance(a,c.center)+c.radius)}return n.radius=s,n}static fromOrientedBoundingBox(t,n){l(n)||(n=new e);let i=t.halfAxes,o=$.getColumn(i,0,eFe),r=$.getColumn(i,1,tFe),a=$.getColumn(i,2,nFe);return h.add(o,r,o),h.add(o,a,o),n.center=h.clone(t.center,n.center),n.radius=h.magnitude(o),n}static fromTransformation(t,n){l(n)||(n=new e);let i=M.getTranslation(t,iFe),o=M.getScale(t,oFe),r=.5*h.magnitude(o);return n.center=h.clone(i,n.center),n.radius=r,n}static clone(t,n){if(l(t))return l(n)?(n.center=h.clone(t.center,n.center),n.radius=t.radius,n):new e(t.center,t.radius)}static pack(t,n,i){i=i??0;let o=t.center;return n[i++]=o.x,n[i++]=o.y,n[i++]=o.z,n[i]=t.radius,n}static unpack(t,n,i){n=n??0,l(i)||(i=new e);let o=i.center;return o.x=t[n++],o.y=t[n++],o.z=t[n++],i.radius=t[n],i}static union(t,n,i){l(i)||(i=new e);let o=t.center,r=t.radius,a=n.center,s=n.radius,c=h.subtract(a,o,rFe),u=h.magnitude(c);if(r>=u+s)return t.clone(i),i;if(s>=u+r)return n.clone(i),i;let f=(r+u+s)*.5,d=h.multiplyByScalar(c,(-r+f)/u,aFe);return h.add(d,o,d),h.clone(d,i.center),i.radius=f,i}static expand(t,n,i){i=e.clone(t,i);let o=h.magnitude(h.subtract(n,i.center,sFe));return o>i.radius&&(i.radius=o),i}static intersectPlane(t,n){let i=t.center,o=t.radius,r=n.normal,a=h.dot(r,i)+n.distance;return a<-o?qt.OUTSIDE:a<o?qt.INTERSECTING:qt.INSIDE}static transform(t,n,i){return l(i)||(i=new e),i.center=M.multiplyByPoint(n,t.center,i.center),i.radius=M.getMaximumScale(n)*t.radius,i}static distanceSquaredTo(t,n){let i=h.subtract(t.center,n,cFe),o=h.magnitude(i)-t.radius;return o<=0?0:o*o}static transformWithoutScale(t,n,i){return l(i)||(i=new e),i.center=M.multiplyByPoint(n,t.center,i.center),i.radius=t.radius,i}static computePlaneDistances(t,n,i,o){l(o)||(o=new Qr);let r=h.subtract(t.center,n,lFe),a=h.dot(i,r);return o.start=a-t.radius,o.stop=a+t.radius,o}static projectTo2D(t,n,i){Ese._ellipsoid=te.default,n=n??Ese;let o=n.ellipsoid,r=t.center,a=t.radius,s;h.equals(r,h.ZERO)?s=h.clone(h.UNIT_X,Tse):s=o.geodeticSurfaceNormal(r,Tse);let c=h.cross(h.UNIT_Z,s,uFe);h.normalize(c,c);let u=h.cross(s,c,fFe);h.normalize(u,u),h.multiplyByScalar(s,a,s),h.multiplyByScalar(u,a,u),h.multiplyByScalar(c,a,c);let f=h.negate(u,hFe),d=h.negate(c,dFe),p=vse,g=p[0];h.add(s,u,g),h.add(g,c,g),g=p[1],h.add(s,u,g),h.add(g,d,g),g=p[2],h.add(s,f,g),h.add(g,d,g),g=p[3],h.add(s,f,g),h.add(g,c,g),h.negate(s,s),g=p[4],h.add(s,u,g),h.add(g,c,g),g=p[5],h.add(s,u,g),h.add(g,d,g),g=p[6],h.add(s,f,g),h.add(g,d,g),g=p[7],h.add(s,f,g),h.add(g,c,g);let m=p.length;for(let b=0;b<m;++b){let C=p[b];h.add(r,C,C);let E=o.cartesianToCartographic(C,mFe);n.project(E,C)}i=e.fromPoints(p,i),r=i.center;let A=r.x,y=r.y,x=r.z;return r.x=x,r.y=A,r.z=y,i}static isOccluded(t,n){return!n.isBoundingSphereVisible(t)}static equals(t,n){return t===n||l(t)&&l(n)&&h.equals(t.center,n.center)&&t.radius===n.radius}intersectPlane(t){return e.intersectPlane(this,t)}distanceSquaredTo(t){return e.distanceSquaredTo(this,t)}computePlaneDistances(t,n,i){return e.computePlaneDistances(this,t,n,i)}isOccluded(t){return e.isOccluded(this,t)}equals(t){return e.equals(this,t)}clone(t){return e.clone(this,t)}volume(){let t=this.radius;return QNe*t*t*t}};A8.packedLength=4;var _W=new h,AW=new h,yW=new h,xW=new h,bW=new h,CW=new h,TW=new h,Zs=new h,EW=new h,vW=new h,SW=new h,wW=new h,QNe=4/3*D.PI,Cse=new ji,$Ne=new h,JNe=new h,IW=new de,DW=new de,ZNe=[],eFe=new h,tFe=new h,nFe=new h,iFe=new h,oFe=new h,rFe=new h,aFe=new h,sFe=new h,cFe=new h,lFe=new h,Tse=new h,uFe=new h,fFe=new h,dFe=new h,hFe=new h,mFe=new de,vse=new Array(8);for(let e=0;e<8;++e)vse[e]=new h;var Ese=new ji,ce=A8;function pFe(e){e=e??G.EMPTY_OBJECT,this.position=e.position,this.normal=e.normal,this.st=e.st,this.bitangent=e.bitangent,this.tangent=e.tangent,this.color=e.color}var pn=pFe;var Sse={NONE:0,TOP:1,ALL:2};Object.freeze(Sse);var ln=Sse;function Xa(e){e=e??G.EMPTY_OBJECT,this.position=e.position??!1,this.normal=e.normal??!1,this.st=e.st??!1,this.bitangent=e.bitangent??!1,this.tangent=e.tangent??!1,this.color=e.color??!1}Xa.POSITION_ONLY=Object.freeze(new Xa({position:!0}));Xa.POSITION_AND_NORMAL=Object.freeze(new Xa({position:!0,normal:!0}));Xa.POSITION_NORMAL_AND_ST=Object.freeze(new Xa({position:!0,normal:!0,st:!0}));Xa.POSITION_AND_ST=Object.freeze(new Xa({position:!0,st:!0}));Xa.POSITION_AND_COLOR=Object.freeze(new Xa({position:!0,color:!0}));Xa.ALL=Object.freeze(new Xa({position:!0,normal:!0,st:!0,tangent:!0,bitangent:!0}));Xa.DEFAULT=Xa.POSITION_NORMAL_AND_ST;Xa.packedLength=6;Xa.pack=function(e,t,n){return n=n??0,t[n++]=e.position?1:0,t[n++]=e.normal?1:0,t[n++]=e.st?1:0,t[n++]=e.tangent?1:0,t[n++]=e.bitangent?1:0,t[n]=e.color?1:0,t};Xa.unpack=function(e,t,n){return t=t??0,l(n)||(n=new Xa),n.position=e[t++]===1,n.normal=e[t++]===1,n.st=e[t++]===1,n.tangent=e[t++]===1,n.bitangent=e[t++]===1,n.color=e[t]===1,n};Xa.clone=function(e,t){if(l(e))return l(t)||(t=new Xa),t.position=e.position,t.normal=e.normal,t.st=e.st,t.tangent=e.tangent,t.bitangent=e.bitangent,t.color=e.color,t};var Ne=Xa;var gFe=new h;function df(e){e=e??G.EMPTY_OBJECT;let t=e.minimum,n=e.maximum,i=e.vertexFormat??Ne.DEFAULT;this._minimum=h.clone(t),this._maximum=h.clone(n),this._vertexFormat=i,this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxGeometry"}df.fromDimensions=function(e){e=e??G.EMPTY_OBJECT;let t=e.dimensions,n=h.multiplyByScalar(t,.5,new h);return new df({minimum:h.negate(n,new h),maximum:n,vertexFormat:e.vertexFormat,offsetAttribute:e.offsetAttribute})};df.fromAxisAlignedBoundingBox=function(e){return new df({minimum:e.minimum,maximum:e.maximum})};df.packedLength=2*h.packedLength+Ne.packedLength+1;df.pack=function(e,t,n){return n=n??0,h.pack(e._minimum,t,n),h.pack(e._maximum,t,n+h.packedLength),Ne.pack(e._vertexFormat,t,n+2*h.packedLength),t[n+2*h.packedLength+Ne.packedLength]=e._offsetAttribute??-1,t};var Ise=new h,Dse=new h,Pse=new Ne,wse={minimum:Ise,maximum:Dse,vertexFormat:Pse,offsetAttribute:void 0};df.unpack=function(e,t,n){t=t??0;let i=h.unpack(e,t,Ise),o=h.unpack(e,t+h.packedLength,Dse),r=Ne.unpack(e,t+2*h.packedLength,Pse),a=e[t+2*h.packedLength+Ne.packedLength];return l(n)?(n._minimum=h.clone(i,n._minimum),n._maximum=h.clone(o,n._maximum),n._vertexFormat=Ne.clone(r,n._vertexFormat),n._offsetAttribute=a===-1?void 0:a,n):(wse.offsetAttribute=a===-1?void 0:a,new df(wse))};df.createGeometry=function(e){let t=e._minimum,n=e._maximum,i=e._vertexFormat;if(h.equals(t,n))return;let o=new pn,r,a;if(i.position&&(i.st||i.normal||i.tangent||i.bitangent)){if(i.position&&(a=new Float64Array(72),a[0]=t.x,a[1]=t.y,a[2]=n.z,a[3]=n.x,a[4]=t.y,a[5]=n.z,a[6]=n.x,a[7]=n.y,a[8]=n.z,a[9]=t.x,a[10]=n.y,a[11]=n.z,a[12]=t.x,a[13]=t.y,a[14]=t.z,a[15]=n.x,a[16]=t.y,a[17]=t.z,a[18]=n.x,a[19]=n.y,a[20]=t.z,a[21]=t.x,a[22]=n.y,a[23]=t.z,a[24]=n.x,a[25]=t.y,a[26]=t.z,a[27]=n.x,a[28]=n.y,a[29]=t.z,a[30]=n.x,a[31]=n.y,a[32]=n.z,a[33]=n.x,a[34]=t.y,a[35]=n.z,a[36]=t.x,a[37]=t.y,a[38]=t.z,a[39]=t.x,a[40]=n.y,a[41]=t.z,a[42]=t.x,a[43]=n.y,a[44]=n.z,a[45]=t.x,a[46]=t.y,a[47]=n.z,a[48]=t.x,a[49]=n.y,a[50]=t.z,a[51]=n.x,a[52]=n.y,a[53]=t.z,a[54]=n.x,a[55]=n.y,a[56]=n.z,a[57]=t.x,a[58]=n.y,a[59]=n.z,a[60]=t.x,a[61]=t.y,a[62]=t.z,a[63]=n.x,a[64]=t.y,a[65]=t.z,a[66]=n.x,a[67]=t.y,a[68]=n.z,a[69]=t.x,a[70]=t.y,a[71]=n.z,o.position=new Me({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:a})),i.normal){let u=new Float32Array(72);u[0]=0,u[1]=0,u[2]=1,u[3]=0,u[4]=0,u[5]=1,u[6]=0,u[7]=0,u[8]=1,u[9]=0,u[10]=0,u[11]=1,u[12]=0,u[13]=0,u[14]=-1,u[15]=0,u[16]=0,u[17]=-1,u[18]=0,u[19]=0,u[20]=-1,u[21]=0,u[22]=0,u[23]=-1,u[24]=1,u[25]=0,u[26]=0,u[27]=1,u[28]=0,u[29]=0,u[30]=1,u[31]=0,u[32]=0,u[33]=1,u[34]=0,u[35]=0,u[36]=-1,u[37]=0,u[38]=0,u[39]=-1,u[40]=0,u[41]=0,u[42]=-1,u[43]=0,u[44]=0,u[45]=-1,u[46]=0,u[47]=0,u[48]=0,u[49]=1,u[50]=0,u[51]=0,u[52]=1,u[53]=0,u[54]=0,u[55]=1,u[56]=0,u[57]=0,u[58]=1,u[59]=0,u[60]=0,u[61]=-1,u[62]=0,u[63]=0,u[64]=-1,u[65]=0,u[66]=0,u[67]=-1,u[68]=0,u[69]=0,u[70]=-1,u[71]=0,o.normal=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:u})}if(i.st){let u=new Float32Array(48);u[0]=0,u[1]=0,u[2]=1,u[3]=0,u[4]=1,u[5]=1,u[6]=0,u[7]=1,u[8]=1,u[9]=0,u[10]=0,u[11]=0,u[12]=0,u[13]=1,u[14]=1,u[15]=1,u[16]=0,u[17]=0,u[18]=1,u[19]=0,u[20]=1,u[21]=1,u[22]=0,u[23]=1,u[24]=1,u[25]=0,u[26]=0,u[27]=0,u[28]=0,u[29]=1,u[30]=1,u[31]=1,u[32]=1,u[33]=0,u[34]=0,u[35]=0,u[36]=0,u[37]=1,u[38]=1,u[39]=1,u[40]=0,u[41]=0,u[42]=1,u[43]=0,u[44]=1,u[45]=1,u[46]=0,u[47]=1,o.st=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:u})}if(i.tangent){let u=new Float32Array(72);u[0]=1,u[1]=0,u[2]=0,u[3]=1,u[4]=0,u[5]=0,u[6]=1,u[7]=0,u[8]=0,u[9]=1,u[10]=0,u[11]=0,u[12]=-1,u[13]=0,u[14]=0,u[15]=-1,u[16]=0,u[17]=0,u[18]=-1,u[19]=0,u[20]=0,u[21]=-1,u[22]=0,u[23]=0,u[24]=0,u[25]=1,u[26]=0,u[27]=0,u[28]=1,u[29]=0,u[30]=0,u[31]=1,u[32]=0,u[33]=0,u[34]=1,u[35]=0,u[36]=0,u[37]=-1,u[38]=0,u[39]=0,u[40]=-1,u[41]=0,u[42]=0,u[43]=-1,u[44]=0,u[45]=0,u[46]=-1,u[47]=0,u[48]=-1,u[49]=0,u[50]=0,u[51]=-1,u[52]=0,u[53]=0,u[54]=-1,u[55]=0,u[56]=0,u[57]=-1,u[58]=0,u[59]=0,u[60]=1,u[61]=0,u[62]=0,u[63]=1,u[64]=0,u[65]=0,u[66]=1,u[67]=0,u[68]=0,u[69]=1,u[70]=0,u[71]=0,o.tangent=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:u})}if(i.bitangent){let u=new Float32Array(72);u[0]=0,u[1]=1,u[2]=0,u[3]=0,u[4]=1,u[5]=0,u[6]=0,u[7]=1,u[8]=0,u[9]=0,u[10]=1,u[11]=0,u[12]=0,u[13]=1,u[14]=0,u[15]=0,u[16]=1,u[17]=0,u[18]=0,u[19]=1,u[20]=0,u[21]=0,u[22]=1,u[23]=0,u[24]=0,u[25]=0,u[26]=1,u[27]=0,u[28]=0,u[29]=1,u[30]=0,u[31]=0,u[32]=1,u[33]=0,u[34]=0,u[35]=1,u[36]=0,u[37]=0,u[38]=1,u[39]=0,u[40]=0,u[41]=1,u[42]=0,u[43]=0,u[44]=1,u[45]=0,u[46]=0,u[47]=1,u[48]=0,u[49]=0,u[50]=1,u[51]=0,u[52]=0,u[53]=1,u[54]=0,u[55]=0,u[56]=1,u[57]=0,u[58]=0,u[59]=1,u[60]=0,u[61]=0,u[62]=1,u[63]=0,u[64]=0,u[65]=1,u[66]=0,u[67]=0,u[68]=1,u[69]=0,u[70]=0,u[71]=1,o.bitangent=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:u})}r=new Uint16Array(36),r[0]=0,r[1]=1,r[2]=2,r[3]=0,r[4]=2,r[5]=3,r[6]=6,r[7]=5,r[8]=4,r[9]=7,r[10]=6,r[11]=4,r[12]=8,r[13]=9,r[14]=10,r[15]=8,r[16]=10,r[17]=11,r[18]=14,r[19]=13,r[20]=12,r[21]=15,r[22]=14,r[23]=12,r[24]=18,r[25]=17,r[26]=16,r[27]=19,r[28]=18,r[29]=16,r[30]=20,r[31]=21,r[32]=22,r[33]=20,r[34]=22,r[35]=23}else a=new Float64Array(24),a[0]=t.x,a[1]=t.y,a[2]=t.z,a[3]=n.x,a[4]=t.y,a[5]=t.z,a[6]=n.x,a[7]=n.y,a[8]=t.z,a[9]=t.x,a[10]=n.y,a[11]=t.z,a[12]=t.x,a[13]=t.y,a[14]=n.z,a[15]=n.x,a[16]=t.y,a[17]=n.z,a[18]=n.x,a[19]=n.y,a[20]=n.z,a[21]=t.x,a[22]=n.y,a[23]=n.z,o.position=new Me({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:a}),r=new Uint16Array(36),r[0]=4,r[1]=5,r[2]=6,r[3]=4,r[4]=6,r[5]=7,r[6]=1,r[7]=0,r[8]=3,r[9]=1,r[10]=3,r[11]=2,r[12]=1,r[13]=6,r[14]=5,r[15]=1,r[16]=2,r[17]=6,r[18]=2,r[19]=3,r[20]=7,r[21]=2,r[22]=7,r[23]=6,r[24]=3,r[25]=0,r[26]=4,r[27]=3,r[28]=4,r[29]=7,r[30]=0,r[31]=1,r[32]=5,r[33]=0,r[34]=5,r[35]=4;let s=h.subtract(n,t,gFe),c=h.magnitude(s)*.5;if(l(e._offsetAttribute)){let u=a.length,f=e._offsetAttribute===ln.NONE?0:1,d=new Uint8Array(u/3).fill(f);o.applyOffset=new Me({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:d})}return new At({attributes:o,indices:r,primitiveType:Re.TRIANGLES,boundingSphere:new ce(h.ZERO,c),offsetAttribute:e._offsetAttribute})};var PW;df.getUnitBox=function(){return l(PW)||(PW=df.createGeometry(df.fromDimensions({dimensions:new h(1,1,1),vertexFormat:Ne.POSITION_ONLY}))),PW};var Ec=df;var mo={SCALAR:"SCALAR",VEC2:"VEC2",VEC3:"VEC3",VEC4:"VEC4",MAT2:"MAT2",MAT3:"MAT3",MAT4:"MAT4"};mo.getMathType=function(e){switch(e){case mo.SCALAR:return Number;case mo.VEC2:return z;case mo.VEC3:return h;case mo.VEC4:return se;case mo.MAT2:return Gi;case mo.MAT3:return $;case mo.MAT4:return M}};mo.getNumberOfComponents=function(e){switch(e){case mo.SCALAR:return 1;case mo.VEC2:return 2;case mo.VEC3:return 3;case mo.VEC4:case mo.MAT2:return 4;case mo.MAT3:return 9;case mo.MAT4:return 16}};mo.getAttributeLocationCount=function(e){switch(e){case mo.SCALAR:case mo.VEC2:case mo.VEC3:case mo.VEC4:return 1;case mo.MAT2:return 2;case mo.MAT3:return 3;case mo.MAT4:return 4}};mo.getGlslType=function(e){switch(e){case mo.SCALAR:return"float";case mo.VEC2:return"vec2";case mo.VEC3:return"vec3";case mo.VEC4:return"vec4";case mo.MAT2:return"mat2";case mo.MAT3:return"mat3";case mo.MAT4:return"mat4"}};Object.freeze(mo);var Ft=mo;var Rse=1/256,_Fe=65536,OW=256,To={};To.octEncodeInRange=function(e,t,n){if(n.x=e.x/(Math.abs(e.x)+Math.abs(e.y)+Math.abs(e.z)),n.y=e.y/(Math.abs(e.x)+Math.abs(e.y)+Math.abs(e.z)),e.z<0){let i=n.x,o=n.y;n.x=(1-Math.abs(o))*D.signNotZero(i),n.y=(1-Math.abs(i))*D.signNotZero(o)}return n.x=D.toSNorm(n.x,t),n.y=D.toSNorm(n.y,t),n};To.octEncode=function(e,t){return To.octEncodeInRange(e,255,t)};var _D=new z,Ose=new Uint8Array(1);function y8(e){return Ose[0]=e,Ose[0]}To.octEncodeToCartesian4=function(e,t){return To.octEncodeInRange(e,65535,_D),t.x=y8(_D.x*Rse),t.y=y8(_D.x),t.z=y8(_D.y*Rse),t.w=y8(_D.y),t};To.octDecodeInRange=function(e,t,n,i){if(i.x=D.fromSNorm(e,n),i.y=D.fromSNorm(t,n),i.z=1-(Math.abs(i.x)+Math.abs(i.y)),i.z<0){let o=i.x;i.x=(1-Math.abs(i.y))*D.signNotZero(o),i.y=(1-Math.abs(o))*D.signNotZero(i.y)}return h.normalize(i,i)};To.octDecode=function(e,t,n){return To.octDecodeInRange(e,t,255,n)};To.octDecodeFromCartesian4=function(e,t){let n=e.x,i=e.y,o=e.z,r=e.w,a=n*OW+i,s=o*OW+r;return To.octDecodeInRange(a,s,65535,t)};To.octPackFloat=function(e){return 256*e.x+e.y};var MW=new z;To.octEncodeFloat=function(e){return To.octEncode(e,MW),To.octPackFloat(MW)};To.octDecodeFloat=function(e,t){let n=e/256,i=Math.floor(n),o=(n-i)*256;return To.octDecode(i,o,t)};To.octPack=function(e,t,n,i){let o=To.octEncodeFloat(e),r=To.octEncodeFloat(t),a=To.octEncode(n,MW);return i.x=65536*a.x+o,i.y=65536*a.y+r,i};To.octUnpack=function(e,t,n,i){let o=e.x/65536,r=Math.floor(o),a=(o-r)*65536;o=e.y/65536;let s=Math.floor(o),c=(o-s)*65536;To.octDecodeFloat(a,t),To.octDecodeFloat(c,n),To.octDecode(r,s,i)};To.compressTextureCoordinates=function(e){let t=e.x*4095|0,n=e.y*4095|0;return 4096*t+n};To.decompressTextureCoordinates=function(e,t){let n=e/4096,i=Math.floor(n);return t.x=i/4095,t.y=(e-i*4096)/4095,t};function RW(e){return e>>1^-(e&1)}To.zigZagDeltaDecode=function(e,t,n){let i=e.length,o=0,r=0,a=0;for(let s=0;s<i;++s)o+=RW(e[s]),r+=RW(t[s]),e[s]=o,t[s]=r,l(n)&&(a+=RW(n[s]),n[s]=a)};To.dequantize=function(e,t,n,i){let o=Ft.getNumberOfComponents(n),r;switch(t){case Y.BYTE:r=127;break;case Y.UNSIGNED_BYTE:r=255;break;case Y.SHORT:r=32767;break;case Y.UNSIGNED_SHORT:r=65535;break;case Y.INT:r=2147483647;break;case Y.UNSIGNED_INT:r=4294967295;break}let a=new Float32Array(i*o);for(let s=0;s<i;s++)for(let c=0;c<o;c++){let u=s*o+c;a[u]=Math.max(e[u]/r,-1)}return a};To.encodeRGB8=function(e){return Math.round(D.clamp(e.red*255,0,255))*_Fe+Math.round(D.clamp(e.green*255,0,255))*OW+Math.round(D.clamp(e.blue*255,0,255))};To.decodeRGB8=function(e,t){return e=Math.floor(e),t.red=(e>>16&255)/255,t.green=(e>>8&255)/255,t.blue=(e&255)/255,t};To.decodeRGB565=function(e,t){let n=e.length;l(t)||(t=new Float32Array(n*3));let i=31,o=63,r=1/31,a=1/63;for(let s=0;s<n;s++){let c=e[s],u=c>>11,f=c>>5&o,d=c&i,p=3*s;t[p]=u*r,t[p+1]=f*a,t[p+2]=d*r}return t};var nn=To;var Mse=new h,Bse=new h,Lse=new h;function AFe(e,t,n,i,o){l(o)||(o=new h);let r,a,s,c,u,f,d,p;if(l(t.z)){if(h.equalsEpsilon(e,t,D.EPSILON14))return h.clone(h.UNIT_X,o);if(h.equalsEpsilon(e,n,D.EPSILON14))return h.clone(h.UNIT_Y,o);if(h.equalsEpsilon(e,i,D.EPSILON14))return h.clone(h.UNIT_Z,o);r=h.subtract(n,t,Mse),a=h.subtract(i,t,Bse),s=h.subtract(e,t,Lse),c=h.dot(r,r),u=h.dot(r,a),f=h.dot(r,s),d=h.dot(a,a),p=h.dot(a,s)}else{if(z.equalsEpsilon(e,t,D.EPSILON14))return h.clone(h.UNIT_X,o);if(z.equalsEpsilon(e,n,D.EPSILON14))return h.clone(h.UNIT_Y,o);if(z.equalsEpsilon(e,i,D.EPSILON14))return h.clone(h.UNIT_Z,o);r=z.subtract(n,t,Mse),a=z.subtract(i,t,Bse),s=z.subtract(e,t,Lse),c=z.dot(r,r),u=z.dot(r,a),f=z.dot(r,s),d=z.dot(a,a),p=z.dot(a,s)}o.y=d*f-u*p,o.z=c*p-u*f;let g=c*d-u*u;if(g!==0)return o.y/=g,o.z/=g,o.x=1-o.y-o.z,o}var bx=AFe;function lp(){this.high=h.clone(h.ZERO),this.low=h.clone(h.ZERO)}lp.encode=function(e,t){l(t)||(t={high:0,low:0});let n;return e>=0?(n=Math.floor(e/65536)*65536,t.high=n,t.low=e-n):(n=Math.floor(-e/65536)*65536,t.high=-n,t.low=e+n),t};var k0={high:0,low:0};lp.fromCartesian=function(e,t){l(t)||(t=new lp);let n=t.high,i=t.low;return lp.encode(e.x,k0),n.x=k0.high,i.x=k0.low,lp.encode(e.y,k0),n.y=k0.high,i.y=k0.low,lp.encode(e.z,k0),n.z=k0.high,i.z=k0.low,t};var BW=new lp;lp.writeElements=function(e,t,n){lp.fromCartesian(e,BW);let i=BW.high,o=BW.low;t[n]=i.x,t[n+1]=i.y,t[n+2]=i.z,t[n+3]=o.x,t[n+4]=o.y,t[n+5]=o.z};var xn=lp;var LW={};LW.computeDiscriminant=function(e,t,n){return t*t-4*e*n};function Nse(e,t,n){let i=e+t;return D.sign(e)!==D.sign(t)&&Math.abs(i/Math.max(Math.abs(e),Math.abs(t)))<n?0:i}LW.computeRealRoots=function(e,t,n){let i;if(e===0)return t===0?[]:[-n/t];if(t===0){if(n===0)return[0,0];let c=Math.abs(n),u=Math.abs(e);if(c<u&&c/u<D.EPSILON14)return[0,0];if(c>u&&u/c<D.EPSILON14)return[];if(i=-n/e,i<0)return[];let f=Math.sqrt(i);return[-f,f]}else if(n===0)return i=-t/e,i<0?[i,0]:[0,i];let o=t*t,r=4*e*n,a=Nse(o,-r,D.EPSILON14);if(a<0)return[];let s=-.5*Nse(t,D.sign(t)*Math.sqrt(a),D.EPSILON14);return t>0?[s/e,n/s]:[n/s,s/e]};var Pl=LW;var FW={};FW.computeDiscriminant=function(e,t,n,i){let o=e*e,r=t*t,a=n*n,s=i*i;return 18*e*t*n*i+r*a-27*o*s-4*(e*a*n+r*t*i)};function NW(e,t,n,i){let o=e,r=t/3,a=n/3,s=i,c=o*a,u=r*s,f=r*r,d=a*a,p=o*a-f,g=o*s-r*a,m=r*s-d,A=4*p*m-g*g,y,x;if(A<0){let H,q,J;f*u>=c*d?(H=o,q=p,J=-2*r*p+o*g):(H=s,q=m,J=-s*g+2*a*m);let Z=-(J<0?-1:1)*Math.abs(H)*Math.sqrt(-A);x=-J+Z;let K=x/2,le=K<0?-Math.pow(-K,1/3):Math.pow(K,1/3),me=x===Z?-le:-q/le;return y=q<=0?le+me:-J/(le*le+me*me+q),f*u>=c*d?[(y-r)/o]:[-s/(y+a)]}let b=p,C=-2*r*p+o*g,E=m,S=-s*g+2*a*m,w=Math.sqrt(A),P=Math.sqrt(3)/2,R=Math.abs(Math.atan2(o*w,-C)/3);y=2*Math.sqrt(-b);let B=Math.cos(R);x=y*B;let L=y*(-B/2-P*Math.sin(R)),_=x+L>2*r?x-r:L-r,T=o,v=_/T;R=Math.abs(Math.atan2(s*w,-S)/3),y=2*Math.sqrt(-E),B=Math.cos(R),x=y*B,L=y*(-B/2-P*Math.sin(R));let I=-s,O=x+L<2*a?x+a:L+a,N=I/O,j=T*O,k=-_*O-T*I,U=_*I,F=(a*k-r*U)/(-r*k+a*j);return v<=F?v<=N?F<=N?[v,F,N]:[v,N,F]:[N,v,F]:v<=N?[F,v,N]:F<=N?[F,N,v]:[N,F,v]}FW.computeRealRoots=function(e,t,n,i){let o,r;if(e===0)return Pl.computeRealRoots(t,n,i);if(t===0){if(n===0){if(i===0)return[0,0,0];r=-i/e;let a=r<0?-Math.pow(-r,1/3):Math.pow(r,1/3);return[a,a,a]}else if(i===0)return o=Pl.computeRealRoots(e,0,n),o.Length===0?[0]:[o[0],0,o[1]];return NW(e,0,n,i)}else{if(n===0)return i===0?(r=-t/e,r<0?[r,0,0]:[0,0,r]):NW(e,t,0,i);if(i===0)return o=Pl.computeRealRoots(e,t,n),o.length===0?[0]:o[1]<=0?[o[0],o[1],0]:o[0]>=0?[0,o[0],o[1]]:[o[0],0,o[1]]}return NW(e,t,n,i)};var Cx=FW;var kW={};kW.computeDiscriminant=function(e,t,n,i,o){let r=e*e,a=r*e,s=t*t,c=s*t,u=n*n,f=u*n,d=i*i,p=d*i,g=o*o,m=g*o;return s*u*d-4*c*p-4*e*f*d+18*e*t*n*p-27*r*d*d+256*a*m+o*(18*c*n*i-4*s*f+16*e*u*u-80*e*t*u*i-6*e*s*d+144*r*n*d)+g*(144*e*s*n-27*s*s-128*r*u-192*r*t*i)};function Dh(e,t,n,i){let o=e*e,r=t-3*o/8,a=n-t*e/2+o*e/8,s=i-n*e/4+t*o/16-3*o*o/256,c=Cx.computeRealRoots(1,2*r,r*r-4*s,-a*a);if(c.length>0){let u=-e/4,f=c[c.length-1];if(Math.abs(f)<D.EPSILON14){let d=Pl.computeRealRoots(1,r,s);if(d.length===2){let p=d[0],g=d[1],m;if(p>=0&&g>=0){let A=Math.sqrt(p),y=Math.sqrt(g);return[u-y,u-A,u+A,u+y]}else{if(p>=0&&g<0)return m=Math.sqrt(p),[u-m,u+m];if(p<0&&g>=0)return m=Math.sqrt(g),[u-m,u+m]}}return[]}else if(f>0){let d=Math.sqrt(f),p=(r+f-a/d)/2,g=(r+f+a/d)/2,m=Pl.computeRealRoots(1,d,p),A=Pl.computeRealRoots(1,-d,g);return m.length!==0?(m[0]+=u,m[1]+=u,A.length!==0?(A[0]+=u,A[1]+=u,m[1]<=A[0]?[m[0],m[1],A[0],A[1]]:A[1]<=m[0]?[A[0],A[1],m[0],m[1]]:m[0]>=A[0]&&m[1]<=A[1]?[A[0],m[0],m[1],A[1]]:A[0]>=m[0]&&A[1]<=m[1]?[m[0],A[0],A[1],m[1]]:m[0]>A[0]&&m[0]<A[1]?[A[0],m[0],A[1],m[1]]:[m[0],A[0],m[1],A[1]]):m):A.length!==0?(A[0]+=u,A[1]+=u,A):[]}}return[]}function AD(e,t,n,i){let o=n*n,r=t*t,a=e*e,s=-2*t,c=n*e+r-4*i,u=a*i-n*t*e+o,f=Cx.computeRealRoots(1,s,c,u);if(f.length>0){let d=f[0],p=t-d,g=p*p,m=e/2,A=p/2,y=g-4*i,x=g+4*Math.abs(i),b=a-4*d,C=a+4*Math.abs(d),E,S;if(d<0||y*C<b*x){let T=Math.sqrt(b);E=T/2,S=T===0?0:(e*A-n)/T}else{let T=Math.sqrt(y);E=T===0?0:(e*A-n)/T,S=T/2}let w,P;m===0&&E===0?(w=0,P=0):D.sign(m)===D.sign(E)?(w=m+E,P=d/w):(P=m-E,w=d/P);let R,B;A===0&&S===0?(R=0,B=0):D.sign(A)===D.sign(S)?(R=A+S,B=i/R):(B=A-S,R=i/B);let L=Pl.computeRealRoots(1,w,R),_=Pl.computeRealRoots(1,P,B);if(L.length!==0)return _.length!==0?L[1]<=_[0]?[L[0],L[1],_[0],_[1]]:_[1]<=L[0]?[_[0],_[1],L[0],L[1]]:L[0]>=_[0]&&L[1]<=_[1]?[_[0],L[0],L[1],_[1]]:_[0]>=L[0]&&_[1]<=L[1]?[L[0],_[0],_[1],L[1]]:L[0]>_[0]&&L[0]<_[1]?[_[0],L[0],_[1],L[1]]:[L[0],_[0],L[1],_[1]]:L;if(_.length!==0)return _}return[]}kW.computeRealRoots=function(e,t,n,i,o){if(Math.abs(e)<D.EPSILON15)return Cx.computeRealRoots(t,n,i,o);let r=t/e,a=n/e,s=i/e,c=o/e,u=r<0?1:0;switch(u+=a<0?u+1:u,u+=s<0?u+1:u,u+=c<0?u+1:u,u){case 0:return Dh(r,a,s,c);case 1:return AD(r,a,s,c);case 2:return AD(r,a,s,c);case 3:return Dh(r,a,s,c);case 4:return Dh(r,a,s,c);case 5:return AD(r,a,s,c);case 6:return Dh(r,a,s,c);case 7:return Dh(r,a,s,c);case 8:return AD(r,a,s,c);case 9:return Dh(r,a,s,c);case 10:return Dh(r,a,s,c);case 11:return AD(r,a,s,c);case 12:return Dh(r,a,s,c);case 13:return Dh(r,a,s,c);case 14:return Dh(r,a,s,c);case 15:return Dh(r,a,s,c);default:return}};var yD=kW;var zW=class e{constructor(t,n){n=h.clone(n??h.ZERO),h.equals(n,h.ZERO)||h.normalize(n,n),this.origin=h.clone(t??h.ZERO),this.direction=n}static clone(t,n){if(l(t))return l(n)?(n.origin=h.clone(t.origin),n.direction=h.clone(t.direction),n):new e(t.origin,t.direction)}static getPoint(t,n,i){return l(i)||(i=new h),i=h.multiplyByScalar(t.direction,n,i),h.add(t.origin,i,i)}},gn=zW;var Qo={};Qo.rayPlane=function(e,t,n){l(n)||(n=new h);let i=e.origin,o=e.direction,r=t.normal,a=h.dot(r,o);if(Math.abs(a)<D.EPSILON15)return;let s=(-t.distance-h.dot(r,i))/a;if(!(s<0))return n=h.multiplyByScalar(o,s,n),h.add(i,n,n)};var yFe=new h,xFe=new h,Hse=new h,Fse=new h,kse=new h;Qo.rayTriangleParametric=function(e,t,n,i,o){o=o??!1;let r=e.origin,a=e.direction,s=h.subtract(n,t,yFe),c=h.subtract(i,t,xFe),u=h.cross(a,c,Hse),f=h.dot(s,u),d,p,g,m,A;if(o){if(f<D.EPSILON6||(d=h.subtract(r,t,Fse),g=h.dot(d,u),g<0||g>f)||(p=h.cross(d,s,kse),m=h.dot(a,p),m<0||g+m>f))return;A=h.dot(c,p)/f}else{if(Math.abs(f)<D.EPSILON6)return;let y=1/f;if(d=h.subtract(r,t,Fse),g=h.dot(d,u)*y,g<0||g>1||(p=h.cross(d,s,kse),m=h.dot(a,p)*y,m<0||g+m>1))return;A=h.dot(c,p)*y}return A};Qo.rayTriangle=function(e,t,n,i,o,r){let a=Qo.rayTriangleParametric(e,t,n,i,o);if(!(!l(a)||a<0))return l(r)||(r=new h),h.multiplyByScalar(e.direction,a,r),h.add(e.origin,r,r)};var bFe=new gn;Qo.lineSegmentTriangle=function(e,t,n,i,o,r,a){let s=bFe;h.clone(e,s.origin),h.subtract(t,e,s.direction),h.normalize(s.direction,s.direction);let c=Qo.rayTriangleParametric(s,n,i,o,r);if(!(!l(c)||c<0||c>h.distance(e,t)))return l(a)||(a=new h),h.multiplyByScalar(s.direction,c,a),h.add(s.origin,a,a)};function CFe(e,t,n,i){let o=t*t-4*e*n;if(o<0)return;if(o>0){let a=1/(2*e),s=Math.sqrt(o),c=(-t+s)*a,u=(-t-s)*a;return c<u?(i.root0=c,i.root1=u):(i.root0=u,i.root1=c),i}let r=-t/(2*e);if(r!==0)return i.root0=i.root1=r,i}var TFe={root0:0,root1:0};function Wse(e,t,n){l(n)||(n=new Qr);let i=e.origin,o=e.direction,r=t.center,a=t.radius*t.radius,s=h.subtract(i,r,Hse),c=h.dot(o,o),u=2*h.dot(o,s),f=h.magnitudeSquared(s)-a,d=CFe(c,u,f,TFe);if(l(d))return n.start=d.root0,n.stop=d.root1,n}Qo.raySphere=function(e,t,n){if(n=Wse(e,t,n),!(!l(n)||n.stop<0))return n.start=Math.max(n.start,0),n};var EFe=new gn;Qo.lineSegmentSphere=function(e,t,n,i){let o=EFe;h.clone(e,o.origin);let r=h.subtract(t,e,o.direction),a=h.magnitude(r);if(h.normalize(r,r),i=Wse(o,n,i),!(!l(i)||i.stop<0||i.start>a))return i.start=Math.max(i.start,0),i.stop=Math.min(i.stop,a),i};var vFe=new h,SFe=new h;Qo.rayEllipsoid=function(e,t){let n=t.oneOverRadii,i=h.multiplyComponents(n,e.origin,vFe),o=h.multiplyComponents(n,e.direction,SFe),r=h.magnitudeSquared(i),a=h.dot(i,o),s,c,u,f,d;if(r>1){if(a>=0)return;let p=a*a;if(s=r-1,c=h.magnitudeSquared(o),u=c*s,p<u)return;if(p>u){f=a*a-u,d=-a+Math.sqrt(f);let m=d/c,A=s/d;return m<A?new Qr(m,A):{start:A,stop:m}}let g=Math.sqrt(s/c);return new Qr(g,g)}else if(r<1)return s=r-1,c=h.magnitudeSquared(o),u=c*s,f=a*a-u,d=-a+Math.sqrt(f),new Qr(0,d/c);if(a<0)return c=h.magnitudeSquared(o),new Qr(0,-a/c)};var wFe=new Qr,IFe=new Qr,DFe=new Qr;Qo.rayAxisAlignedBoundingBox=function(e,t,n){l(n)||(n=new Qr);let i=UW(e.origin.x,e.direction.x,t.minimum.x,t.maximum.x,wFe),o=UW(e.origin.y,e.direction.y,t.minimum.y,t.maximum.y,IFe),r=UW(e.origin.z,e.direction.z,t.minimum.z,t.maximum.z,DFe);if(n.start=i.start>o.start?i.start:o.start,n.stop=i.stop<o.stop?i.stop:o.stop,!(i.start>o.stop||o.start>i.stop)&&!(n.start>r.stop||r.start>n.stop))return r.start>n.start&&(n.start=r.start),r.stop<n.stop&&(n.stop=r.stop),n};function UW(e,t,n,i,o){if(o.start=(n-e)/t,o.stop=(i-e)/t,o.stop<o.start){let r=o.stop;o.stop=o.start,o.start=r}return o}function Tx(e,t,n){let i=e+t;return D.sign(e)!==D.sign(t)&&Math.abs(i/Math.max(Math.abs(e),Math.abs(t)))<n?0:i}Qo.quadraticVectorExpression=function(e,t,n,i,o){let r=i*i,a=o*o,s=(e[$.COLUMN1ROW1]-e[$.COLUMN2ROW2])*a,c=o*(i*Tx(e[$.COLUMN1ROW0],e[$.COLUMN0ROW1],D.EPSILON15)+t.y),u=e[$.COLUMN0ROW0]*r+e[$.COLUMN2ROW2]*a+i*t.x+n,f=a*Tx(e[$.COLUMN2ROW1],e[$.COLUMN1ROW2],D.EPSILON15),d=o*(i*Tx(e[$.COLUMN2ROW0],e[$.COLUMN0ROW2])+t.z),p,g=[];if(d===0&&f===0){if(p=Pl.computeRealRoots(s,c,u),p.length===0)return g;let R=p[0],B=Math.sqrt(Math.max(1-R*R,0));if(g.push(new h(i,o*R,o*-B)),g.push(new h(i,o*R,o*B)),p.length===2){let L=p[1],_=Math.sqrt(Math.max(1-L*L,0));g.push(new h(i,o*L,o*-_)),g.push(new h(i,o*L,o*_))}return g}let m=d*d,A=f*f,y=s*s,x=d*f,b=y+A,C=2*(c*s+x),E=2*u*s+c*c-A+m,S=2*(u*c-x),w=u*u-m;if(b===0&&C===0&&E===0&&S===0)return g;p=yD.computeRealRoots(b,C,E,S,w);let P=p.length;if(P===0)return g;for(let R=0;R<P;++R){let B=p[R],L=B*B,_=Math.max(1-L,0),T=Math.sqrt(_),v;D.sign(s)===D.sign(u)?v=Tx(s*L+u,c*B,D.EPSILON12):D.sign(u)===D.sign(c*B)?v=Tx(s*L,c*B+u,D.EPSILON12):v=Tx(s*L+c*B,u,D.EPSILON12);let I=Tx(f*B,d,D.EPSILON15),O=v*I;O<0?g.push(new h(i,o*B,o*T)):O>0?g.push(new h(i,o*B,o*-T)):T!==0?(g.push(new h(i,o*B,o*-T)),g.push(new h(i,o*B,o*T)),++R):g.push(new h(i,o*B,o*T))}return g};var VW=new h,zse=new h,Use=new h,x8=new h,PFe=new h,RFe=new $,OFe=new $,MFe=new $,BFe=new $,LFe=new $,Vse=new $,jse=new $,Gse=new h,NFe=new h,FFe=new de;Qo.grazingAltitudeLocation=function(e,t){let n=e.origin,i=e.direction;if(!h.equals(n,h.ZERO)){let w=t.geodeticSurfaceNormal(n,VW);if(h.dot(i,w)>=0)return n}let o=l(this.rayEllipsoid(e,t)),r=t.transformPositionToScaledSpace(i,VW),a=h.normalize(r,r),s=h.mostOrthogonalAxis(r,x8),c=h.normalize(h.cross(s,a,zse),zse),u=h.normalize(h.cross(a,c,Use),Use),f=RFe;f[0]=a.x,f[1]=a.y,f[2]=a.z,f[3]=c.x,f[4]=c.y,f[5]=c.z,f[6]=u.x,f[7]=u.y,f[8]=u.z;let d=$.transpose(f,OFe),p=$.fromScale(t.radii,MFe),g=$.fromScale(t.oneOverRadii,BFe),m=LFe;m[0]=0,m[1]=-i.z,m[2]=i.y,m[3]=i.z,m[4]=0,m[5]=-i.x,m[6]=-i.y,m[7]=i.x,m[8]=0;let A=$.multiply($.multiply(d,g,Vse),m,Vse),y=$.multiply($.multiply(A,p,jse),f,jse),x=$.multiplyByVector(A,n,PFe),b=Qo.quadraticVectorExpression(y,h.negate(x,VW),0,0,1),C,E,S=b.length;if(S>0){let w=h.clone(h.ZERO,NFe),P=Number.NEGATIVE_INFINITY;for(let B=0;B<S;++B){C=$.multiplyByVector(p,$.multiplyByVector(f,b[B],Gse),Gse);let L=h.normalize(h.subtract(C,n,x8),x8),_=h.dot(L,i);_>P&&(P=_,w=h.clone(C,w))}let R=t.cartesianToCartographic(w,FFe);return P=D.clamp(P,0,1),E=h.magnitude(h.subtract(w,n,x8))*Math.sqrt(1-P*P),E=o?-E:E,R.height=E,t.cartographicToCartesian(R,new h)}};var kFe=new h;Qo.lineSegmentPlane=function(e,t,n,i){l(i)||(i=new h);let o=h.subtract(t,e,kFe),r=n.normal,a=h.dot(r,o);if(Math.abs(a)<D.EPSILON6)return;let s=h.dot(r,e),c=-(n.distance+s)/a;if(!(c<0||c>1))return h.multiplyByScalar(o,c,i),h.add(e,i,i),i};Qo.trianglePlaneIntersection=function(e,t,n,i){let o=i.normal,r=i.distance,a=h.dot(o,e)+r<0,s=h.dot(o,t)+r<0,c=h.dot(o,n)+r<0,u=0;u+=a?1:0,u+=s?1:0,u+=c?1:0;let f,d;if((u===1||u===2)&&(f=new h,d=new h),u===1){if(a)return Qo.lineSegmentPlane(e,t,i,f),Qo.lineSegmentPlane(e,n,i,d),{positions:[e,t,n,f,d],indices:[0,3,4,1,2,4,1,4,3]};if(s)return Qo.lineSegmentPlane(t,n,i,f),Qo.lineSegmentPlane(t,e,i,d),{positions:[e,t,n,f,d],indices:[1,3,4,2,0,4,2,4,3]};if(c)return Qo.lineSegmentPlane(n,e,i,f),Qo.lineSegmentPlane(n,t,i,d),{positions:[e,t,n,f,d],indices:[2,3,4,0,1,4,0,4,3]}}else if(u===2)if(a)if(s){if(!c)return Qo.lineSegmentPlane(e,n,i,f),Qo.lineSegmentPlane(t,n,i,d),{positions:[e,t,n,f,d],indices:[0,1,4,0,4,3,2,3,4]}}else return Qo.lineSegmentPlane(n,t,i,f),Qo.lineSegmentPlane(e,t,i,d),{positions:[e,t,n,f,d],indices:[2,0,4,2,4,3,1,3,4]};else return Qo.lineSegmentPlane(t,e,i,f),Qo.lineSegmentPlane(n,e,i,d),{positions:[e,t,n,f,d],indices:[1,2,4,1,4,3,0,3,4]}};var si=Qo;function Ds(e,t){this.normal=h.clone(e),this.distance=t}Ds.fromPointNormal=function(e,t,n){let i=-h.dot(t,e);return l(n)?(h.clone(t,n.normal),n.distance=i,n):new Ds(t,i)};var zFe=new h;Ds.fromCartesian4=function(e,t){let n=h.fromCartesian4(e,zFe),i=e.w;return l(t)?(h.clone(n,t.normal),t.distance=i,t):new Ds(n,i)};Ds.getPointDistance=function(e,t){return h.dot(e.normal,t)+e.distance};var UFe=new h;Ds.projectPointOntoPlane=function(e,t,n){l(n)||(n=new h);let i=Ds.getPointDistance(e,t),o=h.multiplyByScalar(e.normal,i,UFe);return h.subtract(t,o,n)};var VFe=new M,jFe=new se,GFe=new h;Ds.transform=function(e,t,n){let i=e.normal,o=e.distance,r=M.inverseTranspose(t,VFe),a=se.fromElements(i.x,i.y,i.z,o,jFe);a=M.multiplyByVector(r,a,a);let s=h.fromCartesian4(a,GFe);return a=se.divideByScalar(a,h.magnitude(s),a),Ds.fromCartesian4(a,n)};Ds.clone=function(e,t){return l(t)?(h.clone(e.normal,t.normal),t.distance=e.distance,t):new Ds(e.normal,e.distance)};Ds.equals=function(e,t){return e.distance===t.distance&&h.equals(e.normal,t.normal)};Ds.ORIGIN_XY_PLANE=Object.freeze(new Ds(h.UNIT_Z,0));Ds.ORIGIN_YZ_PLANE=Object.freeze(new Ds(h.UNIT_X,0));Ds.ORIGIN_ZX_PLANE=Object.freeze(new Ds(h.UNIT_Y,0));var en=Ds;var jW={};jW.calculateACMR=function(e){e=e??G.EMPTY_OBJECT;let t=e.indices,n=e.maximumIndex,i=e.cacheSize??24,o=t.length;if(!l(n)){n=0;let s=0,c=t[s];for(;s<o;)c>n&&(n=c),++s,c=t[s]}let r=[];for(let s=0;s<n+1;s++)r[s]=0;let a=i+1;for(let s=0;s<o;++s)a-r[t[s]]>i&&(r[t[s]]=a,++a);return(a-i+1)/(o/3)};jW.tipsify=function(e){e=e??G.EMPTY_OBJECT;let t=e.indices,n=e.maximumIndex,i=e.cacheSize??24,o;function r(_,T,v,I){for(;T.length>=1;){let O=T[T.length-1];if(T.splice(T.length-1,1),_[O].numLiveTriangles>0)return O}for(;o<I;){if(_[o].numLiveTriangles>0)return++o,o-1;++o}return-1}function a(_,T,v,I,O,N,j){let k=-1,U,F=-1,H=0;for(;H<v.length;){let q=v[H];I[q].numLiveTriangles&&(U=0,O-I[q].timeStamp+2*I[q].numLiveTriangles<=T&&(U=O-I[q].timeStamp),(U>F||F===-1)&&(F=U,k=q)),++H}return k===-1?r(I,N,_,j):k}let s=t.length,c=0,u=0,f=t[u],d=s;if(l(n))c=n+1;else{for(;u<d;)f>c&&(c=f),++u,f=t[u];if(c===-1)return 0;++c}let p=[],g;for(g=0;g<c;g++)p[g]={numLiveTriangles:0,timeStamp:0,vertexTriangles:[]};u=0;let m=0;for(;u<d;)p[t[u]].vertexTriangles.push(m),++p[t[u]].numLiveTriangles,p[t[u+1]].vertexTriangles.push(m),++p[t[u+1]].numLiveTriangles,p[t[u+2]].vertexTriangles.push(m),++p[t[u+2]].numLiveTriangles,++m,u+=3;let A=0,y=i+1;o=1;let x=[],b=[],C,E,S=0,w=[],P=s/3,R=[];for(g=0;g<P;g++)R[g]=!1;let B,L;for(;A!==-1;){x=[],E=p[A],L=E.vertexTriangles.length;for(let _=0;_<L;++_)if(m=E.vertexTriangles[_],!R[m]){R[m]=!0,u=m+m+m;for(let T=0;T<3;++T)B=t[u],x.push(B),b.push(B),w[S]=B,++S,C=p[B],--C.numLiveTriangles,y-C.timeStamp>i&&(C.timeStamp=y,++y),++u}A=a(t,i,x,p,y,b,c)}return w};var xD=jW;var Rl={};function w8(e,t,n,i,o){e[t++]=n,e[t++]=i,e[t++]=i,e[t++]=o,e[t++]=o,e[t]=n}function HFe(e){let t=e.length,n=t/3*6,i=Ue.createTypedArray(t,n),o=0;for(let r=0;r<t;r+=3,o+=6)w8(i,o,e[r],e[r+1],e[r+2]);return i}function WFe(e){let t=e.length;if(t>=3){let n=(t-2)*6,i=Ue.createTypedArray(t,n);w8(i,0,e[0],e[1],e[2]);let o=6;for(let r=3;r<t;++r,o+=6)w8(i,o,e[r-1],e[r],e[r-2]);return i}return new Uint16Array}function qFe(e){if(e.length>0){let t=e.length-1,n=(t-1)*6,i=Ue.createTypedArray(t,n),o=e[0],r=0;for(let a=1;a<t;++a,r+=6)w8(i,r,o,e[a],e[a+1]);return i}return new Uint16Array}Rl.toWireframe=function(e){let t=e.indices;if(l(t)){switch(e.primitiveType){case Re.TRIANGLES:e.indices=HFe(t);break;case Re.TRIANGLE_STRIP:e.indices=WFe(t);break;case Re.TRIANGLE_FAN:e.indices=qFe(t);break}e.primitiveType=Re.LINES}return e};Rl.createLineSegmentsForVectors=function(e,t,n){t=t??"normal",n=n??1e4;let i=e.attributes.position.values,o=e.attributes[t].values,r=i.length,a=new Float64Array(2*r),s=0;for(let f=0;f<r;f+=3)a[s++]=i[f],a[s++]=i[f+1],a[s++]=i[f+2],a[s++]=i[f]+o[f]*n,a[s++]=i[f+1]+o[f+1]*n,a[s++]=i[f+2]+o[f+2]*n;let c,u=e.boundingSphere;return l(u)&&(c=new ce(u.center,u.radius+n)),new At({attributes:{position:new Me({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:a})},primitiveType:Re.LINES,boundingSphere:c})};Rl.createAttributeLocations=function(e){let t=["position","positionHigh","positionLow","position3DHigh","position3DLow","position2DHigh","position2DLow","pickColor","normal","st","tangent","bitangent","extrudeDirection","compressedAttributes"],n=e.attributes,i={},o=0,r,a=t.length;for(r=0;r<a;++r){let s=t[r];l(n[s])&&(i[s]=o++)}for(let s in n)n.hasOwnProperty(s)&&!l(i[s])&&(i[s]=o++);return i};Rl.reorderForPreVertexCache=function(e){let t=At.computeNumberOfVertices(e),n=e.indices;if(l(n)){let i=new Int32Array(t);for(let p=0;p<t;p++)i[p]=-1;let o=n,r=o.length,a=Ue.createTypedArray(t,r),s=0,c=0,u=0,f;for(;s<r;)f=i[o[s]],f!==-1?a[c]=f:(f=o[s],i[f]=u,a[c]=u,++u),++s,++c;e.indices=a;let d=e.attributes;for(let p in d)if(d.hasOwnProperty(p)&&l(d[p])&&l(d[p].values)){let g=d[p],m=g.values,A=0,y=g.componentsPerAttribute,x=Y.createTypedArray(g.componentDatatype,u*y);for(;A<t;){let b=i[A];if(b!==-1)for(let C=0;C<y;C++)x[y*b+C]=m[y*A+C];++A}g.values=x}}return e};Rl.reorderForPostVertexCache=function(e,t){let n=e.indices;if(e.primitiveType===Re.TRIANGLES&&l(n)){let i=n.length,o=0;for(let r=0;r<i;r++)n[r]>o&&(o=n[r]);e.indices=xD.tipsify({indices:n,maximumIndex:o,cacheSize:t})}return e};function qse(e){let t={};for(let n in e)if(e.hasOwnProperty(n)&&l(e[n])&&l(e[n].values)){let i=e[n];t[n]=new Me({componentDatatype:i.componentDatatype,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize,values:[]})}return t}function YFe(e,t,n){for(let i in t)if(t.hasOwnProperty(i)&&l(t[i])&&l(t[i].values)){let o=t[i];for(let r=0;r<o.componentsPerAttribute;++r)e[i].values.push(o.values[n*o.componentsPerAttribute+r])}}Rl.fitToUnsignedShortIndices=function(e){let t=[],n=At.computeNumberOfVertices(e);if(l(e.indices)&&n>=D.SIXTY_FOUR_KILOBYTES){let i=[],o=[],r=0,a=qse(e.attributes),s=e.indices,c=s.length,u;e.primitiveType===Re.TRIANGLES?u=3:e.primitiveType===Re.LINES?u=2:e.primitiveType===Re.POINTS&&(u=1);for(let f=0;f<c;f+=u){for(let d=0;d<u;++d){let p=s[f+d],g=i[p];l(g)||(g=r++,i[p]=g,YFe(a,e.attributes,p)),o.push(g)}r+u>=D.SIXTY_FOUR_KILOBYTES&&(t.push(new At({attributes:a,indices:o,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV})),i=[],o=[],r=0,a=qse(e.attributes))}o.length!==0&&t.push(new At({attributes:a,indices:o,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV}))}else t.push(e);return t};var Yse=new h,XFe=new de;Rl.projectTo2D=function(e,t,n,i,o){let r=e.attributes[t];o=l(o)?o:new ji;let a=o.ellipsoid,s=r.values,c=new Float64Array(s.length),u=0;for(let f=0;f<s.length;f+=3){let d=h.fromArray(s,f,Yse),p=a.cartesianToCartographic(d,XFe),g=o.project(p,Yse);c[u++]=g.x,c[u++]=g.y,c[u++]=g.z}return e.attributes[n]=r,e.attributes[i]=new Me({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:c}),delete e.attributes[t],e};var GW={high:0,low:0};Rl.encodeAttribute=function(e,t,n,i){let o=e.attributes[t],r=o.values,a=r.length,s=new Float32Array(a),c=new Float32Array(a);for(let f=0;f<a;++f)xn.encode(r[f],GW),s[f]=GW.high,c[f]=GW.low;let u=o.componentsPerAttribute;return e.attributes[n]=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:u,values:s}),e.attributes[i]=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:u,values:c}),delete e.attributes[t],e};var Rh=new h;function HW(e,t){if(l(t)){let n=t.values,i=n.length;for(let o=0;o<i;o+=3)h.unpack(n,o,Rh),M.multiplyByPoint(e,Rh,Rh),h.pack(Rh,n,o)}}function WW(e,t){if(l(t)){let n=t.values,i=n.length;for(let o=0;o<i;o+=3)h.unpack(n,o,Rh),$.multiplyByVector(e,Rh,Rh),Rh=h.normalize(Rh,Rh),h.pack(Rh,n,o)}}var b8=new M,C8=new $;Rl.transformToWorldCoordinates=function(e){let t=e.modelMatrix;if(M.equals(t,M.IDENTITY))return e;let n=e.geometry.attributes;HW(t,n.position),HW(t,n.prevPosition),HW(t,n.nextPosition),(l(n.normal)||l(n.tangent)||l(n.bitangent))&&(M.inverse(t,b8),M.transpose(b8,b8),M.getMatrix3(b8,C8),WW(C8,n.normal),WW(C8,n.tangent),WW(C8,n.bitangent));let i=e.geometry.boundingSphere;return l(i)&&(e.geometry.boundingSphere=ce.transform(i,t,i)),e.modelMatrix=M.clone(M.IDENTITY),e};function KFe(e,t){let n=e.length,i={},o=e[0][t].attributes,r;for(r in o)if(o.hasOwnProperty(r)&&l(o[r])&&l(o[r].values)){let a=o[r],s=a.values.length,c=!0;for(let u=1;u<n;++u){let f=e[u][t].attributes[r];if(!l(f)||a.componentDatatype!==f.componentDatatype||a.componentsPerAttribute!==f.componentsPerAttribute||a.normalize!==f.normalize){c=!1;break}s+=f.values.length}c&&(i[r]=new Me({componentDatatype:a.componentDatatype,componentsPerAttribute:a.componentsPerAttribute,normalize:a.normalize,values:Y.createTypedArray(a.componentDatatype,s)}))}return i}var QFe=new h;function qW(e,t){let n=e.length,i,o,r,a,s=e[0].modelMatrix,c=l(e[0][t].indices),u=e[0][t].primitiveType,f=KFe(e,t),d,p,g;for(i in f)if(f.hasOwnProperty(i))for(d=f[i].values,a=0,o=0;o<n;++o)for(p=e[o][t].attributes[i].values,g=p.length,r=0;r<g;++r)d[a++]=p[r];let m;if(c){let b=0;for(o=0;o<n;++o)b+=e[o][t].indices.length;let C=At.computeNumberOfVertices(new At({attributes:f,primitiveType:Re.POINTS})),E=Ue.createTypedArray(C,b),S=0,w=0;for(o=0;o<n;++o){let P=e[o][t].indices,R=P.length;for(a=0;a<R;++a)E[S++]=w+P[a];w+=At.computeNumberOfVertices(e[o][t])}m=E}let A=new h,y=0,x;for(o=0;o<n;++o){if(x=e[o][t].boundingSphere,!l(x)){A=void 0;break}h.add(x.center,A,A)}if(l(A))for(h.divideByScalar(A,n,A),o=0;o<n;++o){x=e[o][t].boundingSphere;let b=h.magnitude(h.subtract(x.center,A,QFe))+x.radius;b>y&&(y=b)}return new At({attributes:f,indices:m,primitiveType:u,boundingSphere:l(A)?new ce(A,y):void 0})}Rl.combineInstances=function(e){let t=[],n=[],i=e.length;for(let r=0;r<i;++r){let a=e[r];l(a.geometry)?t.push(a):l(a.westHemisphereGeometry)&&l(a.eastHemisphereGeometry)&&n.push(a)}let o=[];return t.length>0&&o.push(qW(t,"geometry")),n.length>0&&(o.push(qW(n,"westHemisphereGeometry")),o.push(qW(n,"eastHemisphereGeometry"))),o};var pd=new h,bD=new h,EE=new h,vE=new h;Rl.computeNormal=function(e){let t=e.indices,n=e.attributes,i=n.position.values,o=n.position.values.length/3,r=t.length,a=new Array(o),s=new Array(r/3),c=new Array(r),u;for(u=0;u<o;u++)a[u]={indexOffset:0,count:0,currentCount:0};let f=0;for(u=0;u<r;u+=3){let m=t[u],A=t[u+1],y=t[u+2],x=m*3,b=A*3,C=y*3;bD.x=i[x],bD.y=i[x+1],bD.z=i[x+2],EE.x=i[b],EE.y=i[b+1],EE.z=i[b+2],vE.x=i[C],vE.y=i[C+1],vE.z=i[C+2],a[m].count++,a[A].count++,a[y].count++,h.subtract(EE,bD,EE),h.subtract(vE,bD,vE),s[f]=h.cross(EE,vE,new h),f++}let d=0;for(u=0;u<o;u++)a[u].indexOffset+=d,d+=a[u].count;f=0;let p;for(u=0;u<r;u+=3){p=a[t[u]];let m=p.indexOffset+p.currentCount;c[m]=f,p.currentCount++,p=a[t[u+1]],m=p.indexOffset+p.currentCount,c[m]=f,p.currentCount++,p=a[t[u+2]],m=p.indexOffset+p.currentCount,c[m]=f,p.currentCount++,f++}let g=new Float32Array(o*3);for(u=0;u<o;u++){let m=u*3;if(p=a[u],h.clone(h.ZERO,pd),p.count>0){for(f=0;f<p.count;f++)h.add(pd,s[c[p.indexOffset+f]],pd);h.equalsEpsilon(h.ZERO,pd,D.EPSILON10)&&h.clone(s[c[p.indexOffset]],pd)}h.equalsEpsilon(h.ZERO,pd,D.EPSILON10)&&(pd.z=1),h.normalize(pd,pd),g[m]=pd.x,g[m+1]=pd.y,g[m+2]=pd.z}return e.attributes.normal=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:g}),e};var $Fe=new h,Xse=new h,JFe=new h;Rl.computeTangentAndBitangent=function(e){let t=e.attributes,n=e.indices,i=e.attributes.position.values,o=e.attributes.normal.values,r=e.attributes.st.values,a=e.attributes.position.values.length/3,s=n.length,c=new Array(a*3),u;for(u=0;u<c.length;u++)c[u]=0;let f,d,p;for(u=0;u<s;u+=3){let A=n[u],y=n[u+1],x=n[u+2];f=A*3,d=y*3,p=x*3;let b=A*2,C=y*2,E=x*2,S=i[f],w=i[f+1],P=i[f+2],R=r[b],B=r[b+1],L=r[C+1]-B,_=r[E+1]-B,T=1/((r[C]-R)*_-(r[E]-R)*L),v=(_*(i[d]-S)-L*(i[p]-S))*T,I=(_*(i[d+1]-w)-L*(i[p+1]-w))*T,O=(_*(i[d+2]-P)-L*(i[p+2]-P))*T;c[f]+=v,c[f+1]+=I,c[f+2]+=O,c[d]+=v,c[d+1]+=I,c[d+2]+=O,c[p]+=v,c[p+1]+=I,c[p+2]+=O}let g=new Float32Array(a*3),m=new Float32Array(a*3);for(u=0;u<a;u++){f=u*3,d=f+1,p=f+2;let A=h.fromArray(o,f,$Fe),y=h.fromArray(c,f,JFe),x=h.dot(A,y);h.multiplyByScalar(A,x,Xse),h.normalize(h.subtract(y,Xse,y),y),g[f]=y.x,g[d]=y.y,g[p]=y.z,h.normalize(h.cross(A,y,y),y),m[f]=y.x,m[d]=y.y,m[p]=y.z}return e.attributes.tangent=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:g}),e.attributes.bitangent=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:m}),e};var CD=new z,Ph=new h,Kse=new h,Qse=new h,T8=new z;Rl.compressVertices=function(e){let t=e.attributes.extrudeDirection,n,i;if(l(t)){let w=t.values;i=w.length/3;let P=new Float32Array(i*2),R=0;for(n=0;n<i;++n){if(h.fromArray(w,n*3,Ph),h.equals(Ph,h.ZERO)){R+=2;continue}T8=nn.octEncodeInRange(Ph,65535,T8),P[R++]=T8.x,P[R++]=T8.y}return e.attributes.compressedAttributes=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:P}),delete e.attributes.extrudeDirection,e}let o=e.attributes.normal,r=e.attributes.st,a=l(o),s=l(r);if(!a&&!s)return e;let c=e.attributes.tangent,u=e.attributes.bitangent,f=l(c),d=l(u),p,g,m,A;a&&(p=o.values),s&&(g=r.values),f&&(m=c.values),d&&(A=u.values),i=(a?p.length:g.length)/(a?3:2);let b=i,C=s&&a?2:1;C+=f||d?1:0,b*=C;let E=new Float32Array(b),S=0;for(n=0;n<i;++n){s&&(z.fromArray(g,n*2,CD),E[S++]=nn.compressTextureCoordinates(CD));let w=n*3;a&&l(m)&&l(A)?(h.fromArray(p,w,Ph),h.fromArray(m,w,Kse),h.fromArray(A,w,Qse),nn.octPack(Ph,Kse,Qse,CD),E[S++]=CD.x,E[S++]=CD.y):(a&&(h.fromArray(p,w,Ph),E[S++]=nn.octEncodeFloat(Ph)),f&&(h.fromArray(m,w,Ph),E[S++]=nn.octEncodeFloat(Ph)),d&&(h.fromArray(A,w,Ph),E[S++]=nn.octEncodeFloat(Ph)))}return e.attributes.compressedAttributes=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:C,values:E}),a&&delete e.attributes.normal,s&&delete e.attributes.st,d&&delete e.attributes.bitangent,f&&delete e.attributes.tangent,e};function ZFe(e){if(l(e.indices))return e;let t=At.computeNumberOfVertices(e),n=Ue.createTypedArray(t,t);for(let i=0;i<t;++i)n[i]=i;return e.indices=n,e}function e2e(e){let t=At.computeNumberOfVertices(e),n=Ue.createTypedArray(t,(t-2)*3);n[0]=1,n[1]=0,n[2]=2;let i=3;for(let o=3;o<t;++o)n[i++]=o-1,n[i++]=0,n[i++]=o;return e.indices=n,e.primitiveType=Re.TRIANGLES,e}function t2e(e){let t=At.computeNumberOfVertices(e),n=Ue.createTypedArray(t,(t-2)*3);n[0]=0,n[1]=1,n[2]=2,t>3&&(n[3]=0,n[4]=2,n[5]=3);let i=6;for(let o=3;o<t-1;o+=2)n[i++]=o,n[i++]=o-1,n[i++]=o+1,o+2<t&&(n[i++]=o,n[i++]=o+1,n[i++]=o+2);return e.indices=n,e.primitiveType=Re.TRIANGLES,e}function n2e(e){if(l(e.indices))return e;let t=At.computeNumberOfVertices(e),n=Ue.createTypedArray(t,t);for(let i=0;i<t;++i)n[i]=i;return e.indices=n,e}function i2e(e){let t=At.computeNumberOfVertices(e),n=Ue.createTypedArray(t,(t-1)*2);n[0]=0,n[1]=1;let i=2;for(let o=2;o<t;++o)n[i++]=o-1,n[i++]=o;return e.indices=n,e.primitiveType=Re.LINES,e}function o2e(e){let t=At.computeNumberOfVertices(e),n=Ue.createTypedArray(t,t*2);n[0]=0,n[1]=1;let i=2;for(let o=2;o<t;++o)n[i++]=o-1,n[i++]=o;return n[i++]=t-1,n[i]=0,e.indices=n,e.primitiveType=Re.LINES,e}function r2e(e){switch(e.primitiveType){case Re.TRIANGLE_FAN:return e2e(e);case Re.TRIANGLE_STRIP:return t2e(e);case Re.TRIANGLES:return ZFe(e);case Re.LINE_STRIP:return i2e(e);case Re.LINE_LOOP:return o2e(e);case Re.LINES:return n2e(e)}return e}function eA(e,t){Math.abs(e.y)<D.EPSILON6&&(t?e.y=-D.EPSILON6:e.y=D.EPSILON6)}function a2e(e,t,n){if(e.y!==0&&t.y!==0&&n.y!==0){eA(e,e.y<0),eA(t,t.y<0),eA(n,n.y<0);return}let i=Math.abs(e.y),o=Math.abs(t.y),r=Math.abs(n.y),a;i>o?i>r?a=D.sign(e.y):a=D.sign(n.y):o>r?a=D.sign(t.y):a=D.sign(n.y);let s=a<0;eA(e,s),eA(t,s),eA(n,s)}var $se=new h;function gd(e,t,n,i){h.add(e,h.multiplyByScalar(h.subtract(t,e,$se),e.y/(e.y-t.y),$se),n),h.clone(n,i),eA(n,!0),eA(i,!1)}var Ex=new h,vx=new h,Sx=new h,wx=new h,YW={positions:new Array(7),indices:new Array(9)};function s2e(e,t,n){if(e.x>=0||t.x>=0||n.x>=0)return;a2e(e,t,n);let i=e.y<0,o=t.y<0,r=n.y<0,a=0;a+=i?1:0,a+=o?1:0,a+=r?1:0;let s=YW.indices;a===1?(s[1]=3,s[2]=4,s[5]=6,s[7]=6,s[8]=5,i?(gd(e,t,Ex,Sx),gd(e,n,vx,wx),s[0]=0,s[3]=1,s[4]=2,s[6]=1):o?(gd(t,n,Ex,Sx),gd(t,e,vx,wx),s[0]=1,s[3]=2,s[4]=0,s[6]=2):r&&(gd(n,e,Ex,Sx),gd(n,t,vx,wx),s[0]=2,s[3]=0,s[4]=1,s[6]=0)):a===2&&(s[2]=4,s[4]=4,s[5]=3,s[7]=5,s[8]=6,i?o?r||(gd(n,e,Ex,Sx),gd(n,t,vx,wx),s[0]=0,s[1]=1,s[3]=0,s[6]=2):(gd(t,n,Ex,Sx),gd(t,e,vx,wx),s[0]=2,s[1]=0,s[3]=2,s[6]=1):(gd(e,t,Ex,Sx),gd(e,n,vx,wx),s[0]=1,s[1]=2,s[3]=1,s[6]=0));let c=YW.positions;return c[0]=e,c[1]=t,c[2]=n,c.length=3,(a===1||a===2)&&(c[3]=Ex,c[4]=vx,c[5]=Sx,c[6]=wx,c.length=7),YW}function Jse(e,t){let n=e.attributes;if(n.position.values.length===0)return;for(let o in n)if(n.hasOwnProperty(o)&&l(n[o])&&l(n[o].values)){let r=n[o];r.values=Y.createTypedArray(r.componentDatatype,r.values)}let i=At.computeNumberOfVertices(e);return e.indices=Ue.createTypedArray(i,e.indices),t&&(e.boundingSphere=ce.fromVertices(n.position.values)),e}function wE(e){let t=e.attributes,n={};for(let i in t)if(t.hasOwnProperty(i)&&l(t[i])&&l(t[i].values)){let o=t[i];n[i]=new Me({componentDatatype:o.componentDatatype,componentsPerAttribute:o.componentsPerAttribute,normalize:o.normalize,values:[]})}return new At({attributes:n,indices:[],primitiveType:e.primitiveType})}function $W(e,t,n){let i=l(e.geometry.boundingSphere);t=Jse(t,i),n=Jse(n,i),l(n)&&!l(t)?e.geometry=n:!l(n)&&l(t)?e.geometry=t:(e.westHemisphereGeometry=t,e.eastHemisphereGeometry=n,e.geometry=void 0)}function JW(e,t){let n=new e,i=new e,o=new e;return function(r,a,s,c,u,f,d,p){let g=e.fromArray(u,r*t,n),m=e.fromArray(u,a*t,i),A=e.fromArray(u,s*t,o);e.multiplyByScalar(g,c.x,g),e.multiplyByScalar(m,c.y,m),e.multiplyByScalar(A,c.z,A);let y=e.add(g,m,g);e.add(y,A,y),p&&e.normalize(y,y),e.pack(y,f,d*t)}}var c2e=JW(se,4),S8=JW(h,3),oce=JW(z,2),l2e=function(e,t,n,i,o,r,a){let s=o[e]*i.x,c=o[t]*i.y,u=o[n]*i.z;r[a]=s+c+u>D.EPSILON6?1:0},TD=new h,XW=new h,KW=new h,u2e=new h;function E8(e,t,n,i,o,r,a,s,c,u,f,d,p,g,m,A){if(!l(r)&&!l(a)&&!l(s)&&!l(c)&&!l(u)&&g===0)return;let y=h.fromArray(o,e*3,TD),x=h.fromArray(o,t*3,XW),b=h.fromArray(o,n*3,KW),C=bx(i,y,x,b,u2e);if(l(C)){if(l(r)&&S8(e,t,n,C,r,d.normal.values,A,!0),l(u)){let E=h.fromArray(u,e*3,TD),S=h.fromArray(u,t*3,XW),w=h.fromArray(u,n*3,KW);h.multiplyByScalar(E,C.x,E),h.multiplyByScalar(S,C.y,S),h.multiplyByScalar(w,C.z,w);let P;!h.equals(E,h.ZERO)||!h.equals(S,h.ZERO)||!h.equals(w,h.ZERO)?(P=h.add(E,S,E),h.add(P,w,P),h.normalize(P,P)):(P=TD,P.x=0,P.y=0,P.z=0),h.pack(P,d.extrudeDirection.values,A*3)}if(l(f)&&l2e(e,t,n,C,f,d.applyOffset.values,A),l(a)&&S8(e,t,n,C,a,d.tangent.values,A,!0),l(s)&&S8(e,t,n,C,s,d.bitangent.values,A,!0),l(c)&&oce(e,t,n,C,c,d.st.values,A),g>0)for(let E=0;E<g;E++){let S=p[E];f2e(e,t,n,C,A,m[S],d[S])}}}function f2e(e,t,n,i,o,r,a){let s=r.componentsPerAttribute,c=r.values,u=a.values;switch(s){case 4:c2e(e,t,n,i,c,u,o,!1);break;case 3:S8(e,t,n,i,c,u,o,!1);break;case 2:oce(e,t,n,i,c,u,o,!1);break;default:u[o]=c[e]*i.x+c[t]*i.y+c[n]*i.z}}function up(e,t,n,i,o,r){let a=e.position.values.length/3;if(o!==-1){let s=i[o],c=n[s];return c===-1?(n[s]=a,e.position.values.push(r.x,r.y,r.z),t.push(a),a):(t.push(c),c)}return e.position.values.push(r.x,r.y,r.z),t.push(a),a}var d2e={position:!0,normal:!0,bitangent:!0,tangent:!0,st:!0,extrudeDirection:!0,applyOffset:!0};function Zse(e){let t=e.geometry,n=t.attributes,i=n.position.values,o=l(n.normal)?n.normal.values:void 0,r=l(n.bitangent)?n.bitangent.values:void 0,a=l(n.tangent)?n.tangent.values:void 0,s=l(n.st)?n.st.values:void 0,c=l(n.extrudeDirection)?n.extrudeDirection.values:void 0,u=l(n.applyOffset)?n.applyOffset.values:void 0,f=t.indices,d=[];for(let P in n)n.hasOwnProperty(P)&&!d2e[P]&&l(n[P])&&d.push(P);let p=d.length,g=wE(t),m=wE(t),A,y,x,b,C,E=[];E.length=i.length/3;let S=[];for(S.length=i.length/3,C=0;C<E.length;++C)E[C]=-1,S[C]=-1;let w=f.length;for(C=0;C<w;C+=3){let P=f[C],R=f[C+1],B=f[C+2],L=h.fromArray(i,P*3),_=h.fromArray(i,R*3),T=h.fromArray(i,B*3),v=s2e(L,_,T);if(l(v)&&v.positions.length>3){let I=v.positions,O=v.indices,N=O.length;for(let j=0;j<N;++j){let k=O[j],U=I[k];U.y<0?(A=m.attributes,y=m.indices,x=E):(A=g.attributes,y=g.indices,x=S),b=up(A,y,x,f,k<3?C+k:-1,U),E8(P,R,B,U,i,o,a,r,s,c,u,A,d,p,n,b)}}else l(v)&&(L=v.positions[0],_=v.positions[1],T=v.positions[2]),L.y<0?(A=m.attributes,y=m.indices,x=E):(A=g.attributes,y=g.indices,x=S),b=up(A,y,x,f,C,L),E8(P,R,B,L,i,o,a,r,s,c,u,A,d,p,n,b),b=up(A,y,x,f,C+1,_),E8(P,R,B,_,i,o,a,r,s,c,u,A,d,p,n,b),b=up(A,y,x,f,C+2,T),E8(P,R,B,T,i,o,a,r,s,c,u,A,d,p,n,b)}$W(e,m,g)}var rce=en.fromPointNormal(h.ZERO,h.UNIT_Y),h2e=new h,m2e=new h;function SE(e,t,n,i,o,r,a){if(!l(a))return;let s=h.fromArray(i,e*3,TD);h.equalsEpsilon(s,n,D.EPSILON10)?r.applyOffset.values[o]=a[e]:r.applyOffset.values[o]=a[t]}function ece(e){let t=e.geometry,n=t.attributes,i=n.position.values,o=l(n.applyOffset)?n.applyOffset.values:void 0,r=t.indices,a=wE(t),s=wE(t),c,u=r.length,f=[];f.length=i.length/3;let d=[];for(d.length=i.length/3,c=0;c<f.length;++c)f[c]=-1,d[c]=-1;for(c=0;c<u;c+=2){let p=r[c],g=r[c+1],m=h.fromArray(i,p*3,TD),A=h.fromArray(i,g*3,XW),y;Math.abs(m.y)<D.EPSILON6&&(m.y<0?m.y=-D.EPSILON6:m.y=D.EPSILON6),Math.abs(A.y)<D.EPSILON6&&(A.y<0?A.y=-D.EPSILON6:A.y=D.EPSILON6);let x=a.attributes,b=a.indices,C=d,E=s.attributes,S=s.indices,w=f,P=si.lineSegmentPlane(m,A,rce,KW);if(l(P)){let R=h.multiplyByScalar(h.UNIT_Y,5*D.EPSILON9,h2e);m.y<0&&(h.negate(R,R),x=s.attributes,b=s.indices,C=f,E=a.attributes,S=a.indices,w=d);let B=h.add(P,R,m2e);y=up(x,b,C,r,c,m),SE(p,g,m,i,y,x,o),y=up(x,b,C,r,-1,B),SE(p,g,B,i,y,x,o),h.negate(R,R),h.add(P,R,B),y=up(E,S,w,r,-1,B),SE(p,g,B,i,y,E,o),y=up(E,S,w,r,c+1,A),SE(p,g,A,i,y,E,o)}else{let R,B,L;m.y<0?(R=s.attributes,B=s.indices,L=f):(R=a.attributes,B=a.indices,L=d),y=up(R,B,L,r,c,m),SE(p,g,m,i,y,R,o),y=up(R,B,L,r,c+1,A),SE(p,g,A,i,y,R,o)}}$W(e,s,a)}var tce=new z,p2e=new z,ace=new h,sce=new h,QW=new h,g2e=new h,_2e=new h,A2e=new h,nce=new se;function ice(e){let t=e.attributes,n=t.position.values,i=t.prevPosition.values,o=t.nextPosition.values,r=n.length;for(let a=0;a<r;a+=3){let s=h.unpack(n,a,ace);if(s.x>0)continue;let c=h.unpack(i,a,sce);(s.y<0&&c.y>0||s.y>0&&c.y<0)&&(a-3>0?(i[a]=n[a-3],i[a+1]=n[a-2],i[a+2]=n[a-1]):h.pack(s,i,a));let u=h.unpack(o,a,QW);(s.y<0&&u.y>0||s.y>0&&u.y<0)&&(a+3<r?(o[a]=n[a+3],o[a+1]=n[a+4],o[a+2]=n[a+5]):h.pack(s,o,a))}}var y2e=5*D.EPSILON9,v8=D.EPSILON6;function x2e(e){let t=e.geometry,n=t.attributes,i=n.position.values,o=n.prevPosition.values,r=n.nextPosition.values,a=n.expandAndWidth.values,s=l(n.st)?n.st.values:void 0,c=l(n.color)?n.color.values:void 0,u=wE(t),f=wE(t),d,p,g,m=!1,A=i.length/3;for(d=0;d<A;d+=4){let y=d,x=d+2,b=h.fromArray(i,y*3,ace),C=h.fromArray(i,x*3,sce);if(Math.abs(b.y)<v8)for(b.y=v8*(C.y<0?-1:1),i[d*3+1]=b.y,i[(d+1)*3+1]=b.y,p=y*3;p<y*3+12;p+=3)o[p]=i[d*3],o[p+1]=i[d*3+1],o[p+2]=i[d*3+2];if(Math.abs(C.y)<v8)for(C.y=v8*(b.y<0?-1:1),i[(d+2)*3+1]=C.y,i[(d+3)*3+1]=C.y,p=y*3;p<y*3+12;p+=3)r[p]=i[(d+2)*3],r[p+1]=i[(d+2)*3+1],r[p+2]=i[(d+2)*3+2];let E=u.attributes,S=u.indices,w=f.attributes,P=f.indices,R=si.lineSegmentPlane(b,C,rce,g2e);if(l(R)){m=!0;let B=h.multiplyByScalar(h.UNIT_Y,y2e,_2e);b.y<0&&(h.negate(B,B),E=f.attributes,S=f.indices,w=u.attributes,P=u.indices);let L=h.add(R,B,A2e);E.position.values.push(b.x,b.y,b.z,b.x,b.y,b.z),E.position.values.push(L.x,L.y,L.z),E.position.values.push(L.x,L.y,L.z),E.prevPosition.values.push(o[y*3],o[y*3+1],o[y*3+2]),E.prevPosition.values.push(o[y*3+3],o[y*3+4],o[y*3+5]),E.prevPosition.values.push(b.x,b.y,b.z,b.x,b.y,b.z),E.nextPosition.values.push(L.x,L.y,L.z),E.nextPosition.values.push(L.x,L.y,L.z),E.nextPosition.values.push(L.x,L.y,L.z),E.nextPosition.values.push(L.x,L.y,L.z),h.negate(B,B),h.add(R,B,L),w.position.values.push(L.x,L.y,L.z),w.position.values.push(L.x,L.y,L.z),w.position.values.push(C.x,C.y,C.z,C.x,C.y,C.z),w.prevPosition.values.push(L.x,L.y,L.z),w.prevPosition.values.push(L.x,L.y,L.z),w.prevPosition.values.push(L.x,L.y,L.z),w.prevPosition.values.push(L.x,L.y,L.z),w.nextPosition.values.push(C.x,C.y,C.z,C.x,C.y,C.z),w.nextPosition.values.push(r[x*3],r[x*3+1],r[x*3+2]),w.nextPosition.values.push(r[x*3+3],r[x*3+4],r[x*3+5]);let _=z.fromArray(a,y*2,tce),T=Math.abs(_.y);E.expandAndWidth.values.push(-1,T,1,T),E.expandAndWidth.values.push(-1,-T,1,-T),w.expandAndWidth.values.push(-1,T,1,T),w.expandAndWidth.values.push(-1,-T,1,-T);let v=h.magnitudeSquared(h.subtract(R,b,QW));if(v/=h.magnitudeSquared(h.subtract(C,b,QW)),l(c)){let I=se.fromArray(c,y*4,nce),O=se.fromArray(c,x*4,nce),N=D.lerp(I.x,O.x,v),j=D.lerp(I.y,O.y,v),k=D.lerp(I.z,O.z,v),U=D.lerp(I.w,O.w,v);for(p=y*4;p<y*4+8;++p)E.color.values.push(c[p]);for(E.color.values.push(N,j,k,U),E.color.values.push(N,j,k,U),w.color.values.push(N,j,k,U),w.color.values.push(N,j,k,U),p=x*4;p<x*4+8;++p)w.color.values.push(c[p])}if(l(s)){let I=z.fromArray(s,y*2,tce),O=z.fromArray(s,(d+3)*2,p2e),N=D.lerp(I.x,O.x,v);for(p=y*2;p<y*2+4;++p)E.st.values.push(s[p]);for(E.st.values.push(N,I.y),E.st.values.push(N,O.y),w.st.values.push(N,I.y),w.st.values.push(N,O.y),p=x*2;p<x*2+4;++p)w.st.values.push(s[p])}g=E.position.values.length/3-4,S.push(g,g+2,g+1),S.push(g+1,g+2,g+3),g=w.position.values.length/3-4,P.push(g,g+2,g+1),P.push(g+1,g+2,g+3)}else{let B,L;for(b.y<0?(B=f.attributes,L=f.indices):(B=u.attributes,L=u.indices),B.position.values.push(b.x,b.y,b.z),B.position.values.push(b.x,b.y,b.z),B.position.values.push(C.x,C.y,C.z),B.position.values.push(C.x,C.y,C.z),p=d*3;p<d*3+12;++p)B.prevPosition.values.push(o[p]),B.nextPosition.values.push(r[p]);for(p=d*2;p<d*2+8;++p)B.expandAndWidth.values.push(a[p]),l(s)&&B.st.values.push(s[p]);if(l(c))for(p=d*4;p<d*4+16;++p)B.color.values.push(c[p]);g=B.position.values.length/3-4,L.push(g,g+2,g+1),L.push(g+1,g+2,g+3)}}m&&(ice(f),ice(u)),$W(e,f,u)}Rl.splitLongitude=function(e){let t=e.geometry,n=t.boundingSphere;if(l(n)&&(n.center.x-n.radius>0||ce.intersectPlane(n,en.ORIGIN_ZX_PLANE)!==qt.INTERSECTING))return e;if(t.geometryType!==md.NONE)switch(t.geometryType){case md.POLYLINES:x2e(e);break;case md.TRIANGLES:Zse(e);break;case md.LINES:ece(e);break}else r2e(t),t.primitiveType===Re.TRIANGLES?Zse(e):t.primitiveType===Re.LINES&&ece(e);return e};var kn=Rl;function ED(e,t,n,i,o,r,a,s,c,u,f){this._context=e,this._texture=t,this._textureTarget=n,this._targetFace=i,this._pixelDatatype=a,this._internalFormat=o,this._pixelFormat=r,this._size=s,this._preMultiplyAlpha=c,this._flipY=u,this._initialized=f}Object.defineProperties(ED.prototype,{pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},_target:{get:function(){return this._targetFace}}});ED.prototype.copyFrom=function(e){let{xOffset:t=0,yOffset:n=0,source:i,skipColorSpaceConversion:o=!1}=e,{width:r,height:a}=i,s=this._context._gl,c=this._textureTarget,u=this._targetFace;s.activeTexture(s.TEXTURE0),s.bindTexture(c,this._texture);let f=i.arrayBufferView,d=this._size,p=this._pixelFormat,g=this._internalFormat,m=this._pixelDatatype,A=this._preMultiplyAlpha,y=this._flipY,x=4;l(f)&&(x=Xe.alignmentInBytes(p,m,r)),s.pixelStorei(s.UNPACK_ALIGNMENT,x),o?s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,s.NONE):s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,s.BROWSER_DEFAULT_WEBGL);let b=!1;if(!this._initialized){let C;t===0&&n===0&&r===d&&a===d?(l(f)?(s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,!1),y&&(f=Xe.flipY(f,p,m,d,d)),C=f):(s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,A),s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,y),C=i),b=!0):(s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,!1),C=Xe.createTypedArray(p,m,d,d)),s.texImage2D(u,0,g,d,d,0,p,je.toWebGLConstant(m,this._context),C),this._initialized=!0}b||(l(f)?(s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,!1),y&&(f=Xe.flipY(f,p,m,r,a)),s.texSubImage2D(u,0,t,n,r,a,p,je.toWebGLConstant(m,this._context),f)):(s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,A),s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,y),s.texSubImage2D(u,0,t,n,p,je.toWebGLConstant(m,this._context),i))),s.bindTexture(c,null)};ED.prototype.copyFromFramebuffer=function(e,t,n,i,o,r){e=e??0,t=t??0,n=n??0,i=i??0,o=o??this._size,r=r??this._size;let a=this._context._gl,s=this._textureTarget;a.activeTexture(a.TEXTURE0),a.bindTexture(s,this._texture),a.copyTexSubImage2D(this._targetFace,0,e,t,n,i,o,r),a.bindTexture(s,null),this._initialized=!0};ED.prototype.copyMipmapFromFramebuffer=function(e,t,n,i,o){e=e??0,t=t??0,n=n??this._size,i=i??this._size,o=o??0;let r=this._context._gl,a=this._textureTarget;r.activeTexture(r.TEXTURE0),r.bindTexture(a,this._texture),r.copyTexImage2D(this._targetFace,o,this._internalFormat,e,t,n,i,0),r.bindTexture(a,null),this._initialized=!0};var vD=ED;var SD={DONT_CARE:ee.DONT_CARE,FASTEST:ee.FASTEST,NICEST:ee.NICEST,validate:function(e){return e===SD.DONT_CARE||e===SD.FASTEST||e===SD.NICEST}};Object.freeze(SD);var _d=SD;var wD={NEAREST:ee.NEAREST,LINEAR:ee.LINEAR};wD.validate=function(e){return e===wD.NEAREST||e===wD.LINEAR};Object.freeze(wD);var ti=wD;var z0={NEAREST:ee.NEAREST,LINEAR:ee.LINEAR,NEAREST_MIPMAP_NEAREST:ee.NEAREST_MIPMAP_NEAREST,LINEAR_MIPMAP_NEAREST:ee.LINEAR_MIPMAP_NEAREST,NEAREST_MIPMAP_LINEAR:ee.NEAREST_MIPMAP_LINEAR,LINEAR_MIPMAP_LINEAR:ee.LINEAR_MIPMAP_LINEAR};z0.validate=function(e){return e===z0.NEAREST||e===z0.LINEAR||e===z0.NEAREST_MIPMAP_NEAREST||e===z0.LINEAR_MIPMAP_NEAREST||e===z0.NEAREST_MIPMAP_LINEAR||e===z0.LINEAR_MIPMAP_LINEAR};Object.freeze(z0);var Vt=z0;var ID={CLAMP_TO_EDGE:ee.CLAMP_TO_EDGE,REPEAT:ee.REPEAT,MIRRORED_REPEAT:ee.MIRRORED_REPEAT,validate:function(e){return e===ID.CLAMP_TO_EDGE||e===ID.REPEAT||e===ID.MIRRORED_REPEAT}};Object.freeze(ID);var un=ID;function DD(e){e=e??G.EMPTY_OBJECT;let{wrapR:t=un.CLAMP_TO_EDGE,wrapS:n=un.CLAMP_TO_EDGE,wrapT:i=un.CLAMP_TO_EDGE,minificationFilter:o=Vt.LINEAR,magnificationFilter:r=ti.LINEAR,maximumAnisotropy:a=1}=e;this._wrapR=t,this._wrapS=n,this._wrapT=i,this._minificationFilter=o,this._magnificationFilter=r,this._maximumAnisotropy=a}Object.defineProperties(DD.prototype,{wrapR:{get:function(){return this._wrapR}},wrapS:{get:function(){return this._wrapS}},wrapT:{get:function(){return this._wrapT}},minificationFilter:{get:function(){return this._minificationFilter}},magnificationFilter:{get:function(){return this._magnificationFilter}},maximumAnisotropy:{get:function(){return this._maximumAnisotropy}}});DD.equals=function(e,t){return e===t||l(e)&&l(t)&&e._wrapR===t._wrapR&&e._wrapS===t._wrapS&&e._wrapT===t._wrapT&&e._minificationFilter===t._minificationFilter&&e._magnificationFilter===t._magnificationFilter&&e._maximumAnisotropy===t._maximumAnisotropy};DD.NEAREST=Object.freeze(new DD({wrapR:un.CLAMP_TO_EDGE,wrapS:un.CLAMP_TO_EDGE,wrapT:un.CLAMP_TO_EDGE,minificationFilter:Vt.NEAREST,magnificationFilter:ti.NEAREST}));var jt=DD;function b2e(e,t){if(!e)throw new _e(t)}var ZW=b2e;function C2e(e,t,n,i){let o=l(t.vertexBuffer),r=l(t.value),a=t.value?t.value.length:t.componentsPerAttribute,s={index:t.index??n,enabled:t.enabled??!0,vertexBuffer:t.vertexBuffer,value:r?t.value.slice(0):void 0,componentsPerAttribute:a,componentDatatype:t.componentDatatype??Y.FLOAT,normalize:t.normalize??!1,offsetInBytes:t.offsetInBytes??0,strideInBytes:t.strideInBytes??0,instanceDivisor:t.instanceDivisor??0};if(o)s.vertexAttrib=function(c){let u=this.index;c.bindBuffer(c.ARRAY_BUFFER,this.vertexBuffer._getBuffer()),c.vertexAttribPointer(u,this.componentsPerAttribute,this.componentDatatype,this.normalize,this.strideInBytes,this.offsetInBytes),c.enableVertexAttribArray(u),this.instanceDivisor>0&&(i.glVertexAttribDivisor(u,this.instanceDivisor),i._vertexAttribDivisors[u]=this.instanceDivisor,i._previousDrawInstanced=!0)},s.disableVertexAttribArray=function(c){c.disableVertexAttribArray(this.index),this.instanceDivisor>0&&i.glVertexAttribDivisor(n,0)};else{switch(s.componentsPerAttribute){case 1:s.vertexAttrib=function(c){c.vertexAttrib1fv(this.index,this.value)};break;case 2:s.vertexAttrib=function(c){c.vertexAttrib2fv(this.index,this.value)};break;case 3:s.vertexAttrib=function(c){c.vertexAttrib3fv(this.index,this.value)};break;case 4:s.vertexAttrib=function(c){c.vertexAttrib4fv(this.index,this.value)};break}s.disableVertexAttribArray=function(c){}}e.push(s)}function lce(e,t,n){for(let i=0;i<t.length;++i){let o=t[i];o.enabled&&o.vertexAttrib(e)}l(n)&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,n._getBuffer())}function Oh(e){e=e??G.EMPTY_OBJECT;let t=e.context,n=t._gl,i=e.attributes,o=e.indexBuffer,r,a=[],s=1,c=!1,u=!1,f=i.length;for(r=0;r<f;++r)C2e(a,i[r],r,t);for(f=a.length,r=0;r<f;++r){let p=a[r];if(l(p.vertexBuffer)&&p.instanceDivisor===0){let g=p.strideInBytes||p.componentsPerAttribute*Y.getSizeInBytes(p.componentDatatype);s=p.vertexBuffer.sizeInBytes/g;break}}for(r=0;r<f;++r)a[r].instanceDivisor>0&&(c=!0),l(a[r].value)&&(u=!0);let d;t.vertexArrayObject&&(d=t.glCreateVertexArray(),t.glBindVertexArray(d),lce(n,a,o),t.glBindVertexArray(null)),this._numberOfVertices=s,this._hasInstancedAttributes=c,this._hasConstantAttributes=u,this._context=t,this._gl=n,this._vao=d,this._attributes=a,this._indexBuffer=o}function cce(e){return e.values.length/e.componentsPerAttribute}function T2e(e){return Y.getSizeInBytes(e.componentDatatype)*e.componentsPerAttribute}function E2e(e){let t,n,i,o=[];for(n in e)e.hasOwnProperty(n)&&l(e[n])&&l(e[n].values)&&(o.push(n),e[n].componentDatatype===Y.DOUBLE&&(e[n].componentDatatype=Y.FLOAT,e[n].values=Y.createTypedArray(Y.FLOAT,e[n].values)));let r,a=o.length;if(a>0)for(r=cce(e[o[0]]),t=1;t<a;++t){let u=cce(e[o[t]]);if(u!==r)throw new re(`Each attribute list must have the same number of vertices. Attribute ${o[t]} has a different number of vertices (${u.toString()}) than attribute ${o[0]} (${r.toString()}).`)}o.sort(function(u,f){return Y.getSizeInBytes(e[f].componentDatatype)-Y.getSizeInBytes(e[u].componentDatatype)});let s=0,c={};for(t=0;t<a;++t)n=o[t],i=e[n],c[n]=s,s+=T2e(i);if(s>0){let u=Y.getSizeInBytes(e[o[0]].componentDatatype),f=s%u;f!==0&&(s+=u-f);let d=r*s,p=new ArrayBuffer(d),g={};for(t=0;t<a;++t){n=o[t];let m=Y.getSizeInBytes(e[n].componentDatatype);g[n]={pointer:Y.createTypedArray(e[n].componentDatatype,p),index:c[n]/m,strideInComponentType:s/m}}for(t=0;t<r;++t)for(let m=0;m<a;++m){n=o[m],i=e[n];let A=i.values,y=g[n],x=y.pointer,b=i.componentsPerAttribute;for(let C=0;C<b;++C)x[y.index+C]=A[t*b+C];y.index+=y.strideInComponentType}return{buffer:p,offsetsInBytes:c,vertexSizeInBytes:s}}}Oh.fromGeometry=function(e){e=e??G.EMPTY_OBJECT;let t=e.context,n=e.geometry??G.EMPTY_OBJECT,i=e.bufferUsage??Oe.DYNAMIC_DRAW,o=e.attributeLocations??G.EMPTY_OBJECT,r=e.interleave??!1,a=e.vertexArrayAttributes,s,c,u,f=l(a)?a:[],d=n.attributes;if(r){let m=E2e(d);if(l(m)){u=Ke.createVertexBuffer({context:t,typedArray:m.buffer,usage:i});let A=m.offsetsInBytes,y=m.vertexSizeInBytes;for(s in d)d.hasOwnProperty(s)&&l(d[s])&&(c=d[s],l(c.values)?f.push({index:o[s],vertexBuffer:u,componentDatatype:c.componentDatatype,componentsPerAttribute:c.componentsPerAttribute,normalize:c.normalize,offsetInBytes:A[s],strideInBytes:y}):f.push({index:o[s],value:c.value,componentDatatype:c.componentDatatype,normalize:c.normalize}))}}else for(s in d)if(d.hasOwnProperty(s)&&l(d[s])){c=d[s];let m=c.componentDatatype;m===Y.DOUBLE&&(m=Y.FLOAT);let A={};u=void 0,l(c.values)&&(u=Ke.createVertexBuffer({context:t,typedArray:Y.createTypedArray(m,c.values),usage:i}),A={index:o[s],vertexBuffer:u,value:c.value,componentDatatype:m,componentsPerAttribute:c.componentsPerAttribute,normalize:c.normalize}),l(c.typedArray)&&(u=Ke.createVertexBuffer({context:t,typedArray:c.typedArray,usage:i}),A={index:o[s],vertexBuffer:u,value:void 0,componentDatatype:m,componentsPerAttribute:Ft.getNumberOfComponents(c.type),normalize:c.normalized,instanceDivisor:c.instanceDivisor}),f.push(A)}let p,g=n.indices;return l(g)&&(At.computeNumberOfVertices(n)>=D.SIXTY_FOUR_KILOBYTES&&t.elementIndexUint?p=Ke.createIndexBuffer({context:t,typedArray:new Uint32Array(g),usage:i,indexDatatype:Ue.UNSIGNED_INT}):p=Ke.createIndexBuffer({context:t,typedArray:new Uint16Array(g),usage:i,indexDatatype:Ue.UNSIGNED_SHORT})),new Oh({context:t,attributes:f,indexBuffer:p})};Object.defineProperties(Oh.prototype,{numberOfAttributes:{get:function(){return this._attributes.length}},numberOfVertices:{get:function(){return this._numberOfVertices}},indexBuffer:{get:function(){return this._indexBuffer}}});Oh.prototype.getAttribute=function(e){return this._attributes[e]};function v2e(e){let t=e._context,n=e._hasInstancedAttributes;if(!n&&!t._previousDrawInstanced)return;t._previousDrawInstanced=n;let i=t._vertexAttribDivisors,o=e._attributes,r=Rt.maximumVertexAttributes,a;if(n){let s=o.length;for(a=0;a<s;++a){let c=o[a];if(c.enabled){let u=c.instanceDivisor,f=c.index;u!==i[f]&&(t.glVertexAttribDivisor(f,u),i[f]=u)}}}else for(a=0;a<r;++a)i[a]>0&&(t.glVertexAttribDivisor(a,0),i[a]=0)}function S2e(e,t){let n=e._attributes,i=n.length;for(let o=0;o<i;++o){let r=n[o];r.enabled&&l(r.value)&&r.vertexAttrib(t)}}Oh.prototype.copyAttributeFromRange=function(e,t,n,i){let o=this.getAttribute(e),r=o.vertexBuffer,a=o.componentsPerAttribute,s=t.constructor,c=n*a*s.BYTES_PER_ELEMENT,u=new s(t.buffer,t.byteOffset+c,i*a);r.copyFromArrayView(u,c)};Oh.prototype.copyIndexFromRange=function(e,t,n){let i=this._indexBuffer,o=e.constructor,r=t*o.BYTES_PER_ELEMENT,a=new o(e.buffer,e.byteOffset+r,n);i.copyFromArrayView(a,r)};Oh.prototype._bind=function(){l(this._vao)?(this._context.glBindVertexArray(this._vao),this._context.instancedArrays&&v2e(this),this._hasConstantAttributes&&S2e(this,this._gl)):lce(this._gl,this._attributes,this._indexBuffer)};Oh.prototype._unBind=function(){if(l(this._vao))this._context.glBindVertexArray(null);else{let e=this._attributes,t=this._gl;for(let n=0;n<e.length;++n){let i=e[n];i.enabled&&i.disableVertexAttribArray(t)}this._indexBuffer&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null)}};Oh.prototype.isDestroyed=function(){return!1};Oh.prototype.destroy=function(){let e=this._attributes;for(let n=0;n<e.length;++n){let i=e[n].vertexBuffer;l(i)&&!i.isDestroyed()&&i.vertexArrayDestroyable&&i.destroy()}let t=this._indexBuffer;return l(t)&&!t.isDestroyed()&&t.vertexArrayDestroyable&&t.destroy(),l(this._vao)&&this._context.glDeleteVertexArray(this._vao),fe(this)};var Fn=Oh;function yr(e){e=e??G.EMPTY_OBJECT;let{context:t,source:n,pixelFormat:i=Xe.RGBA,pixelDatatype:o=je.UNSIGNED_BYTE,flipY:r=!0,skipColorSpaceConversion:a=!1,sampler:s=new jt}=e,c=e.preMultiplyAlpha||i===Xe.RGB||i===Xe.LUMINANCE,{width:u,height:f}=e;l(n)&&({width:u,height:f}=n.positiveX);let d=u,p=Xe.textureSizeInBytes(i,o,d,d)*6,g=Xe.toInternalFormat(i,o,t),m=t._gl,A=m.TEXTURE_CUBE_MAP,y=m.createTexture();this._context=t,this._textureFilterAnisotropic=t._textureFilterAnisotropic,this._textureTarget=A,this._texture=y,this._pixelFormat=i,this._pixelDatatype=o,this._size=d,this._hasMipmap=!1,this._sizeInBytes=p,this._preMultiplyAlpha=c,this._flipY=r;let x=l(n);function b(C){return new vD(t,y,A,C,g,i,o,d,c,r,x)}this._positiveX=b(m.TEXTURE_CUBE_MAP_POSITIVE_X),this._negativeX=b(m.TEXTURE_CUBE_MAP_NEGATIVE_X),this._positiveY=b(m.TEXTURE_CUBE_MAP_POSITIVE_Y),this._negativeY=b(m.TEXTURE_CUBE_MAP_NEGATIVE_Y),this._positiveZ=b(m.TEXTURE_CUBE_MAP_POSITIVE_Z),this._negativeZ=b(m.TEXTURE_CUBE_MAP_NEGATIVE_Z),this._sampler=s,uce(this,s),m.activeTexture(m.TEXTURE0),m.bindTexture(A,y),a?m.pixelStorei(m.UNPACK_COLORSPACE_CONVERSION_WEBGL,m.NONE):m.pixelStorei(m.UNPACK_COLORSPACE_CONVERSION_WEBGL,m.BROWSER_DEFAULT_WEBGL);for(let C of yr.faceNames())eq(this[C],n?.[C],0);m.bindTexture(A,null)}yr.prototype.copyFace=function(e,t,n,i){let o=e.context,r=new fa({context:o,colorTextures:[t],destroyAttachments:!1});r._bind(),this[n].copyMipmapFromFramebuffer(0,0,t.width,t.height,i??0),r._unBind(),r.destroy()};yr.FaceName=Object.freeze({POSITIVEX:"positiveX",NEGATIVEX:"negativeX",POSITIVEY:"positiveY",NEGATIVEY:"negativeY",POSITIVEZ:"positiveZ",NEGATIVEZ:"negativeZ"});function*w2e(){yield yr.FaceName.POSITIVEX,yield yr.FaceName.NEGATIVEX,yield yr.FaceName.POSITIVEY,yield yr.FaceName.NEGATIVEY,yield yr.FaceName.POSITIVEZ,yield yr.FaceName.NEGATIVEZ}yr.faceNames=function(){return w2e()};function eq(e,t,n){n=n??0;let i=e._targetFace,o=Math.max(Math.floor(e._size/2**n),1),r=e._pixelFormat,a=e._pixelDatatype,s=e._internalFormat,c=e._flipY,u=e._preMultiplyAlpha,f=e._context,d=f._gl;if(!l(t)){d.texImage2D(i,n,s,o,o,0,r,je.toWebGLConstant(a,f),null);return}let{arrayBufferView:p}=t,g=4;l(p)&&(g=Xe.alignmentInBytes(r,a,o)),d.pixelStorei(d.UNPACK_ALIGNMENT,g),l(p)?(d.pixelStorei(d.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),d.pixelStorei(d.UNPACK_FLIP_Y_WEBGL,!1),c&&(p=Xe.flipY(p,r,a,o,o)),d.texImage2D(i,n,s,o,o,0,r,je.toWebGLConstant(a,f),p)):(d.pixelStorei(d.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),d.pixelStorei(d.UNPACK_FLIP_Y_WEBGL,c),d.texImage2D(i,n,s,r,je.toWebGLConstant(a,f),t))}yr.loadFace=eq;Object.defineProperties(yr.prototype,{positiveX:{get:function(){return this._positiveX}},negativeX:{get:function(){return this._negativeX}},positiveY:{get:function(){return this._positiveY}},negativeY:{get:function(){return this._negativeY}},positiveZ:{get:function(){return this._positiveZ}},negativeZ:{get:function(){return this._negativeZ}},sampler:{get:function(){return this._sampler},set:function(e){uce(this,e),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},width:{get:function(){return this._size}},height:{get:function(){return this._size}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(this._sizeInBytes*4/3):this._sizeInBytes}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},_target:{get:function(){return this._textureTarget}}});yr.getDirection=function(e,t){switch(e){case yr.FaceName.POSITIVEX:return h.clone(h.UNIT_X,t);case yr.FaceName.NEGATIVEX:return h.negate(h.UNIT_X,t);case yr.FaceName.POSITIVEY:return h.clone(h.UNIT_Y,t);case yr.FaceName.NEGATIVEY:return h.negate(h.UNIT_Y,t);case yr.FaceName.POSITIVEZ:return h.clone(h.UNIT_Z,t);case yr.FaceName.NEGATIVEZ:return h.negate(h.UNIT_Z,t)}};function uce(e,t){let{minificationFilter:n,magnificationFilter:i}=t,o=[Vt.NEAREST_MIPMAP_NEAREST,Vt.NEAREST_MIPMAP_LINEAR,Vt.LINEAR_MIPMAP_NEAREST,Vt.LINEAR_MIPMAP_LINEAR].includes(n),r=e._context,a=e._pixelDatatype;(a===je.FLOAT&&!r.textureFloatLinear||a===je.HALF_FLOAT&&!r.textureHalfFloatLinear)&&(n=o?Vt.NEAREST_MIPMAP_NEAREST:Vt.NEAREST,i=ti.NEAREST);let s=r._gl,c=e._textureTarget;s.activeTexture(s.TEXTURE0),s.bindTexture(c,e._texture),s.texParameteri(c,s.TEXTURE_MIN_FILTER,n),s.texParameteri(c,s.TEXTURE_MAG_FILTER,i),s.texParameteri(c,s.TEXTURE_WRAP_S,t.wrapS),s.texParameteri(c,s.TEXTURE_WRAP_T,t.wrapT),l(e._textureFilterAnisotropic)&&s.texParameteri(c,e._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,t.maximumAnisotropy),s.bindTexture(c,null)}yr.prototype.loadMipmaps=function(e,t){t=t??!1;let n=this._context._gl,i=this._texture,o=this._textureTarget;n.activeTexture(n.TEXTURE0),n.bindTexture(o,i),t?n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,n.NONE):n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,n.BROWSER_DEFAULT_WEBGL);for(let r=0;r<e.length;r++){let a=e[r],s=r+1;for(let c of yr.faceNames())eq(this[c],a[c],s)}n.bindTexture(o,null),this._hasMipmap=!0};yr.prototype.generateMipmap=function(e){e=e??_d.DONT_CARE,this._hasMipmap=!0;let t=this._context._gl,n=this._textureTarget;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(n,this._texture),t.generateMipmap(n),t.bindTexture(n,null)};yr.createVertexArray=function(e){let t=Ec.createGeometry(Ec.fromDimensions({dimensions:new h(2,2,2),vertexFormat:Ne.POSITION_ONLY})),n=this._attributeLocations=kn.createAttributeLocations(t);return Fn.fromGeometry({context:e,geometry:t,attributeLocations:n,bufferUsage:Oe.STATIC_DRAW})};yr.prototype.isDestroyed=function(){return!1};yr.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),this._positiveX=fe(this._positiveX),this._negativeX=fe(this._negativeX),this._positiveY=fe(this._positiveY),this._negativeY=fe(this._negativeY),this._positiveZ=fe(this._positiveZ),this._negativeZ=fe(this._negativeZ),fe(this)};var $r=yr;function I2e(e){this.context=e,this.framebuffer=void 0,this.blendingEnabled=void 0,this.scissorTest=void 0,this.viewport=void 0}var $c=I2e;var tq=class{constructor(t,n,i){this._pickObjects=t,this.key=n,this.color=i}get object(){return this._pickObjects.get(this.key)}set object(t){this._pickObjects.set(this.key,t)}destroy(){this._pickObjects.delete(this.key)}},PD=tq;var RD=`/**
- * A built-in GLSL floating-point constant for converting radians to degrees.
- *
- * @alias czm_degreesPerRadian
- * @glslConstant
- *
- * @see CesiumMath.DEGREES_PER_RADIAN
- *
- * @example
- * // GLSL declaration
- * const float czm_degreesPerRadian = ...;
- *
- * // Example
- * float deg = czm_degreesPerRadian * rad;
- */
- const float czm_degreesPerRadian = 57.29577951308232;
- `;var OD=`/**
- * A built-in GLSL vec2 constant for defining the depth range.
- * This is a workaround to a bug where IE11 does not implement gl_DepthRange.
- *
- * @alias czm_depthRange
- * @glslConstant
- *
- * @example
- * // GLSL declaration
- * float depthRangeNear = czm_depthRange.near;
- * float depthRangeFar = czm_depthRange.far;
- *
- */
- const czm_depthRangeStruct czm_depthRange = czm_depthRangeStruct(0.0, 1.0);
- `;var MD=`/**
- * 0.1
- *
- * @name czm_epsilon1
- * @glslConstant
- */
- const float czm_epsilon1 = 0.1;
- `;var BD=`/**
- * 0.01
- *
- * @name czm_epsilon2
- * @glslConstant
- */
- const float czm_epsilon2 = 0.01;
- `;var LD=`/**
- * 0.001
- *
- * @name czm_epsilon3
- * @glslConstant
- */
- const float czm_epsilon3 = 0.001;
- `;var ND=`/**
- * 0.0001
- *
- * @name czm_epsilon4
- * @glslConstant
- */
- const float czm_epsilon4 = 0.0001;
- `;var FD=`/**
- * 0.00001
- *
- * @name czm_epsilon5
- * @glslConstant
- */
- const float czm_epsilon5 = 0.00001;
- `;var kD=`/**
- * 0.000001
- *
- * @name czm_epsilon6
- * @glslConstant
- */
- const float czm_epsilon6 = 0.000001;
- `;var zD=`/**
- * 0.0000001
- *
- * @name czm_epsilon7
- * @glslConstant
- */
- const float czm_epsilon7 = 0.0000001;
- `;var UD=`/**
- * DOC_TBA
- *
- * @name czm_infinity
- * @glslConstant
- */
- const float czm_infinity = 5906376272000.0; // Distance from the Sun to Pluto in meters. TODO: What is best given lowp, mediump, and highp?
- `;var VD=`/**
- * A built-in GLSL floating-point constant for <code>1/pi</code>.
- *
- * @alias czm_oneOverPi
- * @glslConstant
- *
- * @see CesiumMath.ONE_OVER_PI
- *
- * @example
- * // GLSL declaration
- * const float czm_oneOverPi = ...;
- *
- * // Example
- * float pi = 1.0 / czm_oneOverPi;
- */
- const float czm_oneOverPi = 0.3183098861837907;
- `;var jD=`/**
- * A built-in GLSL floating-point constant for <code>1/2pi</code>.
- *
- * @alias czm_oneOverTwoPi
- * @glslConstant
- *
- * @see CesiumMath.ONE_OVER_TWO_PI
- *
- * @example
- * // GLSL declaration
- * const float czm_oneOverTwoPi = ...;
- *
- * // Example
- * float pi = 2.0 * czm_oneOverTwoPi;
- */
- const float czm_oneOverTwoPi = 0.15915494309189535;
- `;var GD=`/**
- * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE}
- *
- * @name czm_passCesium3DTile
- * @glslConstant
- *
- * @see czm_pass
- */
- const float czm_passCesium3DTile = 5.0;
- `;var HD=`/**
- * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_CLASSIFICATION}
- *
- * @name czm_passCesium3DTileClassification
- * @glslConstant
- *
- * @see czm_pass
- */
- const float czm_passCesium3DTileClassification = 6.0;
- `;var WD=`/**
- * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW}
- *
- * @name czm_passCesium3DTileClassificationIgnoreShow
- * @glslConstant
- *
- * @see czm_pass
- */
- const float czm_passCesium3DTileClassificationIgnoreShow = 7.0;
- `;var qD=`/**
- * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_EDGES}
- *
- * @name czm_passCesium3DTileEdges
- * @glslConstant
- *
- * @see czm_pass
- */
- const float czm_passCesium3DTileEdges = 4.0;
-
- `;var YD=`/**
- * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_EDGES_DIRECT}
- *
- * @name czm_passCesium3DTileEdgesDirect
- * @glslConstant
- *
- * @see czm_pass
- */
- const float czm_passCesium3DTileEdgesDirect = 12.0;
- `;var XD=`/**
- * The automatic GLSL constant for {@link Pass#CLASSIFICATION}
- *
- * @name czm_passClassification
- * @glslConstant
- *
- * @see czm_pass
- */
- const float czm_passClassification = 7.0;
- `;var KD=`/**
- * The automatic GLSL constant for {@link Pass#COMPUTE}
- *
- * @name czm_passCompute
- * @glslConstant
- *
- * @see czm_pass
- */
- const float czm_passCompute = 1.0;
- `;var QD=`/**
- * The automatic GLSL constant for {@link Pass#ENVIRONMENT}
- *
- * @name czm_passEnvironment
- * @glslConstant
- *
- * @see czm_pass
- */
- const float czm_passEnvironment = 0.0;
- `;var $D=`/**
- * The automatic GLSL constant for {@link Pass#GAUSSIAN_SPLATS}
- *
- * @name czm_passGaussianSplats
- * @glslConstant
- *
- * @see czm_pass
- */
- const float czm_passGaussianSplats = 11.0;
- `;var JD=`/**
- * The automatic GLSL constant for {@link Pass#GLOBE}
- *
- * @name czm_passGlobe
- * @glslConstant
- *
- * @see czm_pass
- */
- const float czm_passGlobe = 2.0;
- `;var ZD=`/**
- * The automatic GLSL constant for {@link Pass#OPAQUE}
- *
- * @name czm_passOpaque
- * @glslConstant
- *
- * @see czm_pass
- */
- const float czm_passOpaque = 8.0;
- `;var eP=`/**
- * The automatic GLSL constant for {@link Pass#OVERLAY}
- *
- * @name czm_passOverlay
- * @glslConstant
- *
- * @see czm_pass
- */
- const float czm_passOverlay = 13.0;
- `;var tP=`/**
- * The automatic GLSL constant for {@link Pass#TERRAIN_CLASSIFICATION}
- *
- * @name czm_passTerrainClassification
- * @glslConstant
- *
- * @see czm_pass
- */
- const float czm_passTerrainClassification = 3.0;
- `;var nP=`/**
- * The automatic GLSL constant for {@link Pass#TRANSLUCENT}
- *
- * @name czm_passTranslucent
- * @glslConstant
- *
- * @see czm_pass
- */
- const float czm_passTranslucent = 9.0;
- `;var iP=`/**
- * The automatic GLSL constant for {@link Pass#VOXELS}
- *
- * @name czm_passVoxels
- * @glslConstant
- *
- * @see czm_pass
- */
- const float czm_passVoxels = 10.0;
- `;var oP=`/**
- * A built-in GLSL floating-point constant for <code>Math.PI</code>.
- *
- * @alias czm_pi
- * @glslConstant
- *
- * @see CesiumMath.PI
- *
- * @example
- * // GLSL declaration
- * const float czm_pi = ...;
- *
- * // Example
- * float twoPi = 2.0 * czm_pi;
- */
- const float czm_pi = 3.141592653589793;
- `;var rP=`/**
- * A built-in GLSL floating-point constant for <code>pi/4</code>.
- *
- * @alias czm_piOverFour
- * @glslConstant
- *
- * @see CesiumMath.PI_OVER_FOUR
- *
- * @example
- * // GLSL declaration
- * const float czm_piOverFour = ...;
- *
- * // Example
- * float pi = 4.0 * czm_piOverFour;
- */
- const float czm_piOverFour = 0.7853981633974483;
- `;var aP=`/**
- * A built-in GLSL floating-point constant for <code>pi/6</code>.
- *
- * @alias czm_piOverSix
- * @glslConstant
- *
- * @see CesiumMath.PI_OVER_SIX
- *
- * @example
- * // GLSL declaration
- * const float czm_piOverSix = ...;
- *
- * // Example
- * float pi = 6.0 * czm_piOverSix;
- */
- const float czm_piOverSix = 0.5235987755982988;
- `;var sP=`/**
- * A built-in GLSL floating-point constant for <code>pi/3</code>.
- *
- * @alias czm_piOverThree
- * @glslConstant
- *
- * @see CesiumMath.PI_OVER_THREE
- *
- * @example
- * // GLSL declaration
- * const float czm_piOverThree = ...;
- *
- * // Example
- * float pi = 3.0 * czm_piOverThree;
- */
- const float czm_piOverThree = 1.0471975511965976;
- `;var cP=`/**
- * A built-in GLSL floating-point constant for <code>pi/2</code>.
- *
- * @alias czm_piOverTwo
- * @glslConstant
- *
- * @see CesiumMath.PI_OVER_TWO
- *
- * @example
- * // GLSL declaration
- * const float czm_piOverTwo = ...;
- *
- * // Example
- * float pi = 2.0 * czm_piOverTwo;
- */
- const float czm_piOverTwo = 1.5707963267948966;
- `;var lP=`/**
- * A built-in GLSL floating-point constant for converting degrees to radians.
- *
- * @alias czm_radiansPerDegree
- * @glslConstant
- *
- * @see CesiumMath.RADIANS_PER_DEGREE
- *
- * @example
- * // GLSL declaration
- * const float czm_radiansPerDegree = ...;
- *
- * // Example
- * float rad = czm_radiansPerDegree * deg;
- */
- const float czm_radiansPerDegree = 0.017453292519943295;
- `;var uP=`/**
- * The constant identifier for the 2D {@link SceneMode}
- *
- * @name czm_sceneMode2D
- * @glslConstant
- * @see czm_sceneMode
- * @see czm_sceneModeColumbusView
- * @see czm_sceneMode3D
- * @see czm_sceneModeMorphing
- */
- const float czm_sceneMode2D = 2.0;
- `;var fP=`/**
- * The constant identifier for the 3D {@link SceneMode}
- *
- * @name czm_sceneMode3D
- * @glslConstant
- * @see czm_sceneMode
- * @see czm_sceneMode2D
- * @see czm_sceneModeColumbusView
- * @see czm_sceneModeMorphing
- */
- const float czm_sceneMode3D = 3.0;
- `;var dP=`/**
- * The constant identifier for the Columbus View {@link SceneMode}
- *
- * @name czm_sceneModeColumbusView
- * @glslConstant
- * @see czm_sceneMode
- * @see czm_sceneMode2D
- * @see czm_sceneMode3D
- * @see czm_sceneModeMorphing
- */
- const float czm_sceneModeColumbusView = 1.0;
- `;var hP=`/**
- * The constant identifier for the Morphing {@link SceneMode}
- *
- * @name czm_sceneModeMorphing
- * @glslConstant
- * @see czm_sceneMode
- * @see czm_sceneMode2D
- * @see czm_sceneModeColumbusView
- * @see czm_sceneMode3D
- */
- const float czm_sceneModeMorphing = 0.0;
- `;var mP=`/**
- * A built-in GLSL floating-point constant for one solar radius.
- *
- * @alias czm_solarRadius
- * @glslConstant
- *
- * @see CesiumMath.SOLAR_RADIUS
- *
- * @example
- * // GLSL declaration
- * const float czm_solarRadius = ...;
- */
- const float czm_solarRadius = 695500000.0;
- `;var pP=`/**
- * A built-in GLSL floating-point constant for <code>3pi/2</code>.
- *
- * @alias czm_threePiOver2
- * @glslConstant
- *
- * @see CesiumMath.THREE_PI_OVER_TWO
- *
- * @example
- * // GLSL declaration
- * const float czm_threePiOver2 = ...;
- *
- * // Example
- * float pi = (2.0 / 3.0) * czm_threePiOver2;
- */
- const float czm_threePiOver2 = 4.71238898038469;
- `;var gP=`/**
- * A built-in GLSL floating-point constant for <code>2pi</code>.
- *
- * @alias czm_twoPi
- * @glslConstant
- *
- * @see CesiumMath.TWO_PI
- *
- * @example
- * // GLSL declaration
- * const float czm_twoPi = ...;
- *
- * // Example
- * float pi = czm_twoPi / 2.0;
- */
- const float czm_twoPi = 6.283185307179586;
- `;var _P=`/**
- * The maximum latitude, in radians, both North and South, supported by a Web Mercator
- * (EPSG:3857) projection. Technically, the Mercator projection is defined
- * for any latitude up to (but not including) 90 degrees, but it makes sense
- * to cut it off sooner because it grows exponentially with increasing latitude.
- * The logic behind this particular cutoff value, which is the one used by
- * Google Maps, Bing Maps, and Esri, is that it makes the projection
- * square. That is, the rectangle is equal in the X and Y directions.
- *
- * The constant value is computed as follows:
- * czm_pi * 0.5 - (2.0 * atan(exp(-czm_pi)))
- *
- * @name czm_webMercatorMaxLatitude
- * @glslConstant
- */
- const float czm_webMercatorMaxLatitude = 1.4844222297453324;
- `;var AP=`/**
- * @name czm_depthRangeStruct
- * @glslStruct
- */
- struct czm_depthRangeStruct
- {
- float near;
- float far;
- };
- `;var yP=`/**
- * Holds material information that can be used for lighting. Returned by all czm_getMaterial functions.
- *
- * @name czm_material
- * @glslStruct
- *
- * @property {vec3} diffuse Incoming light that scatters evenly in all directions.
- * @property {float} specular Intensity of incoming light reflecting in a single direction.
- * @property {float} shininess The sharpness of the specular reflection. Higher values create a smaller, more focused specular highlight.
- * @property {vec3} normal Surface's normal in eye coordinates. It is used for effects such as normal mapping. The default is the surface's unmodified normal.
- * @property {vec3} emission Light emitted by the material equally in all directions. The default is vec3(0.0), which emits no light.
- * @property {float} alpha Alpha of this material. 0.0 is completely transparent; 1.0 is completely opaque.
- */
- struct czm_material
- {
- vec3 diffuse;
- float specular;
- float shininess;
- vec3 normal;
- vec3 emission;
- float alpha;
- };
- `;var xP=`/**
- * Used as input to every material's czm_getMaterial function.
- *
- * @name czm_materialInput
- * @glslStruct
- *
- * @property {float} s 1D texture coordinates.
- * @property {vec2} st 2D texture coordinates.
- * @property {vec3} str 3D texture coordinates.
- * @property {vec3} normalEC Unperturbed surface normal in eye coordinates.
- * @property {mat3} tangentToEyeMatrix Matrix for converting a tangent space normal to eye space.
- * @property {vec3} positionToEyeEC Vector from the fragment to the eye in eye coordinates. The magnitude is the distance in meters from the fragment to the eye.
- * @property {float} height The height of the terrain in meters above or below the ellipsoid. Only available for globe materials.
- * @property {float} slope The slope of the terrain in radians. 0 is flat; pi/2 is vertical. Only available for globe materials.
- * @property {float} aspect The aspect of the terrain in radians. 0 is East, pi/2 is North, pi is West, 3pi/2 is South. Only available for globe materials.
- * @property {float} waterMask The value of the water mask. 0 is land, 1 is water. Only available for globe materials.
- */
- struct czm_materialInput
- {
- float s;
- vec2 st;
- vec3 str;
- vec3 normalEC;
- mat3 tangentToEyeMatrix;
- vec3 positionToEyeEC;
- float height;
- float slope;
- float aspect;
- float waterMask;
- };
- `;var bP=`/**
- * Struct for representing a material for a {@link Model}. The model
- * rendering pipeline will pass this struct between material, custom shaders,
- * and lighting stages. This is not to be confused with {@link czm_material}
- * which is used by the older Fabric materials system, although they are similar.
- * <p>
- * All color values (diffuse, specular, emissive) are in linear color space.
- * </p>
- *
- * @name czm_modelMaterial
- * @glslStruct
- *
- * @property {vec4} baseColor The base color of the material.
- * @property {vec3} diffuse Incoming light that scatters evenly in all directions.
- * @property {float} alpha Alpha of this material. 0.0 is completely transparent; 1.0 is completely opaque.
- * @property {vec3} specular Color of reflected light at normal incidence in PBR materials. This is sometimes referred to as f0 in the literature.
- * @property {float} roughness A number from 0.0 to 1.0 representing how rough the surface is. Values near 0.0 produce glossy surfaces, while values near 1.0 produce rough surfaces.
- * @property {vec3} normalEC Surface's normal in eye coordinates. It is used for effects such as normal mapping. The default is the surface's unmodified normal.
- * @property {float} occlusion Ambient occlusion recieved at this point on the material. 1.0 means fully lit, 0.0 means fully occluded.
- * @property {vec3} emissive Light emitted by the material equally in all directions. The default is vec3(0.0), which emits no light.
- */
- struct czm_modelMaterial {
- vec4 baseColor;
- vec3 diffuse;
- float alpha;
- vec3 specular;
- float roughness;
- vec3 normalEC;
- float occlusion;
- vec3 emissive;
- #ifdef USE_SPECULAR
- float specularWeight;
- #endif
- #ifdef USE_ANISOTROPY
- vec3 anisotropicT;
- vec3 anisotropicB;
- float anisotropyStrength;
- #endif
- #ifdef USE_CLEARCOAT
- float clearcoatFactor;
- float clearcoatRoughness;
- vec3 clearcoatNormal;
- // Add clearcoatF0 when KHR_materials_ior is implemented
- #endif
- };
- `;var CP=`/**
- * Struct for representing the output of a custom vertex shader.
- *
- * @name czm_modelVertexOutput
- * @glslStruct
- *
- * @see {@link CustomShader}
- * @see {@link Model}
- *
- * @property {vec3} positionMC The position of the vertex in model coordinates
- * @property {float} pointSize A custom value for gl_PointSize. This is only used for point primitives.
- */
- struct czm_modelVertexOutput {
- vec3 positionMC;
- float pointSize;
- };
- `;var TP=`/**
- * DOC_TBA
- *
- * @name czm_ray
- * @glslStruct
- */
- struct czm_ray
- {
- vec3 origin;
- vec3 direction;
- };
- `;var EP=`/**
- * DOC_TBA
- *
- * @name czm_raySegment
- * @glslStruct
- */
- struct czm_raySegment
- {
- float start;
- float stop;
- };
-
- /**
- * DOC_TBA
- *
- * @name czm_emptyRaySegment
- * @glslConstant
- */
- const czm_raySegment czm_emptyRaySegment = czm_raySegment(-czm_infinity, -czm_infinity);
-
- /**
- * DOC_TBA
- *
- * @name czm_fullRaySegment
- * @glslConstant
- */
- const czm_raySegment czm_fullRaySegment = czm_raySegment(0.0, czm_infinity);
- `;var vP=`struct czm_shadowParameters
- {
- #ifdef USE_CUBE_MAP_SHADOW
- vec3 texCoords;
- #else
- vec2 texCoords;
- #endif
-
- float depthBias;
- float depth;
- float nDotL;
- vec2 texelStepSize;
- float normalShadingSmooth;
- float darkness;
- };
- `;var SP=`/**
- * Converts an HSB color (hue, saturation, brightness) to RGB
- * HSB <-> RGB conversion with minimal branching: {@link http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl}
- *
- * @name czm_HSBToRGB
- * @glslFunction
- *
- * @param {vec3} hsb The color in HSB.
- *
- * @returns {vec3} The color in RGB.
- *
- * @example
- * vec3 hsb = czm_RGBToHSB(rgb);
- * hsb.z *= 0.1;
- * rgb = czm_HSBToRGB(hsb);
- */
-
- const vec4 K_HSB2RGB = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
-
- vec3 czm_HSBToRGB(vec3 hsb)
- {
- vec3 p = abs(fract(hsb.xxx + K_HSB2RGB.xyz) * 6.0 - K_HSB2RGB.www);
- return hsb.z * mix(K_HSB2RGB.xxx, clamp(p - K_HSB2RGB.xxx, 0.0, 1.0), hsb.y);
- }
- `;var wP=`/**
- * Converts an HSL color (hue, saturation, lightness) to RGB
- * HSL <-> RGB conversion: {@link http://www.chilliant.com/rgb2hsv.html}
- *
- * @name czm_HSLToRGB
- * @glslFunction
- *
- * @param {vec3} rgb The color in HSL.
- *
- * @returns {vec3} The color in RGB.
- *
- * @example
- * vec3 hsl = czm_RGBToHSL(rgb);
- * hsl.z *= 0.1;
- * rgb = czm_HSLToRGB(hsl);
- */
-
- vec3 hueToRGB(float hue)
- {
- float r = abs(hue * 6.0 - 3.0) - 1.0;
- float g = 2.0 - abs(hue * 6.0 - 2.0);
- float b = 2.0 - abs(hue * 6.0 - 4.0);
- return clamp(vec3(r, g, b), 0.0, 1.0);
- }
-
- vec3 czm_HSLToRGB(vec3 hsl)
- {
- vec3 rgb = hueToRGB(hsl.x);
- float c = (1.0 - abs(2.0 * hsl.z - 1.0)) * hsl.y;
- return (rgb - 0.5) * c + hsl.z;
- }
- `;var IP=`/**
- * Converts an RGB color to HSB (hue, saturation, brightness)
- * HSB <-> RGB conversion with minimal branching: {@link http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl}
- *
- * @name czm_RGBToHSB
- * @glslFunction
- *
- * @param {vec3} rgb The color in RGB.
- *
- * @returns {vec3} The color in HSB.
- *
- * @example
- * vec3 hsb = czm_RGBToHSB(rgb);
- * hsb.z *= 0.1;
- * rgb = czm_HSBToRGB(hsb);
- */
-
- const vec4 K_RGB2HSB = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
-
- vec3 czm_RGBToHSB(vec3 rgb)
- {
- vec4 p = mix(vec4(rgb.bg, K_RGB2HSB.wz), vec4(rgb.gb, K_RGB2HSB.xy), step(rgb.b, rgb.g));
- vec4 q = mix(vec4(p.xyw, rgb.r), vec4(rgb.r, p.yzx), step(p.x, rgb.r));
-
- float d = q.x - min(q.w, q.y);
- return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + czm_epsilon7)), d / (q.x + czm_epsilon7), q.x);
- }
- `;var DP=`/**
- * Converts an RGB color to HSL (hue, saturation, lightness)
- * HSL <-> RGB conversion: {@link http://www.chilliant.com/rgb2hsv.html}
- *
- * @name czm_RGBToHSL
- * @glslFunction
- *
- * @param {vec3} rgb The color in RGB.
- *
- * @returns {vec3} The color in HSL.
- *
- * @example
- * vec3 hsl = czm_RGBToHSL(rgb);
- * hsl.z *= 0.1;
- * rgb = czm_HSLToRGB(hsl);
- */
-
- vec3 RGBtoHCV(vec3 rgb)
- {
- // Based on work by Sam Hocevar and Emil Persson
- vec4 p = (rgb.g < rgb.b) ? vec4(rgb.bg, -1.0, 2.0 / 3.0) : vec4(rgb.gb, 0.0, -1.0 / 3.0);
- vec4 q = (rgb.r < p.x) ? vec4(p.xyw, rgb.r) : vec4(rgb.r, p.yzx);
- float c = q.x - min(q.w, q.y);
- float h = abs((q.w - q.y) / (6.0 * c + czm_epsilon7) + q.z);
- return vec3(h, c, q.x);
- }
-
- vec3 czm_RGBToHSL(vec3 rgb)
- {
- vec3 hcv = RGBtoHCV(rgb);
- float l = hcv.z - hcv.y * 0.5;
- float s = hcv.y / (1.0 - abs(l * 2.0 - 1.0) + czm_epsilon7);
- return vec3(hcv.x, s, l);
- }
- `;var PP=`/**
- * Converts an RGB color to CIE Yxy.
- * <p>The conversion is described in
- * {@link http://content.gpwiki.org/index.php/D3DBook:High-Dynamic_Range_Rendering#Luminance_Transform|Luminance Transform}
- * </p>
- *
- * @name czm_RGBToXYZ
- * @glslFunction
- *
- * @param {vec3} rgb The color in RGB.
- *
- * @returns {vec3} The color in CIE Yxy.
- *
- * @example
- * vec3 xyz = czm_RGBToXYZ(rgb);
- * xyz.x = max(xyz.x - luminanceThreshold, 0.0);
- * rgb = czm_XYZToRGB(xyz);
- */
- vec3 czm_RGBToXYZ(vec3 rgb)
- {
- const mat3 RGB2XYZ = mat3(0.4124, 0.2126, 0.0193,
- 0.3576, 0.7152, 0.1192,
- 0.1805, 0.0722, 0.9505);
- vec3 xyz = RGB2XYZ * rgb;
- vec3 Yxy;
- Yxy.r = xyz.g;
- float temp = dot(vec3(1.0), xyz);
- Yxy.gb = xyz.rg / temp;
- return Yxy;
- }
- `;var RP=`/**
- * Converts a CIE Yxy color to RGB.
- * <p>The conversion is described in
- * {@link http://content.gpwiki.org/index.php/D3DBook:High-Dynamic_Range_Rendering#Luminance_Transform|Luminance Transform}
- * </p>
- *
- * @name czm_XYZToRGB
- * @glslFunction
- *
- * @param {vec3} Yxy The color in CIE Yxy.
- *
- * @returns {vec3} The color in RGB.
- *
- * @example
- * vec3 xyz = czm_RGBToXYZ(rgb);
- * xyz.x = max(xyz.x - luminanceThreshold, 0.0);
- * rgb = czm_XYZToRGB(xyz);
- */
- vec3 czm_XYZToRGB(vec3 Yxy)
- {
- const mat3 XYZ2RGB = mat3( 3.2405, -0.9693, 0.0556,
- -1.5371, 1.8760, -0.2040,
- -0.4985, 0.0416, 1.0572);
- vec3 xyz;
- xyz.r = Yxy.r * Yxy.g / Yxy.b;
- xyz.g = Yxy.r;
- xyz.b = Yxy.r * (1.0 - Yxy.g - Yxy.b) / Yxy.b;
-
- return XYZ2RGB * xyz;
- }
- `;var OP=`// See:
- // https://knarkowicz.wordpress.com/2016/01/06/aces-filmic-tone-mapping-curve/
-
- vec3 czm_acesTonemapping(vec3 color) {
- float g = 0.985;
- float a = 0.065;
- float b = 0.0001;
- float c = 0.433;
- float d = 0.238;
-
- color = (color * (color + a) - b) / (color * (g * color + c) + d);
-
- color = clamp(color, 0.0, 1.0);
-
- return color;
- }
- `;var MP=`/**
- * @private
- */
- float czm_alphaWeight(float a)
- {
- float z = (gl_FragCoord.z - czm_viewportTransformation[3][2]) / czm_viewportTransformation[2][2];
-
- // See Weighted Blended Order-Independent Transparency for examples of different weighting functions:
- // http://jcgt.org/published/0002/02/09/
- return pow(a + 0.01, 4.0) + max(1e-2, min(3.0 * 1e3, 0.003 / (1e-5 + pow(abs(z) / 200.0, 4.0))));
- }
- `;var BP=`/**
- * Procedural anti-aliasing by blurring two colors that meet at a sharp edge.
- *
- * @name czm_antialias
- * @glslFunction
- *
- * @param {vec4} color1 The color on one side of the edge.
- * @param {vec4} color2 The color on the other side of the edge.
- * @param {vec4} currentcolor The current color, either <code>color1</code> or <code>color2</code>.
- * @param {float} dist The distance to the edge in texture coordinates.
- * @param {float} [fuzzFactor=0.1] Controls the blurriness between the two colors.
- * @returns {vec4} The anti-aliased color.
- *
- * @example
- * // GLSL declarations
- * vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist, float fuzzFactor);
- * vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist);
- *
- * // get the color for a material that has a sharp edge at the line y = 0.5 in texture space
- * float dist = abs(textureCoordinates.t - 0.5);
- * vec4 currentColor = mix(bottomColor, topColor, step(0.5, textureCoordinates.t));
- * vec4 color = czm_antialias(bottomColor, topColor, currentColor, dist, 0.1);
- */
- vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist, float fuzzFactor)
- {
- float val1 = clamp(dist / fuzzFactor, 0.0, 1.0);
- float val2 = clamp((dist - 0.5) / fuzzFactor, 0.0, 1.0);
- val1 = val1 * (1.0 - val2);
- val1 = val1 * val1 * (3.0 - (2.0 * val1));
- val1 = pow(val1, 0.5); //makes the transition nicer
-
- vec4 midColor = (color1 + color2) * 0.5;
- return mix(midColor, currentColor, val1);
- }
-
- vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist)
- {
- return czm_antialias(color1, color2, currentColor, dist, 0.1);
- }
- `;var LP=`/**
- * Apply a HSB color shift to an RGB color.
- *
- * @param {vec3} rgb The color in RGB space.
- * @param {vec3} hsbShift The amount to shift each component. The xyz components correspond to hue, saturation, and brightness. Shifting the hue by +/- 1.0 corresponds to shifting the hue by a full cycle. Saturation and brightness are clamped between 0 and 1 after the adjustment
- * @param {bool} ignoreBlackPixels If true, black pixels will be unchanged. This is necessary in some shaders such as atmosphere-related effects.
- *
- * @return {vec3} The RGB color after shifting in HSB space and clamping saturation and brightness to a valid range.
- */
- vec3 czm_applyHSBShift(vec3 rgb, vec3 hsbShift, bool ignoreBlackPixels) {
- // Convert rgb color to hsb
- vec3 hsb = czm_RGBToHSB(rgb);
-
- // Perform hsb shift
- // Hue cycles around so no clamp is needed.
- hsb.x += hsbShift.x; // hue
- hsb.y = clamp(hsb.y + hsbShift.y, 0.0, 1.0); // saturation
-
- // brightness
- //
- // Some shaders such as atmosphere-related effects need to leave black
- // pixels unchanged
- if (ignoreBlackPixels) {
- hsb.z = hsb.z > czm_epsilon7 ? hsb.z + hsbShift.z : 0.0;
- } else {
- hsb.z = hsb.z + hsbShift.z;
- }
- hsb.z = clamp(hsb.z, 0.0, 1.0);
-
- // Convert shifted hsb back to rgb
- return czm_HSBToRGB(hsb);
- }
- `;var NP=`/**
- * Approximately computes spherical coordinates given a normal.
- * Uses approximate inverse trigonometry for speed and consistency,
- * since inverse trigonometry can differ from vendor-to-vendor and when compared with the CPU.
- *
- * @name czm_approximateSphericalCoordinates
- * @glslFunction
- *
- * @param {vec3} normal arbitrary-length normal.
- *
- * @returns {vec2} Approximate latitude and longitude spherical coordinates.
- */
- vec2 czm_approximateSphericalCoordinates(vec3 normal) {
- // Project into plane with vertical for latitude
- float latitudeApproximation = czm_fastApproximateAtan(sqrt(normal.x * normal.x + normal.y * normal.y), normal.z);
- float longitudeApproximation = czm_fastApproximateAtan(normal.x, normal.y);
- return vec2(latitudeApproximation, longitudeApproximation);
- }
- `;var FP=`/**
- * Compute a rational approximation to tanh(x)
- *
- * @param {float} x A real number input
- * @returns {float} An approximation for tanh(x)
- */
- float czm_approximateTanh(float x) {
- float x2 = x * x;
- return max(-1.0, min(1.0, x * (27.0 + x2) / (27.0 + 9.0 * x2)));
- }
- `;var kP=`/**
- * Determines if the fragment is back facing
- *
- * @name czm_backFacing
- * @glslFunction
- *
- * @returns {bool} <code>true</code> if the fragment is back facing; otherwise, <code>false</code>.
- */
- bool czm_backFacing()
- {
- // !gl_FrontFacing doesn't work as expected on Mac/Intel so use the more verbose form instead. See https://github.com/CesiumGS/cesium/pull/8494.
- return gl_FrontFacing == false;
- }
- `;var zP=`/**
- * Branchless ternary operator to be used when it's inexpensive to explicitly
- * evaluate both possibilities for a float expression.
- *
- * @name czm_branchFreeTernary
- * @glslFunction
- *
- * @param {bool} comparison A comparison statement
- * @param {float} a Value to return if the comparison is true.
- * @param {float} b Value to return if the comparison is false.
- *
- * @returns {float} equivalent of comparison ? a : b
- */
- float czm_branchFreeTernary(bool comparison, float a, float b) {
- float useA = float(comparison);
- return a * useA + b * (1.0 - useA);
- }
-
- /**
- * Branchless ternary operator to be used when it's inexpensive to explicitly
- * evaluate both possibilities for a vec2 expression.
- *
- * @name czm_branchFreeTernary
- * @glslFunction
- *
- * @param {bool} comparison A comparison statement
- * @param {vec2} a Value to return if the comparison is true.
- * @param {vec2} b Value to return if the comparison is false.
- *
- * @returns {vec2} equivalent of comparison ? a : b
- */
- vec2 czm_branchFreeTernary(bool comparison, vec2 a, vec2 b) {
- float useA = float(comparison);
- return a * useA + b * (1.0 - useA);
- }
-
- /**
- * Branchless ternary operator to be used when it's inexpensive to explicitly
- * evaluate both possibilities for a vec3 expression.
- *
- * @name czm_branchFreeTernary
- * @glslFunction
- *
- * @param {bool} comparison A comparison statement
- * @param {vec3} a Value to return if the comparison is true.
- * @param {vec3} b Value to return if the comparison is false.
- *
- * @returns {vec3} equivalent of comparison ? a : b
- */
- vec3 czm_branchFreeTernary(bool comparison, vec3 a, vec3 b) {
- float useA = float(comparison);
- return a * useA + b * (1.0 - useA);
- }
-
- /**
- * Branchless ternary operator to be used when it's inexpensive to explicitly
- * evaluate both possibilities for a vec4 expression.
- *
- * @name czm_branchFreeTernary
- * @glslFunction
- *
- * @param {bool} comparison A comparison statement
- * @param {vec3} a Value to return if the comparison is true.
- * @param {vec3} b Value to return if the comparison is false.
- *
- * @returns {vec3} equivalent of comparison ? a : b
- */
- vec4 czm_branchFreeTernary(bool comparison, vec4 a, vec4 b) {
- float useA = float(comparison);
- return a * useA + b * (1.0 - useA);
- }
- `;var UP=`
- vec4 czm_cascadeColor(vec4 weights)
- {
- return vec4(1.0, 0.0, 0.0, 1.0) * weights.x +
- vec4(0.0, 1.0, 0.0, 1.0) * weights.y +
- vec4(0.0, 0.0, 1.0, 1.0) * weights.z +
- vec4(1.0, 0.0, 1.0, 1.0) * weights.w;
- }
- `;var VP=`
- uniform vec4 shadowMap_cascadeDistances;
-
- float czm_cascadeDistance(vec4 weights)
- {
- return dot(shadowMap_cascadeDistances, weights);
- }
- `;var jP=`
- uniform mat4 shadowMap_cascadeMatrices[4];
-
- mat4 czm_cascadeMatrix(vec4 weights)
- {
- return shadowMap_cascadeMatrices[0] * weights.x +
- shadowMap_cascadeMatrices[1] * weights.y +
- shadowMap_cascadeMatrices[2] * weights.z +
- shadowMap_cascadeMatrices[3] * weights.w;
- }
- `;var GP=`
- uniform vec4 shadowMap_cascadeSplits[2];
-
- vec4 czm_cascadeWeights(float depthEye)
- {
- // One component is set to 1.0 and all others set to 0.0.
- vec4 near = step(shadowMap_cascadeSplits[0], vec4(depthEye));
- vec4 far = step(depthEye, shadowMap_cascadeSplits[1]);
- return near * far;
- }
- `;var HP=`float getSignedDistance(vec2 uv, highp sampler2D clippingDistance) {
- float signedDistance = texture(clippingDistance, uv).r;
- return (signedDistance - 0.5) * 2.0;
- }
-
- void czm_clipPolygons(highp sampler2D clippingDistance, int extentsLength, vec2 clippingPosition, int regionIndex) {
- // Position is completely outside of polygons bounds
- vec2 rectUv = clippingPosition;
- if (regionIndex < 0 || rectUv.x <= 0.0 || rectUv.y <= 0.0 || rectUv.x >= 1.0 || rectUv.y >= 1.0) {
- #ifdef CLIPPING_INVERSE
- discard;
- #endif
- return;
- }
-
- vec2 clippingDistanceTextureDimensions = vec2(textureSize(clippingDistance, 0));
- vec2 sampleOffset = max(1.0 / clippingDistanceTextureDimensions, vec2(0.005));
- float dimension = float(extentsLength);
- if (extentsLength > 2) {
- dimension = ceil(log2(float(extentsLength)));
- }
-
- vec2 textureOffset = vec2(mod(float(regionIndex), dimension), floor(float(regionIndex) / dimension)) / dimension;
- vec2 uv = textureOffset + rectUv / dimension;
-
- float signedDistance = getSignedDistance(uv, clippingDistance);
-
- #ifdef CLIPPING_INVERSE
- if (signedDistance > 0.0) {
- discard;
- }
- #else
- if (signedDistance < 0.0) {
- discard;
- }
- #endif
- }
- `;var WP=`/**
- * DOC_TBA
- *
- * @name czm_columbusViewMorph
- * @glslFunction
- */
- vec4 czm_columbusViewMorph(vec4 position2D, vec4 position3D, float time)
- {
- // Just linear for now.
- // We're manually doing the equivalent of a \`mix\` here because, some GPUs
- // (NVidia GeForce 3070 Ti and Intel Arc A750, to name two), \`mix\` seems to
- // use an alternate formulation that introduces jitter even when \`time\` is
- // 0.0 or 1.0. That is, the value of \`p\` won't be exactly \`position2D.xyz\`
- // when \`time\` is 0.0 and it won't be exactly \`position3D.xyz\` when \`time\` is
- // 1.0. The "textbook" formulation here, while probably a bit slower,
- // does not have this problem.
- vec3 p = position2D.xyz * (1.0 - time) + position3D.xyz * time;
- return vec4(p, 1.0);
- }
- `;var qP=`/**
- * Compute the atmosphere color, applying Rayleigh and Mie scattering. This
- * builtin uses automatic uniforms so the atmophere settings are synced with the
- * state of the Scene, even in other contexts like Model.
- *
- * @name czm_computeAtmosphereColor
- * @glslFunction
- *
- * @param {vec3} positionWC Position of the fragment in world coords (low precision)
- * @param {vec3} lightDirection Light direction from the sun or other light source.
- * @param {vec3} rayleighColor The Rayleigh scattering color computed by a scattering function
- * @param {vec3} mieColor The Mie scattering color computed by a scattering function
- * @param {float} opacity The opacity computed by a scattering function.
- */
- vec4 czm_computeAtmosphereColor(
- vec3 positionWC,
- vec3 lightDirection,
- vec3 rayleighColor,
- vec3 mieColor,
- float opacity
- ) {
- // Setup the primary ray: from the camera position to the vertex position.
- vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC;
- vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);
-
- float cosAngle = dot(cameraToPositionWCDirection, lightDirection);
- float cosAngleSq = cosAngle * cosAngle;
-
- float G = czm_atmosphereMieAnisotropy;
- float GSq = G * G;
-
- // The Rayleigh phase function.
- float rayleighPhase = 3.0 / (50.2654824574) * (1.0 + cosAngleSq);
- // The Mie phase function.
- float miePhase = 3.0 / (25.1327412287) * ((1.0 - GSq) * (cosAngleSq + 1.0)) / (pow(1.0 + GSq - 2.0 * cosAngle * G, 1.5) * (2.0 + GSq));
-
- // The final color is generated by combining the effects of the Rayleigh and Mie scattering.
- vec3 rayleigh = rayleighPhase * rayleighColor;
- vec3 mie = miePhase * mieColor;
-
- vec3 color = (rayleigh + mie) * czm_atmosphereLightIntensity;
-
- return vec4(color, opacity);
- }
-
- /**
- * Compute the atmosphere color, applying Rayleigh and Mie scattering. This
- * builtin uses automatic uniforms so the atmophere settings are synced with the
- * state of the Scene, even in other contexts like Model.
- *
- * @name czm_computeAtmosphereColor
- * @glslFunction
- *
- * @param {czm_ray} primaryRay Ray from the origin to sky fragment to in world coords (low precision)
- * @param {vec3} lightDirection Light direction from the sun or other light source.
- * @param {vec3} rayleighColor The Rayleigh scattering color computed by a scattering function
- * @param {vec3} mieColor The Mie scattering color computed by a scattering function
- * @param {float} opacity The opacity computed by a scattering function.
- */
- vec4 czm_computeAtmosphereColor(
- czm_ray primaryRay,
- vec3 lightDirection,
- vec3 rayleighColor,
- vec3 mieColor,
- float opacity
- ) {
- vec3 direction = normalize(primaryRay.direction);
-
- float cosAngle = dot(direction, lightDirection);
- float cosAngleSq = cosAngle * cosAngle;
-
- float G = czm_atmosphereMieAnisotropy;
- float GSq = G * G;
-
- // The Rayleigh phase function.
- float rayleighPhase = 3.0 / (50.2654824574) * (1.0 + cosAngleSq);
- // The Mie phase function.
- float miePhase = 3.0 / (25.1327412287) * ((1.0 - GSq) * (cosAngleSq + 1.0)) / (pow(1.0 + GSq - 2.0 * cosAngle * G, 1.5) * (2.0 + GSq));
-
- // The final color is generated by combining the effects of the Rayleigh and Mie scattering.
- vec3 rayleigh = rayleighPhase * rayleighColor;
- vec3 mie = miePhase * mieColor;
-
- vec3 color = (rayleigh + mie) * czm_atmosphereLightIntensity;
-
- return vec4(color, opacity);
- }
-
- `;var YP=`/**
- * Compute atmosphere scattering for the ground atmosphere and fog. This method
- * uses automatic uniforms so it is always synced with the scene settings.
- *
- * @name czm_computeGroundAtmosphereScattering
- * @glslfunction
- *
- * @param {vec3} positionWC The position of the fragment in world coordinates.
- * @param {vec3} lightDirection The direction of the light to calculate the scattering from.
- * @param {vec3} rayleighColor The variable the Rayleigh scattering will be written to.
- * @param {vec3} mieColor The variable the Mie scattering will be written to.
- * @param {float} opacity The variable the transmittance will be written to.
- */
- void czm_computeGroundAtmosphereScattering(vec3 positionWC, vec3 lightDirection, out vec3 rayleighColor, out vec3 mieColor, out float opacity) {
- vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC;
- vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);
- czm_ray primaryRay = czm_ray(czm_viewerPositionWC, cameraToPositionWCDirection);
-
- float atmosphereInnerRadius = length(positionWC);
-
- czm_computeScattering(
- primaryRay,
- length(cameraToPositionWC),
- lightDirection,
- atmosphereInnerRadius,
- rayleighColor,
- mieColor,
- opacity
- );
- }
- `;var XP=`/**
- * Returns a position in model coordinates relative to eye taking into
- * account the current scene mode: 3D, 2D, or Columbus view.
- * <p>
- * This uses standard position attributes, <code>position3DHigh</code>,
- * <code>position3DLow</code>, <code>position2DHigh</code>, and <code>position2DLow</code>,
- * and should be used when writing a vertex shader for an {@link Appearance}.
- * </p>
- *
- * @name czm_computePosition
- * @glslFunction
- *
- * @returns {vec4} The position relative to eye.
- *
- * @example
- * vec4 p = czm_computePosition();
- * v_positionEC = (czm_modelViewRelativeToEye * p).xyz;
- * gl_Position = czm_modelViewProjectionRelativeToEye * p;
- *
- * @see czm_translateRelativeToEye
- */
- vec4 czm_computePosition();
- `;var KP=`/**
- * This function computes the colors contributed by Rayliegh and Mie scattering on a given ray, as well as
- * the transmittance value for the ray. This function uses automatic uniforms
- * so the atmosphere settings are always synced with the current scene.
- *
- * @name czm_computeScattering
- * @glslfunction
- *
- * @param {czm_ray} primaryRay The ray from the camera to the position.
- * @param {float} primaryRayLength The length of the primary ray.
- * @param {vec3} lightDirection The direction of the light to calculate the scattering from.
- * @param {vec3} rayleighColor The variable the Rayleigh scattering will be written to.
- * @param {vec3} mieColor The variable the Mie scattering will be written to.
- * @param {float} opacity The variable the transmittance will be written to.
- */
- void czm_computeScattering(
- czm_ray primaryRay,
- float primaryRayLength,
- vec3 lightDirection,
- float atmosphereInnerRadius,
- out vec3 rayleighColor,
- out vec3 mieColor,
- out float opacity
- ) {
- const float ATMOSPHERE_THICKNESS = 111e3; // The thickness of the atmosphere in meters.
- const int PRIMARY_STEPS_MAX = 16; // Maximum number of times the ray from the camera to the world position (primary ray) is sampled.
- const int LIGHT_STEPS_MAX = 4; // Maximum number of times the light is sampled from the light source's intersection with the atmosphere to a sample position on the primary ray.
-
- // Initialize the default scattering amounts to 0.
- rayleighColor = vec3(0.0);
- mieColor = vec3(0.0);
- opacity = 0.0;
-
- float atmosphereOuterRadius = atmosphereInnerRadius + ATMOSPHERE_THICKNESS;
-
- vec3 origin = vec3(0.0);
-
- // Calculate intersection from the camera to the outer ring of the atmosphere.
- czm_raySegment primaryRayAtmosphereIntersect = czm_raySphereIntersectionInterval(primaryRay, origin, atmosphereOuterRadius);
-
- // Return empty colors if no intersection with the atmosphere geometry.
- if (primaryRayAtmosphereIntersect == czm_emptyRaySegment) {
- return;
- }
-
- // To deal with smaller values of PRIMARY_STEPS (e.g. 4)
- // we implement a split strategy: sky or horizon.
- // For performance reasons, instead of a if/else branch
- // a soft choice is implemented through a weight 0.0 <= w_stop_gt_lprl <= 1.0
- float x = 1e-7 * primaryRayAtmosphereIntersect.stop / length(primaryRayLength);
- // Value close to 0.0: close to the horizon
- // Value close to 1.0: above in the sky
- float w_stop_gt_lprl = 0.5 * (1.0 + czm_approximateTanh(x));
-
- // The ray should start from the first intersection with the outer atmopshere, or from the camera position, if it is inside the atmosphere.
- float start_0 = primaryRayAtmosphereIntersect.start;
- primaryRayAtmosphereIntersect.start = max(primaryRayAtmosphereIntersect.start, 0.0);
- // The ray should end at the exit from the atmosphere or at the distance to the vertex, whichever is smaller.
- primaryRayAtmosphereIntersect.stop = min(primaryRayAtmosphereIntersect.stop, length(primaryRayLength));
-
- // For the number of ray steps, distinguish inside or outside atmosphere (outer space)
- // (1) from outer space we have to use more ray steps to get a realistic rendering
- // (2) within atmosphere we need fewer steps for faster rendering
- float x_o_a = start_0 - ATMOSPHERE_THICKNESS; // ATMOSPHERE_THICKNESS used as an ad-hoc constant, no precise meaning here, only the order of magnitude matters
- float w_inside_atmosphere = 1.0 - 0.5 * (1.0 + czm_approximateTanh(x_o_a));
- int PRIMARY_STEPS = PRIMARY_STEPS_MAX - int(w_inside_atmosphere * 12.0); // Number of times the ray from the camera to the world position (primary ray) is sampled.
- int LIGHT_STEPS = LIGHT_STEPS_MAX - int(w_inside_atmosphere * 2.0); // Number of times the light is sampled from the light source's intersection with the atmosphere to a sample position on the primary ray.
-
- // Setup for sampling positions along the ray - starting from the intersection with the outer ring of the atmosphere.
- float rayPositionLength = primaryRayAtmosphereIntersect.start;
- // (1) Outside the atmosphere: constant rayStepLength
- // (2) Inside atmosphere: variable rayStepLength to compensate the rough rendering of the smaller number of ray steps
- float totalRayLength = primaryRayAtmosphereIntersect.stop - rayPositionLength;
- float rayStepLengthIncrease = w_inside_atmosphere * ((1.0 - w_stop_gt_lprl) * totalRayLength / (float(PRIMARY_STEPS * (PRIMARY_STEPS + 1)) / 2.0));
- float rayStepLength = max(1.0 - w_inside_atmosphere, w_stop_gt_lprl) * totalRayLength / max(7.0 * w_inside_atmosphere, float(PRIMARY_STEPS));
-
- vec3 rayleighAccumulation = vec3(0.0);
- vec3 mieAccumulation = vec3(0.0);
- vec2 opticalDepth = vec2(0.0);
- vec2 heightScale = vec2(czm_atmosphereRayleighScaleHeight, czm_atmosphereMieScaleHeight);
-
- // Sample positions on the primary ray.
- for (int i = 0; i < PRIMARY_STEPS_MAX; ++i) {
-
- // The loop should be: for (int i = 0; i < PRIMARY_STEPS; ++i) {...} but WebGL1 cannot
- // loop with non-constant condition, so it has to break early instead
- if (i >= PRIMARY_STEPS) {
- break;
- }
-
- // Calculate sample position along viewpoint ray.
- vec3 samplePosition = primaryRay.origin + primaryRay.direction * (rayPositionLength + rayStepLength);
-
- // Calculate height of sample position above ellipsoid.
- float sampleHeight = length(samplePosition) - atmosphereInnerRadius;
-
- // Calculate and accumulate density of particles at the sample position.
- vec2 sampleDensity = exp(-sampleHeight / heightScale) * rayStepLength;
- opticalDepth += sampleDensity;
-
- // Generate ray from the sample position segment to the light source, up to the outer ring of the atmosphere.
- czm_ray lightRay = czm_ray(samplePosition, lightDirection);
- czm_raySegment lightRayAtmosphereIntersect = czm_raySphereIntersectionInterval(lightRay, origin, atmosphereOuterRadius);
-
- float lightStepLength = lightRayAtmosphereIntersect.stop / float(LIGHT_STEPS);
- float lightPositionLength = 0.0;
-
- vec2 lightOpticalDepth = vec2(0.0);
-
- // Sample positions along the light ray, to accumulate incidence of light on the latest sample segment.
- for (int j = 0; j < LIGHT_STEPS_MAX; ++j) {
-
- // The loop should be: for (int j = 0; i < LIGHT_STEPS; ++j) {...} but WebGL1 cannot
- // loop with non-constant condition, so it has to break early instead
- if (j >= LIGHT_STEPS) {
- break;
- }
-
- // Calculate sample position along light ray.
- vec3 lightPosition = samplePosition + lightDirection * (lightPositionLength + lightStepLength * 0.5);
-
- // Calculate height of the light sample position above ellipsoid.
- float lightHeight = length(lightPosition) - atmosphereInnerRadius;
-
- // Calculate density of photons at the light sample position.
- lightOpticalDepth += exp(-lightHeight / heightScale) * lightStepLength;
-
- // Increment distance on light ray.
- lightPositionLength += lightStepLength;
- }
-
- // Compute attenuation via the primary ray and the light ray.
- vec3 attenuation = exp(-((czm_atmosphereMieCoefficient * (opticalDepth.y + lightOpticalDepth.y)) + (czm_atmosphereRayleighCoefficient * (opticalDepth.x + lightOpticalDepth.x))));
-
- // Accumulate the scattering.
- rayleighAccumulation += sampleDensity.x * attenuation;
- mieAccumulation += sampleDensity.y * attenuation;
-
- // Increment distance on primary ray.
- rayPositionLength += (rayStepLength += rayStepLengthIncrease);
- }
-
- // Compute the scattering amount.
- rayleighColor = czm_atmosphereRayleighCoefficient * rayleighAccumulation;
- mieColor = czm_atmosphereMieCoefficient * mieAccumulation;
-
- // Compute the transmittance i.e. how much light is passing through the atmosphere.
- opacity = length(exp(-((czm_atmosphereMieCoefficient * opticalDepth.y) + (czm_atmosphereRayleighCoefficient * opticalDepth.x))));
- }
- `;var QP=`/**
- * Applies a 2D texture transformation matrix to texture coordinates.
- * This function applies translation, rotation, and scaling transformations
- * as specified by the KHR_texture_transform glTF extension.
- *
- * @name czm_computeTextureTransform
- * @glslFunction
- *
- * @param {vec2} texCoord The texture coordinates to transform.
- * @param {mat3} textureTransform The 3x3 transformation matrix.
- *
- * @returns {vec2} The transformed texture coordinates.
- *
- * @example
- * // GLSL declaration
- * vec2 czm_computeTextureTransform(vec2 texCoord, mat3 textureTransform);
- *
- * // Apply texture transform to UV coordinates
- * vec2 transformedUV = czm_computeTextureTransform(uv, u_textureTransform);
- */
- vec2 czm_computeTextureTransform(vec2 texCoord, mat3 textureTransform)
- {
- return vec2(textureTransform * vec3(texCoord, 1.0));
- }`;var $P=`/**
- * @private
- */
- vec2 cordic(float angle)
- {
- // Scale the vector by the appropriate factor for the 24 iterations to follow.
- vec2 vector = vec2(6.0725293500888267e-1, 0.0);
- // Iteration 1
- float sense = (angle < 0.0) ? -1.0 : 1.0;
- // float factor = sense * 1.0; // 2^-0
- mat2 rotation = mat2(1.0, sense, -sense, 1.0);
- vector = rotation * vector;
- angle -= sense * 7.8539816339744828e-1; // atan(2^-0)
- // Iteration 2
- sense = (angle < 0.0) ? -1.0 : 1.0;
- float factor = sense * 5.0e-1; // 2^-1
- rotation[0][1] = factor;
- rotation[1][0] = -factor;
- vector = rotation * vector;
- angle -= sense * 4.6364760900080609e-1; // atan(2^-1)
- // Iteration 3
- sense = (angle < 0.0) ? -1.0 : 1.0;
- factor = sense * 2.5e-1; // 2^-2
- rotation[0][1] = factor;
- rotation[1][0] = -factor;
- vector = rotation * vector;
- angle -= sense * 2.4497866312686414e-1; // atan(2^-2)
- // Iteration 4
- sense = (angle < 0.0) ? -1.0 : 1.0;
- factor = sense * 1.25e-1; // 2^-3
- rotation[0][1] = factor;
- rotation[1][0] = -factor;
- vector = rotation * vector;
- angle -= sense * 1.2435499454676144e-1; // atan(2^-3)
- // Iteration 5
- sense = (angle < 0.0) ? -1.0 : 1.0;
- factor = sense * 6.25e-2; // 2^-4
- rotation[0][1] = factor;
- rotation[1][0] = -factor;
- vector = rotation * vector;
- angle -= sense * 6.2418809995957350e-2; // atan(2^-4)
- // Iteration 6
- sense = (angle < 0.0) ? -1.0 : 1.0;
- factor = sense * 3.125e-2; // 2^-5
- rotation[0][1] = factor;
- rotation[1][0] = -factor;
- vector = rotation * vector;
- angle -= sense * 3.1239833430268277e-2; // atan(2^-5)
- // Iteration 7
- sense = (angle < 0.0) ? -1.0 : 1.0;
- factor = sense * 1.5625e-2; // 2^-6
- rotation[0][1] = factor;
- rotation[1][0] = -factor;
- vector = rotation * vector;
- angle -= sense * 1.5623728620476831e-2; // atan(2^-6)
- // Iteration 8
- sense = (angle < 0.0) ? -1.0 : 1.0;
- factor = sense * 7.8125e-3; // 2^-7
- rotation[0][1] = factor;
- rotation[1][0] = -factor;
- vector = rotation * vector;
- angle -= sense * 7.8123410601011111e-3; // atan(2^-7)
- // Iteration 9
- sense = (angle < 0.0) ? -1.0 : 1.0;
- factor = sense * 3.90625e-3; // 2^-8
- rotation[0][1] = factor;
- rotation[1][0] = -factor;
- vector = rotation * vector;
- angle -= sense * 3.9062301319669718e-3; // atan(2^-8)
- // Iteration 10
- sense = (angle < 0.0) ? -1.0 : 1.0;
- factor = sense * 1.953125e-3; // 2^-9
- rotation[0][1] = factor;
- rotation[1][0] = -factor;
- vector = rotation * vector;
- angle -= sense * 1.9531225164788188e-3; // atan(2^-9)
- // Iteration 11
- sense = (angle < 0.0) ? -1.0 : 1.0;
- factor = sense * 9.765625e-4; // 2^-10
- rotation[0][1] = factor;
- rotation[1][0] = -factor;
- vector = rotation * vector;
- angle -= sense * 9.7656218955931946e-4; // atan(2^-10)
- // Iteration 12
- sense = (angle < 0.0) ? -1.0 : 1.0;
- factor = sense * 4.8828125e-4; // 2^-11
- rotation[0][1] = factor;
- rotation[1][0] = -factor;
- vector = rotation * vector;
- angle -= sense * 4.8828121119489829e-4; // atan(2^-11)
- // Iteration 13
- sense = (angle < 0.0) ? -1.0 : 1.0;
- factor = sense * 2.44140625e-4; // 2^-12
- rotation[0][1] = factor;
- rotation[1][0] = -factor;
- vector = rotation * vector;
- angle -= sense * 2.4414062014936177e-4; // atan(2^-12)
- // Iteration 14
- sense = (angle < 0.0) ? -1.0 : 1.0;
- factor = sense * 1.220703125e-4; // 2^-13
- rotation[0][1] = factor;
- rotation[1][0] = -factor;
- vector = rotation * vector;
- angle -= sense * 1.2207031189367021e-4; // atan(2^-13)
- // Iteration 15
- sense = (angle < 0.0) ? -1.0 : 1.0;
- factor = sense * 6.103515625e-5; // 2^-14
- rotation[0][1] = factor;
- rotation[1][0] = -factor;
- vector = rotation * vector;
- angle -= sense * 6.1035156174208773e-5; // atan(2^-14)
- // Iteration 16
- sense = (angle < 0.0) ? -1.0 : 1.0;
- factor = sense * 3.0517578125e-5; // 2^-15
- rotation[0][1] = factor;
- rotation[1][0] = -factor;
- vector = rotation * vector;
- angle -= sense * 3.0517578115526096e-5; // atan(2^-15)
- // Iteration 17
- sense = (angle < 0.0) ? -1.0 : 1.0;
- factor = sense * 1.52587890625e-5; // 2^-16
- rotation[0][1] = factor;
- rotation[1][0] = -factor;
- vector = rotation * vector;
- angle -= sense * 1.5258789061315762e-5; // atan(2^-16)
- // Iteration 18
- sense = (angle < 0.0) ? -1.0 : 1.0;
- factor = sense * 7.62939453125e-6; // 2^-17
- rotation[0][1] = factor;
- rotation[1][0] = -factor;
- vector = rotation * vector;
- angle -= sense * 7.6293945311019700e-6; // atan(2^-17)
- // Iteration 19
- sense = (angle < 0.0) ? -1.0 : 1.0;
- factor = sense * 3.814697265625e-6; // 2^-18
- rotation[0][1] = factor;
- rotation[1][0] = -factor;
- vector = rotation * vector;
- angle -= sense * 3.8146972656064961e-6; // atan(2^-18)
- // Iteration 20
- sense = (angle < 0.0) ? -1.0 : 1.0;
- factor = sense * 1.9073486328125e-6; // 2^-19
- rotation[0][1] = factor;
- rotation[1][0] = -factor;
- vector = rotation * vector;
- angle -= sense * 1.9073486328101870e-6; // atan(2^-19)
- // Iteration 21
- sense = (angle < 0.0) ? -1.0 : 1.0;
- factor = sense * 9.5367431640625e-7; // 2^-20
- rotation[0][1] = factor;
- rotation[1][0] = -factor;
- vector = rotation * vector;
- angle -= sense * 9.5367431640596084e-7; // atan(2^-20)
- // Iteration 22
- sense = (angle < 0.0) ? -1.0 : 1.0;
- factor = sense * 4.76837158203125e-7; // 2^-21
- rotation[0][1] = factor;
- rotation[1][0] = -factor;
- vector = rotation * vector;
- angle -= sense * 4.7683715820308884e-7; // atan(2^-21)
- // Iteration 23
- sense = (angle < 0.0) ? -1.0 : 1.0;
- factor = sense * 2.384185791015625e-7; // 2^-22
- rotation[0][1] = factor;
- rotation[1][0] = -factor;
- vector = rotation * vector;
- angle -= sense * 2.3841857910155797e-7; // atan(2^-22)
- // Iteration 24
- sense = (angle < 0.0) ? -1.0 : 1.0;
- factor = sense * 1.1920928955078125e-7; // 2^-23
- rotation[0][1] = factor;
- rotation[1][0] = -factor;
- vector = rotation * vector;
- // angle -= sense * 1.1920928955078068e-7; // atan(2^-23)
-
- return vector;
- }
-
- /**
- * Computes the cosine and sine of the provided angle using the CORDIC algorithm.
- *
- * @name czm_cosineAndSine
- * @glslFunction
- *
- * @param {float} angle The angle in radians.
- *
- * @returns {vec2} The resulting cosine of the angle (as the x coordinate) and sine of the angle (as the y coordinate).
- *
- * @example
- * vec2 v = czm_cosineAndSine(czm_piOverSix);
- * float cosine = v.x;
- * float sine = v.y;
- */
- vec2 czm_cosineAndSine(float angle)
- {
- if (angle < -czm_piOverTwo || angle > czm_piOverTwo)
- {
- if (angle < 0.0)
- {
- return -cordic(angle + czm_pi);
- }
- else
- {
- return -cordic(angle - czm_pi);
- }
- }
- else
- {
- return cordic(angle);
- }
- }
- `;var JP=`/**
- * Decodes RGB values packed into a single float at 8-bit precision. Encoded
- * representation is equivalent to 0xFFFFFF in JavaScript.
- *
- * @name czm_decodeRGB8
- * @glslFunction
- *
- * @param {float} encoded Float-encoded RGB values.
- * @returns {vec4} Decoded RGB values.
- */
- vec4 czm_decodeRGB8(float encoded) {
- const float SHIFT_RIGHT16 = 1.0 / 65536.0;
- const float SHIFT_RIGHT8 = 1.0 / 256.0;
- const float SHIFT_LEFT16 = 65536.0;
- const float SHIFT_LEFT8 = 256.0;
-
- vec4 color = vec4(255.0);
- color.r = floor(encoded * SHIFT_RIGHT16);
- color.g = floor((encoded - color.r * SHIFT_LEFT16) * SHIFT_RIGHT8);
- color.b = floor(encoded - color.r * SHIFT_LEFT16 - color.g * SHIFT_LEFT8);
- return color / 255.0;
- }
- `;var ZP=`/**
- * Decompresses texture coordinates that were packed into a single float.
- *
- * @name czm_decompressTextureCoordinates
- * @glslFunction
- *
- * @param {float} encoded The compressed texture coordinates.
- * @returns {vec2} The decompressed texture coordinates.
- */
- vec2 czm_decompressTextureCoordinates(float encoded)
- {
- float temp = encoded / 4096.0;
- float xZeroTo4095 = floor(temp);
- float stx = xZeroTo4095 / 4095.0;
- float sty = (encoded - xZeroTo4095 * 4096.0) / 4095.0;
- return vec2(stx, sty);
- }
- `;var e1=`// emulated noperspective
- #if (__VERSION__ == 300 || defined(GL_EXT_frag_depth)) && !defined(LOG_DEPTH)
- out float v_WindowZ;
- #endif
-
- /**
- * Emulates GL_DEPTH_CLAMP, which is not available in WebGL 1 or 2.
- * GL_DEPTH_CLAMP clamps geometry that is outside the near and far planes,
- * capping the shadow volume. More information here:
- * https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_depth_clamp.txt.
- *
- * When GL_EXT_frag_depth is available we emulate GL_DEPTH_CLAMP by ensuring
- * no geometry gets clipped by setting the clip space z value to 0.0 and then
- * sending the unaltered screen space z value (using emulated noperspective
- * interpolation) to the frag shader where it is clamped to [0,1] and then
- * written with gl_FragDepth (see czm_writeDepthClamp). This technique is based on:
- * https://stackoverflow.com/questions/5960757/how-to-emulate-gl-depth-clamp-nv.
- *
- * When GL_EXT_frag_depth is not available, which is the case on some mobile
- * devices, we must attempt to fix this only in the vertex shader.
- * The approach is to clamp the z value to the far plane, which closes the
- * shadow volume but also distorts the geometry, so there can still be artifacts
- * on frustum seams.
- *
- * @name czm_depthClamp
- * @glslFunction
- *
- * @param {vec4} coords The vertex in clip coordinates.
- * @returns {vec4} The modified vertex.
- *
- * @example
- * gl_Position = czm_depthClamp(czm_modelViewProjection * vec4(position, 1.0));
- *
- * @see czm_writeDepthClamp
- */
- vec4 czm_depthClamp(vec4 coords)
- {
- #ifndef LOG_DEPTH
- #if __VERSION__ == 300 || defined(GL_EXT_frag_depth)
- v_WindowZ = (0.5 * (coords.z / coords.w) + 0.5) * coords.w;
- coords.z = 0.0;
- #else
- coords.z = min(coords.z, coords.w);
- #endif
- #endif
- return coords;
- }
- `;var t1=`/**
- * Computes a 3x3 rotation matrix that transforms vectors from an ellipsoid's east-north-up coordinate system
- * to eye coordinates. In east-north-up coordinates, x points east, y points north, and z points along the
- * surface normal. East-north-up can be used as an ellipsoid's tangent space for operations such as bump mapping.
- * <br /><br />
- * The ellipsoid is assumed to be centered at the model coordinate's origin.
- *
- * @name czm_eastNorthUpToEyeCoordinates
- * @glslFunction
- *
- * @param {vec3} positionMC The position on the ellipsoid in model coordinates.
- * @param {vec3} normalEC The normalized ellipsoid surface normal, at <code>positionMC</code>, in eye coordinates.
- *
- * @returns {mat3} A 3x3 rotation matrix that transforms vectors from the east-north-up coordinate system to eye coordinates.
- *
- * @example
- * // Transform a vector defined in the east-north-up coordinate
- * // system, (0, 0, 1) which is the surface normal, to eye
- * // coordinates.
- * mat3 m = czm_eastNorthUpToEyeCoordinates(positionMC, normalEC);
- * vec3 normalEC = m * vec3(0.0, 0.0, 1.0);
- */
- mat3 czm_eastNorthUpToEyeCoordinates(vec3 positionMC, vec3 normalEC)
- {
- vec3 tangentMC = normalize(vec3(-positionMC.y, positionMC.x, 0.0)); // normalized surface tangent in model coordinates
- vec3 tangentEC = normalize(czm_normal3D * tangentMC); // normalized surface tangent in eye coordinates
- vec3 bitangentEC = normalize(cross(normalEC, tangentEC)); // normalized surface bitangent in eye coordinates
-
- return mat3(
- tangentEC.x, tangentEC.y, tangentEC.z,
- bitangentEC.x, bitangentEC.y, bitangentEC.z,
- normalEC.x, normalEC.y, normalEC.z);
- }
- `;var n1=`/**
- * DOC_TBA
- *
- * @name czm_ellipsoidContainsPoint
- * @glslFunction
- *
- */
- bool czm_ellipsoidContainsPoint(vec3 ellipsoid_inverseRadii, vec3 point)
- {
- vec3 scaled = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(point, 1.0)).xyz;
- return (dot(scaled, scaled) <= 1.0);
- }
- `;var i1=`/**
- * Approximate uv coordinates based on the ellipsoid normal.
- *
- * @name czm_ellipsoidTextureCoordinates
- * @glslFunction
- */
- vec2 czm_ellipsoidTextureCoordinates(vec3 normal)
- {
- return vec2(atan(normal.y, normal.x) * czm_oneOverTwoPi + 0.5, asin(normal.z) * czm_oneOverPi + 0.5);
- }
- `;var o1=`/**
- * Compares <code>left</code> and <code>right</code> componentwise. Returns <code>true</code>
- * if they are within <code>epsilon</code> and <code>false</code> otherwise. The inputs
- * <code>left</code> and <code>right</code> can be <code>float</code>s, <code>vec2</code>s,
- * <code>vec3</code>s, or <code>vec4</code>s.
- *
- * @name czm_equalsEpsilon
- * @glslFunction
- *
- * @param {} left The first vector.
- * @param {} right The second vector.
- * @param {float} epsilon The epsilon to use for equality testing.
- * @returns {bool} <code>true</code> if the components are within <code>epsilon</code> and <code>false</code> otherwise.
- *
- * @example
- * // GLSL declarations
- * bool czm_equalsEpsilon(float left, float right, float epsilon);
- * bool czm_equalsEpsilon(vec2 left, vec2 right, float epsilon);
- * bool czm_equalsEpsilon(vec3 left, vec3 right, float epsilon);
- * bool czm_equalsEpsilon(vec4 left, vec4 right, float epsilon);
- */
- bool czm_equalsEpsilon(vec4 left, vec4 right, float epsilon) {
- return all(lessThanEqual(abs(left - right), vec4(epsilon)));
- }
-
- bool czm_equalsEpsilon(vec3 left, vec3 right, float epsilon) {
- return all(lessThanEqual(abs(left - right), vec3(epsilon)));
- }
-
- bool czm_equalsEpsilon(vec2 left, vec2 right, float epsilon) {
- return all(lessThanEqual(abs(left - right), vec2(epsilon)));
- }
-
- bool czm_equalsEpsilon(float left, float right, float epsilon) {
- return (abs(left - right) <= epsilon);
- }
- `;var r1=`/**
- * DOC_TBA
- *
- * @name czm_eyeOffset
- * @glslFunction
- *
- * @param {vec4} positionEC DOC_TBA.
- * @param {vec3} eyeOffset DOC_TBA.
- *
- * @returns {vec4} DOC_TBA.
- */
- vec4 czm_eyeOffset(vec4 positionEC, vec3 eyeOffset)
- {
- // This equation is approximate in x and y.
- vec4 p = positionEC;
- vec4 zEyeOffset = normalize(p) * eyeOffset.z;
- p.xy += eyeOffset.xy + zEyeOffset.xy;
- p.z += zEyeOffset.z;
- return p;
- }
- `;var a1=`/**
- * Transforms a position from eye to window coordinates. The transformation
- * from eye to clip coordinates is done using {@link czm_projection}.
- * The transform from normalized device coordinates to window coordinates is
- * done using {@link czm_viewportTransformation}, which assumes a depth range
- * of <code>near = 0</code> and <code>far = 1</code>.
- * <br /><br />
- * This transform is useful when there is a need to manipulate window coordinates
- * in a vertex shader as done by {@link BillboardCollection}.
- *
- * @name czm_eyeToWindowCoordinates
- * @glslFunction
- *
- * @param {vec4} position The position in eye coordinates to transform.
- *
- * @returns {vec4} The transformed position in window coordinates.
- *
- * @see czm_modelToWindowCoordinates
- * @see czm_projection
- * @see czm_viewportTransformation
- * @see BillboardCollection
- *
- * @example
- * vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);
- */
- vec4 czm_eyeToWindowCoordinates(vec4 positionEC)
- {
- vec4 q = czm_projection * positionEC; // clip coordinates
- q.xyz /= q.w; // normalized device coordinates
- q.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz; // window coordinates
- return q;
- }
- `;var s1=`/**
- * Approxiamtes atan over the range [0, 1]. Safe to flip output for negative input.
- *
- * Based on Michal Drobot's approximation from ShaderFastLibs, which in turn is based on
- * "Efficient approximations for the arctangent function," Rajan, S. Sichun Wang Inkol, R. Joyal, A., May 2006.
- * Adapted from ShaderFastLibs under MIT License.
- *
- * Chosen for the following characteristics over range [0, 1]:
- * - basically no error at 0 and 1, important for getting around range limit (naive atan2 via atan requires infinite range atan)
- * - no visible artifacts from first-derivative discontinuities, unlike latitude via range-reduced sqrt asin approximations (at equator)
- *
- * The original code is x * (-0.1784 * abs(x) - 0.0663 * x * x + 1.0301);
- * Removed the abs() in here because it isn't needed, the input range is guaranteed as [0, 1] by how we're approximating atan2.
- *
- * @name czm_fastApproximateAtan
- * @glslFunction
- *
- * @param {float} x Value between 0 and 1 inclusive.
- *
- * @returns {float} Approximation of atan(x)
- */
- float czm_fastApproximateAtan(float x) {
- return x * (-0.1784 * x - 0.0663 * x * x + 1.0301);
- }
-
- /**
- * Approximation of atan2.
- *
- * Range reduction math based on nvidia's cg reference implementation for atan2: http://developer.download.nvidia.com/cg/atan2.html
- * However, we replaced their atan curve with Michael Drobot's (see above).
- *
- * @name czm_fastApproximateAtan
- * @glslFunction
- *
- * @param {float} x Value between -1 and 1 inclusive.
- * @param {float} y Value between -1 and 1 inclusive.
- *
- * @returns {float} Approximation of atan2(x, y)
- */
- float czm_fastApproximateAtan(float x, float y) {
- // atan approximations are usually only reliable over [-1, 1], or, in our case, [0, 1] due to modifications.
- // So range-reduce using abs and by flipping whether x or y is on top.
- float t = abs(x); // t used as swap and atan result.
- float opposite = abs(y);
- float adjacent = max(t, opposite);
- opposite = min(t, opposite);
-
- t = czm_fastApproximateAtan(opposite / adjacent);
-
- // Undo range reduction
- t = czm_branchFreeTernary(abs(y) > abs(x), czm_piOverTwo - t, t);
- t = czm_branchFreeTernary(x < 0.0, czm_pi - t, t);
- t = czm_branchFreeTernary(y < 0.0, -t, t);
- return t;
- }
- `;var c1=`/**
- * Gets the color with fog at a distance from the camera.
- *
- * @name czm_fog
- * @glslFunction
- *
- * @param {float} distanceToCamera The distance to the camera in meters.
- * @param {vec3} color The original color.
- * @param {vec3} fogColor The color of the fog.
- *
- * @returns {vec3} The color adjusted for fog at the distance from the camera.
- */
- vec3 czm_fog(float distanceToCamera, vec3 color, vec3 fogColor)
- {
- float scalar = distanceToCamera * czm_fogDensity;
- float fog = 1.0 - exp(-(scalar * scalar));
- return mix(color, fogColor, fog);
- }
-
- /**
- * Gets the color with fog at a distance from the camera.
- *
- * @name czm_fog
- * @glslFunction
- *
- * @param {float} distanceToCamera The distance to the camera in meters.
- * @param {vec3} color The original color.
- * @param {vec3} fogColor The color of the fog.
- * @param {float} fogModifierConstant A constant to modify the appearance of fog.
- *
- * @returns {vec3} The color adjusted for fog at the distance from the camera.
- */
- vec3 czm_fog(float distanceToCamera, vec3 color, vec3 fogColor, float fogModifierConstant)
- {
- float scalar = distanceToCamera * czm_fogDensity;
- float fog = 1.0 - exp(-((fogModifierConstant * scalar + fogModifierConstant) * (scalar * (1.0 + fogModifierConstant))));
- return mix(color, fogColor, fog);
- }
- `;var l1=`/**
- * Converts a color from RGB space to linear space.
- *
- * @name czm_gammaCorrect
- * @glslFunction
- *
- * @param {vec3} color The color in RGB space.
- * @returns {vec3} The color in linear space.
- */
- vec3 czm_gammaCorrect(vec3 color) {
- #ifdef HDR
- color = pow(color, vec3(czm_gamma));
- #endif
- return color;
- }
-
- vec4 czm_gammaCorrect(vec4 color) {
- #ifdef HDR
- color.rgb = pow(color.rgb, vec3(czm_gamma));
- #endif
- return color;
- }
- `;var u1=`/**
- * DOC_TBA
- *
- * @name czm_geodeticSurfaceNormal
- * @glslFunction
- *
- * @param {vec3} positionOnEllipsoid DOC_TBA
- * @param {vec3} ellipsoidCenter DOC_TBA
- * @param {vec3} oneOverEllipsoidRadiiSquared DOC_TBA
- *
- * @returns {vec3} DOC_TBA.
- */
- vec3 czm_geodeticSurfaceNormal(vec3 positionOnEllipsoid, vec3 ellipsoidCenter, vec3 oneOverEllipsoidRadiiSquared)
- {
- return normalize((positionOnEllipsoid - ellipsoidCenter) * oneOverEllipsoidRadiiSquared);
- }
- `;var f1=`/**
- * An czm_material with default values. Every material's czm_getMaterial
- * should use this default material as a base for the material it returns.
- * The default normal value is given by materialInput.normalEC.
- *
- * @name czm_getDefaultMaterial
- * @glslFunction
- *
- * @param {czm_materialInput} input The input used to construct the default material.
- *
- * @returns {czm_material} The default material.
- *
- * @see czm_materialInput
- * @see czm_material
- * @see czm_getMaterial
- */
- czm_material czm_getDefaultMaterial(czm_materialInput materialInput)
- {
- czm_material material;
- material.diffuse = vec3(0.0);
- material.specular = 0.0;
- material.shininess = 1.0;
- material.normal = materialInput.normalEC;
- material.emission = vec3(0.0);
- material.alpha = 1.0;
- return material;
- }
- `;var d1=`/**
- * Select which direction vector to use for dynamic atmosphere lighting based on an enum value
- *
- * @name czm_getDynamicAtmosphereLightDirection
- * @glslfunction
- * @see DynamicAtmosphereLightingType.js
- *
- * @param {vec3} positionWC the position of the vertex/fragment in world coordinates. This is normalized and returned when dynamic lighting is turned off.
- * @param {float} lightEnum The enum value for selecting between light sources.
- * @return {vec3} The normalized light direction vector. Depending on the enum value, it is either positionWC, czm_lightDirectionWC or czm_sunDirectionWC
- */
- vec3 czm_getDynamicAtmosphereLightDirection(vec3 positionWC, float lightEnum) {
- const float NONE = 0.0;
- const float SCENE_LIGHT = 1.0;
- const float SUNLIGHT = 2.0;
-
- vec3 lightDirection =
- positionWC * float(lightEnum == NONE) +
- czm_lightDirectionWC * float(lightEnum == SCENE_LIGHT) +
- czm_sunDirectionWC * float(lightEnum == SUNLIGHT);
- return normalize(lightDirection);
- }
- `;var h1=`/**
- * Calculates the intensity of diffusely reflected light.
- *
- * @name czm_getLambertDiffuse
- * @glslFunction
- *
- * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.
- * @param {vec3} normalEC The surface normal in eye coordinates.
- *
- * @returns {float} The intensity of the diffuse reflection.
- *
- * @see czm_phong
- *
- * @example
- * float diffuseIntensity = czm_getLambertDiffuse(lightDirectionEC, normalEC);
- * float specularIntensity = czm_getSpecular(lightDirectionEC, toEyeEC, normalEC, 200);
- * vec3 color = (diffuseColor * diffuseIntensity) + (specularColor * specularIntensity);
- */
- float czm_getLambertDiffuse(vec3 lightDirectionEC, vec3 normalEC)
- {
- return max(dot(lightDirectionEC, normalEC), 0.0);
- }
- `;var m1=`/**
- * Calculates the specular intensity of reflected light.
- *
- * @name czm_getSpecular
- * @glslFunction
- *
- * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.
- * @param {vec3} toEyeEC Unit vector pointing to the eye position in eye coordinates.
- * @param {vec3} normalEC The surface normal in eye coordinates.
- * @param {float} shininess The sharpness of the specular reflection. Higher values create a smaller, more focused specular highlight.
- *
- * @returns {float} The intensity of the specular highlight.
- *
- * @see czm_phong
- *
- * @example
- * float diffuseIntensity = czm_getLambertDiffuse(lightDirectionEC, normalEC);
- * float specularIntensity = czm_getSpecular(lightDirectionEC, toEyeEC, normalEC, 200);
- * vec3 color = (diffuseColor * diffuseIntensity) + (specularColor * specularIntensity);
- */
- float czm_getSpecular(vec3 lightDirectionEC, vec3 toEyeEC, vec3 normalEC, float shininess)
- {
- vec3 toReflectedLight = reflect(-lightDirectionEC, normalEC);
- float specular = max(dot(toReflectedLight, toEyeEC), 0.0);
-
- // pow has undefined behavior if both parameters <= 0.
- // Prevent this by making sure shininess is at least czm_epsilon2.
- return pow(specular, max(shininess, czm_epsilon2));
- }
- `;var p1=`/**
- * @private
- */
- vec4 czm_getWaterNoise(sampler2D normalMap, vec2 uv, float time, float angleInRadians)
- {
- float cosAngle = cos(angleInRadians);
- float sinAngle = sin(angleInRadians);
-
- // time dependent sampling directions
- vec2 s0 = vec2(1.0/17.0, 0.0);
- vec2 s1 = vec2(-1.0/29.0, 0.0);
- vec2 s2 = vec2(1.0/101.0, 1.0/59.0);
- vec2 s3 = vec2(-1.0/109.0, -1.0/57.0);
-
- // rotate sampling direction by specified angle
- s0 = vec2((cosAngle * s0.x) - (sinAngle * s0.y), (sinAngle * s0.x) + (cosAngle * s0.y));
- s1 = vec2((cosAngle * s1.x) - (sinAngle * s1.y), (sinAngle * s1.x) + (cosAngle * s1.y));
- s2 = vec2((cosAngle * s2.x) - (sinAngle * s2.y), (sinAngle * s2.x) + (cosAngle * s2.y));
- s3 = vec2((cosAngle * s3.x) - (sinAngle * s3.y), (sinAngle * s3.x) + (cosAngle * s3.y));
-
- vec2 uv0 = (uv/103.0) + (time * s0);
- vec2 uv1 = uv/107.0 + (time * s1) + vec2(0.23);
- vec2 uv2 = uv/vec2(897.0, 983.0) + (time * s2) + vec2(0.51);
- vec2 uv3 = uv/vec2(991.0, 877.0) + (time * s3) + vec2(0.71);
-
- uv0 = fract(uv0);
- uv1 = fract(uv1);
- uv2 = fract(uv2);
- uv3 = fract(uv3);
- vec4 noise = (texture(normalMap, uv0)) +
- (texture(normalMap, uv1)) +
- (texture(normalMap, uv2)) +
- (texture(normalMap, uv3));
-
- // average and scale to between -1 and 1
- return ((noise / 4.0) - 0.5) * 2.0;
- }
- `;var g1=`/**
- * Adjusts the hue of a color.
- *
- * @name czm_hue
- * @glslFunction
- *
- * @param {vec3} rgb The color.
- * @param {float} adjustment The amount to adjust the hue of the color in radians.
- *
- * @returns {float} The color with the hue adjusted.
- *
- * @example
- * vec3 adjustHue = czm_hue(color, czm_pi); // The same as czm_hue(color, -czm_pi)
- */
- vec3 czm_hue(vec3 rgb, float adjustment)
- {
- const mat3 toYIQ = mat3(0.299, 0.587, 0.114,
- 0.595716, -0.274453, -0.321263,
- 0.211456, -0.522591, 0.311135);
- const mat3 toRGB = mat3(1.0, 0.9563, 0.6210,
- 1.0, -0.2721, -0.6474,
- 1.0, -1.107, 1.7046);
-
- vec3 yiq = toYIQ * rgb;
- float hue = atan(yiq.z, yiq.y) + adjustment;
- float chroma = sqrt(yiq.z * yiq.z + yiq.y * yiq.y);
-
- vec3 color = vec3(yiq.x, chroma * cos(hue), chroma * sin(hue));
- return toRGB * color;
- }
- `;var _1=`/**
- * Converts a color in linear space to RGB space.
- *
- * @name czm_inverseGamma
- * @glslFunction
- *
- * @param {vec3} color The color in linear space.
- * @returns {vec3} The color in RGB space.
- */
- vec3 czm_inverseGamma(vec3 color) {
- return pow(color, vec3(1.0 / czm_gamma));
- }
- `;var A1=`/**
- * Determines if a time interval is empty.
- *
- * @name czm_isEmpty
- * @glslFunction
- *
- * @param {czm_raySegment} interval The interval to test.
- *
- * @returns {bool} <code>true</code> if the time interval is empty; otherwise, <code>false</code>.
- *
- * @example
- * bool b0 = czm_isEmpty(czm_emptyRaySegment); // true
- * bool b1 = czm_isEmpty(czm_raySegment(0.0, 1.0)); // false
- * bool b2 = czm_isEmpty(czm_raySegment(1.0, 1.0)); // false, contains 1.0.
- */
- bool czm_isEmpty(czm_raySegment interval)
- {
- return (interval.stop < 0.0);
- }
- `;var y1=`/**
- * Determines if a time interval is empty.
- *
- * @name czm_isFull
- * @glslFunction
- *
- * @param {czm_raySegment} interval The interval to test.
- *
- * @returns {bool} <code>true</code> if the time interval is empty; otherwise, <code>false</code>.
- *
- * @example
- * bool b0 = czm_isEmpty(czm_emptyRaySegment); // true
- * bool b1 = czm_isEmpty(czm_raySegment(0.0, 1.0)); // false
- * bool b2 = czm_isEmpty(czm_raySegment(1.0, 1.0)); // false, contains 1.0.
- */
- bool czm_isFull(czm_raySegment interval)
- {
- return (interval.start == 0.0 && interval.stop == czm_infinity);
- }
- `;var x1=`/**
- * Computes the fraction of a Web Wercator rectangle at which a given geodetic latitude is located.
- *
- * @name czm_latitudeToWebMercatorFraction
- * @glslFunction
- *
- * @param {float} latitude The geodetic latitude, in radians.
- * @param {float} southMercatorY The Web Mercator coordinate of the southern boundary of the rectangle.
- * @param {float} oneOverMercatorHeight The total height of the rectangle in Web Mercator coordinates.
- *
- * @returns {float} The fraction of the rectangle at which the latitude occurs. If the latitude is the southern
- * boundary of the rectangle, the return value will be zero. If it is the northern boundary, the return
- * value will be 1.0. Latitudes in between are mapped according to the Web Mercator projection.
- */
- float czm_latitudeToWebMercatorFraction(float latitude, float southMercatorY, float oneOverMercatorHeight)
- {
- float sinLatitude = sin(latitude);
- float mercatorY = 0.5 * log((1.0 + sinLatitude) / (1.0 - sinLatitude));
-
- return (mercatorY - southMercatorY) * oneOverMercatorHeight;
- }
- `;var b1=`/**
- * Computes distance from an point in 2D to a line in 2D.
- *
- * @name czm_lineDistance
- * @glslFunction
- *
- * param {vec2} point1 A point along the line.
- * param {vec2} point2 A point along the line.
- * param {vec2} point A point that may or may not be on the line.
- * returns {float} The distance from the point to the line.
- */
- float czm_lineDistance(vec2 point1, vec2 point2, vec2 point) {
- return abs((point2.y - point1.y) * point.x - (point2.x - point1.x) * point.y + point2.x * point1.y - point2.y * point1.x) / distance(point2, point1);
- }
- `;var C1=`/**
- * Converts a linear RGB color to an sRGB color.
- *
- * @param {vec3|vec4} linearIn The color in linear color space.
- * @returns {vec3|vec4} The color in sRGB color space. The vector type matches the input.
- */
- vec3 czm_linearToSrgb(vec3 linearIn)
- {
- return pow(linearIn, vec3(1.0/2.2));
- }
-
- vec4 czm_linearToSrgb(vec4 linearIn)
- {
- vec3 srgbOut = pow(linearIn.rgb, vec3(1.0/2.2));
- return vec4(srgbOut, linearIn.a);
- }
- `;var T1=`/**
- * Computes the luminance of a color.
- *
- * @name czm_luminance
- * @glslFunction
- *
- * @param {vec3} rgb The color.
- *
- * @returns {float} The luminance.
- *
- * @example
- * float light = czm_luminance(vec3(0.0)); // 0.0
- * float dark = czm_luminance(vec3(1.0)); // ~1.0
- */
- float czm_luminance(vec3 rgb)
- {
- // Algorithm from Chapter 10 of Graphics Shaders.
- const vec3 W = vec3(0.2125, 0.7154, 0.0721);
- return dot(rgb, W);
- }
- `;var E1=`/**
- * Find the maximum component of a vector.
- *
- * @name czm_maximumComponent
- * @glslFunction
- *
- * @param {vec2|vec3|vec4} v The input vector.
- * @returns {float} The value of the largest component.
- */
- float czm_maximumComponent(vec2 v)
- {
- return max(v.x, v.y);
- }
- float czm_maximumComponent(vec3 v)
- {
- return max(max(v.x, v.y), v.z);
- }
- float czm_maximumComponent(vec4 v)
- {
- return max(max(max(v.x, v.y), v.z), v.w);
- }
- `;var v1=`/**
- * Computes the size of a pixel in meters at a distance from the eye.
- * <p>
- * Use this version when passing in a custom pixel ratio. For example, passing in 1.0 will return meters per native device pixel.
- * </p>
- * @name czm_metersPerPixel
- * @glslFunction
- *
- * @param {vec3} positionEC The position to get the meters per pixel in eye coordinates.
- * @param {float} pixelRatio The scaling factor from pixel space to coordinate space
- *
- * @returns {float} The meters per pixel at positionEC.
- */
- float czm_metersPerPixel(vec4 positionEC, float pixelRatio)
- {
- float width = czm_viewport.z;
- float height = czm_viewport.w;
- float pixelWidth;
- float pixelHeight;
-
- float top = czm_frustumPlanes.x;
- float bottom = czm_frustumPlanes.y;
- float left = czm_frustumPlanes.z;
- float right = czm_frustumPlanes.w;
-
- if (czm_sceneMode == czm_sceneMode2D || czm_orthographicIn3D == 1.0)
- {
- float frustumWidth = right - left;
- float frustumHeight = top - bottom;
- pixelWidth = frustumWidth / width;
- pixelHeight = frustumHeight / height;
- }
- else
- {
- float distanceToPixel = -positionEC.z;
- float inverseNear = 1.0 / czm_currentFrustum.x;
- float tanTheta = top * inverseNear;
- pixelHeight = 2.0 * distanceToPixel * tanTheta / height;
- tanTheta = right * inverseNear;
- pixelWidth = 2.0 * distanceToPixel * tanTheta / width;
- }
-
- return max(pixelWidth, pixelHeight) * pixelRatio;
- }
-
- /**
- * Computes the size of a pixel in meters at a distance from the eye.
- * <p>
- * Use this version when scaling by pixel ratio.
- * </p>
- * @name czm_metersPerPixel
- * @glslFunction
- *
- * @param {vec3} positionEC The position to get the meters per pixel in eye coordinates.
- *
- * @returns {float} The meters per pixel at positionEC.
- */
- float czm_metersPerPixel(vec4 positionEC)
- {
- return czm_metersPerPixel(positionEC, czm_pixelRatio);
- }
- `;var S1=`/**
- * Transforms a position from model to window coordinates. The transformation
- * from model to clip coordinates is done using {@link czm_modelViewProjection}.
- * The transform from normalized device coordinates to window coordinates is
- * done using {@link czm_viewportTransformation}, which assumes a depth range
- * of <code>near = 0</code> and <code>far = 1</code>.
- * <br /><br />
- * This transform is useful when there is a need to manipulate window coordinates
- * in a vertex shader as done by {@link BillboardCollection}.
- * <br /><br />
- * This function should not be confused with {@link czm_viewportOrthographic},
- * which is an orthographic projection matrix that transforms from window
- * coordinates to clip coordinates.
- *
- * @name czm_modelToWindowCoordinates
- * @glslFunction
- *
- * @param {vec4} position The position in model coordinates to transform.
- *
- * @returns {vec4} The transformed position in window coordinates.
- *
- * @see czm_eyeToWindowCoordinates
- * @see czm_modelViewProjection
- * @see czm_viewportTransformation
- * @see czm_viewportOrthographic
- * @see BillboardCollection
- *
- * @example
- * vec4 positionWC = czm_modelToWindowCoordinates(positionMC);
- */
- vec4 czm_modelToWindowCoordinates(vec4 position)
- {
- vec4 positionEC = czm_modelView * position;
- vec4 q = czm_projection * positionEC;
- q.xyz /= q.w; // normalized device coordinates
- q.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz; // window coordinates
- return q;
- }
- `;var w1=`/**
- * DOC_TBA
- *
- * @name czm_multiplyWithColorBalance
- * @glslFunction
- */
- vec3 czm_multiplyWithColorBalance(vec3 left, vec3 right)
- {
- // Algorithm from Chapter 10 of Graphics Shaders.
- const vec3 W = vec3(0.2125, 0.7154, 0.0721);
-
- vec3 target = left * right;
- float leftLuminance = dot(left, W);
- float rightLuminance = dot(right, W);
- float targetLuminance = dot(target, W);
-
- return ((leftLuminance + rightLuminance) / (2.0 * targetLuminance)) * target;
- }
- `;var I1=`/**
- * Computes a value that scales with distance. The scaling is clamped at the near and
- * far distances, and does not extrapolate. This function works with the
- * {@link NearFarScalar} JavaScript class.
- *
- * @name czm_nearFarScalar
- * @glslFunction
- *
- * @param {vec4} nearFarScalar A vector with 4 components: Near distance (x), Near value (y), Far distance (z), Far value (w).
- * @param {float} cameraDistSq The square of the current distance from the camera.
- *
- * @returns {float} The value at this distance.
- */
- float czm_nearFarScalar(vec4 nearFarScalar, float cameraDistSq)
- {
- float valueAtMin = nearFarScalar.y;
- float valueAtMax = nearFarScalar.w;
- float nearDistanceSq = nearFarScalar.x * nearFarScalar.x;
- float farDistanceSq = nearFarScalar.z * nearFarScalar.z;
-
- float t = (cameraDistSq - nearDistanceSq) / (farDistanceSq - nearDistanceSq);
-
- t = pow(clamp(t, 0.0, 1.0), 0.2);
-
- return mix(valueAtMin, valueAtMax, t);
- }
- `;var D1=` /**
- * Decodes a unit-length vector in 'oct' encoding to a normalized 3-component Cartesian vector.
- * The 'oct' encoding is described in "A Survey of Efficient Representations of Independent Unit Vectors",
- * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/
- *
- * @name czm_octDecode
- * @param {vec2} encoded The oct-encoded, unit-length vector
- * @param {float} range The maximum value of the SNORM range. The encoded vector is stored in log2(rangeMax+1) bits.
- * @returns {vec3} The decoded and normalized vector
- */
- vec3 czm_octDecode(vec2 encoded, float range)
- {
- if (encoded.x == 0.0 && encoded.y == 0.0) {
- return vec3(0.0, 0.0, 0.0);
- }
-
- encoded = encoded / range * 2.0 - 1.0;
- vec3 v = vec3(encoded.x, encoded.y, 1.0 - abs(encoded.x) - abs(encoded.y));
- if (v.z < 0.0)
- {
- v.xy = (1.0 - abs(v.yx)) * czm_signNotZero(v.xy);
- }
-
- return normalize(v);
- }
-
- /**
- * Decodes a unit-length vector in 'oct' encoding to a normalized 3-component Cartesian vector.
- * The 'oct' encoding is described in "A Survey of Efficient Representations of Independent Unit Vectors",
- * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/
- *
- * @name czm_octDecode
- * @param {vec2} encoded The oct-encoded, unit-length vector
- * @returns {vec3} The decoded and normalized vector
- */
- vec3 czm_octDecode(vec2 encoded)
- {
- return czm_octDecode(encoded, 255.0);
- }
-
- /**
- * Decodes a unit-length vector in 'oct' encoding packed into a floating-point number to a normalized 3-component Cartesian vector.
- * The 'oct' encoding is described in "A Survey of Efficient Representations of Independent Unit Vectors",
- * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/
- *
- * @name czm_octDecode
- * @param {float} encoded The oct-encoded, unit-length vector
- * @returns {vec3} The decoded and normalized vector
- */
- vec3 czm_octDecode(float encoded)
- {
- float temp = encoded / 256.0;
- float x = floor(temp);
- float y = (temp - x) * 256.0;
- return czm_octDecode(vec2(x, y));
- }
-
- /**
- * Decodes three unit-length vectors in 'oct' encoding packed into two floating-point numbers to normalized 3-component Cartesian vectors.
- * The 'oct' encoding is described in "A Survey of Efficient Representations of Independent Unit Vectors",
- * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/
- *
- * @name czm_octDecode
- * @param {vec2} encoded The packed oct-encoded, unit-length vectors.
- * @param {vec3} vector1 One decoded and normalized vector.
- * @param {vec3} vector2 One decoded and normalized vector.
- * @param {vec3} vector3 One decoded and normalized vector.
- */
- void czm_octDecode(vec2 encoded, out vec3 vector1, out vec3 vector2, out vec3 vector3)
- {
- float temp = encoded.x / 65536.0;
- float x = floor(temp);
- float encodedFloat1 = (temp - x) * 65536.0;
-
- temp = encoded.y / 65536.0;
- float y = floor(temp);
- float encodedFloat2 = (temp - y) * 65536.0;
-
- vector1 = czm_octDecode(encodedFloat1);
- vector2 = czm_octDecode(encodedFloat2);
- vector3 = czm_octDecode(vec2(x, y));
- }
-
- `;var P1=`/**
- * Packs a depth value into a vec4 that can be represented by unsigned bytes.
- *
- * @name czm_packDepth
- * @glslFunction
- *
- * @param {float} depth The floating-point depth.
- * @returns {vec4} The packed depth.
- */
- vec4 czm_packDepth(float depth)
- {
- // See Aras Pranckevi\u010Dius' post Encoding Floats to RGBA
- // http://aras-p.info/blog/2009/07/30/encoding-floats-to-rgba-the-final/
- vec4 enc = vec4(1.0, 255.0, 65025.0, 16581375.0) * depth;
- enc = fract(enc);
- enc -= enc.yzww * vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);
- return enc;
- }
- `;var R1=`vec3 lambertianDiffuse(vec3 diffuseColor)
- {
- return diffuseColor / czm_pi;
- }
-
- vec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH)
- {
- float versine = 1.0 - VdotH;
- // pow(versine, 5.0) is slow. See https://stackoverflow.com/a/68793086/10082269
- float versineSquared = versine * versine;
- return f0 + (f90 - f0) * versineSquared * versineSquared * versine;
- }
-
- #ifdef USE_ANISOTROPY
- /**
- * @param {float} bitangentRoughness Material roughness (along the anisotropy bitangent)
- * @param {float} tangentialRoughness Anisotropic roughness (along the anisotropy tangent)
- * @param {vec3} lightDirection The direction from the fragment to the light source, transformed to tangent-bitangent-normal coordinates
- * @param {vec3} viewDirection The direction from the fragment to the camera, transformed to tangent-bitangent-normal coordinates
- */
- float smithVisibilityGGX_anisotropic(float bitangentRoughness, float tangentialRoughness, vec3 lightDirection, vec3 viewDirection)
- {
- vec3 roughnessScale = vec3(tangentialRoughness, bitangentRoughness, 1.0);
- float GGXV = lightDirection.z * length(roughnessScale * viewDirection);
- float GGXL = viewDirection.z * length(roughnessScale * lightDirection);
- float v = 0.5 / (GGXV + GGXL);
- return clamp(v, 0.0, 1.0);
- }
-
- /**
- * @param {float} bitangentRoughness Material roughness (along the anisotropy bitangent)
- * @param {float} tangentialRoughness Anisotropic roughness (along the anisotropy tangent)
- * @param {vec3} halfwayDirection The unit vector halfway between light and view directions, transformed to tangent-bitangent-normal coordinates
- */
- float GGX_anisotropic(float bitangentRoughness, float tangentialRoughness, vec3 halfwayDirection)
- {
- float roughnessSquared = bitangentRoughness * tangentialRoughness;
- vec3 f = halfwayDirection * vec3(bitangentRoughness, tangentialRoughness, roughnessSquared);
- float w2 = roughnessSquared / dot(f, f);
- return roughnessSquared * w2 * w2 / czm_pi;
- }
- #endif
-
- /**
- * Estimate the geometric self-shadowing of the microfacets in a surface,
- * using the Smith Joint GGX visibility function.
- * Note: Vis = G / (4 * NdotL * NdotV)
- * see Eric Heitz. 2014. Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs. Journal of Computer Graphics Techniques, 3
- * see Real-Time Rendering. Page 331 to 336.
- * see https://google.github.io/filament/Filament.md.html#materialsystem/specularbrdf/geometricshadowing(specularg)
- *
- * @param {float} alphaRoughness The roughness of the material, expressed as the square of perceptual roughness.
- * @param {float} NdotL The cosine of the angle between the surface normal and the direction to the light source.
- * @param {float} NdotV The cosine of the angle between the surface normal and the direction to the camera.
- */
- float smithVisibilityGGX(float alphaRoughness, float NdotL, float NdotV)
- {
- float alphaRoughnessSq = alphaRoughness * alphaRoughness;
-
- float GGXV = NdotL * sqrt(NdotV * NdotV * (1.0 - alphaRoughnessSq) + alphaRoughnessSq);
- float GGXL = NdotV * sqrt(NdotL * NdotL * (1.0 - alphaRoughnessSq) + alphaRoughnessSq);
-
- float GGX = GGXV + GGXL;
- if (GGX > 0.0)
- {
- return 0.5 / GGX;
- }
- return 0.0;
- }
-
- /**
- * Estimate the fraction of the microfacets in a surface that are aligned with
- * the halfway vector, which is aligned halfway between the directions from
- * the fragment to the camera and from the fragment to the light source.
- *
- * @param {float} alphaRoughness The roughness of the material, expressed as the square of perceptual roughness.
- * @param {float} NdotH The cosine of the angle between the surface normal and the halfway vector.
- * @return {float} The fraction of microfacets aligned to the halfway vector.
- */
- float GGX(float alphaRoughness, float NdotH)
- {
- float alphaRoughnessSquared = alphaRoughness * alphaRoughness;
- float f = (NdotH * alphaRoughnessSquared - NdotH) * NdotH + 1.0;
- return alphaRoughnessSquared / (czm_pi * f * f);
- }
-
- /**
- * Compute the strength of the specular reflection due to direct lighting.
- *
- * @param {vec3} normal The surface normal.
- * @param {vec3} lightDirection The unit vector pointing from the fragment to the light source.
- * @param {vec3} viewDirection The unit vector pointing from the fragment to the camera.
- * @param {vec3} halfwayDirection The unit vector pointing from the fragment to halfway between the light source and the camera.
- * @param {float} alphaRoughness The roughness of the material, expressed as the square of perceptual roughness.
- * @return {float} The strength of the specular reflection.
- */
- float computeDirectSpecularStrength(vec3 normal, vec3 lightDirection, vec3 viewDirection, vec3 halfwayDirection, float alphaRoughness)
- {
- float NdotL = clamp(dot(normal, lightDirection), 0.0, 1.0);
- float NdotV = clamp(dot(normal, viewDirection), 0.0, 1.0);
- float G = smithVisibilityGGX(alphaRoughness, NdotL, NdotV);
- float NdotH = clamp(dot(normal, halfwayDirection), 0.0, 1.0);
- float D = GGX(alphaRoughness, NdotH);
- return G * D;
- }
-
- /**
- * Compute the diffuse and specular contributions using physically based
- * rendering. This function only handles direct lighting.
- * <p>
- * This function only handles the lighting calculations. Metallic/roughness
- * and specular/glossy must be handled separately. See {@MaterialStageFS}
- * </p>
- *
- * @name czm_pbrLighting
- * @glslFunction
- *
- * @param {vec3} viewDirectionEC Unit vector pointing from the fragment to the eye position
- * @param {vec3} normalEC The surface normal in eye coordinates
- * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.
- * @param {czm_modelMaterial} The material properties.
- * @return {vec3} The computed HDR color
- */
- vec3 czm_pbrLighting(vec3 viewDirectionEC, vec3 normalEC, vec3 lightDirectionEC, czm_modelMaterial material)
- {
- vec3 halfwayDirectionEC = normalize(viewDirectionEC + lightDirectionEC);
- float VdotH = clamp(dot(viewDirectionEC, halfwayDirectionEC), 0.0, 1.0);
- float NdotL = clamp(dot(normalEC, lightDirectionEC), 0.001, 1.0);
-
- vec3 f0 = material.specular;
- float reflectance = czm_maximumComponent(f0);
- // Typical dielectrics will have reflectance 0.04, so f90 will be 1.0.
- // In this case, at grazing angle, all incident energy is reflected.
- vec3 f90 = vec3(clamp(reflectance * 25.0, 0.0, 1.0));
- vec3 F = fresnelSchlick2(f0, f90, VdotH);
-
- #if defined(USE_SPECULAR)
- F *= material.specularWeight;
- #endif
-
- float alphaRoughness = material.roughness * material.roughness;
- #ifdef USE_ANISOTROPY
- mat3 tbn = mat3(material.anisotropicT, material.anisotropicB, normalEC);
- vec3 lightDirection = lightDirectionEC * tbn;
- vec3 viewDirection = viewDirectionEC * tbn;
- vec3 halfwayDirection = halfwayDirectionEC * tbn;
- float anisotropyStrength = material.anisotropyStrength;
- float tangentialRoughness = mix(alphaRoughness, 1.0, anisotropyStrength * anisotropyStrength);
- float bitangentRoughness = clamp(alphaRoughness, 0.001, 1.0);
- float G = smithVisibilityGGX_anisotropic(bitangentRoughness, tangentialRoughness, lightDirection, viewDirection);
- float D = GGX_anisotropic(bitangentRoughness, tangentialRoughness, halfwayDirection);
- vec3 specularContribution = F * G * D;
- #else
- float specularStrength = computeDirectSpecularStrength(normalEC, lightDirectionEC, viewDirectionEC, halfwayDirectionEC, alphaRoughness);
- vec3 specularContribution = F * specularStrength;
- #endif
-
- vec3 diffuseColor = material.diffuse;
- // F here represents the specular contribution
- vec3 diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);
-
- // Lo = (diffuse + specular) * Li * NdotL
- return (diffuseContribution + specularContribution) * NdotL;
- }
- `;var O1=`// KhronosGroup https://github.com/KhronosGroup/ToneMapping/tree/main/PBR_Neutral
-
- // Input color is non-negative and resides in the Linear Rec. 709 color space.
- // Output color is also Linear Rec. 709, but in the [0, 1] range.
-
- vec3 czm_pbrNeutralTonemapping(vec3 color) {
- const float startCompression = 0.8 - 0.04;
- const float desaturation = 0.15;
-
- float x = min(color.r, min(color.g, color.b));
- float offset = czm_branchFreeTernary(x < 0.08, x - 6.25 * x * x, 0.04);
- color -= offset;
-
- float peak = max(color.r, max(color.g, color.b));
- if (peak < startCompression) return color;
-
- const float d = 1.0 - startCompression;
- float newPeak = 1.0 - d * d / (peak + d - startCompression);
- color *= newPeak / peak;
-
- float g = 1.0 - 1.0 / (desaturation * (peak - newPeak) + 1.0);
- return mix(color, newPeak * vec3(1.0, 1.0, 1.0), g);
- }
- `;var M1=`float czm_private_getLambertDiffuseOfMaterial(vec3 lightDirectionEC, czm_material material)
- {
- return czm_getLambertDiffuse(lightDirectionEC, material.normal);
- }
-
- float czm_private_getSpecularOfMaterial(vec3 lightDirectionEC, vec3 toEyeEC, czm_material material)
- {
- return czm_getSpecular(lightDirectionEC, toEyeEC, material.normal, material.shininess);
- }
-
- /**
- * Computes a color using the Phong lighting model.
- *
- * @name czm_phong
- * @glslFunction
- *
- * @param {vec3} toEye A normalized vector from the fragment to the eye in eye coordinates.
- * @param {czm_material} material The fragment's material.
- *
- * @returns {vec4} The computed color.
- *
- * @example
- * vec3 positionToEyeEC = // ...
- * czm_material material = // ...
- * vec3 lightDirectionEC = // ...
- * out_FragColor = czm_phong(normalize(positionToEyeEC), material, lightDirectionEC);
- *
- * @see czm_getMaterial
- */
- vec4 czm_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC)
- {
- // Diffuse from directional light sources at eye (for top-down)
- float diffuse = czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 0.0, 1.0), material);
- if (czm_sceneMode == czm_sceneMode3D) {
- // (and horizon views in 3D)
- diffuse += czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 1.0, 0.0), material);
- }
-
- float specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material);
-
- // Temporary workaround for adding ambient.
- vec3 materialDiffuse = material.diffuse * 0.5;
-
- vec3 ambient = materialDiffuse;
- vec3 color = ambient + material.emission;
- color += materialDiffuse * diffuse * czm_lightColor;
- color += material.specular * specular * czm_lightColor;
-
- return vec4(color, material.alpha);
- }
-
- vec4 czm_private_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC)
- {
- float diffuse = czm_private_getLambertDiffuseOfMaterial(lightDirectionEC, material);
- float specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material);
-
- vec3 ambient = vec3(0.0);
- vec3 color = ambient + material.emission;
- color += material.diffuse * diffuse * czm_lightColor;
- color += material.specular * specular * czm_lightColor;
-
- return vec4(color, material.alpha);
- }
- `;var B1=`/**
- * Computes distance from a point to a plane.
- *
- * @name czm_planeDistance
- * @glslFunction
- *
- * param {vec4} plane A Plane in Hessian Normal Form. See Plane.js
- * param {vec3} point A point in the same space as the plane.
- * returns {float} The distance from the point to the plane.
- */
- float czm_planeDistance(vec4 plane, vec3 point) {
- return (dot(plane.xyz, point) + plane.w);
- }
-
- /**
- * Computes distance from a point to a plane.
- *
- * @name czm_planeDistance
- * @glslFunction
- *
- * param {vec3} planeNormal Normal for a plane in Hessian Normal Form. See Plane.js
- * param {float} planeDistance Distance for a plane in Hessian Normal form. See Plane.js
- * param {vec3} point A point in the same space as the plane.
- * returns {float} The distance from the point to the plane.
- */
- float czm_planeDistance(vec3 planeNormal, float planeDistance, vec3 point) {
- return (dot(planeNormal, point) + planeDistance);
- }
- `;var L1=`/**
- * Computes the point along a ray at the given time. <code>time</code> can be positive, negative, or zero.
- *
- * @name czm_pointAlongRay
- * @glslFunction
- *
- * @param {czm_ray} ray The ray to compute the point along.
- * @param {float} time The time along the ray.
- *
- * @returns {vec3} The point along the ray at the given time.
- *
- * @example
- * czm_ray ray = czm_ray(vec3(0.0), vec3(1.0, 0.0, 0.0)); // origin, direction
- * vec3 v = czm_pointAlongRay(ray, 2.0); // (2.0, 0.0, 0.0)
- */
- vec3 czm_pointAlongRay(czm_ray ray, float time)
- {
- return ray.origin + (time * ray.direction);
- }
- `;var N1=`/**
- * DOC_TBA
- *
- * @name czm_rayEllipsoidIntersectionInterval
- * @glslFunction
- */
- czm_raySegment czm_rayEllipsoidIntersectionInterval(czm_ray ray, vec3 ellipsoid_center, vec3 ellipsoid_inverseRadii)
- {
- // ray and ellipsoid center in eye coordinates. radii in model coordinates.
- vec3 q = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ray.origin, 1.0)).xyz;
- vec3 w = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ray.direction, 0.0)).xyz;
-
- q = q - ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ellipsoid_center, 1.0)).xyz;
-
- float q2 = dot(q, q);
- float qw = dot(q, w);
-
- if (q2 > 1.0) // Outside ellipsoid.
- {
- if (qw >= 0.0) // Looking outward or tangent (0 intersections).
- {
- return czm_emptyRaySegment;
- }
- else // qw < 0.0.
- {
- float qw2 = qw * qw;
- float difference = q2 - 1.0; // Positively valued.
- float w2 = dot(w, w);
- float product = w2 * difference;
-
- if (qw2 < product) // Imaginary roots (0 intersections).
- {
- return czm_emptyRaySegment;
- }
- else if (qw2 > product) // Distinct roots (2 intersections).
- {
- float discriminant = qw * qw - product;
- float temp = -qw + sqrt(discriminant); // Avoid cancellation.
- float root0 = temp / w2;
- float root1 = difference / temp;
- if (root0 < root1)
- {
- czm_raySegment i = czm_raySegment(root0, root1);
- return i;
- }
- else
- {
- czm_raySegment i = czm_raySegment(root1, root0);
- return i;
- }
- }
- else // qw2 == product. Repeated roots (2 intersections).
- {
- float root = sqrt(difference / w2);
- czm_raySegment i = czm_raySegment(root, root);
- return i;
- }
- }
- }
- else if (q2 < 1.0) // Inside ellipsoid (2 intersections).
- {
- float difference = q2 - 1.0; // Negatively valued.
- float w2 = dot(w, w);
- float product = w2 * difference; // Negatively valued.
- float discriminant = qw * qw - product;
- float temp = -qw + sqrt(discriminant); // Positively valued.
- czm_raySegment i = czm_raySegment(0.0, temp / w2);
- return i;
- }
- else // q2 == 1.0. On ellipsoid.
- {
- if (qw < 0.0) // Looking inward.
- {
- float w2 = dot(w, w);
- czm_raySegment i = czm_raySegment(0.0, -qw / w2);
- return i;
- }
- else // qw >= 0.0. Looking outward or tangent.
- {
- return czm_emptyRaySegment;
- }
- }
- }
- `;var F1=`/**
- * Compute the intersection interval of a ray with a sphere.
- *
- * @name czm_raySphereIntersectionInterval
- * @glslFunction
- *
- * @param {czm_ray} ray The ray.
- * @param {vec3} center The center of the sphere.
- * @param {float} radius The radius of the sphere.
- * @return {czm_raySegment} The intersection interval of the ray with the sphere.
- */
- czm_raySegment czm_raySphereIntersectionInterval(czm_ray ray, vec3 center, float radius)
- {
- vec3 o = ray.origin;
- vec3 d = ray.direction;
-
- vec3 oc = o - center;
-
- float a = dot(d, d);
- float b = 2.0 * dot(d, oc);
- float c = dot(oc, oc) - (radius * radius);
-
- float det = (b * b) - (4.0 * a * c);
-
- if (det < 0.0) {
- return czm_emptyRaySegment;
- }
-
- float sqrtDet = sqrt(det);
-
- float t0 = (-b - sqrtDet) / (2.0 * a);
- float t1 = (-b + sqrtDet) / (2.0 * a);
-
- czm_raySegment result = czm_raySegment(t0, t1);
- return result;
- }
- `;var k1=`float czm_readDepth(sampler2D depthTexture, vec2 texCoords)
- {
- return czm_reverseLogDepth(texture(depthTexture, texCoords).r);
- }
- `;var z1=`/**
- * Reads a value previously transformed with {@link czm_writeNonPerspective}
- * by dividing it by \`w\`, the value used in the perspective divide.
- * This function is intended to be called in a fragment shader to access a
- * \`varying\` that should not be subject to perspective interpolation.
- * For example, screen-space texture coordinates. The value should have been
- * previously written in the vertex shader with a call to
- * {@link czm_writeNonPerspective}.
- *
- * @name czm_readNonPerspective
- * @glslFunction
- *
- * @param {float|vec2|vec3|vec4} value The non-perspective value to be read.
- * @param {float} oneOverW One over the perspective divide value, \`w\`. Usually this is simply \`gl_FragCoord.w\`.
- * @returns {float|vec2|vec3|vec4} The usable value.
- */
- float czm_readNonPerspective(float value, float oneOverW) {
- return value * oneOverW;
- }
-
- vec2 czm_readNonPerspective(vec2 value, float oneOverW) {
- return value * oneOverW;
- }
-
- vec3 czm_readNonPerspective(vec3 value, float oneOverW) {
- return value * oneOverW;
- }
-
- vec4 czm_readNonPerspective(vec4 value, float oneOverW) {
- return value * oneOverW;
- }
- `;var U1=`float czm_reverseLogDepth(float logZ)
- {
- #ifdef LOG_DEPTH
- float near = czm_currentFrustum.x;
- float far = czm_currentFrustum.y;
- float log2Depth = logZ * czm_log2FarDepthFromNearPlusOne;
- float depthFromNear = exp2(log2Depth) - 1.0;
- return far * (1.0 - near / (depthFromNear + near)) / (far - near);
- #endif
- return logZ;
- }
- `;var V1=`/**
- * Round a floating point value. This function exists because round() doesn't
- * exist in GLSL 1.00.
- *
- * @param {float|vec2|vec3|vec4} value The value to round
- * @param {float|vec2|vec3|vec3} The rounded value. The type matches the input.
- */
- float czm_round(float value) {
- return floor(value + 0.5);
- }
-
- vec2 czm_round(vec2 value) {
- return floor(value + 0.5);
- }
-
- vec3 czm_round(vec3 value) {
- return floor(value + 0.5);
- }
-
- vec4 czm_round(vec4 value) {
- return floor(value + 0.5);
- }
- `;var j1=`/**
- * Adjusts the saturation of a color.
- *
- * @name czm_saturation
- * @glslFunction
- *
- * @param {vec3} rgb The color.
- * @param {float} adjustment The amount to adjust the saturation of the color.
- *
- * @returns {float} The color with the saturation adjusted.
- *
- * @example
- * vec3 greyScale = czm_saturation(color, 0.0);
- * vec3 doubleSaturation = czm_saturation(color, 2.0);
- */
- vec3 czm_saturation(vec3 rgb, float adjustment)
- {
- // Algorithm from Chapter 16 of OpenGL Shading Language
- const vec3 W = vec3(0.2125, 0.7154, 0.0721);
- vec3 intensity = vec3(dot(rgb, W));
- return mix(intensity, rgb, adjustment);
- }
- `;var G1=`
- float czm_sampleShadowMap(highp samplerCube shadowMap, vec3 d)
- {
- return czm_unpackDepth(czm_textureCube(shadowMap, d));
- }
-
- float czm_sampleShadowMap(highp sampler2D shadowMap, vec2 uv)
- {
- #ifdef USE_SHADOW_DEPTH_TEXTURE
- return texture(shadowMap, uv).r;
- #else
- return czm_unpackDepth(texture(shadowMap, uv));
- #endif
- }
-
- float czm_shadowDepthCompare(samplerCube shadowMap, vec3 uv, float depth)
- {
- return step(depth, czm_sampleShadowMap(shadowMap, uv));
- }
-
- float czm_shadowDepthCompare(sampler2D shadowMap, vec2 uv, float depth)
- {
- return step(depth, czm_sampleShadowMap(shadowMap, uv));
- }
- `;var H1=`
- float czm_private_shadowVisibility(float visibility, float nDotL, float normalShadingSmooth, float darkness)
- {
- #ifdef USE_NORMAL_SHADING
- #ifdef USE_NORMAL_SHADING_SMOOTH
- float strength = clamp(nDotL / normalShadingSmooth, 0.0, 1.0);
- #else
- float strength = step(0.0, nDotL);
- #endif
- visibility *= strength;
- #endif
-
- visibility = max(visibility, darkness);
- return visibility;
- }
-
- #ifdef USE_CUBE_MAP_SHADOW
- float czm_shadowVisibility(samplerCube shadowMap, czm_shadowParameters shadowParameters)
- {
- float depthBias = shadowParameters.depthBias;
- float depth = shadowParameters.depth;
- float nDotL = shadowParameters.nDotL;
- float normalShadingSmooth = shadowParameters.normalShadingSmooth;
- float darkness = shadowParameters.darkness;
- vec3 uvw = shadowParameters.texCoords;
-
- depth -= depthBias;
- float visibility = czm_shadowDepthCompare(shadowMap, uvw, depth);
- return czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);
- }
- #else
- float czm_shadowVisibility(sampler2D shadowMap, czm_shadowParameters shadowParameters)
- {
- float depthBias = shadowParameters.depthBias;
- float depth = shadowParameters.depth;
- float nDotL = shadowParameters.nDotL;
- float normalShadingSmooth = shadowParameters.normalShadingSmooth;
- float darkness = shadowParameters.darkness;
- vec2 uv = shadowParameters.texCoords;
-
- depth -= depthBias;
- #ifdef USE_SOFT_SHADOWS
- vec2 texelStepSize = shadowParameters.texelStepSize;
- float radius = 1.0;
- float dx0 = -texelStepSize.x * radius;
- float dy0 = -texelStepSize.y * radius;
- float dx1 = texelStepSize.x * radius;
- float dy1 = texelStepSize.y * radius;
- float visibility = (
- czm_shadowDepthCompare(shadowMap, uv, depth) +
- czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy0), depth) +
- czm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy0), depth) +
- czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy0), depth) +
- czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, 0.0), depth) +
- czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, 0.0), depth) +
- czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy1), depth) +
- czm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy1), depth) +
- czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy1), depth)
- ) * (1.0 / 9.0);
- #else
- float visibility = czm_shadowDepthCompare(shadowMap, uv, depth);
- #endif
-
- return czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);
- }
- #endif
- `;var W1=`/**
- * Returns 1.0 if the given value is positive or zero, and -1.0 if it is negative. This is similar to the GLSL
- * built-in function <code>sign</code> except that returns 1.0 instead of 0.0 when the input value is 0.0.
- *
- * @name czm_signNotZero
- * @glslFunction
- *
- * @param {} value The value for which to determine the sign.
- * @returns {} 1.0 if the value is positive or zero, -1.0 if the value is negative.
- */
- float czm_signNotZero(float value)
- {
- return value >= 0.0 ? 1.0 : -1.0;
- }
-
- vec2 czm_signNotZero(vec2 value)
- {
- return vec2(czm_signNotZero(value.x), czm_signNotZero(value.y));
- }
-
- vec3 czm_signNotZero(vec3 value)
- {
- return vec3(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z));
- }
-
- vec4 czm_signNotZero(vec4 value)
- {
- return vec4(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z), czm_signNotZero(value.w));
- }
- `;var q1=`/**
- * Computes a color from the third order spherical harmonic coefficients and a normalized direction vector.
- * <p>
- * The order of the coefficients is [L00, L1_1, L10, L11, L2_2, L2_1, L20, L21, L22].
- * </p>
- *
- * @name czm_sphericalHarmonics
- * @glslFunction
- *
- * @param {vec3} normal The normalized direction.
- * @param {vec3[9]} coefficients The third order spherical harmonic coefficients.
- * @returns {vec3} The color at the direction.
- *
- * @see https://graphics.stanford.edu/papers/envmap/envmap.pdf
- */
- vec3 czm_sphericalHarmonics(vec3 normal, vec3 coefficients[9])
- {
- vec3 L00 = coefficients[0];
- vec3 L1_1 = coefficients[1];
- vec3 L10 = coefficients[2];
- vec3 L11 = coefficients[3];
- vec3 L2_2 = coefficients[4];
- vec3 L2_1 = coefficients[5];
- vec3 L20 = coefficients[6];
- vec3 L21 = coefficients[7];
- vec3 L22 = coefficients[8];
-
- float x = normal.x;
- float y = normal.y;
- float z = normal.z;
-
- vec3 L =
- L00
- + L1_1 * y
- + L10 * z
- + L11 * x
- + L2_2 * (y * x)
- + L2_1 * (y * z)
- + L20 * (3.0 * z * z - 1.0)
- + L21 * (z * x)
- + L22 * (x * x - y * y);
-
- return max(L, vec3(0.0));
- }
- `;var Y1=`/**
- * Converts an sRGB color to a linear RGB color.
- *
- * @param {vec3|vec4} srgbIn The color in sRGB space
- * @returns {vec3|vec4} The color in linear color space. The vector type matches the input.
- */
- vec3 czm_srgbToLinear(vec3 srgbIn)
- {
- return pow(srgbIn, vec3(2.2));
- }
-
- vec4 czm_srgbToLinear(vec4 srgbIn)
- {
- vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));
- return vec4(linearOut, srgbIn.a);
- }
- `;var X1=`/**
- * Creates a matrix that transforms vectors from tangent space to eye space.
- *
- * @name czm_tangentToEyeSpaceMatrix
- * @glslFunction
- *
- * @param {vec3} normalEC The normal vector in eye coordinates.
- * @param {vec3} tangentEC The tangent vector in eye coordinates.
- * @param {vec3} bitangentEC The bitangent vector in eye coordinates.
- *
- * @returns {mat3} The matrix that transforms from tangent space to eye space.
- *
- * @example
- * mat3 tangentToEye = czm_tangentToEyeSpaceMatrix(normalEC, tangentEC, bitangentEC);
- * vec3 normal = tangentToEye * texture(normalMap, st).xyz;
- */
- mat3 czm_tangentToEyeSpaceMatrix(vec3 normalEC, vec3 tangentEC, vec3 bitangentEC)
- {
- vec3 normal = normalize(normalEC);
- vec3 tangent = normalize(tangentEC);
- vec3 bitangent = normalize(bitangentEC);
- return mat3(tangent.x , tangent.y , tangent.z,
- bitangent.x, bitangent.y, bitangent.z,
- normal.x , normal.y , normal.z);
- }
- `;var K1=`/**
- * A wrapper around the texture (WebGL2) / textureCube (WebGL1)
- * function to allow for WebGL 1 support.
- *
- * @name czm_textureCube
- * @glslFunction
- *
- * @param {samplerCube} sampler The sampler.
- * @param {vec3} p The coordinate at which to sample the texture.
- */
- vec4 czm_textureCube(samplerCube sampler, vec3 p) {
- #if __VERSION__ == 300
- return texture(sampler, p);
- #else
- return textureCube(sampler, p);
- #endif
- }
-
- /**
- * A wrapper around the textureLod (WebGL2) / textureCube (WebGL1)
- * function to allow for WebGL 1 support in fragment shaders.
- *
- * @name czm_textureCubeLod
- * @glslFunction
- *
- * @param {samplerCube} sampler The sampler.
- * @param {vec3} p The coordinate at which to sample the texture.
- * @param {float} lod The mipmap level from which to sample.
- */
- vec4 czm_textureCube(samplerCube sampler, vec3 p, float lod) {
- #if __VERSION__ == 300
- return textureLod(sampler, p, lod);
- #elif defined(GL_EXT_shader_texture_lod)
- return textureCubeLodEXT(sampler, p, lod);
- #endif
- }`;var Q1=`/**
- * Transforms a plane.
- *
- * @name czm_transformPlane
- * @glslFunction
- *
- * @param {vec4} plane The plane in Hessian Normal Form.
- * @param {mat4} transform The inverse-transpose of a transformation matrix.
- */
- vec4 czm_transformPlane(vec4 plane, mat4 transform) {
- vec4 transformedPlane = transform * plane;
- // Convert the transformed plane to Hessian Normal Form
- float normalMagnitude = length(transformedPlane.xyz);
- return transformedPlane / normalMagnitude;
- }
- `;var $1=`/**
- * Translates a position (or any <code>vec3</code>) that was encoded with {@link EncodedCartesian3},
- * and then provided to the shader as separate <code>high</code> and <code>low</code> bits to
- * be relative to the eye. As shown in the example, the position can then be transformed in eye
- * or clip coordinates using {@link czm_modelViewRelativeToEye} or {@link czm_modelViewProjectionRelativeToEye},
- * respectively.
- * <p>
- * This technique, called GPU RTE, eliminates jittering artifacts when using large coordinates as
- * described in {@link http://help.agi.com/AGIComponents/html/BlogPrecisionsPrecisions.htm|Precisions, Precisions}.
- * </p>
- *
- * @name czm_translateRelativeToEye
- * @glslFunction
- *
- * @param {vec3} high The position's high bits.
- * @param {vec3} low The position's low bits.
- * @returns {vec3} The position translated to be relative to the camera's position.
- *
- * @example
- * in vec3 positionHigh;
- * in vec3 positionLow;
- *
- * void main()
- * {
- * vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);
- * gl_Position = czm_modelViewProjectionRelativeToEye * p;
- * }
- *
- * @see czm_modelViewRelativeToEye
- * @see czm_modelViewProjectionRelativeToEye
- * @see czm_computePosition
- * @see EncodedCartesian3
- */
- vec4 czm_translateRelativeToEye(vec3 high, vec3 low)
- {
- vec3 highDifference = high - czm_encodedCameraPositionMCHigh;
- // This check handles the case when NaN values have gotten into \`highDifference\`.
- // Such a thing could happen on devices running iOS.
- if (length(highDifference) == 0.0) {
- highDifference = vec3(0);
- }
- vec3 lowDifference = low - czm_encodedCameraPositionMCLow;
-
- return vec4(highDifference + lowDifference, 1.0);
- }
- `;var J1=`/**
- * @private
- */
- vec4 czm_translucentPhong(vec3 toEye, czm_material material, vec3 lightDirectionEC)
- {
- // Diffuse from directional light sources at eye (for top-down and horizon views)
- float diffuse = czm_getLambertDiffuse(vec3(0.0, 0.0, 1.0), material.normal);
-
- if (czm_sceneMode == czm_sceneMode3D) {
- // (and horizon views in 3D)
- diffuse += czm_getLambertDiffuse(vec3(0.0, 1.0, 0.0), material.normal);
- }
-
- diffuse = clamp(diffuse, 0.0, 1.0);
-
- float specular = czm_getSpecular(lightDirectionEC, toEye, material.normal, material.shininess);
-
- // Temporary workaround for adding ambient.
- vec3 materialDiffuse = material.diffuse * 0.5;
-
- vec3 ambient = materialDiffuse;
- vec3 color = ambient + material.emission;
- color += materialDiffuse * diffuse * czm_lightColor;
- color += material.specular * specular * czm_lightColor;
-
- return vec4(color, material.alpha);
- }
- `;var Z1=`/**
- * Returns the transpose of the matrix. The input <code>matrix</code> can be
- * a <code>mat2</code>, <code>mat3</code>, or <code>mat4</code>.
- *
- * @name czm_transpose
- * @glslFunction
- *
- * @param {} matrix The matrix to transpose.
- *
- * @returns {} The transposed matrix.
- *
- * @example
- * // GLSL declarations
- * mat2 czm_transpose(mat2 matrix);
- * mat3 czm_transpose(mat3 matrix);
- * mat4 czm_transpose(mat4 matrix);
- *
- * // Transpose a 3x3 rotation matrix to find its inverse.
- * mat3 eastNorthUpToEye = czm_eastNorthUpToEyeCoordinates(
- * positionMC, normalEC);
- * mat3 eyeToEastNorthUp = czm_transpose(eastNorthUpToEye);
- */
- mat2 czm_transpose(mat2 matrix)
- {
- return mat2(
- matrix[0][0], matrix[1][0],
- matrix[0][1], matrix[1][1]);
- }
-
- mat3 czm_transpose(mat3 matrix)
- {
- return mat3(
- matrix[0][0], matrix[1][0], matrix[2][0],
- matrix[0][1], matrix[1][1], matrix[2][1],
- matrix[0][2], matrix[1][2], matrix[2][2]);
- }
-
- mat4 czm_transpose(mat4 matrix)
- {
- return mat4(
- matrix[0][0], matrix[1][0], matrix[2][0], matrix[3][0],
- matrix[0][1], matrix[1][1], matrix[2][1], matrix[3][1],
- matrix[0][2], matrix[1][2], matrix[2][2], matrix[3][2],
- matrix[0][3], matrix[1][3], matrix[2][3], matrix[3][3]);
- }
- `;var eR=`vec2 getLookupUv(vec2 dimensions, int i) {
- int pixY = i / int(dimensions.x);
- int pixX = i - (pixY * int(dimensions.x));
- float pixelWidth = 1.0 / dimensions.x;
- float pixelHeight = 1.0 / dimensions.y;
- float u = (float(pixX) + 0.5) * pixelWidth; // sample from center of pixel
- float v = (float(pixY) + 0.5) * pixelHeight;
- return vec2(u, v);
- }
-
- vec4 czm_unpackClippingExtents(highp sampler2D extentsTexture, int index) {
- vec2 textureDimensions = vec2(textureSize(extentsTexture, 0));
- return texture(extentsTexture, getLookupUv(textureDimensions, index));
- }`;var tR=`/**
- * Unpacks a vec4 depth value to a float in [0, 1) range.
- *
- * @name czm_unpackDepth
- * @glslFunction
- *
- * @param {vec4} packedDepth The packed depth.
- *
- * @returns {float} The floating-point depth in [0, 1) range.
- */
- float czm_unpackDepth(vec4 packedDepth)
- {
- // See Aras Pranckevi\u010Dius' post Encoding Floats to RGBA
- // http://aras-p.info/blog/2009/07/30/encoding-floats-to-rgba-the-final/
- return dot(packedDepth, vec4(1.0, 1.0 / 255.0, 1.0 / 65025.0, 1.0 / 16581375.0));
- }
- `;var nR=`/**
- * Unpack an IEEE 754 single-precision float that is packed as a little-endian unsigned normalized vec4.
- *
- * @name czm_unpackFloat
- * @glslFunction
- *
- * @param {vec4} packedFloat The packed float.
- *
- * @returns {float} The floating-point depth in arbitrary range.
- */
- float czm_unpackFloat(vec4 packedFloat)
- {
- // Convert to [0.0, 255.0] and round to integer
- packedFloat = floor(packedFloat * 255.0 + 0.5);
- float sign = 1.0 - step(128.0, packedFloat[3]) * 2.0;
- float exponent = 2.0 * mod(packedFloat[3], 128.0) + step(128.0, packedFloat[2]) - 127.0;
- if (exponent == -127.0)
- {
- return 0.0;
- }
- float mantissa = mod(packedFloat[2], 128.0) * 65536.0 + packedFloat[1] * 256.0 + packedFloat[0] + float(0x800000);
- float result = sign * exp2(exponent - 23.0) * mantissa;
- return result;
- }
- `;var iR=`/**
- * Useful for reinterpreting texture data as higher-precision values.
- * Only works correctly in WebGL 2, which supports the uint type and bitwise operations.
- *
- * @param {float|vec2|vec3|vec4} 1-4 values from a texture lookup (RGBA channels), normalized to [0.0, 1.0].
- * @return {uint} Raw bits as an unsigned integer.
- */
- uint czm_unpackTexture(float packedValue) {
- float rounded = czm_round(packedValue * 255.0);
- return uint(rounded);
- }
-
- uint czm_unpackTexture(vec2 packedValue) {
- vec2 rounded = czm_round(packedValue * 255.0);
- uint byte0 = uint(rounded.x);
- uint byte1 = uint(rounded.y);
- return byte0 | (byte1 << 8);
- }
-
- uint czm_unpackTexture(vec3 packedValue) {
- vec3 rounded = czm_round(packedValue * 255.0);
- uint byte0 = uint(rounded.x);
- uint byte1 = uint(rounded.y);
- uint byte2 = uint(rounded.z);
- return byte0 | (byte1 << 8) | (byte2 << 16);
- }
-
- uint czm_unpackTexture(vec4 packedValue) {
- vec4 rounded = czm_round(packedValue * 255.0);
- uint byte0 = uint(rounded.x);
- uint byte1 = uint(rounded.y);
- uint byte2 = uint(rounded.z);
- uint byte3 = uint(rounded.w);
- return byte0 | (byte1 << 8) | (byte2 << 16) | (byte3 << 24);
- }
- `;var oR=`/**
- * Unpack unsigned integers of 1-4 bytes. in WebGL 1, there is no uint type,
- * so the return value is an int.
- * <p>
- * There are also precision limitations in WebGL 1. highp int is still limited
- * to 24 bits. Above the value of 2^24 = 16777216, precision loss may occur.
- * </p>
- *
- * @param {float|vec2|vec3|vec4} packed The packed value. For vectors, the components are listed in little-endian order.
- *
- * @return {int} The unpacked value.
- */
- int czm_unpackUint(float packedValue) {
- float rounded = czm_round(packedValue * 255.0);
- return int(rounded);
- }
-
- int czm_unpackUint(vec2 packedValue) {
- vec2 rounded = czm_round(packedValue * 255.0);
- return int(dot(rounded, vec2(1.0, 256.0)));
- }
-
- int czm_unpackUint(vec3 packedValue) {
- vec3 rounded = czm_round(packedValue * 255.0);
- return int(dot(rounded, vec3(1.0, 256.0, 65536.0)));
- }
-
- int czm_unpackUint(vec4 packedValue) {
- vec4 rounded = czm_round(packedValue * 255.0);
- return int(dot(rounded, vec4(1.0, 256.0, 65536.0, 16777216.0)));
- }
- `;var rR=`/**
- * Transform metadata values following the EXT_structural_metadata spec
- * by multiplying by scale and adding the offset. Operations are always
- * performed component-wise, even for matrices.
- *
- * @param {float|vec2|vec3|vec4|mat2|mat3|mat4} offset The offset to add
- * @param {float|vec2|vec3|vec4|mat2|mat3|mat4} scale The scale factor to multiply
- * @param {float|vec2|vec3|vec4|mat2|mat3|mat4} value The original value.
- *
- * @return {float|vec2|vec3|vec4|mat2|mat3|mat4} The transformed value of the same scalar/vector/matrix type as the input.
- */
- float czm_valueTransform(float offset, float scale, float value) {
- return scale * value + offset;
- }
-
- vec2 czm_valueTransform(vec2 offset, vec2 scale, vec2 value) {
- return scale * value + offset;
- }
-
- vec3 czm_valueTransform(vec3 offset, vec3 scale, vec3 value) {
- return scale * value + offset;
- }
-
- vec4 czm_valueTransform(vec4 offset, vec4 scale, vec4 value) {
- return scale * value + offset;
- }
-
- mat2 czm_valueTransform(mat2 offset, mat2 scale, mat2 value) {
- return matrixCompMult(scale, value) + offset;
- }
-
- mat3 czm_valueTransform(mat3 offset, mat3 scale, mat3 value) {
- return matrixCompMult(scale, value) + offset;
- }
-
- mat4 czm_valueTransform(mat4 offset, mat4 scale, mat4 value) {
- return matrixCompMult(scale, value) + offset;
- }
- `;var aR=`#ifdef LOG_DEPTH
- // 1.0 at the near plane, increasing linearly from there.
- out float v_depthFromNearPlusOne;
- #ifdef SHADOW_MAP
- out vec3 v_logPositionEC;
- #endif
- #endif
-
- vec4 czm_updatePositionDepth(vec4 coords) {
- #if defined(LOG_DEPTH)
-
- #ifdef SHADOW_MAP
- vec3 logPositionEC = (czm_inverseProjection * coords).xyz;
- v_logPositionEC = logPositionEC;
- #endif
-
- // With the very high far/near ratios used with the logarithmic depth
- // buffer, floating point rounding errors can cause linear depth values
- // to end up on the wrong side of the far plane, even for vertices that
- // are really nowhere near it. Since we always write a correct logarithmic
- // depth value in the fragment shader anyway, we just need to make sure
- // such errors don't cause the primitive to be clipped entirely before
- // we even get to the fragment shader.
- coords.z = clamp(coords.z / coords.w, -1.0, 1.0) * coords.w;
- #endif
-
- return coords;
- }
-
- /**
- * Writes the logarithmic depth to gl_Position using the already computed gl_Position.
- *
- * @name czm_vertexLogDepth
- * @glslFunction
- */
- void czm_vertexLogDepth()
- {
- #ifdef LOG_DEPTH
- v_depthFromNearPlusOne = (gl_Position.w - czm_currentFrustum.x) + 1.0;
- gl_Position = czm_updatePositionDepth(gl_Position);
- #endif
- }
-
- /**
- * Writes the logarithmic depth to gl_Position using the provided clip coordinates.
- * <p>
- * An example use case for this function would be moving the vertex in window coordinates
- * before converting back to clip coordinates. Use the original vertex clip coordinates.
- * </p>
- * @name czm_vertexLogDepth
- * @glslFunction
- *
- * @param {vec4} clipCoords The vertex in clip coordinates.
- *
- * @example
- * czm_vertexLogDepth(czm_projection * vec4(positionEyeCoordinates, 1.0));
- */
- void czm_vertexLogDepth(vec4 clipCoords)
- {
- #ifdef LOG_DEPTH
- v_depthFromNearPlusOne = (clipCoords.w - czm_currentFrustum.x) + 1.0;
- czm_updatePositionDepth(clipCoords);
- #endif
- }
- `;var sR=`vec4 czm_screenToEyeCoordinates(vec4 screenCoordinate)
- {
- // Reconstruct NDC coordinates
- float x = 2.0 * screenCoordinate.x - 1.0;
- float y = 2.0 * screenCoordinate.y - 1.0;
- float z = (screenCoordinate.z - czm_viewportTransformation[3][2]) / czm_viewportTransformation[2][2];
- vec4 q = vec4(x, y, z, 1.0);
-
- // Reverse the perspective division to obtain clip coordinates.
- q /= screenCoordinate.w;
-
- // Reverse the projection transformation to obtain eye coordinates.
- if (!(czm_inverseProjection == mat4(0.0))) // IE and Edge sometimes do something weird with != between mat4s
- {
- q = czm_inverseProjection * q;
- }
- else
- {
- float top = czm_frustumPlanes.x;
- float bottom = czm_frustumPlanes.y;
- float left = czm_frustumPlanes.z;
- float right = czm_frustumPlanes.w;
-
- float near = czm_currentFrustum.x;
- float far = czm_currentFrustum.y;
-
- q.x = (q.x * (right - left) + left + right) * 0.5;
- q.y = (q.y * (top - bottom) + bottom + top) * 0.5;
- q.z = (q.z * (near - far) - near - far) * 0.5;
- q.w = 1.0;
- }
-
- return q;
- }
-
- /**
- * Transforms a position from window to eye coordinates.
- * The transform from window to normalized device coordinates is done using components
- * of (@link czm_viewport} and {@link czm_viewportTransformation} instead of calculating
- * the inverse of <code>czm_viewportTransformation</code>. The transformation from
- * normalized device coordinates to clip coordinates is done using <code>fragmentCoordinate.w</code>,
- * which is expected to be the scalar used in the perspective divide. The transformation
- * from clip to eye coordinates is done using {@link czm_inverseProjection}.
- *
- * @name czm_windowToEyeCoordinates
- * @glslFunction
- *
- * @param {vec4} fragmentCoordinate The position in window coordinates to transform.
- *
- * @returns {vec4} The transformed position in eye coordinates.
- *
- * @see czm_modelToWindowCoordinates
- * @see czm_eyeToWindowCoordinates
- * @see czm_inverseProjection
- * @see czm_viewport
- * @see czm_viewportTransformation
- *
- * @example
- * vec4 positionEC = czm_windowToEyeCoordinates(gl_FragCoord);
- */
- vec4 czm_windowToEyeCoordinates(vec4 fragmentCoordinate)
- {
- vec2 screenCoordXY = (fragmentCoordinate.xy - czm_viewport.xy) / czm_viewport.zw;
- return czm_screenToEyeCoordinates(vec4(screenCoordXY, fragmentCoordinate.zw));
- }
-
- vec4 czm_screenToEyeCoordinates(vec2 screenCoordinateXY, float depthOrLogDepth)
- {
- // See reverseLogDepth.glsl. This is separate to re-use the pow.
- #if defined(LOG_DEPTH) || defined(LOG_DEPTH_READ_ONLY)
- float near = czm_currentFrustum.x;
- float far = czm_currentFrustum.y;
- float log2Depth = depthOrLogDepth * czm_log2FarDepthFromNearPlusOne;
- float depthFromNear = exp2(log2Depth) - 1.0;
- float depthFromCamera = depthFromNear + near;
- vec4 screenCoord = vec4(screenCoordinateXY, far * (1.0 - near / depthFromCamera) / (far - near), 1.0);
- vec4 eyeCoordinate = czm_screenToEyeCoordinates(screenCoord);
- eyeCoordinate.w = 1.0 / depthFromCamera; // Better precision
- #else
- vec4 screenCoord = vec4(screenCoordinateXY, depthOrLogDepth, 1.0);
- vec4 eyeCoordinate = czm_screenToEyeCoordinates(screenCoord);
- #endif
- return eyeCoordinate;
- }
-
- /**
- * Transforms a position given as window x/y and a depth or a log depth from window to eye coordinates.
- * This function produces more accurate results for window positions with log depth than
- * conventionally unpacking the log depth using czm_reverseLogDepth and using the standard version
- * of czm_windowToEyeCoordinates.
- *
- * @name czm_windowToEyeCoordinates
- * @glslFunction
- *
- * @param {vec2} fragmentCoordinateXY The XY position in window coordinates to transform.
- * @param {float} depthOrLogDepth A depth or log depth for the fragment.
- *
- * @see czm_modelToWindowCoordinates
- * @see czm_eyeToWindowCoordinates
- * @see czm_inverseProjection
- * @see czm_viewport
- * @see czm_viewportTransformation
- *
- * @returns {vec4} The transformed position in eye coordinates.
- */
- vec4 czm_windowToEyeCoordinates(vec2 fragmentCoordinateXY, float depthOrLogDepth)
- {
- vec2 screenCoordXY = (fragmentCoordinateXY.xy - czm_viewport.xy) / czm_viewport.zw;
- return czm_screenToEyeCoordinates(screenCoordXY, depthOrLogDepth);
- }
- `;var cR=`// emulated noperspective
- #if !defined(LOG_DEPTH)
- in float v_WindowZ;
- #endif
-
- /**
- * Emulates GL_DEPTH_CLAMP. Clamps a fragment to the near and far plane
- * by writing the fragment's depth. See czm_depthClamp for more details.
- *
- * @name czm_writeDepthClamp
- * @glslFunction
- *
- * @example
- * out_FragColor = color;
- * czm_writeDepthClamp();
- *
- * @see czm_depthClamp
- */
- void czm_writeDepthClamp()
- {
- #if (!defined(LOG_DEPTH) && (__VERSION__ == 300 || defined(GL_EXT_frag_depth)))
- gl_FragDepth = clamp(v_WindowZ * gl_FragCoord.w, 0.0, 1.0);
- #endif
- }
- `;var lR=`#ifdef LOG_DEPTH
- in float v_depthFromNearPlusOne;
-
- #ifdef POLYGON_OFFSET
- uniform vec2 u_polygonOffset;
- #endif
-
- #endif
-
- /**
- * Writes the fragment depth to the logarithmic depth buffer.
- * <p>
- * Use this when the vertex shader does not call {@link czm_vertexLogDepth}, for example, when
- * ray-casting geometry using a full screen quad.
- * </p>
- * @name czm_writeLogDepth
- * @glslFunction
- *
- * @param {float} depth The depth coordinate, where 1.0 is on the near plane and
- * depth increases in eye-space units from there
- *
- * @example
- * czm_writeLogDepth((czm_projection * v_positionEyeCoordinates).w + 1.0);
- */
- void czm_writeLogDepth(float depth)
- {
- #if (defined(LOG_DEPTH) && (__VERSION__ == 300 || defined(GL_EXT_frag_depth)))
- // Discard the vertex if it's not between the near and far planes.
- // We allow a bit of epsilon on the near plane comparison because a 1.0
- // from the vertex shader (indicating the vertex should be _on_ the near
- // plane) will not necessarily come here as exactly 1.0.
- if (depth <= 0.9999999 || depth > czm_farDepthFromNearPlusOne) {
- discard;
- }
-
- #ifdef POLYGON_OFFSET
- // Polygon offset: m * factor + r * units
- float factor = u_polygonOffset[0];
- float units = u_polygonOffset[1];
-
- #if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))
- // This factor doesn't work in IE 10
- if (factor != 0.0) {
- // m = sqrt(dZdX^2 + dZdY^2);
- float x = dFdx(depth);
- float y = dFdy(depth);
- float m = sqrt(x * x + y * y);
-
- // Apply the factor before computing the log depth.
- depth += m * factor;
- }
- #endif
-
- #endif
-
- gl_FragDepth = log2(depth) * czm_oneOverLog2FarDepthFromNearPlusOne;
-
- #ifdef POLYGON_OFFSET
- // Apply the units after the log depth.
- gl_FragDepth += czm_epsilon7 * units;
- #endif
-
- #endif
- }
-
- /**
- * Writes the fragment depth to the logarithmic depth buffer.
- * <p>
- * Use this when the vertex shader calls {@link czm_vertexLogDepth}.
- * </p>
- *
- * @name czm_writeLogDepth
- * @glslFunction
- */
- void czm_writeLogDepth() {
- #ifdef LOG_DEPTH
- czm_writeLogDepth(v_depthFromNearPlusOne);
- #endif
- }
- `;var uR=`/**
- * Transforms a value for non-perspective interpolation by multiplying
- * it by w, the value used in the perspective divide. This function is
- * intended to be called in a vertex shader to compute the value of a
- * \`varying\` that should not be subject to perspective interpolation.
- * For example, screen-space texture coordinates. The fragment shader
- * must call {@link czm_readNonPerspective} to retrieve the final
- * non-perspective value.
- *
- * @name czm_writeNonPerspective
- * @glslFunction
- *
- * @param {float|vec2|vec3|vec4} value The value to be interpolated without accounting for perspective.
- * @param {float} w The perspective divide value. Usually this is the computed \`gl_Position.w\`.
- * @returns {float|vec2|vec3|vec4} The transformed value, intended to be stored in a \`varying\` and read in the
- * fragment shader with {@link czm_readNonPerspective}.
- */
- float czm_writeNonPerspective(float value, float w) {
- return value * w;
- }
-
- vec2 czm_writeNonPerspective(vec2 value, float w) {
- return value * w;
- }
-
- vec3 czm_writeNonPerspective(vec3 value, float w) {
- return value * w;
- }
-
- vec4 czm_writeNonPerspective(vec4 value, float w) {
- return value * w;
- }
- `;var Ix={czm_degreesPerRadian:RD,czm_depthRange:OD,czm_epsilon1:MD,czm_epsilon2:BD,czm_epsilon3:LD,czm_epsilon4:ND,czm_epsilon5:FD,czm_epsilon6:kD,czm_epsilon7:zD,czm_infinity:UD,czm_oneOverPi:VD,czm_oneOverTwoPi:jD,czm_passCesium3DTile:GD,czm_passCesium3DTileClassification:HD,czm_passCesium3DTileClassificationIgnoreShow:WD,czm_passCesium3DTileEdges:qD,czm_passCesium3DTileEdgesDirect:YD,czm_passClassification:XD,czm_passCompute:KD,czm_passEnvironment:QD,czm_passGaussianSplats:$D,czm_passGlobe:JD,czm_passOpaque:ZD,czm_passOverlay:eP,czm_passTerrainClassification:tP,czm_passTranslucent:nP,czm_passVoxels:iP,czm_pi:oP,czm_piOverFour:rP,czm_piOverSix:aP,czm_piOverThree:sP,czm_piOverTwo:cP,czm_radiansPerDegree:lP,czm_sceneMode2D:uP,czm_sceneMode3D:fP,czm_sceneModeColumbusView:dP,czm_sceneModeMorphing:hP,czm_solarRadius:mP,czm_threePiOver2:pP,czm_twoPi:gP,czm_webMercatorMaxLatitude:_P,czm_depthRangeStruct:AP,czm_material:yP,czm_materialInput:xP,czm_modelMaterial:bP,czm_modelVertexOutput:CP,czm_ray:TP,czm_raySegment:EP,czm_shadowParameters:vP,czm_HSBToRGB:SP,czm_HSLToRGB:wP,czm_RGBToHSB:IP,czm_RGBToHSL:DP,czm_RGBToXYZ:PP,czm_XYZToRGB:RP,czm_acesTonemapping:OP,czm_alphaWeight:MP,czm_antialias:BP,czm_applyHSBShift:LP,czm_approximateSphericalCoordinates:NP,czm_approximateTanh:FP,czm_backFacing:kP,czm_branchFreeTernary:zP,czm_cascadeColor:UP,czm_cascadeDistance:VP,czm_cascadeMatrix:jP,czm_cascadeWeights:GP,czm_clipPolygons:HP,czm_columbusViewMorph:WP,czm_computeAtmosphereColor:qP,czm_computeGroundAtmosphereScattering:YP,czm_computePosition:XP,czm_computeScattering:KP,czm_computeTextureTransform:QP,czm_cosineAndSine:$P,czm_decodeRGB8:JP,czm_decompressTextureCoordinates:ZP,czm_depthClamp:e1,czm_eastNorthUpToEyeCoordinates:t1,czm_ellipsoidContainsPoint:n1,czm_ellipsoidTextureCoordinates:i1,czm_equalsEpsilon:o1,czm_eyeOffset:r1,czm_eyeToWindowCoordinates:a1,czm_fastApproximateAtan:s1,czm_fog:c1,czm_gammaCorrect:l1,czm_geodeticSurfaceNormal:u1,czm_getDefaultMaterial:f1,czm_getDynamicAtmosphereLightDirection:d1,czm_getLambertDiffuse:h1,czm_getSpecular:m1,czm_getWaterNoise:p1,czm_hue:g1,czm_inverseGamma:_1,czm_isEmpty:A1,czm_isFull:y1,czm_latitudeToWebMercatorFraction:x1,czm_lineDistance:b1,czm_linearToSrgb:C1,czm_luminance:T1,czm_maximumComponent:E1,czm_metersPerPixel:v1,czm_modelToWindowCoordinates:S1,czm_multiplyWithColorBalance:w1,czm_nearFarScalar:I1,czm_octDecode:D1,czm_packDepth:P1,czm_pbrLighting:R1,czm_pbrNeutralTonemapping:O1,czm_phong:M1,czm_planeDistance:B1,czm_pointAlongRay:L1,czm_rayEllipsoidIntersectionInterval:N1,czm_raySphereIntersectionInterval:F1,czm_readDepth:k1,czm_readNonPerspective:z1,czm_reverseLogDepth:U1,czm_round:V1,czm_saturation:j1,czm_shadowDepthCompare:G1,czm_shadowVisibility:H1,czm_signNotZero:W1,czm_sphericalHarmonics:q1,czm_srgbToLinear:Y1,czm_tangentToEyeSpaceMatrix:X1,czm_textureCube:K1,czm_transformPlane:Q1,czm_translateRelativeToEye:$1,czm_translucentPhong:J1,czm_transpose:Z1,czm_unpackClippingExtents:eR,czm_unpackDepth:tR,czm_unpackFloat:nR,czm_unpackTexture:iR,czm_unpackUint:oR,czm_valueTransform:rR,czm_vertexLogDepth:aR,czm_windowToEyeCoordinates:sR,czm_writeDepthClamp:cR,czm_writeLogDepth:lR,czm_writeNonPerspective:uR};function D2e(e,t){let n=e;return n=n.replaceAll("version 300 es",""),n=n.replaceAll(/(texture\()/g,"texture2D("),t?(n=n.replaceAll(/\n\s*(in)\s+(vec\d|mat\d|float)/g,`
- varying $2`),/out_FragData_(\d+)/.test(n)&&(n=`#extension GL_EXT_draw_buffers : enable
- ${n}`,n=n.replaceAll(/layout\s+\(location\s*=\s*\d+\)\s*out\s+vec4\s+out_FragData_\d+;/g,""),n=n.replaceAll(/out_FragData_(\d+)/g,"gl_FragData[$1]")),n=n.replaceAll(/layout\s+\(location\s*=\s*0\)\s*out\s+vec4\s+out_FragColor;/g,""),n=n.replaceAll(/out_FragColor/g,"gl_FragColor"),n=n.replaceAll(/out_FragColor\[(\d+)\]/g,"gl_FragColor[$1]"),/gl_FragDepth/.test(n)&&(n=`#extension GL_EXT_frag_depth : enable
- ${n}`,n=n.replaceAll(/gl_FragDepth/g,"gl_FragDepthEXT")),n=`#ifdef GL_EXT_shader_texture_lod
- #extension GL_EXT_shader_texture_lod : enable
- #endif
- ${n}`,n=`#ifdef GL_OES_standard_derivatives
- #extension GL_OES_standard_derivatives : enable
- #endif
- ${n}`):(n=n.replaceAll(/(in)\s+(vec\d|mat\d|float)/g,"attribute $2"),n=n.replaceAll(/(out)\s+(vec\d|mat\d|float)\s+([\w]+);/g,"varying $2 $3;")),n=`#version 100
- ${n}`,n}var fR=D2e;function fce(e){return e=e.replace(/\/\/.*/g,""),e.replace(/\/\*\*[\s\S]*?\*\//gm,function(t){let n=t.match(/\n/gm).length,i="";for(let o=0;o<n;++o)i+=`
- `;return i})}function dce(e,t,n){let i;for(let o=0;o<n.length;++o)n[o].name===e&&(i=n[o]);return l(i)||(t=fce(t),i={name:e,glslSource:t,dependsOn:[],requiredBy:[],evaluated:!1},n.push(i)),i}function hce(e,t){if(e.evaluated)return;e.evaluated=!0;let n=e.glslSource.match(/\bczm_[a-zA-Z0-9_]*/g);l(n)&&n!==null&&(n=n.filter(function(i,o){return n.indexOf(i)===o}),n.forEach(function(i){if(i!==e.name&&Ps._czmBuiltinsAndUniforms.hasOwnProperty(i)){let o=dce(i,Ps._czmBuiltinsAndUniforms[i],t);e.dependsOn.push(o),o.requiredBy.push(e),hce(o,t)}}))}function P2e(e){let t=[],n=[];for(;e.length>0;){let o=e.pop();n.push(o),o.requiredBy.length===0&&t.push(o)}for(;t.length>0;){let o=t.shift();e.push(o);for(let r=0;r<o.dependsOn.length;++r){let a=o.dependsOn[r],s=a.requiredBy.indexOf(o);a.requiredBy.splice(s,1),a.requiredBy.length===0&&t.push(a)}}let i=[];for(let o=0;o<n.length;++o)n[o].requiredBy.length!==0&&i.push(n[o])}function R2e(e){let t=[],n=dce("main",e,t);hce(n,t),P2e(t);let i="";for(let o=t.length-1;o>=0;--o)i=`${i+t[o].glslSource}
- `;return i.replace(n.glslSource,"")}function mce(e,t,n){let i="",o=e.sources;if(l(o))for(let g=0;g<o.length;++g)i+=`
- #line 0
- ${o[g]}`;i=fce(i);let r;i=i.replace(/#version\s+(.*?)\n/gm,function(g,m){return r=m,`
- `});let a=[];i=i.replace(/#extension.*\n/gm,function(g){return a.push(g),`
- `}),i=i.replace(/precision\s(lowp|mediump|highp)\s(float|int);/,"");let s=e.pickColorQualifier;l(s)&&(i=Ps.createPickFragmentShaderSource(i,s));let c="",u=a.length;for(let g=0;g<u;g++)c+=a[g];t&&(c+=`
- #ifdef GL_FRAGMENT_PRECISION_HIGH
- precision highp float;
- precision highp int;
- #else
- precision mediump float;
- precision mediump int;
- #define highp mediump
- #endif
- `),n.webgl2&&(c+=`precision highp sampler3D;
-
- `);let f=e.defines;if(l(f))for(let g=0,m=f.length;g<m;++g){let A=f[g];A.length!==0&&(c+=`#define ${A}
- `)}n.textureFloatLinear&&(c+=`#define OES_texture_float_linear
-
- `),n.floatingPointTexture&&(c+=`#define OES_texture_float
-
- `);let d="";e.includeBuiltIns&&(d=R2e(i)),c+=`
- #line 0
- `;let p=d+i;return n.webgl2&&t&&!/layout\s*\(location\s*=\s*0\)\s*out\s+vec4\s+out_FragColor;/g.test(p)&&!/czm_out_FragColor/g.test(p)&&/out_FragColor/g.test(p)&&(c+=`layout(location = 0) out vec4 out_FragColor;
-
- `),c+=d,c+=i,n.webgl2?c=`#version 300 es
- ${c}`:c=fR(c,t),c}function Ps(e){e=e??G.EMPTY_OBJECT;let t=e.pickColorQualifier;this.defines=l(e.defines)?e.defines.slice(0):[],this.sources=l(e.sources)?e.sources.slice(0):[],this.pickColorQualifier=t,this.includeBuiltIns=e.includeBuiltIns??!0}Ps.prototype.clone=function(){return new Ps({sources:this.sources,defines:this.defines,pickColorQualifier:this.pickColorQualifier,includeBuiltIns:this.includeBuiltIns})};Ps.replaceMain=function(e,t){return t=`void ${t}()`,e.replace(/void\s+main\s*\(\s*(?:void)?\s*\)/g,t)};Ps.prototype.getCacheKey=function(){let t=this.defines.slice().sort().join(","),n=this.pickColorQualifier,i=this.includeBuiltIns,o=this.sources.join(`
- `);return`${t}:${n}:${i}:${o}`};Ps.prototype.createCombinedVertexShader=function(e){return mce(this,!1,e)};Ps.prototype.createCombinedFragmentShader=function(e){return mce(this,!0,e)};Ps._czmBuiltinsAndUniforms={};for(let e in Ix)Ix.hasOwnProperty(e)&&(Ps._czmBuiltinsAndUniforms[e]=Ix[e]);for(let e in D0)if(D0.hasOwnProperty(e)){let t=D0[e];typeof t.getDeclaration=="function"&&(Ps._czmBuiltinsAndUniforms[e]=t.getDeclaration(e))}Ps.createPickVertexShaderSource=function(e){return`${Ps.replaceMain(e,"czm_old_main")}
- in vec4 pickColor;
- out vec4 czm_pickColor;
- void main()
- {
- czm_old_main();
- czm_pickColor = pickColor;
- }`};Ps.createPickFragmentShaderSource=function(e,t){let n=Ps.replaceMain(e,"czm_old_main"),i=`${t} vec4 czm_pickColor;
- void main()
- {
- czm_old_main();
- if (out_FragColor.a == 0.0) {
- discard;
- }
- out_FragColor = czm_pickColor;
- }`;return`${n}
- ${i}`};function O2e(e,t){let n=e.defines,i=n.length;for(let o=0;o<i;++o)if(n[o]===t)return!0;return!1}function pce(e,t){let n=e.sources,i=n.length;for(let o=0;o<i;++o)if(n[o].indexOf(t)!==-1)return!0;return!1}function gce(e,t){let n=t.length;for(let i=0;i<n;++i){let o=t[i];if(pce(e,o))return o}}var M2e=["v_normalEC","v_normal"];Ps.findNormalVarying=function(e){return pce(e,"#ifdef HAS_NORMALS")?O2e(e,"HAS_NORMALS")?"v_normalEC":void 0:gce(e,M2e)};var B2e=["v_positionEC"];Ps.findPositionVarying=function(e){return gce(e,B2e)};var He=Ps;function Mh(e){this._context=e,this._shaders={},this._numberOfShaders=0,this._shadersToRelease={}}Object.defineProperties(Mh.prototype,{numberOfShaders:{get:function(){return this._numberOfShaders}}});Mh.prototype.replaceShaderProgram=function(e){return l(e.shaderProgram)&&e.shaderProgram.destroy(),this.getShaderProgram(e)};function L2e(e){let t=Object.keys(e).sort();return JSON.stringify(e,t)}Mh.prototype.getShaderProgram=function(e){let t=e.vertexShaderSource,n=e.fragmentShaderSource,i=e.attributeLocations;typeof t=="string"&&(t=new He({sources:[t]})),typeof n=="string"&&(n=new He({sources:[n]}));let o=t.getCacheKey(),r=n.getCacheKey(),a=l(i)?L2e(i):"",s=`${o}:${r}:${a}`,c;if(l(this._shaders[s]))c=this._shaders[s],delete this._shadersToRelease[s];else{let u=this._context,f=t.createCombinedVertexShader(u),d=n.createCombinedFragmentShader(u),p=new Kt({gl:u._gl,logShaderCompilation:u.logShaderCompilation,debugShaders:u.debugShaders,vertexShaderSource:t,vertexShaderText:f,fragmentShaderSource:n,fragmentShaderText:d,attributeLocations:i});c={cache:this,shaderProgram:p,keyword:s,derivedKeywords:[],count:0},p._cachedShader=c,this._shaders[s]=c,++this._numberOfShaders}return++c.count,c.shaderProgram};Mh.prototype.replaceDerivedShaderProgram=function(e,t,n){let i=e._cachedShader,o=t+i.keyword,r=this._shaders[o];if(l(r)){nq(this,r);let a=i.derivedKeywords.indexOf(t);a>-1&&i.derivedKeywords.splice(a,1)}return this.createDerivedShaderProgram(e,t,n)};Mh.prototype.getDerivedShaderProgram=function(e,t){let n=e._cachedShader,i=t+n.keyword,o=this._shaders[i];if(l(o))return o.shaderProgram};Mh.prototype.createDerivedShaderProgram=function(e,t,n){let i=e._cachedShader,o=t+i.keyword,r=n.vertexShaderSource,a=n.fragmentShaderSource,s=n.attributeLocations;typeof r=="string"&&(r=new He({sources:[r]})),typeof a=="string"&&(a=new He({sources:[a]}));let c=this._context,u=r.createCombinedVertexShader(c),f=a.createCombinedFragmentShader(c),d=new Kt({gl:c._gl,logShaderCompilation:c.logShaderCompilation,debugShaders:c.debugShaders,vertexShaderSource:r,vertexShaderText:u,fragmentShaderSource:a,fragmentShaderText:f,attributeLocations:s}),p={cache:this,shaderProgram:d,keyword:o,derivedKeywords:[],count:0};return i.derivedKeywords.push(t),d._cachedShader=p,this._shaders[o]=p,d};function nq(e,t){let n=t.derivedKeywords,i=n.length;for(let o=0;o<i;++o){let r=n[o]+t.keyword,a=e._shaders[r];nq(e,a)}delete e._shaders[t.keyword],t.shaderProgram.finalDestroy()}Mh.prototype.destroyReleasedShaderPrograms=function(){let e=this._shadersToRelease;for(let t in e)if(e.hasOwnProperty(t)){let n=e[t];nq(this,n),--this._numberOfShaders}this._shadersToRelease={}};Mh.prototype.releaseShaderProgram=function(e){if(l(e)){let t=e._cachedShader;t&&--t.count===0&&(this._shadersToRelease[t.keyword]=t)}};Mh.prototype.isDestroyed=function(){return!1};Mh.prototype.destroy=function(){let e=this._shaders;for(let t in e)e.hasOwnProperty(t)&&e[t].shaderProgram.finalDestroy();return fe(this)};var dR=Mh;function Bh(e){e=e??G.EMPTY_OBJECT;let{context:t,source:n,pixelFormat:i=Xe.RGBA,pixelDatatype:o=je.UNSIGNED_BYTE,flipY:r=!0,skipColorSpaceConversion:a=!1,sampler:s=new jt}=e,{width:c,height:u}=e;l(n)&&(l(c)||(c=n.videoWidth??n.naturalWidth??n.width),l(u)||(u=n.videoHeight??n.naturalHeight??n.height));let f=e.preMultiplyAlpha||i===Xe.RGB||i===Xe.LUMINANCE,d=Xe.toInternalFormat(i,o,t),p=Xe.isCompressedFormat(d),g=t._gl,m=p?Xe.compressedTextureSizeInBytes(i,c,u):Xe.textureSizeInBytes(i,o,c,u);this._id=e.id??jn(),this._context=t,this._textureFilterAnisotropic=t._textureFilterAnisotropic,this._textureTarget=g.TEXTURE_2D,this._texture=g.createTexture(),this._internalFormat=d,this._pixelFormat=i,this._pixelDatatype=o,this._width=c,this._height=u,this._dimensions=new z(c,u),this._hasMipmap=!1,this._sizeInBytes=m,this._preMultiplyAlpha=f,this._flipY=r,this._initialized=!1,this._sampler=void 0,this._sampler=s,xce(this,s),g.activeTexture(g.TEXTURE0),g.bindTexture(this._textureTarget,this._texture),l(n)?(a?g.pixelStorei(g.UNPACK_COLORSPACE_CONVERSION_WEBGL,g.NONE):g.pixelStorei(g.UNPACK_COLORSPACE_CONVERSION_WEBGL,g.BROWSER_DEFAULT_WEBGL),l(n.arrayBufferView)?Xe.isCompressedFormat(d)?N2e(this,n):_ce(this,n):l(n.framebuffer)?k2e(this,n):Ace(this,n),this._initialized=!0):yce(this),g.bindTexture(this._textureTarget,null)}function N2e(e,t){let i=e._context._gl,o=e._textureTarget,r=e._internalFormat,{width:a,height:s}=e;if(i.pixelStorei(i.UNPACK_ALIGNMENT,4),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!1),i.compressedTexImage2D(o,0,r,a,s,0,t.arrayBufferView),l(t.mipLevels)){let c=a,u=s;for(let f=0;f<t.mipLevels.length;++f)c=I8(c),u=I8(u),i.compressedTexImage2D(o,f+1,r,c,u,0,t.mipLevels[f])}}function _ce(e,t){let n=e._context,i=n._gl,o=e._textureTarget,r=e._internalFormat,{width:a,height:s,pixelFormat:c,pixelDatatype:u,flipY:f}=e,d=Xe.alignmentInBytes(c,u,a);i.pixelStorei(i.UNPACK_ALIGNMENT,d),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!1);let{arrayBufferView:p}=t;if(f&&(p=Xe.flipY(p,c,u,a,s)),i.texImage2D(o,0,r,a,s,0,c,je.toWebGLConstant(u,n),p),l(t.mipLevels)){let g=a,m=s;for(let A=0;A<t.mipLevels.length;++A)g=I8(g),m=I8(m),i.texImage2D(o,A+1,r,g,m,0,c,je.toWebGLConstant(u,n),t.mipLevels[A])}}function F2e(e,t,n,i,o,r){let a=e._context,s=a._gl,{pixelFormat:c,pixelDatatype:u}=e,f=Xe.alignmentInBytes(c,u,o);s.pixelStorei(s.UNPACK_ALIGNMENT,f),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,!1),e.flipY&&(t=Xe.flipY(t,c,u,o,r)),s.texSubImage2D(e._textureTarget,0,n,i,o,r,c,je.toWebGLConstant(u,a),t)}function k2e(e,t){let n=e._context,i=n._gl;i.pixelStorei(i.UNPACK_ALIGNMENT,4),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!1),t.framebuffer!==n.defaultFramebuffer&&t.framebuffer._bind(),i.copyTexImage2D(e._textureTarget,0,e._internalFormat,t.xOffset,t.yOffset,e.width,e.height,0),t.framebuffer!==n.defaultFramebuffer&&t.framebuffer._unBind()}function Ace(e,t){let n=e._context,i=n._gl;i.pixelStorei(i.UNPACK_ALIGNMENT,4),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.preMultiplyAlpha),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,e.flipY),i.texImage2D(e._textureTarget,0,e._internalFormat,e.pixelFormat,je.toWebGLConstant(e.pixelDatatype,n),t)}function z2e(e,t,n,i){let o=e._context,r=o._gl;r.pixelStorei(r.UNPACK_ALIGNMENT,4),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.preMultiplyAlpha),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,e.flipY),r.texSubImage2D(e._textureTarget,0,n,i,e.pixelFormat,je.toWebGLConstant(e.pixelDatatype,o),t)}function I8(e){let t=Math.floor(e/2)|0;return Math.max(t,1)}function yce(e){let t=e._context;t._gl.texImage2D(e._textureTarget,0,e._internalFormat,e._width,e._height,0,e._pixelFormat,je.toWebGLConstant(e._pixelDatatype,t),null)}Bh.create=function(e){return new Bh(e)};Bh.fromFramebuffer=function(e){e=e??G.EMPTY_OBJECT;let t=e.context,{pixelFormat:n=Xe.RGB,framebufferXOffset:i=0,framebufferYOffset:o=0,width:r=t.drawingBufferWidth,height:a=t.drawingBufferHeight,framebuffer:s}=e;return new Bh({context:t,width:r,height:a,pixelFormat:n,source:{framebuffer:l(s)?s:t.defaultFramebuffer,xOffset:i,yOffset:o,width:r,height:a}})};Object.defineProperties(Bh.prototype,{id:{get:function(){return this._id}},sampler:{get:function(){return this._sampler},set:function(e){xce(this,e),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},dimensions:{get:function(){return this._dimensions}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(this._sizeInBytes*4/3):this._sizeInBytes}},_target:{get:function(){return this._textureTarget}}});function xce(e,t){let{minificationFilter:n,magnificationFilter:i}=t,o=[Vt.NEAREST_MIPMAP_NEAREST,Vt.NEAREST_MIPMAP_LINEAR,Vt.LINEAR_MIPMAP_NEAREST,Vt.LINEAR_MIPMAP_LINEAR].includes(n),r=e._context,a=e._pixelFormat,s=e._pixelDatatype;(s===je.FLOAT&&!r.textureFloatLinear||s===je.HALF_FLOAT&&!r.textureHalfFloatLinear)&&(n=o?Vt.NEAREST_MIPMAP_NEAREST:Vt.NEAREST,i=ti.NEAREST),r.webgl2&&Xe.isDepthFormat(a)&&(n=Vt.NEAREST,i=ti.NEAREST);let c=r._gl,u=e._textureTarget;c.activeTexture(c.TEXTURE0),c.bindTexture(u,e._texture),c.texParameteri(u,c.TEXTURE_MIN_FILTER,n),c.texParameteri(u,c.TEXTURE_MAG_FILTER,i),c.texParameteri(u,c.TEXTURE_WRAP_S,t.wrapS),c.texParameteri(u,c.TEXTURE_WRAP_T,t.wrapT),l(e._textureFilterAnisotropic)&&c.texParameteri(u,e._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,t.maximumAnisotropy),c.bindTexture(u,null)}Bh.prototype.copyFrom=function(e){let{xOffset:t=0,yOffset:n=0,source:i,skipColorSpaceConversion:o=!1}=e,a=this._context._gl,s=this._textureTarget;a.activeTexture(a.TEXTURE0),a.bindTexture(s,this._texture);let{width:c,height:u}=i;l(i.videoWidth)&&l(i.videoHeight)?(c=i.videoWidth,u=i.videoHeight):l(i.naturalWidth)&&l(i.naturalHeight)&&(c=i.naturalWidth,u=i.naturalHeight),o?a.pixelStorei(a.UNPACK_COLORSPACE_CONVERSION_WEBGL,a.NONE):a.pixelStorei(a.UNPACK_COLORSPACE_CONVERSION_WEBGL,a.BROWSER_DEFAULT_WEBGL);let f=!1;this._initialized||(t===0&&n===0&&c===this._width&&u===this._height?(l(i.arrayBufferView)?_ce(this,i):Ace(this,i),f=!0):(a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,!1),yce(this)),this._initialized=!0),f||(l(i.arrayBufferView)?F2e(this,i.arrayBufferView,t,n,c,u):z2e(this,i,t,n)),a.bindTexture(s,null)};Bh.prototype.copyFromFramebuffer=function(e,t,n,i,o,r){e=e??0,t=t??0,n=n??0,i=i??0,o=o??this._width,r=r??this._height;let a=this._context._gl,s=this._textureTarget;a.activeTexture(a.TEXTURE0),a.bindTexture(s,this._texture),a.copyTexSubImage2D(s,0,e,t,n,i,o,r),a.bindTexture(s,null),this._initialized=!0};Bh.prototype.generateMipmap=function(e){e=e??_d.DONT_CARE,this._hasMipmap=!0;let t=this._context._gl,n=this._textureTarget;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(n,this._texture),t.generateMipmap(n),t.bindTexture(n,null)};Bh.prototype.isDestroyed=function(){return!1};Bh.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),fe(this)};var It=Bh;function Dx(){this._textures={},this._numberOfTextures=0,this._texturesToRelease={}}Object.defineProperties(Dx.prototype,{numberOfTextures:{get:function(){return this._numberOfTextures}}});Dx.prototype.getTexture=function(e){let t=this._textures[e];if(l(t))return delete this._texturesToRelease[e],++t.count,t.texture};Dx.prototype.addTexture=function(e,t){let n={texture:t,count:1};t.finalDestroy=t.destroy;let i=this;t.destroy=function(){--n.count===0&&(i._texturesToRelease[e]=n)},this._textures[e]=n,++this._numberOfTextures};Dx.prototype.destroyReleasedTextures=function(){let e=this._texturesToRelease;for(let t in e)if(e.hasOwnProperty(t)){let n=e[t];delete this._textures[t],n.texture.finalDestroy(),--this._numberOfTextures}this._texturesToRelease={}};Dx.prototype.isDestroyed=function(){return!1};Dx.prototype.destroy=function(){let e=this._textures;for(let t in e)e.hasOwnProperty(t)&&e[t].texture.finalDestroy();return fe(this)};var hR=Dx;function Ad(e){this.planes=e??[]}var mR=[new h,new h,new h];h.clone(h.UNIT_X,mR[0]);h.clone(h.UNIT_Y,mR[1]);h.clone(h.UNIT_Z,mR[2]);var tA=new h,U2e=new h,bce=new en(new h(1,0,0),0);Ad.fromBoundingSphere=function(e,t){l(t)||(t=new Ad);let n=mR.length,i=t.planes;i.length=2*n;let o=e.center,r=e.radius,a=0;for(let s=0;s<n;++s){let c=mR[s],u=i[a],f=i[a+1];l(u)||(u=i[a]=new se),l(f)||(f=i[a+1]=new se),h.multiplyByScalar(c,-r,tA),h.add(o,tA,tA),u.x=c.x,u.y=c.y,u.z=c.z,u.w=-h.dot(c,tA),h.multiplyByScalar(c,r,tA),h.add(o,tA,tA),f.x=-c.x,f.y=-c.y,f.z=-c.z,f.w=-h.dot(h.negate(c,U2e),tA),a+=2}return t};Ad.prototype.computeVisibility=function(e){let t=this.planes,n=!1;for(let i=0,o=t.length;i<o;++i){let r=e.intersectPlane(en.fromCartesian4(t[i],bce));if(r===qt.OUTSIDE)return qt.OUTSIDE;r===qt.INTERSECTING&&(n=!0)}return n?qt.INTERSECTING:qt.INSIDE};Ad.prototype.computeVisibilityWithPlaneMask=function(e,t){if(t===Ad.MASK_OUTSIDE||t===Ad.MASK_INSIDE)return t;let n=Ad.MASK_INSIDE,i=this.planes;for(let o=0,r=i.length;o<r;++o){let a=o<31?1<<o:0;if(o<31&&(t&a)===0)continue;let s=e.intersectPlane(en.fromCartesian4(i[o],bce));if(s===qt.OUTSIDE)return Ad.MASK_OUTSIDE;s===qt.INTERSECTING&&(n|=a)}return n};Ad.MASK_OUTSIDE=4294967295;Ad.MASK_INSIDE=0;Ad.MASK_INDETERMINATE=2147483647;var Ka=Ad;function fp(e){e=e??G.EMPTY_OBJECT,this.left=e.left,this._left=void 0,this.right=e.right,this._right=void 0,this.top=e.top,this._top=void 0,this.bottom=e.bottom,this._bottom=void 0,this.near=e.near??1,this._near=this.near,this.far=e.far??5e8,this._far=this.far,this._cullingVolume=new Ka,this._orthographicMatrix=new M}function Cce(e){(e.top!==e._top||e.bottom!==e._bottom||e.left!==e._left||e.right!==e._right||e.near!==e._near||e.far!==e._far)&&(e._left=e.left,e._right=e.right,e._top=e.top,e._bottom=e.bottom,e._near=e.near,e._far=e.far,e._orthographicMatrix=M.computeOrthographicOffCenter(e.left,e.right,e.bottom,e.top,e.near,e.far,e._orthographicMatrix))}Object.defineProperties(fp.prototype,{projectionMatrix:{get:function(){return Cce(this),this._orthographicMatrix}}});var V2e=new h,j2e=new h,G2e=new h,iq=new h;fp.prototype.computeCullingVolume=function(e,t,n){let i=this._cullingVolume.planes,o=this.top,r=this.bottom,a=this.right,s=this.left,c=this.near,u=this.far,f=h.cross(t,n,V2e);h.normalize(f,f);let d=j2e;h.multiplyByScalar(t,c,d),h.add(e,d,d);let p=G2e;h.multiplyByScalar(f,s,p),h.add(d,p,p);let g=i[0];return l(g)||(g=i[0]=new se),g.x=f.x,g.y=f.y,g.z=f.z,g.w=-h.dot(f,p),h.multiplyByScalar(f,a,p),h.add(d,p,p),g=i[1],l(g)||(g=i[1]=new se),g.x=-f.x,g.y=-f.y,g.z=-f.z,g.w=-h.dot(h.negate(f,iq),p),h.multiplyByScalar(n,r,p),h.add(d,p,p),g=i[2],l(g)||(g=i[2]=new se),g.x=n.x,g.y=n.y,g.z=n.z,g.w=-h.dot(n,p),h.multiplyByScalar(n,o,p),h.add(d,p,p),g=i[3],l(g)||(g=i[3]=new se),g.x=-n.x,g.y=-n.y,g.z=-n.z,g.w=-h.dot(h.negate(n,iq),p),g=i[4],l(g)||(g=i[4]=new se),g.x=t.x,g.y=t.y,g.z=t.z,g.w=-h.dot(t,d),h.multiplyByScalar(t,u,p),h.add(e,p,p),g=i[5],l(g)||(g=i[5]=new se),g.x=-t.x,g.y=-t.y,g.z=-t.z,g.w=-h.dot(h.negate(t,iq),p),this._cullingVolume};fp.prototype.getPixelDimensions=function(e,t,n,i,o){Cce(this);let r=this.right-this.left,a=this.top-this.bottom,s=i*r/e,c=i*a/t;return o.x=s,o.y=c,o};fp.prototype.clone=function(e){return l(e)||(e=new fp),e.left=this.left,e.right=this.right,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e};fp.prototype.equals=function(e){return l(e)&&e instanceof fp&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far};fp.prototype.equalsEpsilon=function(e,t,n){return e===this||l(e)&&e instanceof fp&&D.equalsEpsilon(this.right,e.right,t,n)&&D.equalsEpsilon(this.left,e.left,t,n)&&D.equalsEpsilon(this.top,e.top,t,n)&&D.equalsEpsilon(this.bottom,e.bottom,t,n)&&D.equalsEpsilon(this.near,e.near,t,n)&&D.equalsEpsilon(this.far,e.far,t,n)};var da=fp;function Tu(e){e=e??G.EMPTY_OBJECT,this._offCenterFrustum=new da,this.width=e.width,this._width=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=e.near??1,this._near=this.near,this.far=e.far??5e8,this._far=this.far}Tu.packedLength=4;Tu.pack=function(e,t,n){return n=n??0,t[n++]=e.width,t[n++]=e.aspectRatio,t[n++]=e.near,t[n]=e.far,t};Tu.unpack=function(e,t,n){return t=t??0,l(n)||(n=new Tu),n.width=e[t++],n.aspectRatio=e[t++],n.near=e[t++],n.far=e[t],n};function nA(e){let t=e._offCenterFrustum;if(e.width!==e._width||e.aspectRatio!==e._aspectRatio||e.near!==e._near||e.far!==e._far){e._aspectRatio=e.aspectRatio,e._width=e.width,e._near=e.near,e._far=e.far;let n=1/e.aspectRatio;t.right=e.width*.5,t.left=-t.right,t.top=n*t.right,t.bottom=-t.top,t.near=e.near,t.far=e.far}}Object.defineProperties(Tu.prototype,{projectionMatrix:{get:function(){return nA(this),this._offCenterFrustum.projectionMatrix}},offCenterFrustum:{get:function(){return nA(this),this._offCenterFrustum}}});Tu.prototype.computeCullingVolume=function(e,t,n){return nA(this),this._offCenterFrustum.computeCullingVolume(e,t,n)};Tu.prototype.getPixelDimensions=function(e,t,n,i,o){return nA(this),this._offCenterFrustum.getPixelDimensions(e,t,n,i,o)};Tu.prototype.clone=function(e){return l(e)||(e=new Tu),e.aspectRatio=this.aspectRatio,e.width=this.width,e.near=this.near,e.far=this.far,e._aspectRatio=void 0,e._width=void 0,e._near=void 0,e._far=void 0,this._offCenterFrustum.clone(e._offCenterFrustum),e};Tu.prototype.equals=function(e){return!l(e)||!(e instanceof Tu)?!1:(nA(this),nA(e),this.width===e.width&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))};Tu.prototype.equalsEpsilon=function(e,t,n){return!l(e)||!(e instanceof Tu)?!1:(nA(this),nA(e),D.equalsEpsilon(this.width,e.width,t,n)&&D.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,n)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,n))};var fn=Tu;var oq={};function H2e(e){let t=6.239996+.0172019696544*e;return .001657*Math.sin(t+.01671*Math.sin(t))}var W2e=32.184,q2e=2451545;function Vce(e,t){t=Q.addSeconds(e,W2e,t);let n=Q.totalDays(t)-q2e;return t=Q.addSeconds(t,H2e(n),t),t}var D8=new Q(2451545,0,ei.TAI),Y2e=1e3,yd=D.RADIANS_PER_DEGREE,hf=D.RADIANS_PER_ARCSECOND,vc=14959787e4,Tce=new $;function jce(e,t,n,i,o,r,a){n<0&&(n=-n,o+=D.PI);let s=e*(1-t),c=i-o,u=o,f=K2e(r-i,t),d=X2e(t,0);eke(c,n,u,Tce);let p=s*(1+t),g=Math.cos(f),m=Math.sin(f),A=1+t*g,y=p/A;return l(a)?(a.x=y*g,a.y=y*m,a.z=0):a=new h(y*g,y*m,0),$.multiplyByVector(Tce,a,a)}function X2e(e,t){return e<=t?"Circular":e<1-t?"Elliptical":e<=1+t?"Parabolic":"Hyperbolic"}function K2e(e,t){let n=J2e(e,t);return Z2e(n,t)}var Q2e=50,$2e=D.EPSILON8;function J2e(e,t){let n=Math.floor(e/D.TWO_PI);e-=n*D.TWO_PI;let i=e+t*Math.sin(e)/(1-Math.sin(e+t)+Math.sin(e)),o=Number.MAX_VALUE,r;for(r=0;r<Q2e&&Math.abs(o-i)>$2e;++r){o=i;let a=o-t*Math.sin(o)-e,s=1-t*Math.cos(o);i=o-a/s}return o=i+n*D.TWO_PI,o}function Z2e(e,t){let n=Math.floor(e/D.TWO_PI);e-=n*D.TWO_PI;let i=Math.cos(e)-t,o=Math.sin(e)*Math.sqrt(1-t*t),r=Math.atan2(o,i);return r=D.zeroToTwoPi(r),e<0&&(r-=D.TWO_PI),r+=n*D.TWO_PI,r}function eke(e,t,n,i){let o=Math.cos(e),r=Math.sin(e),a=Math.cos(t),s=Math.sin(t),c=Math.cos(n),u=Math.sin(n);return l(i)?(i[0]=c*o-u*r*a,i[1]=u*o+c*r*a,i[2]=r*s,i[3]=-c*r-u*o*a,i[4]=-u*r+c*o*a,i[5]=o*s,i[6]=u*s,i[7]=-c*s,i[8]=a):i=new $(c*o-u*r*a,-c*r-u*o*a,u*s,u*o+c*r*a,-u*r+c*o*a,-c*s,r*s,o*s,a),i}var tke=1.0000010178*vc,nke=100.46645683*yd,ike=129597742283429e-5*hf,Ece=16002,vce=21863,Sce=32004,wce=10931,Ice=14529,Dce=16368,Pce=15318,Rce=32794,oke=64*1e-7*vc,rke=-152*1e-7*vc,ake=62*1e-7*vc,ske=-8*1e-7*vc,cke=32*1e-7*vc,lke=-41*1e-7*vc,uke=19*1e-7*vc,fke=-11*1e-7*vc,dke=-150*1e-7*vc,hke=-46*1e-7*vc,mke=68*1e-7*vc,pke=54*1e-7*vc,gke=14*1e-7*vc,_ke=24*1e-7*vc,Ake=-28*1e-7*vc,yke=22*1e-7*vc,Oce=10,Mce=16002,Bce=21863,Lce=10931,Nce=1473,Fce=32004,kce=4387,zce=73,xke=-325*1e-7,bke=-322*1e-7,Cke=-79*1e-7,Tke=232*1e-7,Eke=-52*1e-7,vke=97*1e-7,Ske=55*1e-7,wke=-41*1e-7,Ike=-105*1e-7,Dke=-137*1e-7,Pke=258*1e-7,Rke=35*1e-7,Oke=-116*1e-7,Mke=-88*1e-7,Bke=-112*1e-7,Lke=-80*1e-7,IE=new Q(0,0,ei.TAI);function Nke(e,t){Vce(e,IE);let i=(IE.dayNumber-D8.dayNumber+(IE.secondsOfDay-D8.secondsOfDay)/ii.SECONDS_PER_DAY)/(ii.DAYS_PER_JULIAN_CENTURY*10),o=.3595362*i,r=tke+oke*Math.cos(Ece*o)+dke*Math.sin(Ece*o)+rke*Math.cos(vce*o)+hke*Math.sin(vce*o)+ake*Math.cos(Sce*o)+mke*Math.sin(Sce*o)+ske*Math.cos(wce*o)+pke*Math.sin(wce*o)+cke*Math.cos(Ice*o)+gke*Math.sin(Ice*o)+lke*Math.cos(Dce*o)+_ke*Math.sin(Dce*o)+uke*Math.cos(Pce*o)+Ake*Math.sin(Pce*o)+fke*Math.cos(Rce*o)+yke*Math.sin(Rce*o),a=nke+ike*i+xke*Math.cos(Oce*o)+Ike*Math.sin(Oce*o)+bke*Math.cos(Mce*o)+Dke*Math.sin(Mce*o)+Cke*Math.cos(Bce*o)+Pke*Math.sin(Bce*o)+Tke*Math.cos(Lce*o)+Rke*Math.sin(Lce*o)+Eke*Math.cos(Nce*o)+Oke*Math.sin(Nce*o)+vke*Math.cos(Fce*o)+Mke*Math.sin(Fce*o)+Ske*Math.cos(kce*o)+Bke*Math.sin(kce*o)+wke*Math.cos(zce*o)+Lke*Math.sin(zce*o),s=.0167086342-.0004203654*i,c=102.93734808*yd+11612.3529*hf*i,u=469.97289*hf*i,f=174.87317577*yd-8679.27034*hf*i;return jce(r,s,u,c,f,a,t)}function Gce(e,t){Vce(e,IE);let i=(IE.dayNumber-D8.dayNumber+(IE.secondsOfDay-D8.secondsOfDay)/ii.SECONDS_PER_DAY)/ii.DAYS_PER_JULIAN_CENTURY,o=i*i,r=o*i,a=r*i,s=383397.7725+.004*i,c=.055545526-16e-9*i,u=5.15668983*yd,f=-8e-5*i+.02966*o-42e-6*r-13e-8*a,d=83.35324312*yd,p=146434202669e-4*i-38.2702*o-.045047*r+21301e-8*a,g=125.04455501*yd,m=-69679193631e-4*i+6.3602*o+.007625*r-3586e-8*a,A=218.31664563*yd,y=17325593434847e-4*i-6.391*o+.006588*r-3169e-8*a,x=297.85019547*yd+hf*(1602961601209e-3*i-6.3706*o+.006593*r-3169e-8*a),b=93.27209062*yd+hf*(17395272628478e-4*i-12.7512*o-.001037*r+417e-8*a),C=134.96340251*yd+hf*(17179159232178e-4*i+31.8792*o+.051635*r-2447e-7*a),E=357.52910918*yd+hf*(1295965810481e-4*i-.5532*o+136e-6*r-1149e-8*a),S=310.17137918*yd-hf*(6967051436e-3*i+6.2068*o+.007618*r-3219e-8*a),w=2*x,P=4*x,R=6*x,B=2*C,L=3*C,_=4*C,T=2*b;s+=3400.4*Math.cos(w)-635.6*Math.cos(w-C)-235.6*Math.cos(C)+218.1*Math.cos(w-E)+181*Math.cos(w+C),c+=.014216*Math.cos(w-C)+.008551*Math.cos(w-B)-.001383*Math.cos(C)+.001356*Math.cos(w+C)-.001147*Math.cos(P-L)-914e-6*Math.cos(P-B)+869e-6*Math.cos(w-E-C)-627e-6*Math.cos(w)-394e-6*Math.cos(P-_)+282e-6*Math.cos(w-E-B)-279e-6*Math.cos(x-C)-236e-6*Math.cos(B)+231e-6*Math.cos(P)+229e-6*Math.cos(R-_)-201e-6*Math.cos(B-T),f+=486.26*Math.cos(w-T)-40.13*Math.cos(w)+37.51*Math.cos(T)+25.73*Math.cos(B-T)+19.97*Math.cos(w-E-T),p+=-55609*Math.sin(w-C)-34711*Math.sin(w-B)-9792*Math.sin(C)+9385*Math.sin(P-L)+7505*Math.sin(P-B)+5318*Math.sin(w+C)+3484*Math.sin(P-_)-3417*Math.sin(w-E-C)-2530*Math.sin(R-_)-2376*Math.sin(w)-2075*Math.sin(w-L)-1883*Math.sin(B)-1736*Math.sin(R-5*C)+1626*Math.sin(E)-1370*Math.sin(R-L),m+=-5392*Math.sin(w-T)-540*Math.sin(E)-441*Math.sin(w)+423*Math.sin(T)-288*Math.sin(B-T),y+=-3332.9*Math.sin(w)+1197.4*Math.sin(w-C)-662.5*Math.sin(E)+396.3*Math.sin(C)-218*Math.sin(w-E);let v=2*S,I=3*S;f+=46.997*Math.cos(S)*i-.614*Math.cos(w-T+S)*i+.614*Math.cos(w-T-S)*i-.0297*Math.cos(v)*o-.0335*Math.cos(S)*o+.0012*Math.cos(w-T+v)*o-16e-5*Math.cos(S)*r+4e-5*Math.cos(I)*r+4e-5*Math.cos(v)*r;let O=2.116*Math.sin(S)*i-.111*Math.sin(w-T-S)*i-.0015*Math.sin(S)*o;p+=O,y+=O,m+=-520.77*Math.sin(S)*i+13.66*Math.sin(w-T+S)*i+1.12*Math.sin(w-S)*i-1.06*Math.sin(T-S)*i+.66*Math.sin(v)*o+.371*Math.sin(S)*o-.035*Math.sin(w-T+v)*o-.015*Math.sin(w-T+S)*o+.0014*Math.sin(S)*r-.0011*Math.sin(I)*r-9e-4*Math.sin(v)*r,s*=Y2e;let N=u+f*hf,j=d+p*hf,k=A+y*hf,U=g+m*hf;return jce(s,c,N,j,U,k,t)}var Uce=.012300034,Fke=Uce/(Uce+1)*-1;function kke(e,t){return t=Gce(e,t),h.multiplyByScalar(t,Fke,t)}var Hce=new $(1.0000000000000002,5619723173785822e-31,4690511510146299e-34,-5154129427414611e-31,.9174820620691819,-.39777715593191376,-223970096136568e-30,.39777715593191376,.9174820620691819),pR=new h;oq.computeSunPositionInEarthInertialFrame=function(e,t){return l(e)||(e=Q.now()),l(t)||(t=new h),pR=Nke(e,pR),t=h.negate(pR,t),kke(e,pR),h.subtract(t,pR,t),$.multiplyByVector(Hce,t,t),t};oq.computeMoonPositionInEarthInertialFrame=function(e,t){return l(e)||(e=Q.now()),t=Gce(e,t),$.multiplyByVector(Hce,t,t),t};var iA=oq;var gR={MORPHING:0,COLUMBUS_VIEW:1,SCENE2D:2,SCENE3D:3};gR.getMorphTime=function(e){return e===gR.SCENE3D?1:e===gR.MORPHING?void 0:0};Object.freeze(gR);var ie=gR;function zke(e){e=e??G.EMPTY_OBJECT,this.color=V.clone(e.color??V.WHITE),this.intensity=e.intensity??2}var U0=zke;function DE(){this.globeDepthTexture=void 0,this.edgeIdTexture=void 0,this.edgeColorTexture=void 0,this.edgeDepthTexture=void 0,this.gamma=void 0,this._viewport=new Je,this._viewportCartesian4=new se,this._viewportDirty=!1,this._viewportOrthographicMatrix=M.clone(M.IDENTITY),this._viewportTransformation=M.clone(M.IDENTITY),this._model=M.clone(M.IDENTITY),this._view=M.clone(M.IDENTITY),this._inverseView=M.clone(M.IDENTITY),this._projection=M.clone(M.IDENTITY),this._infiniteProjection=M.clone(M.IDENTITY),this._entireFrustum=new z,this._currentFrustum=new z,this._frustumPlanes=new se,this._farDepthFromNearPlusOne=void 0,this._log2FarDepthFromNearPlusOne=void 0,this._oneOverLog2FarDepthFromNearPlusOne=void 0,this._frameState=void 0,this._temeToPseudoFixed=$.clone(M.IDENTITY),this._view3DDirty=!0,this._view3D=new M,this._inverseView3DDirty=!0,this._inverseView3D=new M,this._inverseModelDirty=!0,this._inverseModel=new M,this._inverseTransposeModelDirty=!0,this._inverseTransposeModel=new $,this._viewRotation=new $,this._inverseViewRotation=new $,this._viewRotation3D=new $,this._inverseViewRotation3D=new $,this._inverseProjectionDirty=!0,this._inverseProjection=new M,this._modelViewDirty=!0,this._modelView=new M,this._modelView3DDirty=!0,this._modelView3D=new M,this._modelViewRelativeToEyeDirty=!0,this._modelViewRelativeToEye=new M,this._inverseModelViewDirty=!0,this._inverseModelView=new M,this._inverseModelView3DDirty=!0,this._inverseModelView3D=new M,this._viewProjectionDirty=!0,this._viewProjection=new M,this._inverseViewProjectionDirty=!0,this._inverseViewProjection=new M,this._modelViewProjectionDirty=!0,this._modelViewProjection=new M,this._inverseModelViewProjectionDirty=!0,this._inverseModelViewProjection=new M,this._modelViewProjectionRelativeToEyeDirty=!0,this._modelViewProjectionRelativeToEye=new M,this._modelViewInfiniteProjectionDirty=!0,this._modelViewInfiniteProjection=new M,this._normalDirty=!0,this._normal=new $,this._normal3DDirty=!0,this._normal3D=new $,this._inverseNormalDirty=!0,this._inverseNormal=new $,this._inverseNormal3DDirty=!0,this._inverseNormal3D=new $,this._encodedCameraPositionMCDirty=!0,this._encodedCameraPositionMC=new xn,this._cameraPosition=new h,this._sunPositionWC=new h,this._sunPositionColumbusView=new h,this._sunDirectionWC=new h,this._sunDirectionEC=new h,this._moonDirectionEC=new h,this._lightDirectionWC=new h,this._lightDirectionEC=new h,this._lightColor=new h,this._lightColorHdr=new h,this._pass=void 0,this._mode=void 0,this._mapProjection=void 0,this._ellipsoid=void 0,this._cameraDirection=new h,this._cameraRight=new h,this._cameraUp=new h,this._frustum2DWidth=0,this._eyeHeight=0,this._eyeHeight2D=new z,this._eyeEllipsoidNormalEC=new h,this._eyeEllipsoidCurvature=new z,this._modelToEnu=new M,this._enuToModel=new M,this._pixelRatio=1,this._orthographicIn3D=!1,this._backgroundColor=new V,this._brdfLut=void 0,this._environmentMap=void 0,this._sphericalHarmonicCoefficients=void 0,this._specularEnvironmentMaps=void 0,this._specularEnvironmentMapsMaximumLOD=void 0,this._fogDensity=void 0,this._fogVisualDensityScalar=void 0,this._fogMinimumBrightness=void 0,this._atmosphereHsbShift=void 0,this._atmosphereLightIntensity=void 0,this._atmosphereRayleighCoefficient=new h,this._atmosphereRayleighScaleHeight=new h,this._atmosphereMieCoefficient=new h,this._atmosphereMieScaleHeight=void 0,this._atmosphereMieAnisotropy=void 0,this._atmosphereDynamicLighting=void 0,this._invertClassificationColor=void 0,this._splitPosition=0,this._pixelSizePerMeter=void 0,this._geometricToleranceOverMeter=void 0,this._minimumDisableDepthTestDistance=void 0}Object.defineProperties(DE.prototype,{frameState:{get:function(){return this._frameState}},viewport:{get:function(){return this._viewport},set:function(e){if(!Je.equals(e,this._viewport)){Je.clone(e,this._viewport);let t=this._viewport,n=this._viewportCartesian4;n.x=t.x,n.y=t.y,n.z=t.width,n.w=t.height,this._viewportDirty=!0}}},viewportCartesian4:{get:function(){return this._viewportCartesian4}},viewportOrthographic:{get:function(){return qce(this),this._viewportOrthographicMatrix}},viewportTransformation:{get:function(){return qce(this),this._viewportTransformation}},model:{get:function(){return this._model},set:function(e){M.clone(e,this._model),this._modelView3DDirty=!0,this._inverseModelView3DDirty=!0,this._inverseModelDirty=!0,this._inverseTransposeModelDirty=!0,this._modelViewDirty=!0,this._inverseModelViewDirty=!0,this._modelViewRelativeToEyeDirty=!0,this._inverseModelViewDirty=!0,this._modelViewProjectionDirty=!0,this._inverseModelViewProjectionDirty=!0,this._modelViewProjectionRelativeToEyeDirty=!0,this._modelViewInfiniteProjectionDirty=!0,this._normalDirty=!0,this._inverseNormalDirty=!0,this._normal3DDirty=!0,this._inverseNormal3DDirty=!0,this._encodedCameraPositionMCDirty=!0}},inverseModel:{get:function(){return this._inverseModelDirty&&(this._inverseModelDirty=!1,M.inverse(this._model,this._inverseModel)),this._inverseModel}},inverseTransposeModel:{get:function(){let e=this._inverseTransposeModel;return this._inverseTransposeModelDirty&&(this._inverseTransposeModelDirty=!1,M.getMatrix3(this.inverseModel,e),$.transpose(e,e)),e}},view:{get:function(){return this._view}},view3D:{get:function(){return aq(this),this._view3D}},viewRotation:{get:function(){return aq(this),this._viewRotation}},viewRotation3D:{get:function(){return aq(this),this._viewRotation3D}},inverseView:{get:function(){return this._inverseView}},inverseView3D:{get:function(){return Kce(this),this._inverseView3D}},inverseViewRotation:{get:function(){return this._inverseViewRotation}},inverseViewRotation3D:{get:function(){return Kce(this),this._inverseViewRotation3D}},projection:{get:function(){return this._projection}},inverseProjection:{get:function(){return Qke(this),this._inverseProjection}},infiniteProjection:{get:function(){return this._infiniteProjection}},modelView:{get:function(){return $ke(this),this._modelView}},modelView3D:{get:function(){return Jke(this),this._modelView3D}},modelViewRelativeToEye:{get:function(){return o3e(this),this._modelViewRelativeToEye}},inverseModelView:{get:function(){return Zke(this),this._inverseModelView}},inverseModelView3D:{get:function(){return e3e(this),this._inverseModelView3D}},viewProjection:{get:function(){return t3e(this),this._viewProjection}},inverseViewProjection:{get:function(){return n3e(this),this._inverseViewProjection}},modelViewProjection:{get:function(){return i3e(this),this._modelViewProjection}},inverseModelViewProjection:{get:function(){return r3e(this),this._inverseModelViewProjection}},modelViewProjectionRelativeToEye:{get:function(){return a3e(this),this._modelViewProjectionRelativeToEye}},modelViewInfiniteProjection:{get:function(){return s3e(this),this._modelViewInfiniteProjection}},normal:{get:function(){return c3e(this),this._normal}},normal3D:{get:function(){return l3e(this),this._normal3D}},inverseNormal:{get:function(){return u3e(this),this._inverseNormal}},inverseNormal3D:{get:function(){return f3e(this),this._inverseNormal3D}},entireFrustum:{get:function(){return this._entireFrustum}},currentFrustum:{get:function(){return this._currentFrustum}},frustumPlanes:{get:function(){return this._frustumPlanes}},farDepthFromNearPlusOne:{get:function(){return this._farDepthFromNearPlusOne}},log2FarDepthFromNearPlusOne:{get:function(){return this._log2FarDepthFromNearPlusOne}},oneOverLog2FarDepthFromNearPlusOne:{get:function(){return this._oneOverLog2FarDepthFromNearPlusOne}},eyeHeight:{get:function(){return this._eyeHeight}},eyeHeight2D:{get:function(){return this._eyeHeight2D}},eyeEllipsoidNormalEC:{get:function(){return this._eyeEllipsoidNormalEC}},eyeEllipsoidCurvature:{get:function(){return this._eyeEllipsoidCurvature}},modelToEnu:{get:function(){return this._modelToEnu}},enuToModel:{get:function(){return this._enuToModel}},sunPositionWC:{get:function(){return this._sunPositionWC}},sunPositionColumbusView:{get:function(){return this._sunPositionColumbusView}},sunDirectionWC:{get:function(){return this._sunDirectionWC}},sunDirectionEC:{get:function(){return this._sunDirectionEC}},moonDirectionEC:{get:function(){return this._moonDirectionEC}},lightDirectionWC:{get:function(){return this._lightDirectionWC}},lightDirectionEC:{get:function(){return this._lightDirectionEC}},lightColor:{get:function(){return this._lightColor}},lightColorHdr:{get:function(){return this._lightColorHdr}},encodedCameraPositionMCHigh:{get:function(){return Xce(this),this._encodedCameraPositionMC.high}},encodedCameraPositionMCLow:{get:function(){return Xce(this),this._encodedCameraPositionMC.low}},temeToPseudoFixedMatrix:{get:function(){return this._temeToPseudoFixed}},pixelRatio:{get:function(){return this._pixelRatio}},fogDensity:{get:function(){return this._fogDensity}},fogVisualDensityScalar:{get:function(){return this._fogVisualDensityScalar}},fogMinimumBrightness:{get:function(){return this._fogMinimumBrightness}},atmosphereHsbShift:{get:function(){return this._atmosphereHsbShift}},atmosphereLightIntensity:{get:function(){return this._atmosphereLightIntensity}},atmosphereRayleighCoefficient:{get:function(){return this._atmosphereRayleighCoefficient}},atmosphereRayleighScaleHeight:{get:function(){return this._atmosphereRayleighScaleHeight}},atmosphereMieCoefficient:{get:function(){return this._atmosphereMieCoefficient}},atmosphereMieScaleHeight:{get:function(){return this._atmosphereMieScaleHeight}},atmosphereMieAnisotropy:{get:function(){return this._atmosphereMieAnisotropy}},atmosphereDynamicLighting:{get:function(){return this._atmosphereDynamicLighting}},geometricToleranceOverMeter:{get:function(){return this._geometricToleranceOverMeter}},pass:{get:function(){return this._pass}},backgroundColor:{get:function(){return this._backgroundColor}},brdfLut:{get:function(){return this._brdfLut}},environmentMap:{get:function(){return this._environmentMap}},sphericalHarmonicCoefficients:{get:function(){return this._sphericalHarmonicCoefficients}},specularEnvironmentMaps:{get:function(){return this._specularEnvironmentMaps}},specularEnvironmentMapsMaximumLOD:{get:function(){return this._specularEnvironmentMapsMaximumLOD}},splitPosition:{get:function(){return this._splitPosition}},minimumDisableDepthTestDistance:{get:function(){return this._minimumDisableDepthTestDistance}},invertClassificationColor:{get:function(){return this._invertClassificationColor}},orthographicIn3D:{get:function(){return this._orthographicIn3D}},ellipsoid:{get:function(){return this._ellipsoid??te.default}}});function Uke(e,t){M.clone(t,e._view),M.getMatrix3(t,e._viewRotation),e._view3DDirty=!0,e._inverseView3DDirty=!0,e._modelViewDirty=!0,e._modelView3DDirty=!0,e._modelViewRelativeToEyeDirty=!0,e._inverseModelViewDirty=!0,e._inverseModelView3DDirty=!0,e._viewProjectionDirty=!0,e._inverseViewProjectionDirty=!0,e._modelViewProjectionDirty=!0,e._modelViewProjectionRelativeToEyeDirty=!0,e._modelViewInfiniteProjectionDirty=!0,e._normalDirty=!0,e._inverseNormalDirty=!0,e._normal3DDirty=!0,e._inverseNormal3DDirty=!0}function Vke(e,t){M.clone(t,e._inverseView),M.getMatrix3(t,e._inverseViewRotation)}function jke(e,t){M.clone(t,e._projection),e._inverseProjectionDirty=!0,e._viewProjectionDirty=!0,e._inverseViewProjectionDirty=!0,e._modelViewProjectionDirty=!0,e._modelViewProjectionRelativeToEyeDirty=!0}function Gke(e,t){M.clone(t,e._infiniteProjection),e._modelViewInfiniteProjectionDirty=!0}var Wce=new h,Hke=new M;function Wke(e,t){h.clone(t.positionWC,e._cameraPosition),h.clone(t.directionWC,e._cameraDirection),h.clone(t.rightWC,e._cameraRight),h.clone(t.upWC,e._cameraUp);let n=e._ellipsoid,i,o=t.positionCartographic;if(l(o)?(e._eyeHeight=o.height,e._eyeEllipsoidNormalEC=n.geodeticSurfaceNormalCartographic(o,e._eyeEllipsoidNormalEC),i=h.fromRadians(o.longitude,o.latitude,0,n,Wce)):(e._eyeHeight=-n.maximumRadius,h.magnitude(t.positionWC)>0&&(e._eyeEllipsoidNormalEC=h.normalize(t.positionWC,e._eyeEllipsoidNormalEC)),i=n.scaleToGeodeticSurface(t.positionWC,Wce)),e._encodedCameraPositionMCDirty=!0,!l(i))return;e._eyeEllipsoidNormalEC=$.multiplyByVector(e._viewRotation,e._eyeEllipsoidNormalEC,e._eyeEllipsoidNormalEC);let r=pt.eastNorthUpToFixedFrame(i,n,Hke);e._enuToModel=M.multiplyTransformation(e.inverseModel,r,e._enuToModel),e._modelToEnu=M.inverseTransformation(e._enuToModel,e._modelToEnu),D.equalsEpsilon(n._radii.x,n._radii.y,D.EPSILON15)&&(e._eyeEllipsoidCurvature=n.getLocalCurvature(i,e._eyeEllipsoidCurvature))}var rq=new $,qke=new de;function Yke(e,t){pt.computeIcrfToCentralBodyFixedMatrix(t.time,rq);let n=iA.computeSunPositionInEarthInertialFrame(t.time,e._sunPositionWC);$.multiplyByVector(rq,n,n),h.normalize(n,e._sunDirectionWC),n=$.multiplyByVector(e.viewRotation3D,n,e._sunDirectionEC),h.normalize(n,n),n=iA.computeMoonPositionInEarthInertialFrame(t.time,e._moonDirectionEC),$.multiplyByVector(rq,n,n),$.multiplyByVector(e.viewRotation3D,n,n),h.normalize(n,n);let i=t.mapProjection,r=i.ellipsoid.cartesianToCartographic(e._sunPositionWC,qke);i.project(r,e._sunPositionColumbusView)}DE.prototype.updateCamera=function(e){Uke(this,e.viewMatrix),Vke(this,e.inverseViewMatrix),Wke(this,e),this._entireFrustum.x=e.frustum.near,this._entireFrustum.y=e.frustum.far,this.updateFrustum(e.frustum),this._orthographicIn3D=this._mode!==ie.SCENE2D&&e.frustum instanceof fn};DE.prototype.updateFrustum=function(e){jke(this,e.projectionMatrix),l(e.infiniteProjectionMatrix)&&Gke(this,e.infiniteProjectionMatrix),this._currentFrustum.x=e.near,this._currentFrustum.y=e.far,this._farDepthFromNearPlusOne=e.far-e.near+1,this._log2FarDepthFromNearPlusOne=D.log2(this._farDepthFromNearPlusOne),this._oneOverLog2FarDepthFromNearPlusOne=1/this._log2FarDepthFromNearPlusOne;let t=e.offCenterFrustum;l(t)&&(e=t),this._frustumPlanes.x=e.top,this._frustumPlanes.y=e.bottom,this._frustumPlanes.z=e.left,this._frustumPlanes.w=e.right};DE.prototype.updatePass=function(e){this._pass=e};var Xke=[],Kke=new U0;DE.prototype.update=function(e){this._mode=e.mode,this._mapProjection=e.mapProjection,this._ellipsoid=e.mapProjection.ellipsoid,this._pixelRatio=e.pixelRatio;let t=e.camera;this.updateCamera(t),e.mode===ie.SCENE2D?(this._frustum2DWidth=t.frustum.right-t.frustum.left,this._eyeHeight2D.x=this._frustum2DWidth*.5,this._eyeHeight2D.y=this._eyeHeight2D.x*this._eyeHeight2D.x):(this._frustum2DWidth=0,this._eyeHeight2D.x=0,this._eyeHeight2D.y=0),Yke(this,e);let n=e.light??Kke;n instanceof U0?(this._lightDirectionWC=h.clone(this._sunDirectionWC,this._lightDirectionWC),this._lightDirectionEC=h.clone(this._sunDirectionEC,this._lightDirectionEC)):(this._lightDirectionWC=h.normalize(h.negate(n.direction,this._lightDirectionWC),this._lightDirectionWC),this._lightDirectionEC=$.multiplyByVector(this.viewRotation3D,this._lightDirectionWC,this._lightDirectionEC));let i=n.color,o=h.fromElements(i.red,i.green,i.blue,this._lightColorHdr);o=h.multiplyByScalar(o,n.intensity,o);let r=h.maximumComponent(o);r>1?h.divideByScalar(o,r,this._lightColor):h.clone(o,this._lightColor);let a=e.brdfLutGenerator,s=l(a)?a.colorTexture:void 0;this._brdfLut=s,this._environmentMap=e.environmentMap??e.context.defaultCubeMap,this._sphericalHarmonicCoefficients=e.sphericalHarmonicCoefficients??Xke,this._specularEnvironmentMaps=e.specularEnvironmentMaps,this._specularEnvironmentMapsMaximumLOD=e.specularEnvironmentMapsMaximumLOD,this._fogDensity=e.fog.density,this._fogVisualDensityScalar=e.fog.visualDensityScalar,this._fogMinimumBrightness=e.fog.minimumBrightness;let c=e.atmosphere;l(c)&&(this._atmosphereHsbShift=h.fromElements(c.hueShift,c.saturationShift,c.brightnessShift,this._atmosphereHsbShift),this._atmosphereLightIntensity=c.lightIntensity,this._atmosphereRayleighCoefficient=h.clone(c.rayleighCoefficient,this._atmosphereRayleighCoefficient),this._atmosphereRayleighScaleHeight=c.rayleighScaleHeight,this._atmosphereMieCoefficient=h.clone(c.mieCoefficient,this._atmosphereMieCoefficient),this._atmosphereMieScaleHeight=c.mieScaleHeight,this._atmosphereMieAnisotropy=c.mieAnisotropy,this._atmosphereDynamicLighting=c.dynamicLighting),this._invertClassificationColor=e.invertClassificationColor,this._frameState=e,this._temeToPseudoFixed=pt.computeTemeToPseudoFixedMatrix(e.time,this._temeToPseudoFixed),this._splitPosition=e.splitPosition*e.context.drawingBufferWidth;let u=t.frustum.fov,f=this._viewport,d;l(u)?f.height>f.width?d=Math.tan(.5*u)*2/f.height:d=Math.tan(.5*u)*2/f.width:d=1/Math.max(f.width,f.height),this._geometricToleranceOverMeter=d*e.maximumScreenSpaceError,V.clone(e.backgroundColor,this._backgroundColor),this._minimumDisableDepthTestDistance=e.minimumDisableDepthTestDistance,this._minimumDisableDepthTestDistance*=this._minimumDisableDepthTestDistance,this._minimumDisableDepthTestDistance===Number.POSITIVE_INFINITY&&(this._minimumDisableDepthTestDistance=-1)};function qce(e){if(e._viewportDirty){let t=e._viewport;M.computeOrthographicOffCenter(t.x,t.x+t.width,t.y,t.y+t.height,0,1,e._viewportOrthographicMatrix),M.computeViewportTransformation(t,0,1,e._viewportTransformation),e._viewportDirty=!1}}function Qke(e){e._inverseProjectionDirty&&(e._inverseProjectionDirty=!1,e._mode!==ie.SCENE2D&&e._mode!==ie.MORPHING&&!e._orthographicIn3D?M.inverse(e._projection,e._inverseProjection):M.clone(M.ZERO,e._inverseProjection))}function $ke(e){e._modelViewDirty&&(e._modelViewDirty=!1,M.multiplyTransformation(e._view,e._model,e._modelView))}function Jke(e){e._modelView3DDirty&&(e._modelView3DDirty=!1,M.multiplyTransformation(e.view3D,e._model,e._modelView3D))}function Zke(e){e._inverseModelViewDirty&&(e._inverseModelViewDirty=!1,M.inverse(e.modelView,e._inverseModelView))}function e3e(e){e._inverseModelView3DDirty&&(e._inverseModelView3DDirty=!1,M.inverse(e.modelView3D,e._inverseModelView3D))}function t3e(e){e._viewProjectionDirty&&(e._viewProjectionDirty=!1,M.multiply(e._projection,e._view,e._viewProjection))}function n3e(e){e._inverseViewProjectionDirty&&(e._inverseViewProjectionDirty=!1,M.inverse(e.viewProjection,e._inverseViewProjection))}function i3e(e){e._modelViewProjectionDirty&&(e._modelViewProjectionDirty=!1,M.multiply(e._projection,e.modelView,e._modelViewProjection))}function o3e(e){if(e._modelViewRelativeToEyeDirty){e._modelViewRelativeToEyeDirty=!1;let t=e.modelView,n=e._modelViewRelativeToEye;n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=0,n[13]=0,n[14]=0,n[15]=t[15]}}function r3e(e){e._inverseModelViewProjectionDirty&&(e._inverseModelViewProjectionDirty=!1,M.inverse(e.modelViewProjection,e._inverseModelViewProjection))}function a3e(e){e._modelViewProjectionRelativeToEyeDirty&&(e._modelViewProjectionRelativeToEyeDirty=!1,M.multiply(e._projection,e.modelViewRelativeToEye,e._modelViewProjectionRelativeToEye))}function s3e(e){e._modelViewInfiniteProjectionDirty&&(e._modelViewInfiniteProjectionDirty=!1,M.multiply(e._infiniteProjection,e.modelView,e._modelViewInfiniteProjection))}function c3e(e){if(e._normalDirty){e._normalDirty=!1;let t=e._normal;M.getMatrix3(e.inverseModelView,t),$.transpose(t,t)}}function l3e(e){if(e._normal3DDirty){e._normal3DDirty=!1;let t=e._normal3D;M.getMatrix3(e.inverseModelView3D,t),$.transpose(t,t)}}function u3e(e){if(e._inverseNormalDirty){e._inverseNormalDirty=!1;let t=e._inverseNormal;M.getMatrix3(e.modelView,t),$.transpose(t,t)}}function f3e(e){if(e._inverseNormal3DDirty){e._inverseNormal3DDirty=!1;let t=e._inverseNormal3D;M.getMatrix3(e.modelView3D,t),$.transpose(t,t)}}var Yce=new h;function Xce(e){e._encodedCameraPositionMCDirty&&(e._encodedCameraPositionMCDirty=!1,M.multiplyByPoint(e.inverseModel,e._cameraPosition,Yce),xn.fromCartesian(Yce,e._encodedCameraPositionMC))}var d3e=new h,h3e=new h,m3e=new h,p3e=new h,g3e=new de,_3e=new h,A3e=new M;function y3e(e,t,n,i,o,r,a,s){let c=d3e;c.x=e.y,c.y=e.z,c.z=e.x;let u=h3e;u.x=n.y,u.y=n.z,u.z=n.x;let f=m3e;f.x=i.y,f.y=i.z,f.z=i.x;let d=p3e;d.x=t.y,d.y=t.z,d.z=t.x,r===ie.SCENE2D&&(c.z=o*.5);let p=a.unproject(c,g3e);p.longitude=D.clamp(p.longitude,-Math.PI,Math.PI),p.latitude=D.clamp(p.latitude,-D.PI_OVER_TWO,D.PI_OVER_TWO);let g=a.ellipsoid,m=g.cartographicToCartesian(p,_3e),A=pt.eastNorthUpToFixedFrame(m,g,A3e);return M.multiplyByPointAsVector(A,u,u),M.multiplyByPointAsVector(A,f,f),M.multiplyByPointAsVector(A,d,d),l(s)||(s=new M),s[0]=u.x,s[1]=f.x,s[2]=-d.x,s[3]=0,s[4]=u.y,s[5]=f.y,s[6]=-d.y,s[7]=0,s[8]=u.z,s[9]=f.z,s[10]=-d.z,s[11]=0,s[12]=-h.dot(u,m),s[13]=-h.dot(f,m),s[14]=h.dot(d,m),s[15]=1,s}function aq(e){e._view3DDirty&&(e._mode===ie.SCENE3D?M.clone(e._view,e._view3D):y3e(e._cameraPosition,e._cameraDirection,e._cameraRight,e._cameraUp,e._frustum2DWidth,e._mode,e._mapProjection,e._view3D),M.getMatrix3(e._view3D,e._viewRotation3D),e._view3DDirty=!1)}function Kce(e){e._inverseView3DDirty&&(M.inverseTransformation(e.view3D,e._inverseView3D),M.getMatrix3(e._inverseView3D,e._inverseViewRotation3D),e._inverseView3DDirty=!1)}var _R=DE;function Eu(e,t){let{getWebGLStub:n,requestWebgl1:i,webgl:o={},allowTextureFilterAnisotropic:r=!0}=t??{};o.alpha=o.alpha??!1,o.stencil=o.stencil??!0,o.powerPreference=o.powerPreference??"high-performance";let a=l(n)?n(e,o):x3e(e,o,i),c=typeof WebGL2RenderingContext<"u"&&a instanceof WebGL2RenderingContext;this._canvas=e,this._originalGLContext=a,this._gl=a,this._webgl2=c,this._id=jn(),this.validateFramebuffer=!1,this.validateShaderProgram=!1,this.logShaderCompilation=!1,this._throwOnWebGLError=!1,this._shaderCache=new dR(this),this._textureCache=new hR;let u=a;this._stencilBits=u.getParameter(u.STENCIL_BITS),Rt._maximumCombinedTextureImageUnits=u.getParameter(u.MAX_COMBINED_TEXTURE_IMAGE_UNITS),Rt._maximumCubeMapSize=u.getParameter(u.MAX_CUBE_MAP_TEXTURE_SIZE),Rt._maximumFragmentUniformVectors=u.getParameter(u.MAX_FRAGMENT_UNIFORM_VECTORS),Rt._maximumTextureImageUnits=u.getParameter(u.MAX_TEXTURE_IMAGE_UNITS),Rt._maximumRenderbufferSize=u.getParameter(u.MAX_RENDERBUFFER_SIZE),Rt._maximumTextureSize=u.getParameter(u.MAX_TEXTURE_SIZE),Rt._maximum3DTextureSize=u.getParameter(u.MAX_3D_TEXTURE_SIZE),Rt._maximumVaryingVectors=u.getParameter(u.MAX_VARYING_VECTORS),Rt._maximumVertexAttributes=u.getParameter(u.MAX_VERTEX_ATTRIBS),Rt._maximumVertexTextureImageUnits=u.getParameter(u.MAX_VERTEX_TEXTURE_IMAGE_UNITS),Rt._maximumVertexUniformVectors=u.getParameter(u.MAX_VERTEX_UNIFORM_VECTORS),Rt._maximumSamples=this._webgl2?u.getParameter(u.MAX_SAMPLES):0;let f=u.getParameter(u.ALIASED_LINE_WIDTH_RANGE);Rt._minimumAliasedLineWidth=f[0],Rt._maximumAliasedLineWidth=f[1];let d=u.getParameter(u.ALIASED_POINT_SIZE_RANGE);Rt._minimumAliasedPointSize=d[0],Rt._maximumAliasedPointSize=d[1];let p=u.getParameter(u.MAX_VIEWPORT_DIMS);Rt._maximumViewportWidth=p[0],Rt._maximumViewportHeight=p[1];let g=u.getShaderPrecisionFormat(u.FRAGMENT_SHADER,u.HIGH_FLOAT);Rt._highpFloatSupported=g.precision!==0;let m=u.getShaderPrecisionFormat(u.FRAGMENT_SHADER,u.HIGH_INT);Rt._highpIntSupported=m.rangeMax!==0,this._antialias=u.getContextAttributes().antialias,this._standardDerivatives=!!Jr(u,["OES_standard_derivatives"]),this._blendMinmax=!!Jr(u,["EXT_blend_minmax"]),this._elementIndexUint=!!Jr(u,["OES_element_index_uint"]),this._depthTexture=!!Jr(u,["WEBGL_depth_texture","WEBKIT_WEBGL_depth_texture"]),this._fragDepth=!!Jr(u,["EXT_frag_depth"]),this._debugShaders=Jr(u,["WEBGL_debug_shaders"]),this._textureFloat=!!Jr(u,["OES_texture_float"]),this._textureHalfFloat=!!Jr(u,["OES_texture_half_float"]),this._textureFloatLinear=!!Jr(u,["OES_texture_float_linear"]),this._textureHalfFloatLinear=!!Jr(u,["OES_texture_half_float_linear"]),this._supportsTextureLod=!!Jr(u,["EXT_shader_texture_lod"]),this._colorBufferFloat=!!Jr(u,["EXT_color_buffer_float","WEBGL_color_buffer_float"]),this._floatBlend=!!Jr(u,["EXT_float_blend"]),this._colorBufferHalfFloat=!!Jr(u,["EXT_color_buffer_half_float"]),this._s3tc=!!Jr(u,["WEBGL_compressed_texture_s3tc","MOZ_WEBGL_compressed_texture_s3tc","WEBKIT_WEBGL_compressed_texture_s3tc"]),this._pvrtc=!!Jr(u,["WEBGL_compressed_texture_pvrtc","WEBKIT_WEBGL_compressed_texture_pvrtc"]),this._astc=!!Jr(u,["WEBGL_compressed_texture_astc"]),this._etc=!!Jr(u,["WEBG_compressed_texture_etc"]),this._etc1=!!Jr(u,["WEBGL_compressed_texture_etc1"]),this._bc7=!!Jr(u,["EXT_texture_compression_bptc"]),Cu.setKTX2SupportedFormats(this._s3tc,this._pvrtc,this._astc,this._etc,this._etc1,this._bc7);let A=r?Jr(u,["EXT_texture_filter_anisotropic","WEBKIT_EXT_texture_filter_anisotropic"]):void 0;this._textureFilterAnisotropic=A,Rt._maximumTextureFilterAnisotropy=l(A)?u.getParameter(A.MAX_TEXTURE_MAX_ANISOTROPY_EXT):1;let y,x,b,C,E,S,w,P,R,B;if(c){let v=this;y=function(){return v._gl.createVertexArray()},x=function(I){v._gl.bindVertexArray(I)},b=function(I){v._gl.deleteVertexArray(I)},C=function(I,O,N,j,k){u.drawElementsInstanced(I,O,N,j,k)},E=function(I,O,N,j){u.drawArraysInstanced(I,O,N,j)},S=function(I,O){u.vertexAttribDivisor(I,O)},w=function(I){u.drawBuffers(I)}}else P=Jr(u,["OES_vertex_array_object"]),l(P)&&(y=function(){return P.createVertexArrayOES()},x=function(v){P.bindVertexArrayOES(v)},b=function(v){P.deleteVertexArrayOES(v)}),R=Jr(u,["ANGLE_instanced_arrays"]),l(R)&&(C=function(v,I,O,N,j){R.drawElementsInstancedANGLE(v,I,O,N,j)},E=function(v,I,O,N){R.drawArraysInstancedANGLE(v,I,O,N)},S=function(v,I){R.vertexAttribDivisorANGLE(v,I)}),B=Jr(u,["WEBGL_draw_buffers"]),l(B)&&(w=function(v){B.drawBuffersWEBGL(v)});this.glCreateVertexArray=y,this.glBindVertexArray=x,this.glDeleteVertexArray=b,this.glDrawElementsInstanced=C,this.glDrawArraysInstanced=E,this.glVertexAttribDivisor=S,this.glDrawBuffers=w,this._vertexArrayObject=!!P,this._instancedArrays=!!R,this._drawBuffers=!!B,Rt._maximumDrawBuffers=this.drawBuffers?u.getParameter(ee.MAX_DRAW_BUFFERS):1,Rt._maximumColorAttachments=this.drawBuffers?u.getParameter(ee.MAX_COLOR_ATTACHMENTS):1,this._clearColor=new V(0,0,0,0),this._clearDepth=1,this._clearStencil=0;let L=new _R,_=new $c(this),T=Ve.fromCache();this._defaultPassState=_,this._defaultRenderState=T,this._defaultTexture=void 0,this._defaultEmissiveTexture=void 0,this._defaultNormalTexture=void 0,this._defaultCubeMap=void 0,this._us=L,this._currentRenderState=T,this._currentPassState=_,this._currentFramebuffer=void 0,this._maxFrameTextureUnitIndex=0,this._vertexAttribDivisors=[],this._previousDrawInstanced=!1;for(let v=0;v<Rt._maximumVertexAttributes;v++)this._vertexAttribDivisors.push(0);this._pickObjects=new Map,this._nextPickColor=new Uint32Array(1),this.options={getWebGLStub:n,requestWebgl1:i,webgl:o,allowTextureFilterAnisotropic:r},this.cache={},Ve.apply(u,T,_)}function x3e(e,t,n){if(typeof WebGLRenderingContext>"u")throw new re("The browser does not support WebGL. Visit http://get.webgl.org.");!n&&!(typeof WebGL2RenderingContext<"u")&&(n=!0);let o=n?"webgl":"webgl2",r=e.getContext(o,t);if(!l(r))throw new re("The browser supports WebGL, but initialization failed.");return r}function b3e(e,t){let n="WebGL Error: ";switch(t){case e.INVALID_ENUM:n+="INVALID_ENUM";break;case e.INVALID_VALUE:n+="INVALID_VALUE";break;case e.INVALID_OPERATION:n+="INVALID_OPERATION";break;case e.OUT_OF_MEMORY:n+="OUT_OF_MEMORY";break;case e.CONTEXT_LOST_WEBGL:n+="CONTEXT_LOST_WEBGL lost";break;default:n+=`Unknown (${t})`}return n}function C3e(e,t,n,i){let o=`${b3e(e,i)}: ${t.name}(`;for(let r=0;r<n.length;++r)r!==0&&(o+=", "),o+=n[r];return o+=");",o}function T3e(e,t,n){let i=e.getError();if(i!==e.NO_ERROR)throw new re(C3e(e,t,n,i))}function E3e(e,t,n){return{get:function(){let i=e[t];return n(e,`get: ${t}`,i),e[t]},set:function(i){e[t]=i,n(e,`set: ${t}`,i)}}}function v3e(e,t){if(!l(t))return e;function n(o){return function(){let r=o.apply(e,arguments);return t(e,o,arguments),r}}let i={};for(let o in e){let r=e[o];r instanceof Function?i[o]=n(r):Object.defineProperty(i,o,E3e(e,o,t))}return i}function Jr(e,t){let n=t.length;for(let i=0;i<n;++i){let o=e.getExtension(t[i]);if(o)return o}}var S3e={};Object.defineProperties(Eu.prototype,{id:{get:function(){return this._id}},webgl2:{get:function(){return this._webgl2}},canvas:{get:function(){return this._canvas}},shaderCache:{get:function(){return this._shaderCache}},textureCache:{get:function(){return this._textureCache}},uniformState:{get:function(){return this._us}},stencilBits:{get:function(){return this._stencilBits}},stencilBuffer:{get:function(){return this._stencilBits>=8}},antialias:{get:function(){return this._antialias}},msaa:{get:function(){return this._webgl2}},standardDerivatives:{get:function(){return this._standardDerivatives||this._webgl2}},floatBlend:{get:function(){return this._floatBlend}},blendMinmax:{get:function(){return this._blendMinmax||this._webgl2}},elementIndexUint:{get:function(){return this._elementIndexUint||this._webgl2}},depthTexture:{get:function(){return this._depthTexture||this._webgl2}},floatingPointTexture:{get:function(){return this._webgl2||this._textureFloat}},halfFloatingPointTexture:{get:function(){return this._webgl2||this._textureHalfFloat}},textureFloatLinear:{get:function(){return this._textureFloatLinear}},textureHalfFloatLinear:{get:function(){return this._webgl2&&this._textureFloatLinear||!this._webgl2&&this._textureHalfFloatLinear}},supportsTextureLod:{get:function(){return this._webgl2||this._supportsTextureLod}},textureFilterAnisotropic:{get:function(){return!!this._textureFilterAnisotropic}},s3tc:{get:function(){return this._s3tc}},pvrtc:{get:function(){return this._pvrtc}},astc:{get:function(){return this._astc}},etc:{get:function(){return this._etc}},etc1:{get:function(){return this._etc1}},bc7:{get:function(){return this._bc7}},supportsBasis:{get:function(){return this._s3tc||this._pvrtc||this._astc||this._etc||this._etc1||this._bc7}},vertexArrayObject:{get:function(){return this._vertexArrayObject||this._webgl2}},fragmentDepth:{get:function(){return this._fragDepth||this._webgl2}},instancedArrays:{get:function(){return this._instancedArrays||this._webgl2}},colorBufferFloat:{get:function(){return this._colorBufferFloat}},colorBufferHalfFloat:{get:function(){return this._webgl2&&this._colorBufferFloat||!this._webgl2&&this._colorBufferHalfFloat}},drawBuffers:{get:function(){return this._drawBuffers||this._webgl2}},debugShaders:{get:function(){return this._debugShaders}},throwOnWebGLError:{get:function(){return this._throwOnWebGLError},set:function(e){this._throwOnWebGLError=e,this._gl=v3e(this._originalGLContext,e?T3e:void 0)}},defaultTexture:{get:function(){return this._defaultTexture===void 0&&(this._defaultTexture=new It({context:this,source:{width:1,height:1,arrayBufferView:new Uint8Array([255,255,255,255])},flipY:!1})),this._defaultTexture}},defaultEmissiveTexture:{get:function(){return this._defaultEmissiveTexture===void 0&&(this._defaultEmissiveTexture=new It({context:this,pixelFormat:Xe.RGB,source:{width:1,height:1,arrayBufferView:new Uint8Array([0,0,0])},flipY:!1})),this._defaultEmissiveTexture}},defaultNormalTexture:{get:function(){return this._defaultNormalTexture===void 0&&(this._defaultNormalTexture=new It({context:this,pixelFormat:Xe.RGB,source:{width:1,height:1,arrayBufferView:new Uint8Array([128,128,255])},flipY:!1})),this._defaultNormalTexture}},defaultCubeMap:{get:function(){if(this._defaultCubeMap===void 0){let e={width:1,height:1,arrayBufferView:new Uint8Array([255,255,255,255])};this._defaultCubeMap=new $r({context:this,source:{positiveX:e,negativeX:e,positiveY:e,negativeY:e,positiveZ:e,negativeZ:e},flipY:!1})}return this._defaultCubeMap}},drawingBufferHeight:{get:function(){return this._gl.drawingBufferHeight}},drawingBufferWidth:{get:function(){return this._gl.drawingBufferWidth}},defaultFramebuffer:{get:function(){return S3e}}});function Qce(e,t,n,i){let o=e._currentRenderState,r=e._currentPassState;e._currentRenderState=t,e._currentPassState=n,Ve.partialApply(e._gl,o,t,r,n,i)}var sq;typeof WebGLRenderingContext<"u"&&(sq=[ee.BACK]);function P8(e,t){if(t!==e._currentFramebuffer){e._currentFramebuffer=t;let n=sq;if(l(t))t._bind(),n=t._getActiveColorAttachments();else{let i=e._gl;i.bindFramebuffer(i.FRAMEBUFFER,null)}e.drawBuffers&&e.glDrawBuffers(n)}}var w3e=new ai;Eu.prototype.clear=function(e,t){e=e??w3e,t=t??this._defaultPassState;let n=this._gl,i=0,o=e.color,r=e.depth,a=e.stencil;l(o)&&(V.equals(this._clearColor,o)||(V.clone(o,this._clearColor),n.clearColor(o.red,o.green,o.blue,o.alpha)),i|=n.COLOR_BUFFER_BIT),l(r)&&(r!==this._clearDepth&&(this._clearDepth=r,n.clearDepth(r)),i|=n.DEPTH_BUFFER_BIT),l(a)&&(a!==this._clearStencil&&(this._clearStencil=a,n.clearStencil(a)),i|=n.STENCIL_BUFFER_BIT);let s=e.renderState??this._defaultRenderState;Qce(this,s,t,!0);let c=e.framebuffer??t.framebuffer;P8(this,c),n.clear(i)};function I3e(e,t,n,i,o){P8(e,t),Qce(e,o,n,!1),i._bind(),e._maxFrameTextureUnitIndex=Math.max(e._maxFrameTextureUnitIndex,i.maximumTextureUnitIndex)}function D3e(e,t,n,i){let o=t._primitiveType,r=t._vertexArray,a=t._offset,s=t._count,c=t.instanceCount;e._us.model=t._modelMatrix??M.IDENTITY,n._setUniforms(i,e._us,e.validateShaderProgram),r._bind();let u=r.indexBuffer;l(u)?(a=a*u.bytesPerIndex,l(s)?s=Math.min(s,u.numberOfIndices):s=u.numberOfIndices,c===0?e._gl.drawElements(o,s,u.indexDatatype,a):e.glDrawElementsInstanced(o,s,u.indexDatatype,a,c)):(l(s)?s=Math.min(s,r.numberOfVertices):s=r.numberOfVertices,c===0?e._gl.drawArrays(o,a,s):e.glDrawArraysInstanced(o,a,s,c)),r._unBind()}Eu.prototype.draw=function(e,t,n,i){t=t??this._defaultPassState;let o=e._framebuffer??t.framebuffer,r=e._renderState??this._defaultRenderState;n=n??e._shaderProgram,i=i??e._uniformMap,I3e(this,o,t,n,r),D3e(this,e,n,i)};Eu.prototype.beginFrame=function(){};Eu.prototype.endFrame=function(){let e=this._gl;e.useProgram(null),this._currentFramebuffer=void 0,e.bindFramebuffer(e.FRAMEBUFFER,null);let t=sq;this.drawBuffers&&this.glDrawBuffers(t);let n=this._maxFrameTextureUnitIndex;this._maxFrameTextureUnitIndex=0;for(let i=0;i<n;++i)e.activeTexture(e.TEXTURE0+i),e.bindTexture(e.TEXTURE_2D,null),e.bindTexture(e.TEXTURE_CUBE_MAP,null)};Eu.prototype.readPixelsToPBO=function(e){let t=this._gl;e=e??G.EMPTY_OBJECT;let n=Math.max(e.x??0,0),i=Math.max(e.y??0,0),o=e.width??this.drawingBufferWidth,r=e.height??this.drawingBufferHeight,a=e.framebuffer;if(!this._webgl2)throw new _e("A WebGL 2 context is required to read pixels using a PBO.");let s=je.UNSIGNED_BYTE,c=Xe.RGBA;l(a)&&a.numberOfColorAttachments>0&&(s=a.getColorTexture(0).pixelDatatype,c=a.getColorTexture(0).pixelFormat);let u=Ke.createPixelBuffer({context:this,sizeInBytes:Xe.textureSizeInBytes(c,s,o,r),usage:Oe.DYNAMIC_READ});return P8(this,a),u._bind(),t.readPixels(n,i,o,r,c,je.toWebGLConstant(s,this),0),u._unBind(),u};Eu.prototype.readPixels=function(e){let t=this._gl;e=e??G.EMPTY_OBJECT;let n=Math.max(e.x??0,0),i=Math.max(e.y??0,0),o=e.width??this.drawingBufferWidth,r=e.height??this.drawingBufferHeight,a=e.framebuffer,s=je.UNSIGNED_BYTE,c=Xe.RGBA;l(a)&&a.numberOfColorAttachments>0&&(s=a.getColorTexture(0).pixelDatatype,c=a.getColorTexture(0).pixelFormat);let u=Xe.createTypedArray(c,s,o,r);return P8(this,a),t.readPixels(n,i,o,r,Xe.RGBA,je.toWebGLConstant(s,this),u),u};var $ce={position:0,textureCoordinates:1};Eu.prototype.getViewportQuadVertexArray=function(){let e=this.cache.viewportQuad_vertexArray;if(!l(e)){let t=new At({attributes:{position:new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:[-1,-1,1,-1,1,1,-1,1]}),textureCoordinates:new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:[0,0,1,0,1,1,0,1]})},indices:new Uint16Array([0,1,2,0,2,3]),primitiveType:Re.TRIANGLES});e=Fn.fromGeometry({context:this,geometry:t,attributeLocations:$ce,bufferUsage:Oe.STATIC_DRAW,interleave:!0}),this.cache.viewportQuad_vertexArray=e}return e};Eu.prototype.createViewportQuadCommand=function(e,t){return t=t??G.EMPTY_OBJECT,new tt({vertexArray:this.getViewportQuadVertexArray(),primitiveType:Re.TRIANGLES,renderState:t.renderState,shaderProgram:Kt.fromCache({context:this,vertexShaderSource:yx,fragmentShaderSource:e,attributeLocations:$ce}),uniformMap:t.uniformMap,owner:t.owner,framebuffer:t.framebuffer,pass:t.pass})};Eu.prototype.getObjectByPickColor=function(e){return this._pickObjects.get(e)};Eu.prototype.createPickId=function(e){++this._nextPickColor[0];let t=this._nextPickColor[0];if(t===0)throw new re("Out of unique Pick IDs.");return this._pickObjects.set(t,e),new PD(this._pickObjects,t,V.fromRgba(t))};Eu.prototype.isDestroyed=function(){return!1};Eu.prototype.destroy=function(){let e=this.cache;for(let t in e)if(e.hasOwnProperty(t)){let n=e[t];l(n.destroy)&&n.destroy()}return this._shaderCache=this._shaderCache.destroy(),this._textureCache=this._textureCache.destroy(),this._defaultTexture=this._defaultTexture&&this._defaultTexture.destroy(),this._defaultEmissiveTexture=this._defaultEmissiveTexture&&this._defaultEmissiveTexture.destroy(),this._defaultNormalTexture=this._defaultNormalTexture&&this._defaultNormalTexture.destroy(),this._defaultCubeMap=this._defaultCubeMap&&this._defaultCubeMap.destroy(),fe(this)};var Px=Eu;function PE(e){e=e??G.EMPTY_OBJECT;let{context:t,width:n,height:i,colorRenderbuffers:o,colorTextures:r,depthStencilRenderbuffer:a,depthStencilTexture:s,destroyAttachments:c}=e;if(this._width=n,this._height=i,l(o)!==l(r))throw new _e("Both color renderbuffer and texture attachments must be provided.");if(l(a)!==l(s))throw new _e("Both depth-stencil renderbuffer and texture attachments must be provided.");this._renderFramebuffer=new fa({context:t,colorRenderbuffers:o,depthStencilRenderbuffer:a,destroyAttachments:c}),this._colorFramebuffer=new fa({context:t,colorTextures:r,depthStencilTexture:s,destroyAttachments:c})}PE.prototype.getRenderFramebuffer=function(){return this._renderFramebuffer};PE.prototype.getColorFramebuffer=function(){return this._colorFramebuffer};PE.prototype.blitFramebuffers=function(e,t){this._renderFramebuffer.bindRead(),this._colorFramebuffer.bindDraw();let n=e._gl,i=0;this._colorFramebuffer._colorTextures.length>0&&(i|=n.COLOR_BUFFER_BIT),l(this._colorFramebuffer.depthStencilTexture)&&(i|=n.DEPTH_BUFFER_BIT|(t?n.STENCIL_BUFFER_BIT:0)),n.blitFramebuffer(0,0,this._width,this._height,0,0,this._width,this._height,i,n.NEAREST),n.bindFramebuffer(n.READ_FRAMEBUFFER,null),n.bindFramebuffer(n.DRAW_FRAMEBUFFER,null)};PE.prototype.isDestroyed=function(){return!1};PE.prototype.destroy=function(){return this._renderFramebuffer.destroy(),this._colorFramebuffer.destroy(),fe(this)};var AR=PE;var Ol={RGBA4:ee.RGBA4,RGBA8:ee.RGBA8,RGBA16F:ee.RGBA16F,RGBA32F:ee.RGBA32F,RGB5_A1:ee.RGB5_A1,RGB565:ee.RGB565,DEPTH_COMPONENT16:ee.DEPTH_COMPONENT16,STENCIL_INDEX8:ee.STENCIL_INDEX8,DEPTH_STENCIL:ee.DEPTH_STENCIL,DEPTH24_STENCIL8:ee.DEPTH24_STENCIL8,validate:function(e){return e===Ol.RGBA4||e===Ol.RGBA8||e===Ol.RGBA16F||e===Ol.RGBA32F||e===Ol.RGB5_A1||e===Ol.RGB565||e===Ol.DEPTH_COMPONENT16||e===Ol.STENCIL_INDEX8||e===Ol.DEPTH_STENCIL||e===Ol.DEPTH24_STENCIL8},getColorFormat:function(e){return e===ee.FLOAT?Ol.RGBA32F:e===ee.HALF_FLOAT_OES?Ol.RGBA16F:Ol.RGBA8}};Object.freeze(Ol);var Ml=Ol;function yR(e){e=e??G.EMPTY_OBJECT;let t=e.context,n=t._gl,i=Rt.maximumRenderbufferSize,o=e.format??Ml.RGBA4,r=l(e.width)?e.width:t.drawingBufferWidth,a=l(e.height)?e.height:t.drawingBufferHeight,s=e.numSamples??1;this._gl=n,this._format=o,this._width=r,this._height=a,this._renderbuffer=this._gl.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,this._renderbuffer),s>1?n.renderbufferStorageMultisample(n.RENDERBUFFER,s,o,r,a):n.renderbufferStorage(n.RENDERBUFFER,o,r,a),n.bindRenderbuffer(n.RENDERBUFFER,null)}Object.defineProperties(yR.prototype,{format:{get:function(){return this._format}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}});yR.prototype._getRenderbuffer=function(){return this._renderbuffer};yR.prototype.isDestroyed=function(){return!1};yR.prototype.destroy=function(){return this._gl.deleteRenderbuffer(this._renderbuffer),fe(this)};var mf=yR;function us(e){e=e??G.EMPTY_OBJECT,this._numSamples=e.numSamples??1,this._colorAttachmentsLength=e.colorAttachmentsLength??1,this._color=e.color??!0,this._depth=e.depth??!1,this._depthStencil=e.depthStencil??!1,this._supportsDepthTexture=e.supportsDepthTexture??!1,this._createColorAttachments=e.createColorAttachments??!0,this._createDepthAttachments=e.createDepthAttachments??!0,this._pixelDatatype=e.pixelDatatype,this._pixelFormat=e.pixelFormat,this._width=void 0,this._height=void 0,this._framebuffer=void 0,this._multisampleFramebuffer=void 0,this._colorTextures=void 0,this._color&&(this._colorTextures=new Array(this._colorAttachmentsLength),this._colorRenderbuffers=new Array(this._colorAttachmentsLength)),this._colorRenderbuffer=void 0,this._depthStencilRenderbuffer=void 0,this._depthStencilTexture=void 0,this._depthRenderbuffer=void 0,this._depthTexture=void 0,this._attachmentsDirty=!1}Object.defineProperties(us.prototype,{framebuffer:{get:function(){return this._numSamples>1?this._multisampleFramebuffer.getRenderFramebuffer():this._framebuffer}},numSamples:{get:function(){return this._numSamples}},status:{get:function(){return this.framebuffer.status}}});us.prototype.isDirty=function(e,t,n,i,o){n=n??1;let r=this._width!==e||this._height!==t,a=this._numSamples!==n,s=l(i)&&this._pixelDatatype!==i||l(o)&&this._pixelFormat!==o,c=n===1?l(this._framebuffer):l(this._multisampleFramebuffer);return this._attachmentsDirty||r||a||s||!c||this._color&&!l(this._colorTextures[0])};us.prototype.update=function(e,t,n,i,o,r){if(i=e.msaa?i??1:1,o=o??(this._color?this._pixelDatatype??je.UNSIGNED_BYTE:void 0),r=r??(this._color?this._pixelFormat??Xe.RGBA:void 0),this.isDirty(t,n,i,o,r)){if(this.destroy(),this._width=t,this._height=n,this._numSamples=i,this._pixelDatatype=o,this._pixelFormat=r,this._attachmentsDirty=!1,this._color&&this._createColorAttachments){for(let a=0;a<this._colorAttachmentsLength;++a)if(this._colorTextures[a]=new It({context:e,width:t,height:n,pixelFormat:r,pixelDatatype:o,sampler:jt.NEAREST}),this._numSamples>1){let s=Ml.getColorFormat(o);this._colorRenderbuffers[a]=new mf({context:e,width:t,height:n,format:s,numSamples:this._numSamples})}}this._depthStencil&&this._createDepthAttachments&&(this._supportsDepthTexture&&e.depthTexture?(this._depthStencilTexture=new It({context:e,width:t,height:n,pixelFormat:Xe.DEPTH_STENCIL,pixelDatatype:je.UNSIGNED_INT_24_8,sampler:jt.NEAREST}),this._numSamples>1&&(this._depthStencilRenderbuffer=new mf({context:e,width:t,height:n,format:Ml.DEPTH24_STENCIL8,numSamples:this._numSamples}))):this._depthStencilRenderbuffer=new mf({context:e,width:t,height:n,format:Ml.DEPTH_STENCIL})),this._depth&&this._createDepthAttachments&&(this._supportsDepthTexture&&e.depthTexture?this._depthTexture=new It({context:e,width:t,height:n,pixelFormat:Xe.DEPTH_COMPONENT,pixelDatatype:je.UNSIGNED_INT,sampler:jt.NEAREST}):this._depthRenderbuffer=new mf({context:e,width:t,height:n,format:Ml.DEPTH_COMPONENT16})),this._numSamples>1?this._multisampleFramebuffer=new AR({context:e,width:this._width,height:this._height,colorTextures:this._colorTextures,colorRenderbuffers:this._colorRenderbuffers,depthStencilTexture:this._depthStencilTexture,depthStencilRenderbuffer:this._depthStencilRenderbuffer,destroyAttachments:!1}):this._framebuffer=new fa({context:e,colorTextures:this._colorTextures,depthTexture:this._depthTexture,depthRenderbuffer:this._depthRenderbuffer,depthStencilTexture:this._depthStencilTexture,depthStencilRenderbuffer:this._depthStencilRenderbuffer,destroyAttachments:!1})}};us.prototype.getColorTexture=function(e){return e=e??0,this._colorTextures[e]};us.prototype.setColorTexture=function(e,t){t=t??0,this._attachmentsDirty=e!==this._colorTextures[t],this._colorTextures[t]=e};us.prototype.getColorRenderbuffer=function(e){return e=e??0,this._colorRenderbuffers[e]};us.prototype.setColorRenderbuffer=function(e,t){t=t??0,this._attachmentsDirty=e!==this._colorRenderbuffers[t],this._colorRenderbuffers[t]=e};us.prototype.getDepthRenderbuffer=function(){return this._depthRenderbuffer};us.prototype.setDepthRenderbuffer=function(e){this._attachmentsDirty=e!==this._depthRenderbuffer,this._depthRenderbuffer=e};us.prototype.getDepthTexture=function(){return this._depthTexture};us.prototype.setDepthTexture=function(e){this._attachmentsDirty=e!==this._depthTexture,this._depthTexture=e};us.prototype.getDepthStencilRenderbuffer=function(){return this._depthStencilRenderbuffer};us.prototype.setDepthStencilRenderbuffer=function(e){this._attachmentsDirty=e!==this._depthStencilRenderbuffer,this._depthStencilRenderbuffer=e};us.prototype.getDepthStencilTexture=function(){return this._depthStencilTexture};us.prototype.setDepthStencilTexture=function(e){this._attachmentsDirty=e!==this._depthStencilTexture,this._depthStencilTexture=e};us.prototype.prepareTextures=function(e,t){this._numSamples>1&&this._multisampleFramebuffer.blitFramebuffers(e,t)};us.prototype.clear=function(e,t,n){let i=t.framebuffer;t.framebuffer=this.framebuffer,t.execute(e,n),t.framebuffer=i};us.prototype.destroyFramebuffer=function(){this._framebuffer=this._framebuffer&&this._framebuffer.destroy(),this._multisampleFramebuffer=this._multisampleFramebuffer&&this._multisampleFramebuffer.destroy()};us.prototype.destroy=function(){if(this._color){let e=this._colorTextures,t=this._colorRenderbuffers;for(let n=0;n<e.length;++n){let i=e[n];this._createColorAttachments&&l(i)&&!i.isDestroyed()&&i.destroy(),l(i)&&i.isDestroyed()&&(e[n]=void 0);let o=t[n];this._createColorAttachments&&l(o)&&!o.isDestroyed()&&o.destroy(),l(o)&&o.isDestroyed()&&(t[n]=void 0)}}this._depthStencil&&(this._createDepthAttachments&&(this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._depthStencilRenderbuffer=this._depthStencilRenderbuffer&&this._depthStencilRenderbuffer.destroy()),l(this._depthStencilTexture)&&this._depthStencilTexture.isDestroyed()&&(this._depthStencilTexture=void 0),l(this._depthStencilRenderbuffer)&&this._depthStencilRenderbuffer.isDestroyed()&&(this._depthStencilRenderbuffer=void 0)),this._depth&&(this._createDepthAttachments&&(this._depthTexture=this._depthTexture&&this._depthTexture.destroy(),this._depthRenderbuffer=this._depthRenderbuffer&&this._depthRenderbuffer.destroy()),l(this._depthTexture)&&this._depthTexture.isDestroyed()&&(this._depthTexture=void 0),l(this._depthRenderbuffer)&&this._depthRenderbuffer.isDestroyed()&&(this._depthRenderbuffer=void 0)),this.destroyFramebuffer()};var yi=us;var oA={NONE:0,VERTEX:1,FRAGMENT:2,BOTH:3};oA.includesVertexShader=function(e){return(e&oA.VERTEX)!==0};oA.includesFragmentShader=function(e){return(e&oA.FRAGMENT)!==0};oA.union=function(...e){let t=0;for(let n=0;n<e.length;n++)t|=e[n];return t};oA.intersection=function(...e){let t=e[0];for(let n=1;n<e.length;n++)t&=e[n];return t};Object.freeze(oA);var he=oA;function cq(e){this.name=e,this.fields=[]}cq.prototype.addField=function(e,t){let n=` ${e} ${t};`;this.fields.push(n)};cq.prototype.generateGlslLines=function(){let e=this.fields;return e.length===0&&(e=[" float _empty;"]),[].concat(`struct ${this.name}`,"{",e,"};")};var xR=cq;function lq(e){this.signature=e,this.body=[]}lq.prototype.addLines=function(e){let t=this.body;if(Array.isArray(e)){let n=e.length;for(let i=0;i<n;i++)t.push(` ${e[i]}`)}else t.push(` ${e}`)};lq.prototype.generateGlslLines=function(){return[].concat(this.signature,"{",this.body,"}")};var bR=lq;function P3e(e,t){if(!l(t))return;let n=t.length;if(n===0)return;let i=e.length;e.length+=n;for(let o=0;o<n;o++)e[i+o]=t[o]}var Qn=P3e;function Bl(){this._positionAttributeLine=void 0,this._nextAttributeLocation=1,this._attributeLocations={},this._attributeLines=[],this._structs={},this._functions={},this._vertexShaderParts={defineLines:[],uniformLines:[],shaderLines:[],varyingLines:[],structIds:[],functionIds:[]},this._fragmentShaderParts={defineLines:[],uniformLines:[],shaderLines:[],varyingLines:[],structIds:[],functionIds:[]}}Object.defineProperties(Bl.prototype,{attributeLocations:{get:function(){return this._attributeLocations}}});Bl.prototype.addDefine=function(e,t,n){n=n??he.BOTH;let i=e;l(t)&&(i+=` ${t.toString()}`),he.includesVertexShader(n)&&this._vertexShaderParts.defineLines.push(i),he.includesFragmentShader(n)&&this._fragmentShaderParts.defineLines.push(i)};Bl.prototype.addStruct=function(e,t,n){this._structs[e]=new xR(t),he.includesVertexShader(n)&&this._vertexShaderParts.structIds.push(e),he.includesFragmentShader(n)&&this._fragmentShaderParts.structIds.push(e)};Bl.prototype.addStructField=function(e,t,n){this._structs[e].addField(t,n)};Bl.prototype.addFunction=function(e,t,n){this._functions[e]=new bR(t),he.includesVertexShader(n)&&this._vertexShaderParts.functionIds.push(e),he.includesFragmentShader(n)&&this._fragmentShaderParts.functionIds.push(e)};Bl.prototype.addFunctionLines=function(e,t){this._functions[e].addLines(t)};Bl.prototype.addUniform=function(e,t,n){n=n??he.BOTH;let i=`uniform ${e} ${t};`;he.includesVertexShader(n)&&this._vertexShaderParts.uniformLines.push(i),he.includesFragmentShader(n)&&this._fragmentShaderParts.uniformLines.push(i)};Bl.prototype.setPositionAttribute=function(e,t){return this._positionAttributeLine=`in ${e} ${t};`,this._attributeLocations[t]=0,0};Bl.prototype.addAttribute=function(e,t){let n=`in ${e} ${t};`;this._attributeLines.push(n);let i=this._nextAttributeLocation;return this._attributeLocations[t]=i,this._nextAttributeLocation+=O3e(e),i};Bl.prototype.addVarying=function(e,t,n){n=l(n)?`${n} `:"";let i=`${e} ${t};`;this._vertexShaderParts.varyingLines.push(`${n}out ${i}`),this._fragmentShaderParts.varyingLines.push(`${n}in ${i}`)};Bl.prototype.addVertexLines=function(e){let t=this._vertexShaderParts.shaderLines;Array.isArray(e)?Qn(t,e):t.push(e)};Bl.prototype.addFragmentLines=function(e){let t=this._fragmentShaderParts.shaderLines;Array.isArray(e)?Qn(t,e):t.push(e)};Bl.prototype.buildShaderProgram=function(e){let t=l(this._positionAttributeLine)?[this._positionAttributeLine]:[],n=R3e(this),i=M3e(this),o=t.concat(this._attributeLines,this._vertexShaderParts.uniformLines,this._vertexShaderParts.varyingLines,n.vertexLines,i.vertexLines,this._vertexShaderParts.shaderLines).join(`
- `),r=new He({defines:this._vertexShaderParts.defineLines,sources:[o]}),a=this._fragmentShaderParts.uniformLines.concat(this._fragmentShaderParts.varyingLines,n.fragmentLines,i.fragmentLines,this._fragmentShaderParts.shaderLines).join(`
- `),s=new He({defines:this._fragmentShaderParts.defineLines,sources:[a]});return Kt.fromCache({context:e,vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:this._attributeLocations})};Bl.prototype.clone=function(){return We(this,!0)};function R3e(e){let t=[],n=[],i,o=e._vertexShaderParts.structIds,r,a,s;for(i=0;i<o.length;i++)r=o[i],a=e._structs[r],s=a.generateGlslLines(),Qn(t,s);for(o=e._fragmentShaderParts.structIds,i=0;i<o.length;i++)r=o[i],a=e._structs[r],s=a.generateGlslLines(),Qn(n,s);return{vertexLines:t,fragmentLines:n}}function O3e(e){switch(e){case"mat2":return 2;case"mat3":return 3;case"mat4":return 4;default:return 1}}function M3e(e){let t=[],n=[],i,o=e._vertexShaderParts.functionIds,r,a,s;for(i=0;i<o.length;i++)r=o[i],a=e._functions[r],s=a.generateGlslLines(),Qn(t,s);for(o=e._fragmentShaderParts.functionIds,i=0;i<o.length;i++)r=o[i],a=e._functions[r],s=a.generateGlslLines(),Qn(n,s);return{vertexLines:t,fragmentLines:n}}var V0=Bl;function R8(e){this._autoDestroy=e?.autoDestroy??!0,this._canvas=document.createElement("canvas"),this._context=new Px(this._canvas,We(e?.contextOptions)),this._canvases=[]}R8.prototype.createSceneContext=function(e){let t=e.getContext("2d",{alpha:!0}),n=this;n._canvases.push(e);let i=!1,o=function(){i=!0;let c=n._canvases.indexOf(e);c!==-1&&(n._canvases.splice(c,1),n._autoDestroy&&n._canvases.length===0&&n.destroy())},r=function(){let c=n._context.canvas,u=this.drawingBufferWidth;c.width<u&&(c.width=u);let f=this.drawingBufferHeight;c.height<f&&(c.height=f)},a=function(){let c=this.drawingBufferWidth,u=this.drawingBufferHeight,f=n._context.canvas.height-u;t.drawImage(n._context.canvas,0,f,c,u,0,0,c,u),n._context.endFrame()};return new Proxy(this._context,{get(c,u,f){if(u==="isDestroyed")return function(){return i};switch(u){case"_canvas":return e;case"destroy":return o;case"drawingBufferWidth":return e.width;case"drawingBufferHeight":return e.height;case"beginFrame":return r;case"endFrame":return a;default:return Reflect.get(c,u,f)}}})};R8.prototype.destroy=function(){this._context.destroy(),fe(this)};R8.prototype.isDestroyed=function(){return!1};var CR=R8;function Rx(e){e=e??G.EMPTY_OBJECT;let t=e.context;if(!t._webgl2)throw new _e("A WebGL 2 context is required to use Sync operations.");let n=t._gl,i=n.fenceSync(ee.SYNC_GPU_COMMANDS_COMPLETE,0);this._gl=n,this._sync=i}Rx.create=function(e){return new Rx(e)};Rx.prototype.getStatus=function(){return this._gl.getSyncParameter(this._sync,ee.SYNC_STATUS)};Rx.prototype.isDestroyed=function(){return!1};Rx.prototype.destroy=function(){return this._gl.deleteSync(this._sync),fe(this)};Rx.prototype.waitForSignal=async function(e,t){let n=this;t=t??10;function i(o,r,a){return()=>{n.getStatus()===ee.SIGNALED?o():a<=0?r(new re("Wait for signal timeout")):e(i(o,r,a-1))}}return new Promise((o,r)=>{e(i(o,r,t))})};var TR=Rx;function rA(e){e=e??G.EMPTY_OBJECT;let{context:t,source:n,pixelFormat:i=Xe.RGBA,pixelDatatype:o=je.UNSIGNED_BYTE,flipY:r=!0,skipColorSpaceConversion:a=!1,sampler:s=new jt}=e;if(!t.webgl2&&!l(t.options.getWebGLStub))throw new _e("WebGL1 does not support texture3D. Please use a WebGL2 context.");let{width:c,height:u,depth:f}=e;l(n)&&(l(c)||(c=n.width),l(u)||(u=n.height),l(f)||(f=n.depth));let d=e.preMultiplyAlpha||i===Xe.RGB||i===Xe.LUMINANCE,p=Xe.toInternalFormat(i,o,t),g=Xe.isCompressedFormat(p),m=t._gl,A=Xe.texture3DSizeInBytes(i,o,c,u,f);if(this._id=e.id??jn(),this._context=t,this._textureFilterAnisotropic=t._textureFilterAnisotropic,this._textureTarget=m.TEXTURE_3D,this._texture=m.createTexture(),this._internalFormat=p,this._pixelFormat=i,this._pixelDatatype=o,this._width=c,this._height=u,this._depth=f,this._dimensions=new h(c,u,f),this._hasMipmap=!1,this._sizeInBytes=A,this._preMultiplyAlpha=d,this._flipY=r,this._initialized=!1,this._sampler=void 0,this._sampler=s,ele(this,s),m.activeTexture(m.TEXTURE0),m.bindTexture(this._textureTarget,this._texture),l(n)){if(a?m.pixelStorei(m.UNPACK_COLORSPACE_CONVERSION_WEBGL,m.NONE):m.pixelStorei(m.UNPACK_COLORSPACE_CONVERSION_WEBGL,m.BROWSER_DEFAULT_WEBGL),!l(n.arrayBufferView))throw new _e("For Texture3D, options.source.arrayBufferView must be defined");Jce(this,n),this._initialized=!0}else Zce(this);m.bindTexture(this._textureTarget,null)}function Jce(e,t){let n=e._context,i=n._gl,o=e._textureTarget,r=e._internalFormat,{width:a,height:s,depth:c,pixelFormat:u,pixelDatatype:f,flipY:d}=e,p=Xe.alignmentInBytes(u,f,a);i.pixelStorei(i.UNPACK_ALIGNMENT,p),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!1);let{arrayBufferView:g}=t;d&&console.warn("texture3D.flipY is not supported.");let m=1;if(t.mipLevels&&t.mipLevels.length&&(m=t.mipLevels.length+1),i.texStorage3D(o,m,r,a,s,c),i.texSubImage3D(o,0,0,0,0,a,s,c,u,je.toWebGLConstant(f,n),g),m>1){let A=a,y=s,x=c;for(let b=0;b<t.mipLevels.length;++b)A=uq(A),y=uq(y),x=uq(x),i.texSubImage3D(o,b+1,0,0,0,A,y,x,u,je.toWebGLConstant(f,n),t.mipLevels[b])}}rA.prototype.copyFrom=function(e){e=e??G.EMPTY_OBJECT;let{source:t,xOffset:n=0,yOffset:i=0,zOffset:o=0}=e,a=this._context._gl,s=this._textureTarget;a.activeTexture(a.TEXTURE0),a.bindTexture(s,this._texture);let{width:c,height:u,depth:f}=t,d=!1;this._initialized||(n===0&&i===0&&o===0&&c===this._width&&u===this._height&&f===this._depth?(Jce(this,t),d=!0):(a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,!1),Zce(this)),this._initialized=!0),d||B3e(this,t.arrayBufferView,n,i,o,c,u,f),a.bindTexture(s,null)};function B3e(e,t,n,i,o,r,a,s){let c=e._context,u=c._gl,{pixelFormat:f,pixelDatatype:d}=e,p=Xe.alignmentInBytes(f,d,r);u.pixelStorei(u.UNPACK_ALIGNMENT,p),u.pixelStorei(u.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),u.pixelStorei(u.UNPACK_FLIP_Y_WEBGL,!1),u.texSubImage3D(e._textureTarget,0,n,i,o,r,a,s,f,je.toWebGLConstant(d,c),t)}function uq(e){let t=Math.floor(e/2)|0;return Math.max(t,1)}function Zce(e){let t=e._context;t._gl.texImage3D(e._textureTarget,0,e._internalFormat,e._width,e._height,e._depth,0,e._pixelFormat,je.toWebGLConstant(e._pixelDatatype,t),null)}rA.create=function(e){return new rA(e)};Object.defineProperties(rA.prototype,{id:{get:function(){return this._id}},sampler:{get:function(){return this._sampler},set:function(e){ele(this,e),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},dimensions:{get:function(){return this._dimensions}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},depth:{get:function(){return this._depth}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(this._sizeInBytes*8/7):this._sizeInBytes}},_target:{get:function(){return this._textureTarget}}});function ele(e,t){let{minificationFilter:n,magnificationFilter:i}=t,o=[Vt.NEAREST_MIPMAP_NEAREST,Vt.NEAREST_MIPMAP_LINEAR,Vt.LINEAR_MIPMAP_NEAREST,Vt.LINEAR_MIPMAP_LINEAR].includes(n),r=e._context,a=e._pixelFormat,s=e._pixelDatatype;(s===je.FLOAT&&!r.textureFloatLinear||s===je.HALF_FLOAT&&!r.textureHalfFloatLinear)&&(n=o?Vt.NEAREST_MIPMAP_NEAREST:Vt.NEAREST,i=ti.NEAREST),Xe.isDepthFormat(a)&&(n=Vt.NEAREST,i=ti.NEAREST);let c=r._gl,u=e._textureTarget;c.activeTexture(c.TEXTURE0),c.bindTexture(u,e._texture),c.texParameteri(u,c.TEXTURE_MIN_FILTER,n),c.texParameteri(u,c.TEXTURE_MAG_FILTER,i),c.texParameteri(u,c.TEXTURE_WRAP_R,t.wrapR),c.texParameteri(u,c.TEXTURE_WRAP_S,t.wrapS),c.texParameteri(u,c.TEXTURE_WRAP_T,t.wrapT),l(e._textureFilterAnisotropic)&&c.texParameteri(u,e._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,t.maximumAnisotropy),c.bindTexture(u,null)}rA.prototype.generateMipmap=function(e){e=e??_d.DONT_CARE,this._hasMipmap=!0;let t=this._context._gl,n=this._textureTarget;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(n,this._texture),t.generateMipmap(n),t.bindTexture(n,null)};rA.prototype.isDestroyed=function(){return!1};rA.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),fe(this)};var ER=rA;function vR({x:e,y:t,width:n,height:i}){this.rectangle=new Je(e,t,n,i),this.childNode1=void 0,this.childNode2=void 0,this.index=void 0}function fq({width:e,height:t,borderPadding:n}){this._width=e,this._height=t,this._borderPadding=n,this._root=new vR({x:n,y:n,width:e-2*n,height:t-2*n})}fq.prototype.pack=function(e,{width:t,height:n}){let i=this._findNode(this._root,{width:t,height:n});if(l(i))return i.index=e,i};fq.prototype._findNode=function(e,{width:t,height:n}){if(l(e)){if(!l(e.childNode1)&&!l(e.childNode2)){if(l(e.index))return;let{rectangle:i}=e,o=i.width,r=i.height,a=o-t,s=r-n;if(a<0||s<0)return;if(a===0&&s===0)return e;let c=this._borderPadding;if(a>s){e.childNode1=new vR({x:i.x,y:i.y,width:t,height:r});let f=a-c;return f>0&&(e.childNode2=new vR({x:i.x+t+c,y:i.y,width:f,height:r})),this._findNode(e.childNode1,{width:t,height:n})}e.childNode1=new vR({x:i.x,y:i.y,width:o,height:n});let u=s-c;return u>0&&(e.childNode2=new vR({x:i.x,y:i.y+n+c,width:o,height:u})),this._findNode(e.childNode1,{width:t,height:n})}return this._findNode(e.childNode1,{width:t,height:n})||this._findNode(e.childNode2,{width:t,height:n})}};var RE=fq;var tle=16;function Ll(e){e=e??G.EMPTY_OBJECT;let t=e.borderWidthInPixels??1,n=e.initialSize??new z(tle,tle);this._pixelFormat=e.pixelFormat??Xe.RGBA,this._sampler=e.sampler,this._borderWidthInPixels=t,this._initialSize=n,this._texturePacker=void 0,this._rectangles=[],this._subRegions=new Map,this._guid=jn(),this._imagesToAddQueue=[],this._indexById=new Map,this._indexPromiseById=new Map,this._nextIndex=0}Object.defineProperties(Ll.prototype,{borderWidthInPixels:{get:function(){return this._borderWidthInPixels}},rectangles:{get:function(){return this._rectangles}},texture:{get:function(){return this._texture}},pixelFormat:{get:function(){return this._pixelFormat}},sampler:{get:function(){return this._sampler}},numberOfImages:{get:function(){return this._nextIndex}},guid:{get:function(){return this._guid}},sizeInBytes:{get:function(){return l(this._texture)?this._texture.sizeInBytes:0}}});Ll.prototype.computeTextureCoordinates=function(e,t){let n=this._texture,i=this._rectangles[e];if(l(t)||(t=new Je),!l(i))return t.x=0,t.y=0,t.width=0,t.height=0,t;let o=n.width,r=n.height,a=i.width,s=i.height,c=i.x,u=i.y,f=this._subRegions.get(e);if(l(f)){let d=this._rectangles[f];c+=d.x,u+=d.y}return t.x=c/o,t.y=u/r,t.width=a/o,t.height=s/r,t};Ll.prototype._copyFromTexture=function(e,t,n,i){let o=this._pixelFormat,r=this._sampler,a=new It({context:e,height:n,width:t,pixelFormat:o,sampler:r}),s=e._gl,c=a._textureTarget,u=this._texture,f=new fa({context:e,colorTextures:[u],destroyAttachments:!1});s.activeTexture(s.TEXTURE0),s.bindTexture(c,a._texture),f._bind();let d=this.rectangles,p=this._subRegions;for(let g=0;g<d.length;++g){let m=i[g],A=d[g];if(!l(m)||!l(A)||l(p.get(g)))continue;let{x:y,y:x,width:b,height:C}=m;s.copyTexSubImage2D(c,0,y,x,A.x,A.y,b,C)}return s.bindTexture(c,null),a._initialized=!0,f._unBind(),f.destroy(),a};Ll.prototype._resize=function(e,t=0){let n=this._borderWidthInPixels,i=this._rectangles,o=this._imagesToAddQueue,r=this._texture,a=r.width,s=r.height,c=this._subRegions,u=i.map((y,x)=>new nle({index:x,image:y})).filter((y,x)=>l(y.image)&&!l(c.get(x))),f=0,d=0,p=0;for(let y=t;y<o.length;++y){let{width:x,height:b}=o[y].image;f=Math.max(f,x),d=Math.max(d,b),p+=x*b,u.push(o[y])}for(a=D.nextPowerOfTwo(Math.max(f,a)),s=D.nextPowerOfTwo(Math.max(d,s));p>=a*s;)a>s?s*=2:a*=2;u.sort(({image:y},{image:x})=>x.height*x.width-y.height*y.width);let g=new Array(this._nextIndex);for(let y of this._subRegions.keys())l(c.get(y))&&(g[y]=i[y]);let m,A=!1;for(;!A;){m=new RE({height:s,width:a,borderPadding:n});let y;for(y=0;y<u.length;++y){let{index:x,image:b}=u[y];if(!l(b))continue;let C=m.pack(x,b);if(!l(C)){a>s?s*=2:a*=2;break}g[x]=C.rectangle}A=y===u.length}this._texturePacker=m,this._texture=this._copyFromTexture(e,a,s,g),r.destroy(),this._rectangles=g,this._guid=jn()};Ll.prototype.getImageIndex=function(e){return this._indexById.get(e)};Ll.prototype._copyImageToTexture=function({index:e,image:t,resolve:n,reject:i}){let o=this._texture,r=this._rectangles[e];try{o.copyFrom({source:t,xOffset:r.x,yOffset:r.y}),l(n)&&n(e)}catch(a){if(l(i)){i(a);return}}};function nle({index:e,image:t,resolve:n,reject:i}){this.index=e,this.image=t,this.resolve=n,this.reject=i,this.rectangle=void 0}Ll.prototype._addImage=function(e,t){return new Promise((n,i)=>{this._imagesToAddQueue.push(new nle({index:e,image:t,resolve:n,reject:i})),this._imagesToAddQueue.sort(({image:o},{image:r})=>r.height*r.width-o.height*o.width)})};Ll.prototype._processImageQueue=function(e){let t=this._imagesToAddQueue;if(t.length===0)return!1;this._rectangles.length=this._nextIndex;let n,i;for(n=0;n<t.length;++n){let o=t[n],{image:r,index:a}=o,s=this._texturePacker.pack(a,r);if(!l(s)){try{this._resize(e,n)}catch(c){i=c,l(o.reject)&&o.reject(i)}break}this._rectangles[a]=s.rectangle}if(l(i)){for(n=n+1;n<t.length;++n){let{resolve:o}=t[n];l(o)&&o(-1)}return t.length=0,!1}for(let o=0;o<t.length;++o)this._copyImageToTexture(t[o]);return t.length=0,!0};Ll.prototype.update=function(e){if(!l(this._texture)){let t=this._initialSize.x,n=this._initialSize.y,i=this._pixelFormat,o=this._sampler,r=this._borderWidthInPixels;this._texture=new It({context:e,width:t,height:n,pixelFormat:i,sampler:o}),this._texturePacker=new RE({height:n,width:t,borderPadding:r})}return this._processImageQueue(e)};async function L3e(e,t){return typeof e=="function"&&(e=e(t)),(typeof e=="string"||e instanceof De)&&(e=De.createIfNeeded(e).fetchImage()),e}Ll.prototype.addImage=function(e,t,n,i){let o=this._indexPromiseById.get(e),r=this._indexById.get(e);return l(o)?o:l(r)?r:(r=this._nextIndex++,this._indexById.set(e,r),o=(async()=>{let s=await L3e(t,e);if(this.isDestroyed()||!l(s))return this._indexPromiseById.delete(e),-1;l(n)&&(s.width=n),l(i)&&(s.height=i);let c=await this._addImage(r,s);return this._indexPromiseById.delete(e),c})(),this._indexPromiseById.set(e,o),o)};Ll.prototype.getCachedImageSubRegion=function(e,t,n){let i=this._indexPromiseById.get(e);for(let[o,r]of this._subRegions.entries())if(n===r&&this._rectangles[o].equals(t))return i?i.then(s=>s===-1?-1:o):o};Ll.prototype.addImageSubRegion=function(e,t){let n=this._indexById.get(e);if(!l(n))throw new re(`image with id "${e}" not found in the atlas.`);let i=this.getCachedImageSubRegion(e,t,n);return l(i)?i:(i=this._nextIndex++,this._subRegions.set(i,n),this._rectangles[i]=t.clone(),(this._indexPromiseById.get(e)??Promise.resolve(n)).then(r=>{if(r===-1)return-1;let a=this._rectangles[r];return i}))};Ll.prototype.isDestroyed=function(){return!1};Ll.prototype.destroy=function(){return this._texture=this._texture&&this._texture.destroy(),this._imagesToAddQueue.forEach(({resolve:e})=>{l(e)&&e(-1)}),fe(this)};var Ox=Ll;function Rs(e,t,n,i){let o=Rs._verifyAttributes(t);n=n??0;let r=[],a={},s,c,u=o.length;for(let d=0;d<u;++d){let p=o[d];if(p.vertexBuffer){r.push(p);continue}c=p.usage,s=a[c],l(s)||(s=a[c]=[]),s.push(p)}function f(d,p){return Y.getSizeInBytes(p.componentDatatype)-Y.getSizeInBytes(d.componentDatatype)}this._allBuffers=[];for(c in a)if(a.hasOwnProperty(c)){s=a[c],s.sort(f);let d=Rs._vertexSizeInBytes(s),p=s[0].usage,g={vertexSizeInBytes:d,vertexBuffer:void 0,usage:p,needsCommit:!1,arrayBuffer:void 0,arrayViews:Rs._createArrayViews(s,d)};this._allBuffers.push(g)}this._size=0,this._instanced=i??!1,this._precreated=r,this._context=e,this.writers=void 0,this.va=void 0,this.resize(n)}Rs._verifyAttributes=function(e){let t=[];for(let i=0;i<e.length;++i){let o=e[i],r={index:o.index??i,enabled:o.enabled??!0,componentsPerAttribute:o.componentsPerAttribute,componentDatatype:o.componentDatatype??Y.FLOAT,normalize:o.normalize??!1,vertexBuffer:o.vertexBuffer,usage:o.usage??Oe.STATIC_DRAW};t.push(r)}let n=new Array(t.length);for(let i=0;i<t.length;++i){let r=t[i].index;n[r]=!0}return t};Rs._vertexSizeInBytes=function(e){let t=0,n=e.length;for(let a=0;a<n;++a){let s=e[a];t+=s.componentsPerAttribute*Y.getSizeInBytes(s.componentDatatype)}let i=n>0?Y.getSizeInBytes(e[0].componentDatatype):0,o=i>0?t%i:0,r=o===0?0:i-o;return t+=r,t};Rs._createArrayViews=function(e,t){let n=[],i=0,o=e.length;for(let r=0;r<o;++r){let a=e[r],s=a.componentDatatype;n.push({index:a.index,enabled:a.enabled,componentsPerAttribute:a.componentsPerAttribute,componentDatatype:s,normalize:a.normalize,offsetInBytes:i,vertexSizeInComponentType:t/Y.getSizeInBytes(s),view:void 0}),i+=a.componentsPerAttribute*Y.getSizeInBytes(s)}return n};Rs.prototype.resize=function(e){this._size=e;let t=this._allBuffers;this.writers=[];for(let n=0,i=t.length;n<i;++n){let o=t[n];Rs._resize(o,this._size),Rs._appendWriters(this.writers,o)}dq(this)};Rs._resize=function(e,t){if(e.vertexSizeInBytes>0){let n=new ArrayBuffer(t*e.vertexSizeInBytes);if(l(e.arrayBuffer)){let r=new Uint8Array(n),a=new Uint8Array(e.arrayBuffer),s=a.length;for(let c=0;c<s;++c)r[c]=a[c]}let i=e.arrayViews,o=i.length;for(let r=0;r<o;++r){let a=i[r];a.view=Y.createArrayBufferView(a.componentDatatype,n,a.offsetInBytes)}e.arrayBuffer=n}};var N3e=[function(e,t,n){return function(i,o){t[i*n]=o,e.needsCommit=!0}},function(e,t,n){return function(i,o,r){let a=i*n;t[a]=o,t[a+1]=r,e.needsCommit=!0}},function(e,t,n){return function(i,o,r,a){let s=i*n;t[s]=o,t[s+1]=r,t[s+2]=a,e.needsCommit=!0}},function(e,t,n){return function(i,o,r,a,s){let c=i*n;t[c]=o,t[c+1]=r,t[c+2]=a,t[c+3]=s,e.needsCommit=!0}}];Rs._appendWriters=function(e,t){let n=t.arrayViews,i=n.length;for(let o=0;o<i;++o){let r=n[o];e[r.index]=N3e[r.componentsPerAttribute-1](t,r.view,r.vertexSizeInComponentType)}};Rs.prototype.commit=function(e){let t=!1,n=this._allBuffers,i,o,r;for(o=0,r=n.length;o<r;++o)i=n[o],t=F3e(this,i)||t;if(t||!l(this.va)){dq(this);let a=this.va=[],s=D.SIXTY_FOUR_KILOBYTES-4,c=l(e)&&!this._instanced?Math.ceil(this._size/s):1;for(let u=0;u<c;++u){let f=[];for(o=0,r=n.length;o<r;++o){i=n[o];let d=u*(i.vertexSizeInBytes*s);Rs._appendAttributes(f,i,d,this._instanced)}f=f.concat(this._precreated),a.push({va:new Fn({context:this._context,attributes:f,indexBuffer:e}),indicesCount:1.5*(u!==c-1?s:this._size%s)})}}};function F3e(e,t){if(t.needsCommit&&t.vertexSizeInBytes>0){t.needsCommit=!1;let n=t.vertexBuffer,i=e._size*t.vertexSizeInBytes,o=l(n);if(!o||n.sizeInBytes<i)return o&&n.destroy(),t.vertexBuffer=Ke.createVertexBuffer({context:e._context,typedArray:t.arrayBuffer,usage:t.usage}),t.vertexBuffer.vertexArrayDestroyable=!1,!0;t.vertexBuffer.copyFromArrayView(t.arrayBuffer)}return!1}Rs._appendAttributes=function(e,t,n,i){let o=t.arrayViews,r=o.length;for(let a=0;a<r;++a){let s=o[a];e.push({index:s.index,enabled:s.enabled,componentsPerAttribute:s.componentsPerAttribute,componentDatatype:s.componentDatatype,normalize:s.normalize,vertexBuffer:t.vertexBuffer,offsetInBytes:n+s.offsetInBytes,strideInBytes:t.vertexSizeInBytes,instanceDivisor:i?1:0})}};Rs.prototype.subCommit=function(e,t){let n=this._allBuffers;for(let i=0,o=n.length;i<o;++i)k3e(n[i],e,t)};function k3e(e,t,n){if(e.needsCommit&&e.vertexSizeInBytes>0){let i=e.vertexSizeInBytes*t,o=e.vertexSizeInBytes*n;e.vertexBuffer.copyFromArrayView(new Uint8Array(e.arrayBuffer,i,o),i)}}Rs.prototype.endSubCommits=function(){let e=this._allBuffers;for(let t=0,n=e.length;t<n;++t)e[t].needsCommit=!1};function dq(e){let t=e.va;if(!l(t))return;let n=t.length;for(let i=0;i<n;++i)t[i].va.destroy();e.va=void 0}Rs.prototype.isDestroyed=function(){return!1};Rs.prototype.destroy=function(){let e=this._allBuffers;for(let t=0,n=e.length;t<n;++t){let i=e[t];i.vertexBuffer=i.vertexBuffer&&i.vertexBuffer.destroy()}return dq(this),fe(this)};var j0=Rs;function z3e(e,t,n){let i={flipY:!0,skipColorSpaceConversion:n,preferImageBitmap:!0},o=[De.createIfNeeded(t.positiveX).fetchImage(i),De.createIfNeeded(t.negativeX).fetchImage(i),De.createIfNeeded(t.positiveY).fetchImage(i),De.createIfNeeded(t.negativeY).fetchImage(i),De.createIfNeeded(t.positiveZ).fetchImage(i),De.createIfNeeded(t.negativeZ).fetchImage(i)];return Promise.all(o).then(function(r){return new $r({context:e,source:{positiveX:r[0],negativeX:r[1],positiveY:r[2],negativeY:r[3],positiveZ:r[4],negativeZ:r[5]}})})}var SR=z3e;function aA(e){this._value=void 0,this._hasClone=!1,this._hasEquals=!1,this._definitionChanged=new ye,this.setValue(e)}Object.defineProperties(aA.prototype,{isConstant:{value:!0},definitionChanged:{get:function(){return this._definitionChanged}}});aA.prototype.getValue=function(e,t){return this._hasClone?this._value.clone(t):this._value};aA.prototype.setValue=function(e){let t=this._value;if(t!==e){let n=l(e),i=n&&typeof e.clone=="function",o=n&&typeof e.equals=="function";(!o||!e.equals(t))&&(this._hasClone=i,this._hasEquals=o,this._value=i?e.clone(this._value):e,this._definitionChanged.raiseEvent(this))}};aA.prototype.equals=function(e){return this===e||e instanceof aA&&(!this._hasEquals&&this._value===e._value||this._hasEquals&&this._value.equals(e._value))};aA.prototype.valueOf=function(){return this._value};aA.prototype.toString=function(){return String(this._value)};var ci=aA;function U3e(e,t,n,i,o){return{configurable:i,get:function(){return this[t]},set:function(r){let a=this[t],s=this[n];l(s)&&(s(),this[n]=void 0),r!==void 0&&(!l(r)||!l(r.getValue))&&l(o)&&(r=o(r)),a!==r&&(this[t]=r,this._definitionChanged.raiseEvent(this,e,r,a)),l(r)&&l(r.definitionChanged)&&(this[n]=r.definitionChanged.addEventListener(function(){this._definitionChanged.raiseEvent(this,e,r,r)},this))}}}function V3e(e){return new ci(e)}function j3e(e,t,n){return U3e(e,`_${e.toString()}`,`_${e.toString()}Subscription`,t??!1,n??V3e)}var pe=j3e;function wR(e){this._definitionChanged=new ye,this._show=void 0,this._showSubscription=void 0,this._image=void 0,this._imageSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this._pixelOffset=void 0,this._pixelOffsetSubscription=void 0,this._eyeOffset=void 0,this._eyeOffsetSubscription=void 0,this._horizontalOrigin=void 0,this._horizontalOriginSubscription=void 0,this._verticalOrigin=void 0,this._verticalOriginSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._alignedAxis=void 0,this._alignedAxisSubscription=void 0,this._sizeInMeters=void 0,this._sizeInMetersSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._scaleByDistance=void 0,this._scaleByDistanceSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._pixelOffsetScaleByDistance=void 0,this._pixelOffsetScaleByDistanceSubscription=void 0,this._imageSubRegion=void 0,this._imageSubRegionSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._disableDepthTestDistance=void 0,this._disableDepthTestDistanceSubscription=void 0,this._splitDirection=void 0,this._splitDirectionSubscription=void 0,this.merge(e??G.EMPTY_OBJECT)}Object.defineProperties(wR.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:pe("show"),image:pe("image"),scale:pe("scale"),pixelOffset:pe("pixelOffset"),eyeOffset:pe("eyeOffset"),horizontalOrigin:pe("horizontalOrigin"),verticalOrigin:pe("verticalOrigin"),heightReference:pe("heightReference"),color:pe("color"),rotation:pe("rotation"),alignedAxis:pe("alignedAxis"),sizeInMeters:pe("sizeInMeters"),width:pe("width"),height:pe("height"),scaleByDistance:pe("scaleByDistance"),translucencyByDistance:pe("translucencyByDistance"),pixelOffsetScaleByDistance:pe("pixelOffsetScaleByDistance"),imageSubRegion:pe("imageSubRegion"),distanceDisplayCondition:pe("distanceDisplayCondition"),disableDepthTestDistance:pe("disableDepthTestDistance"),splitDirection:pe("splitDirection")});wR.prototype.clone=function(e){return l(e)?(e.show=this._show,e.image=this._image,e.scale=this._scale,e.pixelOffset=this._pixelOffset,e.eyeOffset=this._eyeOffset,e.horizontalOrigin=this._horizontalOrigin,e.verticalOrigin=this._verticalOrigin,e.heightReference=this._heightReference,e.color=this._color,e.rotation=this._rotation,e.alignedAxis=this._alignedAxis,e.sizeInMeters=this._sizeInMeters,e.width=this._width,e.height=this._height,e.scaleByDistance=this._scaleByDistance,e.translucencyByDistance=this._translucencyByDistance,e.pixelOffsetScaleByDistance=this._pixelOffsetScaleByDistance,e.imageSubRegion=this._imageSubRegion,e.distanceDisplayCondition=this._distanceDisplayCondition,e.disableDepthTestDistance=this._disableDepthTestDistance,e.splitDirection=this._splitDirection,e):new wR(this)};wR.prototype.merge=function(e){this.show=this._show??e.show,this.image=this._image??e.image,this.scale=this._scale??e.scale,this.pixelOffset=this._pixelOffset??e.pixelOffset,this.eyeOffset=this._eyeOffset??e.eyeOffset,this.horizontalOrigin=this._horizontalOrigin??e.horizontalOrigin,this.verticalOrigin=this._verticalOrigin??e.verticalOrigin,this.heightReference=this._heightReference??e.heightReference,this.color=this._color??e.color,this.rotation=this._rotation??e.rotation,this.alignedAxis=this._alignedAxis??e.alignedAxis,this.sizeInMeters=this._sizeInMeters??e.sizeInMeters,this.width=this._width??e.width,this.height=this._height??e.height,this.scaleByDistance=this._scaleByDistance??e.scaleByDistance,this.translucencyByDistance=this._translucencyByDistance??e.translucencyByDistance,this.pixelOffsetScaleByDistance=this._pixelOffsetScaleByDistance??e.pixelOffsetScaleByDistance,this.imageSubRegion=this._imageSubRegion??e.imageSubRegion,this.distanceDisplayCondition=this._distanceDisplayCondition??e.distanceDisplayCondition,this.disableDepthTestDistance=this._disableDepthTestDistance??e.disableDepthTestDistance,this.splitDirection=this.splitDirection??e.splitDirection};var Jc=wR;var hq=class{constructor(){this._array=[],this._hash={}}get length(){return this._array.length}get values(){return this._array}contains(t){return l(this._hash[t])}set(t,n){let i=this._hash[t];n!==i&&(this.remove(t),this._hash[t]=n,this._array.push(n))}get(t){return this._hash[t]}remove(t){let n=this._hash[t],i=l(n);if(i){let o=this._array;o.splice(o.indexOf(n),1),delete this._hash[t]}return i}removeAll(){let t=this._array;t.length>0&&(this._hash={},t.length=0)}},Lt=hq;function pf(e,t){e=e??0,this._near=e,t=t??Number.MAX_VALUE,this._far=t}Object.defineProperties(pf.prototype,{near:{get:function(){return this._near},set:function(e){this._near=e}},far:{get:function(){return this._far},set:function(e){this._far=e}}});pf.packedLength=2;pf.pack=function(e,t,n){return n=n??0,t[n++]=e.near,t[n]=e.far,t};pf.unpack=function(e,t,n){return t=t??0,l(n)||(n=new pf),n.near=e[t++],n.far=e[t],n};pf.equals=function(e,t){return e===t||l(e)&&l(t)&&e.near===t.near&&e.far===t.far};pf.clone=function(e,t){if(l(e))return l(t)||(t=new pf),t.near=e.near,t.far=e.far,t};pf.prototype.clone=function(e){return pf.clone(this,e)};pf.prototype.equals=function(e){return pf.equals(this,e)};var kt=pf;function xd(e,t,n,i){this.near=e??0,this.nearValue=t??0,this.far=n??1,this.farValue=i??0}xd.clone=function(e,t){if(l(e))return l(t)?(t.near=e.near,t.nearValue=e.nearValue,t.far=e.far,t.farValue=e.farValue,t):new xd(e.near,e.nearValue,e.far,e.farValue)};xd.packedLength=4;xd.pack=function(e,t,n){return n=n??0,t[n++]=e.near,t[n++]=e.nearValue,t[n++]=e.far,t[n]=e.farValue,t};xd.unpack=function(e,t,n){return t=t??0,l(n)||(n=new xd),n.near=e[t++],n.nearValue=e[t++],n.far=e[t++],n.farValue=e[t],n};xd.equals=function(e,t){return e===t||l(e)&&l(t)&&e.near===t.near&&e.nearValue===t.nearValue&&e.far===t.far&&e.farValue===t.farValue};xd.prototype.clone=function(e){return xd.clone(this,e)};xd.prototype.equals=function(e){return xd.equals(this,e)};var zt=xd;var sA={NONE:0,CLAMP_TO_GROUND:1,RELATIVE_TO_GROUND:2,CLAMP_TO_TERRAIN:3,RELATIVE_TO_TERRAIN:4,CLAMP_TO_3D_TILE:5,RELATIVE_TO_3D_TILE:6};Object.freeze(sA);var nt=sA;function bd(e){return e===sA.CLAMP_TO_GROUND||e===sA.CLAMP_TO_3D_TILE||e===sA.CLAMP_TO_TERRAIN}function OE(e){return e===sA.RELATIVE_TO_GROUND||e===sA.RELATIVE_TO_3D_TILE||e===sA.RELATIVE_TO_TERRAIN}var ile={CENTER:0,LEFT:1,RIGHT:-1};Object.freeze(ile);var Oi=ile;var ole={CENTER:0,BOTTOM:1,BASELINE:2,TOP:-1};Object.freeze(ole);var zn=ole;var G3e=Object.freeze({DONE:0,PENDING:1,FAILED:2}),bt=G3e;function Lh(){_e.throwInstantiationError()}Object.defineProperties(Lh.prototype,{isConstant:{get:_e.throwInstantiationError},definitionChanged:{get:_e.throwInstantiationError}});Lh.prototype.getValue=_e.throwInstantiationError;Lh.prototype.equals=_e.throwInstantiationError;Lh.equals=function(e,t){return e===t||l(e)&&e.equals(t)};Lh.arrayEquals=function(e,t){if(e===t)return!0;if(!l(e)||!l(t)||e.length!==t.length)return!1;let n=e.length;for(let i=0;i<n;i++)if(!Lh.equals(e[i],t[i]))return!1;return!0};Lh.isConstant=function(e){return!l(e)||e.isConstant};Lh.getValueOrUndefined=function(e,t,n){return l(e)?e.getValue(t,n):void 0};Lh.getValueOrDefault=function(e,t,n,i){return l(e)?e.getValue(t,i)??n:n};Lh.getValueOrClonedDefault=function(e,t,n,i){let o;return l(e)&&(o=e.getValue(t,i)),l(o)||(o=n.clone(o)),o};var X=Lh;var rle={LEFT:-1,NONE:0,RIGHT:1};Object.freeze(rle);var Or=rle;var H3e=V.WHITE,W3e=h.ZERO,q3e=nt.NONE,Y3e=z.ZERO,X3e=1,K3e=0,Q3e=h.ZERO,$3e=Oi.CENTER,J3e=zn.CENTER,Z3e=!1,eze=Or.NONE,tze=new h,nze=new V,ize=new h,oze=new z,rze=new zt,aze=new zt,sze=new zt,cze=new Je,lze=new kt;function ale(e){this.entity=e,this.billboard=void 0,this.textureValue=void 0}function cA(e,t){t.collectionChanged.addEventListener(cA.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new Lt,this._onCollectionChanged(t,t.values,[],[])}cA.prototype.update=function(e){let t=this._items.values,n=this._cluster;for(let i=0,o=t.length;i<o;i++){let r=t[i],a=r.entity,s=a._billboard,c,u=r.billboard,f=a.isShowing&&a.isAvailable(e)&&X.getValueOrDefault(s._show,e,!0),d;if(f&&(d=X.getValueOrUndefined(a._position,e,tze),c=X.getValueOrUndefined(s._image,e),f=l(d)&&l(c)),!f){mq(r,a,n);continue}X.isConstant(a._position)||(n._clusterDirty=!0),l(u)||(u=n.getBillboard(a),u.id=a,r.billboard=u,r.textureValue=void 0),u.show=f,u.position=d,u.color=X.getValueOrDefault(s._color,e,H3e,nze),u.eyeOffset=X.getValueOrDefault(s._eyeOffset,e,W3e,ize),u.heightReference=X.getValueOrDefault(s._heightReference,e,q3e),u.pixelOffset=X.getValueOrDefault(s._pixelOffset,e,Y3e,oze),u.scale=X.getValueOrDefault(s._scale,e,X3e),u.rotation=X.getValueOrDefault(s._rotation,e,K3e),u.alignedAxis=X.getValueOrDefault(s._alignedAxis,e,Q3e),u.horizontalOrigin=X.getValueOrDefault(s._horizontalOrigin,e,$3e),u.verticalOrigin=X.getValueOrDefault(s._verticalOrigin,e,J3e),u.width=X.getValueOrUndefined(s._width,e),u.height=X.getValueOrUndefined(s._height,e),u.scaleByDistance=X.getValueOrUndefined(s._scaleByDistance,e,rze),u.translucencyByDistance=X.getValueOrUndefined(s._translucencyByDistance,e,aze),u.pixelOffsetScaleByDistance=X.getValueOrUndefined(s._pixelOffsetScaleByDistance,e,sze),u.sizeInMeters=X.getValueOrDefault(s._sizeInMeters,e,Z3e),u.distanceDisplayCondition=X.getValueOrUndefined(s._distanceDisplayCondition,e,lze),u.disableDepthTestDistance=X.getValueOrUndefined(s._disableDepthTestDistance,e),u.splitDirection=X.getValueOrDefault(s._splitDirection,e,eze),r.textureValue!==c&&(u.image=c,r.textureValue=c);let p=X.getValueOrUndefined(s._imageSubRegion,e,cze);l(p)&&u.setImageSubRegion(u.image,p)}return!0};cA.prototype.getBoundingSphere=function(e,t){let n=this._items.get(e.id);if(!l(n)||!l(n.billboard))return bt.FAILED;let i=n.billboard;if(i.heightReference===nt.NONE)t.center=h.clone(i.position,t.center);else{if(!l(i._clampedPosition))return bt.PENDING;t.center=h.clone(i._clampedPosition,t.center)}return t.radius=0,bt.DONE};cA.prototype.isDestroyed=function(){return!1};cA.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(cA.prototype._onCollectionChanged,this);let e=this._entityCollection.values;for(let t=0;t<e.length;t++)this._cluster.removeBillboard(e[t]);return fe(this)};cA.prototype._onCollectionChanged=function(e,t,n,i){let o,r,a=this._items,s=this._cluster;for(o=t.length-1;o>-1;o--)r=t[o],l(r._billboard)&&l(r._position)&&a.set(r.id,new ale(r));for(o=i.length-1;o>-1;o--)r=i[o],l(r._billboard)&&l(r._position)?a.contains(r.id)||a.set(r.id,new ale(r)):(mq(a.get(r.id),r,s),a.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],mq(a.get(r.id),r,s),a.remove(r.id)};function mq(e,t,n){l(e)&&(e.billboard=void 0,n.removeBillboard(t))}var IR=cA;var uze=new h;function dp(e){e=e??G.EMPTY_OBJECT;let t=e.minimum,n=e.maximum;this._min=h.clone(t),this._max=h.clone(n),this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxOutlineGeometry"}dp.fromDimensions=function(e){e=e??G.EMPTY_OBJECT;let t=e.dimensions,n=h.multiplyByScalar(t,.5,new h);return new dp({minimum:h.negate(n,new h),maximum:n,offsetAttribute:e.offsetAttribute})};dp.fromAxisAlignedBoundingBox=function(e){return new dp({minimum:e.minimum,maximum:e.maximum})};dp.packedLength=2*h.packedLength+1;dp.pack=function(e,t,n){return n=n??0,h.pack(e._min,t,n),h.pack(e._max,t,n+h.packedLength),t[n+h.packedLength*2]=e._offsetAttribute??-1,t};var cle=new h,lle=new h,sle={minimum:cle,maximum:lle,offsetAttribute:void 0};dp.unpack=function(e,t,n){t=t??0;let i=h.unpack(e,t,cle),o=h.unpack(e,t+h.packedLength,lle),r=e[t+h.packedLength*2];return l(n)?(n._min=h.clone(i,n._min),n._max=h.clone(o,n._max),n._offsetAttribute=r===-1?void 0:r,n):(sle.offsetAttribute=r===-1?void 0:r,new dp(sle))};dp.createGeometry=function(e){let t=e._min,n=e._max;if(h.equals(t,n))return;let i=new pn,o=new Uint16Array(24),r=new Float64Array(24);r[0]=t.x,r[1]=t.y,r[2]=t.z,r[3]=n.x,r[4]=t.y,r[5]=t.z,r[6]=n.x,r[7]=n.y,r[8]=t.z,r[9]=t.x,r[10]=n.y,r[11]=t.z,r[12]=t.x,r[13]=t.y,r[14]=n.z,r[15]=n.x,r[16]=t.y,r[17]=n.z,r[18]=n.x,r[19]=n.y,r[20]=n.z,r[21]=t.x,r[22]=n.y,r[23]=n.z,i.position=new Me({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:r}),o[0]=4,o[1]=5,o[2]=5,o[3]=6,o[4]=6,o[5]=7,o[6]=7,o[7]=4,o[8]=0,o[9]=1,o[10]=1,o[11]=2,o[12]=2,o[13]=3,o[14]=3,o[15]=0,o[16]=0,o[17]=4,o[18]=1,o[19]=5,o[20]=2,o[21]=6,o[22]=3,o[23]=7;let a=h.subtract(n,t,uze),s=h.magnitude(a)*.5;if(l(e._offsetAttribute)){let c=r.length,u=e._offsetAttribute===ln.NONE?0:1,f=new Uint8Array(c/3).fill(u);i.applyOffset=new Me({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:f})}return new At({attributes:i,indices:o,primitiveType:Re.LINES,boundingSphere:new ce(h.ZERO,s),offsetAttribute:e._offsetAttribute})};var Nh=dp;function ME(e,t,n,i){e=e??1,t=t??1,n=n??1,i=i??1,this.value=new Uint8Array([V.floatToByte(e),V.floatToByte(t),V.floatToByte(n),V.floatToByte(i)])}Object.defineProperties(ME.prototype,{componentDatatype:{get:function(){return Y.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 4}},normalize:{get:function(){return!0}}});ME.fromColor=function(e){return new ME(e.red,e.green,e.blue,e.alpha)};ME.toValue=function(e,t){return l(t)?e.toBytes(t):new Uint8Array(e.toBytes())};ME.equals=function(e,t){return e===t||l(e)&&l(t)&&e.value[0]===t.value[0]&&e.value[1]===t.value[1]&&e.value[2]===t.value[2]&&e.value[3]===t.value[3]};var Yt=ME;function DR(e,t){e=e??0,t=t??Number.MAX_VALUE,this.value=new Float32Array([e,t])}Object.defineProperties(DR.prototype,{componentDatatype:{get:function(){return Y.FLOAT}},componentsPerAttribute:{get:function(){return 2}},normalize:{get:function(){return!1}}});DR.fromDistanceDisplayCondition=function(e){return new DR(e.near,e.far)};DR.toValue=function(e,t){return l(t)?(t[0]=e.near,t[1]=e.far,t):new Float32Array([e.near,e.far])};var Hn=DR;function fze(e){e=e??G.EMPTY_OBJECT,this.geometry=e.geometry,this.modelMatrix=M.clone(e.modelMatrix??M.IDENTITY),this.id=e.id,this.pickPrimitive=e.pickPrimitive,this.attributes=e.attributes??{},this.westHemisphereGeometry=void 0,this.eastHemisphereGeometry=void 0}var Ot=fze;function xr(e){e=e??G.EMPTY_OBJECT,this.start=l(e.start)?Q.clone(e.start):new Q,this.stop=l(e.stop)?Q.clone(e.stop):new Q,this.data=e.data,this.isStartIncluded=e.isStartIncluded??!0,this.isStopIncluded=e.isStopIncluded??!0}Object.defineProperties(xr.prototype,{isEmpty:{get:function(){let e=Q.compare(this.stop,this.start);return e<0||e===0&&(!this.isStartIncluded||!this.isStopIncluded)}}});var BE={start:void 0,stop:void 0,isStartIncluded:void 0,isStopIncluded:void 0,data:void 0};xr.fromIso8601=function(e,t){let n=e.iso8601.split("/");if(n.length!==2)throw new _e("options.iso8601 is an invalid ISO 8601 interval.");let i=Q.fromIso8601(n[0]),o=Q.fromIso8601(n[1]),r=e.isStartIncluded??!0,a=e.isStopIncluded??!0,s=e.data;return l(t)?(t.start=i,t.stop=o,t.isStartIncluded=r,t.isStopIncluded=a,t.data=s,t):(BE.start=i,BE.stop=o,BE.isStartIncluded=r,BE.isStopIncluded=a,BE.data=s,new xr(BE))};xr.toIso8601=function(e,t){return`${Q.toIso8601(e.start,t)}/${Q.toIso8601(e.stop,t)}`};xr.clone=function(e,t){if(l(e))return l(t)?(t.start=e.start,t.stop=e.stop,t.isStartIncluded=e.isStartIncluded,t.isStopIncluded=e.isStopIncluded,t.data=e.data,t):new xr(e)};xr.equals=function(e,t,n){return e===t||l(e)&&l(t)&&(e.isEmpty&&t.isEmpty||e.isStartIncluded===t.isStartIncluded&&e.isStopIncluded===t.isStopIncluded&&Q.equals(e.start,t.start)&&Q.equals(e.stop,t.stop)&&(e.data===t.data||l(n)&&n(e.data,t.data)))};xr.equalsEpsilon=function(e,t,n,i){return n=n??0,e===t||l(e)&&l(t)&&(e.isEmpty&&t.isEmpty||e.isStartIncluded===t.isStartIncluded&&e.isStopIncluded===t.isStopIncluded&&Q.equalsEpsilon(e.start,t.start,n)&&Q.equalsEpsilon(e.stop,t.stop,n)&&(e.data===t.data||l(i)&&i(e.data,t.data)))};xr.intersect=function(e,t,n,i){if(!l(t))return xr.clone(xr.EMPTY,n);let o=e.start,r=e.stop,a=t.start,s=t.stop,c=Q.greaterThanOrEquals(a,o)&&Q.greaterThanOrEquals(r,a),u=!c&&Q.lessThanOrEquals(a,o)&&Q.lessThanOrEquals(o,s);if(!c&&!u)return xr.clone(xr.EMPTY,n);let f=e.isStartIncluded,d=e.isStopIncluded,p=t.isStartIncluded,g=t.isStopIncluded,m=Q.lessThan(r,s);return l(n)||(n=new xr),n.start=c?a:o,n.isStartIncluded=f&&p||!Q.equals(a,o)&&(c&&p||u&&f),n.stop=m?r:s,n.isStopIncluded=m?d:d&&g||!Q.equals(s,r)&&g,n.data=l(i)?i(e.data,t.data):e.data,n};xr.contains=function(e,t){if(e.isEmpty)return!1;let n=Q.compare(e.start,t);if(n===0)return e.isStartIncluded;let i=Q.compare(t,e.stop);return i===0?e.isStopIncluded:n<0&&i<0};xr.prototype.clone=function(e){return xr.clone(this,e)};xr.prototype.equals=function(e,t){return xr.equals(this,e,t)};xr.prototype.equalsEpsilon=function(e,t,n){return xr.equalsEpsilon(this,e,t,n)};xr.prototype.toString=function(){return xr.toIso8601(this)};xr.EMPTY=Object.freeze(new xr({start:new Q,stop:new Q,isStartIncluded:!1,isStopIncluded:!1}));var wn=xr;var ule=Object.freeze(Q.fromIso8601("0000-01-01T00:00:00Z")),fle=Object.freeze(Q.fromIso8601("9999-12-31T24:00:00Z")),dze=Object.freeze(new wn({start:ule,stop:fle})),hze={MINIMUM_VALUE:ule,MAXIMUM_VALUE:fle,MAXIMUM_INTERVAL:dze},Qe=hze;function PR(e,t,n){e=e??0,t=t??0,n=n??0,this.value=new Float32Array([e,t,n])}Object.defineProperties(PR.prototype,{componentDatatype:{get:function(){return Y.FLOAT}},componentsPerAttribute:{get:function(){return 3}},normalize:{get:function(){return!1}}});PR.fromCartesian3=function(e){return new PR(e.x,e.y,e.z)};PR.toValue=function(e,t){return l(t)||(t=new Float32Array([e.x,e.y,e.z])),t[0]=e.x,t[1]=e.y,t[2]=e.z,t};var po=PR;function O8(e){e=e??!0,this.value=O8.toValue(e)}Object.defineProperties(O8.prototype,{componentDatatype:{get:function(){return Y.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 1}},normalize:{get:function(){return!1}}});O8.toValue=function(e,t){return l(t)?(t[0]=e,t):new Uint8Array([e])};var En=O8;var RR=`in vec3 v_positionEC;
- in vec3 v_normalEC;
- in vec3 v_tangentEC;
- in vec3 v_bitangentEC;
- in vec2 v_st;
-
- void main()
- {
- vec3 positionToEyeEC = -v_positionEC;
- mat3 tangentToEyeMatrix = czm_tangentToEyeSpaceMatrix(v_normalEC, v_tangentEC, v_bitangentEC);
-
- vec3 normalEC = normalize(v_normalEC);
- #ifdef FACE_FORWARD
- normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);
- #endif
-
- czm_materialInput materialInput;
- materialInput.normalEC = normalEC;
- materialInput.tangentToEyeMatrix = tangentToEyeMatrix;
- materialInput.positionToEyeEC = positionToEyeEC;
- materialInput.st = v_st;
- czm_material material = czm_getMaterial(materialInput);
-
- #ifdef FLAT
- out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
- #else
- out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
- #endif
- }
- `;var OR=`in vec3 position3DHigh;
- in vec3 position3DLow;
- in vec3 normal;
- in vec3 tangent;
- in vec3 bitangent;
- in vec2 st;
- in float batchId;
-
- out vec3 v_positionEC;
- out vec3 v_normalEC;
- out vec3 v_tangentEC;
- out vec3 v_bitangentEC;
- out vec2 v_st;
-
- void main()
- {
- vec4 p = czm_computePosition();
-
- v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates
- v_normalEC = czm_normal * normal; // normal in eye coordinates
- v_tangentEC = czm_normal * tangent; // tangent in eye coordinates
- v_bitangentEC = czm_normal * bitangent; // bitangent in eye coordinates
- v_st = st;
-
- gl_Position = czm_modelViewProjectionRelativeToEye * p;
- }
- `;var MR=`in vec3 v_positionEC;
- in vec3 v_normalEC;
-
- void main()
- {
- vec3 positionToEyeEC = -v_positionEC;
-
- vec3 normalEC = normalize(v_normalEC);
- #ifdef FACE_FORWARD
- normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);
- #endif
-
- czm_materialInput materialInput;
- materialInput.normalEC = normalEC;
- materialInput.positionToEyeEC = positionToEyeEC;
- czm_material material = czm_getMaterial(materialInput);
-
- #ifdef FLAT
- out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
- #else
- out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
- #endif
- }
- `;var BR=`in vec3 position3DHigh;
- in vec3 position3DLow;
- in vec3 normal;
- in float batchId;
-
- out vec3 v_positionEC;
- out vec3 v_normalEC;
-
- void main()
- {
- vec4 p = czm_computePosition();
-
- v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates
- v_normalEC = czm_normal * normal; // normal in eye coordinates
-
- gl_Position = czm_modelViewProjectionRelativeToEye * p;
- }
- `;var LR=`in vec3 v_positionEC;
- in vec3 v_normalEC;
- in vec2 v_st;
-
- void main()
- {
- vec3 positionToEyeEC = -v_positionEC;
-
- vec3 normalEC = normalize(v_normalEC);
- #ifdef FACE_FORWARD
- normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);
- #endif
-
- czm_materialInput materialInput;
- materialInput.normalEC = normalEC;
- materialInput.positionToEyeEC = positionToEyeEC;
- materialInput.st = v_st;
- czm_material material = czm_getMaterial(materialInput);
-
- #ifdef FLAT
- out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
- #else
- out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
- #endif
- }
- `;var NR=`in vec3 position3DHigh;
- in vec3 position3DLow;
- in vec3 normal;
- in vec2 st;
- in float batchId;
-
- out vec3 v_positionEC;
- out vec3 v_normalEC;
- out vec2 v_st;
-
- void main()
- {
- vec4 p = czm_computePosition();
-
- v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates
- v_normalEC = czm_normal * normal; // normal in eye coordinates
- v_st = st;
-
- gl_Position = czm_modelViewProjectionRelativeToEye * p;
- }
- `;var dle={ADD:ee.FUNC_ADD,SUBTRACT:ee.FUNC_SUBTRACT,REVERSE_SUBTRACT:ee.FUNC_REVERSE_SUBTRACT,MIN:ee.MIN,MAX:ee.MAX};Object.freeze(dle);var Sc=dle;var hle={ZERO:ee.ZERO,ONE:ee.ONE,SOURCE_COLOR:ee.SRC_COLOR,ONE_MINUS_SOURCE_COLOR:ee.ONE_MINUS_SRC_COLOR,DESTINATION_COLOR:ee.DST_COLOR,ONE_MINUS_DESTINATION_COLOR:ee.ONE_MINUS_DST_COLOR,SOURCE_ALPHA:ee.SRC_ALPHA,ONE_MINUS_SOURCE_ALPHA:ee.ONE_MINUS_SRC_ALPHA,DESTINATION_ALPHA:ee.DST_ALPHA,ONE_MINUS_DESTINATION_ALPHA:ee.ONE_MINUS_DST_ALPHA,CONSTANT_COLOR:ee.CONSTANT_COLOR,ONE_MINUS_CONSTANT_COLOR:ee.ONE_MINUS_CONSTANT_COLOR,CONSTANT_ALPHA:ee.CONSTANT_ALPHA,ONE_MINUS_CONSTANT_ALPHA:ee.ONE_MINUS_CONSTANT_ALPHA,SOURCE_ALPHA_SATURATE:ee.SRC_ALPHA_SATURATE};Object.freeze(hle);var Vo=hle;var mle={DISABLED:Object.freeze({enabled:!1}),ALPHA_BLEND:Object.freeze({enabled:!0,equationRgb:Sc.ADD,equationAlpha:Sc.ADD,functionSourceRgb:Vo.SOURCE_ALPHA,functionSourceAlpha:Vo.ONE,functionDestinationRgb:Vo.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:Vo.ONE_MINUS_SOURCE_ALPHA}),PRE_MULTIPLIED_ALPHA_BLEND:Object.freeze({enabled:!0,equationRgb:Sc.ADD,equationAlpha:Sc.ADD,functionSourceRgb:Vo.ONE,functionSourceAlpha:Vo.ONE,functionDestinationRgb:Vo.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:Vo.ONE_MINUS_SOURCE_ALPHA}),ADDITIVE_BLEND:Object.freeze({enabled:!0,equationRgb:Sc.ADD,equationAlpha:Sc.ADD,functionSourceRgb:Vo.SOURCE_ALPHA,functionSourceAlpha:Vo.ONE,functionDestinationRgb:Vo.ONE,functionDestinationAlpha:Vo.ONE})};Object.freeze(mle);var Jt=mle;var ple={FRONT:ee.FRONT,BACK:ee.BACK,FRONT_AND_BACK:ee.FRONT_AND_BACK};Object.freeze(ple);var Mi=ple;function LE(e){e=e??G.EMPTY_OBJECT,this.material=e.material,this.translucent=e.translucent??!0,this._vertexShaderSource=e.vertexShaderSource,this._fragmentShaderSource=e.fragmentShaderSource,this._renderState=e.renderState,this._closed=e.closed??!1}Object.defineProperties(LE.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}}});LE.prototype.getFragmentShaderSource=function(){let e=[];return this.flat&&e.push("#define FLAT"),this.faceForward&&e.push("#define FACE_FORWARD"),l(this.material)&&e.push(this.material.shaderSource),e.push(this.fragmentShaderSource),e.join(`
- `)};LE.prototype.isTranslucent=function(){return l(this.material)&&this.material.isTranslucent()||!l(this.material)&&this.translucent};LE.prototype.getRenderState=function(){let e=this.isTranslucent(),t=We(this.renderState,!1);return e?(t.depthMask=!1,t.blending=Jt.ALPHA_BLEND):t.depthMask=!0,t};LE.getDefaultRenderState=function(e,t,n){let i={depthTest:{enabled:!0}};return e&&(i.depthMask=!1,i.blending=Jt.ALPHA_BLEND),t&&(i.cull={enabled:!0,face:Mi.BACK}),l(n)&&(i=wt(n,i,!0)),i};var yo=LE;var FR=`uniform sampler2D image;
-
- czm_material czm_getMaterial(czm_materialInput materialInput)
- {
- czm_material material = czm_getDefaultMaterial(materialInput);
- vec4 rampColor = texture(image, vec2(materialInput.aspect / (2.0 * czm_pi), 0.5));
- rampColor = czm_gammaCorrect(rampColor);
- material.diffuse = rampColor.rgb;
- material.alpha = rampColor.a;
- return material;
- }
- `;var kR=`uniform sampler2D image;
- uniform float strength;
- uniform vec2 repeat;
-
- czm_material czm_getMaterial(czm_materialInput materialInput)
- {
- czm_material material = czm_getDefaultMaterial(materialInput);
-
- vec2 st = materialInput.st;
-
- vec2 centerPixel = fract(repeat * st);
- float centerBump = texture(image, centerPixel).channel;
-
- float imageWidth = float(imageDimensions.x);
- vec2 rightPixel = fract(repeat * (st + vec2(1.0 / imageWidth, 0.0)));
- float rightBump = texture(image, rightPixel).channel;
-
- float imageHeight = float(imageDimensions.y);
- vec2 leftPixel = fract(repeat * (st + vec2(0.0, 1.0 / imageHeight)));
- float topBump = texture(image, leftPixel).channel;
-
- vec3 normalTangentSpace = normalize(vec3(centerBump - rightBump, centerBump - topBump, clamp(1.0 - strength, 0.1, 1.0)));
- vec3 normalEC = materialInput.tangentToEyeMatrix * normalTangentSpace;
-
- material.normal = normalEC;
- material.diffuse = vec3(0.01);
-
- return material;
- }
- `;var zR=`uniform vec4 lightColor;
- uniform vec4 darkColor;
- uniform vec2 repeat;
-
- czm_material czm_getMaterial(czm_materialInput materialInput)
- {
- czm_material material = czm_getDefaultMaterial(materialInput);
-
- vec2 st = materialInput.st;
-
- // From Stefan Gustavson's Procedural Textures in GLSL in OpenGL Insights
- float b = mod(floor(repeat.s * st.s) + floor(repeat.t * st.t), 2.0); // 0.0 or 1.0
-
- // Find the distance from the closest separator (region between two colors)
- float scaledWidth = fract(repeat.s * st.s);
- scaledWidth = abs(scaledWidth - floor(scaledWidth + 0.5));
- float scaledHeight = fract(repeat.t * st.t);
- scaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));
- float value = min(scaledWidth, scaledHeight);
-
- vec4 currentColor = mix(lightColor, darkColor, b);
- vec4 color = czm_antialias(lightColor, darkColor, currentColor, value, 0.03);
-
- color = czm_gammaCorrect(color);
- material.diffuse = color.rgb;
- material.alpha = color.a;
-
- return material;
- }
- `;var UR=`uniform vec4 lightColor;
- uniform vec4 darkColor;
- uniform vec2 repeat;
-
- czm_material czm_getMaterial(czm_materialInput materialInput)
- {
- czm_material material = czm_getDefaultMaterial(materialInput);
-
- // From Stefan Gustavson's Procedural Textures in GLSL in OpenGL Insights
- float b = smoothstep(0.3, 0.32, length(fract(repeat * materialInput.st) - 0.5)); // 0.0 or 1.0
-
- vec4 color = mix(lightColor, darkColor, b);
- color = czm_gammaCorrect(color);
- material.diffuse = color.rgb;
- material.alpha = color.a;
-
- return material;
- }
- `;var VR=`uniform sampler2D heights;
- uniform sampler2D colors;
-
- // This material expects heights to be sorted from lowest to highest.
-
- float getHeight(int idx, float invTexSize)
- {
- vec2 uv = vec2((float(idx) + 0.5) * invTexSize, 0.5);
- #ifdef OES_texture_float
- return texture(heights, uv).x;
- #else
- return czm_unpackFloat(texture(heights, uv));
- #endif
- }
-
- czm_material czm_getMaterial(czm_materialInput materialInput)
- {
- czm_material material = czm_getDefaultMaterial(materialInput);
-
- float height = materialInput.height;
- float invTexSize = 1.0 / float(heightsDimensions.x);
-
- float minHeight = getHeight(0, invTexSize);
- float maxHeight = getHeight(heightsDimensions.x - 1, invTexSize);
-
- // early-out when outside the height range
- if (height < minHeight || height > maxHeight) {
- material.diffuse = vec3(0.0);
- material.alpha = 0.0;
- return material;
- }
-
- // Binary search to find heights above and below.
- int idxBelow = 0;
- int idxAbove = heightsDimensions.x;
- float heightBelow = minHeight;
- float heightAbove = maxHeight;
-
- // while loop not allowed, so use for loop with max iterations.
- // maxIterations of 16 supports a texture size up to 65536 (2^16).
- const int maxIterations = 16;
- for (int i = 0; i < maxIterations; i++) {
- if (idxBelow >= idxAbove - 1) {
- break;
- }
-
- int idxMid = (idxBelow + idxAbove) / 2;
- float heightTex = getHeight(idxMid, invTexSize);
-
- if (height > heightTex) {
- idxBelow = idxMid;
- heightBelow = heightTex;
- } else {
- idxAbove = idxMid;
- heightAbove = heightTex;
- }
- }
-
- float lerper = heightBelow == heightAbove ? 1.0 : (height - heightBelow) / (heightAbove - heightBelow);
- vec2 colorUv = vec2(invTexSize * (float(idxBelow) + 0.5 + lerper), 0.5);
- vec4 color = texture(colors, colorUv);
-
- // undo preumultiplied alpha
- if (color.a > 0.0)
- {
- color.rgb /= color.a;
- }
-
- color.rgb = czm_gammaCorrect(color.rgb);
-
- material.diffuse = color.rgb;
- material.alpha = color.a;
- return material;
- }
- `;var jR=`uniform vec4 color;
- uniform float spacing;
- uniform float width;
-
- czm_material czm_getMaterial(czm_materialInput materialInput)
- {
- czm_material material = czm_getDefaultMaterial(materialInput);
-
- float distanceToContour = mod(materialInput.height, spacing);
-
- #if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))
- float dxc = abs(dFdx(materialInput.height));
- float dyc = abs(dFdy(materialInput.height));
- float dF = max(dxc, dyc) * czm_pixelRatio * width;
- float alpha = (distanceToContour < dF) ? 1.0 : 0.0;
- #else
- // If no derivatives available (IE 10?), use pixel ratio
- float alpha = (distanceToContour < (czm_pixelRatio * width)) ? 1.0 : 0.0;
- #endif
-
- vec4 outColor = czm_gammaCorrect(vec4(color.rgb, alpha * color.a));
- material.diffuse = outColor.rgb;
- material.alpha = outColor.a;
-
- return material;
- }
- `;var GR=`uniform sampler2D image;
- uniform float minimumHeight;
- uniform float maximumHeight;
-
- czm_material czm_getMaterial(czm_materialInput materialInput)
- {
- czm_material material = czm_getDefaultMaterial(materialInput);
- float scaledHeight = clamp((materialInput.height - minimumHeight) / (maximumHeight - minimumHeight), 0.0, 1.0);
- vec4 rampColor = texture(image, vec2(scaledHeight, 0.5));
- rampColor = czm_gammaCorrect(rampColor);
- material.diffuse = rampColor.rgb;
- material.alpha = rampColor.a;
- return material;
- }
- `;var HR=`uniform vec4 fadeInColor;
- uniform vec4 fadeOutColor;
- uniform float maximumDistance;
- uniform bool repeat;
- uniform vec2 fadeDirection;
- uniform vec2 time;
-
- float getTime(float t, float coord)
- {
- float scalar = 1.0 / maximumDistance;
- float q = distance(t, coord) * scalar;
- if (repeat)
- {
- float r = distance(t, coord + 1.0) * scalar;
- float s = distance(t, coord - 1.0) * scalar;
- q = min(min(r, s), q);
- }
- return clamp(q, 0.0, 1.0);
- }
-
- czm_material czm_getMaterial(czm_materialInput materialInput)
- {
- czm_material material = czm_getDefaultMaterial(materialInput);
-
- vec2 st = materialInput.st;
- float s = getTime(time.x, st.s) * fadeDirection.s;
- float t = getTime(time.y, st.t) * fadeDirection.t;
-
- float u = length(vec2(s, t));
- vec4 color = mix(fadeInColor, fadeOutColor, u);
-
- color = czm_gammaCorrect(color);
- material.emission = color.rgb;
- material.alpha = color.a;
-
- return material;
- }
- `;var WR=`uniform vec4 color;
- uniform float cellAlpha;
- uniform vec2 lineCount;
- uniform vec2 lineThickness;
- uniform vec2 lineOffset;
-
- czm_material czm_getMaterial(czm_materialInput materialInput)
- {
- czm_material material = czm_getDefaultMaterial(materialInput);
-
- vec2 st = materialInput.st;
-
- float scaledWidth = fract(lineCount.s * st.s - lineOffset.s);
- scaledWidth = abs(scaledWidth - floor(scaledWidth + 0.5));
- float scaledHeight = fract(lineCount.t * st.t - lineOffset.t);
- scaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));
-
- float value;
-
- // Fuzz Factor - Controls blurriness of lines
- #if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))
- const float fuzz = 1.2;
- vec2 thickness = (lineThickness * czm_pixelRatio) - 1.0;
-
- // From "3D Engine Design for Virtual Globes" by Cozzi and Ring, Listing 4.13.
- vec2 dx = abs(dFdx(st));
- vec2 dy = abs(dFdy(st));
- vec2 dF = vec2(max(dx.s, dy.s), max(dx.t, dy.t)) * lineCount;
- value = min(
- smoothstep(dF.s * thickness.s, dF.s * (fuzz + thickness.s), scaledWidth),
- smoothstep(dF.t * thickness.t, dF.t * (fuzz + thickness.t), scaledHeight));
- #else
- // If no derivatives available (IE 10?), revert to view-dependent fuzz
- const float fuzz = 0.05;
-
- vec2 range = 0.5 - (lineThickness * 0.05);
- value = min(
- 1.0 - smoothstep(range.s, range.s + fuzz, scaledWidth),
- 1.0 - smoothstep(range.t, range.t + fuzz, scaledHeight));
- #endif
-
- // Edges taken from RimLightingMaterial.glsl
- // See http://www.fundza.com/rman_shaders/surface/fake_rim/fake_rim1.html
- float dRim = 1.0 - abs(dot(materialInput.normalEC, normalize(materialInput.positionToEyeEC)));
- float sRim = smoothstep(0.8, 1.0, dRim);
- value *= (1.0 - sRim);
-
- vec4 halfColor;
- halfColor.rgb = color.rgb * 0.5;
- halfColor.a = color.a * (1.0 - ((1.0 - cellAlpha) * value));
- halfColor = czm_gammaCorrect(halfColor);
- material.diffuse = halfColor.rgb;
- material.emission = halfColor.rgb;
- material.alpha = halfColor.a;
-
- return material;
- }
- `;var qR=`uniform sampler2D image;
- uniform float strength;
- uniform vec2 repeat;
-
- czm_material czm_getMaterial(czm_materialInput materialInput)
- {
- czm_material material = czm_getDefaultMaterial(materialInput);
-
- vec4 textureValue = texture(image, fract(repeat * materialInput.st));
- vec3 normalTangentSpace = textureValue.channels;
- normalTangentSpace.xy = normalTangentSpace.xy * 2.0 - 1.0;
- normalTangentSpace.z = clamp(1.0 - strength, 0.1, 1.0);
- normalTangentSpace = normalize(normalTangentSpace);
- vec3 normalEC = materialInput.tangentToEyeMatrix * normalTangentSpace;
-
- material.normal = normalEC;
-
- return material;
- }
- `;var YR=`uniform vec4 color;
-
- float getPointOnLine(vec2 p0, vec2 p1, float x)
- {
- float slope = (p0.y - p1.y) / (p0.x - p1.x);
- return slope * (x - p0.x) + p0.y;
- }
-
- czm_material czm_getMaterial(czm_materialInput materialInput)
- {
- czm_material material = czm_getDefaultMaterial(materialInput);
-
- vec2 st = materialInput.st;
-
- #if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))
- float base = 1.0 - abs(fwidth(st.s)) * 10.0 * czm_pixelRatio;
- #else
- // If no derivatives available (IE 10?), 2.5% of the line will be the arrow head
- float base = 0.975;
- #endif
-
- vec2 center = vec2(1.0, 0.5);
- float ptOnUpperLine = getPointOnLine(vec2(base, 1.0), center, st.s);
- float ptOnLowerLine = getPointOnLine(vec2(base, 0.0), center, st.s);
-
- float halfWidth = 0.15;
- float s = step(0.5 - halfWidth, st.t);
- s *= 1.0 - step(0.5 + halfWidth, st.t);
- s *= 1.0 - step(base, st.s);
-
- float t = step(base, materialInput.st.s);
- t *= 1.0 - step(ptOnUpperLine, st.t);
- t *= step(ptOnLowerLine, st.t);
-
- // Find the distance from the closest separator (region between two colors)
- float dist;
- if (st.s < base)
- {
- float d1 = abs(st.t - (0.5 - halfWidth));
- float d2 = abs(st.t - (0.5 + halfWidth));
- dist = min(d1, d2);
- }
- else
- {
- float d1 = czm_infinity;
- if (st.t < 0.5 - halfWidth && st.t > 0.5 + halfWidth)
- {
- d1 = abs(st.s - base);
- }
- float d2 = abs(st.t - ptOnUpperLine);
- float d3 = abs(st.t - ptOnLowerLine);
- dist = min(min(d1, d2), d3);
- }
-
- vec4 outsideColor = vec4(0.0);
- vec4 currentColor = mix(outsideColor, color, clamp(s + t, 0.0, 1.0));
- vec4 outColor = czm_antialias(outsideColor, color, currentColor, dist);
-
- outColor = czm_gammaCorrect(outColor);
- material.diffuse = outColor.rgb;
- material.alpha = outColor.a;
- return material;
- }
- `;var XR=`uniform vec4 color;
- uniform vec4 gapColor;
- uniform float dashLength;
- uniform float dashPattern;
- in float v_polylineAngle;
-
- const float maskLength = 16.0;
-
- mat2 rotate(float rad) {
- float c = cos(rad);
- float s = sin(rad);
- return mat2(
- c, s,
- -s, c
- );
- }
-
- czm_material czm_getMaterial(czm_materialInput materialInput)
- {
- czm_material material = czm_getDefaultMaterial(materialInput);
-
- vec2 pos = rotate(v_polylineAngle) * gl_FragCoord.xy;
-
- // Get the relative position within the dash from 0 to 1
- float dashPosition = fract(pos.x / (dashLength * czm_pixelRatio));
- // Figure out the mask index.
- float maskIndex = floor(dashPosition * maskLength);
- // Test the bit mask.
- float maskTest = floor(dashPattern / pow(2.0, maskIndex));
- vec4 fragColor = (mod(maskTest, 2.0) < 1.0) ? gapColor : color;
- if (fragColor.a < 0.005) { // matches 0/255 and 1/255
- discard;
- }
-
- fragColor = czm_gammaCorrect(fragColor);
- material.emission = fragColor.rgb;
- material.alpha = fragColor.a;
- return material;
- }
- `;var KR=`uniform vec4 color;
- uniform float glowPower;
- uniform float taperPower;
-
- czm_material czm_getMaterial(czm_materialInput materialInput)
- {
- czm_material material = czm_getDefaultMaterial(materialInput);
-
- vec2 st = materialInput.st;
- float glow = glowPower / abs(st.t - 0.5) - (glowPower / 0.5);
-
- if (taperPower <= 0.99999) {
- glow *= min(1.0, taperPower / (0.5 - st.s * 0.5) - (taperPower / 0.5));
- }
-
- vec4 fragColor;
- fragColor.rgb = max(vec3(glow - 1.0 + color.rgb), color.rgb);
- fragColor.a = clamp(0.0, 1.0, glow) * color.a;
- fragColor = czm_gammaCorrect(fragColor);
-
- material.emission = fragColor.rgb;
- material.alpha = fragColor.a;
-
- return material;
- }
- `;var QR=`uniform vec4 color;
- uniform vec4 outlineColor;
- uniform float outlineWidth;
-
- in float v_width;
-
- czm_material czm_getMaterial(czm_materialInput materialInput)
- {
- czm_material material = czm_getDefaultMaterial(materialInput);
-
- vec2 st = materialInput.st;
- float halfInteriorWidth = 0.5 * (v_width - outlineWidth) / v_width;
- float b = step(0.5 - halfInteriorWidth, st.t);
- b *= 1.0 - step(0.5 + halfInteriorWidth, st.t);
-
- // Find the distance from the closest separator (region between two colors)
- float d1 = abs(st.t - (0.5 - halfInteriorWidth));
- float d2 = abs(st.t - (0.5 + halfInteriorWidth));
- float dist = min(d1, d2);
-
- vec4 currentColor = mix(outlineColor, color, b);
- vec4 outColor = czm_antialias(outlineColor, color, currentColor, dist);
- outColor = czm_gammaCorrect(outColor);
-
- material.diffuse = outColor.rgb;
- material.alpha = outColor.a;
-
- return material;
- }
- `;var $R=`uniform vec4 color;
- uniform vec4 rimColor;
- uniform float width;
-
- czm_material czm_getMaterial(czm_materialInput materialInput)
- {
- czm_material material = czm_getDefaultMaterial(materialInput);
-
- // See http://www.fundza.com/rman_shaders/surface/fake_rim/fake_rim1.html
- float d = 1.0 - dot(materialInput.normalEC, normalize(materialInput.positionToEyeEC));
- float s = smoothstep(1.0 - width, 1.0, d);
-
- vec4 outColor = czm_gammaCorrect(color);
- vec4 outRimColor = czm_gammaCorrect(rimColor);
-
- material.diffuse = outColor.rgb;
- material.emission = outRimColor.rgb * s;
- material.alpha = mix(outColor.a, outRimColor.a, s);
-
- return material;
- }
- `;var JR=`uniform sampler2D image;
-
- czm_material czm_getMaterial(czm_materialInput materialInput)
- {
- czm_material material = czm_getDefaultMaterial(materialInput);
- vec4 rampColor = texture(image, vec2(materialInput.slope / (czm_pi / 2.0), 0.5));
- rampColor = czm_gammaCorrect(rampColor);
- material.diffuse = rampColor.rgb;
- material.alpha = rampColor.a;
- return material;
- }
- `;var ZR=`uniform vec4 evenColor;
- uniform vec4 oddColor;
- uniform float offset;
- uniform float repeat;
- uniform bool horizontal;
-
- czm_material czm_getMaterial(czm_materialInput materialInput)
- {
- czm_material material = czm_getDefaultMaterial(materialInput);
-
- // Based on the Stripes Fragment Shader in the Orange Book (11.1.2)
- float coord = mix(materialInput.st.s, materialInput.st.t, float(horizontal));
- float value = fract((coord - offset) * (repeat * 0.5));
- float dist = min(value, min(abs(value - 0.5), 1.0 - value));
-
- vec4 currentColor = mix(evenColor, oddColor, step(0.5, value));
- vec4 color = czm_antialias(evenColor, oddColor, currentColor, dist);
- color = czm_gammaCorrect(color);
-
- material.diffuse = color.rgb;
- material.alpha = color.a;
-
- return material;
- }
- `;var eO=`uniform vec4 waterColor;
- uniform vec4 landColor;
-
- czm_material czm_getMaterial(czm_materialInput materialInput)
- {
- czm_material material = czm_getDefaultMaterial(materialInput);
-
- vec4 outColor = mix(landColor, waterColor, materialInput.waterMask);
- outColor = czm_gammaCorrect(outColor);
-
- material.diffuse = outColor.rgb;
- material.alpha = outColor.a;
-
- return material;
- }
- `;var tO=`// Thanks for the contribution Jonas
- // http://29a.ch/2012/7/19/webgl-terrain-rendering-water-fog
-
- uniform sampler2D specularMap;
- uniform sampler2D normalMap;
- uniform vec4 baseWaterColor;
- uniform vec4 blendColor;
- uniform float frequency;
- uniform float animationSpeed;
- uniform float amplitude;
- uniform float specularIntensity;
- uniform float fadeFactor;
-
- czm_material czm_getMaterial(czm_materialInput materialInput)
- {
- czm_material material = czm_getDefaultMaterial(materialInput);
-
- float time = czm_frameNumber * animationSpeed;
-
- // fade is a function of the distance from the fragment and the frequency of the waves
- float fade = max(1.0, (length(materialInput.positionToEyeEC) / 10000000000.0) * frequency * fadeFactor);
-
- float specularMapValue = texture(specularMap, materialInput.st).r;
-
- // note: not using directional motion at this time, just set the angle to 0.0;
- vec4 noise = czm_getWaterNoise(normalMap, materialInput.st * frequency, time, 0.0);
- vec3 normalTangentSpace = noise.xyz * vec3(1.0, 1.0, (1.0 / amplitude));
-
- // fade out the normal perturbation as we move further from the water surface
- normalTangentSpace.xy /= fade;
-
- // attempt to fade out the normal perturbation as we approach non water areas (low specular map value)
- normalTangentSpace = mix(vec3(0.0, 0.0, 50.0), normalTangentSpace, specularMapValue);
-
- normalTangentSpace = normalize(normalTangentSpace);
-
- // get ratios for alignment of the new normal vector with a vector perpendicular to the tangent plane
- float tsPerturbationRatio = clamp(dot(normalTangentSpace, vec3(0.0, 0.0, 1.0)), 0.0, 1.0);
-
- // fade out water effect as specular map value decreases
- material.alpha = mix(blendColor.a, baseWaterColor.a, specularMapValue) * specularMapValue;
-
- // base color is a blend of the water and non-water color based on the value from the specular map
- // may need a uniform blend factor to better control this
- material.diffuse = mix(blendColor.rgb, baseWaterColor.rgb, specularMapValue);
-
- // diffuse highlights are based on how perturbed the normal is
- material.diffuse += (0.1 * tsPerturbationRatio);
-
- material.diffuse = material.diffuse;
-
- material.normal = normalize(materialInput.tangentToEyeMatrix * normalTangentSpace);
-
- material.specular = specularIntensity;
- material.shininess = 10.0;
-
- return material;
- }
- `;function $e(e){this.type=void 0,this.shaderSource=void 0,this.materials=void 0,this.uniforms=void 0,this._uniforms=void 0,this.translucent=void 0,this._minificationFilter=e.minificationFilter??Vt.LINEAR,this._magnificationFilter=e.magnificationFilter??ti.LINEAR,this._strict=void 0,this._template=void 0,this._count=void 0,this._texturePaths={},this._loadedImages=[],this._loadedCubeMaps=[],this._textures={},this._updateFunctions=[],this._defaultTexture=void 0,this._initializationPromises=[],this._initializationError=void 0,mze(e,this),Object.defineProperties(this,{type:{value:this.type,writable:!1},minificationFilter:{get:function(){return this._minificationFilter},set:function(t){this._minificationFilter=t}},magnificationFilter:{get:function(){return this._magnificationFilter},set:function(t){this._magnificationFilter=t}}}),l($e._uniformList[this.type])||($e._uniformList[this.type]=Object.keys(this._uniforms))}$e._uniformList={};$e.fromType=function(e,t){let n=new $e({fabric:{type:e}});if(l(t))for(let i in t)t.hasOwnProperty(i)&&(n.uniforms[i]=t[i]);return n};$e.fromTypeAsync=async function(e,t){let n=[],i=new $e({fabric:{type:e,uniforms:t}});if(Ale(i,n),await Promise.all(n),n.length=0,l(i._initializationError))throw i._initializationError;return i};function Ale(e,t){t.push(...e._initializationPromises);let n=e.materials;for(let i in n)if(n.hasOwnProperty(i)){let o=n[i];Ale(o,t)}}$e.prototype.isTranslucent=function(){if(l(this.translucent))return typeof this.translucent=="function"?this.translucent():this.translucent;let e=!0,t=this._translucentFunctions,n=t.length;for(let i=0;i<n;++i){let o=t[i];if(typeof o=="function"?e=e&&o():e=e&&o,!e)break}return e};$e.prototype.update=function(e){this._defaultTexture=e.defaultTexture;let t,n,i=this._loadedImages,o=i.length;for(t=0;t<o;++t){let c=i[t];n=c.id;let u=c.image,f;Array.isArray(u)&&(f=u.slice(1,u.length).map(function(A){return A.bufferView}),u=u[0]);let d=new jt({minificationFilter:this._minificationFilter,magnificationFilter:this._magnificationFilter}),p;l(u.internalFormat)?p=new It({context:e,pixelFormat:u.internalFormat,width:u.width,height:u.height,source:{arrayBufferView:u.bufferView,mipLevels:f},sampler:d}):p=new It({context:e,source:u,sampler:d});let g=this._textures[n];l(g)&&g!==this._defaultTexture&&g.destroy(),this._textures[n]=p;let m=`${n}Dimensions`;if(this.uniforms.hasOwnProperty(m)){let A=this.uniforms[m];A.x=p._width,A.y=p._height}}i.length=0;let r=this._loadedCubeMaps;for(o=r.length,t=0;t<o;++t){let c=r[t];n=c.id;let u=c.images,f=new $r({context:e,source:{positiveX:u[0],negativeX:u[1],positiveY:u[2],negativeY:u[3],positiveZ:u[4],negativeZ:u[5]},sampler:new jt({minificationFilter:this._minificationFilter,magnificationFilter:this._magnificationFilter})});this._textures[n]=f}r.length=0;let a=this._updateFunctions;for(o=a.length,t=0;t<o;++t)a[t](this,e);let s=this.materials;for(let c in s)s.hasOwnProperty(c)&&s[c].update(e)};$e.prototype.isDestroyed=function(){return!1};$e.prototype.destroy=function(){let e=this._textures;for(let n in e)if(e.hasOwnProperty(n)){let i=e[n];i!==this._defaultTexture&&i.destroy()}let t=this.materials;for(let n in t)t.hasOwnProperty(n)&&t[n].destroy();return fe(this)};function mze(e,t){e=e??G.EMPTY_OBJECT,t._strict=e.strict??!1,t._count=e.count??0,t._template=We(e.fabric??G.EMPTY_OBJECT),t.fabric=We(e.fabric??G.EMPTY_OBJECT),t._template.uniforms=We(t._template.uniforms??G.EMPTY_OBJECT),t._template.materials=We(t._template.materials??G.EMPTY_OBJECT),t.type=l(t._template.type)?t._template.type:jn(),t.shaderSource="",t.materials={},t.uniforms={},t._uniforms={},t._translucentFunctions=[];let n,i=$e._materialCache.getMaterial(t.type);if(l(i)){let r=We(i.fabric,!0);t._template=wt(t._template,r,!0),n=i.translucent}Aze(t),xze(t),Eze(t),Sze(t),l(i)||$e._materialCache.addMaterial(t.type,t);let o=t._translucentFunctions.length===0?!0:void 0;if(n=n??o,n=e.translucent??n,l(n))if(typeof n=="function"){let r=function(){return n(t)};t._translucentFunctions.push(r)}else t._translucentFunctions.push(n)}function pq(e,t,n,i){if(l(e)){for(let o in e)if(e.hasOwnProperty(o)){let r=t.indexOf(o)!==-1;(i&&!r||!i&&r)&&n(o,t)}}}function gle(e,t){}function pze(e,t){}var gze=["type","materials","uniforms","components","source"],_ze=["diffuse","specular","shininess","normal","emission","alpha"];function Aze(e){let t=e._template,n=t.uniforms,i=t.materials,o=t.components;pq(t,gze,gle,!0),pq(o,_ze,gle,!0);let r=[];for(let a in i)i.hasOwnProperty(a)&&r.push(a);pq(n,r,pze,!1)}function yze(e,t){let n=t._template.materials;for(let i in n)if(n.hasOwnProperty(i)&&e.indexOf(i)>-1)return!0;return!1}function xze(e){let t=e._template.components,n=e._template.source;if(l(n))e.shaderSource+=`${n}
- `;else{if(e.shaderSource+=`czm_material czm_getMaterial(czm_materialInput materialInput)
- {
- `,e.shaderSource+=`czm_material material = czm_getDefaultMaterial(materialInput);
- `,l(t)){let i=Object.keys(e._template.materials).length>0;for(let o in t)if(t.hasOwnProperty(o))if(o==="diffuse"||o==="emission"){let a=i&&yze(t[o],e)?t[o]:`czm_gammaCorrect(${t[o]})`;e.shaderSource+=`material.${o} = ${a};
- `}else o==="alpha"?e.shaderSource+=`material.alpha = ${t.alpha};
- `:e.shaderSource+=`material.${o} = ${t[o]};
- `}e.shaderSource+=`return material;
- }
- `}}var _le={mat2:Gi,mat3:$,mat4:M},bze=/\.ktx2$/i;function Cze(e){let t;return function(n,i){let o=n.uniforms,r=o[e],a=t!==r,s=!l(r)||r===$e.DefaultImageId;t=r;let c=n._textures[e],u,f;if(r instanceof HTMLVideoElement){if(r.readyState>=2){if(a&&l(c)&&(c!==i.defaultTexture&&c.destroy(),c=void 0),!l(c)||c===i.defaultTexture){let d=new jt({minificationFilter:n._minificationFilter,magnificationFilter:n._magnificationFilter});c=new It({context:i,source:r,sampler:d}),n._textures[e]=c;return}c.copyFrom({source:r})}else l(c)||(n._textures[e]=i.defaultTexture);return}if(r instanceof It&&r!==c){n._texturePaths[e]=void 0;let d=n._textures[e];l(d)&&d!==n._defaultTexture&&d.destroy(),n._textures[e]=r,u=`${e}Dimensions`,o.hasOwnProperty(u)&&(f=o[u],f.x=r._width,f.y=r._height);return}if(a&&l(c)&&s&&(c!==n._defaultTexture&&c.destroy(),c=void 0,n._texturePaths[e]=void 0),l(c)||(c=n._textures[e]=n._defaultTexture,u=`${e}Dimensions`,o.hasOwnProperty(u)&&(f=o[u],f.x=c._width,f.y=c._height)),!s){if((r instanceof HTMLCanvasElement||r instanceof HTMLImageElement||r instanceof ImageBitmap||r instanceof OffscreenCanvas)&&r!==n._texturePaths[e]){n._loadedImages.push({id:e,image:r}),n._texturePaths[e]=r;return}yle(n,e)}}}function yle(e,t){let i=e.uniforms[t];if(i===$e.DefaultImageId)return Promise.resolve();let o=De.createIfNeeded(i);if(!(o instanceof De))return Promise.resolve();let r=De.createIfNeeded(e._texturePaths[t]);if(!(!l(r)||r.url!==o.url))return Promise.resolve();let s;return bze.test(o.url)?s=Cu(o.url):s=o.fetchImage(),Promise.resolve(s).then(function(c){e._loadedImages.push({id:t,image:c})}).catch(function(c){e._initializationError=c;let u=e._textures[t];l(u)&&u!==e._defaultTexture&&u.destroy(),e._textures[t]=e._defaultTexture}),e._texturePaths[t]=i,s}function Tze(e){return function(t,n){let i=t.uniforms[e];if(i instanceof $r){let o=t._textures[e];o!==t._defaultTexture&&o.destroy(),t._texturePaths[e]=void 0,t._textures[e]=i;return}l(t._textures[e])||(t._textures[e]=n.defaultCubeMap),xle(t,e)}}function xle(e,t){let i=e.uniforms[t];if(i===$e.DefaultCubeMapId)return Promise.resolve();let o=i.positiveX+i.negativeX+i.positiveY+i.negativeY+i.positiveZ+i.negativeZ;if(o===e._texturePaths[t])return Promise.resolve();let r=[De.createIfNeeded(i.positiveX).fetchImage(),De.createIfNeeded(i.negativeX).fetchImage(),De.createIfNeeded(i.positiveY).fetchImage(),De.createIfNeeded(i.negativeY).fetchImage(),De.createIfNeeded(i.positiveZ).fetchImage(),De.createIfNeeded(i.negativeZ).fetchImage()],a=Promise.all(r);return a.then(function(s){e._loadedCubeMaps.push({id:t,images:s})}).catch(function(s){e._initializationError=s}),e._texturePaths[t]=o,a}function Eze(e){let t=e._template.uniforms;for(let n in t)t.hasOwnProperty(n)&&ble(e,n)}function ble(e,t){let n=e._strict,i=e._template.uniforms,o=i[t],r=vze(o),a;if(r==="channels")a=nO(e,t,o,!1);else{if(r==="sampler2D"){let u=`${t}Dimensions`;wze(e,u)>0&&(i[u]={type:"ivec3",x:1,y:1},ble(e,u))}if(!new RegExp(`uniform\\s+${r}\\s+${t}\\s*;`).test(e.shaderSource)){let u=`uniform ${r} ${t};`;e.shaderSource=u+e.shaderSource}let c=`${t}_${e._count++}`;if(a=nO(e,t,c),e.uniforms[t]=o,r==="sampler2D")e._uniforms[c]=function(){return e._textures[t]},e._updateFunctions.push(Cze(t)),e._initializationPromises.push(yle(e,t));else if(r==="samplerCube")e._uniforms[c]=function(){return e._textures[t]},e._updateFunctions.push(Tze(t)),e._initializationPromises.push(xle(e,t));else if(r.indexOf("mat")!==-1){let u=new _le[r];e._uniforms[c]=function(){return _le[r].fromColumnMajorArray(e.uniforms[t],u)}}else e._uniforms[c]=function(){return e.uniforms[t]}}}function vze(e){let t=e.type;if(!l(t)){let n=typeof e;if(n==="number")t="float";else if(n==="boolean")t="bool";else if(n==="string"||e instanceof De||e instanceof HTMLCanvasElement||e instanceof HTMLImageElement||e instanceof ImageBitmap||e instanceof OffscreenCanvas)/^([rgba]){1,4}$/i.test(e)?t="channels":e===$e.DefaultCubeMapId?t="samplerCube":t="sampler2D";else if(n==="object")if(Array.isArray(e))(e.length===4||e.length===9||e.length===16)&&(t=`mat${Math.sqrt(e.length)}`);else{let i=0;for(let o in e)e.hasOwnProperty(o)&&(i+=1);i>=2&&i<=4?t=`vec${i}`:i===6&&(t="samplerCube")}}return t}function Sze(e){let t=e._strict,n=e._template.materials;for(let i in n)if(n.hasOwnProperty(i)){let o=new $e({strict:t,fabric:n[i],count:e._count});e._count=o._count,e._uniforms=wt(e._uniforms,o._uniforms,!0),e.materials[i]=o,e._translucentFunctions=e._translucentFunctions.concat(o._translucentFunctions);let r="czm_getMaterial",a=`${r}_${e._count++}`;nO(o,r,a),e.shaderSource=o.shaderSource+e.shaderSource;let s=`${a}(materialInput)`,c=nO(e,i,s)}}function nO(e,t,n,i){i=i??!0;let o=0,r="([\\w])?",a=`([\\w${i?".":""}])?`,s=new RegExp(a+t+r,"g");return e.shaderSource=e.shaderSource.replace(s,function(c,u,f){return u||f?c:(o+=1,n)}),o}function wze(e,t,n){return nO(e,t,t,n)}$e._materialCache={_materials:{},addMaterial:function(e,t){this._materials[e]=t},getMaterial:function(e){return this._materials[e]}};$e.DefaultImageId="czm_defaultImage";$e.DefaultCubeMapId="czm_defaultCubeMap";$e.ColorType="Color";$e._materialCache.addMaterial($e.ColorType,{fabric:{type:$e.ColorType,uniforms:{color:new V(1,0,0,.5)},components:{diffuse:"color.rgb",alpha:"color.a"}},translucent:function(e){return e.uniforms.color.alpha<1}});$e.ImageType="Image";$e._materialCache.addMaterial($e.ImageType,{fabric:{type:$e.ImageType,uniforms:{image:$e.DefaultImageId,repeat:new z(1,1),color:new V(1,1,1,1)},components:{diffuse:"texture(image, fract(repeat * materialInput.st)).rgb * color.rgb",alpha:"texture(image, fract(repeat * materialInput.st)).a * color.a"}},translucent:function(e){return e.uniforms.color.alpha<1}});$e.DiffuseMapType="DiffuseMap";$e._materialCache.addMaterial($e.DiffuseMapType,{fabric:{type:$e.DiffuseMapType,uniforms:{image:$e.DefaultImageId,channels:"rgb",repeat:new z(1,1)},components:{diffuse:"texture(image, fract(repeat * materialInput.st)).channels"}},translucent:!1});$e.AlphaMapType="AlphaMap";$e._materialCache.addMaterial($e.AlphaMapType,{fabric:{type:$e.AlphaMapType,uniforms:{image:$e.DefaultImageId,channel:"a",repeat:new z(1,1)},components:{alpha:"texture(image, fract(repeat * materialInput.st)).channel"}},translucent:!0});$e.SpecularMapType="SpecularMap";$e._materialCache.addMaterial($e.SpecularMapType,{fabric:{type:$e.SpecularMapType,uniforms:{image:$e.DefaultImageId,channel:"r",repeat:new z(1,1)},components:{specular:"texture(image, fract(repeat * materialInput.st)).channel"}},translucent:!1});$e.EmissionMapType="EmissionMap";$e._materialCache.addMaterial($e.EmissionMapType,{fabric:{type:$e.EmissionMapType,uniforms:{image:$e.DefaultImageId,channels:"rgb",repeat:new z(1,1)},components:{emission:"texture(image, fract(repeat * materialInput.st)).channels"}},translucent:!1});$e.BumpMapType="BumpMap";$e._materialCache.addMaterial($e.BumpMapType,{fabric:{type:$e.BumpMapType,uniforms:{image:$e.DefaultImageId,channel:"r",strength:.8,repeat:new z(1,1)},source:kR},translucent:!1});$e.NormalMapType="NormalMap";$e._materialCache.addMaterial($e.NormalMapType,{fabric:{type:$e.NormalMapType,uniforms:{image:$e.DefaultImageId,channels:"rgb",strength:.8,repeat:new z(1,1)},source:qR},translucent:!1});$e.GridType="Grid";$e._materialCache.addMaterial($e.GridType,{fabric:{type:$e.GridType,uniforms:{color:new V(0,1,0,1),cellAlpha:.1,lineCount:new z(8,8),lineThickness:new z(1,1),lineOffset:new z(0,0)},source:WR},translucent:function(e){let t=e.uniforms;return t.color.alpha<1||t.cellAlpha<1}});$e.StripeType="Stripe";$e._materialCache.addMaterial($e.StripeType,{fabric:{type:$e.StripeType,uniforms:{horizontal:!0,evenColor:new V(1,1,1,.5),oddColor:new V(0,0,1,.5),offset:0,repeat:5},source:ZR},translucent:function(e){let t=e.uniforms;return t.evenColor.alpha<1||t.oddColor.alpha<1}});$e.CheckerboardType="Checkerboard";$e._materialCache.addMaterial($e.CheckerboardType,{fabric:{type:$e.CheckerboardType,uniforms:{lightColor:new V(1,1,1,.5),darkColor:new V(0,0,0,.5),repeat:new z(5,5)},source:zR},translucent:function(e){let t=e.uniforms;return t.lightColor.alpha<1||t.darkColor.alpha<1}});$e.DotType="Dot";$e._materialCache.addMaterial($e.DotType,{fabric:{type:$e.DotType,uniforms:{lightColor:new V(1,1,0,.75),darkColor:new V(0,1,1,.75),repeat:new z(5,5)},source:UR},translucent:function(e){let t=e.uniforms;return t.lightColor.alpha<1||t.darkColor.alpha<1}});$e.WaterType="Water";$e._materialCache.addMaterial($e.WaterType,{fabric:{type:$e.WaterType,uniforms:{baseWaterColor:new V(.2,.3,.6,1),blendColor:new V(0,1,.699,1),specularMap:$e.DefaultImageId,normalMap:$e.DefaultImageId,frequency:10,animationSpeed:.01,amplitude:1,specularIntensity:.5,fadeFactor:1},source:tO},translucent:function(e){let t=e.uniforms;return t.baseWaterColor.alpha<1||t.blendColor.alpha<1}});$e.RimLightingType="RimLighting";$e._materialCache.addMaterial($e.RimLightingType,{fabric:{type:$e.RimLightingType,uniforms:{color:new V(1,0,0,.7),rimColor:new V(1,1,1,.4),width:.3},source:$R},translucent:function(e){let t=e.uniforms;return t.color.alpha<1||t.rimColor.alpha<1}});$e.FadeType="Fade";$e._materialCache.addMaterial($e.FadeType,{fabric:{type:$e.FadeType,uniforms:{fadeInColor:new V(1,0,0,1),fadeOutColor:new V(0,0,0,0),maximumDistance:.5,repeat:!0,fadeDirection:{x:!0,y:!0},time:new z(.5,.5)},source:HR},translucent:function(e){let t=e.uniforms;return t.fadeInColor.alpha<1||t.fadeOutColor.alpha<1}});$e.PolylineArrowType="PolylineArrow";$e._materialCache.addMaterial($e.PolylineArrowType,{fabric:{type:$e.PolylineArrowType,uniforms:{color:new V(1,1,1,1)},source:YR},translucent:!0});$e.PolylineDashType="PolylineDash";$e._materialCache.addMaterial($e.PolylineDashType,{fabric:{type:$e.PolylineDashType,uniforms:{color:new V(1,0,1,1),gapColor:new V(0,0,0,0),dashLength:16,dashPattern:255},source:XR},translucent:!0});$e.PolylineGlowType="PolylineGlow";$e._materialCache.addMaterial($e.PolylineGlowType,{fabric:{type:$e.PolylineGlowType,uniforms:{color:new V(0,.5,1,1),glowPower:.25,taperPower:1},source:KR},translucent:!0});$e.PolylineOutlineType="PolylineOutline";$e._materialCache.addMaterial($e.PolylineOutlineType,{fabric:{type:$e.PolylineOutlineType,uniforms:{color:new V(1,1,1,1),outlineColor:new V(1,0,0,1),outlineWidth:1},source:QR},translucent:function(e){let t=e.uniforms;return t.color.alpha<1||t.outlineColor.alpha<1}});$e.ElevationContourType="ElevationContour";$e._materialCache.addMaterial($e.ElevationContourType,{fabric:{type:$e.ElevationContourType,uniforms:{spacing:100,color:new V(1,0,0,1),width:1},source:jR},translucent:!1});$e.ElevationRampType="ElevationRamp";$e._materialCache.addMaterial($e.ElevationRampType,{fabric:{type:$e.ElevationRampType,uniforms:{image:$e.DefaultImageId,minimumHeight:0,maximumHeight:1e4},source:GR},translucent:!1});$e.SlopeRampMaterialType="SlopeRamp";$e._materialCache.addMaterial($e.SlopeRampMaterialType,{fabric:{type:$e.SlopeRampMaterialType,uniforms:{image:$e.DefaultImageId},source:JR},translucent:!1});$e.AspectRampMaterialType="AspectRamp";$e._materialCache.addMaterial($e.AspectRampMaterialType,{fabric:{type:$e.AspectRampMaterialType,uniforms:{image:$e.DefaultImageId},source:FR},translucent:!1});$e.ElevationBandType="ElevationBand";$e._materialCache.addMaterial($e.ElevationBandType,{fabric:{type:$e.ElevationBandType,uniforms:{heights:$e.DefaultImageId,colors:$e.DefaultImageId},source:VR},translucent:!0});$e.WaterMaskType="WaterMask";$e._materialCache.addMaterial($e.WaterMaskType,{fabric:{type:$e.WaterMaskType,source:eO,uniforms:{waterColor:new V(1,1,1,1),landColor:new V(0,0,0,0)}},translucent:!1});var Hi=$e;function Mx(e){e=e??G.EMPTY_OBJECT;let t=e.translucent??!0,n=e.closed??!1,i=e.materialSupport??Mx.MaterialSupport.TEXTURED;this.material=l(e.material)?e.material:Hi.fromType(Hi.ColorType),this.translucent=t,this._vertexShaderSource=e.vertexShaderSource??i.vertexShaderSource,this._fragmentShaderSource=e.fragmentShaderSource??i.fragmentShaderSource,this._renderState=yo.getDefaultRenderState(t,n,e.renderState),this._closed=n,this._materialSupport=i,this._vertexFormat=i.vertexFormat,this._flat=e.flat??!1,this._faceForward=e.faceForward??!n}Object.defineProperties(Mx.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},materialSupport:{get:function(){return this._materialSupport}},vertexFormat:{get:function(){return this._vertexFormat}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}}});Mx.prototype.getFragmentShaderSource=yo.prototype.getFragmentShaderSource;Mx.prototype.isTranslucent=yo.prototype.isTranslucent;Mx.prototype.getRenderState=yo.prototype.getRenderState;Mx.MaterialSupport={BASIC:Object.freeze({vertexFormat:Ne.POSITION_AND_NORMAL,vertexShaderSource:BR,fragmentShaderSource:MR}),TEXTURED:Object.freeze({vertexFormat:Ne.POSITION_NORMAL_AND_ST,vertexShaderSource:NR,fragmentShaderSource:LR}),ALL:Object.freeze({vertexFormat:Ne.ALL,vertexShaderSource:OR,fragmentShaderSource:RR})};var go=Mx;var iO=`in vec3 v_positionEC;
- in vec3 v_normalEC;
- in vec4 v_color;
-
- void main()
- {
- vec3 positionToEyeEC = -v_positionEC;
-
- vec3 normalEC = normalize(v_normalEC);
- #ifdef FACE_FORWARD
- normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);
- #endif
-
- vec4 color = czm_gammaCorrect(v_color);
-
- czm_materialInput materialInput;
- materialInput.normalEC = normalEC;
- materialInput.positionToEyeEC = positionToEyeEC;
- czm_material material = czm_getDefaultMaterial(materialInput);
- material.diffuse = color.rgb;
- material.alpha = color.a;
-
- out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
- }
- `;var oO=`in vec3 position3DHigh;
- in vec3 position3DLow;
- in vec3 normal;
- in vec4 color;
- in float batchId;
-
- out vec3 v_positionEC;
- out vec3 v_normalEC;
- out vec4 v_color;
-
- void main()
- {
- vec4 p = czm_computePosition();
-
- v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates
- v_normalEC = czm_normal * normal; // normal in eye coordinates
- v_color = color;
-
- gl_Position = czm_modelViewProjectionRelativeToEye * p;
- }
- `;var Bx=`in vec4 v_color;
-
- void main()
- {
- out_FragColor = czm_gammaCorrect(v_color);
- }
- `;var rO=`in vec3 position3DHigh;
- in vec3 position3DLow;
- in vec4 color;
- in float batchId;
-
- out vec4 v_color;
-
- void main()
- {
- vec4 p = czm_computePosition();
-
- v_color = color;
-
- gl_Position = czm_modelViewProjectionRelativeToEye * p;
- }
- `;function G0(e){e=e??G.EMPTY_OBJECT;let t=e.translucent??!0,n=e.closed??!1,i=e.flat??!1,o=i?rO:oO,r=i?Bx:iO,a=i?G0.FLAT_VERTEX_FORMAT:G0.VERTEX_FORMAT;this.material=void 0,this.translucent=t,this._vertexShaderSource=e.vertexShaderSource??o,this._fragmentShaderSource=e.fragmentShaderSource??r,this._renderState=yo.getDefaultRenderState(t,n,e.renderState),this._closed=n,this._vertexFormat=a,this._flat=i,this._faceForward=e.faceForward??!n}Object.defineProperties(G0.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return this._vertexFormat}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}}});G0.VERTEX_FORMAT=Ne.POSITION_AND_NORMAL;G0.FLAT_VERTEX_FORMAT=Ne.POSITION_ONLY;G0.prototype.getFragmentShaderSource=yo.prototype.getFragmentShaderSource;G0.prototype.isTranslucent=yo.prototype.isTranslucent;G0.prototype.getRenderState=yo.prototype.getRenderState;var dn=G0;function NE(e){this._definitionChanged=new ye,this._color=void 0,this._colorSubscription=void 0,this.color=e}Object.defineProperties(NE.prototype,{isConstant:{get:function(){return X.isConstant(this._color)}},definitionChanged:{get:function(){return this._definitionChanged}},color:pe("color")});NE.prototype.getType=function(e){return"Color"};var Ize=new Q;NE.prototype.getValue=function(e,t){return l(e)||(e=Q.now(Ize)),l(t)||(t={}),t.color=X.getValueOrClonedDefault(this._color,e,V.WHITE,t.color),t};NE.prototype.equals=function(e){return this===e||e instanceof NE&&X.equals(this._color,e._color)};var Wt=NE;var gq=class{constructor(t){t=t??G.EMPTY_OBJECT,this._ellipsoid=t.ellipsoid??te.default,this._rectangle=t.rectangle??oe.MAX_VALUE,this._projection=new ji(this._ellipsoid),this._numberOfLevelZeroTilesX=t.numberOfLevelZeroTilesX??2,this._numberOfLevelZeroTilesY=t.numberOfLevelZeroTilesY??1}get ellipsoid(){return this._ellipsoid}get rectangle(){return this._rectangle}get projection(){return this._projection}getNumberOfXTilesAtLevel(t){return this._numberOfLevelZeroTilesX<<t}getNumberOfYTilesAtLevel(t){return this._numberOfLevelZeroTilesY<<t}rectangleToNativeRectangle(t,n){let i=D.toDegrees(t.west),o=D.toDegrees(t.south),r=D.toDegrees(t.east),a=D.toDegrees(t.north);return l(n)?(n.west=i,n.south=o,n.east=r,n.north=a,n):new oe(i,o,r,a)}tileXYToNativeRectangle(t,n,i,o){let r=this.tileXYToRectangle(t,n,i,o);return r.west=D.toDegrees(r.west),r.south=D.toDegrees(r.south),r.east=D.toDegrees(r.east),r.north=D.toDegrees(r.north),r}tileXYToRectangle(t,n,i,o){let r=this._rectangle,a=this.getNumberOfXTilesAtLevel(i),s=this.getNumberOfYTilesAtLevel(i),c=r.width/a,u=t*c+r.west,f=(t+1)*c+r.west,d=r.height/s,p=r.north-n*d,g=r.north-(n+1)*d;return l(o)||(o=new oe(u,g,f,p)),o.west=u,o.south=g,o.east=f,o.north=p,o}positionToTileXY(t,n,i){let o=this._rectangle;if(!oe.contains(o,t))return;let r=this.getNumberOfXTilesAtLevel(n),a=this.getNumberOfYTilesAtLevel(n),s=o.width/r,c=o.height/a,u=t.longitude;o.east<o.west&&(u+=D.TWO_PI);let f=(u-o.west)/s|0;f>=r&&(f=r-1);let d=(o.north-t.latitude)/c|0;return d>=a&&(d=a-1),l(i)?(i.x=f,i.y=d,i):new z(f,d)}},Wi=gq;var Cle=new h,Tle=new h,Ele=new de,_q=new h,Dze=new h,vle=new ce,Pze=new Wi,aO=[new de,new de,new de,new de],sO=new z,Pa={};Pa.initialize=function(){let e=Pa._initPromise;return l(e)||(e=De.fetchJson(Xt("Assets/approximateTerrainHeights.json")).then(function(t){Pa._terrainHeights=t}),Pa._initPromise=e),e};Pa.getMinimumMaximumHeights=function(e,t){t=t??te.default;let n=Sle(e),i=Pa._defaultMinTerrainHeight,o=Pa._defaultMaxTerrainHeight;if(l(n)){let r=`${n.level}-${n.x}-${n.y}`,a=Pa._terrainHeights[r];l(a)&&(i=a[0],o=a[1]),t.cartographicToCartesian(oe.northeast(e,Ele),Cle),t.cartographicToCartesian(oe.southwest(e,Ele),Tle),h.midpoint(Tle,Cle,_q);let s=t.scaleToGeodeticSurface(_q,Dze);if(l(s)){let c=h.distance(_q,s);i=Math.min(i,-c)}else i=Pa._defaultMinTerrainHeight}return i=Math.max(Pa._defaultMinTerrainHeight,i),{minimumTerrainHeight:i,maximumTerrainHeight:o}};Pa.getBoundingSphere=function(e,t){t=t??te.default;let n=Sle(e),i=Pa._defaultMaxTerrainHeight;if(l(n)){let r=`${n.level}-${n.x}-${n.y}`,a=Pa._terrainHeights[r];l(a)&&(i=a[1])}let o=ce.fromRectangle3D(e,t,0);return ce.fromRectangle3D(e,t,i,vle),ce.union(o,vle,o)};function Sle(e){de.fromRadians(e.east,e.north,0,aO[0]),de.fromRadians(e.west,e.north,0,aO[1]),de.fromRadians(e.east,e.south,0,aO[2]),de.fromRadians(e.west,e.south,0,aO[3]);let t=0,n=0,i=0,o=0,r=Pa._terrainHeightsMaxLevel,a;for(a=0;a<=r;++a){let s=!1;for(let c=0;c<4;++c){let u=aO[c];if(Pze.positionToTileXY(u,a,sO),c===0)i=sO.x,o=sO.y;else if(i!==sO.x||o!==sO.y){s=!0;break}}if(s)break;t=i,n=o}if(a!==0)return{x:t,y:n,level:a>r?r:a-1}}Pa._terrainHeightsMaxLevel=6;Pa._defaultMaxTerrainHeight=9e3;Pa._defaultMinTerrainHeight=-1e5;Pa._terrainHeights=void 0;Pa._initPromise=void 0;Object.defineProperties(Pa,{initialized:{get:function(){return l(Pa._terrainHeights)}}});var vi=Pa;function ec(e,t,n){this.minimum=h.clone(e??h.ZERO),this.maximum=h.clone(t??h.ZERO),l(n)?n=h.clone(n):n=h.midpoint(this.minimum,this.maximum,new h),this.center=n}ec.fromCorners=function(e,t,n){return l(n)||(n=new ec),n.minimum=h.clone(e,n.minimum),n.maximum=h.clone(t,n.maximum),n.center=h.midpoint(e,t,n.center),n};ec.fromPoints=function(e,t){if(l(t)||(t=new ec),!l(e)||e.length===0)return t.minimum=h.clone(h.ZERO,t.minimum),t.maximum=h.clone(h.ZERO,t.maximum),t.center=h.clone(h.ZERO,t.center),t;let n=e[0].x,i=e[0].y,o=e[0].z,r=e[0].x,a=e[0].y,s=e[0].z,c=e.length;for(let d=1;d<c;d++){let p=e[d],g=p.x,m=p.y,A=p.z;n=Math.min(g,n),r=Math.max(g,r),i=Math.min(m,i),a=Math.max(m,a),o=Math.min(A,o),s=Math.max(A,s)}let u=t.minimum;u.x=n,u.y=i,u.z=o;let f=t.maximum;return f.x=r,f.y=a,f.z=s,t.center=h.midpoint(u,f,t.center),t};ec.clone=function(e,t){if(l(e))return l(t)?(t.minimum=h.clone(e.minimum,t.minimum),t.maximum=h.clone(e.maximum,t.maximum),t.center=h.clone(e.center,t.center),t):new ec(e.minimum,e.maximum,e.center)};ec.equals=function(e,t){return e===t||l(e)&&l(t)&&h.equals(e.center,t.center)&&h.equals(e.minimum,t.minimum)&&h.equals(e.maximum,t.maximum)};var M8=new h;ec.intersectPlane=function(e,t){M8=h.subtract(e.maximum,e.minimum,M8);let n=h.multiplyByScalar(M8,.5,M8),i=t.normal,o=n.x*Math.abs(i.x)+n.y*Math.abs(i.y)+n.z*Math.abs(i.z),r=h.dot(e.center,i)+t.distance;return r-o>0?qt.INSIDE:r+o<0?qt.OUTSIDE:qt.INTERSECTING};ec.intersectAxisAlignedBoundingBox=function(e,t){return e.minimum.x<=t.maximum.x&&e.maximum.x>=t.minimum.x&&e.minimum.y<=t.maximum.y&&e.maximum.y>=t.minimum.y&&e.minimum.z<=t.maximum.z&&e.maximum.z>=t.minimum.z};ec.prototype.clone=function(e){return ec.clone(this,e)};ec.prototype.intersectPlane=function(e){return ec.intersectPlane(this,e)};ec.prototype.intersectAxisAlignedBoundingBox=function(e){return ec.intersectAxisAlignedBoundingBox(this,e)};ec.prototype.equals=function(e){return ec.equals(this,e)};var gf=ec;var Aq=new se;function hp(e,t){t=t??te.default,e=t.scaleToGeodeticSurface(e);let n=pt.eastNorthUpToFixedFrame(e,t);this._ellipsoid=t,this._origin=e,this._xAxis=h.fromCartesian4(M.getColumn(n,0,Aq)),this._yAxis=h.fromCartesian4(M.getColumn(n,1,Aq));let i=h.fromCartesian4(M.getColumn(n,2,Aq));this._plane=en.fromPointNormal(e,i)}Object.defineProperties(hp.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},origin:{get:function(){return this._origin}},plane:{get:function(){return this._plane}},xAxis:{get:function(){return this._xAxis}},yAxis:{get:function(){return this._yAxis}},zAxis:{get:function(){return this._plane.normal}}});var Rze=new gf;hp.fromPoints=function(e,t){let n=gf.fromPoints(e,Rze);return new hp(n.center,t)};var wle=new gn,B8=new h;hp.prototype.projectPointOntoPlane=function(e,t){let n=wle;n.origin=e,h.normalize(e,n.direction);let i=si.rayPlane(n,this._plane,B8);if(l(i)||(h.negate(n.direction,n.direction),i=si.rayPlane(n,this._plane,B8)),l(i)){let o=h.subtract(i,this._origin,i),r=h.dot(this._xAxis,o),a=h.dot(this._yAxis,o);return l(t)?(t.x=r,t.y=a,t):new z(r,a)}};hp.prototype.projectPointsOntoPlane=function(e,t){l(t)||(t=[]);let n=0,i=e.length;for(let o=0;o<i;o++){let r=this.projectPointOntoPlane(e[o],t[n]);l(r)&&(t[n]=r,n++)}return t.length=n,t};hp.prototype.projectPointToNearestOnPlane=function(e,t){l(t)||(t=new z);let n=wle;n.origin=e,h.clone(this._plane.normal,n.direction);let i=si.rayPlane(n,this._plane,B8);l(i)||(h.negate(n.direction,n.direction),i=si.rayPlane(n,this._plane,B8));let o=h.subtract(i,this._origin,i),r=h.dot(this._xAxis,o),a=h.dot(this._yAxis,o);return t.x=r,t.y=a,t};hp.prototype.projectPointsToNearestOnPlane=function(e,t){l(t)||(t=[]);let n=e.length;t.length=n;for(let i=0;i<n;i++)t[i]=this.projectPointToNearestOnPlane(e[i],t[i]);return t};var Oze=new h;hp.prototype.projectPointOntoEllipsoid=function(e,t){l(t)||(t=new h);let n=this._ellipsoid,i=this._origin,o=this._xAxis,r=this._yAxis,a=Oze;return h.multiplyByScalar(o,e.x,a),t=h.add(i,a,t),h.multiplyByScalar(r,e.y,a),h.add(t,a,t),n.scaleToGeocentricSurface(t,t),t};hp.prototype.projectPointsOntoEllipsoid=function(e,t){let n=e.length;l(t)?t.length=n:t=new Array(n);for(let i=0;i<n;++i)t[i]=this.projectPointOntoEllipsoid(e[i],t[i]);return t};var Ra=hp;function Zi(e,t){this.center=h.clone(e??h.ZERO),this.halfAxes=$.clone(t??$.ZERO)}Zi.packedLength=h.packedLength+$.packedLength;Zi.pack=function(e,t,n){return n=n??0,h.pack(e.center,t,n),$.pack(e.halfAxes,t,n+h.packedLength),t};Zi.unpack=function(e,t,n){return t=t??0,l(n)||(n=new Zi),h.unpack(e,t,n.center),$.unpack(e,t+h.packedLength,n.halfAxes),n};var Mze=new h,Bze=new h,Lze=new h,Nze=new h,Fze=new h,kze=new h,zze=new $,Uze={unitary:new $,diagonal:new $};Zi.fromPoints=function(e,t){if(l(t)||(t=new Zi),!l(e)||e.length===0)return t.halfAxes=$.ZERO,t.center=h.ZERO,t;let n,i=e.length,o=h.clone(e[0],Mze);for(n=1;n<i;n++)h.add(o,e[n],o);let r=1/i;h.multiplyByScalar(o,r,o);let a=0,s=0,c=0,u=0,f=0,d=0,p;for(n=0;n<i;n++)p=h.subtract(e[n],o,Bze),a+=p.x*p.x,s+=p.x*p.y,c+=p.x*p.z,u+=p.y*p.y,f+=p.y*p.z,d+=p.z*p.z;a*=r,s*=r,c*=r,u*=r,f*=r,d*=r;let g=zze;g[0]=a,g[1]=s,g[2]=c,g[3]=s,g[4]=u,g[5]=f,g[6]=c,g[7]=f,g[8]=d;let m=$.computeEigenDecomposition(g,Uze),A=$.clone(m.unitary,t.halfAxes),y=$.getColumn(A,0,Nze),x=$.getColumn(A,1,Fze),b=$.getColumn(A,2,kze),C=-Number.MAX_VALUE,E=-Number.MAX_VALUE,S=-Number.MAX_VALUE,w=Number.MAX_VALUE,P=Number.MAX_VALUE,R=Number.MAX_VALUE;for(n=0;n<i;n++)p=e[n],C=Math.max(h.dot(y,p),C),E=Math.max(h.dot(x,p),E),S=Math.max(h.dot(b,p),S),w=Math.min(h.dot(y,p),w),P=Math.min(h.dot(x,p),P),R=Math.min(h.dot(b,p),R);y=h.multiplyByScalar(y,.5*(w+C),y),x=h.multiplyByScalar(x,.5*(P+E),x),b=h.multiplyByScalar(b,.5*(R+S),b);let B=h.add(y,x,t.center);h.add(B,b,B);let L=Lze;return L.x=C-w,L.y=E-P,L.z=S-R,h.multiplyByScalar(L,.5,L),$.multiplyByScale(t.halfAxes,L,t.halfAxes),t};var Mle=new h,Vze=new h;function Ile(e,t,n,i,o,r,a,s,c,u,f){l(f)||(f=new Zi);let d=f.halfAxes;$.setColumn(d,0,t,d),$.setColumn(d,1,n,d),$.setColumn(d,2,i,d);let p=Mle;p.x=(o+r)/2,p.y=(a+s)/2,p.z=(c+u)/2;let g=Vze;g.x=(r-o)/2,g.y=(s-a)/2,g.z=(u-c)/2;let m=f.center;return p=$.multiplyByVector(d,p,p),h.add(e,p,m),$.multiplyByScale(d,g,d),f}var Dle=new de,jze=new h,Gze=new de,Hze=new de,Wze=new de,qze=new de,Yze=new de,Xze=new h,Ple=new h,Kze=new h,Rle=new h,Qze=new h,$ze=new z,Jze=new z,Zze=new z,eUe=new z,tUe=new z,nUe=new h,iUe=new h,oUe=new h,rUe=new h,aUe=new z,sUe=new h,cUe=new h,lUe=new h,uUe=new en(h.UNIT_X,0);Zi.fromRectangle=function(e,t,n,i,o){t=t??0,n=n??0,i=i??te.default;let r,a,s,c,u,f,d;if(e.width<=D.PI){let P=oe.center(e,Dle),R=i.cartographicToCartesian(P,jze),B=new Ra(R,i);d=B.plane;let L=P.longitude,_=e.south<0&&e.north>0?0:P.latitude,T=de.fromRadians(L,e.north,n,Gze),v=de.fromRadians(e.west,e.north,n,Hze),I=de.fromRadians(e.west,_,n,Wze),O=de.fromRadians(e.west,e.south,n,qze),N=de.fromRadians(L,e.south,n,Yze),j=i.cartographicToCartesian(T,Xze),k=i.cartographicToCartesian(v,Ple),U=i.cartographicToCartesian(I,Kze),F=i.cartographicToCartesian(O,Rle),H=i.cartographicToCartesian(N,Qze),q=B.projectPointToNearestOnPlane(j,$ze),J=B.projectPointToNearestOnPlane(k,Jze),W=B.projectPointToNearestOnPlane(U,Zze),Z=B.projectPointToNearestOnPlane(F,eUe),K=B.projectPointToNearestOnPlane(H,tUe);return r=Math.min(J.x,W.x,Z.x),a=-r,c=Math.max(J.y,q.y),s=Math.min(Z.y,K.y),v.height=O.height=t,k=i.cartographicToCartesian(v,Ple),F=i.cartographicToCartesian(O,Rle),u=Math.min(en.getPointDistance(d,k),en.getPointDistance(d,F)),f=n,Ile(B.origin,B.xAxis,B.yAxis,B.zAxis,r,a,s,c,u,f,o)}let p=e.south>0,g=e.north<0,m=p?e.south:g?e.north:0,A=oe.center(e,Dle).longitude,y=h.fromRadians(A,m,n,i,nUe);y.z=0;let b=Math.abs(y.x)<D.EPSILON10&&Math.abs(y.y)<D.EPSILON10?h.UNIT_X:h.normalize(y,iUe),C=h.UNIT_Z,E=h.cross(b,C,oUe);d=en.fromPointNormal(y,b,uUe);let S=h.fromRadians(A+D.PI_OVER_TWO,m,n,i,rUe);a=h.dot(en.projectPointOntoPlane(d,S,aUe),E),r=-a,c=h.fromRadians(0,e.north,g?t:n,i,sUe).z,s=h.fromRadians(0,e.south,p?t:n,i,cUe).z;let w=h.fromRadians(e.east,m,n,i,lUe);return u=en.getPointDistance(d,w),f=0,Ile(y,E,C,b,r,a,s,c,u,f,o)};Zi.fromTransformation=function(e,t){return l(t)||(t=new Zi),t.center=M.getTranslation(e,t.center),t.halfAxes=M.getMatrix3(e,t.halfAxes),t.halfAxes=$.multiplyByScalar(t.halfAxes,.5,t.halfAxes),t};Zi.clone=function(e,t){if(l(e))return l(t)?(h.clone(e.center,t.center),$.clone(e.halfAxes,t.halfAxes),t):new Zi(e.center,e.halfAxes)};Zi.intersectPlane=function(e,t){let n=e.center,i=t.normal,o=e.halfAxes,r=i.x,a=i.y,s=i.z,c=Math.abs(r*o[$.COLUMN0ROW0]+a*o[$.COLUMN0ROW1]+s*o[$.COLUMN0ROW2])+Math.abs(r*o[$.COLUMN1ROW0]+a*o[$.COLUMN1ROW1]+s*o[$.COLUMN1ROW2])+Math.abs(r*o[$.COLUMN2ROW0]+a*o[$.COLUMN2ROW1]+s*o[$.COLUMN2ROW2]),u=h.dot(i,n)+t.distance;return u<=-c?qt.OUTSIDE:u>=c?qt.INSIDE:qt.INTERSECTING};var Ble=new h,Lle=new h,Nle=new h,fUe=new h,Ole=new h,dUe=new h;Zi.distanceSquaredTo=function(e,t){let n=h.subtract(t,e.center,Mle),i=e.halfAxes,o=$.getColumn(i,0,Ble),r=$.getColumn(i,1,Lle),a=$.getColumn(i,2,Nle),s=h.magnitude(o),c=h.magnitude(r),u=h.magnitude(a),f=!0,d=!0,p=!0;s>0?h.divideByScalar(o,s,o):f=!1,c>0?h.divideByScalar(r,c,r):d=!1,u>0?h.divideByScalar(a,u,a):p=!1;let g=!f+!d+!p,m,A,y;if(g===1){let E=o;m=r,A=a,d?p||(E=a,A=o):(E=r,m=o),y=h.cross(m,A,Ole),E===o?o=y:E===r?r=y:E===a&&(a=y)}else if(g===2){m=o,d?m=r:p&&(m=a);let E=h.UNIT_Y;E.equalsEpsilon(m,D.EPSILON3)&&(E=h.UNIT_X),A=h.cross(m,E,fUe),h.normalize(A,A),y=h.cross(m,A,Ole),h.normalize(y,y),m===o?(r=A,a=y):m===r?(a=A,o=y):m===a&&(o=A,r=y)}else g===3&&(o=h.UNIT_X,r=h.UNIT_Y,a=h.UNIT_Z);let x=dUe;x.x=h.dot(n,o),x.y=h.dot(n,r),x.z=h.dot(n,a);let b=0,C;return x.x<-s?(C=x.x+s,b+=C*C):x.x>s&&(C=x.x-s,b+=C*C),x.y<-c?(C=x.y+c,b+=C*C):x.y>c&&(C=x.y-c,b+=C*C),x.z<-u?(C=x.z+u,b+=C*C):x.z>u&&(C=x.z-u,b+=C*C),b};var hUe=new h,mUe=new h;Zi.computePlaneDistances=function(e,t,n,i){l(i)||(i=new Qr);let o=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,a=e.center,s=e.halfAxes,c=$.getColumn(s,0,Ble),u=$.getColumn(s,1,Lle),f=$.getColumn(s,2,Nle),d=h.add(c,u,hUe);h.add(d,f,d),h.add(d,a,d);let p=h.subtract(d,t,mUe),g=h.dot(n,p);return o=Math.min(g,o),r=Math.max(g,r),h.add(a,c,d),h.add(d,u,d),h.subtract(d,f,d),h.subtract(d,t,p),g=h.dot(n,p),o=Math.min(g,o),r=Math.max(g,r),h.add(a,c,d),h.subtract(d,u,d),h.add(d,f,d),h.subtract(d,t,p),g=h.dot(n,p),o=Math.min(g,o),r=Math.max(g,r),h.add(a,c,d),h.subtract(d,u,d),h.subtract(d,f,d),h.subtract(d,t,p),g=h.dot(n,p),o=Math.min(g,o),r=Math.max(g,r),h.subtract(a,c,d),h.add(d,u,d),h.add(d,f,d),h.subtract(d,t,p),g=h.dot(n,p),o=Math.min(g,o),r=Math.max(g,r),h.subtract(a,c,d),h.add(d,u,d),h.subtract(d,f,d),h.subtract(d,t,p),g=h.dot(n,p),o=Math.min(g,o),r=Math.max(g,r),h.subtract(a,c,d),h.subtract(d,u,d),h.add(d,f,d),h.subtract(d,t,p),g=h.dot(n,p),o=Math.min(g,o),r=Math.max(g,r),h.subtract(a,c,d),h.subtract(d,u,d),h.subtract(d,f,d),h.subtract(d,t,p),g=h.dot(n,p),o=Math.min(g,o),r=Math.max(g,r),i.start=o,i.stop=r,i};var pUe=new h,gUe=new h,_Ue=new h;Zi.computeCorners=function(e,t){l(t)||(t=[new h,new h,new h,new h,new h,new h,new h,new h]);let n=e.center,i=e.halfAxes,o=$.getColumn(i,0,pUe),r=$.getColumn(i,1,gUe),a=$.getColumn(i,2,_Ue);return h.clone(n,t[0]),h.subtract(t[0],o,t[0]),h.subtract(t[0],r,t[0]),h.subtract(t[0],a,t[0]),h.clone(n,t[1]),h.subtract(t[1],o,t[1]),h.subtract(t[1],r,t[1]),h.add(t[1],a,t[1]),h.clone(n,t[2]),h.subtract(t[2],o,t[2]),h.add(t[2],r,t[2]),h.subtract(t[2],a,t[2]),h.clone(n,t[3]),h.subtract(t[3],o,t[3]),h.add(t[3],r,t[3]),h.add(t[3],a,t[3]),h.clone(n,t[4]),h.add(t[4],o,t[4]),h.subtract(t[4],r,t[4]),h.subtract(t[4],a,t[4]),h.clone(n,t[5]),h.add(t[5],o,t[5]),h.subtract(t[5],r,t[5]),h.add(t[5],a,t[5]),h.clone(n,t[6]),h.add(t[6],o,t[6]),h.add(t[6],r,t[6]),h.subtract(t[6],a,t[6]),h.clone(n,t[7]),h.add(t[7],o,t[7]),h.add(t[7],r,t[7]),h.add(t[7],a,t[7]),t};var AUe=new $;Zi.computeTransformation=function(e,t){l(t)||(t=new M);let n=e.center,i=$.multiplyByUniformScale(e.halfAxes,2,AUe);return M.fromRotationTranslation(i,n,t)};var yUe=new ce;Zi.isOccluded=function(e,t){let n=ce.fromOrientedBoundingBox(e,yUe);return!t.isBoundingSphereVisible(n)};Zi.prototype.intersectPlane=function(e){return Zi.intersectPlane(this,e)};Zi.prototype.distanceSquaredTo=function(e){return Zi.distanceSquaredTo(this,e)};Zi.prototype.computePlaneDistances=function(e,t,n){return Zi.computePlaneDistances(this,e,t,n)};Zi.prototype.computeCorners=function(e){return Zi.computeCorners(this,e)};Zi.prototype.computeTransformation=function(e){return Zi.computeTransformation(this,e)};Zi.prototype.isOccluded=function(e){return Zi.isOccluded(this,e)};Zi.equals=function(e,t){return e===t||l(e)&&l(t)&&h.equals(e.center,t.center)&&$.equals(e.halfAxes,t.halfAxes)};Zi.prototype.clone=function(e){return Zi.clone(this,e)};Zi.prototype.equals=function(e){return Zi.equals(this,e)};var Qt=Zi;var L8={};L8.getHeight=function(e,t,n){return(e-n)*t+n};var xUe=new de;L8.getPosition=function(e,t,n,i,o){let r=t.cartesianToCartographic(e,xUe);if(!l(r))return h.clone(e,o);let a=L8.getHeight(r.height,n,i);return h.fromRadians(r.longitude,r.latitude,a,t,o)};var so=L8;var cO=`in vec3 position3DHigh;
- in vec3 position3DLow;
- in float batchId;
-
- #ifdef EXTRUDED_GEOMETRY
- in vec3 extrudeDirection;
-
- uniform float u_globeMinimumAltitude;
- #endif // EXTRUDED_GEOMETRY
-
- #ifdef PER_INSTANCE_COLOR
- out vec4 v_color;
- #endif // PER_INSTANCE_COLOR
-
- #ifdef TEXTURE_COORDINATES
- #ifdef SPHERICAL
- out vec4 v_sphericalExtents;
- #else // SPHERICAL
- out vec2 v_inversePlaneExtents;
- out vec4 v_westPlane;
- out vec4 v_southPlane;
- #endif // SPHERICAL
- out vec3 v_uvMinAndSphericalLongitudeRotation;
- out vec3 v_uMaxAndInverseDistance;
- out vec3 v_vMaxAndInverseDistance;
- #endif // TEXTURE_COORDINATES
-
- void main()
- {
- vec4 position = czm_computePosition();
-
- #ifdef EXTRUDED_GEOMETRY
- float delta = min(u_globeMinimumAltitude, czm_geometricToleranceOverMeter * length(position.xyz));
- delta *= czm_sceneMode == czm_sceneMode3D ? 1.0 : 0.0;
-
- //extrudeDirection is zero for the top layer
- position = position + vec4(extrudeDirection * delta, 0.0);
- #endif
-
- #ifdef TEXTURE_COORDINATES
- #ifdef SPHERICAL
- v_sphericalExtents = czm_batchTable_sphericalExtents(batchId);
- v_uvMinAndSphericalLongitudeRotation.z = czm_batchTable_longitudeRotation(batchId);
- #else // SPHERICAL
- #ifdef COLUMBUS_VIEW_2D
- vec4 planes2D_high = czm_batchTable_planes2D_HIGH(batchId);
- vec4 planes2D_low = czm_batchTable_planes2D_LOW(batchId);
-
- // If the primitive is split across the IDL (planes2D_high.x > planes2D_high.w):
- // - If this vertex is on the east side of the IDL (position3DLow.y > 0.0, comparison with position3DHigh may produce artifacts)
- // - existing "east" is on the wrong side of the world, far away (planes2D_high/low.w)
- // - so set "east" as beyond the eastmost extent of the projection (idlSplitNewPlaneHiLow)
- vec2 idlSplitNewPlaneHiLow = vec2(EAST_MOST_X_HIGH - (WEST_MOST_X_HIGH - planes2D_high.w), EAST_MOST_X_LOW - (WEST_MOST_X_LOW - planes2D_low.w));
- bool idlSplit = planes2D_high.x > planes2D_high.w && position3DLow.y > 0.0;
- planes2D_high.w = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.x, planes2D_high.w);
- planes2D_low.w = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.y, planes2D_low.w);
-
- // - else, if this vertex is on the west side of the IDL (position3DLow.y < 0.0)
- // - existing "west" is on the wrong side of the world, far away (planes2D_high/low.x)
- // - so set "west" as beyond the westmost extent of the projection (idlSplitNewPlaneHiLow)
- idlSplit = planes2D_high.x > planes2D_high.w && position3DLow.y < 0.0;
- idlSplitNewPlaneHiLow = vec2(WEST_MOST_X_HIGH - (EAST_MOST_X_HIGH - planes2D_high.x), WEST_MOST_X_LOW - (EAST_MOST_X_LOW - planes2D_low.x));
- planes2D_high.x = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.x, planes2D_high.x);
- planes2D_low.x = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.y, planes2D_low.x);
-
- vec3 southWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.xy), vec3(0.0, planes2D_low.xy))).xyz;
- vec3 northWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.x, planes2D_high.z), vec3(0.0, planes2D_low.x, planes2D_low.z))).xyz;
- vec3 southEastCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.w, planes2D_high.y), vec3(0.0, planes2D_low.w, planes2D_low.y))).xyz;
- #else // COLUMBUS_VIEW_2D
- // 3D case has smaller "plane extents," so planes encoded as a 64 bit position and 2 vec3s for distances/direction
- vec3 southWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(czm_batchTable_southWest_HIGH(batchId), czm_batchTable_southWest_LOW(batchId))).xyz;
- vec3 northWestCorner = czm_normal * czm_batchTable_northward(batchId) + southWestCorner;
- vec3 southEastCorner = czm_normal * czm_batchTable_eastward(batchId) + southWestCorner;
- #endif // COLUMBUS_VIEW_2D
-
- vec3 eastWard = southEastCorner - southWestCorner;
- float eastExtent = length(eastWard);
- eastWard /= eastExtent;
-
- vec3 northWard = northWestCorner - southWestCorner;
- float northExtent = length(northWard);
- northWard /= northExtent;
-
- v_westPlane = vec4(eastWard, -dot(eastWard, southWestCorner));
- v_southPlane = vec4(northWard, -dot(northWard, southWestCorner));
- v_inversePlaneExtents = vec2(1.0 / eastExtent, 1.0 / northExtent);
- #endif // SPHERICAL
- vec4 uvMinAndExtents = czm_batchTable_uvMinAndExtents(batchId);
- vec4 uMaxVmax = czm_batchTable_uMaxVmax(batchId);
-
- v_uMaxAndInverseDistance = vec3(uMaxVmax.xy, uvMinAndExtents.z);
- v_vMaxAndInverseDistance = vec3(uMaxVmax.zw, uvMinAndExtents.w);
- v_uvMinAndSphericalLongitudeRotation.xy = uvMinAndExtents.xy;
- #endif // TEXTURE_COORDINATES
-
- #ifdef PER_INSTANCE_COLOR
- v_color = czm_batchTable_color(batchId);
- #endif
-
- gl_Position = czm_depthClamp(czm_modelViewProjectionRelativeToEye * position);
- }
- `;var lA=`#ifdef VECTOR_TILE
- uniform vec4 u_highlightColor;
- #endif
-
- void main(void)
- {
- #ifdef VECTOR_TILE
- out_FragColor = czm_gammaCorrect(u_highlightColor);
- #else
- out_FragColor = vec4(1.0);
- #endif
- czm_writeDepthClamp();
- }
- `;var yq={TERRAIN:0,CESIUM_3D_TILE:1,BOTH:2};yq.NUMBER_OF_CLASSIFICATION_TYPES=3;Object.freeze(yq);var Wn=yq;var Fle={NEVER:ee.NEVER,LESS:ee.LESS,EQUAL:ee.EQUAL,LESS_OR_EQUAL:ee.LEQUAL,GREATER:ee.GREATER,NOT_EQUAL:ee.NOTEQUAL,GREATER_OR_EQUAL:ee.GEQUAL,ALWAYS:ee.ALWAYS};Object.freeze(Fle);var tc=Fle;function bUe(e,t){let n=[],i=e.length,o=0;for(;o<i;){let r=Math.ceil((i-o)/t--);n.push(e.slice(o,o+r)),o+=r}return n}var lO=bUe;function H0(e,t,n){if(this._attributes=t,this._numberOfInstances=n,t.length===0)return;let i=CUe(t),o=e.floatingPointTexture,r=i===je.FLOAT&&!o,a=TUe(t,r),s=EUe(a,t,r),c=Math.floor(Rt.maximumTextureSize/s),u=Math.min(n,c),f=s*u,d=Math.ceil(n/u),p=1/f,g=p*.5,m=1/d,A=m*.5;this._textureDimensions=new z(f,d),this._textureStep=new se(p,g,m,A),this._pixelDatatype=r?je.UNSIGNED_BYTE:i,this._packFloats=r,this._offsets=a,this._stride=s,this._texture=void 0;let y=4*f*d;this._batchValues=i===je.FLOAT&&!r?new Float32Array(y):new Uint8Array(y),this._batchValuesDirty=!1}Object.defineProperties(H0.prototype,{attributes:{get:function(){return this._attributes}},numberOfInstances:{get:function(){return this._numberOfInstances}}});function CUe(e){let t=!1,n=e.length;for(let i=0;i<n;++i)if(e[i].componentDatatype!==Y.UNSIGNED_BYTE){t=!0;break}return t?je.FLOAT:je.UNSIGNED_BYTE}function zle(e,t){let n=e[t].componentsPerAttribute;return n===2?z:n===3?h:n===4?se:Number}function TUe(e,t){let n=new Array(e.length),i=0,o=e.length;for(let r=0;r<o;++r){let s=e[r].componentDatatype;n[r]=i,s!==Y.UNSIGNED_BYTE&&t?i+=4:++i}return n}function EUe(e,t,n){let i=e.length,o=e[i-1];return t[i-1].componentDatatype!==Y.UNSIGNED_BYTE&&n?o+4:o+1}var uO=new se;function vUe(e,t,n){let i=se.unpack(e,t,uO),o=se.unpackFloat(i);i=se.unpack(e,t+4,uO);let r=se.unpackFloat(i);i=se.unpack(e,t+8,uO);let a=se.unpackFloat(i);i=se.unpack(e,t+12,uO);let s=se.unpackFloat(i);return se.fromElements(o,r,a,s,n)}function SUe(e,t,n){let i=se.packFloat(e.x,uO);se.pack(i,t,n),i=se.packFloat(e.y,i),se.pack(i,t,n+4),i=se.packFloat(e.z,i),se.pack(i,t,n+8),i=se.packFloat(e.w,i),se.pack(i,t,n+12)}var kle=new se;H0.prototype.getBatchedAttribute=function(e,t,n){let i=this._attributes,o=this._offsets[t],a=4*this._stride*e+4*o,s;this._packFloats&&i[t].componentDatatype!==je.UNSIGNED_BYTE?s=vUe(this._batchValues,a,kle):s=se.unpack(this._batchValues,a,kle);let c=zle(i,t);return l(c.fromCartesian4)?c.fromCartesian4(s,n):l(c.clone)?c.clone(s,n):s.x};var wUe=[void 0,void 0,new z,new h,new se],IUe=new se;H0.prototype.setBatchedAttribute=function(e,t,n){let i=this._attributes,o=wUe[i[t].componentsPerAttribute],r=this.getBatchedAttribute(e,t,o),a=zle(this._attributes,t);if(l(a.equals)?a.equals(r,n):r===n)return;let c=IUe;c.x=l(n.x)?n.x:n,c.y=l(n.y)?n.y:0,c.z=l(n.z)?n.z:0,c.w=l(n.w)?n.w:0;let u=this._offsets[t],d=4*this._stride*e+4*u;this._packFloats&&i[t].componentDatatype!==je.UNSIGNED_BYTE?SUe(c,this._batchValues,d):se.pack(c,this._batchValues,d),this._batchValuesDirty=!0};function DUe(e,t){let n=e._textureDimensions;e._texture=new It({context:t,pixelFormat:Xe.RGBA,pixelDatatype:e._pixelDatatype,width:n.x,height:n.y,sampler:jt.NEAREST,flipY:!1})}function PUe(e){let t=e._textureDimensions;e._texture.copyFrom({source:{width:t.x,height:t.y,arrayBufferView:e._batchValues}})}H0.prototype.update=function(e){l(this._texture)&&!this._batchValuesDirty||this._attributes.length===0||(this._batchValuesDirty=!1,l(this._texture)||DUe(this,e.context),PUe(this))};H0.prototype.getUniformMapCallback=function(){let e=this;return function(t){return e._attributes.length===0?t:wt(t,{batchTexture:function(){return e._texture},batchTextureDimensions:function(){return e._textureDimensions},batchTextureStep:function(){return e._textureStep}})}};function RUe(e){let t=e._stride;return e._textureDimensions.y===1?`uniform vec4 batchTextureStep;
- vec2 computeSt(float batchId)
- {
- float stepX = batchTextureStep.x;
- float centerX = batchTextureStep.y;
- float numberOfAttributes = float(${t});
- return vec2(centerX + (batchId * numberOfAttributes * stepX), 0.5);
- }
- `:`uniform vec4 batchTextureStep;
- uniform vec2 batchTextureDimensions;
- vec2 computeSt(float batchId)
- {
- float stepX = batchTextureStep.x;
- float centerX = batchTextureStep.y;
- float stepY = batchTextureStep.z;
- float centerY = batchTextureStep.w;
- float numberOfAttributes = float(${t});
- float xId = mod(batchId * numberOfAttributes, batchTextureDimensions.x);
- float yId = floor(batchId * numberOfAttributes / batchTextureDimensions.x);
- return vec2(centerX + (xId * stepX), centerY + (yId * stepY));
- }
- `}function OUe(e){return e===1?"float":`vec${e}`}function MUe(e){return e===1?".x":e===2?".xy":e===3?".xyz":""}function BUe(e,t){let i=e._attributes[t],o=i.componentsPerAttribute,r=i.functionName,a=OUe(o),s=MUe(o),c=e._offsets[t],u=`${a} ${r}(float batchId)
- {
- vec2 st = computeSt(batchId);
- st.x += batchTextureStep.x * float(${c});
- `;return e._packFloats&&i.componentDatatype!==je.UNSIGNED_BYTE?u+=`vec4 textureValue;
- textureValue.x = czm_unpackFloat(texture(batchTexture, st));
- textureValue.y = czm_unpackFloat(texture(batchTexture, st + vec2(batchTextureStep.x, 0.0)));
- textureValue.z = czm_unpackFloat(texture(batchTexture, st + vec2(batchTextureStep.x * 2.0, 0.0)));
- textureValue.w = czm_unpackFloat(texture(batchTexture, st + vec2(batchTextureStep.x * 3.0, 0.0)));
- `:u+=` vec4 textureValue = texture(batchTexture, st);
- `,u+=` ${a} value = textureValue${s};
- `,e._pixelDatatype===je.UNSIGNED_BYTE&&i.componentDatatype===Y.UNSIGNED_BYTE&&!i.normalize?u+=`value *= 255.0;
- `:e._pixelDatatype===je.FLOAT&&i.componentDatatype===Y.UNSIGNED_BYTE&&i.normalize&&(u+=`value /= 255.0;
- `),u+=` return value;
- }
- `,u}H0.prototype.getVertexShaderCallback=function(){let e=this._attributes;if(e.length===0)return function(i){return i};let t=`uniform highp sampler2D batchTexture;
- `;t+=`${RUe(this)}
- `;let n=e.length;for(let i=0;i<n;++i)t+=BUe(this,i);return function(i){let o=i.indexOf("void main"),r=i.substring(0,o),a=i.substring(o);return`${r}
- ${t}
- ${a}`}};H0.prototype.isDestroyed=function(){return!1};H0.prototype.destroy=function(){return this._texture=this._texture&&this._texture.destroy(),fe(this)};var Lx=H0;var fO=class e{constructor(t){this._ellipsoid=t??te.WGS84,this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}get ellipsoid(){return this._ellipsoid}static mercatorAngleToGeodeticLatitude(t){return D.PI_OVER_TWO-2*Math.atan(Math.exp(-t))}static geodeticLatitudeToMercatorAngle(t){t>e.MaximumLatitude?t=e.MaximumLatitude:t<-e.MaximumLatitude&&(t=-e.MaximumLatitude);let n=Math.sin(t);return .5*Math.log((1+n)/(1-n))}project(t,n){let i=this._semimajorAxis,o=t.longitude*i,r=e.geodeticLatitudeToMercatorAngle(t.latitude)*i,a=t.height;return l(n)?(n.x=o,n.y=r,n.z=a,n):new h(o,r,a)}unproject(t,n){let i=this._oneOverSemimajorAxis,o=t.x*i,r=e.mercatorAngleToGeodeticLatitude(t.y*i),a=t.z;return l(n)?(n.longitude=o,n.latitude=r,n.height=a,n):new de(o,r,a)}};fO.MaximumLatitude=fO.mercatorAngleToGeodeticLatitude(Math.PI);var li=fO;function LUe(e,t,n){let i=!n,o=e.length,r;if(!i&&o>1){let a=e[0].modelMatrix;for(r=1;r<o;++r)if(!M.equals(a,e[r].modelMatrix)){i=!0;break}}if(i)for(r=0;r<o;++r)l(e[r].geometry)&&kn.transformToWorldCoordinates(e[r]);else M.multiplyTransformation(t,e[0].modelMatrix,t)}function xq(e,t){let n=e.attributes,i=n.position,o=i.values.length/i.componentsPerAttribute;n.batchId=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:1,values:new Float32Array(o)});let r=n.batchId.values;for(let a=0;a<o;++a)r[a]=t}function NUe(e){let t=e.length;for(let n=0;n<t;++n){let i=e[n];l(i.geometry)?xq(i.geometry,n):l(i.westHemisphereGeometry)&&l(i.eastHemisphereGeometry)&&(xq(i.westHemisphereGeometry,n),xq(i.eastHemisphereGeometry,n))}}function FUe(e){let t=e.instances,n=e.projection,i=e.elementIndexUintSupported,o=e.scene3DOnly,r=e.vertexCacheOptimize,a=e.compressVertices,s=e.modelMatrix,c,u,f,d=t.length;for(c=0;c<d;++c)if(l(t[c].geometry)){f=t[c].geometry.primitiveType;break}if(LUe(t,s,o),!o)for(c=0;c<d;++c)l(t[c].geometry)&&kn.splitLongitude(t[c]);if(NUe(t),r)for(c=0;c<d;++c){let g=t[c];l(g.geometry)?(kn.reorderForPostVertexCache(g.geometry),kn.reorderForPreVertexCache(g.geometry)):l(g.westHemisphereGeometry)&&l(g.eastHemisphereGeometry)&&(kn.reorderForPostVertexCache(g.westHemisphereGeometry),kn.reorderForPreVertexCache(g.westHemisphereGeometry),kn.reorderForPostVertexCache(g.eastHemisphereGeometry),kn.reorderForPreVertexCache(g.eastHemisphereGeometry))}let p=kn.combineInstances(t);for(d=p.length,c=0;c<d;++c){u=p[c];let g=u.attributes;if(o)for(let m in g)g.hasOwnProperty(m)&&g[m].componentDatatype===Y.DOUBLE&&kn.encodeAttribute(u,m,`${m}3DHigh`,`${m}3DLow`);else for(let m in g)if(g.hasOwnProperty(m)&&g[m].componentDatatype===Y.DOUBLE){let A=`${m}3D`,y=`${m}2D`;kn.projectTo2D(u,m,A,y,n),l(u.boundingSphere)&&m==="position"&&(u.boundingSphereCV=ce.fromVertices(u.attributes.position2D.values)),kn.encodeAttribute(u,A,`${A}High`,`${A}Low`),kn.encodeAttribute(u,y,`${y}High`,`${y}Low`)}a&&kn.compressVertices(u)}if(!i){let g=[];for(d=p.length,c=0;c<d;++c)u=p[c],g=g.concat(kn.fitToUnsignedShortIndices(u));p=g}return p}function bq(e,t,n,i){let o,r,a,s=i.length-1;if(s>=0){let u=i[s];o=u.offset+u.count,a=u.index,r=n[a].indices.length}else o=0,a=0,r=n[a].indices.length;let c=e.length;for(let u=0;u<c;++u){let d=e[u][t];if(!l(d))continue;let p=d.indices.length;o+p>r&&(o=0,r=n[++a].indices.length),i.push({index:a,offset:o,count:p}),o+=p}}function kUe(e,t){let n=[];return bq(e,"geometry",t,n),bq(e,"westHemisphereGeometry",t,n),bq(e,"eastHemisphereGeometry",t,n),n}var W0={};W0.combineGeometry=function(e){let t,n,i=e.instances,o=i.length,r,a,s=!1;o>0&&(t=FUe(e),t.length>0&&(n=kn.createAttributeLocations(t[0]),e.createPickOffsets&&(r=kUe(i,t))),l(i[0].attributes)&&l(i[0].attributes.offset)&&(a=new Array(o),s=!0));let c=new Array(o),u=new Array(o);for(let f=0;f<o;++f){let d=i[f],p=d.geometry;l(p)&&(c[f]=p.boundingSphere,u[f]=p.boundingSphereCV,s&&(a[f]=d.geometry.offsetAttribute));let g=d.eastHemisphereGeometry,m=d.westHemisphereGeometry;l(g)&&l(m)&&(l(g.boundingSphere)&&l(m.boundingSphere)&&(c[f]=ce.union(g.boundingSphere,m.boundingSphere)),l(g.boundingSphereCV)&&l(m.boundingSphereCV)&&(u[f]=ce.union(g.boundingSphereCV,m.boundingSphereCV)))}return{geometries:t,modelMatrix:e.modelMatrix,attributeLocations:n,pickOffsets:r,offsetInstanceExtend:a,boundingSpheres:c,boundingSpheresCV:u}};function zUe(e,t){let n=e.attributes;for(let i in n)if(n.hasOwnProperty(i)){let o=n[i];l(o)&&l(o.values)&&t.push(o.values.buffer)}l(e.indices)&&t.push(e.indices.buffer)}function UUe(e,t){let n=e.length;for(let i=0;i<n;++i)zUe(e[i],t)}function VUe(e){let t=1,n=e.length;for(let i=0;i<n;i++){let o=e[i];if(++t,!l(o))continue;let r=o.attributes;t+=7+2*ce.packedLength+(l(o.indices)?o.indices.length:0);for(let a in r)if(r.hasOwnProperty(a)&&l(r[a])){let s=r[a];t+=5+s.values.length}}return t}W0.packCreateGeometryResults=function(e,t){let n=new Float64Array(VUe(e)),i=[],o={},r=e.length,a=0;n[a++]=r;for(let s=0;s<r;s++){let c=e[s],u=l(c);if(n[a++]=u?1:0,!u)continue;n[a++]=c.primitiveType,n[a++]=c.geometryType,n[a++]=c.offsetAttribute??-1;let f=l(c.boundingSphere)?1:0;n[a++]=f,f&&ce.pack(c.boundingSphere,n,a),a+=ce.packedLength;let d=l(c.boundingSphereCV)?1:0;n[a++]=d,d&&ce.pack(c.boundingSphereCV,n,a),a+=ce.packedLength;let p=c.attributes,g=[];for(let A in p)p.hasOwnProperty(A)&&l(p[A])&&(g.push(A),l(o[A])||(o[A]=i.length,i.push(A)));n[a++]=g.length;for(let A=0;A<g.length;A++){let y=g[A],x=p[y];n[a++]=o[y],n[a++]=x.componentDatatype,n[a++]=x.componentsPerAttribute,n[a++]=x.normalize?1:0,n[a++]=x.values.length,n.set(x.values,a),a+=x.values.length}let m=l(c.indices)?c.indices.length:0;n[a++]=m,m>0&&(n.set(c.indices,a),a+=m)}return t.push(n.buffer),{stringTable:i,packedData:n}};W0.unpackCreateGeometryResults=function(e){let t=e.stringTable,n=e.packedData,i,o=new Array(n[0]),r=0,a=1;for(;a<n.length;){if(!(n[a++]===1)){o[r++]=void 0;continue}let c=n[a++],u=n[a++],f=n[a++];f===-1&&(f=void 0);let d,p;n[a++]===1&&(d=ce.unpack(n,a)),a+=ce.packedLength,n[a++]===1&&(p=ce.unpack(n,a)),a+=ce.packedLength;let A,y,x,b=new pn,C=n[a++];for(i=0;i<C;i++){let S=t[n[a++]],w=n[a++];x=n[a++];let P=n[a++]!==0;A=n[a++],y=Y.createTypedArray(w,A);for(let R=0;R<A;R++)y[R]=n[a++];b[S]=new Me({componentDatatype:w,componentsPerAttribute:x,normalize:P,values:y})}let E;if(A=n[a++],A>0){let S=y.length/x;for(E=Ue.createTypedArray(S,A),i=0;i<A;i++)E[i]=n[a++]}o[r++]=new At({primitiveType:c,geometryType:u,boundingSphere:d,boundingSphereCV:p,indices:E,attributes:b,offsetAttribute:f})}return o};function jUe(e,t){let n=e.length,i=new Float64Array(1+n*19),o=0;i[o++]=n;for(let r=0;r<n;r++){let a=e[r];if(M.pack(a.modelMatrix,i,o),o+=M.packedLength,l(a.attributes)&&l(a.attributes.offset)){let s=a.attributes.offset.value;i[o]=s[0],i[o+1]=s[1],i[o+2]=s[2]}o+=3}return t.push(i.buffer),i}function GUe(e){let t=e,n=new Array(t[0]),i=0,o=1;for(;o<t.length;){let r=M.unpack(t,o),a;o+=M.packedLength,l(t[o])&&(a={offset:new po(t[o],t[o+1],t[o+2])}),o+=3,n[i++]={modelMatrix:r,attributes:a}}return n}W0.packCombineGeometryParameters=function(e,t){let n=e.createGeometryResults,i=n.length;for(let o=0;o<i;o++)t.push(n[o].packedData.buffer);return{createGeometryResults:e.createGeometryResults,packedInstances:jUe(e.instances,t),ellipsoid:e.ellipsoid,isGeographic:e.projection instanceof ji,elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e.createPickOffsets}};W0.unpackCombineGeometryParameters=function(e){let t=GUe(e.packedInstances),n=e.createGeometryResults,i=n.length,o=0;for(let s=0;s<i;s++){let c=W0.unpackCreateGeometryResults(n[s]),u=c.length;for(let f=0;f<u;f++){let d=c[f],p=t[o];p.geometry=d,++o}}let r=te.clone(e.ellipsoid),a=e.isGeographic?new ji(r):new li(r);return{instances:t,ellipsoid:r,projection:a,elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:M.clone(e.modelMatrix),createPickOffsets:e.createPickOffsets}};function Ule(e){let t=e.length,n=1+(ce.packedLength+1)*t,i=new Float32Array(n),o=0;i[o++]=t;for(let r=0;r<t;++r){let a=e[r];l(a)?(i[o++]=1,ce.pack(e[r],i,o)):i[o++]=0,o+=ce.packedLength}return i}function Vle(e){let t=new Array(e[0]),n=0,i=1;for(;i<e.length;)e[i++]===1&&(t[n]=ce.unpack(e,i)),++n,i+=ce.packedLength;return t}W0.packCombineGeometryResults=function(e,t){l(e.geometries)&&UUe(e.geometries,t);let n=Ule(e.boundingSpheres),i=Ule(e.boundingSpheresCV);return t.push(n.buffer,i.buffer),{geometries:e.geometries,attributeLocations:e.attributeLocations,modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets,offsetInstanceExtend:e.offsetInstanceExtend,boundingSpheres:n,boundingSpheresCV:i}};W0.unpackCombineGeometryResults=function(e){return{geometries:e.geometries,attributeLocations:e.attributeLocations,modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets,offsetInstanceExtend:e.offsetInstanceExtend,boundingSpheres:Vle(e.boundingSpheres),boundingSpheresCV:Vle(e.boundingSpheresCV)}};var Nx=W0;var jle={READY:0,CREATING:1,CREATED:2,COMBINING:3,COMBINED:4,COMPLETE:5,FAILED:6};Object.freeze(jle);var Zr=jle;var vu={DISABLED:0,ENABLED:1,CAST_ONLY:2,RECEIVE_ONLY:3};vu.NUMBER_OF_SHADOW_MODES=4;vu.castShadows=function(e){return e===vu.ENABLED||e===vu.CAST_ONLY};vu.receiveShadows=function(e){return e===vu.ENABLED||e===vu.RECEIVE_ONLY};vu.fromCastReceive=function(e,t){return e&&t?vu.ENABLED:e?vu.CAST_ONLY:t?vu.RECEIVE_ONLY:vu.DISABLED};Object.freeze(vu);var vn=vu;function ea(e){e=e??G.EMPTY_OBJECT,this.geometryInstances=e.geometryInstances,this.appearance=e.appearance,this._appearance=void 0,this._material=void 0,this.depthFailAppearance=e.depthFailAppearance,this._depthFailAppearance=void 0,this._depthFailMaterial=void 0,this.modelMatrix=M.clone(e.modelMatrix??M.IDENTITY),this._modelMatrix=new M,this.show=e.show??!0,this._vertexCacheOptimize=e.vertexCacheOptimize??!1,this._interleave=e.interleave??!1,this._releaseGeometryInstances=e.releaseGeometryInstances??!0,this._allowPicking=e.allowPicking??!0,this._asynchronous=e.asynchronous??!0,this._compressVertices=e.compressVertices??!0,this.cull=e.cull??!0,this.debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this.rtcCenter=e.rtcCenter,this.shadows=e.shadows??vn.DISABLED,this._translucent=void 0,this._state=Zr.READY,this._geometries=[],this._error=void 0,this._numberOfInstances=0,this._boundingSpheres=[],this._boundingSphereWC=[],this._boundingSphereCV=[],this._boundingSphere2D=[],this._boundingSphereMorph=[],this._perInstanceAttributeCache=new Map,this._instanceIds=[],this._lastPerInstanceAttributeIndex=0,this._va=[],this._attributeLocations=void 0,this._primitiveType=void 0,this._frontFaceRS=void 0,this._backFaceRS=void 0,this._sp=void 0,this._depthFailAppearance=void 0,this._spDepthFail=void 0,this._frontFaceDepthFailRS=void 0,this._backFaceDepthFailRS=void 0,this._pickIds=[],this._colorCommands=[],this._pickCommands=[],this._createBoundingVolumeFunction=e._createBoundingVolumeFunction,this._createRenderStatesFunction=e._createRenderStatesFunction,this._createShaderProgramFunction=e._createShaderProgramFunction,this._createCommandsFunction=e._createCommandsFunction,this._updateAndQueueCommandsFunction=e._updateAndQueueCommandsFunction,this._createPickOffsets=e._createPickOffsets,this._pickOffsets=void 0,this._createGeometryResults=void 0,this._ready=!1,this._batchTable=void 0,this._batchTableAttributeIndices=void 0,this._offsetInstanceExtend=void 0,this._batchTableOffsetAttribute2DIndex=void 0,this._batchTableOffsetsUpdated=!1,this._instanceBoundingSpheres=void 0,this._instanceBoundingSpheresCV=void 0,this._tempBoundingSpheres=void 0,this._recomputeBoundingSpheres=!1,this._batchTableBoundingSpheresUpdated=!1,this._batchTableBoundingSphereAttributeIndices=void 0}Object.defineProperties(ea.prototype,{vertexCacheOptimize:{get:function(){return this._vertexCacheOptimize}},interleave:{get:function(){return this._interleave}},releaseGeometryInstances:{get:function(){return this._releaseGeometryInstances}},allowPicking:{get:function(){return this._allowPicking}},asynchronous:{get:function(){return this._asynchronous}},compressVertices:{get:function(){return this._compressVertices}},ready:{get:function(){return this._ready}}});function HUe(e){let t=e.length,n=[],i=e[0].attributes,o;for(o in i)if(i.hasOwnProperty(o)&&l(i[o])){let r=i[o],a=!0;for(let s=1;s<t;++s){let c=e[s].attributes[o];if(!l(c)||r.componentDatatype!==c.componentDatatype||r.componentsPerAttribute!==c.componentsPerAttribute||r.normalize!==c.normalize){a=!1;break}}a&&n.push(o)}return n}var WUe=new z,qUe=new h,$le=new se;function Jle(e){let t=e.length;if(t===1)return e[0];if(t===2)return z.unpack(e,0,WUe);if(t===3)return h.unpack(e,0,qUe);if(t===4)return se.unpack(e,0,$le)}function YUe(e,t){let n=e.geometryInstances,i=Array.isArray(n)?n:[n],o=i.length;if(o===0)return;let r=HUe(i),a=r.length,s=[],c={},u={},f,p=i[0].attributes,g,m,A;for(g=0;g<a;++g)m=r[g],A=p[m],c[m]=g,s.push({functionName:`czm_batchTable_${m}`,componentDatatype:A.componentDatatype,componentsPerAttribute:A.componentsPerAttribute,normalize:A.normalize});r.indexOf("distanceDisplayCondition")!==-1&&(s.push({functionName:"czm_batchTable_boundingSphereCenter3DHigh",componentDatatype:Y.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereCenter3DLow",componentDatatype:Y.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereCenter2DHigh",componentDatatype:Y.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereCenter2DLow",componentDatatype:Y.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereRadius",componentDatatype:Y.FLOAT,componentsPerAttribute:1}),u.center3DHigh=s.length-5,u.center3DLow=s.length-4,u.center2DHigh=s.length-3,u.center2DLow=s.length-2,u.radius=s.length-1),r.indexOf("offset")!==-1&&(s.push({functionName:"czm_batchTable_offset2D",componentDatatype:Y.FLOAT,componentsPerAttribute:3}),f=s.length-1),s.push({functionName:"czm_batchTable_pickColor",componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!0});let y=s.length,x=new Lx(t,s,o);for(g=0;g<o;++g){let b=i[g];p=b.attributes;for(let P=0;P<a;++P){m=r[P],A=p[m];let R=Jle(A.value),B=c[m];x.setBatchedAttribute(g,B,R)}let C={primitive:b.pickPrimitive??e};l(b.id)&&(C.id=b.id);let E=t.createPickId(C);e._pickIds.push(E);let S=E.color,w=$le;w.x=V.floatToByte(S.red),w.y=V.floatToByte(S.green),w.z=V.floatToByte(S.blue),w.w=V.floatToByte(S.alpha),x.setBatchedAttribute(g,y-1,w)}e._batchTable=x,e._batchTableAttributeIndices=c,e._batchTableBoundingSphereAttributeIndices=u,e._batchTableOffsetAttribute2DIndex=f}function XUe(e){let t;return Array.isArray(e.values)?t=e.values.slice(0):t=new e.values.constructor(e.values),new Me({componentDatatype:e.componentDatatype,componentsPerAttribute:e.componentsPerAttribute,normalize:e.normalize,values:t})}function KUe(e){let t=e.attributes,n=new pn;for(let o in t)t.hasOwnProperty(o)&&l(t[o])&&(n[o]=XUe(t[o]));let i;if(l(e.indices)){let o=e.indices;Array.isArray(o)?i=o.slice(0):i=new o.constructor(o)}return new At({attributes:n,indices:i,primitiveType:e.primitiveType,boundingSphere:ce.clone(e.boundingSphere)})}function QUe(e,t){return{geometry:t,attributes:e.attributes,modelMatrix:M.clone(e.modelMatrix),pickPrimitive:e.pickPrimitive,id:e.id}}var $Ue=/in\s+vec(?:3|4)\s+(.*)3DHigh;/g;ea._modifyShaderPosition=function(e,t,n){let i,o="",r="",a="";for(;(i=$Ue.exec(t))!==null;){let s=i[1],c=`vec4 czm_compute${s[0].toUpperCase()}${s.substr(1)}()`;c!=="vec4 czm_computePosition()"&&(o+=`${c};
- `),l(e.rtcCenter)?(t=t.replace(/in\s+vec(?:3|4)\s+position3DHigh;/g,""),t=t.replace(/in\s+vec(?:3|4)\s+position3DLow;/g,""),o+=`uniform mat4 u_modifiedModelView;
- `,r+=`in vec4 position;
- `,a+=`${c}
- {
- return u_modifiedModelView * position;
- }
-
- `,t=t.replace(/czm_modelViewRelativeToEye\s+\*\s+/g,""),t=t.replace(/czm_modelViewProjectionRelativeToEye/g,"czm_projection")):n?a+=`${c}
- {
- return czm_translateRelativeToEye(${s}3DHigh, ${s}3DLow);
- }
-
- `:(r+=`in vec3 ${s}2DHigh;
- in vec3 ${s}2DLow;
- `,a+=`${c}
- {
- vec4 p;
- if (czm_morphTime == 1.0)
- {
- p = czm_translateRelativeToEye(${s}3DHigh, ${s}3DLow);
- }
- else if (czm_morphTime == 0.0)
- {
- p = czm_translateRelativeToEye(${s}2DHigh.zxy, ${s}2DLow.zxy);
- }
- else
- {
- p = czm_columbusViewMorph(
- czm_translateRelativeToEye(${s}2DHigh.zxy, ${s}2DLow.zxy),
- czm_translateRelativeToEye(${s}3DHigh, ${s}3DLow),
- czm_morphTime);
- }
- return p;
- }
-
- `)}return[o,r,t,a].join(`
- `)};ea._appendShowToShader=function(e,t){return l(e._batchTableAttributeIndices.show)?`${He.replaceMain(t,"czm_non_show_main")}
- void main()
- {
- czm_non_show_main();
- gl_Position *= czm_batchTable_show(batchId);
- }`:t};ea._updateColorAttribute=function(e,t,n){if(!l(e._batchTableAttributeIndices.color)&&!l(e._batchTableAttributeIndices.depthFailColor)||t.search(/in\s+vec4\s+color;/g)===-1)return t;let i=t;return i=i.replace(/in\s+vec4\s+color;/g,""),n?i=i.replace(/(\b)color(\b)/g,"$1czm_batchTable_depthFailColor(batchId)$2"):i=i.replace(/(\b)color(\b)/g,"$1czm_batchTable_color(batchId)$2"),i};function Gle(e){return`${He.replaceMain(e,"czm_non_pick_main")}
- out vec4 v_pickColor;
- void main()
- {
- czm_non_pick_main();
- v_pickColor = czm_batchTable_pickColor(batchId);
- }`}function Hle(e){return`in vec4 v_pickColor;
- ${e}`}ea._updatePickColorAttribute=function(e){let t=e.replace(/in\s+vec4\s+pickColor;/g,"");return t=t.replace(/(\b)pickColor(\b)/g,"$1czm_batchTable_pickColor(batchId)$2"),t};ea._appendOffsetToShader=function(e,t){if(!l(e._batchTableAttributeIndices.offset))return t;let n=`in float batchId;
- `;n+="in float applyOffset;";let i=t.replace(/in\s+float\s+batchId;/g,n),o=`vec4 $1 = czm_computePosition();
- `;return o+=` if (czm_sceneMode == czm_sceneMode3D)
- `,o+=` {
- `,o+=" $1 = $1 + vec4(czm_batchTable_offset(batchId) * applyOffset, 0.0);",o+=` }
- `,o+=` else
- `,o+=` {
- `,o+=" $1 = $1 + vec4(czm_batchTable_offset2D(batchId) * applyOffset, 0.0);",o+=` }
- `,i=i.replace(/vec4\s+([A-Za-z0-9_]+)\s+=\s+czm_computePosition\(\);/g,o),i};ea._appendDistanceDisplayConditionToShader=function(e,t,n){if(!l(e._batchTableAttributeIndices.distanceDisplayCondition))return t;let i=He.replaceMain(t,"czm_non_distanceDisplayCondition_main"),o=`void main()
- {
- czm_non_distanceDisplayCondition_main();
- vec2 distanceDisplayCondition = czm_batchTable_distanceDisplayCondition(batchId);
- vec3 boundingSphereCenter3DHigh = czm_batchTable_boundingSphereCenter3DHigh(batchId);
- vec3 boundingSphereCenter3DLow = czm_batchTable_boundingSphereCenter3DLow(batchId);
- float boundingSphereRadius = czm_batchTable_boundingSphereRadius(batchId);
- `;return n?o+=` vec4 centerRTE = czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow);
- `:o+=` vec3 boundingSphereCenter2DHigh = czm_batchTable_boundingSphereCenter2DHigh(batchId);
- vec3 boundingSphereCenter2DLow = czm_batchTable_boundingSphereCenter2DLow(batchId);
- vec4 centerRTE;
- if (czm_morphTime == 1.0)
- {
- centerRTE = czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow);
- }
- else if (czm_morphTime == 0.0)
- {
- centerRTE = czm_translateRelativeToEye(boundingSphereCenter2DHigh.zxy, boundingSphereCenter2DLow.zxy);
- }
- else
- {
- centerRTE = czm_columbusViewMorph(
- czm_translateRelativeToEye(boundingSphereCenter2DHigh.zxy, boundingSphereCenter2DLow.zxy),
- czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow),
- czm_morphTime);
- }
- `,o+=` float radiusSq = boundingSphereRadius * boundingSphereRadius;
- float distanceSq;
- if (czm_sceneMode == czm_sceneMode2D)
- {
- distanceSq = czm_eyeHeight2D.y - radiusSq;
- }
- else
- {
- distanceSq = dot(centerRTE.xyz, centerRTE.xyz) - radiusSq;
- }
- distanceSq = max(distanceSq, 0.0);
- float nearSq = distanceDisplayCondition.x * distanceDisplayCondition.x;
- float farSq = distanceDisplayCondition.y * distanceDisplayCondition.y;
- float show = (distanceSq >= nearSq && distanceSq <= farSq) ? 1.0 : 0.0;
- gl_Position *= show;
- }`,`${i}
- ${o}`};function Wle(e,t){if(!e.compressVertices)return t;let n=t.search(/in\s+vec3\s+normal;/g)!==-1,i=t.search(/in\s+vec2\s+st;/g)!==-1;if(!n&&!i)return t;let o=t.search(/in\s+vec3\s+tangent;/g)!==-1,r=t.search(/in\s+vec3\s+bitangent;/g)!==-1,a=i&&n?2:1;a+=o||r?1:0;let s=a>1?`vec${a}`:"float",c="compressedAttributes",u=`in ${s} ${c};`,f="",d="";if(i){f+=`vec2 st;
- `;let m=a>1?`${c}.x`:c;d+=` st = czm_decompressTextureCoordinates(${m});
- `}n&&o&&r?(f+=`vec3 normal;
- vec3 tangent;
- vec3 bitangent;
- `,d+=` czm_octDecode(${c}.${i?"yz":"xy"}, normal, tangent, bitangent);
- `):(n&&(f+=`vec3 normal;
- `,d+=` normal = czm_octDecode(${c}${a>1?`.${i?"y":"x"}`:""});
- `),o&&(f+=`vec3 tangent;
- `,d+=` tangent = czm_octDecode(${c}.${i&&n?"z":"y"});
- `),r&&(f+=`vec3 bitangent;
- `,d+=` bitangent = czm_octDecode(${c}.${i&&n?"z":"y"});
- `));let p=t;p=p.replace(/in\s+vec3\s+normal;/g,""),p=p.replace(/in\s+vec2\s+st;/g,""),p=p.replace(/in\s+vec3\s+tangent;/g,""),p=p.replace(/in\s+vec3\s+bitangent;/g,""),p=He.replaceMain(p,"czm_non_compressed_main");let g=`void main()
- {
- ${d} czm_non_compressed_main();
- }`;return[u,f,p,g].join(`
- `)}function JUe(e){let t=He.replaceMain(e,"czm_non_depth_clamp_main");return t+=`void main() {
- czm_non_depth_clamp_main();
- gl_Position = czm_depthClamp(gl_Position);}
- `,t}function ZUe(e){let t=He.replaceMain(e,"czm_non_depth_clamp_main");return t+=`void main() {
- czm_non_depth_clamp_main();
- #if defined(LOG_DEPTH)
- czm_writeLogDepth();
- #else
- czm_writeDepthClamp();
- #endif
- }
- `,t}function qle(e,t){let n=e.vertexAttributes}function eVe(e,t){return function(){return e[t]}}var Cq=Math.max(sn.hardwareConcurrency-1,1),N8,tVe=new Gn("combineGeometry");function nVe(e,t){let n,i,o,r,a=e._instanceIds;if(e._state===Zr.READY){n=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances];let s=e._numberOfInstances=n.length,c=[],u=[];for(o=0;o<s;++o)i=n[o].geometry,a.push(n[o].id),u.push({moduleName:i._workerName,modulePath:i._workerPath,geometry:i});if(!l(N8))for(N8=new Array(Cq),o=0;o<Cq;o++)N8[o]=new Gn("createGeometry");let f;for(u=lO(u,Cq),o=0;o<u.length;o++){let d=0,p=u[o],g=p.length;for(r=0;r<g;++r)f=p[r],i=f.geometry,l(i.constructor.pack)&&(f.offset=d,d+=i.constructor.packedLength??i.packedLength);let m;if(d>0){let A=new Float64Array(d);for(m=[A.buffer],r=0;r<g;++r)f=p[r],i=f.geometry,l(i.constructor.pack)&&(i.constructor.pack(i,A,f.offset),f.geometry=A)}c.push(N8[o].scheduleTask({subTasks:u[o]},m))}e._state=Zr.CREATING,Promise.all(c).then(function(d){e._createGeometryResults=d,e._state=Zr.CREATED}).catch(function(d){hO(e,t,Zr.FAILED,d)})}else if(e._state===Zr.CREATED){let s=[];n=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances];let c=t.scene3DOnly,u=t.mapProjection,f=tVe.scheduleTask(Nx.packCombineGeometryParameters({createGeometryResults:e._createGeometryResults,instances:n,ellipsoid:u.ellipsoid,projection:u,elementIndexUintSupported:t.context.elementIndexUint,scene3DOnly:c,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e._createPickOffsets},s),s);e._createGeometryResults=void 0,e._state=Zr.COMBINING,Promise.resolve(f).then(function(d){let p=Nx.unpackCombineGeometryResults(d);e._geometries=p.geometries,e._attributeLocations=p.attributeLocations,e.modelMatrix=M.clone(p.modelMatrix,e.modelMatrix),e._pickOffsets=p.pickOffsets,e._offsetInstanceExtend=p.offsetInstanceExtend,e._instanceBoundingSpheres=p.boundingSpheres,e._instanceBoundingSpheresCV=p.boundingSpheresCV,l(e._geometries)&&e._geometries.length>0?(e._recomputeBoundingSpheres=!0,e._state=Zr.COMBINED):hO(e,t,Zr.FAILED,void 0)}).catch(function(d){hO(e,t,Zr.FAILED,d)})}}function iVe(e,t){let n=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances],i=e._numberOfInstances=n.length,o=new Array(i),r=e._instanceIds,a,s,c=0;for(s=0;s<i;s++){a=n[s];let p=a.geometry,g;l(p.attributes)&&l(p.primitiveType)?g=KUe(p):g=p.constructor.createGeometry(p),o[c++]=QUe(a,g),r.push(a.id)}o.length=c;let u=t.scene3DOnly,f=t.mapProjection,d=Nx.combineGeometry({instances:o,ellipsoid:f.ellipsoid,projection:f,elementIndexUintSupported:t.context.elementIndexUint,scene3DOnly:u,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e._createPickOffsets});e._geometries=d.geometries,e._attributeLocations=d.attributeLocations,e.modelMatrix=M.clone(d.modelMatrix,e.modelMatrix),e._pickOffsets=d.pickOffsets,e._offsetInstanceExtend=d.offsetInstanceExtend,e._instanceBoundingSpheres=d.boundingSpheres,e._instanceBoundingSpheresCV=d.boundingSpheresCV,l(e._geometries)&&e._geometries.length>0?(e._recomputeBoundingSpheres=!0,e._state=Zr.COMBINED):hO(e,t,Zr.FAILED,void 0)}function oVe(e,t){let n=e._batchTableAttributeIndices.offset;if(!e._recomputeBoundingSpheres||!l(n)){e._recomputeBoundingSpheres=!1;return}let i,o=e._offsetInstanceExtend,r=e._instanceBoundingSpheres,a=r.length,s=e._tempBoundingSpheres;if(!l(s)){for(s=new Array(a),i=0;i<a;i++)s[i]=new ce;e._tempBoundingSpheres=s}for(i=0;i<a;++i){let A=s[i],y=e._batchTable.getBatchedAttribute(i,n,new h);A=r[i].clone(A),nue(A,y,o[i])}let c=[],u=[],f=[];for(i=0;i<a;++i){let A=s[i];A.center.x-A.radius>0||ce.intersectPlane(A,en.ORIGIN_ZX_PLANE)!==qt.INTERSECTING?c.push(A):(u.push(A),f.push(A))}let d=c[0],p=f[0],g=u[0];for(i=1;i<c.length;i++)d=ce.union(d,c[i]);for(i=1;i<f.length;i++)p=ce.union(p,f[i]);for(i=1;i<u.length;i++)g=ce.union(g,u[i]);let m=[];for(l(d)&&m.push(d),l(p)&&m.push(p),l(g)&&m.push(g),i=0;i<m.length;i++){let A=m[i].clone(e._boundingSpheres[i]);e._boundingSpheres[i]=A,e._boundingSphereCV[i]=ce.projectTo2D(A,t.mapProjection,e._boundingSphereCV[i])}ea._updateBoundingVolumes(e,t,e.modelMatrix,!0),e._recomputeBoundingSpheres=!1}var Yle=new xn,Zle=new de,eue=new h,tue=new ce;function rVe(e,t){if(!l(e._batchTableAttributeIndices.distanceDisplayCondition)||e._batchTableBoundingSpheresUpdated)return;let i=e._batchTableBoundingSphereAttributeIndices,o=i.center3DHigh,r=i.center3DLow,a=i.center2DHigh,s=i.center2DLow,c=i.radius,u=t.mapProjection,f=u.ellipsoid,d=e._batchTable,p=e._instanceBoundingSpheres,g=p.length;for(let m=0;m<g;++m){let A=p[m];if(!l(A))continue;let y=e.modelMatrix;l(y)&&(A=ce.transform(A,y,tue));let x=A.center,b=A.radius,C=xn.fromCartesian(x,Yle);if(d.setBatchedAttribute(m,o,C.high),d.setBatchedAttribute(m,r,C.low),!t.scene3DOnly){let E=f.cartesianToCartographic(x,Zle),S=u.project(E,eue);C=xn.fromCartesian(S,Yle),d.setBatchedAttribute(m,a,C.high),d.setBatchedAttribute(m,s,C.low)}d.setBatchedAttribute(m,c,b)}e._batchTableBoundingSpheresUpdated=!0}var Tq=new h,aVe=new h;function Xle(e,t){if(!l(e._batchTableAttributeIndices.offset)||e._batchTableOffsetsUpdated||t.scene3DOnly)return;let i=e._batchTableOffsetAttribute2DIndex,o=t.mapProjection,r=o.ellipsoid,a=e._batchTable,s=e._instanceBoundingSpheres,c=s.length;for(let u=0;u<c;++u){let f=s[u];if(!l(f))continue;let d=a.getBatchedAttribute(u,e._batchTableAttributeIndices.offset);if(h.equals(d,h.ZERO)){a.setBatchedAttribute(u,i,h.ZERO);continue}let p=e.modelMatrix;l(p)&&(f=ce.transform(f,p,tue));let g=f.center;g=r.scaleToGeodeticSurface(g,aVe);let m=r.cartesianToCartographic(g,Zle),A=o.project(m,eue),y=h.add(d,g,Tq);m=r.cartesianToCartographic(y,m);let x=o.project(m,Tq),b=h.subtract(x,A,Tq),C=b.x;b.x=b.z,b.z=b.y,b.y=C,a.setBatchedAttribute(u,i,b)}e._batchTableOffsetsUpdated=!0}function sVe(e,t){let n=e._attributeLocations,i=e._geometries,o=t.scene3DOnly,r=t.context,a=[],s=i.length;for(let c=0;c<s;++c){let u=i[c];if(a.push(Fn.fromGeometry({context:r,geometry:u,attributeLocations:n,bufferUsage:Oe.STATIC_DRAW,interleave:e._interleave})),l(e._createBoundingVolumeFunction))e._createBoundingVolumeFunction(t,u);else if(e._boundingSpheres.push(ce.clone(u.boundingSphere)),e._boundingSphereWC.push(new ce),!o){let f=u.boundingSphereCV.center,d=f.x,p=f.y,g=f.z;f.x=g,f.y=d,f.z=p,e._boundingSphereCV.push(ce.clone(u.boundingSphereCV)),e._boundingSphere2D.push(new ce),e._boundingSphereMorph.push(new ce)}}e._va=a,e._primitiveType=i[0].primitiveType,e.releaseGeometryInstances&&(e.geometryInstances=void 0),e._geometries=void 0,hO(e,t,Zr.COMPLETE,void 0)}function cVe(e,t,n,i){let o=n.getRenderState(),r;i?(r=We(o,!1),r.cull={enabled:!0,face:Mi.BACK},e._frontFaceRS=Ve.fromCache(r),r.cull.face=Mi.FRONT,e._backFaceRS=Ve.fromCache(r)):(e._frontFaceRS=Ve.fromCache(o),e._backFaceRS=e._frontFaceRS),r=We(o,!1),l(e._depthFailAppearance)&&(r.depthTest.enabled=!1),l(e._depthFailAppearance)&&(o=e._depthFailAppearance.getRenderState(),r=We(o,!1),r.depthTest.func=tc.GREATER,i?(r.cull={enabled:!0,face:Mi.BACK},e._frontFaceDepthFailRS=Ve.fromCache(r),r.cull.face=Mi.FRONT,e._backFaceDepthFailRS=Ve.fromCache(r)):(e._frontFaceDepthFailRS=Ve.fromCache(r),e._backFaceDepthFailRS=e._frontFaceRS))}function lVe(e,t,n){let i=t.context,o=e._attributeLocations,r=e._batchTable.getVertexShaderCallback()(n.vertexShaderSource);r=ea._appendOffsetToShader(e,r),r=ea._appendShowToShader(e,r),r=ea._appendDistanceDisplayConditionToShader(e,r,t.scene3DOnly),r=Gle(r),r=ea._updateColorAttribute(e,r,!1),r=Wle(e,r),r=ea._modifyShaderPosition(e,r,t.scene3DOnly);let a=n.getFragmentShaderSource();a=Hle(a),e._sp=Kt.replaceCache({context:i,shaderProgram:e._sp,vertexShaderSource:r,fragmentShaderSource:a,attributeLocations:o}),qle(e._sp,o),l(e._depthFailAppearance)&&(r=e._batchTable.getVertexShaderCallback()(e._depthFailAppearance.vertexShaderSource),r=ea._appendShowToShader(e,r),r=ea._appendDistanceDisplayConditionToShader(e,r,t.scene3DOnly),r=Gle(r),r=ea._updateColorAttribute(e,r,!0),r=Wle(e,r),r=ea._modifyShaderPosition(e,r,t.scene3DOnly),r=JUe(r),a=e._depthFailAppearance.getFragmentShaderSource(),a=Hle(a),a=ZUe(a),e._spDepthFail=Kt.replaceCache({context:i,shaderProgram:e._spDepthFail,vertexShaderSource:r,fragmentShaderSource:a,attributeLocations:o}),qle(e._spDepthFail,o))}var dO=new M,Kle=new h;function Qle(e,t,n,i){let o=l(n)?n._uniforms:void 0,r={},a=t.uniforms;if(l(a))for(let c in a)a.hasOwnProperty(c)&&(r[c]=eVe(a,c));let s=wt(r,o);return s=e._batchTable.getUniformMapCallback()(s),l(e.rtcCenter)&&(s.u_modifiedModelView=function(){let c=i.context.uniformState.view;return M.multiply(c,e._modelMatrix,dO),M.multiplyByPoint(dO,e.rtcCenter,Kle),M.setTranslation(dO,Kle,dO),dO}),s}function uVe(e,t,n,i,o,r,a,s){let c=Qle(e,t,n,s),u;l(e._depthFailAppearance)&&(u=Qle(e,e._depthFailAppearance,e._depthFailAppearance.material,s));let f=i?Ie.TRANSLUCENT:Ie.OPAQUE,d=o?2:1;d*=l(e._depthFailAppearance)?2:1,r.length=e._va.length*d;let p=r.length,g=0;for(let m=0;m<p;++m){let A;o&&(A=r[m],l(A)||(A=r[m]=new tt({owner:e,primitiveType:e._primitiveType})),A.vertexArray=e._va[g],A.renderState=e._backFaceRS,A.shaderProgram=e._sp,A.uniformMap=c,A.pass=f,++m),A=r[m],l(A)||(A=r[m]=new tt({owner:e,primitiveType:e._primitiveType})),A.vertexArray=e._va[g],A.renderState=e._frontFaceRS,A.shaderProgram=e._sp,A.uniformMap=c,A.pass=f,l(e._depthFailAppearance)&&(o&&(++m,A=r[m],l(A)||(A=r[m]=new tt({owner:e,primitiveType:e._primitiveType})),A.vertexArray=e._va[g],A.renderState=e._backFaceDepthFailRS,A.shaderProgram=e._spDepthFail,A.uniformMap=u,A.pass=f),++m,A=r[m],l(A)||(A=r[m]=new tt({owner:e,primitiveType:e._primitiveType})),A.vertexArray=e._va[g],A.renderState=e._frontFaceDepthFailRS,A.shaderProgram=e._spDepthFail,A.uniformMap=u,A.pass=f),++g}}ea._updateBoundingVolumes=function(e,t,n,i){let o,r,a;if(i||!M.equals(n,e._modelMatrix))for(M.clone(n,e._modelMatrix),r=e._boundingSpheres.length,o=0;o<r;++o)a=e._boundingSpheres[o],l(a)&&(e._boundingSphereWC[o]=ce.transform(a,n,e._boundingSphereWC[o]),t.scene3DOnly||(e._boundingSphere2D[o]=ce.clone(e._boundingSphereCV[o],e._boundingSphere2D[o]),e._boundingSphereMorph[o]=ce.union(e._boundingSphereWC[o],e._boundingSphereCV[o])));let s=e.appearance.pixelSize;if(l(s))for(r=e._boundingSpheres.length,o=0;o<r;++o){a=e._boundingSpheres[o];let c=e._boundingSphereWC[o],f=t.camera.getPixelSize(a,t.context.drawingBufferWidth,t.context.drawingBufferHeight)*s;c.radius=a.radius+f}};function fVe(e,t,n,i,o,r,a,s){ea._updateBoundingVolumes(e,t,o);let c;t.mode===ie.SCENE3D?c=e._boundingSphereWC:t.mode===ie.COLUMBUS_VIEW?c=e._boundingSphereCV:t.mode===ie.SCENE2D&&l(e._boundingSphere2D)?c=e._boundingSphere2D:l(e._boundingSphereMorph)&&(c=e._boundingSphereMorph);let u=t.commandList,f=t.passes;if(f.render||f.pick){let d=e.allowPicking,p=vn.castShadows(e.shadows),g=vn.receiveShadows(e.shadows),m=n.length,A=s?2:1;A*=l(e._depthFailAppearance)?2:1;for(let y=0;y<m;++y){let x=Math.floor(y/A),b=n[y];b.modelMatrix=o,b.boundingVolume=c[x],b.cull=r,b.debugShowBoundingVolume=a,b.castShadows=p,b.receiveShadows=g,d?b.pickId="v_pickColor":b.pickId=void 0,u.push(b)}}}ea.prototype.update=function(e){if(!l(this.geometryInstances)&&this._va.length===0||l(this.geometryInstances)&&Array.isArray(this.geometryInstances)&&this.geometryInstances.length===0||!l(this.appearance)||e.mode!==ie.SCENE3D&&e.scene3DOnly||!e.passes.render&&!e.passes.pick)return;if(l(this._error))throw this._error;if(this._state===Zr.FAILED)return;let t=e.context;if(l(this._batchTable)||YUe(this,t),this._batchTable.attributes.length>0){if(Rt.maximumVertexTextureImageUnits===0)throw new re("Vertex texture fetch support is required to render primitives with per-instance attributes. The maximum number of vertex texture image units must be greater than zero.");this._batchTable.update(e)}if(this._state!==Zr.COMPLETE&&this._state!==Zr.COMBINED&&(this.asynchronous?nVe(this,e):iVe(this,e)),this._state===Zr.COMBINED&&(rVe(this,e),Xle(this,e),sVe(this,e)),!this.show||this._state!==Zr.COMPLETE)return;this._batchTableOffsetsUpdated||Xle(this,e),this._recomputeBoundingSpheres&&oVe(this,e);let n=this.appearance,i=n.material,o=!1,r=!1;this._appearance!==n?(this._appearance=n,this._material=i,o=!0,r=!0):this._material!==i&&(this._material=i,r=!0);let a=this.depthFailAppearance,s=l(a)?a.material:void 0;this._depthFailAppearance!==a?(this._depthFailAppearance=a,this._depthFailMaterial=s,o=!0,r=!0):this._depthFailMaterial!==s&&(this._depthFailMaterial=s,r=!0);let c=this._appearance.isTranslucent();this._translucent!==c&&(this._translucent=c,o=!0),l(this._material)&&this._material.update(t);let u=n.closed&&c;o&&(this._createRenderStatesFunction??cVe)(this,t,n,u),r&&(this._createShaderProgramFunction??lVe)(this,e,n),(o||r)&&(this._createCommandsFunction??uVe)(this,n,i,c,u,this._colorCommands,this._pickCommands,e),(this._updateAndQueueCommandsFunction??fVe)(this,e,this._colorCommands,this._pickCommands,this.modelMatrix,this.cull,this.debugShowBoundingVolume,u)};var dVe=new ce,hVe=new ce;function nue(e,t,n){if(n===ln.TOP){let i=ce.clone(e,dVe),o=ce.clone(e,hVe);o.center=h.add(o.center,t,o.center),e=ce.union(i,o,e)}else n===ln.ALL&&(e.center=h.add(e.center,t,e.center));return e}function mVe(e,t,n){return function(){let i=e.getBatchedAttribute(t,n),o=e.attributes[n],r=o.componentsPerAttribute,a=Y.createTypedArray(o.componentDatatype,r);return l(i.constructor.pack)?i.constructor.pack(i,a,0):a[0]=i,a}}function pVe(e,t,n,i,o){return function(r){let a=Jle(r);e.setBatchedAttribute(t,n,a),o==="offset"&&(i._recomputeBoundingSpheres=!0,i._batchTableOffsetsUpdated=!1)}}var gVe=new h;function _Ve(e,t,n){t.boundingSphere={get:function(){let i=e._instanceBoundingSpheres[n];if(l(i)){i=i.clone();let o=e.modelMatrix,r=t.offset;l(r)&&nue(i,h.fromArray(r.get(),0,gVe),e._offsetInstanceExtend[n]),l(o)&&(i=ce.transform(i,o))}return i}},t.boundingSphereCV={get:function(){return e._instanceBoundingSpheresCV[n]}}}function AVe(e,t,n){t.pickId={get:function(){return e._pickIds[n]}}}ea.prototype.getGeometryInstanceAttributes=function(e){let t=this._perInstanceAttributeCache.get(e);if(l(t))return t;let n=-1,i=this._lastPerInstanceAttributeIndex,o=this._instanceIds,r=o.length;for(let u=0;u<r;++u){let f=(i+u)%r;if(e===o[f]){n=f;break}}if(n===-1)return;let a=this._batchTable,s=this._batchTableAttributeIndices;t={};let c={};for(let u in s)if(s.hasOwnProperty(u)){let f=s[u];c[u]={get:mVe(a,n,f),set:pVe(a,n,f,this,u)}}return _Ve(this,c,n),AVe(this,c,n),Object.defineProperties(t,c),this._lastPerInstanceAttributeIndex=n,this._perInstanceAttributeCache.set(e,t),t};ea.prototype.isDestroyed=function(){return!1};ea.prototype.destroy=function(){let e,t;this._sp=this._sp&&this._sp.destroy(),this._spDepthFail=this._spDepthFail&&this._spDepthFail.destroy();let n=this._va;for(e=n.length,t=0;t<e;++t)n[t].destroy();this._va=void 0;let i=this._pickIds;for(e=i.length,t=0;t<e;++t)i[t].destroy();return this._pickIds=void 0,this._batchTable=this._batchTable&&this._batchTable.destroy(),this._instanceIds=void 0,this._perInstanceAttributeCache=void 0,this._attributeLocations=void 0,fe(this)};function hO(e,t,n,i){e._error=i,e._state=n,t.afterRender.push(function(){return e._ready=e._state===Zr.COMPLETE||e._state===Zr.FAILED,!0})}var Dn=ea;function yVe(e){e=e??G.EMPTY_OBJECT,this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=e.normalize??!1,this.value=e.value}var Zc=yVe;var FE=`#ifdef TEXTURE_COORDINATES
- #ifdef SPHERICAL
- in vec4 v_sphericalExtents;
- #else // SPHERICAL
- in vec2 v_inversePlaneExtents;
- in vec4 v_westPlane;
- in vec4 v_southPlane;
- #endif // SPHERICAL
- in vec3 v_uvMinAndSphericalLongitudeRotation;
- in vec3 v_uMaxAndInverseDistance;
- in vec3 v_vMaxAndInverseDistance;
- #endif // TEXTURE_COORDINATES
-
- #ifdef PER_INSTANCE_COLOR
- in vec4 v_color;
- #endif
-
- #ifdef NORMAL_EC
- vec3 getEyeCoordinate3FromWindowCoordinate(vec2 fragCoord, float logDepthOrDepth) {
- vec4 eyeCoordinate = czm_windowToEyeCoordinates(fragCoord, logDepthOrDepth);
- return eyeCoordinate.xyz / eyeCoordinate.w;
- }
-
- vec3 vectorFromOffset(vec4 eyeCoordinate, vec2 positiveOffset) {
- vec2 glFragCoordXY = gl_FragCoord.xy;
- // Sample depths at both offset and negative offset
- float upOrRightLogDepth = czm_unpackDepth(texture(czm_globeDepthTexture, (glFragCoordXY + positiveOffset) / czm_viewport.zw));
- float downOrLeftLogDepth = czm_unpackDepth(texture(czm_globeDepthTexture, (glFragCoordXY - positiveOffset) / czm_viewport.zw));
- // Explicitly evaluate both paths
- // Necessary for multifrustum and for edges of the screen
- bvec2 upOrRightInBounds = lessThan(glFragCoordXY + positiveOffset, czm_viewport.zw);
- float useUpOrRight = float(upOrRightLogDepth > 0.0 && upOrRightInBounds.x && upOrRightInBounds.y);
- float useDownOrLeft = float(useUpOrRight == 0.0);
- vec3 upOrRightEC = getEyeCoordinate3FromWindowCoordinate(glFragCoordXY + positiveOffset, upOrRightLogDepth);
- vec3 downOrLeftEC = getEyeCoordinate3FromWindowCoordinate(glFragCoordXY - positiveOffset, downOrLeftLogDepth);
- return (upOrRightEC - (eyeCoordinate.xyz / eyeCoordinate.w)) * useUpOrRight + ((eyeCoordinate.xyz / eyeCoordinate.w) - downOrLeftEC) * useDownOrLeft;
- }
- #endif // NORMAL_EC
-
- void main(void)
- {
- #ifdef REQUIRES_EC
- float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw));
- vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);
- #endif
-
- #ifdef REQUIRES_WC
- vec4 worldCoordinate4 = czm_inverseView * eyeCoordinate;
- vec3 worldCoordinate = worldCoordinate4.xyz / worldCoordinate4.w;
- #endif
-
- #ifdef TEXTURE_COORDINATES
- vec2 uv;
- #ifdef SPHERICAL
- // Treat world coords as a sphere normal for spherical coordinates
- vec2 sphericalLatLong = czm_approximateSphericalCoordinates(worldCoordinate);
- sphericalLatLong.y += v_uvMinAndSphericalLongitudeRotation.z;
- sphericalLatLong.y = czm_branchFreeTernary(sphericalLatLong.y < czm_pi, sphericalLatLong.y, sphericalLatLong.y - czm_twoPi);
- uv.x = (sphericalLatLong.y - v_sphericalExtents.y) * v_sphericalExtents.w;
- uv.y = (sphericalLatLong.x - v_sphericalExtents.x) * v_sphericalExtents.z;
- #else // SPHERICAL
- // Unpack planes and transform to eye space
- uv.x = czm_planeDistance(v_westPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.x;
- uv.y = czm_planeDistance(v_southPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.y;
- #endif // SPHERICAL
- #endif // TEXTURE_COORDINATES
-
- #ifdef CULL_FRAGMENTS
- // When classifying translucent geometry, logDepthOrDepth == 0.0
- // indicates a region that should not be classified, possibly due to there
- // being opaque pixels there in another buffer.
- if (uv.x <= 0.0 || 1.0 <= uv.x || uv.y <= 0.0 || 1.0 <= uv.y || logDepthOrDepth == 0.0) {
- discard;
- }
- #endif
-
- #ifdef PICK
- out_FragColor.a = 1.0; // Explicitly set the alpha, otherwise this may be discarded by ShaderSource.createPickFragmentShaderSource
- #ifdef CULL_FRAGMENTS
- czm_writeDepthClamp();
- #endif // CULL_FRAGMENTS
- #else // PICK
-
- #ifdef NORMAL_EC
- // Compute normal by sampling adjacent pixels in 2x2 block in screen space
- vec3 downUp = vectorFromOffset(eyeCoordinate, vec2(0.0, 1.0));
- vec3 leftRight = vectorFromOffset(eyeCoordinate, vec2(1.0, 0.0));
- vec3 normalEC = normalize(cross(leftRight, downUp));
- #endif
-
-
- #ifdef PER_INSTANCE_COLOR
-
- vec4 color = czm_gammaCorrect(v_color);
- #ifdef FLAT
- out_FragColor = color;
- #else // FLAT
- czm_materialInput materialInput;
- materialInput.normalEC = normalEC;
- materialInput.positionToEyeEC = -eyeCoordinate.xyz;
- czm_material material = czm_getDefaultMaterial(materialInput);
- material.diffuse = color.rgb;
- material.alpha = color.a;
-
- out_FragColor = czm_phong(normalize(-eyeCoordinate.xyz), material, czm_lightDirectionEC);
- #endif // FLAT
-
- // Premultiply alpha. Required for classification primitives on translucent globe.
- out_FragColor.rgb *= out_FragColor.a;
-
- #else // PER_INSTANCE_COLOR
-
- // Material support.
- // USES_ is distinct from REQUIRES_, because some things are dependencies of each other or
- // dependencies for culling but might not actually be used by the material.
-
- czm_materialInput materialInput;
-
- #ifdef USES_NORMAL_EC
- materialInput.normalEC = normalEC;
- #endif
-
- #ifdef USES_POSITION_TO_EYE_EC
- materialInput.positionToEyeEC = -eyeCoordinate.xyz;
- #endif
-
- #ifdef USES_TANGENT_TO_EYE
- materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(worldCoordinate, normalEC);
- #endif
-
- #ifdef USES_ST
- // Remap texture coordinates from computed (approximately aligned with cartographic space) to the desired
- // texture coordinate system, which typically forms a tight oriented bounding box around the geometry.
- // Shader is provided a set of reference points for remapping.
- materialInput.st.x = czm_lineDistance(v_uvMinAndSphericalLongitudeRotation.xy, v_uMaxAndInverseDistance.xy, uv) * v_uMaxAndInverseDistance.z;
- materialInput.st.y = czm_lineDistance(v_uvMinAndSphericalLongitudeRotation.xy, v_vMaxAndInverseDistance.xy, uv) * v_vMaxAndInverseDistance.z;
- #endif
-
- czm_material material = czm_getMaterial(materialInput);
-
- #ifdef FLAT
- out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
- #else // FLAT
- out_FragColor = czm_phong(normalize(-eyeCoordinate.xyz), material, czm_lightDirectionEC);
- #endif // FLAT
-
- // Premultiply alpha. Required for classification primitives on translucent globe.
- out_FragColor.rgb *= out_FragColor.a;
-
- #endif // PER_INSTANCE_COLOR
- czm_writeDepthClamp();
- #endif // PICK
- }
- `;function Cd(e,t,n){this._projectionExtentDefines={eastMostYhighDefine:"",eastMostYlowDefine:"",westMostYhighDefine:"",westMostYlowDefine:""};let i=new Eq;i.requiresTextureCoordinates=e,i.requiresEC=!n.flat;let o=new Eq;if(o.requiresTextureCoordinates=e,n instanceof dn)i.requiresNormalEC=!n.flat;else{let r=`${n.material.shaderSource}
- ${n.fragmentShaderSource}`;i.normalEC=r.indexOf("materialInput.normalEC")!==-1||r.indexOf("czm_getDefaultMaterial")!==-1,i.positionToEyeEC=r.indexOf("materialInput.positionToEyeEC")!==-1,i.tangentToEyeMatrix=r.indexOf("materialInput.tangentToEyeMatrix")!==-1,i.st=r.indexOf("materialInput.st")!==-1}this._colorShaderDependencies=i,this._pickShaderDependencies=o,this._appearance=n,this._extentsCulling=e,this._planarExtents=t}Cd.prototype.createFragmentShader=function(e){let t=this._appearance,n=this._colorShaderDependencies,i=[];!e&&!this._planarExtents&&i.push("SPHERICAL"),n.requiresEC&&i.push("REQUIRES_EC"),n.requiresWC&&i.push("REQUIRES_WC"),n.requiresTextureCoordinates&&i.push("TEXTURE_COORDINATES"),this._extentsCulling&&i.push("CULL_FRAGMENTS"),n.requiresNormalEC&&i.push("NORMAL_EC"),t instanceof dn&&i.push("PER_INSTANCE_COLOR"),n.normalEC&&i.push("USES_NORMAL_EC"),n.positionToEyeEC&&i.push("USES_POSITION_TO_EYE_EC"),n.tangentToEyeMatrix&&i.push("USES_TANGENT_TO_EYE"),n.st&&i.push("USES_ST"),t.flat&&i.push("FLAT");let o="";return t instanceof dn||(o=t.material.shaderSource),new He({defines:i,sources:[o,FE]})};Cd.prototype.createPickFragmentShader=function(e){let t=this._pickShaderDependencies,n=["PICK"];return!e&&!this._planarExtents&&n.push("SPHERICAL"),t.requiresEC&&n.push("REQUIRES_EC"),t.requiresWC&&n.push("REQUIRES_WC"),t.requiresTextureCoordinates&&n.push("TEXTURE_COORDINATES"),this._extentsCulling&&n.push("CULL_FRAGMENTS"),new He({defines:n,sources:[FE],pickColorQualifier:"in"})};Cd.prototype.createVertexShader=function(e,t,n,i){return uue(this._colorShaderDependencies,this._planarExtents,n,e,t,this._appearance,i,this._projectionExtentDefines)};Cd.prototype.createPickVertexShader=function(e,t,n,i){return uue(this._pickShaderDependencies,this._planarExtents,n,e,t,void 0,i,this._projectionExtentDefines)};var iue=new h,oue=new de,rue={high:0,low:0};function uue(e,t,n,i,o,r,a,s){let c=i.slice();if(s.eastMostYhighDefine===""){let u=oue;u.longitude=D.PI,u.latitude=0,u.height=0;let f=a.project(u,iue),d=xn.encode(f.x,rue);s.eastMostYhighDefine=`EAST_MOST_X_HIGH ${d.high.toFixed(`${d.high}`.length+1)}`,s.eastMostYlowDefine=`EAST_MOST_X_LOW ${d.low.toFixed(`${d.low}`.length+1)}`;let p=oue;p.longitude=-D.PI,p.latitude=0,p.height=0;let g=a.project(p,iue);d=xn.encode(g.x,rue),s.westMostYhighDefine=`WEST_MOST_X_HIGH ${d.high.toFixed(`${d.high}`.length+1)}`,s.westMostYlowDefine=`WEST_MOST_X_LOW ${d.low.toFixed(`${d.low}`.length+1)}`}return n&&(c.push(s.eastMostYhighDefine),c.push(s.eastMostYlowDefine),c.push(s.westMostYhighDefine),c.push(s.westMostYlowDefine)),l(r)&&r instanceof dn&&c.push("PER_INSTANCE_COLOR"),e.requiresTextureCoordinates&&(c.push("TEXTURE_COORDINATES"),t||n||c.push("SPHERICAL"),n&&c.push("COLUMBUS_VIEW_2D")),new He({defines:c,sources:[o]})}function Eq(){this._requiresEC=!1,this._requiresWC=!1,this._requiresNormalEC=!1,this._requiresTextureCoordinates=!1,this._usesNormalEC=!1,this._usesPositionToEyeEC=!1,this._usesTangentToEyeMat=!1,this._usesSt=!1}Object.defineProperties(Eq.prototype,{requiresEC:{get:function(){return this._requiresEC},set:function(e){this._requiresEC=e||this._requiresEC}},requiresWC:{get:function(){return this._requiresWC},set:function(e){this._requiresWC=e||this._requiresWC,this.requiresEC=this._requiresWC}},requiresNormalEC:{get:function(){return this._requiresNormalEC},set:function(e){this._requiresNormalEC=e||this._requiresNormalEC,this.requiresEC=this._requiresNormalEC}},requiresTextureCoordinates:{get:function(){return this._requiresTextureCoordinates},set:function(e){this._requiresTextureCoordinates=e||this._requiresTextureCoordinates,this.requiresWC=this._requiresTextureCoordinates}},normalEC:{set:function(e){this.requiresNormalEC=e,this._usesNormalEC=e},get:function(){return this._usesNormalEC}},tangentToEyeMatrix:{set:function(e){this.requiresWC=e,this.requiresNormalEC=e,this._usesTangentToEyeMat=e},get:function(){return this._usesTangentToEyeMat}},positionToEyeEC:{set:function(e){this.requiresEC=e,this._usesPositionToEyeEC=e},get:function(){return this._usesPositionToEyeEC}},st:{set:function(e){this.requiresTextureCoordinates=e,this._usesSt=e},get:function(){return this._usesSt}}});function aue(e,t,n){return Math.abs((t.y-e.y)*n.x-(t.x-e.x)*n.y+t.x*e.y-t.y*e.x)/z.distance(t,e)}var xVe=[new z,new z,new z,new z];function fue(e,t){let n=xVe,i=z.unpack(t,0,n[0]),o=z.unpack(t,2,n[1]),r=z.unpack(t,4,n[2]);e.uMaxVmax=new Zc({componentDatatype:Y.FLOAT,componentsPerAttribute:4,normalize:!1,value:[o.x,o.y,r.x,r.y]});let a=1/aue(i,o,r),s=1/aue(i,r,o);e.uvMinAndExtents=new Zc({componentDatatype:Y.FLOAT,componentsPerAttribute:4,normalize:!1,value:[i.x,i.y,a,s]})}var due=new de,hue=new h,bVe=new h,CVe=new h,F8={high:0,low:0};function mue(e,t,n){let i=due;i.height=0,i.longitude=e.west,i.latitude=e.south;let o=t.project(i,hue);i.latitude=e.north;let r=t.project(i,bVe);i.longitude=e.east,i.latitude=e.south;let a=t.project(i,CVe),s=[0,0,0,0],c=[0,0,0,0],u=xn.encode(o.x,F8);s[0]=u.high,c[0]=u.low,u=xn.encode(o.y,F8),s[1]=u.high,c[1]=u.low,u=xn.encode(r.y,F8),s[2]=u.high,c[2]=u.low,u=xn.encode(a.x,F8),s[3]=u.high,c[3]=u.low,n.planes2D_HIGH=new Zc({componentDatatype:Y.FLOAT,componentsPerAttribute:4,normalize:!1,value:s}),n.planes2D_LOW=new Zc({componentDatatype:Y.FLOAT,componentsPerAttribute:4,normalize:!1,value:c})}var TVe=new M,EVe=new M,sue=new h,vVe=new de,SVe=[new de,new de,new de,new de,new de,new de,new de,new de];function wVe(e,t,n,i,o,r){let a=oe.center(e,vVe);a.height=n;let s=de.toCartesian(a,t,sue),c=pt.eastNorthUpToFixedFrame(s,t,TVe),u=M.inverse(c,EVe),f=e.west,d=e.east,p=e.north,g=e.south,m=SVe;m[0].latitude=g,m[0].longitude=f,m[1].latitude=p,m[1].longitude=f,m[2].latitude=p,m[2].longitude=d,m[3].latitude=g,m[3].longitude=d;let A=(f+d)*.5,y=(p+g)*.5;m[4].latitude=g,m[4].longitude=A,m[5].latitude=p,m[5].longitude=A,m[6].latitude=y,m[6].longitude=f,m[7].latitude=y,m[7].longitude=d;let x=Number.POSITIVE_INFINITY,b=Number.NEGATIVE_INFINITY,C=Number.POSITIVE_INFINITY,E=Number.NEGATIVE_INFINITY;for(let R=0;R<8;R++){m[R].height=n;let B=de.toCartesian(m[R],t,sue);M.multiplyByPoint(u,B,B),B.z=0,x=Math.min(x,B.x),b=Math.max(b,B.x),C=Math.min(C,B.y),E=Math.max(E,B.y)}let S=i;S.x=x,S.y=C,S.z=0,M.multiplyByPoint(c,S,S);let w=o;w.x=b,w.y=C,w.z=0,M.multiplyByPoint(c,w,w),h.subtract(w,S,o);let P=r;P.x=x,P.y=E,P.z=0,M.multiplyByPoint(c,P,P),h.subtract(P,S,r)}var IVe=new h,DVe=new h,PVe=new xn;Cd.getPlanarTextureCoordinateAttributes=function(e,t,n,i,o){let r=hue,a=IVe,s=DVe;wVe(e,n,o??0,r,a,s);let c={};fue(c,t);let u=xn.fromCartesian(r,PVe);return c.southWest_HIGH=new Zc({componentDatatype:Y.FLOAT,componentsPerAttribute:3,normalize:!1,value:h.pack(u.high,[0,0,0])}),c.southWest_LOW=new Zc({componentDatatype:Y.FLOAT,componentsPerAttribute:3,normalize:!1,value:h.pack(u.low,[0,0,0])}),c.eastward=new Zc({componentDatatype:Y.FLOAT,componentsPerAttribute:3,normalize:!1,value:h.pack(a,[0,0,0])}),c.northward=new Zc({componentDatatype:Y.FLOAT,componentsPerAttribute:3,normalize:!1,value:h.pack(s,[0,0,0])}),mue(e,i,c),c};var RVe=new h;function cue(e,t,n,i){let o=due;o.latitude=e,o.longitude=t,o.height=0;let r=de.toCartesian(o,n,RVe),a=Math.sqrt(r.x*r.x+r.y*r.y),s=D.fastApproximateAtan2(a,r.z),c=D.fastApproximateAtan2(r.x,r.y);return i.x=s,i.y=c,i}var lue=new z;Cd.getSphericalExtentGeometryInstanceAttributes=function(e,t,n,i){let o=cue(e.south,e.west,n,lue),r=o.x,a=o.y,s=cue(e.north,e.east,n,lue),c=s.x,u=s.y,f=0;a>u&&(f=D.PI-a,a=-D.PI,u+=f),r-=D.EPSILON5,a-=D.EPSILON5,c+=D.EPSILON5,u+=D.EPSILON5;let d=1/(u-a),p=1/(c-r),g={sphericalExtents:new Zc({componentDatatype:Y.FLOAT,componentsPerAttribute:4,normalize:!1,value:[r,a,p,d]}),longitudeRotation:new Zc({componentDatatype:Y.FLOAT,componentsPerAttribute:1,normalize:!1,value:[f]})};return fue(g,t),mue(e,i,g),g};Cd.hasAttributesForTextureCoordinatePlanes=function(e){return l(e.southWest_HIGH)&&l(e.southWest_LOW)&&l(e.northward)&&l(e.eastward)&&l(e.planes2D_HIGH)&&l(e.planes2D_LOW)&&l(e.uMaxVmax)&&l(e.uvMinAndExtents)};Cd.hasAttributesForSphericalExtents=function(e){return l(e.sphericalExtents)&&l(e.longitudeRotation)&&l(e.planes2D_HIGH)&&l(e.planes2D_LOW)&&l(e.uMaxVmax)&&l(e.uvMinAndExtents)};function OVe(e){return Math.max(e.width,e.height)>Cd.MAX_WIDTH_FOR_PLANAR_EXTENTS}Cd.shouldUseSphericalCoordinates=function(e){return OVe(e)};Cd.MAX_WIDTH_FOR_PLANAR_EXTENTS=D.toRadians(1);var _f=Cd;var pue={NEVER:ee.NEVER,LESS:ee.LESS,EQUAL:ee.EQUAL,LESS_OR_EQUAL:ee.LEQUAL,GREATER:ee.GREATER,NOT_EQUAL:ee.NOTEQUAL,GREATER_OR_EQUAL:ee.GEQUAL,ALWAYS:ee.ALWAYS};Object.freeze(pue);var qn=pue;var gue={ZERO:ee.ZERO,KEEP:ee.KEEP,REPLACE:ee.REPLACE,INCREMENT:ee.INCR,DECREMENT:ee.DECR,INVERT:ee.INVERT,INCREMENT_WRAP:ee.INCR_WRAP,DECREMENT_WRAP:ee.DECR_WRAP};Object.freeze(gue);var vt=gue;var k8={CESIUM_3D_TILE_MASK:128,SKIP_LOD_MASK:112,SKIP_LOD_BIT_SHIFT:4,CLASSIFICATION_MASK:15};k8.setCesium3DTileBit=function(){return{enabled:!0,frontFunction:qn.ALWAYS,frontOperation:{fail:vt.KEEP,zFail:vt.KEEP,zPass:vt.REPLACE},backFunction:qn.ALWAYS,backOperation:{fail:vt.KEEP,zFail:vt.KEEP,zPass:vt.REPLACE},reference:k8.CESIUM_3D_TILE_MASK,mask:k8.CESIUM_3D_TILE_MASK}};var Gt=Object.freeze(k8);function Fx(e){e=e??G.EMPTY_OBJECT;let t=e.geometryInstances;this.geometryInstances=t,this.show=e.show??!0,this.classificationType=e.classificationType??Wn.BOTH,this.debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this.debugShowShadowVolume=e.debugShowShadowVolume??!1,this._debugShowShadowVolume=!1,this._extruded=e._extruded??!1,this._uniformMap=e._uniformMap,this._sp=void 0,this._spStencil=void 0,this._spPick=void 0,this._spColor=void 0,this._spPick2D=void 0,this._spColor2D=void 0,this._rsStencilDepthPass=void 0,this._rsStencilDepthPass3DTiles=void 0,this._rsColorPass=void 0,this._rsPickPass=void 0,this._commandsIgnoreShow=[],this._ready=!1,this._primitive=void 0,this._pickPrimitive=e._pickPrimitive,this._hasSphericalExtentsAttribute=!1,this._hasPlanarExtentsAttributes=!1,this._hasPerColorAttribute=!1,this.appearance=e.appearance,this._createBoundingVolumeFunction=e._createBoundingVolumeFunction,this._updateAndQueueCommandsFunction=e._updateAndQueueCommandsFunction,this._usePickOffsets=!1,this._primitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:e.vertexCacheOptimize??!1,interleave:e.interleave??!1,releaseGeometryInstances:e.releaseGeometryInstances??!0,allowPicking:e.allowPicking??!0,asynchronous:e.asynchronous??!0,compressVertices:e.compressVertices??!0,_createBoundingVolumeFunction:void 0,_createRenderStatesFunction:void 0,_createShaderProgramFunction:void 0,_createCommandsFunction:void 0,_updateAndQueueCommandsFunction:void 0,_createPickOffsets:!0}}Object.defineProperties(Fx.prototype,{vertexCacheOptimize:{get:function(){return this._primitiveOptions.vertexCacheOptimize}},interleave:{get:function(){return this._primitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._primitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._primitiveOptions.allowPicking}},asynchronous:{get:function(){return this._primitiveOptions.asynchronous}},compressVertices:{get:function(){return this._primitiveOptions.compressVertices}},ready:{get:function(){return this._ready}},_needs2DShader:{get:function(){return this._hasPlanarExtentsAttributes||this._hasSphericalExtentsAttribute}}});Fx.isSupported=function(e){return e.context.stencilBuffer};function kE(e,t){let n=t?qn.EQUAL:qn.ALWAYS;return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:e,frontFunction:n,frontOperation:{fail:vt.KEEP,zFail:vt.DECREMENT_WRAP,zPass:vt.KEEP},backFunction:n,backOperation:{fail:vt.KEEP,zFail:vt.INCREMENT_WRAP,zPass:vt.KEEP},reference:Gt.CESIUM_3D_TILE_MASK,mask:Gt.CESIUM_3D_TILE_MASK},stencilMask:Gt.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:tc.LESS_OR_EQUAL},depthMask:!1}}function Sq(e){return{stencilTest:{enabled:e,frontFunction:qn.NOT_EQUAL,frontOperation:{fail:vt.ZERO,zFail:vt.ZERO,zPass:vt.ZERO},backFunction:qn.NOT_EQUAL,backOperation:{fail:vt.ZERO,zFail:vt.ZERO,zPass:vt.ZERO},reference:0,mask:Gt.CLASSIFICATION_MASK},stencilMask:Gt.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:Jt.PRE_MULTIPLIED_ALPHA_BLEND}}var MVe={stencilTest:{enabled:!0,frontFunction:qn.NOT_EQUAL,frontOperation:{fail:vt.ZERO,zFail:vt.ZERO,zPass:vt.ZERO},backFunction:qn.NOT_EQUAL,backOperation:{fail:vt.ZERO,zFail:vt.ZERO,zPass:vt.ZERO},reference:0,mask:Gt.CLASSIFICATION_MASK},stencilMask:Gt.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1};function BVe(e,t,n,i){if(l(e._rsStencilDepthPass))return;let o=!e.debugShowShadowVolume;e._rsStencilDepthPass=Ve.fromCache(kE(o,!1)),e._rsStencilDepthPass3DTiles=Ve.fromCache(kE(o,!0)),e._rsColorPass=Ve.fromCache(Sq(o,!1)),e._rsPickPass=Ve.fromCache(MVe)}function LVe(e,t){if(!e.compressVertices)return t;if(t.search(/in\s+vec3\s+extrudeDirection;/g)!==-1){let n="compressedAttributes",i=`in vec2 ${n};`,o=`vec3 extrudeDirection;
- `,r=` extrudeDirection = czm_octDecode(${n}, 65535.0);
- `,a=t;a=a.replace(/in\s+vec3\s+extrudeDirection;/g,""),a=He.replaceMain(a,"czm_non_compressed_main");let s=`void main()
- {
- ${r} czm_non_compressed_main();
- }`;return[i,o,a,s].join(`
- `)}}function NVe(e,t){let n=t.context,i=e._primitive,o=cO;o=e._primitive._batchTable.getVertexShaderCallback()(o),o=Dn._appendDistanceDisplayConditionToShader(i,o),o=Dn._modifyShaderPosition(e,o,t.scene3DOnly),o=Dn._updateColorAttribute(i,o);let r=e._hasPlanarExtentsAttributes,a=r||e._hasSphericalExtentsAttribute;e._extruded&&(o=LVe(i,o));let s=e._extruded?"EXTRUDED_GEOMETRY":"",c=new He({defines:[s],sources:[o]}),u=new He({sources:[lA]}),f=e._primitive._attributeLocations,d=new _f(a,r,e.appearance);if(e._spStencil=Kt.replaceCache({context:n,shaderProgram:e._spStencil,vertexShaderSource:c,fragmentShaderSource:u,attributeLocations:f}),e._primitive.allowPicking){let m=He.createPickVertexShaderSource(o);m=Dn._appendShowToShader(i,m),m=Dn._updatePickColorAttribute(m);let A=d.createPickFragmentShader(!1),y=d.createPickVertexShader([s],m,!1,t.mapProjection);if(e._spPick=Kt.replaceCache({context:n,shaderProgram:e._spPick,vertexShaderSource:y,fragmentShaderSource:A,attributeLocations:f}),a){let x=n.shaderCache.getDerivedShaderProgram(e._spPick,"2dPick");if(!l(x)){let b=d.createPickFragmentShader(!0),C=d.createPickVertexShader([s],m,!0,t.mapProjection);x=n.shaderCache.createDerivedShaderProgram(e._spPick,"2dPick",{vertexShaderSource:C,fragmentShaderSource:b,attributeLocations:f})}e._spPick2D=x}}else e._spPick=Kt.fromCache({context:n,vertexShaderSource:c,fragmentShaderSource:u,attributeLocations:f});o=Dn._appendShowToShader(i,o),c=new He({defines:[s],sources:[o]}),e._sp=Kt.replaceCache({context:n,shaderProgram:e._sp,vertexShaderSource:c,fragmentShaderSource:u,attributeLocations:f});let p=d.createFragmentShader(!1),g=d.createVertexShader([s],o,!1,t.mapProjection);if(e._spColor=Kt.replaceCache({context:n,shaderProgram:e._spColor,vertexShaderSource:g,fragmentShaderSource:p,attributeLocations:f}),a){let m=n.shaderCache.getDerivedShaderProgram(e._spColor,"2dColor");if(!l(m)){let A=d.createFragmentShader(!0),y=d.createVertexShader([s],o,!0,t.mapProjection);m=n.shaderCache.createDerivedShaderProgram(e._spColor,"2dColor",{vertexShaderSource:y,fragmentShaderSource:A,attributeLocations:f})}e._spColor2D=m}}function FVe(e,t){let n=e._primitive,i=n._va.length*2;t.length=i;let o,r,a,s=0,c=n._batchTable.getUniformMapCallback()(e._uniformMap),u=e._needs2DShader;for(o=0;o<i;o+=2){let g=n._va[s++];r=t[o],l(r)||(r=t[o]=new tt({owner:e,primitiveType:n._primitiveType})),r.vertexArray=g,r.renderState=e._rsStencilDepthPass,r.shaderProgram=e._sp,r.uniformMap=c,r.pass=Ie.TERRAIN_CLASSIFICATION,a=tt.shallowClone(r,r.derivedCommands.tileset),a.renderState=e._rsStencilDepthPass3DTiles,a.pass=Ie.CESIUM_3D_TILE_CLASSIFICATION,r.derivedCommands.tileset=a,r=t[o+1],l(r)||(r=t[o+1]=new tt({owner:e,primitiveType:n._primitiveType})),r.vertexArray=g,r.renderState=e._rsColorPass,r.shaderProgram=e._spColor,r.pass=Ie.TERRAIN_CLASSIFICATION;let A=e.appearance.material;if(l(A)&&(c=wt(c,A._uniforms)),r.uniformMap=c,a=tt.shallowClone(r,r.derivedCommands.tileset),a.pass=Ie.CESIUM_3D_TILE_CLASSIFICATION,r.derivedCommands.tileset=a,u){let y=tt.shallowClone(r,r.derivedCommands.appearance2D);y.shaderProgram=e._spColor2D,r.derivedCommands.appearance2D=y,y=tt.shallowClone(a,a.derivedCommands.appearance2D),y.shaderProgram=e._spColor2D,a.derivedCommands.appearance2D=y}}let f=e._commandsIgnoreShow,d=e._spStencil,p=0;i=f.length=i/2;for(let g=0;g<i;++g){let m=f[g]=tt.shallowClone(t[p],f[g]);m.shaderProgram=d,m.pass=Ie.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,p+=2}}function kVe(e,t){let n=e._usePickOffsets,i=e._primitive,o=i._va.length*2,r,a=0,s;n&&(r=i._pickOffsets,o=r.length*2),t.length=o;let c,u,f,d=0,p=i._batchTable.getUniformMapCallback()(e._uniformMap),g=e._needs2DShader;for(c=0;c<o;c+=2){let m=i._va[d++];if(n&&(s=r[a++],m=i._va[s.index]),u=t[c],l(u)||(u=t[c]=new tt({owner:e,primitiveType:i._primitiveType,pickOnly:!0})),u.vertexArray=m,u.renderState=e._rsStencilDepthPass,u.shaderProgram=e._sp,u.uniformMap=p,u.pass=Ie.TERRAIN_CLASSIFICATION,n&&(u.offset=s.offset,u.count=s.count),f=tt.shallowClone(u,u.derivedCommands.tileset),f.renderState=e._rsStencilDepthPass3DTiles,f.pass=Ie.CESIUM_3D_TILE_CLASSIFICATION,u.derivedCommands.tileset=f,u=t[c+1],l(u)||(u=t[c+1]=new tt({owner:e,primitiveType:i._primitiveType,pickOnly:!0})),u.vertexArray=m,u.renderState=e._rsPickPass,u.shaderProgram=e._spPick,u.uniformMap=p,u.pass=Ie.TERRAIN_CLASSIFICATION,n&&(u.offset=s.offset,u.count=s.count),f=tt.shallowClone(u,u.derivedCommands.tileset),f.pass=Ie.CESIUM_3D_TILE_CLASSIFICATION,u.derivedCommands.tileset=f,g){let A=tt.shallowClone(u,u.derivedCommands.pick2D);A.shaderProgram=e._spPick2D,u.derivedCommands.pick2D=A,A=tt.shallowClone(f,f.derivedCommands.pick2D),A.shaderProgram=e._spPick2D,f.derivedCommands.pick2D=A}}}function zVe(e,t,n,i,o,r,a){FVe(e,r),kVe(e,a)}function _ue(e,t){return Math.floor(e%t/2)}function vq(e,t,n,i,o,r){e.modelMatrix=n,e.boundingVolume=o,e.cull=i,e.debugShowBoundingVolume=r,t.commandList.push(e)}function Aue(e,t,n,i,o){e.modelMatrix=n,e.boundingVolume=o,e.cull=i,t.commandList.push(e)}function UVe(e,t,n,i,o,r,a,s){let c=e._primitive;Dn._updateBoundingVolumes(c,t,o);let u;t.mode===ie.SCENE3D?u=c._boundingSphereWC:t.mode===ie.COLUMBUS_VIEW?u=c._boundingSphereCV:t.mode===ie.SCENE2D&&l(c._boundingSphere2D)?u=c._boundingSphere2D:l(c._boundingSphereMorph)&&(u=c._boundingSphereMorph);let f=e.classificationType,d=f!==Wn.CESIUM_3D_TILE,p=f!==Wn.TERRAIN,g=t.passes,m,A,y;if(g.render){let x=n.length;for(m=0;m<x;++m)A=u[_ue(m,x)],d&&(y=n[m],vq(y,t,o,r,A,a)),p&&(y=n[m].derivedCommands.tileset,vq(y,t,o,r,A,a));if(t.invertClassification){let b=e._commandsIgnoreShow,C=b.length;for(m=0;m<C;++m)A=u[m],y=b[m],vq(y,t,o,r,A,a)}}if(g.pick){let x=i.length,b=c._pickOffsets;for(m=0;m<x;++m){let C=b[_ue(m,x)];A=u[C.index],d&&(y=i[m],Aue(y,t,o,r,A)),p&&(y=i[m].derivedCommands.tileset,Aue(y,t,o,r,A))}}}Fx.prototype.update=function(e){if(!l(this._primitive)&&!l(this.geometryInstances))return;let t=this.appearance;l(t)&&l(t.material)&&t.material.update(e.context);let n=this,i=this._primitiveOptions;if(!l(this._primitive)){let o=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],r=o.length,a,s,c,u=!1,f=!0,d,p=!1,g=!1;for(r>0&&(c=o[0].attributes,p=_f.hasAttributesForSphericalExtents(c),g=_f.hasAttributesForTextureCoordinatePlanes(c),d=c.color),a=0;a<r;a++){s=o[a];let A=s.attributes.color;l(A)&&(u=!0),f=f&&l(A)&&Yt.equals(d,A)}if(!f&&!p&&!g)throw new _e("All GeometryInstances must have the same color attribute except via GroundPrimitives");u&&!l(t)&&(t=new dn({flat:!0}),this.appearance=t),this._usePickOffsets=!p&&!g,this._hasSphericalExtentsAttribute=p,this._hasPlanarExtentsAttributes=g,this._hasPerColorAttribute=u;let m=new Array(r);for(a=0;a<r;++a)s=o[a],m[a]=new Ot({geometry:s.geometry,attributes:s.attributes,modelMatrix:s.modelMatrix,id:s.id,pickPrimitive:this._pickPrimitive??n});i.appearance=t,i.geometryInstances=m,l(this._createBoundingVolumeFunction)&&(i._createBoundingVolumeFunction=function(A,y){n._createBoundingVolumeFunction(A,y)}),i._createRenderStatesFunction=function(A,y,x,b){BVe(n,y)},i._createShaderProgramFunction=function(A,y,x){NVe(n,y)},i._createCommandsFunction=function(A,y,x,b,C,E,S){zVe(n,void 0,void 0,!0,!1,E,S)},l(this._updateAndQueueCommandsFunction)?i._updateAndQueueCommandsFunction=function(A,y,x,b,C,E,S,w){n._updateAndQueueCommandsFunction(A,y,x,b,C,E,S,w)}:i._updateAndQueueCommandsFunction=function(A,y,x,b,C,E,S,w){UVe(n,y,x,b,C,E,S,w)},this._primitive=new Dn(i)}this.debugShowShadowVolume&&!this._debugShowShadowVolume&&this._ready?(this._debugShowShadowVolume=!0,this._rsStencilDepthPass=Ve.fromCache(kE(!1,!1)),this._rsStencilDepthPass3DTiles=Ve.fromCache(kE(!1,!0)),this._rsColorPass=Ve.fromCache(Sq(!1))):!this.debugShowShadowVolume&&this._debugShowShadowVolume&&(this._debugShowShadowVolume=!1,this._rsStencilDepthPass=Ve.fromCache(kE(!0,!1)),this._rsStencilDepthPass3DTiles=Ve.fromCache(kE(!0,!0)),this._rsColorPass=Ve.fromCache(Sq(!0))),this._primitive.appearance!==t&&(this._primitive.appearance=t),this._primitive.show=this.show,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e),e.afterRender.push(()=>{l(this._primitive)&&this._primitive.ready&&(this._ready=!0,this.releaseGeometryInstances&&(this.geometryInstances=void 0))})};Fx.prototype.getGeometryInstanceAttributes=function(e){return this._primitive.getGeometryInstanceAttributes(e)};Fx.prototype.isDestroyed=function(){return!1};Fx.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),this._sp=this._sp&&this._sp.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),this._spColor=this._spColor&&this._spColor.destroy(),this._spPick2D=void 0,this._spColor2D=void 0,fe(this)};var zE=Fx;var VVe={u_globeMinimumAltitude:function(){return 55e3}};function Su(e){e=e??G.EMPTY_OBJECT;let t=e.appearance,n=e.geometryInstances;if(!l(t)&&l(n)){let o=Array.isArray(n)?n:[n],r=o.length;for(let a=0;a<r;a++){let s=o[a].attributes;if(l(s)&&l(s.color)){t=new dn({flat:!0});break}}}this.appearance=t,this.geometryInstances=e.geometryInstances,this.show=e.show??!0,this.classificationType=e.classificationType??Wn.BOTH,this.debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this.debugShowShadowVolume=e.debugShowShadowVolume??!1,this._boundingVolumes=[],this._boundingVolumes2D=[],this._ready=!1,this._primitive=void 0,this._maxHeight=void 0,this._minHeight=void 0,this._maxTerrainHeight=vi._defaultMaxTerrainHeight,this._minTerrainHeight=vi._defaultMinTerrainHeight,this._boundingSpheresKeys=[],this._boundingSpheres=[],this._useFragmentCulling=!1,this._zIndex=void 0;let i=this;this._classificationPrimitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:e.vertexCacheOptimize??!1,interleave:e.interleave??!1,releaseGeometryInstances:e.releaseGeometryInstances??!0,allowPicking:e.allowPicking??!0,asynchronous:e.asynchronous??!0,compressVertices:e.compressVertices??!0,_createBoundingVolumeFunction:void 0,_updateAndQueueCommandsFunction:void 0,_pickPrimitive:i,_extruded:!0,_uniformMap:VVe}}Object.defineProperties(Su.prototype,{vertexCacheOptimize:{get:function(){return this._classificationPrimitiveOptions.vertexCacheOptimize}},interleave:{get:function(){return this._classificationPrimitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._classificationPrimitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._classificationPrimitiveOptions.allowPicking}},asynchronous:{get:function(){return this._classificationPrimitiveOptions.asynchronous}},compressVertices:{get:function(){return this._classificationPrimitiveOptions.compressVertices}},ready:{get:function(){return this._ready}}});Su.isSupported=zE.isSupported;function yue(e){return function(t,n){let i=n.maximumRadius,o=i/Math.cos(t*.5)-i;return e._maxHeight+o}}function xue(e){return function(t,n){return e._minHeight}}var jVe=new h,GVe=new h,HVe=new h,WVe=new de,qVe=new oe;function z8(e,t){let n=e.mapProjection.ellipsoid;if(!l(t.attributes)||!l(t.attributes.position3DHigh))return l(t.rectangle)?t.rectangle:void 0;let i=t.attributes.position3DHigh.values,o=t.attributes.position3DLow.values,r=i.length,a=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,u=Number.NEGATIVE_INFINITY;for(let d=0;d<r;d+=3){let p=h.unpack(i,d,jVe),g=h.unpack(o,d,GVe),m=h.add(p,g,HVe),A=n.cartesianToCartographic(m,WVe),y=A.latitude,x=A.longitude;a=Math.min(a,y),s=Math.min(s,x),c=Math.max(c,y),u=Math.max(u,x)}let f=qVe;return f.north=c,f.south=a,f.east=u,f.west=s,f}function YVe(e,t,n){let i=vi.getMinimumMaximumHeights(t,n);e._minTerrainHeight=i.minimumTerrainHeight,e._maxTerrainHeight=i.maximumTerrainHeight}function XVe(e,t,n){let i=t.mapProjection.ellipsoid,o=z8(t,n),r=Qt.fromRectangle(o,e._minHeight,e._maxHeight,i);if(e._boundingVolumes.push(r),!t.scene3DOnly){let a=t.mapProjection,s=ce.fromRectangleWithHeights2D(o,a,e._maxHeight,e._minHeight);h.fromElements(s.center.z,s.center.x,s.center.y,s.center),e._boundingVolumes2D.push(s)}}function wq(e,t){return Math.floor(e%t/2)}function Iq(e,t,n,i,o,r,a){let s=e._primitive;n.mode!==ie.SCENE3D&&t.shaderProgram===s._spColor&&s._needs2DShader&&(t=t.derivedCommands.appearance2D),t.owner=e,t.modelMatrix=i,t.boundingVolume=r,t.cull=o,t.debugShowBoundingVolume=a,n.commandList.push(t)}function bue(e,t,n,i,o,r){let a=e._primitive;n.mode!==ie.SCENE3D&&t.shaderProgram===a._spPick&&a._needs2DShader&&(t=t.derivedCommands.pick2D),t.owner=e,t.modelMatrix=i,t.boundingVolume=r,t.cull=o,n.commandList.push(t)}function KVe(e,t,n,i,o,r,a,s){let c;t.mode===ie.SCENE3D?c=e._boundingVolumes:c=e._boundingVolumes2D;let u=e.classificationType,f=u!==Wn.CESIUM_3D_TILE,d=u!==Wn.TERRAIN,p=t.passes,g=e._primitive,m,A,y;if(p.render){let x=n.length;for(m=0;m<x;++m)A=c[wq(m,x)],f&&(y=n[m],Iq(e,y,t,o,r,A,a)),d&&(y=n[m].derivedCommands.tileset,Iq(e,y,t,o,r,A,a));if(t.invertClassification){let b=g._commandsIgnoreShow,C=b.length;for(m=0;m<C;++m)A=c[m],y=b[m],Iq(e,y,t,o,r,A,a)}}if(p.pick){let x=i.length,b;for(e._useFragmentCulling||(b=g._primitive._pickOffsets),m=0;m<x;++m){if(A=c[wq(m,x)],!e._useFragmentCulling){let C=b[wq(m,x)];A=c[C.index]}f&&(y=i[m],bue(e,y,t,o,r,A)),d&&(y=i[m].derivedCommands.tileset,bue(e,y,t,o,r,A))}}}Su.initializeTerrainHeights=function(){return vi.initialize()};Su.prototype.update=function(e){if(!l(this._primitive)&&!l(this.geometryInstances))return;if(!vi.initialized){Su.initializeTerrainHeights();return}let t=this,n=this._classificationPrimitiveOptions;if(!l(this._primitive)){let i=e.mapProjection.ellipsoid,o,r,a,s=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],c=s.length,u=new Array(c),f,d;for(f=0;f<c;++f){o=s[f],r=o.geometry;let A=z8(e,r);l(d)?l(A)&&oe.union(d,A,d):d=oe.clone(A);let y=o.id;if(l(y)&&l(A)){let x=vi.getBoundingSphere(A,i);this._boundingSpheresKeys.push(y),this._boundingSpheres.push(x)}a=r.constructor,!l(a)||l(a.createShadowVolume)}YVe(this,d,i);let p=e.verticalExaggeration,g=e.verticalExaggerationRelativeHeight;this._minHeight=so.getHeight(this._minTerrainHeight,p,g),this._maxHeight=so.getHeight(this._maxTerrainHeight,p,g);let m=Su._supportsMaterials(e.context);if(this._useFragmentCulling=m,m){let A,y=!0;for(f=0;f<c;++f)if(o=s[f],r=o.geometry,d=z8(e,r),_f.shouldUseSphericalCoordinates(d)){y=!1;break}for(f=0;f<c;++f){o=s[f],r=o.geometry,a=r.constructor;let x=z8(e,r),b=r.textureCoordinateRotationPoints;y?A=_f.getPlanarTextureCoordinateAttributes(x,b,i,e.mapProjection,this._maxHeight):A=_f.getSphericalExtentGeometryInstanceAttributes(x,b,i,e.mapProjection);let C=o.attributes;for(let E in C)C.hasOwnProperty(E)&&(A[E]=C[E]);u[f]=new Ot({geometry:a.createShadowVolume(r,xue(this),yue(this)),attributes:A,id:o.id})}}else for(f=0;f<c;++f)o=s[f],r=o.geometry,a=r.constructor,u[f]=new Ot({geometry:a.createShadowVolume(r,xue(this),yue(this)),attributes:o.attributes,id:o.id});n.geometryInstances=u,n.appearance=this.appearance,n._createBoundingVolumeFunction=function(A,y){XVe(t,A,y)},n._updateAndQueueCommandsFunction=function(A,y,x,b,C,E,S,w){KVe(t,y,x,b,C,E,S,w)},this._primitive=new zE(n)}this._primitive.appearance=this.appearance,this._primitive.show=this.show,this._primitive.debugShowShadowVolume=this.debugShowShadowVolume,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e),e.afterRender.push(()=>{!this._ready&&l(this._primitive)&&this._primitive.ready&&(this._ready=!0,this.releaseGeometryInstances&&(this.geometryInstances=void 0))})};Su.prototype.getBoundingSphere=function(e){let t=this._boundingSpheresKeys.indexOf(e);if(t!==-1)return this._boundingSpheres[t]};Su.prototype.getGeometryInstanceAttributes=function(e){return this._primitive.getGeometryInstanceAttributes(e)};Su.prototype.isDestroyed=function(){return!1};Su.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),fe(this)};Su._supportsMaterials=function(e){return e.depthTexture};Su.supportsMaterials=function(e){return Su._supportsMaterials(e.frameState.context)};var Nl=Su;function UE(){_e.throwInstantiationError()}Object.defineProperties(UE.prototype,{isConstant:{get:_e.throwInstantiationError},definitionChanged:{get:_e.throwInstantiationError}});UE.prototype.getType=_e.throwInstantiationError;UE.prototype.getValue=_e.throwInstantiationError;UE.prototype.equals=_e.throwInstantiationError;var QVe=new Q;UE.getValue=function(e,t,n){let i;return l(e)||(e=Q.now(QVe)),l(t)&&(i=t.getType(e),l(i))?((!l(n)||n.type!==i)&&(n=Hi.fromType(i)),t.getValue(e,n.uniforms),n):((!l(n)||n.type!==Hi.ColorType)&&(n=Hi.fromType(Hi.ColorType)),V.clone(V.WHITE,n.uniforms.color),n)};var br=UE;function kx(e,t,n){this._primitives=t,this._orderedGroundPrimitives=n,this._primitive=void 0,this._outlinePrimitive=void 0,this._geometryUpdater=e,this._options=e._options,this._entity=e._entity,this._material=void 0}kx.prototype._isHidden=function(e,t,n){return!e.isShowing||!e.isAvailable(n)||!X.getValueOrDefault(t.show,n,!0)};kx.prototype._setOptions=_e.throwInstantiationError;kx.prototype.update=function(e){let t=this._geometryUpdater,n=t._onTerrain,i=this._primitives,o=this._orderedGroundPrimitives;n?o.remove(this._primitive):(i.removeAndDestroy(this._primitive),i.removeAndDestroy(this._outlinePrimitive),this._outlinePrimitive=void 0),this._primitive=void 0;let r=this._entity,a=r[this._geometryUpdater._geometryPropertyName];if(this._setOptions(r,a,e),this._isHidden(r,a,e))return;let s=this._geometryUpdater.shadowsProperty.getValue(e),c=this._options;if(!l(a.fill)||a.fill.getValue(e)){let u=t.fillMaterialProperty,f=u instanceof Wt,d,p=t._getIsClosed(c);if(f)d=new dn({closed:p,flat:n&&!t._supportsMaterialsforEntitiesOnTerrain});else{let g=br.getValue(e,u,this._material);this._material=g,d=new go({material:g,translucent:g.isTranslucent(),closed:p})}if(n)c.vertexFormat=dn.VERTEX_FORMAT,this._primitive=o.add(new Nl({geometryInstances:this._geometryUpdater.createFillGeometryInstance(e),appearance:d,asynchronous:!1,shadows:s,classificationType:this._geometryUpdater.classificationTypeProperty.getValue(e)}),X.getValueOrUndefined(this._geometryUpdater.zIndex,e));else{c.vertexFormat=d.vertexFormat;let g=this._geometryUpdater.createFillGeometryInstance(e);f&&(d.translucent=g.attributes.color.value[3]!==255),this._primitive=i.add(new Dn({geometryInstances:g,appearance:d,asynchronous:!1,shadows:s}))}}if(!n&&l(a.outline)&&a.outline.getValue(e)){let u=this._geometryUpdater.createOutlineGeometryInstance(e),f=X.getValueOrDefault(a.outlineWidth,e,1);this._outlinePrimitive=i.add(new Dn({geometryInstances:u,appearance:new dn({flat:!0,translucent:u.attributes.color.value[3]!==255,renderState:{lineWidth:t._scene.clampLineWidth(f)}}),asynchronous:!1,shadows:s}))}};kx.prototype.getBoundingSphere=function(e){let t=this._entity,n=this._primitive,i=this._outlinePrimitive,o;return l(n)&&n.show&&n.ready&&(o=n.getGeometryInstanceAttributes(t),l(o)&&l(o.boundingSphere))?(ce.clone(o.boundingSphere,e),bt.DONE):l(i)&&i.show&&i.ready&&(o=i.getGeometryInstanceAttributes(t),l(o)&&l(o.boundingSphere))?(ce.clone(o.boundingSphere,e),bt.DONE):l(n)&&!n.ready||l(i)&&!i.ready?bt.PENDING:bt.FAILED};kx.prototype.isDestroyed=function(){return!1};kx.prototype.destroy=function(){let e=this._primitives,t=this._orderedGroundPrimitives;this._geometryUpdater._onTerrain?t.remove(this._primitive):e.removeAndDestroy(this._primitive),e.removeAndDestroy(this._outlinePrimitive),fe(this)};var xi=kx;var Cue={};function mO(e,t){l(Cue[e])||(Cue[e]=!0,console.warn(t??e))}mO.geometryOutlines="Entity geometry outlines are unsupported on terrain. Outlines will be disabled. To enable outlines, disable geometry terrain clamping by explicitly setting height to 0.";mO.geometryZIndex="Entity geometry with zIndex are unsupported when height or extrudedHeight are defined. zIndex will be ignored";mO.geometryHeightReference="Entity corridor, ellipse, polygon or rectangle with heightReference must also have a defined height. heightReference will be ignored";mO.geometryExtrudedHeightReference="Entity corridor, ellipse, polygon or rectangle with extrudedHeightReference must also have a defined extrudedHeight. extrudedHeightReference will be ignored";var _t=mO;var Tue={AUTODETECT:0,ENU:1,INERTIAL:2,VELOCITY:3};Object.freeze(Tue);var q0=Tue;var Eue={NONE:0,GEODESIC:1,RHUMB:2};Object.freeze(Eue);var on=Eue;var vue=D.EPSILON10;function $Ve(e,t,n,i){if(!l(e))return;n=n??!1;let o=l(i),r=e.length;if(r<2)return e;let a,s=e[0],c,u,f=0,d=-1;for(a=1;a<r;++a)c=e[a],t(s,c,vue)?(l(u)||(u=e.slice(0,a),f=a-1,d=0),o&&i.push(a)):(l(u)&&(u.push(c),f=a,o&&(d=i.length)),s=c);return n&&t(e[0],e[r-1],vue)&&(o&&(l(u)?i.splice(d,0,f):i.push(r-1)),l(u)?u.length-=1:u=e.slice(0,-1)),l(u)?u:e}var Fo=$Ve;function JVe(e){let t=e._uSquared,n=e._ellipsoid.maximumRadius,i=e._ellipsoid.minimumRadius,o=(n-i)/n,r=Math.cos(e._startHeading),a=Math.sin(e._startHeading),s=(1-o)*Math.tan(e._start.latitude),c=1/Math.sqrt(1+s*s),u=c*s,f=Math.atan2(s,r),d=c*a,p=d*d,g=1-p,m=Math.sqrt(g),A=t/4,y=A*A,x=y*A,b=y*y,C=1+A-3*y/4+5*x/4-175*b/64,E=1-A+15*y/8-35*x/8,S=1-3*A+35*y/4,w=1-5*A,P=C*f-E*Math.sin(2*f)*A/2-S*Math.sin(4*f)*y/16-w*Math.sin(6*f)*x/48-Math.sin(8*f)*5*b/512,R=e._constants;R.a=n,R.b=i,R.f=o,R.cosineHeading=r,R.sineHeading=a,R.tanU=s,R.cosineU=c,R.sineU=u,R.sigma=f,R.sineAlpha=d,R.sineSquaredAlpha=p,R.cosineSquaredAlpha=g,R.cosineAlpha=m,R.u2Over4=A,R.u4Over16=y,R.u6Over64=x,R.u8Over256=b,R.a0=C,R.a1=E,R.a2=S,R.a3=w,R.distanceRatio=P}function ZVe(e,t){return e*t*(4+e*(4-3*t))/16}function Sue(e,t,n,i,o,r,a){let s=ZVe(e,n);return(1-s)*e*t*(i+s*o*(a+s*r*(2*a*a-1)))}function e4e(e,t,n,i,o,r,a){let s=(t-n)/t,c=r-i,u=Math.atan((1-s)*Math.tan(o)),f=Math.atan((1-s)*Math.tan(a)),d=Math.cos(u),p=Math.sin(u),g=Math.cos(f),m=Math.sin(f),A=d*g,y=d*m,x=p*m,b=p*g,C=c,E=D.TWO_PI,S=Math.cos(C),w=Math.sin(C),P,R,B,L,_;do{S=Math.cos(C),w=Math.sin(C);let F=y-b*S;B=Math.sqrt(g*g*w*w+F*F),R=x+A*S,P=Math.atan2(B,R);let H;B===0?(H=0,L=1):(H=A*w/B,L=1-H*H),E=C,_=R-2*x/L,isFinite(_)||(_=0),C=c+Sue(s,H,L,P,B,R,_)}while(Math.abs(C-E)>D.EPSILON12);let T=L*(t*t-n*n)/(n*n),v=1+T*(4096+T*(T*(320-175*T)-768))/16384,I=T*(256+T*(T*(74-47*T)-128))/1024,O=_*_,N=I*B*(_+I*(R*(2*O-1)-I*_*(4*B*B-3)*(4*O-3)/6)/4),j=n*v*(P-N),k=Math.atan2(g*w,y-b*S),U=Math.atan2(d*w,y*S-b);e._distance=j,e._startHeading=k,e._endHeading=U,e._uSquared=T}var t4e=new h,Dq=new h;function wue(e,t,n,i){let o=h.normalize(i.cartographicToCartesian(t,Dq),t4e),r=h.normalize(i.cartographicToCartesian(n,Dq),Dq);e4e(e,i.maximumRadius,i.minimumRadius,t.longitude,t.latitude,n.longitude,n.latitude),e._start=de.clone(t,e._start),e._end=de.clone(n,e._end),e._start.height=0,e._end.height=0,JVe(e)}function pO(e,t,n){let i=n??te.default;this._ellipsoid=i,this._start=new de,this._end=new de,this._constants={},this._startHeading=void 0,this._endHeading=void 0,this._distance=void 0,this._uSquared=void 0,l(e)&&l(t)&&wue(this,e,t,i)}Object.defineProperties(pO.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},startHeading:{get:function(){return this._startHeading}},endHeading:{get:function(){return this._endHeading}}});pO.prototype.setEndPoints=function(e,t){wue(this,e,t,this._ellipsoid)};pO.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(this._distance*e,t)};pO.prototype.interpolateUsingSurfaceDistance=function(e,t){let n=this._constants,i=n.distanceRatio+e/n.b,o=Math.cos(2*i),r=Math.cos(4*i),a=Math.cos(6*i),s=Math.sin(2*i),c=Math.sin(4*i),u=Math.sin(6*i),f=Math.sin(8*i),d=i*i,p=i*d,g=n.u8Over256,m=n.u2Over4,A=n.u6Over64,y=n.u4Over16,x=2*p*g*o/3+i*(1-m+7*y/4-15*A/4+579*g/64-(y-15*A/4+187*g/16)*o-(5*A/4-115*g/16)*r-29*g*a/16)+(m/2-y+71*A/32-85*g/16)*s+(5*y/16-5*A/4+383*g/96)*c-d*((A-11*g/2)*s+5*g*c/2)+(29*A/96-29*g/16)*u+539*g*f/1536,b=Math.asin(Math.sin(x)*n.cosineAlpha),C=Math.atan(n.a/n.b*Math.tan(b));x=x-n.sigma;let E=Math.cos(2*n.sigma+x),S=Math.sin(x),w=Math.cos(x),P=n.cosineU*w,R=n.sineU*S,L=Math.atan2(S*n.sineHeading,P-R*n.cosineHeading)-Sue(n.f,n.sineAlpha,n.cosineSquaredAlpha,x,S,w,E);return l(t)?(t.longitude=this._start.longitude+L,t.latitude=C,t.height=0,t):new de(this._start.longitude+L,C,0)};var Y0=pO;function Rq(e,t,n){if(e===0)return t*n;let i=e*e,o=i*i,r=o*i,a=r*i,s=a*i,c=s*i,u=n,f=Math.sin(2*u),d=Math.sin(4*u),p=Math.sin(6*u),g=Math.sin(8*u),m=Math.sin(10*u),A=Math.sin(12*u);return t*((1-i/4-3*o/64-5*r/256-175*a/16384-441*s/65536-4851*c/1048576)*u-(3*i/8+3*o/32+45*r/1024+105*a/4096+2205*s/131072+6237*c/524288)*f+(15*o/256+45*r/1024+525*a/16384+1575*s/65536+155925*c/8388608)*d-(35*r/3072+175*a/12288+3675*s/262144+13475*c/1048576)*p+(315*a/131072+2205*s/524288+43659*c/8388608)*g-(693*s/1310720+6237*c/5242880)*m+1001*c/8388608*A)}function n4e(e,t,n){let i=e/n;if(t===0)return i;let o=i*i,r=o*i,a=r*i,s=t,c=s*s,u=c*c,f=u*c,d=f*c,p=d*c,g=p*c,m=Math.sin(2*i),A=Math.cos(2*i),y=Math.sin(4*i),x=Math.cos(4*i),b=Math.sin(6*i),C=Math.cos(6*i),E=Math.sin(8*i),S=Math.cos(8*i),w=Math.sin(10*i),P=Math.cos(10*i),R=Math.sin(12*i);return i+i*c/4+7*i*u/64+15*i*f/256+579*i*d/16384+1515*i*p/65536+16837*i*g/1048576+(3*i*u/16+45*i*f/256-i*(32*o-561)*d/4096-i*(232*o-1677)*p/16384+i*(399985-90560*o+512*a)*g/5242880)*A+(21*i*f/256+483*i*d/4096-i*(224*o-1969)*p/16384-i*(33152*o-112599)*g/1048576)*x+(151*i*d/4096+4681*i*p/65536+1479*i*g/16384-453*r*g/32768)*C+(1097*i*p/65536+42783*i*g/1048576)*S+8011*i*g/1048576*P+(3*c/8+3*u/16+213*f/2048-3*o*f/64+255*d/4096-33*o*d/512+20861*p/524288-33*o*p/512+a*p/1024+28273*g/1048576-471*o*g/8192+9*a*g/4096)*m+(21*u/256+21*f/256+533*d/8192-21*o*d/512+197*p/4096-315*o*p/4096+584039*g/16777216-12517*o*g/131072+7*a*g/2048)*y+(151*f/6144+151*d/4096+5019*p/131072-453*o*p/16384+26965*g/786432-8607*o*g/131072)*b+(1097*d/131072+1097*p/65536+225797*g/10485760-1097*o*g/65536)*E+(8011*p/2621440+8011*g/1048576)*w+293393*g/251658240*R}function VE(e,t){if(e===0)return Math.log(Math.tan(.5*(D.PI_OVER_TWO+t)));let n=e*Math.sin(t);return Math.log(Math.tan(.5*(D.PI_OVER_TWO+t)))-e/2*Math.log((1+n)/(1-n))}function i4e(e,t,n,i,o){let r=VE(e._ellipticity,n),a=VE(e._ellipticity,o);return Math.atan2(D.negativePiToPi(i-t),a-r)}function o4e(e,t,n,i,o,r,a){let s=e._heading,c=r-i,u=0;if(D.equalsEpsilon(Math.abs(s),D.PI_OVER_TWO,D.EPSILON8))if(t===n)u=t*Math.cos(o)*D.negativePiToPi(c);else{let f=Math.sin(o);u=t*Math.cos(o)*D.negativePiToPi(c)/Math.sqrt(1-e._ellipticitySquared*f*f)}else{let f=Rq(e._ellipticity,t,o);u=(Rq(e._ellipticity,t,a)-f)/Math.cos(s)}return Math.abs(u)}var r4e=new h,Pq=new h;function Iue(e,t,n,i){let o=h.normalize(i.cartographicToCartesian(t,Pq),r4e),r=h.normalize(i.cartographicToCartesian(n,Pq),Pq),a=i.maximumRadius,s=i.minimumRadius,c=a*a,u=s*s;e._ellipticitySquared=(c-u)/c,e._ellipticity=Math.sqrt(e._ellipticitySquared),e._start=de.clone(t,e._start),e._start.height=0,e._end=de.clone(n,e._end),e._end.height=0,e._heading=i4e(e,t.longitude,t.latitude,n.longitude,n.latitude),e._distance=o4e(e,i.maximumRadius,i.minimumRadius,t.longitude,t.latitude,n.longitude,n.latitude)}function Due(e,t,n,i,o,r){if(n===0)return de.clone(e,r);let a=o*o,s,c,u;if(Math.abs(D.PI_OVER_TWO-Math.abs(t))>D.EPSILON8){let f=Rq(o,i,e.latitude),d=n*Math.cos(t),p=f+d;if(c=n4e(p,o,i),Math.abs(t)<D.EPSILON10)s=D.negativePiToPi(e.longitude);else{let g=VE(o,e.latitude),m=VE(o,c);u=Math.tan(t)*(m-g),s=D.negativePiToPi(e.longitude+u)}}else{c=e.latitude;let f;if(o===0)f=i*Math.cos(e.latitude);else{let d=Math.sin(e.latitude);f=i*Math.cos(e.latitude)/Math.sqrt(1-a*d*d)}u=n/f,t>0?s=D.negativePiToPi(e.longitude+u):s=D.negativePiToPi(e.longitude-u)}return l(r)?(r.longitude=s,r.latitude=c,r.height=0,r):new de(s,c,0)}function X0(e,t,n){let i=n??te.default;this._ellipsoid=i,this._start=new de,this._end=new de,this._heading=void 0,this._distance=void 0,this._ellipticity=void 0,this._ellipticitySquared=void 0,l(e)&&l(t)&&Iue(this,e,t,i)}Object.defineProperties(X0.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},heading:{get:function(){return this._heading}}});X0.fromStartHeadingDistance=function(e,t,n,i,o){let r=i??te.default,a=r.maximumRadius,s=r.minimumRadius,c=a*a,u=s*s,f=Math.sqrt((c-u)/c);t=D.negativePiToPi(t);let d=Due(e,t,n,r.maximumRadius,f);return!l(o)||l(i)&&!i.equals(o.ellipsoid)?new X0(e,d,r):(o.setEndPoints(e,d),o)};X0.prototype.setEndPoints=function(e,t){Iue(this,e,t,this._ellipsoid)};X0.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(e*this._distance,t)};X0.prototype.interpolateUsingSurfaceDistance=function(e,t){return Due(this._start,this._heading,e,this._ellipsoid.maximumRadius,this._ellipticity,t)};X0.prototype.findIntersectionWithLongitude=function(e,t){let n=this._ellipticity,i=this._heading,o=Math.abs(i),r=this._start;if(e=D.negativePiToPi(e),D.equalsEpsilon(Math.abs(e),Math.PI,D.EPSILON14)&&(e=D.sign(r.longitude)*Math.PI),l(t)||(t=new de),Math.abs(D.PI_OVER_TWO-o)<=D.EPSILON8)return t.longitude=e,t.latitude=r.latitude,t.height=0,t;if(D.equalsEpsilon(Math.abs(D.PI_OVER_TWO-o),D.PI_OVER_TWO,D.EPSILON8))return D.equalsEpsilon(e,r.longitude,D.EPSILON12)?void 0:(t.longitude=e,t.latitude=D.PI_OVER_TWO*D.sign(D.PI_OVER_TWO-i),t.height=0,t);let a=r.latitude,s=n*Math.sin(a),c=Math.tan(.5*(D.PI_OVER_TWO+a))*Math.exp((e-r.longitude)/Math.tan(i)),u=(1+s)/(1-s),f=r.latitude,d;do{d=f;let p=n*Math.sin(d),g=(1+p)/(1-p);f=2*Math.atan(c*Math.pow(g/u,n/2))-D.PI_OVER_TWO}while(!D.equalsEpsilon(f,d,D.EPSILON12));return t.longitude=e,t.latitude=f,t.height=0,t};X0.prototype.findIntersectionWithLatitude=function(e,t){let n=this._ellipticity,i=this._heading,o=this._start;if(D.equalsEpsilon(Math.abs(i),D.PI_OVER_TWO,D.EPSILON8))return;let r=VE(n,o.latitude),a=VE(n,e),s=Math.tan(i)*(a-r),c=D.negativePiToPi(o.longitude+s);return l(t)?(t.longitude=c,t.latitude=e,t.height=0,t):new de(c,e,0)};var wc=X0;var zq=[ji,li],a4e=zq.length,Kue=Math.cos(D.toRadians(30)),Pue=Math.cos(D.toRadians(150)),Que=0,$ue=1e3;function fA(e){e=e??G.EMPTY_OBJECT;let t=e.positions;this.width=e.width??1,this._positions=t,this.granularity=e.granularity??9999,this.loop=e.loop??!1,this.arcType=e.arcType??on.GEODESIC,this._ellipsoid=te.default,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(fA.prototype,{packedLength:{get:function(){return 1+this._positions.length*3+1+1+1+te.packedLength+1+1}}});fA.setProjectionAndEllipsoid=function(e,t){let n=0;for(let i=0;i<a4e;i++)if(t instanceof zq[i]){n=i;break}e._projectionIndex=n,e._ellipsoid=t.ellipsoid};var s4e=new h,Rue=new h,Oue=new h;function kq(e,t,n,i,o){let r=Fl(i,e,0,s4e),a=Fl(i,e,n,Rue),s=Fl(i,t,0,Oue),c=K0(a,r,Rue),u=K0(s,r,Oue);return h.cross(u,c,o),h.normalize(o,o)}var c4e=new de,l4e=new h,u4e=new h,f4e=new h;function Oq(e,t,n,i,o,r,a,s,c,u,f){if(o===0)return;let d;r===on.GEODESIC?d=new Y0(e,t,a):r===on.RHUMB&&(d=new wc(e,t,a));let p=d.surfaceDistance;if(p<o)return;let g=kq(e,t,i,a,f4e),m=Math.ceil(p/o),A=p/m,y=A,x=m-1,b=s.length;for(let C=0;C<x;C++){let E=d.interpolateUsingSurfaceDistance(y,c4e),S=Fl(a,E,n,l4e),w=Fl(a,E,i,u4e);h.pack(g,s,b),h.pack(S,c,b),h.pack(w,u,b),f.push(E.latitude),f.push(E.longitude),b+=3,y+=A}}var Mq=new de;function Fl(e,t,n,i){return de.clone(t,Mq),Mq.height=n,de.toCartesian(Mq,e,i)}fA.pack=function(e,t,n){let i=n??0,o=e._positions,r=o.length;t[i++]=r;for(let a=0;a<r;++a){let s=o[a];h.pack(s,t,i),i+=3}return t[i++]=e.granularity,t[i++]=e.loop?1:0,t[i++]=e.arcType,te.pack(e._ellipsoid,t,i),i+=te.packedLength,t[i++]=e._projectionIndex,t[i++]=e._scene3DOnly?1:0,t};fA.unpack=function(e,t,n){let i=t??0,o=e[i++],r=new Array(o);for(let p=0;p<o;p++)r[p]=h.unpack(e,i),i+=3;let a=e[i++],s=e[i++]===1,c=e[i++],u=te.unpack(e,i);i+=te.packedLength;let f=e[i++],d=e[i++]===1;return l(n)||(n=new fA({positions:r})),n._positions=r,n.granularity=a,n.loop=s,n.arcType=c,n._ellipsoid=u,n._projectionIndex=f,n._scene3DOnly=d,n};function K0(e,t,n){return h.subtract(e,t,n),h.normalize(n,n),n}function Mue(e,t,n,i){return i=K0(e,t,i),i=h.cross(i,n,i),i=h.normalize(i,i),i=h.cross(n,i,i),i}var d4e=new h,h4e=new h,m4e=new h,Jue=new h,p4e=0,g4e=-1;function Bq(e,t,n,i,o){let r=K0(n,t,Jue),a=Mue(e,t,r,d4e),s=Mue(i,t,r,h4e);if(D.equalsEpsilon(h.dot(a,s),g4e,D.EPSILON5))return o=h.cross(r,a,o),o=h.normalize(o,o),o;o=h.add(s,a,o),o=h.normalize(o,o);let c=h.cross(r,o,m4e);return h.dot(s,c)<p4e&&(o=h.negate(o,o)),o}var G8=en.fromPointNormal(h.ZERO,h.UNIT_Y),_4e=new h,A4e=new h,y4e=new h,x4e=new h,b4e=new h,U8=new h,V8=new de,Bue=new de,Lue=new de;fA.createGeometry=function(e){let t=!e._scene3DOnly,n=e.loop,i=e._ellipsoid,o=e.granularity,r=e.arcType,a=new zq[e._projectionIndex](i),s=Que,c=$ue,u,f,d=e._positions,p=d.length;p===2&&(n=!1);let g,m,A,y,x=new wc(void 0,void 0,i),b,C,E,S=[d[0]];for(f=0;f<p-1;f++)g=d[f],m=d[f+1],b=si.lineSegmentPlane(g,m,G8,U8),l(b)&&!h.equalsEpsilon(b,g,D.EPSILON7)&&!h.equalsEpsilon(b,m,D.EPSILON7)&&(e.arcType===on.GEODESIC?S.push(h.clone(b)):e.arcType===on.RHUMB&&(E=i.cartesianToCartographic(b,V8).longitude,A=i.cartesianToCartographic(g,V8),y=i.cartesianToCartographic(m,Bue),x.setEndPoints(A,y),C=x.findIntersectionWithLongitude(E,Lue),b=i.cartographicToCartesian(C,U8),l(b)&&!h.equalsEpsilon(b,g,D.EPSILON7)&&!h.equalsEpsilon(b,m,D.EPSILON7)&&S.push(h.clone(b)))),S.push(m);n&&(g=d[p-1],m=d[0],b=si.lineSegmentPlane(g,m,G8,U8),l(b)&&!h.equalsEpsilon(b,g,D.EPSILON7)&&!h.equalsEpsilon(b,m,D.EPSILON7)&&(e.arcType===on.GEODESIC?S.push(h.clone(b)):e.arcType===on.RHUMB&&(E=i.cartesianToCartographic(b,V8).longitude,A=i.cartesianToCartographic(g,V8),y=i.cartesianToCartographic(m,Bue),x.setEndPoints(A,y),C=x.findIntersectionWithLongitude(E,Lue),b=i.cartographicToCartesian(C,U8),l(b)&&!h.equalsEpsilon(b,g,D.EPSILON7)&&!h.equalsEpsilon(b,m,D.EPSILON7)&&S.push(h.clone(b)))));let w=S.length,P=new Array(w);for(f=0;f<w;f++){let q=de.fromCartesian(S[f],i);q.height=0,P[f]=q}if(P=Fo(P,de.equalsEpsilon),w=P.length,w<2)return;let R=[],B=[],L=[],_=[],T=_4e,v=A4e,I=y4e,O=x4e,N=b4e,j=P[0],k=P[1],U=P[w-1];for(T=Fl(i,U,s,T),O=Fl(i,k,s,O),v=Fl(i,j,s,v),I=Fl(i,j,c,I),n?N=Bq(T,v,I,O,N):N=kq(j,k,c,i,N),h.pack(N,B,0),h.pack(v,L,0),h.pack(I,_,0),R.push(j.latitude),R.push(j.longitude),Oq(j,k,s,c,o,r,i,B,L,_,R),f=1;f<w-1;++f){T=h.clone(v,T),v=h.clone(O,v);let q=P[f];Fl(i,q,c,I),Fl(i,P[f+1],s,O),Bq(T,v,I,O,N),u=B.length,h.pack(N,B,u),h.pack(v,L,u),h.pack(I,_,u),R.push(q.latitude),R.push(q.longitude),Oq(P[f],P[f+1],s,c,o,r,i,B,L,_,R)}let F=P[w-1],H=P[w-2];if(v=Fl(i,F,s,v),I=Fl(i,F,c,I),n){let q=P[0];T=Fl(i,H,s,T),O=Fl(i,q,s,O),N=Bq(T,v,I,O,N)}else N=kq(H,F,c,i,N);if(u=B.length,h.pack(N,B,u),h.pack(v,L,u),h.pack(I,_,u),R.push(F.latitude),R.push(F.longitude),n){for(Oq(F,j,s,c,o,r,i,B,L,_,R),u=B.length,f=0;f<3;++f)B[u+f]=B[f],L[u+f]=L[f],_[u+f]=_[f];R.push(j.latitude),R.push(j.longitude)}return Y4e(n,a,L,_,B,R,t)};var C4e=new h,T4e=new $,E4e=new Le;function Nue(e,t,n,i){let o=K0(n,t,C4e),r=h.dot(o,e);if(r>Kue||r<Pue){let a=K0(i,n,Jue),s=r<Pue?D.PI_OVER_TWO:-D.PI_OVER_TWO,c=Le.fromAxisAngle(a,s,E4e),u=$.fromQuaternion(c,T4e);return $.multiplyByVector(u,e,e),!0}return!1}var Fue=new de,v4e=new h,kue=new h;function gO(e,t,n,i,o){let r=de.toCartesian(t,e._ellipsoid,v4e),a=h.add(r,n,kue),s=!1,c=e._ellipsoid,u=c.cartesianToCartographic(a,Fue);Math.abs(t.longitude-u.longitude)>D.PI_OVER_TWO&&(s=!0,a=h.subtract(r,n,kue),u=c.cartesianToCartographic(a,Fue)),u.height=0;let f=e.project(u,o);return o=h.subtract(f,i,o),o.z=0,o=h.normalize(o,o),s&&h.negate(o,o),o}var S4e=new h,zue=new h;function Uue(e,t,n,i,o,r){let a=h.subtract(t,e,S4e);h.normalize(a,a);let s=n-Que,c=h.multiplyByScalar(a,s,zue);h.add(e,c,o);let u=i-$ue;c=h.multiplyByScalar(a,u,zue),h.add(t,c,r)}var w4e=new h;function j8(e,t){let n=en.getPointDistance(G8,e),i=en.getPointDistance(G8,t),o=w4e;D.equalsEpsilon(n,0,D.EPSILON2)?(o=K0(t,e,o),h.multiplyByScalar(o,D.EPSILON2,o),h.add(e,o,e)):D.equalsEpsilon(i,0,D.EPSILON2)&&(o=K0(e,t,o),h.multiplyByScalar(o,D.EPSILON2,o),h.add(t,o,t))}function I4e(e,t){let n=Math.abs(e.longitude),i=Math.abs(t.longitude);if(D.equalsEpsilon(n,D.PI,D.EPSILON11)){let o=D.sign(t.longitude);return e.longitude=o*(n-D.EPSILON11),1}else if(D.equalsEpsilon(i,D.PI,D.EPSILON11)){let o=D.sign(e.longitude);return t.longitude=o*(i-D.EPSILON11),2}return 0}var Zue=new de,efe=new de,Vue=new h,Lq=new h,jue=new h,Gue=new h,D4e=new h,Hue=new h,P4e=[Zue,efe],R4e=new oe,O4e=new h,M4e=new h,B4e=new h,L4e=new h,N4e=new h,F4e=new h,Nq=new h,Fq=new h,k4e=new h,z4e=new h,U4e=new h,Wue=new h,V4e=new h,j4e=new h,G4e=new xn,H4e=new xn,que=new h,W4e=new h,Yue=new h,q4e=[new ce,new ce],tfe=[0,2,1,0,3,2,0,7,3,0,4,7,0,5,4,0,1,5,5,7,4,5,6,7,5,2,6,5,1,2,3,6,2,3,7,6],Xue=tfe.length;function Y4e(e,t,n,i,o,r,a){let s,c,u=t._ellipsoid,f=n.length/3-1,d=f*8,p=d*4,g=f*36,m=d>65535?new Uint32Array(g):new Uint16Array(g),A=new Float64Array(d*3),y=new Float32Array(p),x=new Float32Array(p),b=new Float32Array(p),C=new Float32Array(p),E=new Float32Array(p),S,w,P,R;a&&(S=new Float32Array(p),w=new Float32Array(p),P=new Float32Array(p),R=new Float32Array(d*2));let B=r.length/2,L=0,_=Zue;_.height=0;let T=efe;T.height=0;let v=Vue,I=Lq;if(a)for(c=0,s=1;s<B;s++)_.latitude=r[c],_.longitude=r[c+1],T.latitude=r[c+2],T.longitude=r[c+3],v=t.project(_,v),I=t.project(T,I),L+=h.distance(v,I),c+=2;let O=i.length/3;I=h.unpack(i,0,I);let N=0;for(c=3,s=1;s<O;s++)v=h.clone(I,v),I=h.unpack(i,c,I),N+=h.distance(v,I),c+=3;let j;c=3;let k=0,U=0,F=0,H=0,q=!1,J=h.unpack(n,0,Gue),W=h.unpack(i,0,Lq),Z=h.unpack(o,0,Hue);if(e){let Ee=h.unpack(n,n.length-6,jue);Nue(Z,Ee,J,W)&&(Z=h.negate(Z,Z))}let K=0,le=0,me=0;for(s=0;s<f;s++){let Ee=h.clone(J,jue),Be=h.clone(W,Vue),ke=h.clone(Z,D4e);q&&(ke=h.negate(ke,ke)),J=h.unpack(n,c,Gue),W=h.unpack(i,c,Lq),Z=h.unpack(o,c,Hue),q=Nue(Z,Ee,J,W),_.latitude=r[k],_.longitude=r[k+1],T.latitude=r[k+2],T.longitude=r[k+3];let Ge,rt,et,Pe;if(a){let ri=I4e(_,T);Ge=t.project(_,N4e),rt=t.project(T,F4e);let Gr=K0(rt,Ge,que);Gr.y=Math.abs(Gr.y),et=Nq,Pe=Fq,ri===0||h.dot(Gr,h.UNIT_Y)>Kue?(et=gO(t,_,ke,Ge,Nq),Pe=gO(t,T,Z,rt,Fq)):ri===1?(Pe=gO(t,T,Z,rt,Fq),et.x=0,et.y=D.sign(_.longitude-Math.abs(T.longitude)),et.z=0):(et=gO(t,_,ke,Ge,Nq),Pe.x=0,Pe.y=D.sign(_.longitude-T.longitude),Pe.z=0)}let Ye=h.distance(Be,W),ut=xn.fromCartesian(Ee,G4e),Tt=h.subtract(J,Ee,k4e),tn=h.normalize(Tt,Wue),Ht=h.subtract(Be,Ee,z4e);Ht=h.normalize(Ht,Ht);let xt=h.cross(tn,Ht,Wue);xt=h.normalize(xt,xt);let Pt=h.cross(Ht,ke,V4e);Pt=h.normalize(Pt,Pt);let bn=h.subtract(W,J,U4e);bn=h.normalize(bn,bn);let at=h.cross(Z,bn,j4e);at=h.normalize(at,at);let st=Ye/N,Ln=K/N,Nn=0,uo,Yo,oo,ro=0,Xn=0;if(a){Nn=h.distance(Ge,rt),uo=xn.fromCartesian(Ge,H4e),Yo=h.subtract(rt,Ge,que),oo=h.normalize(Yo,W4e);let ri=oo.x;oo.x=oo.y,oo.y=-ri,ro=Nn/L,Xn=le/L}for(j=0;j<8;j++){let ri=H+j*4,Gr=U+j*2,Po=ri+3,Ri=j<4?1:-1,ui=j===2||j===3||j===6||j===7?1:-1;h.pack(ut.high,y,ri),y[Po]=Tt.x,h.pack(ut.low,x,ri),x[Po]=Tt.y,h.pack(Pt,b,ri),b[Po]=Tt.z,h.pack(at,C,ri),C[Po]=st*Ri,h.pack(xt,E,ri);let Lo=Ln*ui;Lo===0&&ui<0&&(Lo=9),E[Po]=Lo,a&&(S[ri]=uo.high.x,S[ri+1]=uo.high.y,S[ri+2]=uo.low.x,S[ri+3]=uo.low.y,P[ri]=-et.y,P[ri+1]=et.x,P[ri+2]=Pe.y,P[ri+3]=-Pe.x,w[ri]=Yo.x,w[ri+1]=Yo.y,w[ri+2]=oo.x,w[ri+3]=oo.y,R[Gr]=ro*Ri,Lo=Xn*ui,Lo===0&&ui<0&&(Lo=9),R[Gr+1]=Lo)}let Kn=B4e,cn=L4e,Jn=O4e,Pr=M4e,Da=oe.fromCartographicArray(P4e,R4e),rs=vi.getMinimumMaximumHeights(Da,u),Ga=rs.minimumTerrainHeight,as=rs.maximumTerrainHeight;me+=Math.abs(Ga),me+=Math.abs(as),Uue(Ee,Be,Ga,as,Kn,Jn),Uue(J,W,Ga,as,cn,Pr);let pr=h.multiplyByScalar(xt,D.EPSILON5,Yue);h.add(Kn,pr,Kn),h.add(cn,pr,cn),h.add(Jn,pr,Jn),h.add(Pr,pr,Pr),j8(Kn,cn),j8(Jn,Pr),h.pack(Kn,A,F),h.pack(cn,A,F+3),h.pack(Pr,A,F+6),h.pack(Jn,A,F+9),pr=h.multiplyByScalar(xt,-2*D.EPSILON5,Yue),h.add(Kn,pr,Kn),h.add(cn,pr,cn),h.add(Jn,pr,Jn),h.add(Pr,pr,Pr),j8(Kn,cn),j8(Jn,Pr),h.pack(Kn,A,F+12),h.pack(cn,A,F+15),h.pack(Pr,A,F+18),h.pack(Jn,A,F+21),k+=2,c+=3,U+=16,F+=24,H+=32,K+=Ye,le+=Nn}c=0;let ae=0;for(s=0;s<f;s++){for(j=0;j<Xue;j++)m[c+j]=tfe[j]+ae;ae+=8,c+=Xue}let be=q4e;ce.fromVertices(n,h.ZERO,3,be[0]),ce.fromVertices(i,h.ZERO,3,be[1]);let ge=ce.fromBoundingSpheres(be);ge.radius+=me/(f*2);let we={position:new Me({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,normalize:!1,values:A}),startHiAndForwardOffsetX:uA(y),startLoAndForwardOffsetY:uA(x),startNormalAndForwardOffsetZ:uA(b),endNormalAndTextureCoordinateNormalizationX:uA(C),rightNormalAndTextureCoordinateNormalizationY:uA(E)};return a&&(we.startHiLo2D=uA(S),we.offsetAndRight2D=uA(w),we.startEndNormals2D=uA(P),we.texcoordNormalization2D=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:2,normalize:!1,values:R})),new At({attributes:we,indices:m,boundingSphere:ge})}function uA(e){return new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}fA._projectNormal=gO;var zx=fA;var _O=`in vec4 v_startPlaneNormalEcAndHalfWidth;
- in vec4 v_endPlaneNormalEcAndBatchId;
- in vec4 v_rightPlaneEC; // Technically can compute distance for this here
- in vec4 v_endEcAndStartEcX;
- in vec4 v_texcoordNormalizationAndStartEcYZ;
-
- #ifdef PER_INSTANCE_COLOR
- in vec4 v_color;
- #endif
-
- void main(void)
- {
- float logDepthOrDepth = czm_branchFreeTernary(czm_sceneMode == czm_sceneMode2D, gl_FragCoord.z, czm_unpackDepth(texture(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw)));
- vec3 ecStart = vec3(v_endEcAndStartEcX.w, v_texcoordNormalizationAndStartEcYZ.zw);
-
- // Discard for sky
- if (logDepthOrDepth == 0.0) {
- #ifdef DEBUG_SHOW_VOLUME
- out_FragColor = vec4(1.0, 0.0, 0.0, 0.5);
- return;
- #else // DEBUG_SHOW_VOLUME
- discard;
- #endif // DEBUG_SHOW_VOLUME
- }
-
- vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);
- eyeCoordinate /= eyeCoordinate.w;
-
- float halfMaxWidth = v_startPlaneNormalEcAndHalfWidth.w * czm_metersPerPixel(eyeCoordinate);
- // Check distance of the eye coordinate against the right-facing plane
- float widthwiseDistance = czm_planeDistance(v_rightPlaneEC, eyeCoordinate.xyz);
-
- // Check eye coordinate against the mitering planes
- float distanceFromStart = czm_planeDistance(v_startPlaneNormalEcAndHalfWidth.xyz, -dot(ecStart, v_startPlaneNormalEcAndHalfWidth.xyz), eyeCoordinate.xyz);
- float distanceFromEnd = czm_planeDistance(v_endPlaneNormalEcAndBatchId.xyz, -dot(v_endEcAndStartEcX.xyz, v_endPlaneNormalEcAndBatchId.xyz), eyeCoordinate.xyz);
-
- if (abs(widthwiseDistance) > halfMaxWidth || distanceFromStart < 0.0 || distanceFromEnd < 0.0) {
- #ifdef DEBUG_SHOW_VOLUME
- out_FragColor = vec4(1.0, 0.0, 0.0, 0.5);
- return;
- #else // DEBUG_SHOW_VOLUME
- discard;
- #endif // DEBUG_SHOW_VOLUME
- }
-
- // Check distance of the eye coordinate against start and end planes with normals in the right plane.
- // For computing unskewed lengthwise texture coordinate.
- // Can also be used for clipping extremely pointy miters, but in practice unnecessary because of miter breaking.
-
- // aligned plane: cross the right plane normal with miter plane normal, then cross the result with right again to point it more "forward"
- vec3 alignedPlaneNormal;
-
- // start aligned plane
- alignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_startPlaneNormalEcAndHalfWidth.xyz);
- alignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));
- distanceFromStart = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, ecStart), eyeCoordinate.xyz);
-
- // end aligned plane
- alignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_endPlaneNormalEcAndBatchId.xyz);
- alignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));
- distanceFromEnd = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, v_endEcAndStartEcX.xyz), eyeCoordinate.xyz);
-
- #ifdef PER_INSTANCE_COLOR
- out_FragColor = czm_gammaCorrect(v_color);
- #else // PER_INSTANCE_COLOR
- // Clamp - distance to aligned planes may be negative due to mitering,
- // so fragment texture coordinate might be out-of-bounds.
- float s = clamp(distanceFromStart / (distanceFromStart + distanceFromEnd), 0.0, 1.0);
- s = (s * v_texcoordNormalizationAndStartEcYZ.x) + v_texcoordNormalizationAndStartEcYZ.y;
- float t = (widthwiseDistance + halfMaxWidth) / (2.0 * halfMaxWidth);
-
- czm_materialInput materialInput;
-
- materialInput.s = s;
- materialInput.st = vec2(s, t);
- materialInput.str = vec3(s, t, 0.0);
-
- czm_material material = czm_getMaterial(materialInput);
- out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
- #endif // PER_INSTANCE_COLOR
-
- // Premultiply alpha. Required for classification primitives on translucent globe.
- out_FragColor.rgb *= out_FragColor.a;
-
- czm_writeDepthClamp();
- }
- `;var AO=`in vec3 v_forwardDirectionEC;
- in vec3 v_texcoordNormalizationAndHalfWidth;
- in float v_batchId;
-
- #ifdef PER_INSTANCE_COLOR
- in vec4 v_color;
- #else
- in vec2 v_alignedPlaneDistances;
- in float v_texcoordT;
- #endif
-
- float rayPlaneDistanceUnsafe(vec3 origin, vec3 direction, vec3 planeNormal, float planeDistance) {
- // We don't expect the ray to ever be parallel to the plane
- return (-planeDistance - dot(planeNormal, origin)) / dot(planeNormal, direction);
- }
-
- void main(void)
- {
- vec4 eyeCoordinate = gl_FragCoord;
- eyeCoordinate /= eyeCoordinate.w;
-
- #ifdef PER_INSTANCE_COLOR
- out_FragColor = czm_gammaCorrect(v_color);
- #else // PER_INSTANCE_COLOR
- // Use distances for planes aligned with segment to prevent skew in dashing
- float distanceFromStart = rayPlaneDistanceUnsafe(eyeCoordinate.xyz, -v_forwardDirectionEC, v_forwardDirectionEC.xyz, v_alignedPlaneDistances.x);
- float distanceFromEnd = rayPlaneDistanceUnsafe(eyeCoordinate.xyz, v_forwardDirectionEC, -v_forwardDirectionEC.xyz, v_alignedPlaneDistances.y);
-
- // Clamp - distance to aligned planes may be negative due to mitering
- distanceFromStart = max(0.0, distanceFromStart);
- distanceFromEnd = max(0.0, distanceFromEnd);
-
- float s = distanceFromStart / (distanceFromStart + distanceFromEnd);
- s = (s * v_texcoordNormalizationAndHalfWidth.x) + v_texcoordNormalizationAndHalfWidth.y;
-
- czm_materialInput materialInput;
-
- materialInput.s = s;
- materialInput.st = vec2(s, v_texcoordT);
- materialInput.str = vec3(s, v_texcoordT, 0.0);
-
- czm_material material = czm_getMaterial(materialInput);
- out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
- #endif // PER_INSTANCE_COLOR
- }
- `;var yO=`in vec3 position3DHigh;
- in vec3 position3DLow;
-
- in vec4 startHiAndForwardOffsetX;
- in vec4 startLoAndForwardOffsetY;
- in vec4 startNormalAndForwardOffsetZ;
- in vec4 endNormalAndTextureCoordinateNormalizationX;
- in vec4 rightNormalAndTextureCoordinateNormalizationY;
- in vec4 startHiLo2D;
- in vec4 offsetAndRight2D;
- in vec4 startEndNormals2D;
- in vec2 texcoordNormalization2D;
-
- in float batchId;
-
- out vec3 v_forwardDirectionEC;
- out vec3 v_texcoordNormalizationAndHalfWidth;
- out float v_batchId;
-
- // For materials
- #ifdef WIDTH_VARYING
- out float v_width;
- #endif
- #ifdef ANGLE_VARYING
- out float v_polylineAngle;
- #endif
-
- #ifdef PER_INSTANCE_COLOR
- out vec4 v_color;
- #else
- out vec2 v_alignedPlaneDistances;
- out float v_texcoordT;
- #endif
-
- // Morphing planes using SLERP or NLERP doesn't seem to work, so instead draw the material directly on the shadow volume.
- // Morph views are from very far away and aren't meant to be used precisely, so this should be sufficient.
- void main()
- {
- v_batchId = batchId;
-
- // Start position
- vec4 posRelativeToEye2D = czm_translateRelativeToEye(vec3(0.0, startHiLo2D.xy), vec3(0.0, startHiLo2D.zw));
- vec4 posRelativeToEye3D = czm_translateRelativeToEye(startHiAndForwardOffsetX.xyz, startLoAndForwardOffsetY.xyz);
- vec4 posRelativeToEye = czm_columbusViewMorph(posRelativeToEye2D, posRelativeToEye3D, czm_morphTime);
- vec3 posEc2D = (czm_modelViewRelativeToEye * posRelativeToEye2D).xyz;
- vec3 posEc3D = (czm_modelViewRelativeToEye * posRelativeToEye3D).xyz;
- vec3 startEC = (czm_modelViewRelativeToEye * posRelativeToEye).xyz;
-
- // Start plane
- vec4 startPlane2D;
- vec4 startPlane3D;
- startPlane2D.xyz = czm_normal * vec3(0.0, startEndNormals2D.xy);
- startPlane3D.xyz = czm_normal * startNormalAndForwardOffsetZ.xyz;
- startPlane2D.w = -dot(startPlane2D.xyz, posEc2D);
- startPlane3D.w = -dot(startPlane3D.xyz, posEc3D);
-
- // Right plane
- vec4 rightPlane2D;
- vec4 rightPlane3D;
- rightPlane2D.xyz = czm_normal * vec3(0.0, offsetAndRight2D.zw);
- rightPlane3D.xyz = czm_normal * rightNormalAndTextureCoordinateNormalizationY.xyz;
- rightPlane2D.w = -dot(rightPlane2D.xyz, posEc2D);
- rightPlane3D.w = -dot(rightPlane3D.xyz, posEc3D);
-
- // End position
- posRelativeToEye2D = posRelativeToEye2D + vec4(0.0, offsetAndRight2D.xy, 0.0);
- posRelativeToEye3D = posRelativeToEye3D + vec4(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w, 0.0);
- posRelativeToEye = czm_columbusViewMorph(posRelativeToEye2D, posRelativeToEye3D, czm_morphTime);
- posEc2D = (czm_modelViewRelativeToEye * posRelativeToEye2D).xyz;
- posEc3D = (czm_modelViewRelativeToEye * posRelativeToEye3D).xyz;
- vec3 endEC = (czm_modelViewRelativeToEye * posRelativeToEye).xyz;
- vec3 forwardEc3D = czm_normal * normalize(vec3(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w));
- vec3 forwardEc2D = czm_normal * normalize(vec3(0.0, offsetAndRight2D.xy));
-
- // End plane
- vec4 endPlane2D;
- vec4 endPlane3D;
- endPlane2D.xyz = czm_normal * vec3(0.0, startEndNormals2D.zw);
- endPlane3D.xyz = czm_normal * endNormalAndTextureCoordinateNormalizationX.xyz;
- endPlane2D.w = -dot(endPlane2D.xyz, posEc2D);
- endPlane3D.w = -dot(endPlane3D.xyz, posEc3D);
-
- // Forward direction
- v_forwardDirectionEC = normalize(endEC - startEC);
-
- vec2 cleanTexcoordNormalization2D;
- cleanTexcoordNormalization2D.x = abs(texcoordNormalization2D.x);
- cleanTexcoordNormalization2D.y = czm_branchFreeTernary(texcoordNormalization2D.y > 1.0, 0.0, abs(texcoordNormalization2D.y));
- vec2 cleanTexcoordNormalization3D;
- cleanTexcoordNormalization3D.x = abs(endNormalAndTextureCoordinateNormalizationX.w);
- cleanTexcoordNormalization3D.y = rightNormalAndTextureCoordinateNormalizationY.w;
- cleanTexcoordNormalization3D.y = czm_branchFreeTernary(cleanTexcoordNormalization3D.y > 1.0, 0.0, abs(cleanTexcoordNormalization3D.y));
-
- v_texcoordNormalizationAndHalfWidth.xy = mix(cleanTexcoordNormalization2D, cleanTexcoordNormalization3D, czm_morphTime);
-
- #ifdef PER_INSTANCE_COLOR
- v_color = czm_batchTable_color(batchId);
- #else // PER_INSTANCE_COLOR
- // For computing texture coordinates
-
- v_alignedPlaneDistances.x = -dot(v_forwardDirectionEC, startEC);
- v_alignedPlaneDistances.y = -dot(-v_forwardDirectionEC, endEC);
- #endif // PER_INSTANCE_COLOR
-
- #ifdef WIDTH_VARYING
- float width = czm_batchTable_width(batchId);
- float halfWidth = width * 0.5;
- v_width = width;
- v_texcoordNormalizationAndHalfWidth.z = halfWidth;
- #else
- float halfWidth = 0.5 * czm_batchTable_width(batchId);
- v_texcoordNormalizationAndHalfWidth.z = halfWidth;
- #endif
-
- // Compute a normal along which to "push" the position out, extending the miter depending on view distance.
- // Position has already been "pushed" by unit length along miter normal, and miter normals are encoded in the planes.
- // Decode the normal to use at this specific vertex, push the position back, and then push to where it needs to be.
- // Since this is morphing, compute both 3D and 2D positions and then blend.
-
- // ****** 3D ******
- // Check distance to the end plane and start plane, pick the plane that is closer
- vec4 positionEc3D = czm_modelViewRelativeToEye * czm_translateRelativeToEye(position3DHigh, position3DLow); // w = 1.0, see czm_computePosition
- float absStartPlaneDistance = abs(czm_planeDistance(startPlane3D, positionEc3D.xyz));
- float absEndPlaneDistance = abs(czm_planeDistance(endPlane3D, positionEc3D.xyz));
- vec3 planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlane3D.xyz, endPlane3D.xyz);
- vec3 upOrDown = normalize(cross(rightPlane3D.xyz, planeDirection)); // Points "up" for start plane, "down" at end plane.
- vec3 normalEC = normalize(cross(planeDirection, upOrDown)); // In practice, the opposite seems to work too.
-
- // Nudge the top vertex upwards to prevent flickering
- vec3 geodeticSurfaceNormal = normalize(cross(normalEC, forwardEc3D));
- geodeticSurfaceNormal *= float(0.0 <= rightNormalAndTextureCoordinateNormalizationY.w && rightNormalAndTextureCoordinateNormalizationY.w <= 1.0);
- geodeticSurfaceNormal *= MAX_TERRAIN_HEIGHT;
- positionEc3D.xyz += geodeticSurfaceNormal;
-
- // Determine if this vertex is on the "left" or "right"
- normalEC *= sign(endNormalAndTextureCoordinateNormalizationX.w);
-
- // A "perfect" implementation would push along normals according to the angle against forward.
- // In practice, just pushing the normal out by halfWidth is sufficient for morph views.
- positionEc3D.xyz += halfWidth * max(0.0, czm_metersPerPixel(positionEc3D)) * normalEC; // prevent artifacts when czm_metersPerPixel is negative (behind camera)
-
- // ****** 2D ******
- // Check distance to the end plane and start plane, pick the plane that is closer
- vec4 positionEc2D = czm_modelViewRelativeToEye * czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy); // w = 1.0, see czm_computePosition
- absStartPlaneDistance = abs(czm_planeDistance(startPlane2D, positionEc2D.xyz));
- absEndPlaneDistance = abs(czm_planeDistance(endPlane2D, positionEc2D.xyz));
- planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlane2D.xyz, endPlane2D.xyz);
- upOrDown = normalize(cross(rightPlane2D.xyz, planeDirection)); // Points "up" for start plane, "down" at end plane.
- normalEC = normalize(cross(planeDirection, upOrDown)); // In practice, the opposite seems to work too.
-
- // Nudge the top vertex upwards to prevent flickering
- geodeticSurfaceNormal = normalize(cross(normalEC, forwardEc2D));
- geodeticSurfaceNormal *= float(0.0 <= texcoordNormalization2D.y && texcoordNormalization2D.y <= 1.0);
- geodeticSurfaceNormal *= MAX_TERRAIN_HEIGHT;
- positionEc2D.xyz += geodeticSurfaceNormal;
-
- // Determine if this vertex is on the "left" or "right"
- normalEC *= sign(texcoordNormalization2D.x);
- #ifndef PER_INSTANCE_COLOR
- // Use vertex's sidedness to compute its texture coordinate.
- v_texcoordT = clamp(sign(texcoordNormalization2D.x), 0.0, 1.0);
- #endif
-
- // A "perfect" implementation would push along normals according to the angle against forward.
- // In practice, just pushing the normal out by halfWidth is sufficient for morph views.
- positionEc2D.xyz += halfWidth * max(0.0, czm_metersPerPixel(positionEc2D)) * normalEC; // prevent artifacts when czm_metersPerPixel is negative (behind camera)
-
- // Blend for actual position
- gl_Position = czm_projection * mix(positionEc2D, positionEc3D, czm_morphTime);
-
- #ifdef ANGLE_VARYING
- // Approximate relative screen space direction of the line.
- vec2 approxLineDirection = normalize(vec2(v_forwardDirectionEC.x, -v_forwardDirectionEC.y));
- approxLineDirection.y = czm_branchFreeTernary(approxLineDirection.x == 0.0 && approxLineDirection.y == 0.0, -1.0, approxLineDirection.y);
- v_polylineAngle = czm_fastApproximateAtan(approxLineDirection.x, approxLineDirection.y);
- #endif
- }
- `;var xO=`in vec3 position3DHigh;
- in vec3 position3DLow;
-
- // In 2D and in 3D, texture coordinate normalization component signs encodes:
- // * X sign - sidedness relative to right plane
- // * Y sign - is negative OR magnitude is greater than 1.0 if vertex is on bottom of volume
- #ifndef COLUMBUS_VIEW_2D
- in vec4 startHiAndForwardOffsetX;
- in vec4 startLoAndForwardOffsetY;
- in vec4 startNormalAndForwardOffsetZ;
- in vec4 endNormalAndTextureCoordinateNormalizationX;
- in vec4 rightNormalAndTextureCoordinateNormalizationY;
- #else
- in vec4 startHiLo2D;
- in vec4 offsetAndRight2D;
- in vec4 startEndNormals2D;
- in vec2 texcoordNormalization2D;
- #endif
-
- in float batchId;
-
- out vec4 v_startPlaneNormalEcAndHalfWidth;
- out vec4 v_endPlaneNormalEcAndBatchId;
- out vec4 v_rightPlaneEC;
- out vec4 v_endEcAndStartEcX;
- out vec4 v_texcoordNormalizationAndStartEcYZ;
-
- // For materials
- #ifdef WIDTH_VARYING
- out float v_width;
- #endif
- #ifdef ANGLE_VARYING
- out float v_polylineAngle;
- #endif
-
- #ifdef PER_INSTANCE_COLOR
- out vec4 v_color;
- #endif
-
- void main()
- {
- #ifdef COLUMBUS_VIEW_2D
- vec3 ecStart = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, startHiLo2D.xy), vec3(0.0, startHiLo2D.zw))).xyz;
-
- vec3 forwardDirectionEC = czm_normal * vec3(0.0, offsetAndRight2D.xy);
- vec3 ecEnd = forwardDirectionEC + ecStart;
- forwardDirectionEC = normalize(forwardDirectionEC);
-
- // Right plane
- v_rightPlaneEC.xyz = czm_normal * vec3(0.0, offsetAndRight2D.zw);
- v_rightPlaneEC.w = -dot(v_rightPlaneEC.xyz, ecStart);
-
- // start plane
- vec4 startPlaneEC;
- startPlaneEC.xyz = czm_normal * vec3(0.0, startEndNormals2D.xy);
- startPlaneEC.w = -dot(startPlaneEC.xyz, ecStart);
-
- // end plane
- vec4 endPlaneEC;
- endPlaneEC.xyz = czm_normal * vec3(0.0, startEndNormals2D.zw);
- endPlaneEC.w = -dot(endPlaneEC.xyz, ecEnd);
-
- v_texcoordNormalizationAndStartEcYZ.x = abs(texcoordNormalization2D.x);
- v_texcoordNormalizationAndStartEcYZ.y = texcoordNormalization2D.y;
-
- #else // COLUMBUS_VIEW_2D
- vec3 ecStart = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(startHiAndForwardOffsetX.xyz, startLoAndForwardOffsetY.xyz)).xyz;
- vec3 offset = czm_normal * vec3(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w);
- vec3 ecEnd = ecStart + offset;
-
- vec3 forwardDirectionEC = normalize(offset);
-
- // start plane
- vec4 startPlaneEC;
- startPlaneEC.xyz = czm_normal * startNormalAndForwardOffsetZ.xyz;
- startPlaneEC.w = -dot(startPlaneEC.xyz, ecStart);
-
- // end plane
- vec4 endPlaneEC;
- endPlaneEC.xyz = czm_normal * endNormalAndTextureCoordinateNormalizationX.xyz;
- endPlaneEC.w = -dot(endPlaneEC.xyz, ecEnd);
-
- // Right plane
- v_rightPlaneEC.xyz = czm_normal * rightNormalAndTextureCoordinateNormalizationY.xyz;
- v_rightPlaneEC.w = -dot(v_rightPlaneEC.xyz, ecStart);
-
- v_texcoordNormalizationAndStartEcYZ.x = abs(endNormalAndTextureCoordinateNormalizationX.w);
- v_texcoordNormalizationAndStartEcYZ.y = rightNormalAndTextureCoordinateNormalizationY.w;
-
- #endif // COLUMBUS_VIEW_2D
-
- v_endEcAndStartEcX.xyz = ecEnd;
- v_endEcAndStartEcX.w = ecStart.x;
- v_texcoordNormalizationAndStartEcYZ.zw = ecStart.yz;
-
- #ifdef PER_INSTANCE_COLOR
- v_color = czm_batchTable_color(batchId);
- #endif // PER_INSTANCE_COLOR
-
- // Compute a normal along which to "push" the position out, extending the miter depending on view distance.
- // Position has already been "pushed" by unit length along miter normal, and miter normals are encoded in the planes.
- // Decode the normal to use at this specific vertex, push the position back, and then push to where it needs to be.
- vec4 positionRelativeToEye = czm_computePosition();
-
- // Check distance to the end plane and start plane, pick the plane that is closer
- vec4 positionEC = czm_modelViewRelativeToEye * positionRelativeToEye; // w = 1.0, see czm_computePosition
- float absStartPlaneDistance = abs(czm_planeDistance(startPlaneEC, positionEC.xyz));
- float absEndPlaneDistance = abs(czm_planeDistance(endPlaneEC, positionEC.xyz));
- vec3 planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlaneEC.xyz, endPlaneEC.xyz);
- vec3 upOrDown = normalize(cross(v_rightPlaneEC.xyz, planeDirection)); // Points "up" for start plane, "down" at end plane.
- vec3 normalEC = normalize(cross(planeDirection, upOrDown)); // In practice, the opposite seems to work too.
-
- // Extrude bottom vertices downward for far view distances, like for GroundPrimitives
- upOrDown = cross(forwardDirectionEC, normalEC);
- upOrDown = float(czm_sceneMode == czm_sceneMode3D) * upOrDown;
- upOrDown = float(v_texcoordNormalizationAndStartEcYZ.y > 1.0 || v_texcoordNormalizationAndStartEcYZ.y < 0.0) * upOrDown;
- upOrDown = min(GLOBE_MINIMUM_ALTITUDE, czm_geometricToleranceOverMeter * length(positionRelativeToEye.xyz)) * upOrDown;
- positionEC.xyz += upOrDown;
-
- v_texcoordNormalizationAndStartEcYZ.y = czm_branchFreeTernary(v_texcoordNormalizationAndStartEcYZ.y > 1.0, 0.0, abs(v_texcoordNormalizationAndStartEcYZ.y));
-
- // Determine distance along normalEC to push for a volume of appropriate width.
- // Make volumes about double pixel width for a conservative fit - in practice the
- // extra cost here is minimal compared to the loose volume heights.
- //
- // N = normalEC (guaranteed "right-facing")
- // R = rightEC
- // p = angle between N and R
- // w = distance to push along R if R == N
- // d = distance to push along N
- //
- // N R
- // { p| } * cos(p) = dot(N, R) = w / d
- // d | |w * d = w / dot(N, R)
- // { | }
- // o---------- polyline segment ---->
- //
- float width = czm_batchTable_width(batchId);
- #ifdef WIDTH_VARYING
- v_width = width;
- #endif
-
- v_startPlaneNormalEcAndHalfWidth.xyz = startPlaneEC.xyz;
- v_startPlaneNormalEcAndHalfWidth.w = width * 0.5;
-
- v_endPlaneNormalEcAndBatchId.xyz = endPlaneEC.xyz;
- v_endPlaneNormalEcAndBatchId.w = batchId;
-
- width = width * max(0.0, czm_metersPerPixel(positionEC)); // width = distance to push along R
- width = width / dot(normalEC, v_rightPlaneEC.xyz); // width = distance to push along N
-
- // Determine if this vertex is on the "left" or "right"
- #ifdef COLUMBUS_VIEW_2D
- normalEC *= sign(texcoordNormalization2D.x);
- #else
- normalEC *= sign(endNormalAndTextureCoordinateNormalizationX.w);
- #endif
-
- positionEC.xyz += width * normalEC;
- gl_Position = czm_depthClamp(czm_projection * positionEC);
-
- #ifdef ANGLE_VARYING
- // Approximate relative screen space direction of the line.
- vec2 approxLineDirection = normalize(vec2(forwardDirectionEC.x, -forwardDirectionEC.y));
- approxLineDirection.y = czm_branchFreeTernary(approxLineDirection.x == 0.0 && approxLineDirection.y == 0.0, -1.0, approxLineDirection.y);
- v_polylineAngle = czm_fastApproximateAtan(approxLineDirection.x, approxLineDirection.y);
- #endif
- }
- `;var bO=`in vec3 position3DHigh;
- in vec3 position3DLow;
- in vec3 prevPosition3DHigh;
- in vec3 prevPosition3DLow;
- in vec3 nextPosition3DHigh;
- in vec3 nextPosition3DLow;
- in vec2 expandAndWidth;
- in vec4 color;
- in float batchId;
-
- out vec4 v_color;
-
- void main()
- {
- float expandDir = expandAndWidth.x;
- float width = abs(expandAndWidth.y) + 0.5;
- bool usePrev = expandAndWidth.y < 0.0;
-
- vec4 p = czm_computePosition();
- vec4 prev = czm_computePrevPosition();
- vec4 next = czm_computeNextPosition();
-
- float angle;
- vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, angle);
- gl_Position = czm_viewportOrthographic * positionWC;
-
- v_color = color;
- }
- `;var kl=`void clipLineSegmentToNearPlane(
- vec3 p0,
- vec3 p1,
- out vec4 positionWC,
- out bool clipped,
- out bool culledByNearPlane,
- out vec4 clippedPositionEC)
- {
- culledByNearPlane = false;
- clipped = false;
-
- vec3 p0ToP1 = p1 - p0;
- float magnitude = length(p0ToP1);
- vec3 direction = normalize(p0ToP1);
-
- // Distance that p0 is behind the near plane. Negative means p0 is
- // in front of the near plane.
- float endPoint0Distance = czm_currentFrustum.x + p0.z;
-
- // Camera looks down -Z.
- // When moving a point along +Z: LESS VISIBLE
- // * Points in front of the camera move closer to the camera.
- // * Points behind the camrea move farther away from the camera.
- // When moving a point along -Z: MORE VISIBLE
- // * Points in front of the camera move farther away from the camera.
- // * Points behind the camera move closer to the camera.
-
- // Positive denominator: -Z, becoming more visible
- // Negative denominator: +Z, becoming less visible
- // Nearly zero: parallel to near plane
- float denominator = -direction.z;
-
- if (endPoint0Distance > 0.0 && abs(denominator) < czm_epsilon7)
- {
- // p0 is behind the near plane and the line to p1 is nearly parallel to
- // the near plane, so cull the segment completely.
- culledByNearPlane = true;
- }
- else if (endPoint0Distance > 0.0)
- {
- // p0 is behind the near plane, and the line to p1 is moving distinctly
- // toward or away from it.
-
- // t = (-plane distance - dot(plane normal, ray origin)) / dot(plane normal, ray direction)
- float t = endPoint0Distance / denominator;
- if (t < 0.0 || t > magnitude)
- {
- // Near plane intersection is not between the two points.
- // We already confirmed p0 is behind the naer plane, so now
- // we know the entire segment is behind it.
- culledByNearPlane = true;
- }
- else
- {
- // Segment crosses the near plane, update p0 to lie exactly on it.
- p0 = p0 + t * direction;
-
- // Numerical noise might put us a bit on the wrong side of the near plane.
- // Don't let that happen.
- p0.z = min(p0.z, -czm_currentFrustum.x);
-
- clipped = true;
- }
- }
-
- clippedPositionEC = vec4(p0, 1.0);
- positionWC = czm_eyeToWindowCoordinates(clippedPositionEC);
- }
-
- vec4 getPolylineWindowCoordinatesEC(vec4 positionEC, vec4 prevEC, vec4 nextEC, float expandDirection, float width, bool usePrevious, out float angle)
- {
- // expandDirection +1 is to the _left_ when looking from positionEC toward nextEC.
-
- #ifdef POLYLINE_DASH
- // Compute the window coordinates of the points.
- vec4 positionWindow = czm_eyeToWindowCoordinates(positionEC);
- vec4 previousWindow = czm_eyeToWindowCoordinates(prevEC);
- vec4 nextWindow = czm_eyeToWindowCoordinates(nextEC);
-
- // Determine the relative screen space direction of the line.
- vec2 lineDir;
- if (usePrevious) {
- lineDir = normalize(positionWindow.xy - previousWindow.xy);
- }
- else {
- lineDir = normalize(nextWindow.xy - positionWindow.xy);
- }
- angle = atan(lineDir.x, lineDir.y) - 1.570796327; // precomputed atan(1,0)
-
- // Quantize the angle so it doesn't change rapidly between segments.
- angle = floor(angle / czm_piOverFour + 0.5) * czm_piOverFour;
- #endif
-
- vec4 clippedPrevWC, clippedPrevEC;
- bool prevSegmentClipped, prevSegmentCulled;
- clipLineSegmentToNearPlane(prevEC.xyz, positionEC.xyz, clippedPrevWC, prevSegmentClipped, prevSegmentCulled, clippedPrevEC);
-
- vec4 clippedNextWC, clippedNextEC;
- bool nextSegmentClipped, nextSegmentCulled;
- clipLineSegmentToNearPlane(nextEC.xyz, positionEC.xyz, clippedNextWC, nextSegmentClipped, nextSegmentCulled, clippedNextEC);
-
- bool segmentClipped, segmentCulled;
- vec4 clippedPositionWC, clippedPositionEC;
- clipLineSegmentToNearPlane(positionEC.xyz, usePrevious ? prevEC.xyz : nextEC.xyz, clippedPositionWC, segmentClipped, segmentCulled, clippedPositionEC);
-
- if (segmentCulled)
- {
- return vec4(0.0, 0.0, 0.0, 1.0);
- }
-
- vec2 directionToPrevWC = normalize(clippedPrevWC.xy - clippedPositionWC.xy);
- vec2 directionToNextWC = normalize(clippedNextWC.xy - clippedPositionWC.xy);
-
- // If a segment was culled, we can't use the corresponding direction
- // computed above. We should never see both of these be true without
- // \`segmentCulled\` above also being true.
- if (prevSegmentCulled)
- {
- directionToPrevWC = -directionToNextWC;
- }
- else if (nextSegmentCulled)
- {
- directionToNextWC = -directionToPrevWC;
- }
-
- vec2 thisSegmentForwardWC, otherSegmentForwardWC;
- if (usePrevious)
- {
- thisSegmentForwardWC = -directionToPrevWC;
- otherSegmentForwardWC = directionToNextWC;
- }
- else
- {
- thisSegmentForwardWC = directionToNextWC;
- otherSegmentForwardWC = -directionToPrevWC;
- }
-
- vec2 thisSegmentLeftWC = vec2(-thisSegmentForwardWC.y, thisSegmentForwardWC.x);
-
- vec2 leftWC = thisSegmentLeftWC;
- float expandWidth = width * 0.5;
-
- // When lines are split at the anti-meridian, the position may be at the
- // same location as the next or previous position, and we need to handle
- // that to avoid producing NaNs.
- if (!czm_equalsEpsilon(prevEC.xyz - positionEC.xyz, vec3(0.0), czm_epsilon1) && !czm_equalsEpsilon(nextEC.xyz - positionEC.xyz, vec3(0.0), czm_epsilon1))
- {
- vec2 otherSegmentLeftWC = vec2(-otherSegmentForwardWC.y, otherSegmentForwardWC.x);
-
- vec2 leftSumWC = thisSegmentLeftWC + otherSegmentLeftWC;
- float leftSumLength = length(leftSumWC);
- leftWC = leftSumLength < czm_epsilon6 ? thisSegmentLeftWC : (leftSumWC / leftSumLength);
-
- // The sine of the angle between the two vectors is given by the formula
- // |a x b| = |a||b|sin(theta)
- // which is
- // float sinAngle = length(cross(vec3(leftWC, 0.0), vec3(-thisSegmentForwardWC, 0.0)));
- // Because the z components of both vectors are zero, the x and y coordinate will be zero.
- // Therefore, the sine of the angle is just the z component of the cross product.
- vec2 u = -thisSegmentForwardWC;
- vec2 v = leftWC;
- float sinAngle = abs(u.x * v.y - u.y * v.x);
- expandWidth = clamp(expandWidth / sinAngle, 0.0, width * 2.0);
- }
-
- vec2 offset = leftWC * expandDirection * expandWidth * czm_pixelRatio;
- return vec4(clippedPositionWC.xy + offset, -clippedPositionWC.z, 1.0) * (czm_projection * clippedPositionEC).w;
- }
-
- vec4 getPolylineWindowCoordinates(vec4 position, vec4 previous, vec4 next, float expandDirection, float width, bool usePrevious, out float angle)
- {
- vec4 positionEC = czm_modelViewRelativeToEye * position;
- vec4 prevEC = czm_modelViewRelativeToEye * previous;
- vec4 nextEC = czm_modelViewRelativeToEye * next;
- return getPolylineWindowCoordinatesEC(positionEC, prevEC, nextEC, expandDirection, width, usePrevious, angle);
- }
- `;var X4e=`#define CLIP_POLYLINE
- ${kl}
- ${bO}`,K4e=Bx;function Ux(e){e=e??G.EMPTY_OBJECT;let t=e.translucent??!0,n=!1,i=Ux.VERTEX_FORMAT;this.material=void 0,this.translucent=t,this._vertexShaderSource=e.vertexShaderSource??X4e,this._fragmentShaderSource=e.fragmentShaderSource??K4e,this._renderState=yo.getDefaultRenderState(t,n,e.renderState),this._closed=n,this._vertexFormat=i}Object.defineProperties(Ux.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return this._vertexFormat}}});Ux.VERTEX_FORMAT=Ne.POSITION_ONLY;Ux.prototype.getFragmentShaderSource=yo.prototype.getFragmentShaderSource;Ux.prototype.isTranslucent=yo.prototype.isTranslucent;Ux.prototype.getRenderState=yo.prototype.getRenderState;var Oa=Ux;var CO=`in vec3 position3DHigh;
- in vec3 position3DLow;
- in vec3 prevPosition3DHigh;
- in vec3 prevPosition3DLow;
- in vec3 nextPosition3DHigh;
- in vec3 nextPosition3DLow;
- in vec2 expandAndWidth;
- in vec2 st;
- in float batchId;
-
- out float v_width;
- out vec2 v_st;
- out float v_polylineAngle;
-
- void main()
- {
- float expandDir = expandAndWidth.x;
- float width = abs(expandAndWidth.y) + 0.5;
- bool usePrev = expandAndWidth.y < 0.0;
-
- vec4 p = czm_computePosition();
- vec4 prev = czm_computePrevPosition();
- vec4 next = czm_computeNextPosition();
-
- float angle;
- vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, angle);
- gl_Position = czm_viewportOrthographic * positionWC;
-
- v_width = width;
- v_st.s = st.s;
- v_st.t = czm_writeNonPerspective(st.t, gl_Position.w);
- v_polylineAngle = angle;
- }
- `;var Vx=`#ifdef VECTOR_TILE
- uniform vec4 u_highlightColor;
- #endif
-
- in vec2 v_st;
-
- void main()
- {
- czm_materialInput materialInput;
-
- vec2 st = v_st;
- st.t = czm_readNonPerspective(st.t, gl_FragCoord.w);
-
- materialInput.s = st.s;
- materialInput.st = st;
- materialInput.str = vec3(st, 0.0);
-
- czm_material material = czm_getMaterial(materialInput);
- out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
- #ifdef VECTOR_TILE
- out_FragColor *= u_highlightColor;
- #endif
-
- czm_writeLogDepth();
- }
- `;var Q4e=`#define CLIP_POLYLINE
- ${kl}
- ${CO}`,$4e=Vx;function jx(e){e=e??G.EMPTY_OBJECT;let t=e.translucent??!0,n=!1,i=jx.VERTEX_FORMAT;this.material=l(e.material)?e.material:Hi.fromType(Hi.ColorType),this.translucent=t,this._vertexShaderSource=e.vertexShaderSource??Q4e,this._fragmentShaderSource=e.fragmentShaderSource??$4e,this._renderState=yo.getDefaultRenderState(t,n,e.renderState),this._closed=n,this._vertexFormat=i}Object.defineProperties(jx.prototype,{vertexShaderSource:{get:function(){let e=this._vertexShaderSource;return this.material.shaderSource.search(/in\s+float\s+v_polylineAngle;/g)!==-1&&(e=`#define POLYLINE_DASH
- ${e}`),e}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return this._vertexFormat}}});jx.VERTEX_FORMAT=Ne.POSITION_AND_ST;jx.prototype.getFragmentShaderSource=yo.prototype.getFragmentShaderSource;jx.prototype.isTranslucent=yo.prototype.isTranslucent;jx.prototype.getRenderState=yo.prototype.getRenderState;var nc=jx;function Q0(e){e=e??G.EMPTY_OBJECT,this.geometryInstances=e.geometryInstances,this._hasPerInstanceColors=!0;let t=e.appearance;l(t)||(t=new nc),this.appearance=t,this.show=e.show??!0,this.classificationType=e.classificationType??Wn.BOTH,this.debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this._debugShowShadowVolume=e.debugShowShadowVolume??!1,this._primitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:!1,interleave:e.interleave??!1,releaseGeometryInstances:e.releaseGeometryInstances??!0,allowPicking:e.allowPicking??!0,asynchronous:e.asynchronous??!0,compressVertices:!1,_createShaderProgramFunction:void 0,_createCommandsFunction:void 0,_updateAndQueueCommandsFunction:void 0},this._zIndex=void 0,this._ready=!1,this._primitive=void 0,this._sp=void 0,this._sp2D=void 0,this._spMorph=void 0,this._renderState=nfe(!1),this._renderState3DTiles=nfe(!0),this._renderStateMorph=Ve.fromCache({cull:{enabled:!0,face:Mi.FRONT},depthTest:{enabled:!0},blending:Jt.PRE_MULTIPLIED_ALPHA_BLEND,depthMask:!1})}Object.defineProperties(Q0.prototype,{interleave:{get:function(){return this._primitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._primitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._primitiveOptions.allowPicking}},asynchronous:{get:function(){return this._primitiveOptions.asynchronous}},ready:{get:function(){return this._ready}},debugShowShadowVolume:{get:function(){return this._debugShowShadowVolume}}});Q0.initializeTerrainHeights=function(){return vi.initialize()};function J4e(e,t,n){let i=t.context,o=e._primitive,r=o._attributeLocations,a=o._batchTable.getVertexShaderCallback()(xO);a=Dn._appendShowToShader(o,a),a=Dn._appendDistanceDisplayConditionToShader(o,a),a=Dn._modifyShaderPosition(e,a,t.scene3DOnly);let s=o._batchTable.getVertexShaderCallback()(yO);s=Dn._appendShowToShader(o,s),s=Dn._appendDistanceDisplayConditionToShader(o,s),s=Dn._modifyShaderPosition(e,s,t.scene3DOnly);let c=o._batchTable.getVertexShaderCallback()(_O),u=[`GLOBE_MINIMUM_ALTITUDE ${t.mapProjection.ellipsoid.minimumRadius.toFixed(1)}`],f="",d="";l(n.material)?(d=l(n.material)?n.material.shaderSource:"",d.search(/in\s+float\s+v_polylineAngle;/g)!==-1&&u.push("ANGLE_VARYING"),d.search(/in\s+float\s+v_width;/g)!==-1&&u.push("WIDTH_VARYING")):f="PER_INSTANCE_COLOR",u.push(f);let p=e.debugShowShadowVolume?["DEBUG_SHOW_VOLUME",f]:[f],g=new He({defines:u,sources:[a]}),m=new He({defines:p,sources:[d,c]});e._sp=Kt.replaceCache({context:i,shaderProgram:o._sp,vertexShaderSource:g,fragmentShaderSource:m,attributeLocations:r});let A=i.shaderCache.getDerivedShaderProgram(e._sp,"2dColor");if(!l(A)){let x=new He({defines:u.concat(["COLUMBUS_VIEW_2D"]),sources:[a]});A=i.shaderCache.createDerivedShaderProgram(e._sp,"2dColor",{context:i,shaderProgram:e._sp2D,vertexShaderSource:x,fragmentShaderSource:m,attributeLocations:r})}e._sp2D=A;let y=i.shaderCache.getDerivedShaderProgram(e._sp,"MorphColor");if(!l(y)){let x=new He({defines:u.concat([`MAX_TERRAIN_HEIGHT ${vi._defaultMaxTerrainHeight.toFixed(1)}`]),sources:[s]});c=o._batchTable.getVertexShaderCallback()(AO);let b=new He({defines:p,sources:[d,c]});y=i.shaderCache.createDerivedShaderProgram(e._sp,"MorphColor",{context:i,shaderProgram:e._spMorph,vertexShaderSource:x,fragmentShaderSource:b,attributeLocations:r})}e._spMorph=y}function nfe(e){return Ve.fromCache({cull:{enabled:!0},blending:Jt.PRE_MULTIPLIED_ALPHA_BLEND,depthMask:!1,stencilTest:{enabled:e,frontFunction:qn.EQUAL,frontOperation:{fail:vt.KEEP,zFail:vt.KEEP,zPass:vt.KEEP},backFunction:qn.EQUAL,backOperation:{fail:vt.KEEP,zFail:vt.KEEP,zPass:vt.KEEP},reference:Gt.CESIUM_3D_TILE_MASK,mask:Gt.CESIUM_3D_TILE_MASK}})}function Z4e(e,t,n,i,o,r){let a=e._primitive,s=a._va.length;o.length=s,r.length=s;let u=t instanceof Oa?{}:n._uniforms,f=a._batchTable.getUniformMapCallback()(u);for(let d=0;d<s;d++){let p=a._va[d],g=o[d];l(g)||(g=o[d]=new tt({owner:e,primitiveType:a._primitiveType})),g.vertexArray=p,g.renderState=e._renderState,g.shaderProgram=e._sp,g.uniformMap=f,g.pass=Ie.TERRAIN_CLASSIFICATION,g.pickId="czm_batchTable_pickColor(v_endPlaneNormalEcAndBatchId.w)";let m=tt.shallowClone(g,g.derivedCommands.tileset);m.renderState=e._renderState3DTiles,m.pass=Ie.CESIUM_3D_TILE_CLASSIFICATION,g.derivedCommands.tileset=m;let A=tt.shallowClone(g,g.derivedCommands.color2D);A.shaderProgram=e._sp2D,g.derivedCommands.color2D=A;let y=tt.shallowClone(m,m.derivedCommands.color2D);y.shaderProgram=e._sp2D,m.derivedCommands.color2D=y;let x=tt.shallowClone(g,g.derivedCommands.colorMorph);x.renderState=e._renderStateMorph,x.shaderProgram=e._spMorph,x.pickId="czm_batchTable_pickColor(v_batchId)",g.derivedCommands.colorMorph=x}}function ife(e,t,n,i,o,r,a){n.mode===ie.MORPHING?t=t.derivedCommands.colorMorph:n.mode!==ie.SCENE3D&&(t=t.derivedCommands.color2D),t.modelMatrix=i,t.boundingVolume=r,t.cull=o,t.debugShowBoundingVolume=a,n.commandList.push(t)}function e8e(e,t,n,i,o,r,a){let s=e._primitive;Dn._updateBoundingVolumes(s,t,o);let c;t.mode===ie.SCENE3D?c=s._boundingSphereWC:t.mode===ie.COLUMBUS_VIEW?c=s._boundingSphereCV:t.mode===ie.SCENE2D&&l(s._boundingSphere2D)?c=s._boundingSphere2D:l(s._boundingSphereMorph)&&(c=s._boundingSphereMorph);let u=t.mode===ie.MORPHING,f=e.classificationType,d=f!==Wn.CESIUM_3D_TILE,p=f!==Wn.TERRAIN&&!u,g,m=t.passes;if(m.render||m.pick&&s.allowPicking){let A=n.length;for(let y=0;y<A;++y){let x=c[y];d&&(g=n[y],ife(e,g,t,o,r,x,a)),p&&(g=n[y].derivedCommands.tileset,ife(e,g,t,o,r,x,a))}}}Q0.prototype.update=function(e){if(!l(this._primitive)&&!l(this.geometryInstances))return;if(!vi.initialized){Q0.initializeTerrainHeights();return}let t,n=this,i=this._primitiveOptions;if(!l(this._primitive)){let o=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],r=o.length,a=new Array(r),s;for(t=0;t<r;++t)if(s=o[t].attributes,!l(s)||!l(s.color)){this._hasPerInstanceColors=!1;break}for(t=0;t<r;++t){let c=o[t];s={};let u=c.attributes;for(let f in u)u.hasOwnProperty(f)&&(s[f]=u[f]);l(s.width)||(s.width=new Zc({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,value:[c.geometry.width]})),c.geometry._scene3DOnly=e.scene3DOnly,zx.setProjectionAndEllipsoid(c.geometry,e.mapProjection),a[t]=new Ot({geometry:c.geometry,attributes:s,id:c.id,pickPrimitive:n})}i.geometryInstances=a,i.appearance=this.appearance,i._createShaderProgramFunction=function(c,u,f){J4e(n,u,f)},i._createCommandsFunction=function(c,u,f,d,p,g,m){Z4e(n,u,f,d,g,m)},i._updateAndQueueCommandsFunction=function(c,u,f,d,p,g,m,A){e8e(n,u,f,d,p,g,m)},this._primitive=new Dn(i)}if(this.appearance instanceof Oa&&!this._hasPerInstanceColors)throw new _e("All GeometryInstances must have color attributes to use PolylineColorAppearance with GroundPolylinePrimitive.");this._primitive.appearance=this.appearance,this._primitive.show=this.show,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e),e.afterRender.push(()=>{!this._ready&&l(this._primitive)&&this._primitive.ready&&(this._ready=!0,this.releaseGeometryInstances&&(this.geometryInstances=void 0))})};Q0.prototype.getGeometryInstanceAttributes=function(e){return this._primitive.getGeometryInstanceAttributes(e)};Q0.isSupported=function(e){return e.frameState.context.depthTexture};Q0.prototype.isDestroyed=function(){return!1};Q0.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),this._sp=this._sp&&this._sp.destroy(),this._sp2D=void 0,this._spMorph=void 0,fe(this)};var Fh=Q0;var t8e=new z(1,1),n8e=!1,i8e=V.WHITE;function jE(e){e=e??G.EMPTY_OBJECT,this._definitionChanged=new ye,this._image=void 0,this._imageSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._transparent=void 0,this._transparentSubscription=void 0,this.image=e.image,this.repeat=e.repeat,this.color=e.color,this.transparent=e.transparent}Object.defineProperties(jE.prototype,{isConstant:{get:function(){return X.isConstant(this._image)&&X.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},image:pe("image"),repeat:pe("repeat"),color:pe("color"),transparent:pe("transparent")});jE.prototype.getType=function(e){return"Image"};var o8e=new Q;jE.prototype.getValue=function(e,t){return l(e)||(e=Q.now(o8e)),l(t)||(t={}),t.image=X.getValueOrUndefined(this._image,e),t.repeat=X.getValueOrClonedDefault(this._repeat,e,t8e,t.repeat),t.color=X.getValueOrClonedDefault(this._color,e,i8e,t.color),X.getValueOrDefault(this._transparent,e,n8e)&&(t.color.alpha=Math.min(.99,t.color.alpha)),t};jE.prototype.equals=function(e){return this===e||e instanceof jE&&X.equals(this._image,e._image)&&X.equals(this._repeat,e._repeat)&&X.equals(this._color,e._color)&&X.equals(this._transparent,e._transparent)};var dA=jE;function r8e(e){if(e instanceof V)return new Wt(e);if(typeof e=="string"||e instanceof De||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement){let t=new dA;return t.image=e,t}}function a8e(e,t){return pe(e,t,r8e)}var $o=a8e;function TO(e){this._definitionChanged=new ye,this._show=void 0,this._showSubscription=void 0,this._dimensions=void 0,this._dimensionsSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(e??G.EMPTY_OBJECT)}Object.defineProperties(TO.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:pe("show"),dimensions:pe("dimensions"),heightReference:pe("heightReference"),fill:pe("fill"),material:$o("material"),outline:pe("outline"),outlineColor:pe("outlineColor"),outlineWidth:pe("outlineWidth"),shadows:pe("shadows"),distanceDisplayCondition:pe("distanceDisplayCondition")});TO.prototype.clone=function(e){return l(e)?(e.show=this.show,e.dimensions=this.dimensions,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new TO(this)};TO.prototype.merge=function(e){this.show=this.show??e.show,this.dimensions=this.dimensions??e.dimensions,this.heightReference=this.heightReference??e.heightReference,this.fill=this.fill??e.fill,this.material=this.material??e.material,this.outline=this.outline??e.outline,this.outlineColor=this.outlineColor??e.outlineColor,this.outlineWidth=this.outlineWidth??e.outlineWidth,this.shadows=this.shadows??e.shadows,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition};var Gx=TO;var ofe={FIXED:0,INERTIAL:1};Object.freeze(ofe);var Bi=ofe;function GE(){_e.throwInstantiationError()}Object.defineProperties(GE.prototype,{isConstant:{get:_e.throwInstantiationError},definitionChanged:{get:_e.throwInstantiationError},referenceFrame:{get:_e.throwInstantiationError}});GE.prototype.getValue=_e.throwInstantiationError;GE.prototype.getValueInReferenceFrame=_e.throwInstantiationError;GE.prototype.equals=_e.throwInstantiationError;var rfe=new $;GE.convertToReferenceFrame=function(e,t,n,i,o){if(!l(t))return t;if(l(o)||(o=new h),n===i)return h.clone(t,o);let r=pt.computeIcrfToCentralBodyFixedMatrix(e,rfe);if(n===Bi.INERTIAL)return $.multiplyByVector(r,t,o);if(n===Bi.FIXED)return $.multiplyByVector($.transpose(r,rfe),t,o)};var kh=GE;function Hx(e,t){this._definitionChanged=new ye,this._value=h.clone(e),this._referenceFrame=t??Bi.FIXED}Object.defineProperties(Hx.prototype,{isConstant:{get:function(){return!l(this._value)||this._referenceFrame===Bi.FIXED}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}}});var s8e=new Q;Hx.prototype.getValue=function(e,t){return l(e)||(e=Q.now(s8e)),this.getValueInReferenceFrame(e,Bi.FIXED,t)};Hx.prototype.setValue=function(e,t){let n=!1;h.equals(this._value,e)||(n=!0,this._value=h.clone(e)),l(t)&&this._referenceFrame!==t&&(n=!0,this._referenceFrame=t),n&&this._definitionChanged.raiseEvent(this)};Hx.prototype.getValueInReferenceFrame=function(e,t,n){return kh.convertToReferenceFrame(e,this._value,this._referenceFrame,t,n)};Hx.prototype.equals=function(e){return this===e||e instanceof Hx&&h.equals(this._value,e._value)&&this._referenceFrame===e._referenceFrame};var zl=Hx;function EO(e){this._definitionChanged=new ye,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._cornerType=void 0,this._cornerTypeSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(e??G.EMPTY_OBJECT)}Object.defineProperties(EO.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:pe("show"),positions:pe("positions"),width:pe("width"),height:pe("height"),heightReference:pe("heightReference"),extrudedHeight:pe("extrudedHeight"),extrudedHeightReference:pe("extrudedHeightReference"),cornerType:pe("cornerType"),granularity:pe("granularity"),fill:pe("fill"),material:$o("material"),outline:pe("outline"),outlineColor:pe("outlineColor"),outlineWidth:pe("outlineWidth"),shadows:pe("shadows"),distanceDisplayCondition:pe("distanceDisplayCondition"),classificationType:pe("classificationType"),zIndex:pe("zIndex")});EO.prototype.clone=function(e){return l(e)?(e.show=this.show,e.positions=this.positions,e.width=this.width,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.cornerType=this.cornerType,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new EO(this)};EO.prototype.merge=function(e){this.show=this.show??e.show,this.positions=this.positions??e.positions,this.width=this.width??e.width,this.height=this.height??e.height,this.heightReference=this.heightReference??e.heightReference,this.extrudedHeight=this.extrudedHeight??e.extrudedHeight,this.extrudedHeightReference=this.extrudedHeightReference??e.extrudedHeightReference,this.cornerType=this.cornerType??e.cornerType,this.granularity=this.granularity??e.granularity,this.fill=this.fill??e.fill,this.material=this.material??e.material,this.outline=this.outline??e.outline,this.outlineColor=this.outlineColor??e.outlineColor,this.outlineWidth=this.outlineWidth??e.outlineWidth,this.shadows=this.shadows??e.shadows,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition,this.classificationType=this.classificationType??e.classificationType,this.zIndex=this.zIndex??e.zIndex};var Wx=EO;function c8e(e){return e}function l8e(e,t){return pe(e,t,c8e)}var Ul=l8e;function vO(e){this._definitionChanged=new ye,this._show=void 0,this._showSubscription=void 0,this._length=void 0,this._lengthSubscription=void 0,this._topRadius=void 0,this._topRadiusSubscription=void 0,this._bottomRadius=void 0,this._bottomRadiusSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._numberOfVerticalLines=void 0,this._numberOfVerticalLinesSubscription=void 0,this._slices=void 0,this._slicesSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(e??G.EMPTY_OBJECT)}Object.defineProperties(vO.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:pe("show"),length:pe("length"),topRadius:pe("topRadius"),bottomRadius:pe("bottomRadius"),heightReference:pe("heightReference"),fill:pe("fill"),material:$o("material"),outline:pe("outline"),outlineColor:pe("outlineColor"),outlineWidth:pe("outlineWidth"),numberOfVerticalLines:pe("numberOfVerticalLines"),slices:pe("slices"),shadows:pe("shadows"),distanceDisplayCondition:pe("distanceDisplayCondition")});vO.prototype.clone=function(e){return l(e)?(e.show=this.show,e.length=this.length,e.topRadius=this.topRadius,e.bottomRadius=this.bottomRadius,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.numberOfVerticalLines=this.numberOfVerticalLines,e.slices=this.slices,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new vO(this)};vO.prototype.merge=function(e){this.show=this.show??e.show,this.length=this.length??e.length,this.topRadius=this.topRadius??e.topRadius,this.bottomRadius=this.bottomRadius??e.bottomRadius,this.heightReference=this.heightReference??e.heightReference,this.fill=this.fill??e.fill,this.material=this.material??e.material,this.outline=this.outline??e.outline,this.outlineColor=this.outlineColor??e.outlineColor,this.outlineWidth=this.outlineWidth??e.outlineWidth,this.numberOfVerticalLines=this.numberOfVerticalLines??e.numberOfVerticalLines,this.slices=this.slices??e.slices,this.shadows=this.shadows??e.shadows,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition};var qx=vO;function SO(e){this._definitionChanged=new ye,this._show=void 0,this._showSubscription=void 0,this._semiMajorAxis=void 0,this._semiMajorAxisSubscription=void 0,this._semiMinorAxis=void 0,this._semiMinorAxisSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._stRotation=void 0,this._stRotationSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._numberOfVerticalLines=void 0,this._numberOfVerticalLinesSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(e??G.EMPTY_OBJECT)}Object.defineProperties(SO.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:pe("show"),semiMajorAxis:pe("semiMajorAxis"),semiMinorAxis:pe("semiMinorAxis"),height:pe("height"),heightReference:pe("heightReference"),extrudedHeight:pe("extrudedHeight"),extrudedHeightReference:pe("extrudedHeightReference"),rotation:pe("rotation"),stRotation:pe("stRotation"),granularity:pe("granularity"),fill:pe("fill"),material:$o("material"),outline:pe("outline"),outlineColor:pe("outlineColor"),outlineWidth:pe("outlineWidth"),numberOfVerticalLines:pe("numberOfVerticalLines"),shadows:pe("shadows"),distanceDisplayCondition:pe("distanceDisplayCondition"),classificationType:pe("classificationType"),zIndex:pe("zIndex")});SO.prototype.clone=function(e){return l(e)?(e.show=this.show,e.semiMajorAxis=this.semiMajorAxis,e.semiMinorAxis=this.semiMinorAxis,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.rotation=this.rotation,e.stRotation=this.stRotation,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.numberOfVerticalLines=this.numberOfVerticalLines,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new SO(this)};SO.prototype.merge=function(e){this.show=this.show??e.show,this.semiMajorAxis=this.semiMajorAxis??e.semiMajorAxis,this.semiMinorAxis=this.semiMinorAxis??e.semiMinorAxis,this.height=this.height??e.height,this.heightReference=this.heightReference??e.heightReference,this.extrudedHeight=this.extrudedHeight??e.extrudedHeight,this.extrudedHeightReference=this.extrudedHeightReference??e.extrudedHeightReference,this.rotation=this.rotation??e.rotation,this.stRotation=this.stRotation??e.stRotation,this.granularity=this.granularity??e.granularity,this.fill=this.fill??e.fill,this.material=this.material??e.material,this.outline=this.outline??e.outline,this.outlineColor=this.outlineColor??e.outlineColor,this.outlineWidth=this.outlineWidth??e.outlineWidth,this.numberOfVerticalLines=this.numberOfVerticalLines??e.numberOfVerticalLines,this.shadows=this.shadows??e.shadows,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition,this.classificationType=this.classificationType??e.classificationType,this.zIndex=this.zIndex??e.zIndex};var Yx=SO;function wO(e){this._definitionChanged=new ye,this._show=void 0,this._showSubscription=void 0,this._radii=void 0,this._radiiSubscription=void 0,this._innerRadii=void 0,this._innerRadiiSubscription=void 0,this._minimumClock=void 0,this._minimumClockSubscription=void 0,this._maximumClock=void 0,this._maximumClockSubscription=void 0,this._minimumCone=void 0,this._minimumConeSubscription=void 0,this._maximumCone=void 0,this._maximumConeSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._stackPartitions=void 0,this._stackPartitionsSubscription=void 0,this._slicePartitions=void 0,this._slicePartitionsSubscription=void 0,this._subdivisions=void 0,this._subdivisionsSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(e??G.EMPTY_OBJECT)}Object.defineProperties(wO.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:pe("show"),radii:pe("radii"),innerRadii:pe("innerRadii"),minimumClock:pe("minimumClock"),maximumClock:pe("maximumClock"),minimumCone:pe("minimumCone"),maximumCone:pe("maximumCone"),heightReference:pe("heightReference"),fill:pe("fill"),material:$o("material"),outline:pe("outline"),outlineColor:pe("outlineColor"),outlineWidth:pe("outlineWidth"),stackPartitions:pe("stackPartitions"),slicePartitions:pe("slicePartitions"),subdivisions:pe("subdivisions"),shadows:pe("shadows"),distanceDisplayCondition:pe("distanceDisplayCondition")});wO.prototype.clone=function(e){return l(e)?(e.show=this.show,e.radii=this.radii,e.innerRadii=this.innerRadii,e.minimumClock=this.minimumClock,e.maximumClock=this.maximumClock,e.minimumCone=this.minimumCone,e.maximumCone=this.maximumCone,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.stackPartitions=this.stackPartitions,e.slicePartitions=this.slicePartitions,e.subdivisions=this.subdivisions,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new wO(this)};wO.prototype.merge=function(e){this.show=this.show??e.show,this.radii=this.radii??e.radii,this.innerRadii=this.innerRadii??e.innerRadii,this.minimumClock=this.minimumClock??e.minimumClock,this.maximumClock=this.maximumClock??e.maximumClock,this.minimumCone=this.minimumCone??e.minimumCone,this.maximumCone=this.maximumCone??e.maximumCone,this.heightReference=this.heightReference??e.heightReference,this.fill=this.fill??e.fill,this.material=this.material??e.material,this.outline=this.outline??e.outline,this.outlineColor=this.outlineColor??e.outlineColor,this.outlineWidth=this.outlineWidth??e.outlineWidth,this.stackPartitions=this.stackPartitions??e.stackPartitions,this.slicePartitions=this.slicePartitions??e.slicePartitions,this.subdivisions=this.subdivisions??e.subdivisions,this.shadows=this.shadows??e.shadows,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition};var Xx=wO;function IO(e){this._definitionChanged=new ye,this._show=void 0,this._showSubscription=void 0,this._text=void 0,this._textSubscription=void 0,this._font=void 0,this._fontSubscription=void 0,this._style=void 0,this._styleSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this._showBackground=void 0,this._showBackgroundSubscription=void 0,this._backgroundColor=void 0,this._backgroundColorSubscription=void 0,this._backgroundPadding=void 0,this._backgroundPaddingSubscription=void 0,this._pixelOffset=void 0,this._pixelOffsetSubscription=void 0,this._eyeOffset=void 0,this._eyeOffsetSubscription=void 0,this._horizontalOrigin=void 0,this._horizontalOriginSubscription=void 0,this._verticalOrigin=void 0,this._verticalOriginSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fillColor=void 0,this._fillColorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._pixelOffsetScaleByDistance=void 0,this._pixelOffsetScaleByDistanceSubscription=void 0,this._scaleByDistance=void 0,this._scaleByDistanceSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._disableDepthTestDistance=void 0,this._disableDepthTestDistanceSubscription=void 0,this.merge(e??G.EMPTY_OBJECT)}Object.defineProperties(IO.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:pe("show"),text:pe("text"),font:pe("font"),style:pe("style"),scale:pe("scale"),showBackground:pe("showBackground"),backgroundColor:pe("backgroundColor"),backgroundPadding:pe("backgroundPadding"),pixelOffset:pe("pixelOffset"),eyeOffset:pe("eyeOffset"),horizontalOrigin:pe("horizontalOrigin"),verticalOrigin:pe("verticalOrigin"),heightReference:pe("heightReference"),fillColor:pe("fillColor"),outlineColor:pe("outlineColor"),outlineWidth:pe("outlineWidth"),translucencyByDistance:pe("translucencyByDistance"),pixelOffsetScaleByDistance:pe("pixelOffsetScaleByDistance"),scaleByDistance:pe("scaleByDistance"),distanceDisplayCondition:pe("distanceDisplayCondition"),disableDepthTestDistance:pe("disableDepthTestDistance")});IO.prototype.clone=function(e){return l(e)?(e.show=this.show,e.text=this.text,e.font=this.font,e.style=this.style,e.scale=this.scale,e.showBackground=this.showBackground,e.backgroundColor=this.backgroundColor,e.backgroundPadding=this.backgroundPadding,e.pixelOffset=this.pixelOffset,e.eyeOffset=this.eyeOffset,e.horizontalOrigin=this.horizontalOrigin,e.verticalOrigin=this.verticalOrigin,e.heightReference=this.heightReference,e.fillColor=this.fillColor,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.translucencyByDistance=this.translucencyByDistance,e.pixelOffsetScaleByDistance=this.pixelOffsetScaleByDistance,e.scaleByDistance=this.scaleByDistance,e.distanceDisplayCondition=this.distanceDisplayCondition,e.disableDepthTestDistance=this.disableDepthTestDistance,e):new IO(this)};IO.prototype.merge=function(e){this.show=this.show??e.show,this.text=this.text??e.text,this.font=this.font??e.font,this.style=this.style??e.style,this.scale=this.scale??e.scale,this.showBackground=this.showBackground??e.showBackground,this.backgroundColor=this.backgroundColor??e.backgroundColor,this.backgroundPadding=this.backgroundPadding??e.backgroundPadding,this.pixelOffset=this.pixelOffset??e.pixelOffset,this.eyeOffset=this.eyeOffset??e.eyeOffset,this.horizontalOrigin=this.horizontalOrigin??e.horizontalOrigin,this.verticalOrigin=this.verticalOrigin??e.verticalOrigin,this.heightReference=this.heightReference??e.heightReference,this.fillColor=this.fillColor??e.fillColor,this.outlineColor=this.outlineColor??e.outlineColor,this.outlineWidth=this.outlineWidth??e.outlineWidth,this.translucencyByDistance=this.translucencyByDistance??e.translucencyByDistance,this.pixelOffsetScaleByDistance=this.pixelOffsetScaleByDistance??e.pixelOffsetScaleByDistance,this.scaleByDistance=this.scaleByDistance??e.scaleByDistance,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition,this.disableDepthTestDistance=this.disableDepthTestDistance??e.disableDepthTestDistance};var zh=IO;var u8e=new h(1,1,1),f8e=h.ZERO,d8e=Le.IDENTITY;function afe(e,t,n){this.translation=h.clone(e??f8e),this.rotation=Le.clone(t??d8e),this.scale=h.clone(n??u8e)}afe.prototype.equals=function(e){return this===e||l(e)&&h.equals(this.translation,e.translation)&&Le.equals(this.rotation,e.rotation)&&h.equals(this.scale,e.scale)};var hA=afe;var Uq=new hA;function DO(e){e=e??G.EMPTY_OBJECT,this._definitionChanged=new ye,this._translation=void 0,this._translationSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this.translation=e.translation,this.rotation=e.rotation,this.scale=e.scale}Object.defineProperties(DO.prototype,{isConstant:{get:function(){return X.isConstant(this._translation)&&X.isConstant(this._rotation)&&X.isConstant(this._scale)}},definitionChanged:{get:function(){return this._definitionChanged}},translation:pe("translation"),rotation:pe("rotation"),scale:pe("scale")});var h8e=new Q;DO.prototype.getValue=function(e,t){return l(e)||(e=Q.now(h8e)),l(t)||(t=new hA),t.translation=X.getValueOrClonedDefault(this._translation,e,Uq.translation,t.translation),t.rotation=X.getValueOrClonedDefault(this._rotation,e,Uq.rotation,t.rotation),t.scale=X.getValueOrClonedDefault(this._scale,e,Uq.scale,t.scale),t};DO.prototype.equals=function(e){return this===e||e instanceof DO&&X.equals(this._translation,e._translation)&&X.equals(this._rotation,e._rotation)&&X.equals(this._scale,e._scale)};var Kx=DO;function $0(e,t){this._propertyNames=[],this._definitionChanged=new ye,l(e)&&this.merge(e,t)}Object.defineProperties($0.prototype,{propertyNames:{get:function(){return this._propertyNames}},isConstant:{get:function(){let e=this._propertyNames;for(let t=0,n=e.length;t<n;t++)if(!X.isConstant(this[e[t]]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}}});$0.prototype.hasProperty=function(e){return this._propertyNames.indexOf(e)!==-1};function m8e(e){return new ci(e)}$0.prototype.addProperty=function(e,t,n){this._propertyNames.push(e),Object.defineProperty(this,e,pe(e,!0,n??m8e)),l(t)&&(this[e]=t),this._definitionChanged.raiseEvent(this)};$0.prototype.removeProperty=function(e){let n=this._propertyNames.indexOf(e);this._propertyNames.splice(n,1),delete this[e],this._definitionChanged.raiseEvent(this)};var p8e=new Q;$0.prototype.getValue=function(e,t){l(e)||(e=Q.now(p8e)),l(t)||(t={});let n=this._propertyNames;for(let i=0,o=n.length;i<o;i++){let r=n[i];t[r]=X.getValueOrUndefined(this[r],e,t[r])}return t};$0.prototype.merge=function(e,t){let n=this._propertyNames,i=l(e._propertyNames)?e._propertyNames:Object.keys(e);for(let o=0,r=i.length;o<r;o++){let a=i[o],s=this[a],c=e[a];s===void 0&&n.indexOf(a)===-1&&this.addProperty(a,void 0,t),c!==void 0&&(s!==void 0?l(s)&&l(s.merge)&&s.merge(c):l(c)&&l(c.merge)&&l(c.clone)?this[a]=c.clone():this[a]=c)}};function g8e(e,t){let n=e._propertyNames,i=t._propertyNames,o=n.length;if(o!==i.length)return!1;for(let r=0;r<o;++r){let a=n[r];if(i.indexOf(a)===-1||!X.equals(e[a],t[a]))return!1}return!0}$0.prototype.equals=function(e){return this===e||e instanceof $0&&g8e(this,e)};var Vl=$0;function sfe(e){return new Kx(e)}function _8e(e){return new Vl(e,sfe)}function A8e(e){return new Vl(e)}function y8e(e){return new Vl(e)}function PO(e){this._definitionChanged=new ye,this._show=void 0,this._showSubscription=void 0,this._uri=void 0,this._uriSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this._hasVerticalExaggeration=void 0,this._hasVerticalExaggerationSubscription=void 0,this._enableVerticalExaggeration=void 0,this._enableVerticalExaggerationSubscription=void 0,this._minimumPixelSize=void 0,this._minimumPixelSizeSubscription=void 0,this._maximumScale=void 0,this._maximumScaleSubscription=void 0,this._incrementallyLoadTextures=void 0,this._incrementallyLoadTexturesSubscription=void 0,this._runAnimations=void 0,this._runAnimationsSubscription=void 0,this._clampAnimations=void 0,this._clampAnimationsSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._silhouetteColor=void 0,this._silhouetteColorSubscription=void 0,this._silhouetteSize=void 0,this._silhouetteSizeSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._colorBlendMode=void 0,this._colorBlendModeSubscription=void 0,this._colorBlendAmount=void 0,this._colorBlendAmountSubscription=void 0,this._imageBasedLightingFactor=void 0,this._imageBasedLightingFactorSubscription=void 0,this._environmentMapOptions=void 0,this._environmentMapOptionsSubscription=void 0,this._lightColor=void 0,this._lightColorSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._nodeTransformations=void 0,this._nodeTransformationsSubscription=void 0,this._articulations=void 0,this._articulationsSubscription=void 0,this._clippingPlanes=void 0,this._clippingPlanesSubscription=void 0,this._customShader=void 0,this._customShaderSubscription=void 0,this.merge(e??G.EMPTY_OBJECT)}Object.defineProperties(PO.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:pe("show"),uri:pe("uri"),scale:pe("scale"),enableVerticalExaggeration:pe("enableVerticalExaggeration"),minimumPixelSize:pe("minimumPixelSize"),maximumScale:pe("maximumScale"),incrementallyLoadTextures:pe("incrementallyLoadTextures"),runAnimations:pe("runAnimations"),clampAnimations:pe("clampAnimations"),shadows:pe("shadows"),heightReference:pe("heightReference"),silhouetteColor:pe("silhouetteColor"),silhouetteSize:pe("silhouetteSize"),color:pe("color"),colorBlendMode:pe("colorBlendMode"),colorBlendAmount:pe("colorBlendAmount"),imageBasedLightingFactor:pe("imageBasedLightingFactor"),environmentMapOptions:pe("environmentMapOptions",void 0,y8e),lightColor:pe("lightColor"),distanceDisplayCondition:pe("distanceDisplayCondition"),nodeTransformations:pe("nodeTransformations",void 0,_8e),articulations:pe("articulations",void 0,A8e),clippingPlanes:pe("clippingPlanes"),customShader:pe("customShader")});PO.prototype.clone=function(e){return l(e)?(e.show=this.show,e.uri=this.uri,e.scale=this.scale,e.enableVerticalExaggeration=this.enableVerticalExaggeration,e.minimumPixelSize=this.minimumPixelSize,e.maximumScale=this.maximumScale,e.incrementallyLoadTextures=this.incrementallyLoadTextures,e.runAnimations=this.runAnimations,e.clampAnimations=this.clampAnimations,e.heightReference=this._heightReference,e.silhouetteColor=this.silhouetteColor,e.silhouetteSize=this.silhouetteSize,e.color=this.color,e.colorBlendMode=this.colorBlendMode,e.colorBlendAmount=this.colorBlendAmount,e.imageBasedLightingFactor=this.imageBasedLightingFactor,e.environmentMapOptions=this.environmentMapOptions,e.lightColor=this.lightColor,e.distanceDisplayCondition=this.distanceDisplayCondition,e.nodeTransformations=this.nodeTransformations,e.articulations=this.articulations,e.clippingPlanes=this.clippingPlanes,e.customShader=this.customShader,e):new PO(this)};PO.prototype.merge=function(e){this.show=this.show??e.show,this.uri=this.uri??e.uri,this.scale=this.scale??e.scale,this.enableVerticalExaggeration=this.enableVerticalExaggeration??e.enableVerticalExaggeration,this.minimumPixelSize=this.minimumPixelSize??e.minimumPixelSize,this.maximumScale=this.maximumScale??e.maximumScale,this.incrementallyLoadTextures=this.incrementallyLoadTextures??e.incrementallyLoadTextures,this.runAnimations=this.runAnimations??e.runAnimations,this.clampAnimations=this.clampAnimations??e.clampAnimations,this.shadows=this.shadows??e.shadows,this.heightReference=this.heightReference??e.heightReference,this.silhouetteColor=this.silhouetteColor??e.silhouetteColor,this.silhouetteSize=this.silhouetteSize??e.silhouetteSize,this.color=this.color??e.color,this.colorBlendMode=this.colorBlendMode??e.colorBlendMode,this.colorBlendAmount=this.colorBlendAmount??e.colorBlendAmount,this.imageBasedLightingFactor=this.imageBasedLightingFactor??e.imageBasedLightingFactor,this.environmentMapOptions=this.environmentMapOptions??e.environmentMapOptions,this.lightColor=this.lightColor??e.lightColor,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition,this.clippingPlanes=this.clippingPlanes??e.clippingPlanes,this.customShader=this.customShader??e.customShader;let t=e.nodeTransformations;if(l(t)){let i=this.nodeTransformations;l(i)?i.merge(t):this.nodeTransformations=new Vl(t,sfe)}let n=e.articulations;if(l(n)){let i=this.articulations;l(i)?i.merge(n):this.articulations=new Vl(n)}};var J0=PO;function RO(e){this._definitionChanged=new ye,this._show=void 0,this._showSubscription=void 0,this._uri=void 0,this._uriSubscription=void 0,this._maximumScreenSpaceError=void 0,this._maximumScreenSpaceErrorSubscription=void 0,this.merge(e??G.EMPTY_OBJECT)}Object.defineProperties(RO.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:pe("show"),uri:pe("uri"),maximumScreenSpaceError:pe("maximumScreenSpaceError")});RO.prototype.clone=function(e){return l(e)?(e.show=this.show,e.uri=this.uri,e.maximumScreenSpaceError=this.maximumScreenSpaceError,e):new RO(this)};RO.prototype.merge=function(e){this.show=this.show??e.show,this.uri=this.uri??e.uri,this.maximumScreenSpaceError=this.maximumScreenSpaceError??e.maximumScreenSpaceError};var Qx=RO;function OO(e){this._definitionChanged=new ye,this._show=void 0,this._showSubscription=void 0,this._leadTime=void 0,this._leadTimeSubscription=void 0,this._trailTime=void 0,this._trailTimeSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._resolution=void 0,this._resolutionSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._relativeTo=void 0,this._relativeToSubscription=void 0,this.merge(e??G.EMPTY_OBJECT)}Object.defineProperties(OO.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:pe("show"),leadTime:pe("leadTime"),trailTime:pe("trailTime"),width:pe("width"),resolution:pe("resolution"),material:$o("material"),distanceDisplayCondition:pe("distanceDisplayCondition"),relativeTo:pe("relativeTo")});OO.prototype.clone=function(e){return l(e)?(e.show=this.show,e.leadTime=this.leadTime,e.trailTime=this.trailTime,e.width=this.width,e.resolution=this.resolution,e.material=this.material,e.distanceDisplayCondition=this.distanceDisplayCondition,e.relativeTo=this.relativeTo,e):new OO(this)};OO.prototype.merge=function(e){this.show=this.show??e.show,this.leadTime=this.leadTime??e.leadTime,this.trailTime=this.trailTime??e.trailTime,this.width=this.width??e.width,this.resolution=this.resolution??e.resolution,this.material=this.material??e.material,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition,this.relativeTo=this.relativeTo??e.relativeTo};var Z0=OO;function MO(e){this._definitionChanged=new ye,this._show=void 0,this._showSubscription=void 0,this._plane=void 0,this._planeSubscription=void 0,this._dimensions=void 0,this._dimensionsSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(e??G.EMPTY_OBJECT)}Object.defineProperties(MO.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:pe("show"),plane:pe("plane"),dimensions:pe("dimensions"),fill:pe("fill"),material:$o("material"),outline:pe("outline"),outlineColor:pe("outlineColor"),outlineWidth:pe("outlineWidth"),shadows:pe("shadows"),distanceDisplayCondition:pe("distanceDisplayCondition")});MO.prototype.clone=function(e){return l(e)?(e.show=this.show,e.plane=this.plane,e.dimensions=this.dimensions,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new MO(this)};MO.prototype.merge=function(e){this.show=this.show??e.show,this.plane=this.plane??e.plane,this.dimensions=this.dimensions??e.dimensions,this.fill=this.fill??e.fill,this.material=this.material??e.material,this.outline=this.outline??e.outline,this.outlineColor=this.outlineColor??e.outlineColor,this.outlineWidth=this.outlineWidth??e.outlineWidth,this.shadows=this.shadows??e.shadows,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition};var BO=MO;function LO(e){this._definitionChanged=new ye,this._show=void 0,this._showSubscription=void 0,this._pixelSize=void 0,this._pixelSizeSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._scaleByDistance=void 0,this._scaleByDistanceSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._disableDepthTestDistance=void 0,this._disableDepthTestDistanceSubscription=void 0,this._splitDirection=void 0,this._splitDirectionSubscription=void 0,this.merge(e??G.EMPTY_OBJECT)}Object.defineProperties(LO.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:pe("show"),pixelSize:pe("pixelSize"),heightReference:pe("heightReference"),color:pe("color"),outlineColor:pe("outlineColor"),outlineWidth:pe("outlineWidth"),scaleByDistance:pe("scaleByDistance"),translucencyByDistance:pe("translucencyByDistance"),distanceDisplayCondition:pe("distanceDisplayCondition"),disableDepthTestDistance:pe("disableDepthTestDistance"),splitDirection:pe("splitDirection")});LO.prototype.clone=function(e){return l(e)?(e.show=this.show,e.pixelSize=this.pixelSize,e.heightReference=this.heightReference,e.color=this.color,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.scaleByDistance=this.scaleByDistance,e.translucencyByDistance=this._translucencyByDistance,e.distanceDisplayCondition=this.distanceDisplayCondition,e.disableDepthTestDistance=this.disableDepthTestDistance,e.splitDirection=this.splitDirection,e):new LO(this)};LO.prototype.merge=function(e){this.show=this.show??e.show,this.pixelSize=this.pixelSize??e.pixelSize,this.heightReference=this.heightReference??e.heightReference,this.color=this.color??e.color,this.outlineColor=this.outlineColor??e.outlineColor,this.outlineWidth=this.outlineWidth??e.outlineWidth,this.scaleByDistance=this.scaleByDistance??e.scaleByDistance,this.translucencyByDistance=this._translucencyByDistance??e.translucencyByDistance,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition,this.disableDepthTestDistance=this.disableDepthTestDistance??e.disableDepthTestDistance,this.splitDirection=this.splitDirection??e.splitDirection};var $x=LO;function x8e(e,t){this.positions=l(e)?e:[],this.holes=l(t)?t:[]}var Ic=x8e;function b8e(e){return Array.isArray(e)&&(e=new Ic(e)),new ci(e)}function NO(e){this._definitionChanged=new ye,this._show=void 0,this._showSubscription=void 0,this._hierarchy=void 0,this._hierarchySubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._stRotation=void 0,this._stRotationSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._perPositionHeight=void 0,this._perPositionHeightSubscription=void 0,this._closeTop=void 0,this._closeTopSubscription=void 0,this._closeBottom=void 0,this._closeBottomSubscription=void 0,this._arcType=void 0,this._arcTypeSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this._textureCoordinates=void 0,this._textureCoordinatesSubscription=void 0,this.merge(e??G.EMPTY_OBJECT)}Object.defineProperties(NO.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:pe("show"),hierarchy:pe("hierarchy",void 0,b8e),height:pe("height"),heightReference:pe("heightReference"),extrudedHeight:pe("extrudedHeight"),extrudedHeightReference:pe("extrudedHeightReference"),stRotation:pe("stRotation"),granularity:pe("granularity"),fill:pe("fill"),material:$o("material"),outline:pe("outline"),outlineColor:pe("outlineColor"),outlineWidth:pe("outlineWidth"),perPositionHeight:pe("perPositionHeight"),closeTop:pe("closeTop"),closeBottom:pe("closeBottom"),arcType:pe("arcType"),shadows:pe("shadows"),distanceDisplayCondition:pe("distanceDisplayCondition"),classificationType:pe("classificationType"),zIndex:pe("zIndex"),textureCoordinates:pe("textureCoordinates")});NO.prototype.clone=function(e){return l(e)?(e.show=this.show,e.hierarchy=this.hierarchy,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.stRotation=this.stRotation,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.perPositionHeight=this.perPositionHeight,e.closeTop=this.closeTop,e.closeBottom=this.closeBottom,e.arcType=this.arcType,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e.textureCoordinates=this.textureCoordinates,e):new NO(this)};NO.prototype.merge=function(e){this.show=this.show??e.show,this.hierarchy=this.hierarchy??e.hierarchy,this.height=this.height??e.height,this.heightReference=this.heightReference??e.heightReference,this.extrudedHeight=this.extrudedHeight??e.extrudedHeight,this.extrudedHeightReference=this.extrudedHeightReference??e.extrudedHeightReference,this.stRotation=this.stRotation??e.stRotation,this.granularity=this.granularity??e.granularity,this.fill=this.fill??e.fill,this.material=this.material??e.material,this.outline=this.outline??e.outline,this.outlineColor=this.outlineColor??e.outlineColor,this.outlineWidth=this.outlineWidth??e.outlineWidth,this.perPositionHeight=this.perPositionHeight??e.perPositionHeight,this.closeTop=this.closeTop??e.closeTop,this.closeBottom=this.closeBottom??e.closeBottom,this.arcType=this.arcType??e.arcType,this.shadows=this.shadows??e.shadows,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition,this.classificationType=this.classificationType??e.classificationType,this.zIndex=this.zIndex??e.zIndex,this.textureCoordinates=this.textureCoordinates??e.textureCoordinates};var Uh=NO;function FO(e){this._definitionChanged=new ye,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._depthFailMaterial=void 0,this._depthFailMaterialSubscription=void 0,this._arcType=void 0,this._arcTypeSubscription=void 0,this._clampToGround=void 0,this._clampToGroundSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(e??G.EMPTY_OBJECT)}Object.defineProperties(FO.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:pe("show"),positions:pe("positions"),width:pe("width"),granularity:pe("granularity"),material:$o("material"),depthFailMaterial:$o("depthFailMaterial"),arcType:pe("arcType"),clampToGround:pe("clampToGround"),shadows:pe("shadows"),distanceDisplayCondition:pe("distanceDisplayCondition"),classificationType:pe("classificationType"),zIndex:pe("zIndex")});FO.prototype.clone=function(e){return l(e)?(e.show=this.show,e.positions=this.positions,e.width=this.width,e.granularity=this.granularity,e.material=this.material,e.depthFailMaterial=this.depthFailMaterial,e.arcType=this.arcType,e.clampToGround=this.clampToGround,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new FO(this)};FO.prototype.merge=function(e){this.show=this.show??e.show,this.positions=this.positions??e.positions,this.width=this.width??e.width,this.granularity=this.granularity??e.granularity,this.material=this.material??e.material,this.depthFailMaterial=this.depthFailMaterial??e.depthFailMaterial,this.arcType=this.arcType??e.arcType,this.clampToGround=this.clampToGround??e.clampToGround,this.shadows=this.shadows??e.shadows,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition,this.classificationType=this.classificationType??e.classificationType,this.zIndex=this.zIndex??e.zIndex};var el=FO;function kO(e){this._definitionChanged=new ye,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._shape=void 0,this._shapeSubscription=void 0,this._cornerType=void 0,this._cornerTypeSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubsription=void 0,this.merge(e??G.EMPTY_OBJECT)}Object.defineProperties(kO.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:pe("show"),positions:pe("positions"),shape:pe("shape"),cornerType:pe("cornerType"),granularity:pe("granularity"),fill:pe("fill"),material:$o("material"),outline:pe("outline"),outlineColor:pe("outlineColor"),outlineWidth:pe("outlineWidth"),shadows:pe("shadows"),distanceDisplayCondition:pe("distanceDisplayCondition")});kO.prototype.clone=function(e){return l(e)?(e.show=this.show,e.positions=this.positions,e.shape=this.shape,e.cornerType=this.cornerType,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new kO(this)};kO.prototype.merge=function(e){this.show=this.show??e.show,this.positions=this.positions??e.positions,this.shape=this.shape??e.shape,this.cornerType=this.cornerType??e.cornerType,this.granularity=this.granularity??e.granularity,this.fill=this.fill??e.fill,this.material=this.material??e.material,this.outline=this.outline??e.outline,this.outlineColor=this.outlineColor??e.outlineColor,this.outlineWidth=this.outlineWidth??e.outlineWidth,this.shadows=this.shadows??e.shadows,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition};var Jx=kO;function zO(e){this._definitionChanged=new ye,this._show=void 0,this._showSubscription=void 0,this._coordinates=void 0,this._coordinatesSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._stRotation=void 0,this._stRotationSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distancedisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(e??G.EMPTY_OBJECT)}Object.defineProperties(zO.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:pe("show"),coordinates:pe("coordinates"),height:pe("height"),heightReference:pe("heightReference"),extrudedHeight:pe("extrudedHeight"),extrudedHeightReference:pe("extrudedHeightReference"),rotation:pe("rotation"),stRotation:pe("stRotation"),granularity:pe("granularity"),fill:pe("fill"),material:$o("material"),outline:pe("outline"),outlineColor:pe("outlineColor"),outlineWidth:pe("outlineWidth"),shadows:pe("shadows"),distanceDisplayCondition:pe("distanceDisplayCondition"),classificationType:pe("classificationType"),zIndex:pe("zIndex")});zO.prototype.clone=function(e){return l(e)?(e.show=this.show,e.coordinates=this.coordinates,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.rotation=this.rotation,e.stRotation=this.stRotation,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new zO(this)};zO.prototype.merge=function(e){this.show=this.show??e.show,this.coordinates=this.coordinates??e.coordinates,this.height=this.height??e.height,this.heightReference=this.heightReference??e.heightReference,this.extrudedHeight=this.extrudedHeight??e.extrudedHeight,this.extrudedHeightReference=this.extrudedHeightReference??e.extrudedHeightReference,this.rotation=this.rotation??e.rotation,this.stRotation=this.stRotation??e.stRotation,this.granularity=this.granularity??e.granularity,this.fill=this.fill??e.fill,this.material=this.material??e.material,this.outline=this.outline??e.outline,this.outlineColor=this.outlineColor??e.outlineColor,this.outlineWidth=this.outlineWidth??e.outlineWidth,this.shadows=this.shadows??e.shadows,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition,this.classificationType=this.classificationType??e.classificationType,this.zIndex=this.zIndex??e.zIndex};var Vh=zO;function UO(e){this._definitionChanged=new ye,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._minimumHeights=void 0,this._minimumHeightsSubscription=void 0,this._maximumHeights=void 0,this._maximumHeightsSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(e??G.EMPTY_OBJECT)}Object.defineProperties(UO.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:pe("show"),positions:pe("positions"),minimumHeights:pe("minimumHeights"),maximumHeights:pe("maximumHeights"),granularity:pe("granularity"),fill:pe("fill"),material:$o("material"),outline:pe("outline"),outlineColor:pe("outlineColor"),outlineWidth:pe("outlineWidth"),shadows:pe("shadows"),distanceDisplayCondition:pe("distanceDisplayCondition")});UO.prototype.clone=function(e){return l(e)?(e.show=this.show,e.positions=this.positions,e.minimumHeights=this.minimumHeights,e.maximumHeights=this.maximumHeights,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new UO(this)};UO.prototype.merge=function(e){this.show=this.show??e.show,this.positions=this.positions??e.positions,this.minimumHeights=this.minimumHeights??e.minimumHeights,this.maximumHeights=this.maximumHeights??e.maximumHeights,this.granularity=this.granularity??e.granularity,this.fill=this.fill??e.fill,this.material=this.material??e.material,this.outline=this.outline??e.outline,this.outlineColor=this.outlineColor??e.outlineColor,this.outlineWidth=this.outlineWidth??e.outlineWidth,this.shadows=this.shadows??e.shadows,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition};var eg=UO;var C8e=new de,Vq=[];function T8e(e){return new zl(e)}function E8e(e){return pe(e,void 0,T8e)}function Os(e,t){return pe(e,void 0,function(n){return n instanceof t?n:new t(n)})}function Td(e){e=e??G.EMPTY_OBJECT;let t=e.id;l(t)||(t=jn()),this._availability=void 0,this._id=t,this._definitionChanged=new ye,this._name=e.name,this._show=e.show??!0,this._trackingReferenceFrame=e.trackingReferenceFrame??q0.AUTODETECT,this._parent=void 0,this._propertyNames=["billboard","box","corridor","cylinder","description","ellipse","ellipsoid","label","model","tileset","orientation","path","plane","point","polygon","polyline","polylineVolume","position","properties","rectangle","viewFrom","wall",...Vq],this._billboard=void 0,this._billboardSubscription=void 0,this._box=void 0,this._boxSubscription=void 0,this._corridor=void 0,this._corridorSubscription=void 0,this._cylinder=void 0,this._cylinderSubscription=void 0,this._description=void 0,this._descriptionSubscription=void 0,this._ellipse=void 0,this._ellipseSubscription=void 0,this._ellipsoid=void 0,this._ellipsoidSubscription=void 0,this._label=void 0,this._labelSubscription=void 0,this._model=void 0,this._modelSubscription=void 0,this._tileset=void 0,this._tilesetSubscription=void 0,this._orientation=void 0,this._orientationSubscription=void 0,this._path=void 0,this._pathSubscription=void 0,this._plane=void 0,this._planeSubscription=void 0,this._point=void 0,this._pointSubscription=void 0,this._polygon=void 0,this._polygonSubscription=void 0,this._polyline=void 0,this._polylineSubscription=void 0,this._polylineVolume=void 0,this._polylineVolumeSubscription=void 0,this._position=void 0,this._positionSubscription=void 0,this._properties=void 0,this._propertiesSubscription=void 0,this._rectangle=void 0,this._rectangleSubscription=void 0,this._viewFrom=void 0,this._viewFromSubscription=void 0,this._wall=void 0,this._wallSubscription=void 0,this._children=[],this.entityCollection=void 0,this.parent=e.parent,this.merge(e)}function jq(e,t,n){let i=t.length;for(let o=0;o<i;o++){let r=t[o],a=r._show;(!n&&a)!==(n&&a)&&jq(r,r._children,n)}e._definitionChanged.raiseEvent(e,"isShowing",n,!n)}Object.defineProperties(Td.prototype,{availability:Ul("availability"),id:{get:function(){return this._id}},definitionChanged:{get:function(){return this._definitionChanged}},name:Ul("name"),show:{get:function(){return this._show},set:function(e){if(e===this._show)return;let t=this.isShowing;this._show=e;let n=this.isShowing;t!==n&&jq(this,this._children,n),this._definitionChanged.raiseEvent(this,"show",e,!e)}},trackingReferenceFrame:Ul("trackingReferenceFrame"),isShowing:{get:function(){return this._show&&(!l(this.entityCollection)||this.entityCollection.show)&&(!l(this._parent)||this._parent.isShowing)}},parent:{get:function(){return this._parent},set:function(e){let t=this._parent;if(t===e)return;let n=this.isShowing;if(l(t)){let o=t._children.indexOf(this);t._children.splice(o,1)}this._parent=e,l(e)&&e._children.push(this);let i=this.isShowing;n!==i&&jq(this,this._children,i),this._definitionChanged.raiseEvent(this,"parent",e,t)}},propertyNames:{get:function(){return this._propertyNames}},billboard:Os("billboard",Jc),box:Os("box",Gx),corridor:Os("corridor",Wx),cylinder:Os("cylinder",qx),description:pe("description"),ellipse:Os("ellipse",Yx),ellipsoid:Os("ellipsoid",Xx),label:Os("label",zh),model:Os("model",J0),tileset:Os("tileset",Qx),orientation:pe("orientation"),path:Os("path",Z0),plane:Os("plane",BO),point:Os("point",$x),polygon:Os("polygon",Uh),polyline:Os("polyline",el),polylineVolume:Os("polylineVolume",Jx),properties:Os("properties",Vl),position:E8e("position"),rectangle:Os("rectangle",Vh),viewFrom:pe("viewFrom"),wall:Os("wall",eg)});Td.registerEntityType=function(e,t){Object.defineProperties(Td.prototype,{[e]:Os(e,t)}),Vq.includes(e)||Vq.push(e)};Td.prototype.isAvailable=function(e){let t=this._availability;return!l(t)||t.contains(e)};Td.prototype.addProperty=function(e){this._propertyNames.push(e),Object.defineProperty(this,e,Ul(e,!0))};Td.prototype.removeProperty=function(e){let n=this._propertyNames.indexOf(e);this._propertyNames.splice(n,1),delete this[e]};Td.prototype.merge=function(e){this.name=this.name??e.name,this.availability=this.availability??e.availability;let t=this._propertyNames,n=l(e._propertyNames)?e._propertyNames:Object.keys(e),i=n.length;for(let o=0;o<i;o++){let r=n[o];if(r==="parent"||r==="name"||r==="availability"||r==="children")continue;let a=this[r],s=e[r];!l(a)&&t.indexOf(r)===-1&&this.addProperty(r),l(s)&&(l(a)?l(a.merge)&&a.merge(s):l(s.merge)&&l(s.clone)?this[r]=s.clone():this[r]=s)}};var cfe=new $,lfe=new h,ufe=new Le;Td.prototype.computeModelMatrix=function(e,t){let n=X.getValueOrUndefined(this._position,e,lfe);if(!l(n))return;let i=X.getValueOrUndefined(this._orientation,e,ufe);return l(i)?t=M.fromRotationTranslation($.fromQuaternion(i,cfe),n,t):t=pt.eastNorthUpToFixedFrame(n,void 0,t),t};Td.prototype.computeModelMatrixForHeightReference=function(e,t,n,i,o){let r=X.getValueOrDefault(t,e,nt.NONE),a=X.getValueOrUndefined(this._position,e,lfe);if(r===nt.NONE||!l(a)||h.equalsEpsilon(a,h.ZERO,D.EPSILON8))return this.computeModelMatrix(e,o);let s=i.cartesianToCartographic(a,C8e);bd(r)?s.height=n:s.height+=n,a=i.cartographicToCartesian(s,a);let c=X.getValueOrUndefined(this._orientation,e,ufe);return l(c)?o=M.fromRotationTranslation($.fromQuaternion(c,cfe),a,o):o=pt.eastNorthUpToFixedFrame(a,void 0,o),o};Td.supportsMaterialsforEntitiesOnTerrain=function(e){return Nl.supportsMaterials(e)};Td.supportsPolylinesOnTerrain=function(e){return Fh.isSupported(e)};var jo=Td;var v8e=new Wt(V.WHITE),S8e=new ci(!0),w8e=new ci(!0),I8e=new ci(!1),D8e=new ci(V.BLACK),P8e=new ci(vn.DISABLED),R8e=new ci(new kt),O8e=new ci(Wn.BOTH);function jl(e){let t=e.entity,n=e.geometryPropertyName;this._entity=t,this._scene=e.scene,this._fillEnabled=!1,this._isClosed=!1,this._onTerrain=!1,this._dynamic=!1,this._outlineEnabled=!1,this._geometryChanged=new ye,this._showProperty=void 0,this._materialProperty=void 0,this._showOutlineProperty=void 0,this._outlineColorProperty=void 0,this._outlineWidth=1,this._shadowsProperty=void 0,this._distanceDisplayConditionProperty=void 0,this._classificationTypeProperty=void 0,this._options=e.geometryOptions,this._geometryPropertyName=n,this._id=`${n}-${t.id}`,this._observedPropertyNames=e.observedPropertyNames,this._supportsMaterialsforEntitiesOnTerrain=jo.supportsMaterialsforEntitiesOnTerrain(e.scene)}Object.defineProperties(jl.prototype,{id:{get:function(){return this._id}},entity:{get:function(){return this._entity}},fillEnabled:{get:function(){return this._fillEnabled}},hasConstantFill:{get:function(){return!this._fillEnabled||!l(this._entity.availability)&&X.isConstant(this._showProperty)&&X.isConstant(this._fillProperty)}},fillMaterialProperty:{get:function(){return this._materialProperty}},outlineEnabled:{get:function(){return this._outlineEnabled}},hasConstantOutline:{get:function(){return!this._outlineEnabled||!l(this._entity.availability)&&X.isConstant(this._showProperty)&&X.isConstant(this._showOutlineProperty)}},outlineColorProperty:{get:function(){return this._outlineColorProperty}},outlineWidth:{get:function(){return this._outlineWidth}},shadowsProperty:{get:function(){return this._shadowsProperty}},distanceDisplayConditionProperty:{get:function(){return this._distanceDisplayConditionProperty}},classificationTypeProperty:{get:function(){return this._classificationTypeProperty}},isDynamic:{get:function(){return this._dynamic}},isClosed:{get:function(){return this._isClosed}},onTerrain:{get:function(){return this._onTerrain}},geometryChanged:{get:function(){return this._geometryChanged}}});jl.prototype.isOutlineVisible=function(e){let t=this._entity;return(this._outlineEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e))??!1};jl.prototype.isFilled=function(e){let t=this._entity;return(this._fillEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e))??!1};jl.prototype.createFillGeometryInstance=_e.throwInstantiationError;jl.prototype.createOutlineGeometryInstance=_e.throwInstantiationError;jl.prototype.isDestroyed=function(){return!1};jl.prototype.destroy=function(){fe(this)};jl.prototype._isHidden=function(e,t){let n=t.show;return l(n)&&n.isConstant&&!n.getValue(Qe.MINIMUM_VALUE)};jl.prototype._isOnTerrain=function(e,t){return!1};jl.prototype._getIsClosed=function(e){return!0};jl.prototype._isDynamic=_e.throwInstantiationError;jl.prototype._setStaticOptions=_e.throwInstantiationError;jl.prototype._onEntityPropertyChanged=function(e,t,n,i){if(this._observedPropertyNames.indexOf(t)===-1)return;let o=this._entity[this._geometryPropertyName];if(!l(o)){(this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this));return}let r=o.fill,a=l(r)&&r.isConstant?r.getValue(Qe.MINIMUM_VALUE):!0,s=o.outline,c=l(s);if(c&&s.isConstant&&(c=s.getValue(Qe.MINIMUM_VALUE)),!a&&!c){(this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this));return}let u=o.show;if(this._isHidden(e,o)){(this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this));return}this._materialProperty=o.material??v8e,this._fillProperty=r??w8e,this._showProperty=u??S8e,this._showOutlineProperty=o.outline??I8e,this._outlineColorProperty=c?o.outlineColor??D8e:void 0,this._shadowsProperty=o.shadows??P8e,this._distanceDisplayConditionProperty=o.distanceDisplayCondition??R8e,this._classificationTypeProperty=o.classificationType??O8e,this._fillEnabled=a;let f=this._isOnTerrain(e,o)&&(this._supportsMaterialsforEntitiesOnTerrain||this._materialProperty instanceof Wt);if(c&&f&&(_t(_t.geometryOutlines),c=!1),this._onTerrain=f,this._outlineEnabled=c,this._isDynamic(e,o))this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this));else{this._setStaticOptions(e,o),this._isClosed=this._getIsClosed(this._options);let d=o.outlineWidth;this._outlineWidth=l(d)?d.getValue(Qe.MINIMUM_VALUE):1,this._dynamic=!1,this._geometryChanged.raiseEvent(this)}};jl.prototype.createDynamicUpdater=function(e,t){return new this.constructor.DynamicGeometryUpdater(this,e,t)};var bi=jl;function HE(e,t){this._callback=void 0,this._isConstant=void 0,this._definitionChanged=new ye,this.setCallback(e,t)}Object.defineProperties(HE.prototype,{isConstant:{get:function(){return this._isConstant}},definitionChanged:{get:function(){return this._definitionChanged}}});var M8e=new Q;HE.prototype.getValue=function(e,t){return l(e)||(e=Q.now(M8e)),this._callback(e,t)};HE.prototype.setCallback=function(e,t){let n=this._callback!==e||this._isConstant!==t;this._callback=e,this._isConstant=t,n&&this._definitionChanged.raiseEvent(this)};HE.prototype.equals=function(e){return this===e||e instanceof HE&&this._callback===e._callback&&this._isConstant===e._isConstant};var jh=HE;var ffe=new h;function WE(e,t,n,i){this._scene=e,this._heightReference=n,this._extrudedHeightReference=i,this._positionProperty=t,this._position=new h,this._cartographicPosition=new de,this._normal=new h,this._definitionChanged=new ye,this._terrainHeight=0,this._removeCallbackFunc=void 0,this._removeEventListener=void 0,this._removeModeListener=void 0;let o=this;if(l(e.globe)&&(this._removeEventListener=e.terrainProviderChanged.addEventListener(function(){o._updateClamping()}),this._removeModeListener=e.morphComplete.addEventListener(function(){o._updateClamping()})),t.isConstant){let r=t.getValue(Qe.MINIMUM_VALUE,ffe);if(!l(r)||h.equals(r,h.ZERO)||!l(e.globe))return;this._position=h.clone(r,this._position),this._updateClamping(),this._normal=e.ellipsoid.geodeticSurfaceNormal(r,this._normal)}}Object.defineProperties(WE.prototype,{isConstant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}}});WE.prototype._updateClamping=function(){l(this._removeCallbackFunc)&&this._removeCallbackFunc();let e=this._scene,t=this._position;if(h.equals(t,h.ZERO)){this._terrainHeight=0;return}let i=e.ellipsoid.cartesianToCartographic(t,this._cartographicPosition),o=e.getHeight(i,this._heightReference);l(o)?this._terrainHeight=o:this._terrainHeight=0;let r=a=>{this._terrainHeight=a.height,this.definitionChanged.raiseEvent()};this._removeCallbackFunc=e.updateHeight(i,r,this._heightReference)};var B8e=new Q;WE.prototype.getValue=function(e,t){l(e)||(e=Q.now(B8e));let n=X.getValueOrDefault(this._heightReference,e,nt.NONE),i=X.getValueOrDefault(this._extrudedHeightReference,e,nt.NONE);if(n===nt.NONE&&!OE(i))return this._position=h.clone(h.ZERO,this._position),h.clone(h.ZERO,t);if(this._positionProperty.isConstant)return h.multiplyByScalar(this._normal,this._terrainHeight,t);let o=this._scene,r=this._positionProperty.getValue(e,ffe);if(!l(r)||h.equals(r,h.ZERO)||!l(o.globe))return h.clone(h.ZERO,t);if(h.equalsEpsilon(this._position,r,D.EPSILON10))return h.multiplyByScalar(this._normal,this._terrainHeight,t);this._position=h.clone(r,this._position),this._updateClamping();let a=o.ellipsoid.geodeticSurfaceNormal(r,this._normal);return h.multiplyByScalar(a,this._terrainHeight,t)};WE.prototype.isDestroyed=function(){return!1};WE.prototype.destroy=function(){return l(this._removeEventListener)&&this._removeEventListener(),l(this._removeModeListener)&&this._removeModeListener(),l(this._removeCallbackFunc)&&this._removeCallbackFunc(),fe(this)};var Zx=WE;function L8e(e,t,n,i){if(bi.prototype._onEntityPropertyChanged.call(this,e,t,n,i),this._observedPropertyNames.indexOf(t)===-1)return;let o=this._entity[this._geometryPropertyName];if(!l(o))return;l(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0);let r=o.heightReference;if(l(r)){let a=new jh(this._computeCenter.bind(this),!this._dynamic);this._terrainOffsetProperty=new Zx(this._scene,a,r)}}var tg=L8e;var dfe=h.ZERO,hfe=new h,N8e=new h,mfe=new V;function F8e(e){this.id=e,this.vertexFormat=void 0,this.dimensions=void 0,this.offsetAttribute=void 0}function Af(e,t){bi.call(this,{entity:e,scene:t,geometryOptions:new F8e(e),geometryPropertyName:"box",observedPropertyNames:["availability","position","orientation","box"]}),this._onEntityPropertyChanged(e,"box",e.box,void 0)}l(Object.create)&&(Af.prototype=Object.create(bi.prototype),Af.prototype.constructor=Af);Object.defineProperties(Af.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}});Af.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=new En(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),r=Hn.fromDistanceDisplayCondition(o),a={show:i,distanceDisplayCondition:r,color:void 0,offset:void 0};if(this._materialProperty instanceof Wt){let s;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(s=this._materialProperty.color.getValue(e,mfe)),l(s)||(s=V.WHITE),a.color=Yt.fromColor(s)}return l(this._options.offsetAttribute)&&(a.offset=po.fromCartesian3(X.getValueOrDefault(this._terrainOffsetProperty,e,dfe,hfe))),new Ot({id:t,geometry:Ec.fromDimensions(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.box.heightReference,this._options.dimensions.z*.5,this._scene.ellipsoid),attributes:a})};Af.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=X.getValueOrDefault(this._outlineColorProperty,e,V.BLACK,mfe),o=this._distanceDisplayConditionProperty.getValue(e),r={show:new En(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Yt.fromColor(i),distanceDisplayCondition:Hn.fromDistanceDisplayCondition(o),offset:void 0};return l(this._options.offsetAttribute)&&(r.offset=po.fromCartesian3(X.getValueOrDefault(this._terrainOffsetProperty,e,dfe,hfe))),new Ot({id:t,geometry:Nh.fromDimensions(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.box.heightReference,this._options.dimensions.z*.5,this._scene.ellipsoid),attributes:r})};Af.prototype._computeCenter=function(e,t){return X.getValueOrUndefined(this._entity.position,e,t)};Af.prototype._isHidden=function(e,t){return!l(t.dimensions)||!l(e.position)||bi.prototype._isHidden.call(this,e,t)};Af.prototype._isDynamic=function(e,t){return!e.position.isConstant||!X.isConstant(e.orientation)||!t.dimensions.isConstant||!X.isConstant(t.outlineWidth)};Af.prototype._setStaticOptions=function(e,t){let n=X.getValueOrDefault(t.heightReference,Qe.MINIMUM_VALUE,nt.NONE),i=this._options;i.vertexFormat=this._materialProperty instanceof Wt?dn.VERTEX_FORMAT:go.MaterialSupport.TEXTURED.vertexFormat,i.dimensions=t.dimensions.getValue(Qe.MINIMUM_VALUE,i.dimensions),i.offsetAttribute=n!==nt.NONE?ln.ALL:void 0};Af.prototype._onEntityPropertyChanged=tg;Af.DynamicGeometryUpdater=qE;function qE(e,t,n){xi.call(this,e,t,n)}l(Object.create)&&(qE.prototype=Object.create(xi.prototype),qE.prototype.constructor=qE);qE.prototype._isHidden=function(e,t,n){let i=X.getValueOrUndefined(e.position,n,N8e),o=this._options.dimensions;return!l(i)||!l(o)||xi.prototype._isHidden.call(this,e,t,n)};qE.prototype._setOptions=function(e,t,n){let i=X.getValueOrDefault(t.heightReference,n,nt.NONE),o=this._options;o.dimensions=X.getValueOrUndefined(t.dimensions,n,o.dimensions),o.offsetAttribute=i!==nt.NONE?ln.ALL:void 0};var VO=Af;function eb(e,t,n){this._callback=void 0,this._isConstant=void 0,this._referenceFrame=n??Bi.FIXED,this._definitionChanged=new ye,this.setCallback(e,t)}Object.defineProperties(eb.prototype,{isConstant:{get:function(){return this._isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}}});var k8e=new Q;eb.prototype.getValue=function(e,t){return l(e)||(e=Q.now(k8e)),this.getValueInReferenceFrame(e,Bi.FIXED,t)};eb.prototype.setCallback=function(e,t){let n=this._callback!==e||this._isConstant!==t;this._callback=e,this._isConstant=t,n&&this._definitionChanged.raiseEvent(this)};eb.prototype.getValueInReferenceFrame=function(e,t,n){let i=this._callback(e,n);return kh.convertToReferenceFrame(e,i,this._referenceFrame,t,n)};eb.prototype.equals=function(e){return this===e||e instanceof eb&&this._callback===e._callback&&this._isConstant===e._isConstant&&this._referenceFrame===e._referenceFrame};var jO=eb;/*! @license DOMPurify 3.4.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.7/LICENSE */function pfe(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function z8e(e){if(Array.isArray(e))return e}function U8e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i,o,r,a,s=[],c=!0,u=!1;try{if(r=(n=n.call(e)).next,t!==0)for(;!(c=(i=r.call(n)).done)&&(s.push(i.value),s.length!==t);c=!0);}catch(f){u=!0,o=f}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}function V8e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function j8e(e,t){return z8e(e)||U8e(e,t)||G8e(e,t)||V8e()}function G8e(e,t){if(e){if(typeof e=="string")return pfe(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pfe(e,t):void 0}}var Ife=Object.entries,gfe=Object.setPrototypeOf,H8e=Object.isFrozen,W8e=Object.getPrototypeOf,q8e=Object.getOwnPropertyDescriptor,Hl=Object.freeze,Ed=Object.seal,QE=Object.create,Dfe=typeof Reflect<"u"&&Reflect,Xq=Dfe.apply,Kq=Dfe.construct;Hl||(Hl=function(t){return t});Ed||(Ed=function(t){return t});Xq||(Xq=function(t,n){for(var i=arguments.length,o=new Array(i>2?i-2:0),r=2;r<i;r++)o[r-2]=arguments[r];return t.apply(n,o)});Kq||(Kq=function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return new t(...i)});var YE=fs(Array.prototype.forEach),Y8e=fs(Array.prototype.lastIndexOf),_fe=fs(Array.prototype.pop),XE=fs(Array.prototype.push),X8e=fs(Array.prototype.splice),Gl=Array.isArray,WO=fs(String.prototype.toLowerCase),Gq=fs(String.prototype.toString),Afe=fs(String.prototype.match),KE=fs(String.prototype.replace),yfe=fs(String.prototype.indexOf),K8e=fs(String.prototype.trim),Q8e=fs(Number.prototype.toString),$8e=fs(Boolean.prototype.toString),xfe=typeof BigInt>"u"?null:fs(BigInt.prototype.toString),bfe=typeof Symbol>"u"?null:fs(Symbol.prototype.toString),Ma=fs(Object.prototype.hasOwnProperty),GO=fs(Object.prototype.toString),Dc=fs(RegExp.prototype.test),HO=J8e(TypeError);function fs(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return Xq(e,t,i)}}function J8e(e){return function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return Kq(e,n)}}function Si(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:WO;if(gfe&&gfe(e,null),!Gl(t))return e;let i=t.length;for(;i--;){let o=t[i];if(typeof o=="string"){let r=n(o);r!==o&&(H8e(t)||(t[i]=r),o=r)}e[o]=!0}return e}function Z8e(e){for(let t=0;t<e.length;t++)Ma(e,t)||(e[t]=null);return e}function tl(e){let t=QE(null);for(let i of Ife(e)){var n=j8e(i,2);let o=n[0],r=n[1];Ma(e,o)&&(Gl(r)?t[o]=Z8e(r):r&&typeof r=="object"&&r.constructor===Object?t[o]=tl(r):t[o]=r)}return t}function eje(e){switch(typeof e){case"string":return e;case"number":return Q8e(e);case"boolean":return $8e(e);case"bigint":return xfe?xfe(e):"0";case"symbol":return bfe?bfe(e):"Symbol()";case"undefined":return GO(e);case"function":case"object":{if(e===null)return GO(e);let t=e,n=pp(t,"toString");if(typeof n=="function"){let i=n(t);return typeof i=="string"?i:GO(i)}return GO(e)}default:return GO(e)}}function pp(e,t){for(;e!==null;){let i=q8e(e,t);if(i){if(i.get)return fs(i.get);if(typeof i.value=="function")return fs(i.value)}e=W8e(e)}function n(){return null}return n}function tje(e){try{return Dc(e,""),!0}catch{return!1}}var Cfe=Hl(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Hq=Hl(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Wq=Hl(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),nje=Hl(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),qq=Hl(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),ije=Hl(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Tfe=Hl(["#text"]),Efe=Hl(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Yq=Hl(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),vfe=Hl(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),H8=Hl(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),oje=Ed(/{{[\w\W]*|^[\w\W]*}}/g),rje=Ed(/<%[\w\W]*|^[\w\W]*%>/g),aje=Ed(/\${[\w\W]*/g),sje=Ed(/^data-[\-\w.\u00B7-\uFFFF]+$/),cje=Ed(/^aria-[\-\w]+$/),Sfe=Ed(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),lje=Ed(/^(?:\w+script|data):/i),uje=Ed(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),fje=Ed(/^html$/i),dje=Ed(/^[a-z][.\w]*(-[.\w]+)+$/i),mp={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},hje=function(){return typeof window>"u"?null:window},mje=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null,o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(i=n.getAttribute(o));let r="dompurify"+(i?"#"+i:"");try{return t.createPolicy(r,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+r+" could not be created."),null}},wfe=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Pfe(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:hje(),t=yn=>Pfe(yn);if(t.version="3.4.7",t.removed=[],!e||!e.document||e.document.nodeType!==mp.document||!e.Element)return t.isSupported=!1,t;let n=e.document,i=n,o=i.currentScript;e.DocumentFragment;let r=e.HTMLTemplateElement,a=e.Node,s=e.Element,c=e.NodeFilter,u=e.NamedNodeMap;u===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let f=e.DOMParser,d=e.trustedTypes,p=s.prototype,g=pp(p,"cloneNode"),m=pp(p,"remove"),A=pp(p,"nextSibling"),y=pp(p,"childNodes"),x=pp(p,"parentNode"),b=pp(p,"shadowRoot"),C=pp(p,"attributes"),E=a&&a.prototype?pp(a.prototype,"nodeType"):null,S=a&&a.prototype?pp(a.prototype,"nodeName"):null;if(typeof r=="function"){let yn=n.createElement("template");yn.content&&yn.content.ownerDocument&&(n=yn.content.ownerDocument)}let w,P="",R=n,B=R.implementation,L=R.createNodeIterator,_=R.createDocumentFragment,T=R.getElementsByTagName,v=i.importNode,I=wfe();t.isSupported=typeof Ife=="function"&&typeof x=="function"&&B&&B.createHTMLDocument!==void 0;let O=oje,N=rje,j=aje,k=sje,U=cje,F=lje,H=uje,q=dje,J=Sfe,W=null,Z=Si({},[...Cfe,...Hq,...Wq,...qq,...Tfe]),K=null,le=Si({},[...Efe,...Yq,...vfe,...H8]),me=Object.seal(QE(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ae=null,be=null,ge=Object.seal(QE(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),we=!0,Ee=!0,Be=!1,ke=!0,Ge=!1,rt=!0,et=!1,Pe=!1,Ye=!1,ut=!1,Tt=!1,tn=!1,Ht=!0,xt=!1,Pt="user-content-",bn=!0,at=!1,st={},Ln=null,Nn=Si({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),uo=null,Yo=Si({},["audio","video","img","source","image","track"]),oo=null,ro=Si({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Xn="http://www.w3.org/1998/Math/MathML",Kn="http://www.w3.org/2000/svg",cn="http://www.w3.org/1999/xhtml",Jn=cn,Pr=!1,Da=null,rs=Si({},[Xn,Kn,cn],Gq),Ga=Si({},["mi","mo","mn","ms","mtext"]),as=Si({},["annotation-xml"]),pr=Si({},["title","style","font","a","script"]),ri=null,Gr=["application/xhtml+xml","text/html"],Po="text/html",Ri=null,ui=null,Lo=n.createElement("form"),bc=function(Te){return Te instanceof RegExp||Te instanceof Function},sa=function(){let Te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ui&&ui===Te)return;(!Te||typeof Te!="object")&&(Te={}),Te=tl(Te),ri=Gr.indexOf(Te.PARSER_MEDIA_TYPE)===-1?Po:Te.PARSER_MEDIA_TYPE,Ri=ri==="application/xhtml+xml"?Gq:WO,W=Ma(Te,"ALLOWED_TAGS")&&Gl(Te.ALLOWED_TAGS)?Si({},Te.ALLOWED_TAGS,Ri):Z,K=Ma(Te,"ALLOWED_ATTR")&&Gl(Te.ALLOWED_ATTR)?Si({},Te.ALLOWED_ATTR,Ri):le,Da=Ma(Te,"ALLOWED_NAMESPACES")&&Gl(Te.ALLOWED_NAMESPACES)?Si({},Te.ALLOWED_NAMESPACES,Gq):rs,oo=Ma(Te,"ADD_URI_SAFE_ATTR")&&Gl(Te.ADD_URI_SAFE_ATTR)?Si(tl(ro),Te.ADD_URI_SAFE_ATTR,Ri):ro,uo=Ma(Te,"ADD_DATA_URI_TAGS")&&Gl(Te.ADD_DATA_URI_TAGS)?Si(tl(Yo),Te.ADD_DATA_URI_TAGS,Ri):Yo,Ln=Ma(Te,"FORBID_CONTENTS")&&Gl(Te.FORBID_CONTENTS)?Si({},Te.FORBID_CONTENTS,Ri):Nn,ae=Ma(Te,"FORBID_TAGS")&&Gl(Te.FORBID_TAGS)?Si({},Te.FORBID_TAGS,Ri):tl({}),be=Ma(Te,"FORBID_ATTR")&&Gl(Te.FORBID_ATTR)?Si({},Te.FORBID_ATTR,Ri):tl({}),st=Ma(Te,"USE_PROFILES")?Te.USE_PROFILES&&typeof Te.USE_PROFILES=="object"?tl(Te.USE_PROFILES):Te.USE_PROFILES:!1,we=Te.ALLOW_ARIA_ATTR!==!1,Ee=Te.ALLOW_DATA_ATTR!==!1,Be=Te.ALLOW_UNKNOWN_PROTOCOLS||!1,ke=Te.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ge=Te.SAFE_FOR_TEMPLATES||!1,rt=Te.SAFE_FOR_XML!==!1,et=Te.WHOLE_DOCUMENT||!1,ut=Te.RETURN_DOM||!1,Tt=Te.RETURN_DOM_FRAGMENT||!1,tn=Te.RETURN_TRUSTED_TYPE||!1,Ye=Te.FORCE_BODY||!1,Ht=Te.SANITIZE_DOM!==!1,xt=Te.SANITIZE_NAMED_PROPS||!1,bn=Te.KEEP_CONTENT!==!1,at=Te.IN_PLACE||!1,J=tje(Te.ALLOWED_URI_REGEXP)?Te.ALLOWED_URI_REGEXP:Sfe,Jn=typeof Te.NAMESPACE=="string"?Te.NAMESPACE:cn,Ga=Ma(Te,"MATHML_TEXT_INTEGRATION_POINTS")&&Te.MATHML_TEXT_INTEGRATION_POINTS&&typeof Te.MATHML_TEXT_INTEGRATION_POINTS=="object"?tl(Te.MATHML_TEXT_INTEGRATION_POINTS):Si({},["mi","mo","mn","ms","mtext"]),as=Ma(Te,"HTML_INTEGRATION_POINTS")&&Te.HTML_INTEGRATION_POINTS&&typeof Te.HTML_INTEGRATION_POINTS=="object"?tl(Te.HTML_INTEGRATION_POINTS):Si({},["annotation-xml"]);let ot=Ma(Te,"CUSTOM_ELEMENT_HANDLING")&&Te.CUSTOM_ELEMENT_HANDLING&&typeof Te.CUSTOM_ELEMENT_HANDLING=="object"?tl(Te.CUSTOM_ELEMENT_HANDLING):QE(null);if(me=QE(null),Ma(ot,"tagNameCheck")&&bc(ot.tagNameCheck)&&(me.tagNameCheck=ot.tagNameCheck),Ma(ot,"attributeNameCheck")&&bc(ot.attributeNameCheck)&&(me.attributeNameCheck=ot.attributeNameCheck),Ma(ot,"allowCustomizedBuiltInElements")&&typeof ot.allowCustomizedBuiltInElements=="boolean"&&(me.allowCustomizedBuiltInElements=ot.allowCustomizedBuiltInElements),Ge&&(Ee=!1),Tt&&(ut=!0),st&&(W=Si({},Tfe),K=QE(null),st.html===!0&&(Si(W,Cfe),Si(K,Efe)),st.svg===!0&&(Si(W,Hq),Si(K,Yq),Si(K,H8)),st.svgFilters===!0&&(Si(W,Wq),Si(K,Yq),Si(K,H8)),st.mathMl===!0&&(Si(W,qq),Si(K,vfe),Si(K,H8))),ge.tagCheck=null,ge.attributeCheck=null,Ma(Te,"ADD_TAGS")&&(typeof Te.ADD_TAGS=="function"?ge.tagCheck=Te.ADD_TAGS:Gl(Te.ADD_TAGS)&&(W===Z&&(W=tl(W)),Si(W,Te.ADD_TAGS,Ri))),Ma(Te,"ADD_ATTR")&&(typeof Te.ADD_ATTR=="function"?ge.attributeCheck=Te.ADD_ATTR:Gl(Te.ADD_ATTR)&&(K===le&&(K=tl(K)),Si(K,Te.ADD_ATTR,Ri))),Ma(Te,"ADD_URI_SAFE_ATTR")&&Gl(Te.ADD_URI_SAFE_ATTR)&&Si(oo,Te.ADD_URI_SAFE_ATTR,Ri),Ma(Te,"FORBID_CONTENTS")&&Gl(Te.FORBID_CONTENTS)&&(Ln===Nn&&(Ln=tl(Ln)),Si(Ln,Te.FORBID_CONTENTS,Ri)),Ma(Te,"ADD_FORBID_CONTENTS")&&Gl(Te.ADD_FORBID_CONTENTS)&&(Ln===Nn&&(Ln=tl(Ln)),Si(Ln,Te.ADD_FORBID_CONTENTS,Ri)),bn&&(W["#text"]=!0),et&&Si(W,["html","head","body"]),W.table&&(Si(W,["tbody"]),delete ae.tbody),Te.TRUSTED_TYPES_POLICY){if(typeof Te.TRUSTED_TYPES_POLICY.createHTML!="function")throw HO('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Te.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw HO('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=Te.TRUSTED_TYPES_POLICY,P=w.createHTML("")}else w===void 0&&(w=mje(d,o)),w!==null&&typeof P=="string"&&(P=w.createHTML(""));(I.uponSanitizeElement.length>0||I.uponSanitizeAttribute.length>0)&&W===Z&&(W=tl(W)),I.uponSanitizeAttribute.length>0&&K===le&&(K=tl(K)),Hl&&Hl(Te),ui=Te},cf=Si({},[...Hq,...Wq,...nje]),Ks=Si({},[...qq,...ije]),G_=function(Te){let ot=x(Te);(!ot||!ot.tagName)&&(ot={namespaceURI:Jn,tagName:"template"});let $t=WO(Te.tagName),fo=WO(ot.tagName);return Da[Te.namespaceURI]?Te.namespaceURI===Kn?ot.namespaceURI===cn?$t==="svg":ot.namespaceURI===Xn?$t==="svg"&&(fo==="annotation-xml"||Ga[fo]):!!cf[$t]:Te.namespaceURI===Xn?ot.namespaceURI===cn?$t==="math":ot.namespaceURI===Kn?$t==="math"&&as[fo]:!!Ks[$t]:Te.namespaceURI===cn?ot.namespaceURI===Kn&&!as[fo]||ot.namespaceURI===Xn&&!Ga[fo]?!1:!Ks[$t]&&(pr[$t]||!cf[$t]):!!(ri==="application/xhtml+xml"&&Da[Te.namespaceURI]):!1},Xo=function(Te){XE(t.removed,{element:Te});try{x(Te).removeChild(Te)}catch{m(Te)}},gr=function(Te,ot){try{XE(t.removed,{attribute:ot.getAttributeNode(Te),from:ot})}catch{XE(t.removed,{attribute:null,from:ot})}if(ot.removeAttribute(Te),Te==="is")if(ut||Tt)try{Xo(ot)}catch{}else try{ot.setAttribute(Te,"")}catch{}},Ch=function(Te){let ot=null,$t=null;if(Ye)Te="<remove></remove>"+Te;else{let Ko=Afe(Te,/^[\r\n\t ]+/);$t=Ko&&Ko[0]}ri==="application/xhtml+xml"&&Jn===cn&&(Te='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Te+"</body></html>");let fo=w?w.createHTML(Te):Te;if(Jn===cn)try{ot=new f().parseFromString(fo,ri)}catch{}if(!ot||!ot.documentElement){ot=B.createDocument(Jn,"template",null);try{ot.documentElement.innerHTML=Pr?P:fo}catch{}}let ki=ot.body||ot.documentElement;return Te&&$t&&ki.insertBefore(n.createTextNode($t),ki.childNodes[0]||null),Jn===cn?T.call(ot,et?"html":"body")[0]:et?ot.documentElement:ki},Hr=function(Te){return L.call(Te.ownerDocument||Te,Te,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Vc=function(Te){Te.normalize();let ot=L.call(Te.ownerDocument||Te,Te,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),$t=ot.nextNode();for(;$t;){let fo=$t.data;YE([O,N,j],ki=>{fo=KE(fo,ki," ")}),$t.data=fo,$t=ot.nextNode()}},jc=function(Te){let ot=S?S(Te):null;return typeof ot!="string"||Ri(ot)!=="form"?!1:typeof Te.nodeName!="string"||typeof Te.textContent!="string"||typeof Te.removeChild!="function"||Te.attributes!==C(Te)||typeof Te.removeAttribute!="function"||typeof Te.setAttribute!="function"||typeof Te.namespaceURI!="string"||typeof Te.insertBefore!="function"||typeof Te.hasChildNodes!="function"||Te.nodeType!==E(Te)||Te.childNodes!==y(Te)},Cc=function(Te){if(!E||typeof Te!="object"||Te===null)return!1;try{return E(Te)===mp.documentFragment}catch{return!1}},Co=function(Te){if(!E||typeof Te!="object"||Te===null)return!1;try{return typeof E(Te)=="number"}catch{return!1}};function Ha(yn,Te,ot){YE(yn,$t=>{$t.call(t,Te,ot,ui)})}let H_=function(Te){let ot=null;if(Ha(I.beforeSanitizeElements,Te,null),jc(Te))return Xo(Te),!0;let $t=Ri(Te.nodeName);if(Ha(I.uponSanitizeElement,Te,{tagName:$t,allowedTags:W}),rt&&Te.hasChildNodes()&&!Co(Te.firstElementChild)&&Dc(/<[/\w!]/g,Te.innerHTML)&&Dc(/<[/\w!]/g,Te.textContent)||rt&&Te.namespaceURI===cn&&$t==="style"&&Co(Te.firstElementChild)||Te.nodeType===mp.progressingInstruction||rt&&Te.nodeType===mp.comment&&Dc(/<[/\w]/g,Te.data))return Xo(Te),!0;if(ae[$t]||!(ge.tagCheck instanceof Function&&ge.tagCheck($t))&&!W[$t]){if(!ae[$t]&&rE($t)&&(me.tagNameCheck instanceof RegExp&&Dc(me.tagNameCheck,$t)||me.tagNameCheck instanceof Function&&me.tagNameCheck($t)))return!1;if(bn&&!Ln[$t]){let ki=x(Te),Ko=y(Te);if(Ko&&ki){let Gc=Ko.length;for(let ws=Gc-1;ws>=0;--ws){let Hc=g(Ko[ws],!0);ki.insertBefore(Hc,A(Te))}}}return Xo(Te),!0}return(E?E(Te):Te.nodeType)===mp.element&&!G_(Te)||($t==="noscript"||$t==="noembed"||$t==="noframes")&&Dc(/<\/no(script|embed|frames)/i,Te.innerHTML)?(Xo(Te),!0):(Ge&&Te.nodeType===mp.text&&(ot=Te.textContent,YE([O,N,j],ki=>{ot=KE(ot,ki," ")}),Te.textContent!==ot&&(XE(t.removed,{element:Te.cloneNode()}),Te.textContent=ot)),Ha(I.afterSanitizeElements,Te,null),!1)},HI=function(Te,ot,$t){if(be[ot]||Ht&&(ot==="id"||ot==="name")&&($t in n||$t in Lo))return!1;let fo=K[ot]||ge.attributeCheck instanceof Function&&ge.attributeCheck(ot,Te);if(!(Ee&&!be[ot]&&Dc(k,ot))){if(!(we&&Dc(U,ot))){if(!fo||be[ot]){if(!(rE(Te)&&(me.tagNameCheck instanceof RegExp&&Dc(me.tagNameCheck,Te)||me.tagNameCheck instanceof Function&&me.tagNameCheck(Te))&&(me.attributeNameCheck instanceof RegExp&&Dc(me.attributeNameCheck,ot)||me.attributeNameCheck instanceof Function&&me.attributeNameCheck(ot,Te))||ot==="is"&&me.allowCustomizedBuiltInElements&&(me.tagNameCheck instanceof RegExp&&Dc(me.tagNameCheck,$t)||me.tagNameCheck instanceof Function&&me.tagNameCheck($t))))return!1}else if(!oo[ot]){if(!Dc(J,KE($t,H,""))){if(!((ot==="src"||ot==="xlink:href"||ot==="href")&&Te!=="script"&&yfe($t,"data:")===0&&uo[Te])){if(!(Be&&!Dc(F,KE($t,H,"")))){if($t)return!1}}}}}}return!0},Q9=Si({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),rE=function(Te){return!Q9[WO(Te)]&&Dc(q,Te)},O4=function(Te){Ha(I.beforeSanitizeAttributes,Te,null);let ot=Te.attributes;if(!ot||jc(Te))return;let $t={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:K,forceKeepAttr:void 0},fo=ot.length;for(;fo--;){let ki=ot[fo],Ko=ki.name,Gc=ki.namespaceURI,ws=ki.value,Hc=Ri(Ko),sE=ws,ss=Ko==="value"?sE:K8e(sE);if($t.attrName=Hc,$t.attrValue=ss,$t.keepAttr=!0,$t.forceKeepAttr=void 0,Ha(I.uponSanitizeAttribute,Te,$t),ss=$t.attrValue,xt&&(Hc==="id"||Hc==="name")&&yfe(ss,Pt)!==0&&(gr(Ko,Te),ss=Pt+ss),rt&&Dc(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,ss)){gr(Ko,Te);continue}if(Hc==="attributename"&&Afe(ss,"href")){gr(Ko,Te);continue}if($t.forceKeepAttr)continue;if(!$t.keepAttr){gr(Ko,Te);continue}if(!ke&&Dc(/\/>/i,ss)){gr(Ko,Te);continue}Ge&&YE([O,N,j],ue=>{ss=KE(ss,ue," ")});let sx=Ri(Te.nodeName);if(!HI(sx,Hc,ss)){gr(Ko,Te);continue}if(w&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!Gc)switch(d.getAttributeType(sx,Hc)){case"TrustedHTML":{ss=w.createHTML(ss);break}case"TrustedScriptURL":{ss=w.createScriptURL(ss);break}}if(ss!==sE)try{Gc?Te.setAttributeNS(Gc,Ko,ss):Te.setAttribute(Ko,ss),jc(Te)?Xo(Te):_fe(t.removed)}catch{gr(Ko,Te)}}Ha(I.afterSanitizeAttributes,Te,null)},aE=function(Te){let ot=null,$t=Hr(Te);for(Ha(I.beforeSanitizeShadowDOM,Te,null);ot=$t.nextNode();)if(Ha(I.uponSanitizeShadowNode,ot,null),H_(ot),O4(ot),Cc(ot.content)&&aE(ot.content),(E?E(ot):ot.nodeType)===mp.element){let ki=b?b(ot):ot.shadowRoot;Cc(ki)&&(W_(ki),aE(ki))}Ha(I.afterSanitizeShadowDOM,Te,null)},W_=function(Te){let ot=E?E(Te):Te.nodeType;if(ot===mp.element){let ki=b?b(Te):Te.shadowRoot;Cc(ki)&&(W_(ki),aE(ki))}let $t=y?y(Te):Te.childNodes;if(!$t)return;let fo=[];YE($t,ki=>{XE(fo,ki)});for(let ki of fo)W_(ki);if(ot===mp.element){let ki=S?S(Te):null;if(typeof ki=="string"&&Ri(ki)==="template"){let Ko=Te.content;Cc(Ko)&&W_(Ko)}}};return t.sanitize=function(yn){let Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ot=null,$t=null,fo=null,ki=null;if(Pr=!yn,Pr&&(yn="<!-->"),typeof yn!="string"&&!Co(yn)&&(yn=eje(yn),typeof yn!="string"))throw HO("dirty is not a string, aborting");if(!t.isSupported)return yn;if(Pe||sa(Te),t.removed=[],typeof yn=="string"&&(at=!1),at){let ws=S?S(yn):yn.nodeName;if(typeof ws=="string"){let Hc=Ri(ws);if(!W[Hc]||ae[Hc])throw HO("root node is forbidden and cannot be sanitized in-place")}if(jc(yn))throw HO("root node is clobbered and cannot be sanitized in-place");W_(yn)}else if(Co(yn))ot=Ch("<!---->"),$t=ot.ownerDocument.importNode(yn,!0),$t.nodeType===mp.element&&$t.nodeName==="BODY"||$t.nodeName==="HTML"?ot=$t:ot.appendChild($t),W_($t);else{if(!ut&&!Ge&&!et&&yn.indexOf("<")===-1)return w&&tn?w.createHTML(yn):yn;if(ot=Ch(yn),!ot)return ut?null:tn?P:""}ot&&Ye&&Xo(ot.firstChild);let Ko=Hr(at?yn:ot);for(;fo=Ko.nextNode();)H_(fo),O4(fo),Cc(fo.content)&&aE(fo.content);if(at)return Ge&&Vc(yn),yn;if(ut){if(Ge&&Vc(ot),Tt)for(ki=_.call(ot.ownerDocument);ot.firstChild;)ki.appendChild(ot.firstChild);else ki=ot;return(K.shadowroot||K.shadowrootmode)&&(ki=v.call(i,ki,!0)),ki}let Gc=et?ot.outerHTML:ot.innerHTML;return et&&W["!doctype"]&&ot.ownerDocument&&ot.ownerDocument.doctype&&ot.ownerDocument.doctype.name&&Dc(fje,ot.ownerDocument.doctype.name)&&(Gc="<!DOCTYPE "+ot.ownerDocument.doctype.name+`>
- `+Gc),Ge&&YE([O,N,j],ws=>{Gc=KE(Gc,ws," ")}),w&&tn?w.createHTML(Gc):Gc},t.setConfig=function(){let yn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};sa(yn),Pe=!0},t.clearConfig=function(){ui=null,Pe=!1},t.isValidAttribute=function(yn,Te,ot){ui||sa({});let $t=Ri(yn),fo=Ri(Te);return HI($t,fo,ot)},t.addHook=function(yn,Te){typeof Te=="function"&&XE(I[yn],Te)},t.removeHook=function(yn,Te){if(Te!==void 0){let ot=Y8e(I[yn],Te);return ot===-1?void 0:X8e(I[yn],ot,1)[0]}return _fe(I[yn])},t.removeHooks=function(yn){I[yn]=[]},t.removeAllHooks=function(){I=wfe()},t}var Rfe=Pfe();var pje=0,Qq={},$q=class e{constructor(t,n){let i,o=t;l(Qq[o])?i=Qq[o]:(i=pje++,Qq[o]=i),n=n??!1,this._id=i,this._html=t,this._showOnScreen=n,this._element=void 0}get html(){return this._html}get id(){return this._id}get showOnScreen(){return this._showOnScreen}set showOnScreen(t){this._showOnScreen=t}get element(){if(!l(this._element)){let t=Rfe.sanitize(this._html),n=document.createElement("div");n.className="cesium-credit-wrapper",n._creditId=this._id,n.style.display="inline",n.innerHTML=t;let i=n.querySelectorAll("a");for(let o=0;o<i.length;o++)i[o].setAttribute("target","_blank");this._element=n}return this._element}static equals(t,n){return t===n||l(t)&&l(n)&&t._id===n._id&&t._showOnScreen===n._showOnScreen}equals(t){return e.equals(this,t)}isIon(){return this.html.indexOf("ion-credit.png")!==-1}static getIonCredit(t){let n=l(t.collapsible)&&!t.collapsible;return new e(t.html,n)}static clone(t){if(l(t))return new e(t.html,t.showOnScreen)}},yt=$q;function gje(e,t){_t(e,t)}var Ms=gje;function tb(e){this._url=e,this._cubeMapBuffers=void 0,this._texture=void 0,this._maximumMipmapLevel=void 0,this._loading=!1,this._ready=!1,this._errorEvent=new ye}Object.defineProperties(tb.prototype,{url:{get:function(){return this._url}},errorEvent:{get:function(){return this._errorEvent}},texture:{get:function(){return this._texture}},maximumMipmapLevel:{get:function(){return this._maximumMipmapLevel}},ready:{get:function(){return this._ready}}});tb.isSupported=function(e){return(e.colorBufferHalfFloat&&e.halfFloatingPointTexture||e.floatingPointTexture&&e.colorBufferFloat)&&e.supportsTextureLod};function Jq(e){e._cubeMapBuffers=void 0}tb.prototype.update=function(e){let{context:t}=e;if(!tb.isSupported(t))return;if(l(this._texture)){Jq(this);return}if(!l(this._texture)&&!this._loading){let f=t.textureCache.getTexture(this._url);l(f)&&(Jq(this),this._texture=f,this._maximumMipmapLevel=this._texture.maximumMipmapLevel,this._ready=!0)}let n=this._cubeMapBuffers;if(!l(n)&&!this._loading){let f=this;Cu(this._url).then(function(d){f._cubeMapBuffers=d,f._loading=!1}).catch(function(d){f.isDestroyed()||f._errorEvent.raiseEvent(d)}),this._loading=!0}if(!l(this._cubeMapBuffers))return;let{pixelDatatype:i}=n[0].positiveX;l(i)||(i=t.halfFloatingPointTexture?je.HALF_FLOAT:je.FLOAT);let o=Xe.RGBA,r=n.length;this._maximumMipmapLevel=r-1;let a=n[0].positiveX.width,s=Math.log2(a)+1;if(r!==s){let f={};Object.values($r.FaceName).forEach(d=>{f[d]=void 0});for(let d=r;d<s;d++)n.push(f)}let c=new jt({minificationFilter:Vt.LINEAR_MIPMAP_LINEAR}),u=new $r({context:t,source:n[0],flipY:!1,pixelDatatype:i,pixelFormat:o,sampler:c});u.loadMipmaps(n.slice(1)),this._texture=u,this._texture.maximumMipmapLevel=this._maximumMipmapLevel,t.textureCache.addTexture(this._url,this._texture),this._ready=!0};tb.prototype.isDestroyed=function(){return!1};tb.prototype.destroy=function(){return Jq(this),this._texture=this._texture&&this._texture.destroy(),fe(this)};var Gh=tb;function qO(e){e=e??G.EMPTY_OBJECT;let t=l(e.imageBasedLightingFactor)?z.clone(e.imageBasedLightingFactor):new z(1,1);this._imageBasedLightingFactor=t;let n=e.sphericalHarmonicCoefficients;this._sphericalHarmonicCoefficients=n,this._specularEnvironmentMaps=e.specularEnvironmentMaps,this._specularEnvironmentCubeMap=void 0,this._specularEnvironmentCubeMapDirty=!0,this._specularEnvironmentMapLoaded=!1,this._previousSpecularEnvironmentMapLoaded=!1,this._useDefaultSpecularMaps=!1,this._useDefaultSphericalHarmonics=!1,this._shouldRegenerateShaders=!1,this._previousFrameNumber=void 0,this._previousFrameContext=void 0,this._previousImageBasedLightingFactor=z.clone(t),this._previousSphericalHarmonicCoefficients=n,this._removeErrorListener=void 0}Object.defineProperties(qO.prototype,{imageBasedLightingFactor:{get:function(){return this._imageBasedLightingFactor},set:function(e){this._previousImageBasedLightingFactor=z.clone(this._imageBasedLightingFactor,this._previousImageBasedLightingFactor),this._imageBasedLightingFactor=z.clone(e,this._imageBasedLightingFactor)}},sphericalHarmonicCoefficients:{get:function(){return this._sphericalHarmonicCoefficients},set:function(e){this._previousSphericalHarmonicCoefficients=this._sphericalHarmonicCoefficients,this._sphericalHarmonicCoefficients=e}},specularEnvironmentMaps:{get:function(){return this._specularEnvironmentMaps},set:function(e){e!==this._specularEnvironmentMaps&&(this._specularEnvironmentCubeMapDirty=this._specularEnvironmentCubeMapDirty||e!==this._specularEnvironmentMaps,this._specularEnvironmentMapLoaded=!1),this._specularEnvironmentMaps=e}},enabled:{get:function(){return this._imageBasedLightingFactor.x>0||this._imageBasedLightingFactor.y>0}},shouldRegenerateShaders:{get:function(){return this._shouldRegenerateShaders}},specularEnvironmentCubeMap:{get:function(){return this._specularEnvironmentCubeMap}},useDefaultSphericalHarmonics:{get:function(){return this._useDefaultSphericalHarmonics}},useDefaultSpecularMaps:{get:function(){return this._useDefaultSpecularMaps}},useSpecularEnvironmentMaps:{get:function(){return l(this._specularEnvironmentCubeMap)&&this._specularEnvironmentCubeMap.ready||this._useDefaultSpecularMaps}}});function _je(e,t){if(Gh.isSupported(t)){if(e._specularEnvironmentCubeMap=e._specularEnvironmentCubeMap&&e._specularEnvironmentCubeMap.destroy(),l(e._specularEnvironmentMaps)){let n=new Gh(e._specularEnvironmentMaps);e._specularEnvironmentCubeMap=n,e._removeErrorListener=n.errorEvent.addEventListener(i=>{console.error(`Error loading specularEnvironmentMaps: ${i}`)})}e._shouldRegenerateShaders=!0}}qO.prototype.update=function(e){if(e.frameNumber===this._previousFrameNumber&&e.context===this._previousFrameContext)return;this._previousFrameNumber=e.frameNumber;let t=this._previousFrameContext=e.context;e.brdfLutGenerator.update(e),this._shouldRegenerateShaders=!1;let n=this._imageBasedLightingFactor,i=this._previousImageBasedLightingFactor;z.equals(n,i)||(this._shouldRegenerateShaders=n.x>0&&i.x===0||n.x===0&&i.x>0,this._shouldRegenerateShaders=this._shouldRegenerateShaders||n.y>0&&i.y===0||n.y===0&&i.y>0,this._previousImageBasedLightingFactor=z.clone(this._imageBasedLightingFactor,this._previousImageBasedLightingFactor)),this._previousSphericalHarmonicCoefficients!==this._sphericalHarmonicCoefficients&&(this._shouldRegenerateShaders=this._shouldRegenerateShaders||l(this._previousSphericalHarmonicCoefficients)!==l(this._sphericalHarmonicCoefficients),this._previousSphericalHarmonicCoefficients=this._sphericalHarmonicCoefficients),this._shouldRegenerateShaders=this._shouldRegenerateShaders||this._previousSpecularEnvironmentMapLoaded!==this._specularEnvironmentMapLoaded,this._previousSpecularEnvironmentMapLoaded=this._specularEnvironmentMapLoaded,this._specularEnvironmentCubeMapDirty&&(_je(this,t),this._specularEnvironmentCubeMapDirty=!1),l(this._specularEnvironmentCubeMap)&&(this._specularEnvironmentCubeMap.update(e),this._specularEnvironmentCubeMap.ready&&(this._specularEnvironmentMapLoaded=!0));let o=!l(this._specularEnvironmentCubeMap)&&l(e.specularEnvironmentMaps)&&!this._useDefaultSpecularMaps,r=!l(e.specularEnvironmentMaps)&&this._useDefaultSpecularMaps,a=!l(this._sphericalHarmonicCoefficients)&&l(e.sphericalHarmonicCoefficients)&&!this._useDefaultSphericalHarmonics,s=!l(e.sphericalHarmonicCoefficients)&&this._useDefaultSphericalHarmonics;this._shouldRegenerateShaders=this._shouldRegenerateShaders||o||r||a||s,this._useDefaultSpecularMaps=!l(this._specularEnvironmentCubeMap)&&l(e.specularEnvironmentMaps),this._useDefaultSphericalHarmonics=!l(this._sphericalHarmonicCoefficients)&&l(e.sphericalHarmonicCoefficients)};qO.prototype.isDestroyed=function(){return!1};qO.prototype.destroy=function(){return this._specularEnvironmentCubeMap=this._specularEnvironmentCubeMap&&this._specularEnvironmentCubeMap.destroy(),this._removeErrorListener=this._removeErrorListener&&this._removeErrorListener(),fe(this)};var nb=qO;var eY=Yr(uf(),1);var Zq,Ofe="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIxMDYxM2JlMS00NTIzLTQ0YWItYTg5My00NzRkMDgwNThiZDciLCJpZCI6MjU5LCJzdWIiOiJDZXNpdW1KUyIsImlzcyI6Imh0dHBzOi8vYXBpLmNlc2l1bS5jb20iLCJhdWQiOiIxLjE0MiBSZWxlYXNlIC0gRGVsZXRlIG9uIEF1Z3VzdCAxLCAyMDI2IiwiaWF0IjoxNzc5NjkwODE2fQ.Eq05fkRTh1lFGZUqr9vZZorz4HO_6rY_UmYi3fIHYaU",W8={};W8.defaultAccessToken=Ofe;W8.defaultServer=new De({url:"https://api.cesium.com/"});W8.getDefaultTokenCredit=function(e){if(e===Ofe){if(!l(Zq)){let t=`<b> This application is using Cesium's default ion access token. Please assign <i>Cesium.Ion.defaultAccessToken</i> with an access token from your ion account before making any Cesium API calls. You can sign up for a free ion account at <a href="https://cesium.com">https://cesium.com</a>.</b>`;Zq=new yt(t,!0)}return Zq}};var Hh=W8;function Wl(e,t){let n,i=e.externalType,o=l(i);if(!o)n={url:e.url,retryAttempts:1,retryCallback:Aje};else if(i==="3DTILES"||i==="STK_TERRAIN_SERVER")n={url:e.options.url};else throw new re("Ion.createResource does not support external imagery assets; use IonImageryProvider instead.");De.call(this,n),this._ionEndpoint=e,this._ionEndpointDomain=o?void 0:new eY.default(e.url).authority(),this._ionEndpointResource=t,this._ionRoot=void 0,this._pendingPromise=void 0,this._credits=void 0,this._isExternal=o,this.refreshCallback=void 0}l(Object.create)&&(Wl.prototype=Object.create(De.prototype),Wl.prototype.constructor=Wl);Wl.fromAssetId=function(e,t){let n=Wl._createEndpointResource(e,t);return n.fetchJson().then(function(i){return new Wl(i,n)})};Object.defineProperties(Wl.prototype,{credits:{get:function(){return l(this._ionRoot)?this._ionRoot.credits:l(this._credits)?this._credits:(this._credits=Wl.getCreditsFromEndpoint(this._ionEndpoint,this._ionEndpointResource),this._credits)}}});Wl.getCreditsFromEndpoint=function(e,t){let n=e.attributions.map(yt.getIonCredit),i=Hh.getDefaultTokenCredit(t.queryParameters.access_token);return l(i)&&n.push(yt.clone(i)),n};Wl.prototype.clone=function(e){let t=this._ionRoot??this;return l(e)||(e=new Wl(t._ionEndpoint,t._ionEndpointResource)),e=De.prototype.clone.call(this,e),e._ionRoot=t,e._isExternal=this._isExternal,e};Wl.prototype.fetchImage=function(e){if(!this._isExternal){let t=e;e={preferBlob:!0},l(t)&&(e.flipY=t.flipY,e.preferImageBitmap=t.preferImageBitmap)}return De.prototype.fetchImage.call(this,e)};Wl.prototype._makeRequest=function(e){return this._isExternal||new eY.default(this.url).authority()!==this._ionEndpointDomain?De.prototype._makeRequest.call(this,e):(e.headers=Mfe(e.headers),e.headers.Authorization=`Bearer ${this._ionEndpoint.accessToken}`,De.prototype._makeRequest.call(this,e))};Wl._createEndpointResource=function(e,t){t=t??G.EMPTY_OBJECT;let n=t.server??Hh.defaultServer,i=t.accessToken??Hh.defaultAccessToken;n=De.createIfNeeded(n);let o={url:`v1/assets/${e}/endpoint`};return l(i)&&(o.queryParameters={access_token:i}),l(t.queryParameters)&&(o.queryParameters={...o.queryParameters,...t.queryParameters}),o.headers=Mfe(o.headers),n.getDerivedResource(o)};function Mfe(e={}){return e["X-Cesium-Client"]="CesiumJS",typeof CESIUM_VERSION<"u"&&(e["X-Cesium-Client-Version"]=CESIUM_VERSION),e}function Aje(e,t){let n=e._ionRoot??e,i=n._ionEndpointResource,o=typeof Image<"u";return!l(t)||t.statusCode!==401&&!(o&&t.target instanceof Image)?Promise.resolve(!1):(l(n._pendingPromise)||(n._pendingPromise=i.fetchJson().then(function(r){let a=e.refreshCallback??n.refreshCallback;return l(a)&&a(n,r),n._ionEndpoint=r,n._ionEndpoint}).finally(function(r){return n._pendingPromise=void 0,r})),n._pendingPromise.then(function(r){return e._ionEndpoint=r,!0}))}var ha=Wl;function gp(e){e=e??0,this._array=new Array(e),this._length=e}Object.defineProperties(gp.prototype,{length:{get:function(){return this._length},set:function(e){let t=this._array,n=this._length;if(e<n)for(let i=e;i<n;++i)t[i]=void 0;else e>t.length&&(t.length=e);this._length=e}},values:{get:function(){return this._array}}});gp.prototype.get=function(e){return this._array[e]};gp.prototype.set=function(e,t){e>=this._length&&(this.length=e+1),this._array[e]=t};gp.prototype.peek=function(){return this._array[this._length-1]};gp.prototype.push=function(e){let t=this.length++;this._array[t]=e};gp.prototype.pop=function(){if(this._length===0)return;let e=this._array[this._length-1];return--this.length,e};gp.prototype.reserve=function(e){e>this._array.length&&(this._array.length=e)};gp.prototype.resize=function(e){this.length=e};gp.prototype.trim=function(e){e=e??this._length,this._array.length=e};var ql=gp;var _p={X:0,Y:1,Z:2};_p.Y_UP_TO_Z_UP=M.fromRotationTranslation($.fromArray([1,0,0,0,0,1,0,-1,0]));_p.Z_UP_TO_Y_UP=M.fromRotationTranslation($.fromArray([1,0,0,0,0,-1,0,1,0]));_p.X_UP_TO_Z_UP=M.fromRotationTranslation($.fromArray([0,0,1,0,1,0,-1,0,0]));_p.Z_UP_TO_X_UP=M.fromRotationTranslation($.fromArray([0,0,-1,0,1,0,1,0,0]));_p.X_UP_TO_Y_UP=M.fromRotationTranslation($.fromArray([0,1,0,-1,0,0,0,0,1]));_p.Y_UP_TO_X_UP=M.fromRotationTranslation($.fromArray([0,-1,0,1,0,0,0,0,1]));_p.fromName=function(e){return _p[e]};Object.freeze(_p);var Li=_p;function Bfe(e){e=e??G.EMPTY_OBJECT,this._metadata=e.metadata}Object.defineProperties(Bfe.prototype,{metadata:{get:function(){return this._metadata}}});var ib=Bfe;function mA(e,t,n){return t=t??0,n=n??e.byteLength-t,e=e.subarray(t,t+n),mA.decode(e)}mA.decodeWithTextDecoder=function(e){return new TextDecoder("utf-8").decode(e)};mA.decodeWithFromCharCode=function(e){let t="",n=yje(e),i=n.length;for(let o=0;o<i;++o){let r=n[o];r<=65535?t+=String.fromCharCode(r):(r-=65536,t+=String.fromCharCode((r>>10)+55296,(r&1023)+56320))}return t};function YO(e,t,n){return t<=e&&e<=n}function yje(e){let t=0,n=0,i=0,o=128,r=191,a=[],s=e.length;for(let c=0;c<s;++c){let u=e[c];if(i===0){if(YO(u,0,127)){a.push(u);continue}if(YO(u,194,223)){i=1,t=u&31;continue}if(YO(u,224,239)){u===224&&(o=160),u===237&&(r=159),i=2,t=u&15;continue}if(YO(u,240,244)){u===240&&(o=144),u===244&&(r=143),i=3,t=u&7;continue}throw new re("String decoding failed.")}if(!YO(u,o,r)){t=i=n=0,o=128,r=191,--c;continue}o=128,r=191,t=t<<6|u&63,++n,n===i&&(a.push(t),t=i=n=0)}return a}typeof TextDecoder<"u"?mA.decode=mA.decodeWithTextDecoder:mA.decode=mA.decodeWithFromCharCode;var wu=mA;function xje(e,t){return t=t??0,wu(e,t,Math.min(4,e.length))}var Wh=xje;var tY=class e{constructor(t,n,i,o){this._tileset=t,this._tile=n,this._resource=i,l(o)||(o=[]),this._contents=o,this._metadata=void 0,this._group=void 0,this._ready=!1}get featurePropertiesDirty(){let t=this._contents,n=t.length;for(let i=0;i<n;++i)if(t[i].featurePropertiesDirty)return!0;return!1}set featurePropertiesDirty(t){let n=this._contents,i=n.length;for(let o=0;o<i;++o)n[o].featurePropertiesDirty=t}get featuresLength(){return 0}get pointsLength(){return 0}get trianglesLength(){return 0}get geometryByteLength(){return 0}get texturesByteLength(){return 0}get batchTableByteLength(){return 0}get innerContents(){return this._contents}get ready(){return this._ready}get tileset(){return this._tileset}get tile(){return this._tile}get url(){return this._resource.getUrlComponent(!0)}get metadata(){return this._metadata}set metadata(t){this._metadata=t;let n=this._contents,i=n.length;for(let o=0;o<i;++o)n[o].metadata=t}get batchTable(){}get group(){return this._group}set group(t){this._group=t;let n=this._contents,i=n.length;for(let o=0;o<i;++o)n[o].group=t}static async fromTileType(t,n,i,o,r,a){r=r??0;let s=new Uint8Array(o),c=new DataView(o);r+=XO;let u=c.getUint32(r,!0);if(u!==1)throw new re(`Only Composite Tile version 1 is supported. Version ${u} is not.`);r+=XO,r+=XO;let f=c.getUint32(r,!0);r+=XO;let d=i.queryParameters.compositeIndex;l(d)?d=`${d}_`:d="";let p=[];p.length=f;for(let A=0;A<f;++A){let y=Wh(s,r),x=c.getUint32(r+XO*2,!0),b=a[y],C=`${d}${A}`,E=i.getDerivedResource({queryParameters:{compositeIndex:C}});if(l(b))p[A]=Promise.resolve(b(t,n,E,o,r));else throw new re(`Unknown tile content type, ${y}, inside Composite tile`);r+=x}let g=await Promise.all(p);return new e(t,n,i,g)}hasProperty(t,n){return!1}getFeature(t){}applyDebugSettings(t,n){let i=this._contents,o=i.length;for(let r=0;r<o;++r)i[r].applyDebugSettings(t,n)}applyStyle(t){let n=this._contents,i=n.length;for(let o=0;o<i;++o)n[o].applyStyle(t)}update(t,n){let i=this._contents,o=i.length,r=!0;for(let a=0;a<o;++a)i[a].update(t,n),r=r&&i[a].ready;!this._ready&&r&&(this._ready=!0)}pick(t,n,i){if(!this._ready)return;let o,r=Number.POSITIVE_INFINITY,a=this._contents,s=a.length;for(let c=0;c<s;++c){let u=a[c].pick(t,n,i);if(!l(u))continue;let f=h.distance(t.origin,u);f<r&&(o=u,r=f)}if(l(o))return i}isDestroyed(){return!1}destroy(){let t=this._contents,n=t.length;for(let i=0;i<n;++i)t[i].destroy();return fe(this)}},XO=Uint32Array.BYTES_PER_ELEMENT,KO=tY;function bje(e,t,n){return JSON.parse(wu(e,t,n))}var Cr=bje;function nl(e){this._id=jn();let t=e.featuresLength;this._showAlphaProperties=void 0,this._batchValues=void 0,this._batchValuesDirty=!1,this._batchTexture=void 0,this._defaultTexture=void 0,this._pickTexture=void 0,this._pickIds=[];let n,i;if(t>0){let o=Math.min(t,Rt.maximumTextureSize),r=Math.ceil(t/Rt.maximumTextureSize),a=1/o,s=a*.5,c=1/r,u=c*.5;n=new z(o,r),i=new se(a,s,c,u)}this._translucentFeaturesLength=0,this._featuresLength=t,this._textureDimensions=n,this._textureStep=i,this._owner=e.owner,this._statistics=e.statistics,this._colorChangedCallback=e.colorChangedCallback}Object.defineProperties(nl.prototype,{translucentFeaturesLength:{get:function(){return this._translucentFeaturesLength}},byteLength:{get:function(){let e=0;return l(this._pickTexture)&&(e+=this._pickTexture.sizeInBytes),l(this._batchTexture)&&(e+=this._batchTexture.sizeInBytes),e}},textureDimensions:{get:function(){return this._textureDimensions}},textureStep:{get:function(){return this._textureStep}},batchTexture:{get:function(){return this._batchTexture}},defaultTexture:{get:function(){return this._defaultTexture}},pickTexture:{get:function(){return this._pickTexture}}});nl.DEFAULT_COLOR_VALUE=V.WHITE;nl.DEFAULT_SHOW_VALUE=!0;function Lfe(e){let t=e._textureDimensions;return t.x*t.y*4}function Nfe(e){if(!l(e._batchValues)){let t=Lfe(e),n=new Uint8Array(t).fill(255);e._batchValues=n}return e._batchValues}function Ffe(e){if(!l(e._showAlphaProperties)){let t=2*e._featuresLength,n=new Uint8Array(t).fill(255);e._showAlphaProperties=n}return e._showAlphaProperties}nl.prototype.setShow=function(e,t){if(t&&!l(this._showAlphaProperties))return;let n=Ffe(this),i=e*2,o=t?255:0;if(n[i]!==o){n[i]=o;let r=Nfe(this),a=e*4+3;r[a]=t?n[i+1]:0,this._batchValuesDirty=!0}};nl.prototype.setAllShow=function(e){let t=this._featuresLength;for(let n=0;n<t;++n)this.setShow(n,e)};nl.prototype.getShow=function(e){if(!l(this._showAlphaProperties))return!0;let t=e*2;return this._showAlphaProperties[t]===255};var Cje=new Array(4);nl.prototype.setColor=function(e,t){if(V.equals(t,nl.DEFAULT_COLOR_VALUE)&&!l(this._batchValues))return;let n=t.toBytes(Cje),i=n[3],o=Nfe(this),r=e*4,a=Ffe(this),s=e*2;if(o[r]!==n[0]||o[r+1]!==n[1]||o[r+2]!==n[2]||a[s+1]!==i){o[r]=n[0],o[r+1]=n[1],o[r+2]=n[2];let c=a[s+1]!==255,u=a[s]!==0;o[r+3]=u?i:0,a[s+1]=i;let f=i!==255;f&&!c?++this._translucentFeaturesLength:!f&&c&&--this._translucentFeaturesLength,this._batchValuesDirty=!0,l(this._colorChangedCallback)&&this._colorChangedCallback(e,t)}};nl.prototype.setAllColor=function(e){let t=this._featuresLength;for(let n=0;n<t;++n)this.setColor(n,e)};nl.prototype.getColor=function(e,t){if(!l(this._batchValues))return V.clone(nl.DEFAULT_COLOR_VALUE,t);let n=this._batchValues,i=e*4,o=this._showAlphaProperties,r=e*2;return V.fromBytes(n[i],n[i+1],n[i+2],o[r+1],t)};nl.prototype.getPickColor=function(e){return this._pickIds[e]};function kfe(e,t,n){let i=e._textureDimensions;return new It({context:t,pixelFormat:Xe.RGBA,pixelDatatype:je.UNSIGNED_BYTE,source:{width:i.x,height:i.y,arrayBufferView:n},flipY:!1,sampler:jt.NEAREST})}function Tje(e,t){let n=e._featuresLength;if(!l(e._pickTexture)&&n>0){let i=e._pickIds,o=Lfe(e),r=new Uint8Array(o),a=e._owner,s=e._statistics;for(let c=0;c<n;++c){let u=t.createPickId(a.getFeature(c));i.push(u);let f=u.color,d=c*4;r[d]=V.floatToByte(f.red),r[d+1]=V.floatToByte(f.green),r[d+2]=V.floatToByte(f.blue),r[d+3]=V.floatToByte(f.alpha)}e._pickTexture=kfe(e,t,r),l(s)&&(s.batchTableByteLength+=e._pickTexture.sizeInBytes)}}function Eje(e){let t=e._textureDimensions;e._batchTexture.copyFrom({source:{width:t.x,height:t.y,arrayBufferView:e._batchValues}})}nl.prototype.update=function(e,t){let n=t.context;this._defaultTexture=n.defaultTexture;let i=t.passes;(i.pick||i.postProcess)&&Tje(this,n),this._batchValuesDirty&&(this._batchValuesDirty=!1,l(this._batchTexture)||(this._batchTexture=kfe(this,n,this._batchValues),l(this._statistics)&&(this._statistics.batchTableByteLength+=this._batchTexture.sizeInBytes)),Eje(this))};nl.prototype.isDestroyed=function(){return!1};nl.prototype.destroy=function(){this._batchTexture=this._batchTexture&&this._batchTexture.destroy(),this._pickTexture=this._pickTexture&&this._pickTexture.destroy();let e=this._pickIds,t=e.length;for(let n=0;n<t;++n)e[n].destroy();return fe(this)};var Yl=nl;var vje={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Sje={SCALAR:void 0,VEC2:z,VEC3:h,VEC4:se,MAT2:Gi,MAT3:$,MAT4:M};function wje(e){let t=e.componentType,n;typeof t=="string"?n=Y.fromName(t):n=t;let i=vje[e.type],o=Sje[e.type];return{componentsPerAttribute:i,classType:o,createArrayBufferView:function(r,a,s){return Y.createArrayBufferView(n,r,a,i*s)}}}var vd=wje;function ng(e){this._classes=void 0,this._classIds=void 0,this._classIndexes=void 0,this._parentCounts=void 0,this._parentIndexes=void 0,this._parentIds=void 0,this._byteLength=0,Ije(this,e.extension,e.binaryBody)}Object.defineProperties(ng.prototype,{byteLength:{get:function(){return this._byteLength}}});function Ije(e,t,n){let i,o,r,a=t.instancesLength,s=t.classes,c=t.classIds,u=t.parentCounts,f=t.parentIds,d=a,p=0;l(c.byteOffset)&&(c.componentType=c.componentType??Y.UNSIGNED_SHORT,c.type=Ft.SCALAR,r=vd(c),c=r.createArrayBufferView(n.buffer,n.byteOffset+c.byteOffset,a),p+=c.byteLength);let g;if(l(u)){for(l(u.byteOffset)&&(u.componentType=u.componentType??Y.UNSIGNED_SHORT,u.type=Ft.SCALAR,r=vd(u),u=r.createArrayBufferView(n.buffer,n.byteOffset+u.byteOffset,a),p+=u.byteLength),g=new Uint16Array(a),d=0,i=0;i<a;++i)g[i]=d,d+=u[i];p+=g.byteLength}l(f)&&l(f.byteOffset)&&(f.componentType=f.componentType??Y.UNSIGNED_SHORT,f.type=Ft.SCALAR,r=vd(f),f=r.createArrayBufferView(n.buffer,n.byteOffset+f.byteOffset,d),p+=f.byteLength);let m=s.length;for(i=0;i<m;++i){let x=s[i].length,b=s[i].instances,C=qh.getBinaryProperties(x,b,n);p+=Dje(C),s[i].instances=wt(C,b)}let A=new Array(m).fill(0),y=new Uint16Array(a);for(i=0;i<a;++i)o=c[i],y[i]=A[o],++A[o];p+=y.byteLength,e._classes=s,e._classIds=c,e._classIndexes=y,e._parentCounts=u,e._parentIndexes=g,e._parentIds=f,e._byteLength=p}function Dje(e){let t=0;for(let n in e)e.hasOwnProperty(n)&&(t+=e[n].typedArray.byteLength);return t}var Pje=[],Rje=[],Oje=0;function Mje(e,t,n){let i=e._classIds,o=e._parentCounts,r=e._parentIds,a=e._parentIndexes,s=i.length,c=Pje;c.length=Math.max(c.length,s);let u=++Oje,f=Rje;for(f.length=0,f.push(t);f.length>0;){if(t=f.pop(),c[t]===u)continue;c[t]=u;let d=n(e,t);if(l(d))return d;let p=o[t],g=a[t];for(let m=0;m<p;++m){let A=r[g+m];A!==t&&f.push(A)}}}function Bje(e,t,n){let i=!0;for(;i;){let o=n(e,t);if(l(o))return o;let r=e._parentIds[t];i=r!==t,t=r}}function QO(e,t,n){let i=e._parentCounts,o=e._parentIds;if(l(o)){if(l(i))return Mje(e,t,n)}else return n(e,t);return Bje(e,t,n)}ng.prototype.hasProperty=function(e,t){let n=QO(this,e,function(i,o){let r=i._classIds[o],a=i._classes[r].instances;if(l(a[t]))return!0});return l(n)};ng.prototype.propertyExists=function(e){let t=this._classes,n=t.length;for(let i=0;i<n;++i){let o=t[i].instances;if(l(o[e]))return!0}return!1};ng.prototype.getPropertyIds=function(e,t){return t=l(t)?t:[],t.length=0,QO(this,e,function(n,i){let o=n._classIds[i],r=n._classes[o].instances;for(let a in r)r.hasOwnProperty(a)&&t.indexOf(a)===-1&&t.push(a)}),t};ng.prototype.getProperty=function(e,t){return QO(this,e,function(n,i){let o=n._classIds[i],r=n._classes[o],a=n._classIndexes[i],s=r.instances[t];if(l(s))return l(s.typedArray)?Lje(s,a):We(s[a],!0)})};function Lje(e,t){let n=e.typedArray,i=e.componentCount;return i===1?n[t]:e.type.unpack(n,t*i)}ng.prototype.setProperty=function(e,t,n){let i=QO(this,e,function(o,r){let a=o._classIds[r],s=o._classes[a],c=o._classIndexes[r],u=s.instances[t];if(l(u))return l(u.typedArray)?Nje(u,c,n):u[c]=We(n,!0),!0});return l(i)};function Nje(e,t,n){let i=e.typedArray,o=e.componentCount;o===1?i[t]=n:e.type.pack(n,i,t*o)}ng.prototype.isClass=function(e,t){let n=QO(this,e,function(i,o){let r=i._classIds[o];if(i._classes[r].name===t)return!0});return l(n)};ng.prototype.getClassName=function(e){let t=this._classIds[e];return this._classes[t].name};var ob=ng;var zfe={HIGHLIGHT:0,REPLACE:1,MIX:2};Object.freeze(zfe);var Iu=zfe;var nY=Yl.DEFAULT_COLOR_VALUE,iY=Yl.DEFAULT_SHOW_VALUE;function zo(e,t,n,i,o){this.featuresLength=t;let r;l(n)&&(r=n.extensions),this._extensions=r??{};let a=Fje(n);this._properties=a,this._batchTableHierarchy=kje(this,n,i);let s=Vfe(t,a,i);this._binaryPropertiesByteLength=zje(s),this._batchTableBinaryProperties=s,this._content=e,this._batchTexture=new Yl({featuresLength:t,colorChangedCallback:o,owner:e,statistics:e.tileset.statistics})}zo._deprecationWarning=Ms;Object.defineProperties(zo.prototype,{batchTableByteLength:{get:function(){let e=this._binaryPropertiesByteLength;return l(this._batchTableHierarchy)&&(e+=this._batchTableHierarchy.byteLength),e+=this._batchTexture.byteLength,e}}});function Fje(e){let t={};if(!l(e))return t;for(let n in e)e.hasOwnProperty(n)&&n!=="HIERARCHY"&&n!=="extensions"&&n!=="extras"&&(t[n]=We(e[n],!0));return t}function kje(e,t,n){if(!l(t))return;let i=e._extensions["3DTILES_batch_table_hierarchy"],o=t.HIERARCHY;if(l(o)&&(zo._deprecationWarning("batchTableHierarchyExtension","The batch table HIERARCHY property has been moved to an extension. Use extensions.3DTILES_batch_table_hierarchy instead."),e._extensions["3DTILES_batch_table_hierarchy"]=o,i=o),!!l(i))return new ob({extension:i,binaryBody:n})}function Vfe(e,t,n){let i;for(let o in t)if(t.hasOwnProperty(o)){let r=t[o],a=r.byteOffset;if(l(a)){let s=r.componentType,c=r.type;if(!l(s))throw new re("componentType is required.");if(!l(c))throw new re("type is required.");if(!l(n))throw new re(`Property ${o} requires a batch table binary.`);let u=vd(r),f=u.componentsPerAttribute,d=u.classType,p=u.createArrayBufferView(n.buffer,n.byteOffset+a,e);l(i)||(i={}),i[o]={typedArray:p,componentCount:f,type:d}}}return i}function zje(e){if(!l(e))return 0;let t=0;for(let n in e)e.hasOwnProperty(n)&&(t+=e[n].typedArray.byteLength);return t}zo.getBinaryProperties=function(e,t,n){return Vfe(e,t,n)};zo.prototype.setShow=function(e,t){this._batchTexture.setShow(e,t)};zo.prototype.setAllShow=function(e){this._batchTexture.setAllShow(e)};zo.prototype.getShow=function(e){return this._batchTexture.getShow(e)};zo.prototype.setColor=function(e,t){this._batchTexture.setColor(e,t)};zo.prototype.setAllColor=function(e){this._batchTexture.setAllColor(e)};zo.prototype.getColor=function(e,t){return this._batchTexture.getColor(e,t)};zo.prototype.getPickColor=function(e){return this._batchTexture.getPickColor(e)};var Uje=new V;zo.prototype.applyStyle=function(e){if(!l(e)){this.setAllColor(nY),this.setAllShow(iY);return}let t=this._content,n=this.featuresLength;for(let i=0;i<n;++i){let o=t.getFeature(i),r=l(e.color)?e.color.evaluateColor(o,Uje)??nY:nY,a=l(e.show)?e.show.evaluate(o)??iY:iY;this.setColor(i,r),this.setShow(i,a)}};function Vje(e,t){let n=e.typedArray,i=e.componentCount;return i===1?n[t]:e.type.unpack(n,t*i)}function jje(e,t,n){let i=e.typedArray,o=e.componentCount;o===1?i[t]=n:e.type.pack(n,i,t*o)}zo.prototype.isClass=function(e,t){let n=this._batchTableHierarchy;return l(n)?n.isClass(e,t):!1};zo.prototype.isExactClass=function(e,t){return this.getExactClassName(e)===t};zo.prototype.getExactClassName=function(e){let t=this._batchTableHierarchy;if(l(t))return t.getClassName(e)};zo.prototype.hasProperty=function(e,t){return l(this._properties[t])||l(this._batchTableHierarchy)&&this._batchTableHierarchy.hasProperty(e,t)};zo.prototype.hasPropertyBySemantic=function(){return!1};zo.prototype.getPropertyIds=function(e,t){t=l(t)?t:[],t.length=0;let n=Object.keys(this._properties);if(Qn(t,n),l(this._batchTableHierarchy)){let i=this._batchTableHierarchy.getPropertyIds(e,n);Qn(t,i)}return t};zo.prototype.getPropertyBySemantic=function(e,t){};zo.prototype.getProperty=function(e,t){if(l(this._batchTableBinaryProperties)){let i=this._batchTableBinaryProperties[t];if(l(i))return Vje(i,e)}let n=this._properties[t];if(l(n))return We(n[e],!0);if(l(this._batchTableHierarchy)){let i=this._batchTableHierarchy.getProperty(e,t);if(l(i))return i}};zo.prototype.setProperty=function(e,t,n){let i=this.featuresLength;if(l(this._batchTableBinaryProperties)){let r=this._batchTableBinaryProperties[t];if(l(r)){jje(r,e,n);return}}if(l(this._batchTableHierarchy)&&this._batchTableHierarchy.setProperty(e,t,n))return;let o=this._properties[t];l(o)||(this._properties[t]=new Array(i),o=this._properties[t]),o[e]=We(n,!0)};function Gje(e){return e._batchTexture.textureDimensions.y===1?`uniform vec4 tile_textureStep;
- vec2 computeSt(float batchId)
- {
- float stepX = tile_textureStep.x;
- float centerX = tile_textureStep.y;
- return vec2(centerX + (batchId * stepX), 0.5);
- }
- `:`uniform vec4 tile_textureStep;
- uniform vec2 tile_textureDimensions;
- vec2 computeSt(float batchId)
- {
- float stepX = tile_textureStep.x;
- float centerX = tile_textureStep.y;
- float stepY = tile_textureStep.z;
- float centerY = tile_textureStep.w;
- float xId = mod(batchId, tile_textureDimensions.x);
- float yId = floor(batchId / tile_textureDimensions.x);
- return vec2(centerX + (xId * stepX), centerY + (yId * stepY));
- }
- `}zo.prototype.getVertexShaderCallback=function(e,t,n){if(this.featuresLength===0)return;let i=this;return function(o){let r=jfe(o,n,!1),a;return Rt.maximumVertexTextureImageUnits>0?(a="",e&&(a+=`uniform bool tile_translucentCommand;
- `),a+=`uniform sampler2D tile_batchTexture;
- out vec4 tile_featureColor;
- out vec2 tile_featureSt;
- void main()
- {
- vec2 st = computeSt(${t});
- vec4 featureProperties = texture(tile_batchTexture, st);
- tile_color(featureProperties);
- float show = ceil(featureProperties.a);
- gl_Position *= show;
- `,e&&(a+=` bool isStyleTranslucent = (featureProperties.a != 1.0);
- if (czm_pass == czm_passTranslucent)
- {
- if (!isStyleTranslucent && !tile_translucentCommand)
- {
- gl_Position *= 0.0;
- }
- }
- else
- {
- if (isStyleTranslucent)
- {
- gl_Position *= 0.0;
- }
- }
- `),a+=` tile_featureColor = featureProperties;
- tile_featureSt = st;
- }`):a=`out vec2 tile_featureSt;
- void main()
- {
- tile_color(vec4(1.0));
- tile_featureSt = computeSt(${t});
- }`,`${r}
- ${Gje(i)}${a}`}};function Ufe(e,t){return e=He.replaceMain(e,"tile_main"),t?`${e}uniform float tile_colorBlend;
- void tile_color(vec4 tile_featureColor)
- {
- tile_main();
- tile_featureColor = czm_gammaCorrect(tile_featureColor);
- out_FragColor.a *= tile_featureColor.a;
- float highlight = ceil(tile_colorBlend);
- out_FragColor.rgb *= mix(tile_featureColor.rgb, vec3(1.0), highlight);
- }
- `:`${e}void tile_color(vec4 tile_featureColor)
- {
- tile_main();
- }
- `}function Hje(e,t){let n=`texture(${t}`,i=0,o=e.indexOf(n,i),r;for(;o>-1;){let a=0;for(let u=o;u<e.length;++u){let f=e.charAt(u);if(f==="(")++a;else if(f===")"&&(--a,a===0)){r=u+1;break}}let c=`tile_diffuse_final(${e.slice(o,r)}, tile_diffuse)`;e=e.slice(0,o)+c+e.slice(r),i=o+c.length,o=e.indexOf(n,i)}return e}function jfe(e,t,n){if(!l(t))return Ufe(e,n);let i=new RegExp(`(uniform|attribute|in)\\s+(vec[34]|sampler2D)\\s+${t};`),o=e.match(i);if(!l(o))return Ufe(e,n);let r=o[0],a=o[2];e=He.replaceMain(e,"tile_main"),e=e.replace(r,"");let s=`bool isWhite(vec3 color)
- {
- return all(greaterThan(color, vec3(1.0 - czm_epsilon3)));
- }
- vec4 tile_diffuse_final(vec4 sourceDiffuse, vec4 tileDiffuse)
- {
- vec4 blendDiffuse = mix(sourceDiffuse, tileDiffuse, tile_colorBlend);
- vec4 diffuse = isWhite(tileDiffuse.rgb) ? sourceDiffuse : blendDiffuse;
- return vec4(diffuse.rgb, sourceDiffuse.a);
- }
- `,c=` tile_featureColor = czm_gammaCorrect(tile_featureColor);
- out_FragColor.a *= tile_featureColor.a;
- float highlight = ceil(tile_colorBlend);
- out_FragColor.rgb *= mix(tile_featureColor.rgb, vec3(1.0), highlight);
- `,u;if(a==="vec3"||a==="vec4"){let f=a==="vec3"?`vec4(${t}, 1.0)`:t,d=a==="vec3"?"tile_diffuse.xyz":"tile_diffuse";i=new RegExp(t,"g"),e=e.replace(i,d),u=` vec4 source = ${f};
- tile_diffuse = tile_diffuse_final(source, tile_featureColor);
- tile_main();
- `}else a==="sampler2D"&&(e=Hje(e,t),u=` tile_diffuse = tile_featureColor;
- tile_main();
- `);return e=`uniform float tile_colorBlend;
- vec4 tile_diffuse = vec4(1.0);
- ${s}${r}
- ${e}
- void tile_color(vec4 tile_featureColor)
- {
- ${u}`,n&&(e+=c),e+=`}
- `,e}zo.prototype.getFragmentShaderCallback=function(e,t,n){if(this.featuresLength!==0)return function(i){return i=jfe(i,t,!0),Rt.maximumVertexTextureImageUnits>0?(i+=`uniform sampler2D tile_pickTexture;
- in vec2 tile_featureSt;
- in vec4 tile_featureColor;
- void main()
- {
- tile_color(tile_featureColor);
- `,n&&(i+=` out_FragColor.rgb *= out_FragColor.a;
- `),i+="}"):(e&&(i+=`uniform bool tile_translucentCommand;
- `),i+=`uniform sampler2D tile_pickTexture;
- uniform sampler2D tile_batchTexture;
- in vec2 tile_featureSt;
- void main()
- {
- vec4 featureProperties = texture(tile_batchTexture, tile_featureSt);
- if (featureProperties.a == 0.0) {
- discard;
- }
- `,e&&(i+=` bool isStyleTranslucent = (featureProperties.a != 1.0);
- if (czm_pass == czm_passTranslucent)
- {
- if (!isStyleTranslucent && !tile_translucentCommand)
- {
- discard;
- }
- }
- else
- {
- if (isStyleTranslucent)
- {
- discard;
- }
- }
- `),i+=` tile_color(featureProperties);
- `,n&&(i+=` out_FragColor.rgb *= out_FragColor.a;
- `),i+=`}
- `),i}};function Wje(e){let t=e._content.tileset,n=t.colorBlendMode,i=t.colorBlendAmount;if(n===Iu.HIGHLIGHT)return 0;if(n===Iu.REPLACE)return 1;if(n===Iu.MIX)return D.clamp(i,D.EPSILON4,1)}zo.prototype.getUniformMapCallback=function(){if(this.featuresLength===0)return;let e=this;return function(t){return wt(t,{tile_batchTexture:function(){return e._batchTexture.batchTexture??e._batchTexture.defaultTexture},tile_textureDimensions:function(){return e._batchTexture.textureDimensions},tile_textureStep:function(){return e._batchTexture.textureStep},tile_colorBlend:function(){return Wje(e)},tile_pickTexture:function(){return e._batchTexture.pickTexture}})}};zo.prototype.getPickId=function(){return"texture(tile_pickTexture, tile_featureSt)"};var pA={ALL_OPAQUE:0,ALL_TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2};zo.prototype.addDerivedCommands=function(e,t){let n=e.commandList,i=n.length,o=this._content._tile,r=o._finalResolution,a=o.tileset,s=a.isSkippingLevelOfDetail&&a.hasMixedContent&&e.context.stencilBuffer,c=qje(this);for(let u=t;u<i;++u){let f=n[u];if(f.pass===Ie.COMPUTE)continue;let d=f.derivedCommands.tileset;(!l(d)||f.dirty)&&(d={},f.derivedCommands.tileset=d,d.originalCommand=Yje(f),f.dirty=!1);let p=d.originalCommand;c!==pA.ALL_OPAQUE&&f.pass!==Ie.TRANSLUCENT&&(l(d.translucent)||(d.translucent=Xje(p))),c!==pA.ALL_TRANSLUCENT&&f.pass!==Ie.TRANSLUCENT&&(l(d.opaque)||(d.opaque=Kje(p)),s&&(r||(l(d.zback)||(d.zback=$je(e.context,p)),a._backfaceCommands.push(d.zback)),(!l(d.stencil)||o._selectionDepth!==Zje(d.stencil))&&(f.renderState.depthMask?d.stencil=Jje(p,o._selectionDepth):d.stencil=d.opaque)));let g=s?d.stencil:d.opaque,m=d.translucent;f.pass!==Ie.TRANSLUCENT?(c===pA.ALL_OPAQUE&&(n[u]=g),c===pA.ALL_TRANSLUCENT&&(n[u]=m),c===pA.OPAQUE_AND_TRANSLUCENT&&(n[u]=g,n.push(m))):n[u]=p}};function qje(e){let t=e._batchTexture.translucentFeaturesLength;return t===0?pA.ALL_OPAQUE:t===e.featuresLength?pA.ALL_TRANSLUCENT:pA.OPAQUE_AND_TRANSLUCENT}function Yje(e){let t=tt.shallowClone(e),n=t.pass===Ie.TRANSLUCENT;return t.uniformMap=l(t.uniformMap)?t.uniformMap:{},t.uniformMap.tile_translucentCommand=function(){return n},t}function Xje(e){let t=tt.shallowClone(e);return t.pass=Ie.TRANSLUCENT,t.renderState=eGe(e.renderState),t}function Kje(e){let t=tt.shallowClone(e);return t.renderState=tGe(e.renderState),t}function Qje(e,t){let n=e.shaderCache.getDerivedShaderProgram(t,"zBackfaceLogDepth");if(!l(n)){let i=t.fragmentShaderSource.clone();i.defines=l(i.defines)?i.defines.slice(0):[],i.defines.push("POLYGON_OFFSET"),n=e.shaderCache.createDerivedShaderProgram(t,"zBackfaceLogDepth",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:i,attributeLocations:t._attributeLocations})}return n}function $je(e,t){let n=tt.shallowClone(t),i=We(n.renderState,!0);i.cull.enabled=!0,i.cull.face=Mi.FRONT,i.colorMask={red:!1,green:!1,blue:!1,alpha:!1},i.polygonOffset={enabled:!0,factor:5,units:5},i.stencilTest=Gt.setCesium3DTileBit(),i.stencilMask=Gt.CESIUM_3D_TILE_MASK,n.renderState=Ve.fromCache(i),n.castShadows=!1,n.receiveShadows=!1,n.uniformMap=We(t.uniformMap);let o=new z(5,5);return n.uniformMap.u_polygonOffset=function(){return o},n.shaderProgram=Qje(e,t.shaderProgram),n}function Jje(e,t){let n=tt.shallowClone(e),i=We(n.renderState,!0);return i.stencilTest.enabled=!0,i.stencilTest.mask=Gt.SKIP_LOD_MASK,i.stencilTest.reference=Gt.CESIUM_3D_TILE_MASK|t<<Gt.SKIP_LOD_BIT_SHIFT,i.stencilTest.frontFunction=qn.GREATER_OR_EQUAL,i.stencilTest.frontOperation.zPass=vt.REPLACE,i.stencilTest.backFunction=qn.GREATER_OR_EQUAL,i.stencilTest.backOperation.zPass=vt.REPLACE,i.stencilMask=Gt.CESIUM_3D_TILE_MASK|Gt.SKIP_LOD_MASK,n.renderState=Ve.fromCache(i),n}function Zje(e){return(e.renderState.stencilTest.reference&Gt.SKIP_LOD_MASK)>>>Gt.SKIP_LOD_BIT_SHIFT}function eGe(e){let t=We(e,!0);return t.cull.enabled=!1,t.depthTest.enabled=!0,t.depthMask=!1,t.blending=Jt.ALPHA_BLEND,t.stencilTest=Gt.setCesium3DTileBit(),t.stencilMask=Gt.CESIUM_3D_TILE_MASK,Ve.fromCache(t)}function tGe(e){let t=We(e,!0);return t.stencilTest=Gt.setCesium3DTileBit(),t.stencilMask=Gt.CESIUM_3D_TILE_MASK,Ve.fromCache(t)}zo.prototype.update=function(e,t){this._batchTexture.update(e,t)};zo.prototype.isDestroyed=function(){return!1};zo.prototype.destroy=function(){return this._batchTexture=this._batchTexture&&this._batchTexture.destroy(),fe(this)};var qh=zo;function nGe(e){this.offset=e.offset,this.count=e.count,this.color=e.color,this.batchIds=e.batchIds}var Ap=nGe;var $E=`in vec3 position;
- in float a_batchId;
-
- uniform mat4 u_modifiedModelViewProjection;
-
- void main()
- {
- gl_Position = czm_depthClamp(u_modifiedModelViewProjection * vec4(position, 1.0));
- }
- `;var oY=class e{constructor(t,n){this._content=t,this._batchId=n,this._color=void 0}get show(){return this._content.batchTable.getShow(this._batchId)}set show(t){this._content.batchTable.setShow(this._batchId,t)}get color(){return l(this._color)||(this._color=new V),this._content.batchTable.getColor(this._batchId,this._color)}set color(t){this._content.batchTable.setColor(this._batchId,t)}get polylinePositions(){if(l(this._content.getPolylinePositions))return this._content.getPolylinePositions(this._batchId)}get content(){return this._content}get tileset(){return this._content.tileset}get primitive(){return this._content.tileset}get featureId(){return this._batchId}get pickId(){return this._content.batchTable.getPickColor(this._batchId)}hasProperty(t){return this._content.batchTable.hasProperty(this._batchId,t)}getPropertyIds(t){return this._content.batchTable.getPropertyIds(this._batchId,t)}getProperty(t){return this._content.batchTable.getProperty(this._batchId,t)}static getPropertyInherited(t,n,i,o=t.batchTable){if(l(o)){if(o.hasPropertyBySemantic(n,i))return o.getPropertyBySemantic(n,i);if(o.hasProperty(n,i))return o.getProperty(n,i)}let r=t.metadata;if(l(r)){if(r.hasPropertyBySemantic(i))return r.getPropertyBySemantic(i);if(r.hasProperty(i))return r.getProperty(i)}let a=t.tile,s=a.metadata;if(l(s)){if(s.hasPropertyBySemantic(i))return s.getPropertyBySemantic(i);if(s.hasProperty(i))return s.getProperty(i)}let c;if(l(a.implicitSubtree)&&(c=a.implicitSubtree.metadata),l(c)){if(c.hasPropertyBySemantic(i))return c.getPropertyBySemantic(i);if(c.hasProperty(i))return c.getProperty(i)}let u=l(t.group)?t.group.metadata:void 0;if(l(u)){if(u.hasPropertyBySemantic(i))return u.getPropertyBySemantic(i);if(u.hasProperty(i))return u.getProperty(i)}let f=t.tileset.metadata;if(l(f)){if(f.hasPropertyBySemantic(i))return f.getPropertyBySemantic(i);if(f.hasProperty(i))return f.getProperty(i)}}getPropertyInherited(t){return e.getPropertyInherited(this._content,this._batchId,t)}setProperty(t,n){this._content.batchTable.setProperty(this._batchId,t,n),this._content.featurePropertiesDirty=!0}isExactClass(t){return this._content.batchTable.isExactClass(this._batchId,t)}isClass(t){return this._content.batchTable.isClass(this._batchId,t)}getExactClassName(){return this._content.batchTable.getExactClassName(this._batchId)}},Qa=oY;var rY=class{add(t,n,i){if(typeof arguments[0]!="string")for(let o in arguments[0])this.add(o,arguments[0][o],arguments[1]);else(Array.isArray(t)?t:[t]).forEach(function(o){this[o]=this[o]||[],n&&this[o][i?"unshift":"push"](n)},this)}run(t,n){this[t]=this[t]||[],this[t].forEach(function(i){i.call(n&&n.context?n.context:n,n)})}},aY=class{constructor(t){this.jsep=t,this.registered={}}register(...t){t.forEach(n=>{if(typeof n!="object"||!n.name||!n.init)throw new Error("Invalid JSEP plugin format");this.registered[n.name]||(n.init(this.jsep),this.registered[n.name]=n)})}},Du=class e{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+e.version}static addUnaryOp(t){return e.max_unop_len=Math.max(t.length,e.max_unop_len),e.unary_ops[t]=1,e}static addBinaryOp(t,n,i){return e.max_binop_len=Math.max(t.length,e.max_binop_len),e.binary_ops[t]=n,i?e.right_associative.add(t):e.right_associative.delete(t),e}static addIdentifierChar(t){return e.additional_identifier_chars.add(t),e}static addLiteral(t,n){return e.literals[t]=n,e}static removeUnaryOp(t){return delete e.unary_ops[t],t.length===e.max_unop_len&&(e.max_unop_len=e.getMaxKeyLen(e.unary_ops)),e}static removeAllUnaryOps(){return e.unary_ops={},e.max_unop_len=0,e}static removeIdentifierChar(t){return e.additional_identifier_chars.delete(t),e}static removeBinaryOp(t){return delete e.binary_ops[t],t.length===e.max_binop_len&&(e.max_binop_len=e.getMaxKeyLen(e.binary_ops)),e.right_associative.delete(t),e}static removeAllBinaryOps(){return e.binary_ops={},e.max_binop_len=0,e}static removeLiteral(t){return delete e.literals[t],e}static removeAllLiterals(){return e.literals={},e}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(t){this.expr=t,this.index=0}static parse(t){return new e(t).parse()}static getMaxKeyLen(t){return Math.max(0,...Object.keys(t).map(n=>n.length))}static isDecimalDigit(t){return t>=48&&t<=57}static binaryPrecedence(t){return e.binary_ops[t]||0}static isIdentifierStart(t){return t>=65&&t<=90||t>=97&&t<=122||t>=128&&!e.binary_ops[String.fromCharCode(t)]||e.additional_identifier_chars.has(String.fromCharCode(t))}static isIdentifierPart(t){return e.isIdentifierStart(t)||e.isDecimalDigit(t)}throwError(t){let n=new Error(t+" at character "+this.index);throw n.index=this.index,n.description=t,n}runHook(t,n){if(e.hooks[t]){let i={context:this,node:n};return e.hooks.run(t,i),i.node}return n}searchHook(t){if(e.hooks[t]){let n={context:this};return e.hooks[t].find(function(i){return i.call(n.context,n),n.node}),n.node}}gobbleSpaces(){let t=this.code;for(;t===e.SPACE_CODE||t===e.TAB_CODE||t===e.LF_CODE||t===e.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");let t=this.gobbleExpressions(),n=t.length===1?t[0]:{type:e.COMPOUND,body:t};return this.runHook("after-all",n)}gobbleExpressions(t){let n=[],i,o;for(;this.index<this.expr.length;)if(i=this.code,i===e.SEMCOL_CODE||i===e.COMMA_CODE)this.index++;else if(o=this.gobbleExpression())n.push(o);else if(this.index<this.expr.length){if(i===t)break;this.throwError('Unexpected "'+this.char+'"')}return n}gobbleExpression(){let t=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",t)}gobbleBinaryOp(){this.gobbleSpaces();let t=this.expr.substr(this.index,e.max_binop_len),n=t.length;for(;n>0;){if(e.binary_ops.hasOwnProperty(t)&&(!e.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!e.isIdentifierPart(this.expr.charCodeAt(this.index+t.length))))return this.index+=n,t;t=t.substr(0,--n)}return!1}gobbleBinaryExpression(){let t,n,i,o,r,a,s,c,u;if(a=this.gobbleToken(),!a||(n=this.gobbleBinaryOp(),!n))return a;for(r={value:n,prec:e.binaryPrecedence(n),right_a:e.right_associative.has(n)},s=this.gobbleToken(),s||this.throwError("Expected expression after "+n),o=[a,r,s];n=this.gobbleBinaryOp();){if(i=e.binaryPrecedence(n),i===0){this.index-=n.length;break}r={value:n,prec:i,right_a:e.right_associative.has(n)},u=n;let f=d=>r.right_a&&d.right_a?i>d.prec:i<=d.prec;for(;o.length>2&&f(o[o.length-2]);)s=o.pop(),n=o.pop().value,a=o.pop(),t={type:e.BINARY_EXP,operator:n,left:a,right:s},o.push(t);t=this.gobbleToken(),t||this.throwError("Expected expression after "+u),o.push(r,t)}for(c=o.length-1,t=o[c];c>1;)t={type:e.BINARY_EXP,operator:o[c-1].value,left:o[c-2],right:t},c-=2;return t}gobbleToken(){let t,n,i,o;if(this.gobbleSpaces(),o=this.searchHook("gobble-token"),o)return this.runHook("after-token",o);if(t=this.code,e.isDecimalDigit(t)||t===e.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===e.SQUOTE_CODE||t===e.DQUOTE_CODE)o=this.gobbleStringLiteral();else if(t===e.OBRACK_CODE)o=this.gobbleArray();else{for(n=this.expr.substr(this.index,e.max_unop_len),i=n.length;i>0;){if(e.unary_ops.hasOwnProperty(n)&&(!e.isIdentifierStart(this.code)||this.index+n.length<this.expr.length&&!e.isIdentifierPart(this.expr.charCodeAt(this.index+n.length)))){this.index+=i;let r=this.gobbleToken();return r||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:e.UNARY_EXP,operator:n,argument:r,prefix:!0})}n=n.substr(0,--i)}e.isIdentifierStart(t)?(o=this.gobbleIdentifier(),e.literals.hasOwnProperty(o.name)?o={type:e.LITERAL,value:e.literals[o.name],raw:o.name}:o.name===e.this_str&&(o={type:e.THIS_EXP})):t===e.OPAREN_CODE&&(o=this.gobbleGroup())}return o?(o=this.gobbleTokenProperty(o),this.runHook("after-token",o)):this.runHook("after-token",!1)}gobbleTokenProperty(t){this.gobbleSpaces();let n=this.code;for(;n===e.PERIOD_CODE||n===e.OBRACK_CODE||n===e.OPAREN_CODE||n===e.QUMARK_CODE;){let i;if(n===e.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==e.PERIOD_CODE)break;i=!0,this.index+=2,this.gobbleSpaces(),n=this.code}this.index++,n===e.OBRACK_CODE?(t={type:e.MEMBER_EXP,computed:!0,object:t,property:this.gobbleExpression()},t.property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),n=this.code,n!==e.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):n===e.OPAREN_CODE?t={type:e.CALL_EXP,arguments:this.gobbleArguments(e.CPAREN_CODE),callee:t}:(n===e.PERIOD_CODE||i)&&(i&&this.index--,this.gobbleSpaces(),t={type:e.MEMBER_EXP,computed:!1,object:t,property:this.gobbleIdentifier()}),i&&(t.optional=!0),this.gobbleSpaces(),n=this.code}return t}gobbleNumericLiteral(){let t="",n,i;for(;e.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(this.code===e.PERIOD_CODE)for(t+=this.expr.charAt(this.index++);e.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(n=this.char,n==="e"||n==="E"){for(t+=this.expr.charAt(this.index++),n=this.char,(n==="+"||n==="-")&&(t+=this.expr.charAt(this.index++));e.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+t+this.char+")")}return i=this.code,e.isIdentifierStart(i)?this.throwError("Variable names cannot start with a number ("+t+this.char+")"):(i===e.PERIOD_CODE||t.length===1&&t.charCodeAt(0)===e.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:e.LITERAL,value:parseFloat(t),raw:t}}gobbleStringLiteral(){let t="",n=this.index,i=this.expr.charAt(this.index++),o=!1;for(;this.index<this.expr.length;){let r=this.expr.charAt(this.index++);if(r===i){o=!0;break}else if(r==="\\")switch(r=this.expr.charAt(this.index++),r){case"n":t+=`
- `;break;case"r":t+="\r";break;case"t":t+=" ";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:t+=r}else t+=r}return o||this.throwError('Unclosed quote after "'+t+'"'),{type:e.LITERAL,value:t,raw:this.expr.substring(n,this.index)}}gobbleIdentifier(){let t=this.code,n=this.index;for(e.isIdentifierStart(t)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length&&(t=this.code,e.isIdentifierPart(t));)this.index++;return{type:e.IDENTIFIER,name:this.expr.slice(n,this.index)}}gobbleArguments(t){let n=[],i=!1,o=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let r=this.code;if(r===t){i=!0,this.index++,t===e.CPAREN_CODE&&o&&o>=n.length&&this.throwError("Unexpected token "+String.fromCharCode(t));break}else if(r===e.COMMA_CODE){if(this.index++,o++,o!==n.length){if(t===e.CPAREN_CODE)this.throwError("Unexpected token ,");else if(t===e.CBRACK_CODE)for(let a=n.length;a<o;a++)n.push(null)}}else if(n.length!==o&&o!==0)this.throwError("Expected comma");else{let a=this.gobbleExpression();(!a||a.type===e.COMPOUND)&&this.throwError("Expected comma"),n.push(a)}}return i||this.throwError("Expected "+String.fromCharCode(t)),n}gobbleGroup(){this.index++;let t=this.gobbleExpressions(e.CPAREN_CODE);if(this.code===e.CPAREN_CODE)return this.index++,t.length===1?t[0]:t.length?{type:e.SEQUENCE_EXP,expressions:t}:!1;this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:e.ARRAY_EXP,elements:this.gobbleArguments(e.CBRACK_CODE)}}},iGe=new rY;Object.assign(Du,{hooks:iGe,plugins:new aY(Du),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set(["**"]),additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"});Du.max_unop_len=Du.getMaxKeyLen(Du.unary_ops);Du.max_binop_len=Du.getMaxKeyLen(Du.binary_ops);var gA=e=>new Du(e).parse(),oGe=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(Du).filter(e=>!oGe.includes(e)&&gA[e]===void 0).forEach(e=>{gA[e]=Du[e]});gA.Jsep=Du;var rGe="ConditionalExpression",aGe={name:"ternary",init(e){e.hooks.add("after-expression",function(n){if(n.node&&this.code===e.QUMARK_CODE){this.index++;let i=n.node,o=this.gobbleExpression();if(o||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let r=this.gobbleExpression();if(r||this.throwError("Expected expression"),n.node={type:rGe,test:i,consequent:o,alternate:r},i.operator&&e.binary_ops[i.operator]<=.9){let a=i;for(;a.right.operator&&e.binary_ops[a.right.operator]<=.9;)a=a.right;n.node.test=a.right,a.right=n.node,n.node=i}}else this.throwError("Expected :")}})}};gA.plugins.register(aGe);var Gfe={VARIABLE:0,UNARY:1,BINARY:2,TERNARY:3,CONDITIONAL:4,MEMBER:5,FUNCTION_CALL:6,ARRAY:7,REGEX:8,VARIABLE_IN_STRING:9,LITERAL_NULL:10,LITERAL_BOOLEAN:11,LITERAL_NUMBER:12,LITERAL_STRING:13,LITERAL_COLOR:14,LITERAL_VECTOR:15,LITERAL_REGEX:16,LITERAL_UNDEFINED:17,BUILTIN_VARIABLE:18};Object.freeze(Gfe);var St=Gfe;function Yh(e,t){this._expression=e,e=yGe(e,t),e=bGe(xGe(e)),gA.addBinaryOp("=~",0),gA.addBinaryOp("!~",0);let n;try{n=gA(e)}catch(i){throw new re(i)}this._runtimeAst=Ui(this,n)}Object.defineProperties(Yh.prototype,{expression:{get:function(){return this._expression}}});var Bn={arrayIndex:0,arrayArray:[[]],cartesian2Index:0,cartesian3Index:0,cartesian4Index:0,cartesian2Array:[new z],cartesian3Array:[new h],cartesian4Array:[new se],reset:function(){this.arrayIndex=0,this.cartesian2Index=0,this.cartesian3Index=0,this.cartesian4Index=0},getArray:function(){this.arrayIndex>=this.arrayArray.length&&this.arrayArray.push([]);let e=this.arrayArray[this.arrayIndex++];return e.length=0,e},getCartesian2:function(){return this.cartesian2Index>=this.cartesian2Array.length&&this.cartesian2Array.push(new z),this.cartesian2Array[this.cartesian2Index++]},getCartesian3:function(){return this.cartesian3Index>=this.cartesian3Array.length&&this.cartesian3Array.push(new h),this.cartesian3Array[this.cartesian3Index++]},getCartesian4:function(){return this.cartesian4Index>=this.cartesian4Array.length&&this.cartesian4Array.push(new se),this.cartesian4Array[this.cartesian4Index++]}};Yh.prototype.evaluate=function(e,t){Bn.reset();let n=this._runtimeAst.evaluate(e);return t instanceof V&&n instanceof se?V.fromCartesian4(n,t):n instanceof z||n instanceof h||n instanceof se?n.clone(t):n};Yh.prototype.evaluateColor=function(e,t){Bn.reset();let n=this._runtimeAst.evaluate(e);return V.fromCartesian4(n,t)};Yh.prototype.getShaderFunction=function(e,t,n,i){let o=this.getShaderExpression(t,n);return o=`${i} ${e}
- {
- return ${o};
- }
- `,o};Yh.prototype.getShaderExpression=function(e,t){return this._runtimeAst.getShaderExpression(e,t)};Yh.prototype.getVariables=function(){let e=[];return this._runtimeAst.getVariables(e),e=e.filter(function(t,n,i){return i.indexOf(t)===n}),e};var sGe=["!","-","+"],Hfe=["+","-","*","/","%","===","!==",">",">=","<","<=","&&","||","!~","=~"],$O=/\${(.*?)}/g,cGe=/\\/g,lGe="@#%",uGe=/@#%/g,X8=new V,K8={abs:Bs(Math.abs),sqrt:Bs(Math.sqrt),cos:Bs(Math.cos),sin:Bs(Math.sin),tan:Bs(Math.tan),acos:Bs(Math.acos),asin:Bs(Math.asin),atan:Bs(Math.atan),radians:Bs(D.toRadians),degrees:Bs(D.toDegrees),sign:Bs(D.sign),floor:Bs(Math.floor),ceil:Bs(Math.ceil),round:Bs(Math.round),exp:Bs(Math.exp),exp2:Bs(dGe),log:Bs(Math.log),log2:Bs(hGe),fract:Bs(fGe),length:mGe,normalize:pGe},Q8={atan2:q8(Math.atan2,!1),pow:q8(Math.pow,!1),min:q8(Math.min,!0),max:q8(Math.max,!0),distance:gGe,dot:_Ge,cross:AGe},lY={clamp:Wfe(D.clamp,!0),mix:Wfe(D.lerp,!0)};function fGe(e){return e-Math.floor(e)}function dGe(e){return Math.pow(2,e)}function hGe(e){return D.log2(e)}function Bs(e){return function(t,n){if(typeof n=="number")return e(n);if(n instanceof z)return z.fromElements(e(n.x),e(n.y),Bn.getCartesian2());if(n instanceof h)return h.fromElements(e(n.x),e(n.y),e(n.z),Bn.getCartesian3());if(n instanceof se)return se.fromElements(e(n.x),e(n.y),e(n.z),e(n.w),Bn.getCartesian4());throw new re(`Function "${t}" requires a vector or number argument. Argument is ${n}.`)}}function q8(e,t){return function(n,i,o){if(t&&typeof o=="number"){if(typeof i=="number")return e(i,o);if(i instanceof z)return z.fromElements(e(i.x,o),e(i.y,o),Bn.getCartesian2());if(i instanceof h)return h.fromElements(e(i.x,o),e(i.y,o),e(i.z,o),Bn.getCartesian3());if(i instanceof se)return se.fromElements(e(i.x,o),e(i.y,o),e(i.z,o),e(i.w,o),Bn.getCartesian4())}if(typeof i=="number"&&typeof o=="number")return e(i,o);if(i instanceof z&&o instanceof z)return z.fromElements(e(i.x,o.x),e(i.y,o.y),Bn.getCartesian2());if(i instanceof h&&o instanceof h)return h.fromElements(e(i.x,o.x),e(i.y,o.y),e(i.z,o.z),Bn.getCartesian3());if(i instanceof se&&o instanceof se)return se.fromElements(e(i.x,o.x),e(i.y,o.y),e(i.z,o.z),e(i.w,o.w),Bn.getCartesian4());throw new re(`Function "${n}" requires vector or number arguments of matching types. Arguments are ${i} and ${o}.`)}}function Wfe(e,t){return function(n,i,o,r){if(t&&typeof r=="number"){if(typeof i=="number"&&typeof o=="number")return e(i,o,r);if(i instanceof z&&o instanceof z)return z.fromElements(e(i.x,o.x,r),e(i.y,o.y,r),Bn.getCartesian2());if(i instanceof h&&o instanceof h)return h.fromElements(e(i.x,o.x,r),e(i.y,o.y,r),e(i.z,o.z,r),Bn.getCartesian3());if(i instanceof se&&o instanceof se)return se.fromElements(e(i.x,o.x,r),e(i.y,o.y,r),e(i.z,o.z,r),e(i.w,o.w,r),Bn.getCartesian4())}if(typeof i=="number"&&typeof o=="number"&&typeof r=="number")return e(i,o,r);if(i instanceof z&&o instanceof z&&r instanceof z)return z.fromElements(e(i.x,o.x,r.x),e(i.y,o.y,r.y),Bn.getCartesian2());if(i instanceof h&&o instanceof h&&r instanceof h)return h.fromElements(e(i.x,o.x,r.x),e(i.y,o.y,r.y),e(i.z,o.z,r.z),Bn.getCartesian3());if(i instanceof se&&o instanceof se&&r instanceof se)return se.fromElements(e(i.x,o.x,r.x),e(i.y,o.y,r.y),e(i.z,o.z,r.z),e(i.w,o.w,r.w),Bn.getCartesian4());throw new re(`Function "${n}" requires vector or number arguments of matching types. Arguments are ${i}, ${o}, and ${r}.`)}}function mGe(e,t){if(typeof t=="number")return Math.abs(t);if(t instanceof z)return z.magnitude(t);if(t instanceof h)return h.magnitude(t);if(t instanceof se)return se.magnitude(t);throw new re(`Function "${e}" requires a vector or number argument. Argument is ${t}.`)}function pGe(e,t){if(typeof t=="number")return 1;if(t instanceof z)return z.normalize(t,Bn.getCartesian2());if(t instanceof h)return h.normalize(t,Bn.getCartesian3());if(t instanceof se)return se.normalize(t,Bn.getCartesian4());throw new re(`Function "${e}" requires a vector or number argument. Argument is ${t}.`)}function gGe(e,t,n){if(typeof t=="number"&&typeof n=="number")return Math.abs(t-n);if(t instanceof z&&n instanceof z)return z.distance(t,n);if(t instanceof h&&n instanceof h)return h.distance(t,n);if(t instanceof se&&n instanceof se)return se.distance(t,n);throw new re(`Function "${e}" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)}function _Ge(e,t,n){if(typeof t=="number"&&typeof n=="number")return t*n;if(t instanceof z&&n instanceof z)return z.dot(t,n);if(t instanceof h&&n instanceof h)return h.dot(t,n);if(t instanceof se&&n instanceof se)return se.dot(t,n);throw new re(`Function "${e}" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)}function AGe(e,t,n){if(t instanceof h&&n instanceof h)return h.cross(t,n,Bn.getCartesian3());throw new re(`Function "${e}" requires vec3 arguments. Arguments are ${t} and ${n}.`)}function Mt(e,t,n,i,o){this._type=e,this._value=t,this._left=n,this._right=i,this._test=o,this.evaluate=void 0,RGe(this)}function yGe(e,t){if(!l(t))return e;for(let n in t)if(t.hasOwnProperty(n)){let i=new RegExp(`\\$\\{${n}\\}`,"g"),o=`(${t[n]})`;l(o)&&(e=e.replace(i,o))}return e}function xGe(e){return e.replace(cGe,lGe)}function cY(e){return e.replace(uGe,"\\")}function bGe(e){let t=e,n="",i=t.indexOf("${");for(;i>=0;){let o=t.indexOf("'"),r=t.indexOf('"'),a;if(o>=0&&o<i)a=t.indexOf("'",o+1),n+=t.substr(0,a+1),t=t.substr(a+1),i=t.indexOf("${");else if(r>=0&&r<i)a=t.indexOf('"',r+1),n+=t.substr(0,a+1),t=t.substr(a+1),i=t.indexOf("${");else{n+=t.substr(0,i);let s=t.indexOf("}");if(s<0)throw new re("Unmatched {.");n+=`czm_${t.substr(i+2,s-(i+2))}`,t=t.substr(s+1),i=t.indexOf("${")}}return n+=t,n}function CGe(e){let t=typeof e.value;if(e.value===null)return new Mt(St.LITERAL_NULL,null);if(t==="boolean")return new Mt(St.LITERAL_BOOLEAN,e.value);if(t==="number")return new Mt(St.LITERAL_NUMBER,e.value);if(t==="string")return e.value.indexOf("${")>=0?new Mt(St.VARIABLE_IN_STRING,e.value):new Mt(St.LITERAL_STRING,cY(e.value))}function TGe(e,t){let n=t.arguments,i=n.length,o,r,a,s;if(t.callee.type==="MemberExpression"){o=t.callee.property.name;let c=t.callee.object;if(o==="test"||o==="exec"){if(!l(c.callee)||c.callee.name!=="regExp")throw new re(`${o} is not a function.`);return i===0?o==="test"?new Mt(St.LITERAL_BOOLEAN,!1):new Mt(St.LITERAL_NULL,null):(a=Ui(e,c),s=Ui(e,n[0]),new Mt(St.FUNCTION_CALL,o,a,s))}else if(o==="toString")return r=Ui(e,c),new Mt(St.FUNCTION_CALL,o,r);throw new re(`Unexpected function call "${o}".`)}if(o=t.callee.name,o==="color"){if(i===0)return new Mt(St.LITERAL_COLOR,o);if(r=Ui(e,n[0]),l(n[1])){let c=Ui(e,n[1]);return new Mt(St.LITERAL_COLOR,o,[r,c])}return new Mt(St.LITERAL_COLOR,o,[r])}else if(o==="rgb"||o==="hsl"){if(i<3)throw new re(`${o} requires three arguments.`);return r=[Ui(e,n[0]),Ui(e,n[1]),Ui(e,n[2])],new Mt(St.LITERAL_COLOR,o,r)}else if(o==="rgba"||o==="hsla"){if(i<4)throw new re(`${o} requires four arguments.`);return r=[Ui(e,n[0]),Ui(e,n[1]),Ui(e,n[2]),Ui(e,n[3])],new Mt(St.LITERAL_COLOR,o,r)}else if(o==="vec2"||o==="vec3"||o==="vec4"){r=new Array(i);for(let c=0;c<i;++c)r[c]=Ui(e,n[c]);return new Mt(St.LITERAL_VECTOR,o,r)}else{if(o==="isNaN"||o==="isFinite")return i===0?o==="isNaN"?new Mt(St.LITERAL_BOOLEAN,!0):new Mt(St.LITERAL_BOOLEAN,!1):(r=Ui(e,n[0]),new Mt(St.UNARY,o,r));if(o==="isExactClass"||o==="isClass"){if(i<1||i>1)throw new re(`${o} requires exactly one argument.`);return r=Ui(e,n[0]),new Mt(St.UNARY,o,r)}else if(o==="getExactClassName"){if(i>0)throw new re(`${o} does not take any argument.`);return new Mt(St.UNARY,o)}else if(l(K8[o])){if(i!==1)throw new re(`${o} requires exactly one argument.`);return r=Ui(e,n[0]),new Mt(St.UNARY,o,r)}else if(l(Q8[o])){if(i!==2)throw new re(`${o} requires exactly two arguments.`);return a=Ui(e,n[0]),s=Ui(e,n[1]),new Mt(St.BINARY,o,a,s)}else if(l(lY[o])){if(i!==3)throw new re(`${o} requires exactly three arguments.`);a=Ui(e,n[0]),s=Ui(e,n[1]);let c=Ui(e,n[2]);return new Mt(St.TERNARY,o,a,s,c)}else{if(o==="Boolean")return i===0?new Mt(St.LITERAL_BOOLEAN,!1):(r=Ui(e,n[0]),new Mt(St.UNARY,o,r));if(o==="Number")return i===0?new Mt(St.LITERAL_NUMBER,0):(r=Ui(e,n[0]),new Mt(St.UNARY,o,r));if(o==="String")return i===0?new Mt(St.LITERAL_STRING,""):(r=Ui(e,n[0]),new Mt(St.UNARY,o,r));if(o==="regExp")return EGe(e,t)}}throw new re(`Unexpected function call "${o}".`)}function EGe(e,t){let n=t.arguments;if(n.length===0)return new Mt(St.LITERAL_REGEX,new RegExp);let i=Ui(e,n[0]),o;if(n.length>1){let r=Ui(e,n[1]);if(sY(i)&&sY(r)){try{o=new RegExp(cY(String(i._value)),r._value)}catch(a){throw new re(a)}return new Mt(St.LITERAL_REGEX,o)}return new Mt(St.REGEX,i,r)}if(sY(i)){try{o=new RegExp(cY(String(i._value)))}catch(r){throw new re(r)}return new Mt(St.LITERAL_REGEX,o)}return new Mt(St.REGEX,i)}function vGe(e){if(DGe(e.name)){let t=PGe(e.name);return t.substr(0,8)==="tiles3d_"?new Mt(St.BUILTIN_VARIABLE,t):new Mt(St.VARIABLE,t)}else{if(e.name==="NaN")return new Mt(St.LITERAL_NUMBER,NaN);if(e.name==="Infinity")return new Mt(St.LITERAL_NUMBER,1/0);if(e.name==="undefined")return new Mt(St.LITERAL_UNDEFINED,void 0)}throw new re(`${e.name} is not defined.`)}function SGe(e){let t=e.property.name;if(t==="PI")return new Mt(St.LITERAL_NUMBER,Math.PI);if(t==="E")return new Mt(St.LITERAL_NUMBER,Math.E)}function wGe(e){if(e.property.name==="POSITIVE_INFINITY")return new Mt(St.LITERAL_NUMBER,Number.POSITIVE_INFINITY)}function IGe(e,t){if(t.object.name==="Math")return SGe(t);if(t.object.name==="Number")return wGe(t);let n,i=Ui(e,t.object);return t.computed?(n=Ui(e,t.property),new Mt(St.MEMBER,"brackets",i,n)):(n=new Mt(St.LITERAL_STRING,t.property.name),new Mt(St.MEMBER,"dot",i,n))}function sY(e){return e._type>=St.LITERAL_NULL}function DGe(e){return e.substr(0,4)==="czm_"}function PGe(e){return e.substr(4)}function Ui(e,t){let n,i,o,r;if(t.type==="Literal")n=CGe(t);else if(t.type==="CallExpression")n=TGe(e,t);else if(t.type==="Identifier")n=vGe(t);else if(t.type==="UnaryExpression"){i=t.operator;let a=Ui(e,t.argument);if(sGe.indexOf(i)>-1)n=new Mt(St.UNARY,i,a);else throw new re(`Unexpected operator "${i}".`)}else if(t.type==="BinaryExpression")if(i=t.operator,o=Ui(e,t.left),r=Ui(e,t.right),Hfe.indexOf(i)>-1)n=new Mt(St.BINARY,i,o,r);else throw new re(`Unexpected operator "${i}".`);else if(t.type==="LogicalExpression")i=t.operator,o=Ui(e,t.left),r=Ui(e,t.right),Hfe.indexOf(i)>-1&&(n=new Mt(St.BINARY,i,o,r));else if(t.type==="ConditionalExpression"){let a=Ui(e,t.test);o=Ui(e,t.consequent),r=Ui(e,t.alternate),n=new Mt(St.CONDITIONAL,"?",o,r,a)}else if(t.type==="MemberExpression")n=IGe(e,t);else if(t.type==="ArrayExpression"){let a=[];for(let s=0;s<t.elements.length;s++)a[s]=Ui(e,t.elements[s]);n=new Mt(St.ARRAY,a)}else throw t.type==="Compound"?new re("Provide exactly one expression."):new re("Cannot parse expression.");return n}function RGe(e){e._type===St.CONDITIONAL?e.evaluate=e._evaluateConditional:e._type===St.FUNCTION_CALL?e._value==="test"?e.evaluate=e._evaluateRegExpTest:e._value==="exec"?e.evaluate=e._evaluateRegExpExec:e._value==="toString"&&(e.evaluate=e._evaluateToString):e._type===St.UNARY?e._value==="!"?e.evaluate=e._evaluateNot:e._value==="-"?e.evaluate=e._evaluateNegative:e._value==="+"?e.evaluate=e._evaluatePositive:e._value==="isNaN"?e.evaluate=e._evaluateNaN:e._value==="isFinite"?e.evaluate=e._evaluateIsFinite:e._value==="isExactClass"?e.evaluate=e._evaluateIsExactClass:e._value==="isClass"?e.evaluate=e._evaluateIsClass:e._value==="getExactClassName"?e.evaluate=e._evaluateGetExactClassName:e._value==="Boolean"?e.evaluate=e._evaluateBooleanConversion:e._value==="Number"?e.evaluate=e._evaluateNumberConversion:e._value==="String"?e.evaluate=e._evaluateStringConversion:l(K8[e._value])&&(e.evaluate=MGe(e._value)):e._type===St.BINARY?e._value==="+"?e.evaluate=e._evaluatePlus:e._value==="-"?e.evaluate=e._evaluateMinus:e._value==="*"?e.evaluate=e._evaluateTimes:e._value==="/"?e.evaluate=e._evaluateDivide:e._value==="%"?e.evaluate=e._evaluateMod:e._value==="==="?e.evaluate=e._evaluateEqualsStrict:e._value==="!=="?e.evaluate=e._evaluateNotEqualsStrict:e._value==="<"?e.evaluate=e._evaluateLessThan:e._value==="<="?e.evaluate=e._evaluateLessThanOrEquals:e._value===">"?e.evaluate=e._evaluateGreaterThan:e._value===">="?e.evaluate=e._evaluateGreaterThanOrEquals:e._value==="&&"?e.evaluate=e._evaluateAnd:e._value==="||"?e.evaluate=e._evaluateOr:e._value==="=~"?e.evaluate=e._evaluateRegExpMatch:e._value==="!~"?e.evaluate=e._evaluateRegExpNotMatch:l(Q8[e._value])&&(e.evaluate=BGe(e._value)):e._type===St.TERNARY?e.evaluate=LGe(e._value):e._type===St.MEMBER?e._value==="brackets"?e.evaluate=e._evaluateMemberBrackets:e.evaluate=e._evaluateMemberDot:e._type===St.ARRAY?e.evaluate=e._evaluateArray:e._type===St.VARIABLE?e.evaluate=e._evaluateVariable:e._type===St.VARIABLE_IN_STRING?e.evaluate=e._evaluateVariableString:e._type===St.LITERAL_COLOR?e.evaluate=e._evaluateLiteralColor:e._type===St.LITERAL_VECTOR?e.evaluate=e._evaluateLiteralVector:e._type===St.LITERAL_STRING?e.evaluate=e._evaluateLiteralString:e._type===St.REGEX?e.evaluate=e._evaluateRegExp:e._type===St.BUILTIN_VARIABLE?e._value==="tiles3d_tileset_time"&&(e.evaluate=OGe):e.evaluate=e._evaluateLiteral}function OGe(e){return l(e)?e.content.tileset.timeSinceLoad:0}function MGe(e){let t=K8[e];return function(n){let i=this._left.evaluate(n);return t(e,i)}}function BGe(e){let t=Q8[e];return function(n){let i=this._left.evaluate(n),o=this._right.evaluate(n);return t(e,i,o)}}function LGe(e){let t=lY[e];return function(n){let i=this._left.evaluate(n),o=this._right.evaluate(n),r=this._test.evaluate(n);return t(e,i,o,r)}}function $8(e,t){if(l(e))return e.getPropertyInherited(t)}Mt.prototype._evaluateLiteral=function(){return this._value};Mt.prototype._evaluateLiteralColor=function(e){let t=X8,n=this._left;if(this._value==="color")l(n)?n.length>1?(V.fromCssColorString(n[0].evaluate(e),t),t.alpha=n[1].evaluate(e)):V.fromCssColorString(n[0].evaluate(e),t):V.fromBytes(255,255,255,255,t);else if(this._value==="rgb")V.fromBytes(n[0].evaluate(e),n[1].evaluate(e),n[2].evaluate(e),255,t);else if(this._value==="rgba"){let i=n[3].evaluate(e)*255;V.fromBytes(n[0].evaluate(e),n[1].evaluate(e),n[2].evaluate(e),i,t)}else this._value==="hsl"?V.fromHsl(n[0].evaluate(e),n[1].evaluate(e),n[2].evaluate(e),1,t):this._value==="hsla"&&V.fromHsl(n[0].evaluate(e),n[1].evaluate(e),n[2].evaluate(e),n[3].evaluate(e),t);return se.fromColor(t,Bn.getCartesian4())};Mt.prototype._evaluateLiteralVector=function(e){let t=Bn.getArray(),n=this._value,i=this._left,o=i.length;for(let s=0;s<o;++s){let c=i[s].evaluate(e);if(typeof c=="number")t.push(c);else if(c instanceof z)t.push(c.x,c.y);else if(c instanceof h)t.push(c.x,c.y,c.z);else if(c instanceof se)t.push(c.x,c.y,c.z,c.w);else throw new re(`${n} argument must be a vector or number. Argument is ${c}.`)}let r=t.length,a=parseInt(n.charAt(3));if(r===0)throw new re(`Invalid ${n} constructor. No valid arguments.`);if(r<a&&r>1)throw new re(`Invalid ${n} constructor. Not enough arguments.`);if(r>a&&o>1)throw new re(`Invalid ${n} constructor. Too many arguments.`);if(r===1){let s=t[0];t.push(s,s,s)}if(n==="vec2")return z.fromArray(t,0,Bn.getCartesian2());if(n==="vec3")return h.fromArray(t,0,Bn.getCartesian3());if(n==="vec4")return se.fromArray(t,0,Bn.getCartesian4())};Mt.prototype._evaluateLiteralString=function(){return this._value};Mt.prototype._evaluateVariableString=function(e){let t=this._value,n=$O.exec(t);for(;n!==null;){let i=n[0],o=n[1],r=$8(e,o);l(r)||(r=""),t=t.replace(i,r),$O.lastIndex+=r.length-i.length,n=$O.exec(t)}return t};Mt.prototype._evaluateVariable=function(e){return $8(e,this._value)};function rb(e){return e._value==="feature"}Mt.prototype._evaluateMemberDot=function(e){if(rb(this._left))return $8(e,this._right.evaluate(e));let t=this._left.evaluate(e);if(!l(t))return;let n=this._right.evaluate(e);if(t instanceof z||t instanceof h||t instanceof se){if(n==="r")return t.x;if(n==="g")return t.y;if(n==="b")return t.z;if(n==="a")return t.w}return t[n]};Mt.prototype._evaluateMemberBrackets=function(e){if(rb(this._left))return $8(e,this._right.evaluate(e));let t=this._left.evaluate(e);if(!l(t))return;let n=this._right.evaluate(e);if(t instanceof z||t instanceof h||t instanceof se){if(n===0||n==="r")return t.x;if(n===1||n==="g")return t.y;if(n===2||n==="b")return t.z;if(n===3||n==="a")return t.w}return t[n]};Mt.prototype._evaluateArray=function(e){let t=[];for(let n=0;n<this._value.length;n++)t[n]=this._value[n].evaluate(e);return t};Mt.prototype._evaluateNot=function(e){let t=this._left.evaluate(e);if(typeof t!="boolean")throw new re(`Operator "!" requires a boolean argument. Argument is ${t}.`);return!t};Mt.prototype._evaluateNegative=function(e){let t=this._left.evaluate(e);if(t instanceof z)return z.negate(t,Bn.getCartesian2());if(t instanceof h)return h.negate(t,Bn.getCartesian3());if(t instanceof se)return se.negate(t,Bn.getCartesian4());if(typeof t=="number")return-t;throw new re(`Operator "-" requires a vector or number argument. Argument is ${t}.`)};Mt.prototype._evaluatePositive=function(e){let t=this._left.evaluate(e);if(!(t instanceof z||t instanceof h||t instanceof se||typeof t=="number"))throw new re(`Operator "+" requires a vector or number argument. Argument is ${t}.`);return t};Mt.prototype._evaluateLessThan=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(typeof t!="number"||typeof n!="number")throw new re(`Operator "<" requires number arguments. Arguments are ${t} and ${n}.`);return t<n};Mt.prototype._evaluateLessThanOrEquals=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(typeof t!="number"||typeof n!="number")throw new re(`Operator "<=" requires number arguments. Arguments are ${t} and ${n}.`);return t<=n};Mt.prototype._evaluateGreaterThan=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(typeof t!="number"||typeof n!="number")throw new re(`Operator ">" requires number arguments. Arguments are ${t} and ${n}.`);return t>n};Mt.prototype._evaluateGreaterThanOrEquals=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(typeof t!="number"||typeof n!="number")throw new re(`Operator ">=" requires number arguments. Arguments are ${t} and ${n}.`);return t>=n};Mt.prototype._evaluateOr=function(e){let t=this._left.evaluate(e);if(typeof t!="boolean")throw new re(`Operator "||" requires boolean arguments. First argument is ${t}.`);if(t)return!0;let n=this._right.evaluate(e);if(typeof n!="boolean")throw new re(`Operator "||" requires boolean arguments. Second argument is ${n}.`);return t||n};Mt.prototype._evaluateAnd=function(e){let t=this._left.evaluate(e);if(typeof t!="boolean")throw new re(`Operator "&&" requires boolean arguments. First argument is ${t}.`);if(!t)return!1;let n=this._right.evaluate(e);if(typeof n!="boolean")throw new re(`Operator "&&" requires boolean arguments. Second argument is ${n}.`);return t&&n};Mt.prototype._evaluatePlus=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof z&&t instanceof z)return z.add(t,n,Bn.getCartesian2());if(n instanceof h&&t instanceof h)return h.add(t,n,Bn.getCartesian3());if(n instanceof se&&t instanceof se)return se.add(t,n,Bn.getCartesian4());if(typeof t=="string"||typeof n=="string")return t+n;if(typeof t=="number"&&typeof n=="number")return t+n;throw new re(`Operator "+" requires vector or number arguments of matching types, or at least one string argument. Arguments are ${t} and ${n}.`)};Mt.prototype._evaluateMinus=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof z&&t instanceof z)return z.subtract(t,n,Bn.getCartesian2());if(n instanceof h&&t instanceof h)return h.subtract(t,n,Bn.getCartesian3());if(n instanceof se&&t instanceof se)return se.subtract(t,n,Bn.getCartesian4());if(typeof t=="number"&&typeof n=="number")return t-n;throw new re(`Operator "-" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)};Mt.prototype._evaluateTimes=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof z&&t instanceof z)return z.multiplyComponents(t,n,Bn.getCartesian2());if(n instanceof z&&typeof t=="number")return z.multiplyByScalar(n,t,Bn.getCartesian2());if(t instanceof z&&typeof n=="number")return z.multiplyByScalar(t,n,Bn.getCartesian2());if(n instanceof h&&t instanceof h)return h.multiplyComponents(t,n,Bn.getCartesian3());if(n instanceof h&&typeof t=="number")return h.multiplyByScalar(n,t,Bn.getCartesian3());if(t instanceof h&&typeof n=="number")return h.multiplyByScalar(t,n,Bn.getCartesian3());if(n instanceof se&&t instanceof se)return se.multiplyComponents(t,n,Bn.getCartesian4());if(n instanceof se&&typeof t=="number")return se.multiplyByScalar(n,t,Bn.getCartesian4());if(t instanceof se&&typeof n=="number")return se.multiplyByScalar(t,n,Bn.getCartesian4());if(typeof t=="number"&&typeof n=="number")return t*n;throw new re(`Operator "*" requires vector or number arguments. If both arguments are vectors they must be matching types. Arguments are ${t} and ${n}.`)};Mt.prototype._evaluateDivide=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof z&&t instanceof z)return z.divideComponents(t,n,Bn.getCartesian2());if(t instanceof z&&typeof n=="number")return z.divideByScalar(t,n,Bn.getCartesian2());if(n instanceof h&&t instanceof h)return h.divideComponents(t,n,Bn.getCartesian3());if(t instanceof h&&typeof n=="number")return h.divideByScalar(t,n,Bn.getCartesian3());if(n instanceof se&&t instanceof se)return se.divideComponents(t,n,Bn.getCartesian4());if(t instanceof se&&typeof n=="number")return se.divideByScalar(t,n,Bn.getCartesian4());if(typeof t=="number"&&typeof n=="number")return t/n;throw new re(`Operator "/" requires vector or number arguments of matching types, or a number as the second argument. Arguments are ${t} and ${n}.`)};Mt.prototype._evaluateMod=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof z&&t instanceof z)return z.fromElements(t.x%n.x,t.y%n.y,Bn.getCartesian2());if(n instanceof h&&t instanceof h)return h.fromElements(t.x%n.x,t.y%n.y,t.z%n.z,Bn.getCartesian3());if(n instanceof se&&t instanceof se)return se.fromElements(t.x%n.x,t.y%n.y,t.z%n.z,t.w%n.w,Bn.getCartesian4());if(typeof t=="number"&&typeof n=="number")return t%n;throw new re(`Operator "%" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)};Mt.prototype._evaluateEqualsStrict=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);return n instanceof z&&t instanceof z||n instanceof h&&t instanceof h||n instanceof se&&t instanceof se?t.equals(n):t===n};Mt.prototype._evaluateNotEqualsStrict=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);return n instanceof z&&t instanceof z||n instanceof h&&t instanceof h||n instanceof se&&t instanceof se?!t.equals(n):t!==n};Mt.prototype._evaluateConditional=function(e){let t=this._test.evaluate(e);if(typeof t!="boolean")throw new re(`Conditional argument of conditional expression must be a boolean. Argument is ${t}.`);return t?this._left.evaluate(e):this._right.evaluate(e)};Mt.prototype._evaluateNaN=function(e){return isNaN(this._left.evaluate(e))};Mt.prototype._evaluateIsFinite=function(e){return isFinite(this._left.evaluate(e))};Mt.prototype._evaluateIsExactClass=function(e){return l(e)?e.isExactClass(this._left.evaluate(e)):!1};Mt.prototype._evaluateIsClass=function(e){return l(e)?e.isClass(this._left.evaluate(e)):!1};Mt.prototype._evaluateGetExactClassName=function(e){if(l(e))return e.getExactClassName()};Mt.prototype._evaluateBooleanConversion=function(e){return!!this._left.evaluate(e)};Mt.prototype._evaluateNumberConversion=function(e){return Number(this._left.evaluate(e))};Mt.prototype._evaluateStringConversion=function(e){return String(this._left.evaluate(e))};Mt.prototype._evaluateRegExp=function(e){let t=this._value.evaluate(e),n="";l(this._left)&&(n=this._left.evaluate(e));let i;try{i=new RegExp(t,n)}catch(o){throw new re(o)}return i};Mt.prototype._evaluateRegExpTest=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(!(t instanceof RegExp&&typeof n=="string"))throw new re(`RegExp.test requires the first argument to be a RegExp and the second argument to be a string. Arguments are ${t} and ${n}.`);return t.test(n)};Mt.prototype._evaluateRegExpMatch=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(t instanceof RegExp&&typeof n=="string")return t.test(n);if(n instanceof RegExp&&typeof t=="string")return n.test(t);throw new re(`Operator "=~" requires one RegExp argument and one string argument. Arguments are ${t} and ${n}.`)};Mt.prototype._evaluateRegExpNotMatch=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(t instanceof RegExp&&typeof n=="string")return!t.test(n);if(n instanceof RegExp&&typeof t=="string")return!n.test(t);throw new re(`Operator "!~" requires one RegExp argument and one string argument. Arguments are ${t} and ${n}.`)};Mt.prototype._evaluateRegExpExec=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(!(t instanceof RegExp&&typeof n=="string"))throw new re(`RegExp.exec requires the first argument to be a RegExp and the second argument to be a string. Arguments are ${t} and ${n}.`);let i=t.exec(n);return l(i)?i[1]:null};Mt.prototype._evaluateToString=function(e){let t=this._left.evaluate(e);if(t instanceof RegExp||t instanceof z||t instanceof h||t instanceof se)return String(t);throw new re(`Unexpected function call "${this._value}".`)};function qfe(e){let t=e._left,n=t.length;for(let s=0;s<n;++s)if(t[s]._type!==St.LITERAL_NUMBER)return;let i=t[0]._value,o=t[1]._value,r=t[2]._value,a=n===4?t[3]._value:1;return V.fromHsl(i,o,r,a,X8)}function Yfe(e){let t=e._left,n=t.length;for(let o=0;o<n;++o)if(t[o]._type!==St.LITERAL_NUMBER)return;let i=X8;return i.red=t[0]._value/255,i.green=t[1]._value/255,i.blue=t[2]._value/255,i.alpha=n===4?t[3]._value:1,i}function _A(e){return e%1===0?e.toFixed(1):e.toString()}function NGe(e){let t=_A(e.red),n=_A(e.green),i=_A(e.blue);return`vec3(${t}, ${n}, ${i})`}function Y8(e){let t=_A(e.red),n=_A(e.green),i=_A(e.blue),o=_A(e.alpha);return`vec4(${t}, ${n}, ${i}, ${o})`}function Xfe(e,t,n,i){let o=e.length,r=new Array(o);for(let a=0;a<o;++a)r[a]=e[a].getShaderExpression(t,n,i);return r}function Kfe(e,t){return l(t[e])?t[e]:Yh.NULL_SENTINEL}Yh.NULL_SENTINEL="czm_infinity";Mt.prototype.getShaderExpression=function(e,t,n){let i,o,r,a,s=this._type,c=this._value;l(this._left)&&(Array.isArray(this._left)?o=Xfe(this._left,e,t,this):o=this._left.getShaderExpression(e,t,this)),l(this._right)&&(r=this._right.getShaderExpression(e,t,this)),l(this._test)&&(a=this._test.getShaderExpression(e,t,this)),Array.isArray(this._value)&&(c=Xfe(this._value,e,t,this));let u,f,d;switch(s){case St.VARIABLE:return rb(this)?void 0:Kfe(c,e);case St.UNARY:if(c==="Boolean")return`bool(${o})`;if(c==="Number")return`float(${o})`;if(c==="round")return`floor(${o} + 0.5)`;if(l(K8[c]))return`${c}(${o})`;if(c==="isNaN")return`(${o} != ${o})`;if(c==="isFinite")return`(abs(${o}) < czm_infinity)`;if(c==="String"||c==="isExactClass"||c==="isClass"||c==="getExactClassName")throw new re(`Error generating style shader: "${c}" is not supported.`);return c+o;case St.BINARY:return c==="%"?`mod(${o}, ${r})`:c==="==="?`(${o} == ${r})`:c==="!=="?`(${o} != ${r})`:c==="atan2"?`atan(${o}, ${r})`:l(Q8[c])?`${c}(${o}, ${r})`:`(${o} ${c} ${r})`;case St.TERNARY:if(l(lY[c]))return`${c}(${o}, ${r}, ${a})`;break;case St.CONDITIONAL:return`(${a} ? ${o} : ${r})`;case St.MEMBER:return rb(this._left)?Kfe(r,e):r==="r"||r==="x"||r==="0.0"?`${o}[0]`:r==="g"||r==="y"||r==="1.0"?`${o}[1]`:r==="b"||r==="z"||r==="2.0"?`${o}[2]`:r==="a"||r==="w"||r==="3.0"?`${o}[3]`:`${o}[int(${r})]`;case St.FUNCTION_CALL:throw new re(`Error generating style shader: "${c}" is not supported.`);case St.ARRAY:if(c.length===4)return`vec4(${c[0]}, ${c[1]}, ${c[2]}, ${c[3]})`;if(c.length===3)return`vec3(${c[0]}, ${c[1]}, ${c[2]})`;if(c.length===2)return`vec2(${c[0]}, ${c[1]})`;throw new re("Error generating style shader: Invalid array length. Array length should be 2, 3, or 4.");case St.REGEX:throw new re("Error generating style shader: Regular expressions are not supported.");case St.VARIABLE_IN_STRING:throw new re("Error generating style shader: Converting a variable to a string is not supported.");case St.LITERAL_NULL:return Yh.NULL_SENTINEL;case St.LITERAL_BOOLEAN:return c?"true":"false";case St.LITERAL_NUMBER:return _A(c);case St.LITERAL_STRING:if(l(n)&&n._type===St.MEMBER&&(c==="r"||c==="g"||c==="b"||c==="a"||c==="x"||c==="y"||c==="z"||c==="w"||rb(n._left)))return c;if(i=V.fromCssColorString(c,X8),l(i))return NGe(i);throw new re("Error generating style shader: String literals are not supported.");case St.LITERAL_COLOR:if(u=o,c==="color"){if(l(u)){if(u.length>1){let p=u[0],g=u[1];return g!=="1.0"&&(t.translucent=!0),`vec4(${p}, ${g})`}}else return"vec4(1.0)";return`vec4(${u[0]}, 1.0)`}else{if(c==="rgb")return i=Yfe(this),l(i)?Y8(i):`vec4(${u[0]} / 255.0, ${u[1]} / 255.0, ${u[2]} / 255.0, 1.0)`;if(c==="rgba")return u[3]!=="1.0"&&(t.translucent=!0),i=Yfe(this),l(i)?Y8(i):`vec4(${u[0]} / 255.0, ${u[1]} / 255.0, ${u[2]} / 255.0, ${u[3]})`;if(c==="hsl")return i=qfe(this),l(i)?Y8(i):`vec4(czm_HSLToRGB(vec3(${u[0]}, ${u[1]}, ${u[2]})), 1.0)`;if(c==="hsla")return i=qfe(this),l(i)?(i.alpha!==1&&(t.translucent=!0),Y8(i)):(u[3]!=="1.0"&&(t.translucent=!0),`vec4(czm_HSLToRGB(vec3(${u[0]}, ${u[1]}, ${u[2]})), ${u[3]})`)}break;case St.LITERAL_VECTOR:f=o.length,d=`${c}(`;for(let p=0;p<f;++p)d+=o[p],p<f-1&&(d+=", ");return d+=")",d;case St.LITERAL_REGEX:throw new re("Error generating style shader: Regular expressions are not supported.");case St.LITERAL_UNDEFINED:return Yh.NULL_SENTINEL;case St.BUILTIN_VARIABLE:if(c==="tiles3d_tileset_time")return c}};Mt.prototype.getVariables=function(e,t){let n,i,o,r=this._type,a=this._value;if(l(this._left))if(Array.isArray(this._left))for(n=this._left,i=n.length,o=0;o<i;++o)n[o].getVariables(e,this);else this._left.getVariables(e,this);if(l(this._right)&&this._right.getVariables(e,this),l(this._test)&&this._test.getVariables(e,this),Array.isArray(this._value))for(n=this._value,i=n.length,o=0;o<i;++o)n[o].getVariables(e,this);let s;switch(r){case St.VARIABLE:rb(this)||e.push(a);break;case St.VARIABLE_IN_STRING:for(s=$O.exec(a);s!==null;)e.push(s[1]),s=$O.exec(a);break;case St.LITERAL_STRING:l(t)&&t._type===St.MEMBER&&rb(t._left)&&e.push(a);break}};var Sd=Yh;function ig(e){e=e??G.EMPTY_OBJECT,this._batchTable=e.batchTable,this._batchIds=e.batchIds,this._positions=e.positions,this._vertexBatchIds=e.vertexBatchIds,this._indices=e.indices,this._indexCounts=e.indexCounts,this._indexOffsets=e.indexOffsets,this._batchedIndices=e.batchedIndices,this._boundingVolume=e.boundingVolume,this._boundingVolumes=e.boundingVolumes,this._center=e.center??h.ZERO,this._va=void 0,this._sp=void 0,this._spStencil=void 0,this._spPick=void 0,this._uniformMap=void 0,this._vaSwap=void 0,this._rsStencilDepthPass=void 0,this._rsStencilDepthPass3DTiles=void 0,this._rsColorPass=void 0,this._rsPickPass=void 0,this._rsWireframe=void 0,this._commands=[],this._commandsIgnoreShow=[],this._pickCommands=[],this._constantColor=V.clone(V.WHITE),this._highlightColor=this._constantColor,this._batchDirty=!0,this._pickCommandsDirty=!0,this._framesSinceLastRebatch=0,this._updatingAllCommands=!1,this._trianglesLength=this._indices.length/3,this._geometryByteLength=this._indices.byteLength+this._positions.byteLength+this._vertexBatchIds.byteLength,this.debugWireframe=!1,this._debugWireframe=this.debugWireframe,this._wireframeDirty=!1,this.forceRebatch=!1,this.classificationType=e.classificationType??Wn.BOTH,this._vertexShaderSource=e._vertexShaderSource,this._fragmentShaderSource=e._fragmentShaderSource,this._attributeLocations=e._attributeLocations,this._uniformMap=e._uniformMap,this._pickId=e._pickId,this._modelMatrix=e._modelMatrix,this._boundingSphere=e._boundingSphere,this._batchIdLookUp={};let t=this._batchIds.length;for(let n=0;n<t;++n){let i=this._batchIds[n];this._batchIdLookUp[i]=n}}Object.defineProperties(ig.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}}});var FGe={position:0,a_batchId:1};function kGe(e,t){if(l(e._va))return;let n=Ke.createVertexBuffer({context:t,typedArray:e._positions,usage:Oe.STATIC_DRAW}),i=Ke.createVertexBuffer({context:t,typedArray:e._vertexBatchIds,usage:Oe.STATIC_DRAW}),o=Ke.createIndexBuffer({context:t,typedArray:e._indices,usage:Oe.DYNAMIC_DRAW,indexDatatype:e._indices.BYTES_PER_ELEMENT===2?Ue.UNSIGNED_SHORT:Ue.UNSIGNED_INT}),r=[{index:0,vertexBuffer:n,componentDatatype:Y.fromTypedArray(e._positions),componentsPerAttribute:3},{index:1,vertexBuffer:i,componentDatatype:Y.fromTypedArray(e._vertexBatchIds),componentsPerAttribute:1}];e._va=new Fn({context:t,attributes:r,indexBuffer:o}),t.webgl2&&(e._vaSwap=new Fn({context:t,attributes:r,indexBuffer:Ke.createIndexBuffer({context:t,sizeInBytes:o.sizeInBytes,usage:Oe.DYNAMIC_DRAW,indexDatatype:o.indexDatatype})})),e._batchedPositions=void 0,e._transferrableBatchIds=void 0,e._vertexBatchIds=void 0}function zGe(e,t){if(l(e._sp))return;let n=e._batchTable,i=e._attributeLocations??FGe,o=e._pickId,r=e._vertexShaderSource,a=e._fragmentShaderSource;if(l(r)){e._sp=Kt.fromCache({context:t,vertexShaderSource:r,fragmentShaderSource:a,attributeLocations:i}),e._spStencil=e._sp,a=He.replaceMain(a,"czm_non_pick_main"),a=`${a}void main()
- {
- czm_non_pick_main();
- out_FragColor = ${o};
- }
- `,e._spPick=Kt.fromCache({context:t,vertexShaderSource:r,fragmentShaderSource:a,attributeLocations:i});return}let s=n.getVertexShaderCallback(!1,"a_batchId",void 0)($E),c=n.getFragmentShaderCallback(!1,void 0,!0)(lA);o=n.getPickId();let u=new He({sources:[s]}),f=new He({defines:["VECTOR_TILE"],sources:[c]});e._sp=Kt.fromCache({context:t,vertexShaderSource:u,fragmentShaderSource:f,attributeLocations:i}),u=new He({sources:[$E]}),f=new He({defines:["VECTOR_TILE"],sources:[lA]}),e._spStencil=Kt.fromCache({context:t,vertexShaderSource:u,fragmentShaderSource:f,attributeLocations:i}),c=He.replaceMain(c,"czm_non_pick_main"),c=`${c}
- void main()
- {
- czm_non_pick_main();
- out_FragColor = ${o};
- }
- `;let d=new He({sources:[s]}),p=new He({defines:["VECTOR_TILE"],sources:[c]});e._spPick=Kt.fromCache({context:t,vertexShaderSource:d,fragmentShaderSource:p,attributeLocations:i})}function Qfe(e){let t=e?qn.EQUAL:qn.ALWAYS;return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:!0,frontFunction:t,frontOperation:{fail:vt.KEEP,zFail:vt.DECREMENT_WRAP,zPass:vt.KEEP},backFunction:t,backOperation:{fail:vt.KEEP,zFail:vt.INCREMENT_WRAP,zPass:vt.KEEP},reference:Gt.CESIUM_3D_TILE_MASK,mask:Gt.CESIUM_3D_TILE_MASK},stencilMask:Gt.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:tc.LESS_OR_EQUAL},depthMask:!1}}var UGe={stencilTest:{enabled:!0,frontFunction:qn.NOT_EQUAL,frontOperation:{fail:vt.ZERO,zFail:vt.ZERO,zPass:vt.ZERO},backFunction:qn.NOT_EQUAL,backOperation:{fail:vt.ZERO,zFail:vt.ZERO,zPass:vt.ZERO},reference:0,mask:Gt.CLASSIFICATION_MASK},stencilMask:Gt.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:Jt.PRE_MULTIPLIED_ALPHA_BLEND},VGe={stencilTest:{enabled:!0,frontFunction:qn.NOT_EQUAL,frontOperation:{fail:vt.ZERO,zFail:vt.ZERO,zPass:vt.ZERO},backFunction:qn.NOT_EQUAL,backOperation:{fail:vt.ZERO,zFail:vt.ZERO,zPass:vt.ZERO},reference:0,mask:Gt.CLASSIFICATION_MASK},stencilMask:Gt.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1};function jGe(e){l(e._rsStencilDepthPass)||(e._rsStencilDepthPass=Ve.fromCache(Qfe(!1)),e._rsStencilDepthPass3DTiles=Ve.fromCache(Qfe(!0)),e._rsColorPass=Ve.fromCache(UGe),e._rsPickPass=Ve.fromCache(VGe))}var ab=new M,$fe=new h;function GGe(e,t){if(l(e._uniformMap))return;let n={u_modifiedModelViewProjection:function(){let i=t.uniformState.view,o=t.uniformState.projection;return M.clone(i,ab),M.multiplyByPoint(ab,e._center,$fe),M.setTranslation(ab,$fe,ab),M.multiply(o,ab,ab),ab},u_highlightColor:function(){return e._highlightColor}};e._uniformMap=e._batchTable.getUniformMapCallback()(n)}function uY(e,t,n,i,o,r,a){let s=e.constructor.BYTES_PER_ELEMENT,c=r.length;for(let u=0;u<c;++u){let f=r[u],d=a[f],p=i[d],g=o[d],m=new e.constructor(e.buffer,s*p,g);t.set(m,n),i[d]=n,n+=g}return n}function HGe(e,t){let n=e._indices,i=e._indexOffsets,o=e._indexCounts,r=e._batchIdLookUp,a=new n.constructor(n.length),s=t.pop(),c=[s],u=uY(n,a,0,i,o,s.batchIds,r);for(s.offset=0,s.count=u;t.length>0;){let f=t.pop();if(V.equals(f.color,s.color))u=uY(n,a,u,i,o,f.batchIds,r),s.batchIds=s.batchIds.concat(f.batchIds),s.count=u-s.offset;else{let d=u;u=uY(n,a,u,i,o,f.batchIds,r),f.offset=d,f.count=u-d,c.push(f),s=f}}e._va.indexBuffer.copyFromArrayView(a),e._indices=a,e._batchedIndices=c}function fY(e,t,n,i,o,r,a){let s=e.bytesPerIndex,c=r.length;for(let u=0;u<c;++u){let f=r[u],d=a[f],p=i[d],g=o[d];t.copyFromBuffer(e,p*s,n*s,g*s),i[d]=n,n+=g}return n}function WGe(e,t){let n=e._indexOffsets,i=e._indexCounts,o=e._batchIdLookUp,r=t.pop(),a=[r],s=e._va.indexBuffer,c=e._vaSwap.indexBuffer,u=fY(s,c,0,n,i,r.batchIds,o);for(r.offset=0,r.count=u;t.length>0;){let d=t.pop();if(V.equals(d.color,r.color))u=fY(s,c,u,n,i,d.batchIds,o),r.batchIds=r.batchIds.concat(d.batchIds),r.count=u-r.offset;else{let p=u;u=fY(s,c,u,n,i,d.batchIds,o),d.offset=p,d.count=u-p,a.push(d),r=d}}let f=e._va;e._va=e._vaSwap,e._vaSwap=f,e._batchedIndices=a}function qGe(e,t){return t.color.toRgba()-e.color.toRgba()}function YGe(e,t){if(!e._batchDirty)return!1;let n=e._batchedIndices,i=n.length,o=!1,r={};for(let a=0;a<i;++a){let c=n[a].color.toRgba();if(l(r[c])){o=!0;break}else r[c]=!0}if(!o)return e._batchDirty=!1,!1;if(o&&!e.forceRebatch&&e._framesSinceLastRebatch<120){++e._framesSinceLastRebatch;return}return n.sort(qGe),t.webgl2?WGe(e,n):HGe(e,n),e._framesSinceLastRebatch=0,e._batchDirty=!1,e._pickCommandsDirty=!0,e._wireframeDirty=!0,!0}function XGe(e,t){let n=YGe(e,t),i=e._commands,o=e._batchedIndices,r=o.length,a=r*2;if(l(i)&&!n&&i.length===a)return;i.length=a;let s=e._va,c=e._sp,u=e._modelMatrix??M.IDENTITY,f=e._uniformMap,d=e._boundingVolume;for(let p=0;p<r;++p){let g=o[p].offset,m=o[p].count,A=i[p*2];l(A)||(A=i[p*2]=new tt({owner:e})),A.vertexArray=s,A.modelMatrix=u,A.offset=g,A.count=m,A.renderState=e._rsStencilDepthPass,A.shaderProgram=c,A.uniformMap=f,A.boundingVolume=d,A.cull=!1,A.pass=Ie.TERRAIN_CLASSIFICATION;let y=tt.shallowClone(A,A.derivedCommands.tileset);y.renderState=e._rsStencilDepthPass3DTiles,y.pass=Ie.CESIUM_3D_TILE_CLASSIFICATION,A.derivedCommands.tileset=y;let x=i[p*2+1];l(x)||(x=i[p*2+1]=new tt({owner:e})),x.vertexArray=s,x.modelMatrix=u,x.offset=g,x.count=m,x.renderState=e._rsColorPass,x.shaderProgram=c,x.uniformMap=f,x.boundingVolume=d,x.cull=!1,x.pass=Ie.TERRAIN_CLASSIFICATION;let b=tt.shallowClone(x,x.derivedCommands.tileset);b.pass=Ie.CESIUM_3D_TILE_CLASSIFICATION,x.derivedCommands.tileset=b}e._commandsDirty=!0}function KGe(e,t){if(e.classificationType===Wn.TERRAIN||!t.invertClassification||l(e._commandsIgnoreShow)&&!e._commandsDirty)return;let n=e._commands,i=e._commandsIgnoreShow,o=e._spStencil,r=n.length,a=i.length=r/2,s=0;for(let c=0;c<a;++c){let u=i[c]=tt.shallowClone(n[s],i[c]);u.shaderProgram=o,u.pass=Ie.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,s+=2}e._commandsDirty=!1}function QGe(e){if(!e._pickCommandsDirty)return;let t=e._indexOffsets.length,n=e._pickCommands;n.length=t*2;let i=e._va,o=e._spStencil,r=e._spPick,a=e._modelMatrix??M.IDENTITY,s=e._uniformMap;for(let c=0;c<t;++c){let u=e._indexOffsets[c],f=e._indexCounts[c],d=l(e._boundingVolumes)?e._boundingVolumes[c]:e.boundingVolume,p=n[c*2];l(p)||(p=n[c*2]=new tt({owner:e,pickOnly:!0})),p.vertexArray=i,p.modelMatrix=a,p.offset=u,p.count=f,p.renderState=e._rsStencilDepthPass,p.shaderProgram=o,p.uniformMap=s,p.boundingVolume=d,p.pass=Ie.TERRAIN_CLASSIFICATION;let g=tt.shallowClone(p,p.derivedCommands.tileset);g.renderState=e._rsStencilDepthPass3DTiles,g.pass=Ie.CESIUM_3D_TILE_CLASSIFICATION,p.derivedCommands.tileset=g;let m=n[c*2+1];l(m)||(m=n[c*2+1]=new tt({owner:e,pickOnly:!0})),m.vertexArray=i,m.modelMatrix=a,m.offset=u,m.count=f,m.renderState=e._rsPickPass,m.shaderProgram=r,m.uniformMap=s,m.boundingVolume=d,m.pass=Ie.TERRAIN_CLASSIFICATION;let A=tt.shallowClone(m,m.derivedCommands.tileset);A.pass=Ie.CESIUM_3D_TILE_CLASSIFICATION,m.derivedCommands.tileset=A}e._pickCommandsDirty=!1}ig.prototype.createFeatures=function(e,t){let n=this._batchIds,i=n.length;for(let o=0;o<i;++o){let r=n[o];t[r]=new Qa(e,r)}};ig.prototype.applyDebugSettings=function(e,t){this._highlightColor=e?t:this._constantColor};function $Ge(e,t){e._updatingAllCommands=!0;let n=e._batchIds,i=n.length,o;for(o=0;o<i;++o){let a=n[o],s=t[a];s.show=!0,s.color=V.WHITE}let r=e._batchedIndices;for(i=r.length,o=0;o<i;++o)r[o].color=V.clone(V.WHITE);e._updatingAllCommands=!1,e._batchDirty=!0}var JGe=new V,ZGe=V.WHITE,eHe=!0,tHe=/\$/;ig.prototype.applyStyle=function(e,t){if(!l(e)){$Ge(this,t);return}let n=e.color,i=n instanceof Sd&&!tHe.test(n.expression);this._updatingAllCommands=i;let o=this._batchIds,r=o.length,a;for(a=0;a<r;++a){let s=o[a],c=t[s];c.color=l(e.color)?e.color.evaluateColor(c,JGe):ZGe,c.show=l(e.show)?e.show.evaluate(c):eHe}if(i){let s=this._batchedIndices;for(r=s.length,a=0;a<r;++a)s[a].color=V.clone(V.WHITE);this._updatingAllCommands=!1,this._batchDirty=!0}};ig.prototype.updateCommands=function(e,t){if(this._updatingAllCommands)return;let n=this._batchIdLookUp,i=n[e];if(!l(i))return;let o=this._indexOffsets,r=this._indexCounts,a=o[i],s=r[i],c=this._batchedIndices,u=c.length,f;for(f=0;f<u;++f){let A=c[f].offset,y=c[f].count;if(a>=A&&a<A+y)break}c.push(new Ap({color:V.clone(t),offset:a,count:s,batchIds:[e]}));let d=[],p=[],g=c[f].batchIds,m=g.length;for(let A=0;A<m;++A){let y=g[A];if(y===e)continue;let x=n[y];o[x]<a?d.push(y):p.push(y)}p.length!==0&&c.push(new Ap({color:V.clone(c[f].color),offset:a+s,count:c[f].offset+c[f].count-(a+s),batchIds:p})),d.length!==0?(c[f].count=a-c[f].offset,c[f].batchIds=d):c.splice(f,1),this._batchDirty=!0};function Jfe(e,t,n,i){let o=e.classificationType,r=o!==Wn.CESIUM_3D_TILE,a=o!==Wn.TERRAIN,s=t.commandList,c=n.length,u,f;for(f=0;f<c;++f)r&&(u=n[f],u.pass=Ie.TERRAIN_CLASSIFICATION,s.push(u)),a&&(u=n[f].derivedCommands.tileset,u.pass=Ie.CESIUM_3D_TILE_CLASSIFICATION,s.push(u));if(!(!t.invertClassification||!l(i)))for(c=i.length,f=0;f<c;++f)s.push(i[f])}function nHe(e,t){let n=e.commandList,i=t.length;for(let o=0;o<i;o+=2){let r=t[o+1];r.pass=Ie.OPAQUE,n.push(r)}}function iHe(e){let t=e.debugWireframe===e._debugWireframe;if(t=t&&!(e.debugWireframe&&e._wireframeDirty),t)return;l(e._rsWireframe)||(e._rsWireframe=Ve.fromCache({}));let n,i;e.debugWireframe?(n=e._rsWireframe,i=Re.LINES):(n=e._rsColorPass,i=Re.TRIANGLES);let o=e._commands,r=o.length;for(let a=0;a<r;a+=2){let s=o[a+1];s.renderState=n,s.primitiveType=i}e._debugWireframe=e.debugWireframe,e._wireframeDirty=!1}ig.prototype.update=function(e){let t=e.context;kGe(this,t),zGe(this,t),jGe(this),GGe(this,t);let n=e.passes;n.render&&(XGe(this,t),KGe(this,e),iHe(this),this._debugWireframe?nHe(e,this._commands):Jfe(this,e,this._commands,this._commandsIgnoreShow)),n.pick&&(QGe(this),Jfe(this,e,this._pickCommands))};ig.prototype.isDestroyed=function(){return!1};ig.prototype.destroy=function(){return this._va=this._va&&this._va.destroy(),this._sp=this._sp&&this._sp.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),this._vaSwap=this._vaSwap&&this._vaSwap.destroy(),fe(this)};var sb=ig;function yf(e){this._boxes=e.boxes,this._boxBatchIds=e.boxBatchIds,this._cylinders=e.cylinders,this._cylinderBatchIds=e.cylinderBatchIds,this._ellipsoids=e.ellipsoids,this._ellipsoidBatchIds=e.ellipsoidBatchIds,this._spheres=e.spheres,this._sphereBatchIds=e.sphereBatchIds,this._modelMatrix=e.modelMatrix,this._batchTable=e.batchTable,this._boundingVolume=e.boundingVolume,this._center=e.center,l(this._center)||(l(this._boundingVolume)?this._center=h.clone(this._boundingVolume.center):this._center=h.clone(h.ZERO)),this._boundingVolumes=void 0,this._batchedIndices=void 0,this._indices=void 0,this._indexOffsets=void 0,this._indexCounts=void 0,this._positions=void 0,this._vertexBatchIds=void 0,this._batchIds=void 0,this._batchTableColors=void 0,this._packedBuffer=void 0,this._ready=!1,this._promise=void 0,this._error=void 0,this._verticesPromise=void 0,this._primitive=void 0,this.debugWireframe=!1,this.forceRebatch=!1,this.classificationType=Wn.BOTH}Object.defineProperties(yf.prototype,{trianglesLength:{get:function(){return l(this._primitive)?this._primitive.trianglesLength:0}},geometryByteLength:{get:function(){return l(this._primitive)?this._primitive.geometryByteLength:0}},ready:{get:function(){return this._ready}}});yf.packedBoxLength=M.packedLength+h.packedLength;yf.packedCylinderLength=M.packedLength+2;yf.packedEllipsoidLength=M.packedLength+h.packedLength;yf.packedSphereLength=h.packedLength+1;function oHe(e){let t=new Float64Array(M.packedLength+h.packedLength),n=0;return h.pack(e._center,t,n),n+=h.packedLength,M.pack(e._modelMatrix,t,n),t}function rHe(e,t){let n=0,i=t[n++],o=t[n++],r=e._boundingVolumes=new Array(o);for(let c=0;c<o;++c)r[c]=ce.unpack(t,n),n+=ce.packedLength;let a=t[n++],s=e._batchedIndices=new Array(a);for(let c=0;c<a;++c){let u=V.unpack(t,n);n+=V.packedLength;let f=t[n++],d=t[n++],p=t[n++],g=new Array(p);for(let m=0;m<p;++m)g[m]=t[n++];s[c]=new Ap({color:u,offset:f,count:d,batchIds:g})}return i}var aHe=new Gn("createVectorTileGeometries",5),sHe=new V;function cHe(e){if(!l(e._primitive)&&!l(e._verticesPromise)){let t=e._boxes,n=e._boxBatchIds,i=e._cylinders,o=e._cylinderBatchIds,r=e._ellipsoids,a=e._ellipsoidBatchIds,s=e._spheres,c=e._sphereBatchIds,u=e._batchTableColors,f=e._packedBuffer;if(!l(u)){let m=0;l(e._boxes)&&(t=e._boxes=t.slice(),n=e._boxBatchIds=n.slice(),m+=n.length),l(e._cylinders)&&(i=e._cylinders=i.slice(),o=e._cylinderBatchIds=o.slice(),m+=o.length),l(e._ellipsoids)&&(r=e._ellipsoids=r.slice(),a=e._ellipsoidBatchIds=a.slice(),m+=a.length),l(e._spheres)&&(s=e._sphere=s.slice(),c=e._sphereBatchIds=c.slice(),m+=c.length),u=e._batchTableColors=new Uint32Array(m);let A=e._batchTable;for(let y=0;y<m;++y){let x=A.getColor(y,sHe);u[y]=x.toRgba()}f=e._packedBuffer=oHe(e)}let d=[];l(t)&&d.push(t.buffer,n.buffer),l(i)&&d.push(i.buffer,o.buffer),l(r)&&d.push(r.buffer,a.buffer),l(s)&&d.push(s.buffer,c.buffer),d.push(u.buffer,f.buffer);let p={boxes:l(t)?t.buffer:void 0,boxBatchIds:l(t)?n.buffer:void 0,cylinders:l(i)?i.buffer:void 0,cylinderBatchIds:l(i)?o.buffer:void 0,ellipsoids:l(r)?r.buffer:void 0,ellipsoidBatchIds:l(r)?a.buffer:void 0,spheres:l(s)?s.buffer:void 0,sphereBatchIds:l(s)?c.buffer:void 0,batchTableColors:u.buffer,packedBuffer:f.buffer},g=e._verticesPromise=aHe.scheduleTask(p,d);return l(g)?g.then(function(m){if(e.isDestroyed())return;let A=new Float64Array(m.packedBuffer);rHe(e,A)===2?e._indices=new Uint16Array(m.indices):e._indices=new Uint32Array(m.indices),e._indexOffsets=new Uint32Array(m.indexOffsets),e._indexCounts=new Uint32Array(m.indexCounts),e._positions=new Float32Array(m.positions),e._vertexBatchIds=new Uint16Array(m.vertexBatchIds),e._batchIds=new Uint16Array(m.batchIds),lHe(e),e._ready=!0}).catch(m=>{e.isDestroyed()||(e._error=m)}):void 0}}function lHe(e){l(e._primitive)||(e._primitive=new sb({batchTable:e._batchTable,positions:e._positions,batchIds:e._batchIds,vertexBatchIds:e._vertexBatchIds,indices:e._indices,indexOffsets:e._indexOffsets,indexCounts:e._indexCounts,batchedIndices:e._batchedIndices,boundingVolume:e._boundingVolume,boundingVolumes:e._boundingVolumes,center:e._center,pickObject:e._pickObject??e}),e._boxes=void 0,e._boxBatchIds=void 0,e._cylinders=void 0,e._cylinderBatchIds=void 0,e._ellipsoids=void 0,e._ellipsoidBatchIds=void 0,e._spheres=void 0,e._sphereBatchIds=void 0,e._center=void 0,e._modelMatrix=void 0,e._batchTable=void 0,e._boundingVolume=void 0,e._boundingVolumes=void 0,e._batchedIndices=void 0,e._indices=void 0,e._indexOffsets=void 0,e._indexCounts=void 0,e._positions=void 0,e._vertexBatchIds=void 0,e._batchIds=void 0,e._batchTableColors=void 0,e._packedBuffer=void 0,e._verticesPromise=void 0)}yf.prototype.createFeatures=function(e,t){this._primitive.createFeatures(e,t)};yf.prototype.applyDebugSettings=function(e,t){this._primitive.applyDebugSettings(e,t)};yf.prototype.applyStyle=function(e,t){this._primitive.applyStyle(e,t)};yf.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)};yf.prototype.update=function(e){if(!this._ready){if(l(this._promise)||(this._promise=cHe(this)),l(this._error)){let t=this._error;throw this._error=void 0,t}return}this._primitive.debugWireframe=this.debugWireframe,this._primitive.forceRebatch=this.forceRebatch,this._primitive.classificationType=this.classificationType,this._primitive.update(e)};yf.prototype.isDestroyed=function(){return!1};yf.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),fe(this)};var og=yf;var dY=class{constructor(t,n,i,o,r){this._tileset=t,this._tile=n,this._resource=i,this._geometries=void 0,this._metadata=void 0,this._batchTable=void 0,this._features=void 0,this.featurePropertiesDirty=!1,this._group=void 0,this._ready=!1,dHe(this,o,r)}get featuresLength(){return l(this._batchTable)?this._batchTable.featuresLength:0}get pointsLength(){return 0}get trianglesLength(){return l(this._geometries)?this._geometries.trianglesLength:0}get geometryByteLength(){return l(this._geometries)?this._geometries.geometryByteLength:0}get texturesByteLength(){return 0}get batchTableByteLength(){return l(this._batchTable)?this._batchTable.batchTableByteLength:0}get innerContents(){}get ready(){return this._ready}get tileset(){return this._tileset}get tile(){return this._tile}get url(){return this._resource.getUrlComponent(!0)}get metadata(){return this._metadata}set metadata(t){this._metadata=t}get batchTable(){return this._batchTable}get group(){return this._group}set group(t){this._group=t}hasProperty(t,n){return this._batchTable.hasProperty(t,n)}getFeature(t){return Zfe(this),this._features[t]}applyDebugSettings(t,n){l(this._geometries)&&this._geometries.applyDebugSettings(t,n)}applyStyle(t){Zfe(this),l(this._geometries)&&this._geometries.applyStyle(t,this._features)}update(t,n){l(this._geometries)&&(this._geometries.classificationType=this._tileset.classificationType,this._geometries.debugWireframe=this._tileset.debugWireframe,this._geometries.update(n)),l(this._batchTable)&&this._geometries.ready&&(this._batchTable.update(t,n),this._ready=!0)}pick(t,n,i){}isDestroyed(){return!1}destroy(){return this._geometries=this._geometries&&this._geometries.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),fe(this)}};function uHe(e){return function(t,n){l(e._geometries)&&e._geometries.updateCommands(t,n)}}function fHe(e,t){let n,i,o,r,a,s=e.BOXES_LENGTH??0,c=e.CYLINDERS_LENGTH??0,u=e.ELLIPSOIDS_LENGTH??0,f=e.SPHERES_LENGTH??0;if(s>0&&l(e.BOX_BATCH_IDS)){let m=t.byteOffset+e.BOX_BATCH_IDS.byteOffset;n=new Uint16Array(t.buffer,m,s)}if(c>0&&l(e.CYLINDER_BATCH_IDS)){let m=t.byteOffset+e.CYLINDER_BATCH_IDS.byteOffset;i=new Uint16Array(t.buffer,m,c)}if(u>0&&l(e.ELLIPSOID_BATCH_IDS)){let m=t.byteOffset+e.ELLIPSOID_BATCH_IDS.byteOffset;o=new Uint16Array(t.buffer,m,u)}if(f>0&&l(e.SPHERE_BATCH_IDS)){let m=t.byteOffset+e.SPHERE_BATCH_IDS.byteOffset;r=new Uint16Array(t.buffer,m,f)}let d=l(n)||l(i)||l(o)||l(r),p=s>0&&!l(n)||c>0&&!l(i)||u>0&&!l(o)||f>0&&!l(r);if(d&&p)throw new re("If one group of batch ids is defined, then all batch ids must be defined");if(!l(n)&&!l(i)&&!l(o)&&!l(r)){let m=0;if(!l(n)&&s>0)for(n=new Uint16Array(s),a=0;a<s;++a)n[a]=m++;if(!l(i)&&c>0)for(i=new Uint16Array(c),a=0;a<c;++a)i[a]=m++;if(!l(o)&&u>0)for(o=new Uint16Array(u),a=0;a<u;++a)o[a]=m++;if(!l(r)&&f>0)for(r=new Uint16Array(f),a=0;a<f;++a)r[a]=m++}return{boxes:n,cylinders:i,ellipsoids:o,spheres:r}}var cb=Uint32Array.BYTES_PER_ELEMENT;function dHe(e,t,n){n=n??0;let i=new Uint8Array(t),o=new DataView(t);n+=cb;let r=o.getUint32(n,!0);if(r!==1)throw new re(`Only Geometry tile version 1 is supported. Version ${r} is not.`);n+=cb;let a=o.getUint32(n,!0);if(n+=cb,a===0){e._ready=!0;return}let s=o.getUint32(n,!0);if(n+=cb,s===0)throw new re("Feature table must have a byte length greater than zero");let c=o.getUint32(n,!0);n+=cb;let u=o.getUint32(n,!0);n+=cb;let f=o.getUint32(n,!0);n+=cb;let d=Cr(i,n,s);n+=s;let p=new Uint8Array(t,n,c);n+=c;let g,m;u>0&&(g=Cr(i,n,u),n+=u,f>0&&(m=new Uint8Array(t,n,f),m=new Uint8Array(m)));let A=d.BOXES_LENGTH??0,y=d.CYLINDERS_LENGTH??0,x=d.ELLIPSOIDS_LENGTH??0,b=d.SPHERES_LENGTH??0,C=A+y+x+b,E=new qh(e,C,g,m,uHe(e));if(e._batchTable=E,C===0)return;let S=e.tile.computedTransform,w;l(d.RTC_CENTER)&&(w=h.unpack(d.RTC_CENTER),M.multiplyByPoint(S,w,w));let P=fHe(d,p);if(A>0||y>0||x>0||b>0){let R,B,L,_;if(A>0){let T=p.byteOffset+d.BOXES.byteOffset;R=new Float32Array(p.buffer,T,og.packedBoxLength*A)}if(y>0){let T=p.byteOffset+d.CYLINDERS.byteOffset;B=new Float32Array(p.buffer,T,og.packedCylinderLength*y)}if(x>0){let T=p.byteOffset+d.ELLIPSOIDS.byteOffset;L=new Float32Array(p.buffer,T,og.packedEllipsoidLength*x)}if(b>0){let T=p.byteOffset+d.SPHERES.byteOffset;_=new Float32Array(p.buffer,T,og.packedSphereLength*b)}return e._geometries=new og({boxes:R,boxBatchIds:P.boxes,cylinders:B,cylinderBatchIds:P.cylinders,ellipsoids:L,ellipsoidBatchIds:P.ellipsoids,spheres:_,sphereBatchIds:P.spheres,center:w,modelMatrix:S,batchTable:E,boundingVolume:e.tile.boundingVolume.boundingVolume}),e}return Promise.resolve(e)}function Zfe(e){let t=e.featuresLength;if(!l(e._features)&&t>0){let n=new Array(t);l(e._geometries)&&e._geometries.createFeatures(e,n),e._features=n}}var JO=dY;var hY={};hY.encode2D=function(e,t,n){let i=Math.pow(2,e),o={x:t,y:n},r,a,s,c=BigInt(0);for(s=i/2;s>0;s/=2)r=(o.x&s)>0?1:0,a=(o.y&s)>0?1:0,c+=BigInt((3*r^a)*s*s),ede(i,o,r,a);return c};hY.decode2D=function(e,t){let n=Math.pow(2,e),i={x:0,y:0},o,r,a,s;for(a=1,s=t;a<n;a*=2)o=1&Number(s/BigInt(2)),r=1&Number(s^BigInt(o)),ede(a,i,o,r),i.x+=a*o,i.y+=a*r,s/=BigInt(4);return[i.x,i.y]};function ede(e,t,n,i){if(i!==0)return;n===1&&(t.x=e-1-t.x,t.y=e-1-t.y);let o=t.x;t.x=t.y,t.y=o}var JE=hY;var lb=30,hHe=1<<lb,mHe=1<<lb+1>>>0,mY=2*lb+1,AA=4,ide=[],ode=[],pHe=[[0,1,3,2],[0,2,3,1],[3,2,0,1],[3,1,0,2]],yA=1,ZE=2,J8=[yA,0,0,yA|ZE];function Ba(e){if(!sn.supportsBigInt())throw new re("S2 required BigInt support");this._cellId=e,this._level=Ba.getLevel(e)}Ba.fromToken=function(e){return new Ba(Ba.getIdFromToken(e))};Ba.isValidId=function(e){return!(e<=0||e>>BigInt(mY)>5||!(e&~e+BigInt(1)&BigInt("0x1555555555555555")))};Ba.isValidToken=function(e){return/^[0-9a-fA-F]{1,16}$/.test(e)?Ba.isValidId(Ba.getIdFromToken(e)):!1};Ba.getIdFromToken=function(e){return BigInt("0x"+e+"0".repeat(16-e.length))};Ba.getTokenFromId=function(e){let t=Math.floor(vHe(e)/4),n=e.toString(16).replace(/0*$/,"");return Array(17-t-n.length).join("0")+n};Ba.getLevel=function(e){let t=0;for(;e!==BigInt(0)&&!(e&BigInt(1));)t++,e=e>>BigInt(1);return lb-(t>>1)};Ba.prototype.getChild=function(e){let t=sde(this._cellId)>>BigInt(2),n=this._cellId+BigInt(2*e+1-4)*t;return new Ba(n)};Ba.prototype.getParent=function(){let e=sde(this._cellId)<<BigInt(2);return new Ba(this._cellId&~e+BigInt(1)|e)};Ba.prototype.getParentAtLevel=function(e){let t=THe(e);return new Ba(this._cellId&-t|t)};Ba.prototype.getCenter=function(e){e=e??te.WGS84;let t=gHe(this._cellId,this._level);t=h.normalize(t,t);let n=de.fromCartesian(t,te.UNIT_SPHERE);return de.toCartesian(n,e,new h)};Ba.prototype.getVertex=function(e,t){t=t??te.WGS84;let n=_He(this._cellId,this._level,e);n=h.normalize(n,n);let i=de.fromCartesian(n,te.UNIT_SPHERE);return de.toCartesian(i,t,new h)};Ba.fromFacePositionLevel=function(e,t,n){let i=(e<4?"0":"")+(e<2?"0":"")+e.toString(2),o=t.toString(2),r=Array(2*n-o.length+1).join("0"),a=Array(mY-2*n).join("0"),s=BigInt(`0b${i}${r}${o}1${a}`);return new Ba(s)};function gHe(e,t){let n=AHe(e,t);return yHe(n[0],n[1],n[2])}function _He(e,t,n){let i=rde(e,t),o=xHe([i[1],i[2]],t),r=n>>1&1;return ade(i[0],o[0][r^n&1],o[1][r])}function AHe(e,t){let n=rde(e),i=n[0],o=n[1],r=n[2],a=t===30,s=!a&&(BigInt(o)^e>>BigInt(2))&BigInt(1),c=a?1:s?2:0,u=(o<<1)+c,f=(r<<1)+c;return[i,u,f]}function rde(e){ide.length===0&&CHe();let t=Number(e>>BigInt(mY)),n=t&yA,i=(1<<AA)-1,o=0,r=0;for(let a=7;a>=0;a--){let c=(1<<2*(a===7?lb-7*AA:AA))-1;n+=Number(e>>BigInt(a*2*AA+1)&BigInt(c))<<2,n=ode[n];let u=a*AA;o+=n>>AA+2<<u,r+=(n>>2&i)<<u,n&=yA|ZE}return[t,o,r]}function yHe(e,t,n){let i=tde(t),o=tde(n),r=Z8(i),a=Z8(o);return ade(e,r,a)}function ade(e,t,n){switch(e){case 0:return new h(1,t,n);case 1:return new h(-t,1,n);case 2:return new h(-t,-n,1);case 3:return new h(-1,-n,-t);case 4:return new h(n,-1,-t);default:return new h(n,t,-1)}}function Z8(e){return e>=.5?1/3*(4*e*e-1):1/3*(1-4*(1-e)*(1-e))}function tde(e){return 1/mHe*e}function xHe(e,t){let n=[[],[]],i=bHe(t);for(let o=0;o<2;++o){let r=e[o]&-i,a=r+i;n[o][0]=Z8(nde(r)),n[o][1]=Z8(nde(a))}return n}function bHe(e){return 1<<lb-e>>>0}function nde(e){return 1/hHe*e}function xA(e,t,n,i,o,r){if(e===AA){let a=(t<<AA)+n;ide[(a<<2)+i]=(o<<2)+r,ode[(o<<2)+i]=(a<<2)+r}else{e++,t<<=1,n<<=1,o<<=2;let a=pHe[r];xA(e,t+(a[0]>>1),n+(a[0]&1),i,o,r^J8[0]),xA(e,t+(a[1]>>1),n+(a[1]&1),i,o+1,r^J8[1]),xA(e,t+(a[2]>>1),n+(a[2]&1),i,o+2,r^J8[2]),xA(e,t+(a[3]>>1),n+(a[3]&1),i,o+3,r^J8[3])}}function CHe(){xA(0,0,0,0,0,0),xA(0,0,0,yA,0,yA),xA(0,0,0,ZE,0,ZE),xA(0,0,0,yA|ZE,0,yA|ZE)}function sde(e){return e&~e+BigInt(1)}function THe(e){return BigInt(1)<<BigInt(2*(lb-e))}var EHe=[64,0,1,39,2,15,40,23,3,12,16,59,41,19,24,54,4,64,13,10,17,62,60,28,42,30,20,51,25,44,55,47,5,32,65,38,14,22,11,58,18,53,63,9,61,27,29,50,43,46,31,37,21,57,52,8,26,49,45,36,56,7,48,35,6,34,33,0];function vHe(e){return EHe[(-e&e)%BigInt(67)]}var rg=Ba;function SHe(e,t){return l(e)&&l(e.extensions)&&l(e.extensions[t])}var Ci=SHe;function pY(e){let t=e.lengthBits,n=e.availableCount,i=e.constant,o=e.bitstream;if(l(i))n=t;else{let r=Math.ceil(t/8);if(o.length!==r)throw new re(`Availability bitstream must be exactly ${r} bytes long to store ${t} bits. Actual bitstream was ${o.length} bytes long.`);let a=e.computeAvailableCountEnabled??!1;!l(n)&&a&&(n=wHe(o,t))}this._lengthBits=t,this._availableCount=n,this._constant=i,this._bitstream=o}function wHe(e,t){let n=0;for(let i=0;i<t;i++){let o=i>>3,r=i%8;n+=e[o]>>r&1}return n}Object.defineProperties(pY.prototype,{lengthBits:{get:function(){return this._lengthBits}},availableCount:{get:function(){return this._availableCount}}});pY.prototype.getBit=function(e){if(l(this._constant))return this._constant;let t=e>>3,n=e%8;return(this._bitstream[t]>>n&1)===1};var ev=pY;function ag(e){e=e??G.EMPTY_OBJECT;let t=e.metadataTable,n=e.class,i=e.entityId,o=e.propertyTableJson;this._class=n,this._metadataTable=t,this._entityId=i,this._extensions=o.extensions,this._extras=o.extras}Object.defineProperties(ag.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});ag.prototype.hasProperty=function(e){return this._metadataTable.hasProperty(e)};ag.prototype.hasPropertyBySemantic=function(e){return this._metadataTable.hasPropertyBySemantic(e)};ag.prototype.getPropertyIds=function(e){return this._metadataTable.getPropertyIds(e)};ag.prototype.getProperty=function(e){return this._metadataTable.getProperty(this._entityId,e)};ag.prototype.setProperty=function(e,t){return this._metadataTable.setProperty(this._entityId,e,t)};ag.prototype.getPropertyBySemantic=function(e){return this._metadataTable.getPropertyBySemantic(this._entityId,e)};ag.prototype.setPropertyBySemantic=function(e,t){return this._metadataTable.setPropertyBySemantic(this._entityId,e,t)};var tv=ag;var ZO={QUADTREE:"QUADTREE",OCTREE:"OCTREE"};ZO.getBranchingFactor=function(e){switch(e){case ZO.OCTREE:return 8;case ZO.QUADTREE:return 4}};Object.freeze(ZO);var La=ZO;function ic(){}Object.defineProperties(ic.prototype,{class:{get:function(){_e.throwInstantiationError()}}});ic.prototype.hasProperty=function(e){_e.throwInstantiationError()};ic.prototype.hasPropertyBySemantic=function(e){_e.throwInstantiationError()};ic.prototype.getPropertyIds=function(e){_e.throwInstantiationError()};ic.prototype.getProperty=function(e){_e.throwInstantiationError()};ic.prototype.setProperty=function(e,t){_e.throwInstantiationError()};ic.prototype.getPropertyBySemantic=function(e){_e.throwInstantiationError()};ic.prototype.setPropertyBySemantic=function(e,t){_e.throwInstantiationError()};ic.hasProperty=function(e,t,n){if(l(t[e]))return!0;let i=n.properties;if(!l(i))return!1;let o=i[e];return!!(l(o)&&l(o.default))};ic.hasPropertyBySemantic=function(e,t,n){let i=n.propertiesBySemantic;if(!l(i))return!1;let o=i[e];return l(o)};ic.getPropertyIds=function(e,t,n){n=l(n)?n:[],n.length=0;for(let o in e)e.hasOwnProperty(o)&&l(e[o])&&n.push(o);let i=t.properties;if(l(i))for(let o in i)i.hasOwnProperty(o)&&!l(e[o])&&l(i[o].default)&&n.push(o);return n};ic.getProperty=function(e,t,n){let i=n.properties[e],o=t[e];Array.isArray(o)&&(o=o.slice());let r=!0;if(o=i.handleNoData(o),!l(o)&&l(i.default))return o=We(i.default,!0),i.unpackVectorAndMatrixTypes(o,r);if(l(o))return o=i.normalize(o),o=i.applyValueTransform(o),i.unpackVectorAndMatrixTypes(o,r)};ic.setProperty=function(e,t,n,i){if(!l(n[e]))return!1;Array.isArray(t)&&(t=t.slice());let o,r=i.properties;return l(r)&&(o=r[e]),l(o)&&(t=o.packVectorAndMatrixTypes(t,!0),t=o.unapplyValueTransform(t),t=o.unnormalize(t)),n[e]=t,!0};ic.getPropertyBySemantic=function(e,t,n){let i=n.propertiesBySemantic;if(!l(i))return;let o=i[e];if(l(o))return ic.getProperty(o.id,t,n)};ic.setPropertyBySemantic=function(e,t,n,i){let o=i.propertiesBySemantic;if(!l(o))return!1;let r=i.propertiesBySemantic[e];return l(r)?ic.setProperty(r.id,t,n,i):!1};var Un=ic;function sg(e){e=e??G.EMPTY_OBJECT;let t=e.subtreeMetadata,n=e.class,i=l(t.properties)?t.properties:{};this._class=n,this._properties=i,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(sg.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});sg.prototype.hasProperty=function(e){return Un.hasProperty(e,this._properties,this._class)};sg.prototype.hasPropertyBySemantic=function(e){return Un.hasPropertyBySemantic(e,this._properties,this._class)};sg.prototype.getPropertyIds=function(e){return Un.getPropertyIds(this._properties,this._class,e)};sg.prototype.getProperty=function(e){return Un.getProperty(e,this._properties,this._class)};sg.prototype.setProperty=function(e,t){return Un.setProperty(e,t,this._properties,this._class)};sg.prototype.getPropertyBySemantic=function(e){return Un.getPropertyBySemantic(e,this._properties,this._class)};sg.prototype.setPropertyBySemantic=function(e,t){return Un.setPropertyBySemantic(e,t,this._properties,this._class)};var eM=sg;var an={INT8:"INT8",UINT8:"UINT8",INT16:"INT16",UINT16:"UINT16",INT32:"INT32",UINT32:"UINT32",INT64:"INT64",UINT64:"UINT64",FLOAT32:"FLOAT32",FLOAT64:"FLOAT64"},il={INTEGER:"int",UNSIGNED_INTEGER:"uint",FLOAT:"float"};an.typeInfo={INT8:{vectorCompatible:!0,size:1,maximumValue:127,minimumValue:-128,category:il.INTEGER},UINT8:{vectorCompatible:!0,size:1,maximumValue:255,minimumValue:0,category:il.UNSIGNED_INTEGER},INT16:{vectorCompatible:!0,size:2,maximumValue:32767,minimumValue:-32768,category:il.INTEGER},UINT16:{vectorCompatible:!0,size:2,maximumValue:65535,minimumValue:0,category:il.UNSIGNED_INTEGER},INT32:{vectorCompatible:!0,size:4,maximumValue:2147483647,minimumValue:-2147483648,category:il.INTEGER},UINT32:{vectorCompatible:!0,size:4,maximumValue:4294967295,minimumValue:0,category:il.UNSIGNED_INTEGER},INT64:{vectorCompatible:!1,size:8,maximumValue:BigInt("9223372036854775807"),minimumValue:BigInt("-9223372036854775808"),category:il.INTEGER,downcastFunction:e=>an.clampToLimits(e,an.INT32)},UINT64:{vectorCompatible:!1,size:8,maximumValue:BigInt("18446744073709551615"),minimumValue:BigInt(0),category:il.UNSIGNED_INTEGER,downcastFunction:e=>an.clampToLimits(e,an.UINT32)},FLOAT32:{vectorCompatible:!0,size:4,maximumValue:34028234663852886e22,minimumValue:-34028234663852886e22,category:il.FLOAT},FLOAT64:{vectorCompatible:!0,size:8,maximumValue:Number.MAX_VALUE,minimumValue:-Number.MAX_VALUE,category:il.FLOAT,downcastFunction:e=>Math.fround(e)}};an.getMinimum=function(e){return an.typeInfo[e].minimumValue};an.getMaximum=function(e){return an.typeInfo[e].maximumValue};an.isIntegerType=function(e){return an.typeInfo[e].category!==il.FLOAT};an.isUnsignedIntegerType=function(e){return an.typeInfo[e].category===il.UNSIGNED_INTEGER};an.isVectorCompatible=function(e){return an.typeInfo[e].vectorCompatible};an.category=function(e){return an.typeInfo[e].category};an.gpuComponentType=function(e){switch(e){case an.INT64:return"INT32";case an.UINT64:return"UINT32";case an.FLOAT64:return"FLOAT32";default:return e}};an.normalize=function(e,t){return Math.max(Number(e)/Number(an.getMaximum(t)),-1)};an.unnormalize=function(e,t){let n=an.getMaximum(t),i=an.isUnsignedIntegerType(t)?0:-n;return e=D.sign(e)*Math.round(Math.abs(e)*Number(n)),(t===an.INT64||t===an.UINT64)&&sn.supportsBigInt()&&(e=BigInt(e)),e>n?n:e<i?i:e};an.applyValueTransform=function(e,t,n){return n*e+t};an.unapplyValueTransform=function(e,t,n){return n===0?0:(e-t)/n};an.getSizeInBytes=function(e){return an.typeInfo[e].size};an.clampToLimits=function(e,t){let n=an.getMinimum(t),i=an.getMaximum(t);if(typeof e=="bigint"){let o=BigInt(n),r=BigInt(i);return e<o?n:e>r?i:Number(e)}return Math.max(n,Math.min(i,e))};an.downcastFunction=function(e){let n=an.typeInfo[e].downcastFunction;return l(n)?n:i=>i};an.fromComponentDatatype=function(e){switch(e){case Y.BYTE:return an.INT8;case Y.UNSIGNED_BYTE:return an.UINT8;case Y.SHORT:return an.INT16;case Y.UNSIGNED_SHORT:return an.UINT16;case Y.INT:return an.INT32;case Y.UNSIGNED_INT:return an.UINT32;case Y.FLOAT:return an.FLOAT32;case Y.DOUBLE:return an.FLOAT64}};an.toComponentDatatype=function(e){switch(e){case an.INT8:return Y.BYTE;case an.UINT8:return Y.UNSIGNED_BYTE;case an.INT16:return Y.SHORT;case an.UINT16:return Y.UNSIGNED_SHORT;case an.INT32:return Y.INT;case an.UINT32:return Y.UNSIGNED_INT;case an.FLOAT32:return Y.FLOAT;case an.FLOAT64:return Y.DOUBLE}};an.getDataViewAccessors=function(e,t){return{[an.UINT8]:{get:e.getUint8.bind(e),set:e.setUint8.bind(e)},[an.INT8]:{get:e.getInt8.bind(e),set:e.setInt8.bind(e)},[an.UINT16]:{get:i=>e.getUint16(i,!0),set:(i,o)=>e.setUint16(i,o,!0)},[an.INT16]:{get:i=>e.getInt16(i,!0),set:(i,o)=>e.setInt16(i,o,!0)},[an.UINT32]:{get:i=>e.getUint32(i,!0),set:(i,o)=>e.setUint32(i,o,!0)},[an.INT32]:{get:i=>e.getInt32(i,!0),set:(i,o)=>e.setInt32(i,o,!0)},[an.FLOAT32]:{get:i=>e.getFloat32(i,!0),set:(i,o)=>e.setFloat32(i,o,!0)},[an.FLOAT64]:{get:i=>e.getFloat64(i,!0),set:(i,o)=>e.setFloat64(i,o,!0)},[an.UINT64]:{get:i=>e.getBigUint64(i,!0),set:(i,o)=>e.setBigUint64(i,BigInt(o),!0)},[an.INT64]:{get:i=>e.getBigInt64(i,!0),set:(i,o)=>e.setBigInt64(i,BigInt(o),!0)}}[t]};Object.freeze(an);var Dt=an;var Jo={SCALAR:"SCALAR",VEC2:"VEC2",VEC3:"VEC3",VEC4:"VEC4",MAT2:"MAT2",MAT3:"MAT3",MAT4:"MAT4",BOOLEAN:"BOOLEAN",STRING:"STRING",ENUM:"ENUM"};Jo.isVectorType=function(e){switch(e){case Jo.VEC2:case Jo.VEC3:case Jo.VEC4:return!0;default:return!1}};Jo.isMatrixType=function(e){switch(e){case Jo.MAT2:case Jo.MAT3:case Jo.MAT4:return!0;default:return!1}};Jo.getComponentCount=function(e){switch(e){case Jo.SCALAR:case Jo.STRING:case Jo.ENUM:case Jo.BOOLEAN:return 1;case Jo.VEC2:return 2;case Jo.VEC3:return 3;case Jo.VEC4:return 4;case Jo.MAT2:return 4;case Jo.MAT3:return 9;case Jo.MAT4:return 16}};Jo.getMathType=function(e){switch(e){case Jo.VEC2:return z;case Jo.VEC3:return h;case Jo.VEC4:return se;case Jo.MAT2:return Gi;case Jo.MAT3:return $;case Jo.MAT4:return M;default:return}};Object.freeze(Jo);var dt=Jo;function ta(e){e=e??G.EMPTY_OBJECT;let t=e.id,n=e.type,i=e.componentType,o=e.enumType,r=l(i)&&(e.normalized??!1)&&Dt.isIntegerType(i);this._id=t,this._name=e.name,this._description=e.description,this._semantic=e.semantic,this._isLegacyExtension=e.isLegacyExtension,this._type=n,this._componentType=i,this._enumType=o,this._valueType=l(o)?o.valueType:i,this._isArray=e.isArray??!1,this._isVariableLengthArray=e.isVariableLengthArray??!1,this._arrayLength=e.arrayLength,this._min=We(e.min,!0),this._max=We(e.max,!0),this._normalized=r;let a=We(e.offset,!0),s=We(e.scale,!0),c=l(a)||l(s),u=!0;l(a)||(a=this.expandConstant(0,u)),l(s)||(s=this.expandConstant(1,u)),this._offset=a,this._scale=s,this._hasValueTransform=c,this._noData=We(e.noData,!0),this._default=We(e.default,!0),this._required=e.required??!0,this._extras=We(e.extras,!0),this._extensions=We(e.extensions,!0)}ta.fromJson=function(e){e=e??G.EMPTY_OBJECT;let t=e.id,n=e.property,i=IHe(n),o=DHe(n,e.enums),r;return l(i)?i?r=l(n.optional)?!n.optional:!0:r=n.required??!1:r=!1,new ta({id:t,type:o.type,componentType:o.componentType,enumType:o.enumType,isArray:o.isArray,isVariableLengthArray:o.isVariableLengthArray,arrayLength:o.arrayLength,normalized:n.normalized,min:n.min,max:n.max,offset:n.offset,scale:n.scale,noData:n.noData,default:n.default,required:r,name:n.name,description:n.description,semantic:n.semantic,extras:n.extras,extensions:n.extensions,isLegacyExtension:i})};Object.defineProperties(ta.prototype,{id:{get:function(){return this._id}},name:{get:function(){return this._name}},description:{get:function(){return this._description}},type:{get:function(){return this._type}},enumType:{get:function(){return this._enumType}},componentType:{get:function(){return this._componentType}},valueType:{get:function(){return this._valueType}},isArray:{get:function(){return this._isArray}},isVariableLengthArray:{get:function(){return this._isVariableLengthArray}},arrayLength:{get:function(){return this._arrayLength}},normalized:{get:function(){return this._normalized}},max:{get:function(){return this._max}},min:{get:function(){return this._min}},noData:{get:function(){return this._noData}},default:{get:function(){return this._default}},required:{get:function(){return this._required}},semantic:{get:function(){return this._semantic}},hasValueTransform:{get:function(){return this._hasValueTransform}},offset:{get:function(){return this._offset}},scale:{get:function(){return this._scale}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});function IHe(e){if(e.type==="ARRAY")return!0;let t=e.type;if(t===dt.SCALAR||dt.isMatrixType(t)||dt.isVectorType(t))return!1;if(l(Dt[t]))return!0;if(l(e.noData)||l(e.scale)||l(e.offset)||l(e.required)||l(e.count)||l(e.array)||l(e.optional))return!1}function DHe(e,t){let n=e.type,i=e.componentType,o=n==="ARRAY",r,a,s;o?(r=!0,a=e.componentCount,s=!l(a)):e.array?(r=!0,a=e.count,s=!l(e.count)):(r=!1,a=void 0,s=!1);let c;if(l(e.enumType)&&(c=t[e.enumType]),n===dt.ENUM)return{type:n,componentType:void 0,enumType:c,valueType:c.valueType,isArray:r,isVariableLengthArray:s,arrayLength:a};if(o&&i===dt.ENUM)return{type:i,componentType:void 0,enumType:c,valueType:c.valueType,isArray:r,isVariableLengthArray:s,arrayLength:a};if(n===dt.SCALAR||dt.isMatrixType(n)||dt.isVectorType(n))return{type:n,componentType:i,enumType:void 0,valueType:i,isArray:r,isVariableLengthArray:s,arrayLength:a};if(n===dt.BOOLEAN||n===dt.STRING)return{type:n,componentType:void 0,enumType:void 0,valueType:void 0,isArray:r,isVariableLengthArray:s,arrayLength:a};if(o&&(i===dt.BOOLEAN||i===dt.STRING))return{type:i,componentType:void 0,enumType:void 0,valueType:void 0,isArray:r,isVariableLengthArray:s,arrayLength:a};if(l(i)&&l(Dt[i]))return{type:dt.SCALAR,componentType:i,enumType:void 0,valueType:i,isArray:r,isVariableLengthArray:s,arrayLength:a};if(l(Dt[n]))return{type:dt.SCALAR,componentType:n,enumType:void 0,valueType:n,isArray:r,isVariableLengthArray:s,arrayLength:a}}ta.prototype.normalize=function(e){return this._normalized?gY(e,this._valueType,Dt.normalize):e};ta.prototype.unnormalize=function(e){return this._normalized?gY(e,this._valueType,Dt.unnormalize):e};ta.prototype.applyValueTransform=function(e){return!this._hasValueTransform||this._isVariableLengthArray?e:ta.valueTransformInPlace(e,this._offset,this._scale,Dt.applyValueTransform)};ta.prototype.unapplyValueTransform=function(e){return!this._hasValueTransform||this._isVariableLengthArray?e:ta.valueTransformInPlace(e,this._offset,this._scale,Dt.unapplyValueTransform)};ta.prototype.expandConstant=function(e,t){t=t??!1;let n=this._isArray,i=this._arrayLength,o=dt.getComponentCount(this._type),r=n&&o>1;if(!n&&o===1)return e;if(!n)return new Array(o).fill(e);if(!r)return new Array(i).fill(e);if(!t)return new Array(this._arrayLength*o).fill(e);let a=new Array(o).fill(e);return new Array(this._arrayLength).fill(a)};ta.prototype.handleNoData=function(e){let t=this._noData;if(!l(t))return e;if(!fde(e,t))return e};function fde(e,t){if(!Array.isArray(e))return e===t;if(!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!fde(e[n],t[n]))return!1;return!0}ta.prototype.unpackVectorAndMatrixTypes=function(e,t){t=t??!1;let n=dt.getMathType(this._type),i=this._isArray,o=dt.getComponentCount(this._type),r=i&&o>1;return l(n)?t&&r?e.map(function(a){return n.unpack(a)}):i?n.unpackArray(e):n.unpack(e):e};ta.prototype.packVectorAndMatrixTypes=function(e,t){t=t??!1;let n=dt.getMathType(this._type),i=this._isArray,o=dt.getComponentCount(this._type),r=i&&o>1;return l(n)?t&&r?e.map(function(a){return n.pack(a,[])}):i?n.packArray(e,[]):n.pack(e,[]):e};ta.prototype.validate=function(e){if(!(!l(e)&&l(this._default)))return this._required&&!l(e)?"required property must have a value":this._isArray?PHe(this,e):dde(this,e)};function PHe(e,t){if(!Array.isArray(t))return`value ${t} must be an array`;let n=t.length;if(!e._isVariableLengthArray&&n!==e._arrayLength)return"Array length does not match property.arrayLength";for(let i=0;i<n;i++){let o=dde(e,t[i]);if(l(o))return o}}function dde(e,t){let n=e._type,i=e._componentType,o=e._enumType,r=e._normalized;return dt.isVectorType(n)?RHe(t,n,i):dt.isMatrixType(n)?OHe(t,n,i):n===dt.STRING?MHe(t):n===dt.BOOLEAN?BHe(t):n===dt.ENUM?LHe(t,o):NHe(t,i,r)}function RHe(e,t,n){if(!Dt.isVectorCompatible(n))return`componentType ${n} is incompatible with vector type ${t}`;if(t===dt.VEC2&&!(e instanceof z))return`vector value ${e} must be a Cartesian2`;if(t===dt.VEC3&&!(e instanceof h))return`vector value ${e} must be a Cartesian3`;if(t===dt.VEC4&&!(e instanceof se))return`vector value ${e} must be a Cartesian4`}function OHe(e,t,n){if(!Dt.isVectorCompatible(n))return`componentType ${n} is incompatible with matrix type ${t}`;if(t===dt.MAT2&&!(e instanceof Gi))return`matrix value ${e} must be a Matrix2`;if(t===dt.MAT3&&!(e instanceof $))return`matrix value ${e} must be a Matrix3`;if(t===dt.MAT4&&!(e instanceof M))return`matrix value ${e} must be a Matrix4`}function MHe(e){if(typeof e!="string")return ej(e,dt.STRING)}function BHe(e){if(typeof e!="boolean")return ej(e,dt.BOOLEAN)}function LHe(e,t){let n=typeof e;if(l(t))return n!=="string"||!l(t.valuesByName[e])?`value ${e} is not a valid enum name for ${t.id}`:void 0}function NHe(e,t,n){let i=typeof e;switch(t){case Dt.INT8:case Dt.UINT8:case Dt.INT16:case Dt.UINT16:case Dt.INT32:case Dt.UINT32:case Dt.FLOAT32:case Dt.FLOAT64:return i!=="number"?ej(e,t):isFinite(e)?lde(e,t,n):ude(e,t);case Dt.INT64:case Dt.UINT64:return i!=="number"&&i!=="bigint"?ej(e,t):i==="number"&&!isFinite(e)?ude(e,t):lde(e,t,n)}}function ej(e,t){return`value ${e} does not match type ${t}`}function cde(e,t,n){let i=`value ${e} is out of range for type ${t}`;return n&&(i+=" (normalized)"),i}function lde(e,t,n){if(n){let i=Dt.isUnsignedIntegerType(t)?0:-1;return e<i||e>1?cde(e,t,n):void 0}if(e<Dt.getMinimum(t)||e>Dt.getMaximum(t))return cde(e,t,n)}function ude(e,t){return`value ${e} of type ${t} must be finite`}function gY(e,t,n){if(!Array.isArray(e))return n(e,t);for(let i=0;i<e.length;i++)e[i]=gY(e[i],t,n);return e}ta.valueTransformInPlace=function(e,t,n,i){if(!Array.isArray(e))return i(e,t,n);for(let o=0;o<e.length;o++)e[o]=ta.valueTransformInPlace(e[o],t[o],n[o],i);return e};ta.prototype.cpuBytesPerElement=function(){return hde(this,this.valueType)};ta.prototype.gpuBytesPerElement=function(){let e=Dt.gpuComponentType(this.valueType);return hde(this,e)};function hde(e,t){let n=e.type,i=dt.getComponentCount(n),o=e.isArray?e.arrayLength:1,r=Dt.getSizeInBytes(t);return i*o*r}ta.prototype.isGpuCompatible=function(e){let t=this.type;return!(this.isVariableLengthArray||t===dt.STRING||t===dt.BOOLEAN||this.gpuBytesPerElement()>e)};var _Y=[void 0,"float","vec2","vec3","vec4"],mde=[void 0,"int","ivec2","ivec3","ivec4"],FHe=[void 0,"uint","uvec2","uvec3","uvec4"],kHe={[il.FLOAT]:"uintBitsToFloat",[il.INTEGER]:"int",[il.UNSIGNED_INTEGER]:""};ta.prototype.getGlslTypeWebGL1=function(){let e=dt.getComponentCount(this.type);return this.isArray&&(e=this.arrayLength),this.normalized?_Y[e]:mde[e]};ta.prototype.getGlslType=function(){let e=this.valueType,t=dt.getComponentCount(this.type),n=this.isArray?this.arrayLength:1;return t*=n,!Dt.isIntegerType(e)||this.normalized?_Y[t]:Dt.isUnsignedIntegerType(e)?FHe[t]:mde[t]};ta.prototype.unpackTextureInShader=function(e,t,n,i){let o=this.getGlslType(),r=Dt.gpuComponentType(this.valueType),a=t.length,s=this.type,c=dt.getComponentCount(s)*(this.isArray?this.arrayLength:1),u=Math.floor(a/c),f=`${n}_rawChannels`,d=`${n}_rawBits`,p=`${n}_unpackedValue`,g=`${o} ${p};`,m=`uint ${d};`;i.push(g),i.push(m);let A=`${_Y[a]} ${f} = ${e};`;i.push(A);let y=kHe[Dt.category(r)],x=c>1;for(let b=0;b<c;b++){let C="rgba".slice(b*u,(b+1)*u),E=a>1?`.${C}`:"",S=`${d} = czm_unpackTexture(${f}${E});`,w="";x&&(w=`[${b}]`);let P="",R="";if(this.normalized){let L=Dt.getMaximum(r);P=` * ${1/Number(L)}`,R="float"}let B=`${p}${w} = ${R}(${y}(${d}))${P};`;i.push(S),i.push(B)}return p};ta.prototype.unpackTextureInShaderWebGL1=function(e){return this.normalized?e:`${this.getGlslTypeWebGL1()}(255.0 * ${e})`};var yp=ta;function tM(e){e=e??G.EMPTY_OBJECT;let t=e.count,n=e.property,i=e.classProperty,o=e.bufferViews,r=i.type,a=i.isArray,s=i.isVariableLengthArray,c=i.valueType,u=i.enumType,f=r===dt.STRING,d=r===dt.BOOLEAN,p=0,g;if(s){let _=n.arrayOffsetType??n.offsetType;_=Dt[_]??Dt.UINT32;let T=n.arrayOffsets??n.arrayOffsetBufferView;g=new AY(o[T],_,t+1),p+=g.typedArray.byteLength}let m=dt.getComponentCount(r),A;s?A=g.get(t)-g.get(0):a?A=t*i.arrayLength:A=t;let y=m*A,x;if(f){let _=n.stringOffsetType??n.offsetType;_=Dt[_]??Dt.UINT32;let T=n.stringOffsets??n.stringOffsetBufferView;x=new AY(o[T],_,y+1),p+=x.typedArray.byteLength}(f||d)&&(c=Dt.UINT8);let b;f?b=x.get(y)-x.get(0):d?b=Math.ceil(y/8):b=y;let C=n.values??n.bufferView,E=new AY(o[C],c,b);p+=E.typedArray.byteLength;let S=n.offset,w=n.scale,P=i.hasValueTransform||l(S)||l(w);S=S??i.offset,w=w??i.scale,S=pde(S),w=pde(w);let R,B,L=this;f?R=function(_){return VHe(_,L._values,L._stringOffsets)}:d?(R=function(_){return jHe(_,L._values)},B=function(_,T){GHe(_,L._values,T)}):l(u)?(R=function(_){let T=L._values.get(_);return u.namesByValue[T]},B=function(_,T){let v=u.valuesByName[T];L._values.set(_,v)}):(R=function(_){return L._values.get(_)},B=function(_,T){L._values.set(_,T)}),this._arrayOffsets=g,this._stringOffsets=x,this._values=E,this._classProperty=i,this._count=t,this._vectorComponentCount=m,this._min=n.min,this._max=n.max,this._offset=S,this._scale=w,this._hasValueTransform=P,this._getValue=R,this._setValue=B,this._unpackedValues=void 0,this._extras=n.extras,this._extensions=n.extensions,this._byteLength=p}Object.defineProperties(tM.prototype,{hasValueTransform:{get:function(){return this._hasValueTransform}},offset:{get:function(){return this._offset}},scale:{get:function(){return this._scale}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}},byteLength:{get:function(){return this._byteLength}},classProperty:{get:function(){return this._classProperty}}});tM.prototype.get=function(e){let t=zHe(this,e);return t=this._classProperty.handleNoData(t),l(t)?(t=this._classProperty.normalize(t),t=$He(this,t),this._classProperty.unpackVectorAndMatrixTypes(t)):(t=this._classProperty.default,this._classProperty.unpackVectorAndMatrixTypes(t))};tM.prototype.set=function(e,t){let n=this._classProperty;t=n.packVectorAndMatrixTypes(t),t=JHe(this,t),t=n.unnormalize(t),UHe(this,e,t)};tM.prototype.getTypedArray=function(){if(l(this._values))return this._values.typedArray};function pde(e){if(!Array.isArray(e))return e;let t=[];for(let n=0;n<e.length;n++){let i=e[n];Array.isArray(i)?Qn(t,i):t.push(i)}return t}function zHe(e,t){_de(e)&&Ade(e);let n=e._classProperty,i=n.isArray,o=n.type,r=dt.getComponentCount(o);if(l(e._unpackedValues)){let a=e._unpackedValues[t];return i?We(a,!0):a}return!i&&r===1?e._getValue(t):gde(e,n,t)}function gde(e,t,n){let i,o;if(t.isVariableLengthArray){i=e._arrayOffsets.get(n),o=e._arrayOffsets.get(n+1)-i;let a=dt.getComponentCount(t.type);i*=a,o*=a}else{let s=(t.arrayLength??1)*e._vectorComponentCount;i=n*s,o=s}let r=new Array(o);for(let a=0;a<o;a++)r[a]=e._getValue(i+a);return r}function UHe(e,t,n){KHe(e,t,n)&&Ade(e);let i=e._classProperty,o=i.isArray,r=i.type,a=dt.getComponentCount(r);if(l(e._unpackedValues)){i.isArray&&(n=We(n,!0)),e._unpackedValues[t]=n;return}if(!o&&a===1){e._setValue(t,n);return}let s,c;if(i.isVariableLengthArray)s=e._arrayOffsets.get(t),c=e._arrayOffsets.get(t+1)-s;else{let f=(i.arrayLength??1)*e._vectorComponentCount;s=t*f,c=f}for(let u=0;u<c;++u)e._setValue(s+u,n[u])}function VHe(e,t,n){let i=n.get(e),o=n.get(e+1)-i;return wu(t.typedArray,i,o)}function jHe(e,t){let n=e>>3,i=e%8;return(t.typedArray[n]>>i&1)===1}function GHe(e,t,n){let i=e>>3,o=e%8;n?t.typedArray[i]|=1<<o:t.typedArray[i]&=~(1<<o)}function HHe(e,t){let n=t.dataView,i=e*8,o=0,r=(n.getUint8(i+7)&128)>0,a=!0;for(let s=0;s<8;++s){let c=n.getUint8(i+s);r&&(a?c!==0&&(c=~(c-1)&255,a=!1):c=~c&255),o+=c*Math.pow(256,s)}return r&&(o=-o),o}function WHe(e,t){let n=t.dataView,i=e*8,o=BigInt(0),r=(n.getUint8(i+7)&128)>0,a=!0;for(let s=0;s<8;++s){let c=n.getUint8(i+s);r&&(a?c!==0&&(c=~(c-1)&255,a=!1):c=~c&255),o+=BigInt(c)*(BigInt(1)<<BigInt(s*8))}return r&&(o=-o),o}function qHe(e,t){let n=t.dataView,i=e*8,o=n.getUint32(i,!0),r=n.getUint32(i+4,!0);return o+4294967296*r}function YHe(e,t){let n=t.dataView,i=e*8,o=BigInt(n.getUint32(i,!0)),r=BigInt(n.getUint32(i+4,!0));return o+BigInt(4294967296)*r}function XHe(e){switch(e){case Dt.INT8:return Y.BYTE;case Dt.UINT8:return Y.UNSIGNED_BYTE;case Dt.INT16:return Y.SHORT;case Dt.UINT16:return Y.UNSIGNED_SHORT;case Dt.INT32:return Y.INT;case Dt.UINT32:return Y.UNSIGNED_INT;case Dt.FLOAT32:return Y.FLOAT;case Dt.FLOAT64:return Y.DOUBLE}}function _de(e){if(l(e._unpackedValues))return!1;let t=e._classProperty,n=t.type,i=t.valueType;return n===dt.STRING||i===Dt.INT64&&!sn.supportsBigInt64Array()||i===Dt.UINT64&&!sn.supportsBigUint64Array()}function KHe(e,t,n){if(_de(e))return!0;let i=e._arrayOffsets;if(l(i)){let o=i.get(t+1)-i.get(t),r=n.length;if(o!==r)return!0}return!1}function Ade(e){e._unpackedValues=QHe(e),e._arrayOffsets=void 0,e._stringOffsets=void 0,e._values=void 0}function QHe(e){let t=e._count,n=new Array(t),i=e._classProperty,o=i.isArray,r=i.type,a=dt.getComponentCount(r);if(!o&&a===1){for(let s=0;s<t;++s)n[s]=e._getValue(s);return n}for(let s=0;s<t;s++)n[s]=gde(e,i,s);return n}function $He(e,t){let i=e._classProperty.isVariableLengthArray;return!e._hasValueTransform||i?t:yp.valueTransformInPlace(t,e._offset,e._scale,Dt.applyValueTransform)}function JHe(e,t){let i=e._classProperty.isVariableLengthArray;return!e._hasValueTransform||i?t:yp.valueTransformInPlace(t,e._offset,e._scale,Dt.unapplyValueTransform)}function AY(e,t,n){let i=this,o,r,a;if(t===Dt.INT64)sn.supportsBigInt()?sn.supportsBigInt64Array()?(o=new BigInt64Array(e.buffer,e.byteOffset,n),a=function(s,c){i.typedArray[s]=BigInt(c)}):(o=new Uint8Array(e.buffer,e.byteOffset,n*8),r=function(s){return WHe(s,i)}):(_t("INT64 type is not fully supported on this platform. Values greater than 2^53 - 1 or less than -(2^53 - 1) may lose precision when read."),o=new Uint8Array(e.buffer,e.byteOffset,n*8),r=function(s){return HHe(s,i)});else if(t===Dt.UINT64)sn.supportsBigInt()?sn.supportsBigUint64Array()?(o=new BigUint64Array(e.buffer,e.byteOffset,n),a=function(s,c){i.typedArray[s]=BigInt(c)}):(o=new Uint8Array(e.buffer,e.byteOffset,n*8),r=function(s){return YHe(s,i)}):(_t("UINT64 type is not fully supported on this platform. Values greater than 2^53 - 1 may lose precision when read."),o=new Uint8Array(e.buffer,e.byteOffset,n*8),r=function(s){return qHe(s,i)});else{let s=XHe(t);o=Y.createArrayBufferView(s,e.buffer,e.byteOffset,n),a=function(c,u){i.typedArray[c]=u}}l(r)||(r=function(s){return i.typedArray[s]}),this.typedArray=o,this.dataView=new DataView(o.buffer,o.byteOffset),this.get=r,this.set=a,this._componentType=t}var nM=tM;function Xh(e){e=e??G.EMPTY_OBJECT;let t=e.count,n=e.class,i=0,o={};if(l(e.properties)){for(let r in e.properties)if(e.properties.hasOwnProperty(r)){let a=new nM({count:t,property:e.properties[r],classProperty:n.properties[r],bufferViews:e.bufferViews});o[r]=a,i+=a.byteLength}}this._count=t,this._class=n,this._properties=o,this._byteLength=i}Object.defineProperties(Xh.prototype,{count:{get:function(){return this._count}},class:{get:function(){return this._class}},byteLength:{get:function(){return this._byteLength}},properties:{get:function(){return this._properties}}});Xh.prototype.hasProperty=function(e){return Un.hasProperty(e,this._properties,this._class)};Xh.prototype.hasPropertyBySemantic=function(e){return Un.hasPropertyBySemantic(e,this._properties,this._class)};Xh.prototype.getPropertyIds=function(e){return Un.getPropertyIds(this._properties,this._class,e)};Xh.prototype.getProperty=function(e,t){let n=this._properties[t],i;return l(n)?i=n.get(e):i=ZHe(this._class,t),i};Xh.prototype.setProperty=function(e,t,n){let i=this._properties[t];return l(i)?(i.set(e,n),!0):!1};Xh.prototype.getPropertyBySemantic=function(e,t){let n,i=this._class.propertiesBySemantic;if(l(i)&&(n=i[t]),l(n))return this.getProperty(e,n.id)};Xh.prototype.setPropertyBySemantic=function(e,t,n){let i,o=this._class.propertiesBySemantic;return l(o)&&(i=o[t]),l(i)?this.setProperty(e,i.id,n):!1};Xh.prototype.getPropertyTypedArray=function(e){let t=this._properties[e];if(l(t))return t.getTypedArray()};Xh.prototype.getPropertyTypedArrayBySemantic=function(e){let t,n=this._class.propertiesBySemantic;if(l(n)&&(t=n[e]),l(t))return this.getPropertyTypedArray(t.id)};function ZHe(e,t){let n=e.properties;if(!l(n))return;let i=n[t];if(l(i)&&l(i.default)){let o=i.default;return i.isArray&&(o=We(o,!0)),o=i.normalize(o),i.unpackVectorAndMatrixTypes(o)}}var wd=Xh;var yY=class{get cacheKey(){_e.throwInstantiationError()}load(){_e.throwInstantiationError()}unload(){}process(t){return!1}getError(t,n){l(n)&&l(n.message)&&(t+=`
- ${n.message}`);let i=new re(t);return l(n)&&(i.stack=`Original stack:
- ${n.stack}
- Handler stack:
- ${i.stack}`),i}isDestroyed(){return!1}destroy(){return this.unload(),fe(this)}},qi=yY;var yde={UNLOADED:0,LOADING:1,LOADED:2,PROCESSING:3,READY:4,FAILED:5};Object.freeze(yde);var gt=yde;var tj=class extends qi{constructor(t){super(),t=t??G.EMPTY_OBJECT;let n=t.typedArray,i=t.resource,o=t.cacheKey;this._typedArray=n,this._resource=i,this._cacheKey=o,this._state=gt.UNLOADED,this._promise=void 0}get cacheKey(){return this._cacheKey}get typedArray(){return this._typedArray}async load(){return l(this._promise)?this._promise:l(this._typedArray)?(this._promise=Promise.resolve(this),this._promise):(this._promise=e6e(this),this._promise)}static _fetchArrayBuffer(t){return t.fetchArrayBuffer()}unload(){this._typedArray=void 0}};async function e6e(e){let t=e._resource;e._state=gt.LOADING;try{let n=await tj._fetchArrayBuffer(t);return e.isDestroyed()?void 0:(e._typedArray=new Uint8Array(n),e._state=gt.READY,e)}catch(n){if(e.isDestroyed())return;e._state=gt.FAILED;let i=`Failed to load external buffer: ${t.url}`;throw e.getError(i,n)}}var ub=tj;var S0n=(function(){var e="b9H79Tebbbe9ok9Geueu9Geub9Gbb9Gruuuuuuueu9Gvuuuuueu9Gduueu9Gluuuueu9Gvuuuuub9Gouuuuuub9Gluuuub9GiuuueuiE8AdilveoveovrrwrrrDDoDrbqqbelve9Weiiviebeoweuecj:Gdkr:PlCo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8F9TW79O9V9Wt9FW9U9J9V9KW9wWVtW949c919M9MWV9mW4W2be8A9TW79O9V9Wt9FW9U9J9V9KW9wWVtW949c919M9MWVbd8F9TW79O9V9Wt9FW9U9J9V9KW9wWVtW949c919M9MWV9c9V919U9KbiE9TW79O9V9Wt9FW9U9J9V9KW9wWVtW949wWV79P9V9UblY9TW79O9V9Wt9FW9U9J9V9KW69U9KW949c919M9MWVbv8E9TW79O9V9Wt9FW9U9J9V9KW69U9KW949c919M9MWV9c9V919U9Kbo8A9TW79O9V9Wt9FW9U9J9V9KW69U9KW949wWV79P9V9UbrE9TW79O9V9Wt9FW9U9J9V9KW69U9KW949tWG91W9U9JWbwa9TW79O9V9Wt9FW9U9J9V9KW69U9KW949tWG91W9U9JW9c9V919U9KbDL9TW79O9V9Wt9FW9U9J9V9KWS9P2tWV9p9JtbqK9TW79O9V9Wt9FW9U9J9V9KWS9P2tWV9r919HtbkL9TW79O9V9Wt9FW9U9J9V9KWS9P2tWVT949WbxY9TW79O9V9Wt9FW9U9J9V9KWS9P2tWVJ9V29VVbmE9TW79O9V9Wt9F9V9Wt9P9T9P96W9wWVtW94J9H9J9OWbza9TW79O9V9Wt9F9V9Wt9P9T9P96W9wWVtW94J9H9J9OW9ttV9P9WbHa9TW79O9V9Wt9F9V9Wt9P9T9P96W9wWVtW94SWt9J9O9sW9T9H9WbOK9TW79O9V9Wt9F79W9Ht9P9H29t9VVt9sW9T9H9WbAl79IV9RbXDwebcekdKYq:8f8Adbk;wadhud9:8Jjjjjbc;qw9Rgr8KjjjjbcbhwdnaeTmbabcbyd;i:I:cjbaoaocb9iEgDc:GeV86bbarc;adfcbcjdz:xjjjb8AdnaiTmbarc;adfadalz:wjjjb8Akarc;abfalfcbcbcjdal9RalcFe0Ez:xjjjb8Aarc;abfarc;adfalz:wjjjb8Aar9cb83iUar9cb83i8War9cb83iyar9cb83iaar9cb83iKar9cb83izar9cb83iwar9cb83ibcj;abal9Uc;WFbGcjdalca0Ehqdnaicd6mbavcd9imbaDTmbadcefhkaqci2gxal2hmarc;alfclfhParc;qlfceVhsarc;qofclVhzcbhHincdhOcbhAdnavci6mbar9cb83i;Ooar9cb83i;Goar9cb83i;yoar9cb83i;qoadaHfgoybbhCcbhXincbhwcbhQdninaoalfhLaoybbgKaC7aQVhQawcP0meaLhoaKhCawcefgwaXfai6mbkkcbhCarc;qofhwincwhYcwh8AdnaQaC93gocFeGgEcs0mbclh8AaEci0mbcdcbaEEh8Akdnaocw4cFeGgEcs0mbclhYaEci0mbcdcbaEEhYkaYa8AfhEawydbh3cwhYcwh8Adnaocz4cFeGg5cs0mbclh8Aa5ci0mbcdcba5Eh8AkaEa3fhEdnaocFFFFb0mbclhYaocFFF8F0mbcbcdaocjjjw6EhYkawaEa8AfaYfBdbawclfhwaCcefgCcw9hmbkaLhoaKhCaXczfgXai6mbkcbhocehwazhQinawaoaQydbarc;qofaocdtfydb6EhoaQclfhQawcefgwcw9hmbkaoclthAcihOkcbhEarc;qlfcbcjdz:xjjjb8AarcbBd;ilar9cb83i;aladh8Eaqh8Fakh3inarc;qlfadaEaEcb9h9Ral2falz:wjjjb8Aaia8Faia8F6EhadnaqaiaE9RaEaqfai6EgKcsfc9WGgoaK9nmbarc;qofaKfcbaoaK9Rz:xjjjb8AkadaEal2fhhcbhginagaAVcl4hXarc;alfagcdtfh8JaHh8Kcbh8Lina8LaHfhwdndndndndndndnagPlbedibkaKTmvahawfhoarc;qlfawfRbbhQarc;qofhwaahCinawaoRbbgYaQ9RgQcetaQcKtc8F91786bbawcefhwaoalfhoaYhQaEaCcufgC9hmbxvkkaKTmla8Kc9:Ghoa8LcitcwGh8Aarc;qlfawceVfRbbcwtarc;qlfawc9:GfRbbVhQarc;qofhwaahCinawa3aofRbbcwta8EaofRbbVgYaQ9RgQcetaQcztc8F917cFFiGa8A486bbaoalfhoawcefhwaYhQaEaCcufgC9hmbxlkkasa8Kc98GgQfhoa3aQfhYarc;qlfawc98GgQfRbbhCcwhwinaoRbbawtaCVhCaocefhoawcwfgwca9hmbxdkkaKTmdxekaKTmea8Lcith5ahaQfh8AcbhLina8ARbbhQcwhoaYhwinawRbbaotaQVhQawcefhwaocwfgoca9hmbkarc;qofaLfaQaC7aX93a5486bbaYalfhYa8Aalfh8AaQhCaLcefgLaK9hmbkka8Jydbh8AcbhLarc;qofhoincdhQcbhwinaQaoawfRbbcb9hfhQawcefgwcz9hmbkclhCcbhwinaCaoawfRbbcd0fhCawcefgwcz9hmbkcwhYcbhwinaYaoawfRbbcP0fhYawcefgwcz9hmbkaQaCaQaC6EgwaYawaY6Egwczawcz6Ea8Afh8AaoczfhoaLczfgLaK6mbka8Ja8ABdbka8Kcefh8Ka8Lcefg8Lcl9hmbkagcefggaO9hmbka8Eamfh8Ea8Faxfh8Fa3amfh3aEaxfgEai6mbkcbhocehwaPhQinawaoaQydbarc;alfaocdtfydb6EhoaQclfhQaOawcefgw9hmbkaraHcd4faAcdVaoaocdSE86bbaHclfgHal6mbkkabaefhgabcefhoalcd4g8McbaDEhkadcefh8Narc;abfceVhecbhmdndninaiam9nmearc;qofcbcjdz:xjjjb8Aagao9Rak6mdadamal2gwfhxcbhHa8Nawfhzaocbakz:xjjjbg8Fakfh3aqaiam9Ramaqfai6Egscsfgocl4cifcd4hOaoc9WGg8JThPindndndndndndndndndndnaDTmbaraHcd4fRbbgQciGPlbedlbkasTmdaxaHfhoarc;abfaHfRbbhQarc;qofhwashCinawaoRbbgYaQ9RgQcetaQcKtc8F91786bbawcefhwaoalfhoaYhQaCcufgCmbxikkasTmiaHcitcwGh8Aarc;abfaHceVfRbbcwtarc;abfaHc9:GgofRbbVhQaxaofhoarc;qofhwashCinawao8VbbgYaQ9RgQcetaQcztc8F917cFFiGa8A486bbawcefhwaoalfhoaYhQaCcufgCmbxikkaeaHc98Gg8Afhoaza8AfhYarc;abfa8AfRbbhCcwhwinaoRbbawtaCVhCaocefhoawcwfgwca9hmbkasTmdaQcl4hKaHcitcKGhEaxa8Afh8AcbhLina8ARbbhQcwhoaYhwinawRbbaotaQVhQawcefhwaocwfgoca9hmbkarc;qofaLfaQaC7aK93aE486bbaYalfhYa8Aalfh8AaQhCaLcefgLas9hmbkkaDmbcbhoxlka8JTmbcbhodninarc;qofaofgwcwf8Pibaw8Pib:e9qTmeaoczfgoa8J9pmdxbkkdnavmbcehoxikcbh8AaOhLaOhKinarc;qofa8Afgocwf8Pibhyao8Pibh8PcdhQcbhwinaQaoawfRbbcb9hfhQawcefgwcz9hmbkclhCcbhwinaCaoawfRbbcd0fhCawcefgwcz9hmbkcwhYcbhwinaYaoawfRbbcP0fhYawcefgwcz9hmbkaQaCaQaC6EgoaYaoaY6Egoczaocz6EaKfhKaocucbaya8P:e9cb9sEgwaoaw6EaLfhLa8Aczfg8Aa8J9pmdxbkka8FaHcd4fgoaoRbbcdaHcetcoGtV86bbxikdnaLas6mbaKas6mba8FaHcd4fgoaoRbbciaHcetcoGtV86bbaga39Ras6mra3arc;qofasz:wjjjbasfh3xikaLaK9phoka8FaHcd4fgwawRbbaoaHcetcoGtV86bbkaga39RaO6mla3cbaOz:xjjjbgaaOfhKdndna8JmbaPhoxekdnagaK9RcK9pmbaPhoxekaocdtc:q:G:cjbfcj:G:cjbaDEg3ydxghcetc;:FFFeGhAcuhEcuahtcu7cFeGh8Ecbh8Karc;qofhQinarc;qofa8KfhXczh8AdndndnahPDbeeeeeeedekcucbaXcwf8PibaX8Pib:e9cb9sEh8AxekcbhoaAh8Aina8Aa8EaQaofRbb9nfh8Aaocefgocz9hmbkkcih5cbhYinczhwdndndna3aYcdtfydbgLPDbeeeeeeedekcucbaXcwf8PibaX8Pib:e9cb9sEhwxekaLcetc;:FFFeGhwcuaLtcu7cFeGhCcbhoinawaCaQaofRbb9nfhwaocefgocz9hmbkkdndnawa8A6mbaLaE9hmeawa8A9hmea3a5cdtfydbcwSmekaYh5awh8AkaYcefgYci9hmbkaaa8Kco4fgoaoRbba5a8Kci4coGtV86bbdndndna3a5cdtfydbgEPDdbbbbbbbebkdncwaE9Tg5TmbcuaEtcu7hwdndnaEceSmbcbh8LaQhXinaXhoa5hYcbhCinaoRbbg8AawcFeGgLa8AaL6EaCaEtVhCaocefhoaYcufgYmbkaKaC86bbaXa5fhXaKcefhKa8La5fg8Lcz6mbxdkkcbh8LaQhXinaXhoa5hYcbhCinaoRbbg8AawcFeGgLa8AaL6EaCcetVhCaocefhoaYcufgYmbkaKaC:T9cFe:d9c:c:qj:bw9:9c:q;c1:I1e:d9c:b:c:e1z9:9ca188bbaXa5fhXaKcefhKa8La5fg8Lcz6mbkkcbhoinaKaQaofRbbgC86bbaKaCawcFeG9pfhKaocefgocz9hmbxikkdnaEceSmbinaKcb86bbaKcefhKxbkkinaKcb86bbaKcefhKxbkkaKaX8Pbw83bwaKaX8Pbb83bbaKczfhKka8Kczfg8Ka8J9pgomeaQczfhQagaK9RcK9pmbkkaoTmlaKh3aKTmlkaHcefgHal9hmbkarc;abfaxascufal2falz:wjjjb8Aasamfhma3hoa3mbkcbhwxdkdnagao9RakalfgwcKcaaDEgQawaQ0EgC9pmbcbhwxdkdnawaQ9pmbaocbaCaw9Rgwz:xjjjbawfhokaoarc;adfalz:wjjjbalfhodnaDTmbaoara8Mz:wjjjba8Mfhokaoab9Rhwxekcbhwkarc;qwf8Kjjjjbawk5babaeadaialcdcbyd;i:I:cjbz:bjjjbk9reduaecd4gdaefgicaaica0Eabcj;abae9Uc;WFbGcjdaeca0Egifcufai9Uae2aiadfaicl4cifcd4f2fcefkmbcbabBd;i:I:cjbk;HPeLu8Jjjjjbc;ae9Rgl8Kjjjjbcbhvdnaeaici9UgocHf6mbabcbyd;m:I:cjbgrc;GeV86bbalc;abfcFecjez:xjjjb8Aal9cu83iUal9cu83i8Wal9cu83iyal9cu83iaal9cu83iKal9cu83izal9cu83iwal9cu83ibabaefc9WfhwabcefgDaofhednaiTmbcmcsarcb9kgqEhkcbhxcbhmcbhPcbhscbhzindnaeaw9nmbcbhvxikazcufhvadaPcdtfgHydbhOaHcwfydbhAaHclfydbhCcbhXdndndninalc;abfavcsGcitfgoydlhQdndndnaoydbgoaO9hmbaQaCSmekdnaoaC9hmbaQaA9hmbaXcefhXxekaoaA9hmeaQaO9hmeaXcdfhXkaXc870mdascufhvaHaXcdtgAcxGgoyd:4:G:cjbcdtfydbhQaHaoyd:0:G:cjbcdtfydbhCaHaoyd:W:G:cjbcdtfydbhOcbhodnindnalavcsGcdtfydbaQ9hmbaohXxdkcuhXavcufhvaocefgocz9hmbkkaxaQaxSgvaXce9iaXak9oVgoGfhxdndndncbcsavEaXaoEgvcs9hmbarce9imbaQaQamaQcefamSgvEgmcefSmecmcsavEhvkaDavaAc;WeGV86bbavcs9hmeaQam9Rgvcetavc8F917hvinaecbcjeavcje6EavcFbGV86bbaecefheavcr4gvmbkaQhmxvkcPhvaDaAcPV86bbaQhmkavTmiavak9omicdhocehXazhAxlkavcufhvaXclfgXc;ab9hmbkkdnaHcecdcbaAaxSEaCaxSEcdtgvyd:W:G:cjbcdtfydbgOTaHavyd:0:G:cjbcdtfydbgCceSGaHavyd:4:G:cjbcdtfydbgQcdSGaxcb9hGaqGgLce9hmbal9cu83iUal9cu83i8Wal9cu83iyal9cu83iaal9cu83iKal9cu83izal9cu83iwal9cu83ibcbhxkcbhXascufgvhodnindnalaocsGcdtfydbaC9hmbaXhAxdkcuhAaocufhoaXcefgXcz9hmbkkcbhodnindnalavcsGcdtfydbaQ9hmbaohXxdkcuhXavcufhvaocefgocz9hmbkkaxaOaxSgKfhHdndnaAcm0mbaAcefhAxekcbcsaCaHSgvEhAaHavfhHkdndnaXcm0mbaXcefhXxekcbcsaQaHSgvEhXaHavfhHkc9:cuaKEhYcbhvaXaAcltVg8AcFeGhodndndninavc;q:G:cjbfRbbaoSmeavcefgvcz9hmbxdkkaLaOax9havcm0VVmbaDavc;WeV86bbxekaDaY86bbaea8A86bbaecefhekdnaKmbaOam9Rgvcetavc8F917hvinaecbcjeavcje6EavcFbGV86bbaecefheavcr4gvmbkaOhmkdnaAcs9hmbaCam9Rgvcetavc8F917hvinaecbcjeavcje6EavcFbGV86bbaecefheavcr4gvmbkaChmkdnaXcs9hmbaQam9Rgvcetavc8F917hvinaecbcjeavcje6EavcFbGV86bbaecefheavcr4gvmbkaQhmkalascdtfaOBdbascefcsGhvdndnaAPzbeeeeeeeeeeeeeebekalavcdtfaCBdbascdfcsGhvkdndnaXPzbeeeeeeeeeeeeeebekalavcdtfaQBdbavcefcsGhvkcihoalc;abfazcitfgXaOBdlaXaCBdbazcefcsGhAcdhXavhsaHhxxekcdhoalascdtfaQBdbcehXascefcsGhsazhAkalc;abfaAcitfgvaCBdlavaQBdbalc;abfazaXfcsGcitfgvaQBdlavaOBdbaDcefhDazaofcsGhzaPcifgPai6mbkkdnaeaw9nmbcbhvxekcbhvinaeavfavc;q:G:cjbfRbb86bbavcefgvcz9hmbkaeab9Ravfhvkalc;aef8KjjjjbavkZeeucbhddninadcefgdc8F0meaeceadt0mbkkadcrfcFeGcr9Uci2cdfabci9U2cHfkmbcbabBd;m:I:cjbk:zderu8Jjjjjbcz9Rhlcbhvdnaeaicvf6mbabcbRb;m:I:cjbc;qeV86bbal9cb83iwabcefhvabaefc98fhodnaiTmbcbhecbhrcbhwindnavao6mbcbskadawcdtfydbgDalcwfaraDae9Rgeaec8F91ge7ae9Rc507grcdtfgqydb9Rgec8E91c9:Gaecdt7arVheinavcbcjeaecje6EaecFbGV86bbavcefhvaecr4gembkaqaDBdbaDheawcefgwai9hmbkkdnavao9nmbcbskavcbBbbavab9RclfhvkavkBeeucbhddninadcefgdc8F0meaeceadt0mbkkabadcwfcFeGcr9U2cvfk:dvli99dui99ludnaeTmbcuadcetcuftcu7:Zhvdndncuaicuftcu7:ZgoJbbbZMgr:lJbbb9p9DTmbar:Ohwxekcjjjj94hwkcbhicbhDinalclfIdbgrJbbbbJbbjZalIdbgq:lar:lMalcwfIdbgk:lMgr:varJbbbb9BEgrNhxaqarNhralcxfIdbhqdndnakJbbbb9GTmbaxhkxekJbbjZar:l:tgkak:maxJbbbb9GEhkJbbjZax:l:tgxax:marJbbbb9GEhrkdndnaqJbbj:;aqJbbj:;9GEgxJbbjZaxJbbjZ9FEavNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohmxekcjjjj94hmkdndnakJbbj:;akJbbj:;9GEgqJbbjZaqJbbjZ9FEaoNJbbbZJbbb:;akJbbbb9GEMgq:lJbbb9p9DTmbaq:OhPxekcjjjj94hPkdndnarJbbj:;arJbbj:;9GEgqJbbjZaqJbbjZ9FEaoNJbbbZJbbb:;arJbbbb9GEMgr:lJbbb9p9DTmbar:Ohsxekcjjjj94hskdndnadcl9hmbabaDfgzas86bbazcifam86bbazcdfaw86bbazcefaP86bbxekabaifgzas87ebazcofam87ebazclfaw87ebazcdfaP87ebkaicwfhiaDclfhDalczfhlaecufgembkkk;hlld99eud99eudnaeTmbdndncuaicuftcu7:ZgvJbbbZMgo:lJbbb9p9DTmbao:Ohixekcjjjj94hikaic;8FiGhrinabcofcicdalclfIdb:lalIdb:l9EgialcwfIdb:lalaicdtfIdb:l9EEgialcxfIdb:lalaicdtfIdb:l9EEgiarV87ebdndnJbbj:;JbbjZalaicdtfIdbJbbbb9DEgoalaicd7cdtfIdbJ;Zl:1ZNNgwJbbj:;awJbbj:;9GEgDJbbjZaDJbbjZ9FEavNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohqxekcjjjj94hqkabcdfaq87ebdndnalaicefciGcdtfIdbJ;Zl:1ZNaoNgwJbbj:;awJbbj:;9GEgDJbbjZaDJbbjZ9FEavNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohqxekcjjjj94hqkabaq87ebdndnaoalaicufciGcdtfIdbJ;Zl:1ZNNgoJbbj:;aoJbbj:;9GEgwJbbjZawJbbjZ9FEavNJbbbZJbbb:;aoJbbbb9GEMgo:lJbbb9p9DTmbao:Ohixekcjjjj94hikabclfai87ebabcwfhbalczfhlaecufgembkkk;Pviwue99eu8Jjjjjbcjd9Rgo8Kjjjjbadcd4hrdndndnavcd9hmbarTmbaohdarhwinadc:CuBdbadclfhdawcufgwmbkaeTmdarcdthDalhqcbhkinaohdaqhwarhxinadadydbgmcbawIdbgP:8cL4cFeGc:cufaPJbbbb9BEgsamas9kEBdbawclfhwadclfhdaxcufgxmbkaqaDfhqakcefgkae9hmbxdkkaeTmekarcdthqavce9hhDcbhkindndndnaDmbarTmdc:CuhwalhdarhxinawcbadIdbgP:8cL4cFeGc:cufaPJbbbb9BEgmawam9kEhwadclfhdaxcufgxmbxdkkdndndndnavPleddbdkarTmlaohdalhwarhxinadcbcbawIdbgP:8cL4cFeGgmc:cufgsasam0EaPJbbbb9BEBdbadclfhdawclfhwaxcufgxmbxikkarTmicbhdarhwinaoadfcbaladfIdbgP:8cL4cFeGgxc8Aaxc8A0Ec:cufaPJbbbb9BEBdbadclfhdawcufgwmbxdkkarTmdkc:CuhwkcbhdarhminawhxdnavceSmbaoadfydbhxkdndnaladfIdbgPcjjj;8iaxai9RcefgxcLt9R::NJbbbZJbbb:;aPJbbbb9GEMgP:lJbbb9p9DTmbaP:Ohsxekcjjjj94hskabadfascFFFrGaxcKtVBdbadclfhdamcufgmmbkkabaqfhbalaqfhlakcefgkae9hmbkkaocjdf8Kjjjjbk:Olveue99iue99iudnaeTmbceaicufthvcuaitcu7:Zhocbhradcl9hhwcbhDindndnalcwfIdbgqJbbbbaqJbbbb9GEgqJbbjZaqJbbjZ9FEaoNJbbbZMgq:lJbbb9p9DTmbaq:Ohixekcjjjj94hikdndnalIdbgqJbbbbaqJbbbb9GEgqJbbjZaqJbbjZ9FEaoNJbbbZMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkadai9Rcd9TgkaifhidndnalclfIdbgqJbbbbaqJbbbb9GEgqJbbjZaqJbbjZ9FEaoNJbbbZMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkadai9Rcd9ThddndnalcxfIdbgqJbbbbaqJbbbb9GEgqJbbjZaqJbbjZ9FEaoNJbbbZMgq:lJbbb9p9DTmbaq:Ohxxekcjjjj94hxkadaifhiaxce91avVhxdndnawmbabaDfgmai86bbamcifax86bbamcdfad86bbamcefak86bbxekabarfgmai87ebamcofax87ebamclfad87ebamcdfak87ebkarcwfhraDclfhDalczfhlaecufgembkkk;mqdQui998Jjjjjbc:qd9Rgv8Kjjjjbavc:Sefcbc;Kbz:xjjjb8AdnadTmbaiTmbdndnabaeSmbaehoxekavcuadcdtgradcFFFFi0Ecbyd;q:I:cjbHjjjjbbgoBd:SeavceBd:mdaoaearz:wjjjb8AkavcbBd:Oeav9cb83i:Geavc:Gefaoadaiavc:Sefz:pjjjbavyd:Gehwadci9UgDcbyd;q:I:cjbHjjjjbbheavc:Sefavyd:mdgqcdtfaeBdbavaqcefgrBd:mdaecbaDz:xjjjbhkavc:SefarcdtfcuaicdtaicFFFFi0Ecbyd;q:I:cjbHjjjjbbgxBdbavaqcdfgmBd:mdalc;ebfhPawheaxhrinaralIdbaPaeydbgscwascw6EcdtfIdbMUdbaeclfhearclfhraicufgimbkavc:SefamcdtfcuaDcdtadcFFFF970Ecbyd;q:I:cjbHjjjjbbgmBdbdnadci6mbaoheamhraDhiinaraxaeydbcdtfIdbaxaeclfydbcdtfIdbMaxaecwfydbcdtfIdbMUdbaecxfhearclfhraicufgimbkkaqcifhzalc;ebfhHavc;qbfhOavheavyd:KehAavyd:OehCcbhscbhrcbhXcehQinaehLaoarcx2fgKydbhPaKclfydbhdabaXcx2fgecwfaKcwfydbgYBdbaeclfadBdbaeaPBdbakarfce86bbaOaYBdwaOadBdlaOaPBdbamarcdtfcbBdbcih8AdnasTmbaLhiinaOa8AcdtfaiydbgeBdba8AaeaY9haeaP9haead9hGGfh8AaiclfhiascufgsmbkkaXcefhXcbhsinaCaAaKascdtfydbcdtgifydbcdtfgYheawaifgdydbgPhidnaPTmbdninaeydbarSmeaeclfheaicufgiTmdxbkkaeaYaPcdtfc98fydbBdbadadydbcufBdbkascefgsci9hmbkdndndna8ATmbcuhrJbbbbhEcbhdavyd:KehYavyd:OehKindnawaOadcdtfydbcdtgsfydbgeTmbaxasfgiIdbh3aialcuadadcs0EcdtfclfIdbaHaecwaecw6EcdtfIdbMg5Udba5a3:th5aecdthiaKaYasfydbcdtfheinamaeydbgscdtfgPa5aPIdbMg3Udba3aEaEa39DgPEhEasaraPEhraeclfheaic98fgimbkkadcefgda8A9hmbkarcu9hmekaQaD9pmeindnakaQfRbbmbaQhrxdkaDaQcefgQ9hmbxdkka8Acza8Acz6EhsaOheaLhOarcu9hmekkazTmbaqcdtavc:Seffcwfheinaeydbcbyd;u:I:cjbH:bjjjbbaec98fheazcufgzmbkkavc:qdf8Kjjjjbk:0leoucuaicdtgvaicFFFFi0Egocbyd;q:I:cjbHjjjjbbhralalyd9GgwcdtfarBdbalawcefBd9GabarBdbaocbyd;q:I:cjbHjjjjbbhralalyd9GgocdtfarBdbalaocefBd9GabarBdlcuadcdtadcFFFFi0Ecbyd;q:I:cjbHjjjjbbhralalyd9GgocdtfarBdbalaocefBd9GabarBdwabydbcbavz:xjjjb8AabydbhraehladhvinaralydbcdtfgoaoydbcefBdbalclfhlavcufgvmbkcbhvabydlglhoarhwaihDinaoavBdbaoclfhoawydbavfhvawclfhwaDcufgDmbkadci9Uhqdnadcd9nmbabydwhocbhvinaecwfydbhwaeclfydbhDalaeydbcdtfgbabydbgbcefBdbaoabcdtfavBdbalaDcdtfgDaDydbgDcefBdbaoaDcdtfavBdbalawcdtfgwawydbgwcefBdbaoawcdtfavBdbaecxfheaqavcefgv9hmbkkinalalydbarydb9RBdbarclfhralclfhlaicufgimbkkQbabaeadaic;G:G:cjbz:ojjjbkQbabaeadaic;i:H:cjbz:ojjjbk9DeeuabcFeaicdtz:xjjjbhlcbhbdnadTmbindnalaeydbcdtfgiydbcu9hmbaiabBdbabcefhbkaeclfheadcufgdmbkkabk:3vioud9:du8Jjjjjbc;Wa9Rgl8Kjjjjbcbhvalcxfcbc;Kbz:xjjjb8AalcuadcitgoadcFFFFe0Ecbyd;q:I:cjbHjjjjbbgrBdxalceBd2araeadaicezNjjjbalcuaoadcjjjjoGEcbyd;q:I:cjbHjjjjbbgwBdzadcdthednadTmbabhiinaiavBdbaiclfhiadavcefgv9hmbkkawaefhDalabBdwalawBdl9cbhqindnadTmbaq9cq9:hkarhvaDhiadheinaiav8Pibak1:NcFrG87ebavcwfhvaicdfhiaecufgembkkalclfaq:NceGcdtfydbhxalclfaq9ce98gq:NceGcdtfydbhmalc;Wbfcbcjaz:xjjjb8AaDhvadhidnadTmbinalc;Wbfav8VebcdtfgeaeydbcefBdbavcdfhvaicufgimbkkcbhvcbhiinalc;WbfavfgeydbhoaeaiBdbaoaifhiavclfgvcja9hmbkadhvdndnadTmbinalc;WbfaDamydbgicetf8VebcdtfgeaeydbgecefBdbaxaecdtfaiBdbamclfhmavcufgvmbkaq9cv9smdcbhvinabawydbcdtfavBdbawclfhwadavcefgv9hmbxdkkaq9cv9smekkcwhvcbhiinalcxfavfc98fydbcbyd;u:I:cjbH:bjjjbbaiceGheclhvcehiaeTmbkalc;Waf8Kjjjjbk:Awliuo99iud9:cbhv8Jjjjjbca9Rgocbyd:4:I:cjbBdKaocb8Pd:W:I:cjb83izaocbyd;e:I:cjbBdwaocb8Pd:8:I:cjb83ibaicd4hrdndnadmbJFFuFhwJFFuuhDJFFuuhqJFFuFhkJFFuuhxJFFuFhmxekarcdthPaehsincbhiinaoczfaifgzasaifIdbgwazIdbgDaDaw9EEUdbaoaifgzawazIdbgDaDaw9DEUdbaiclfgicx9hmbkasaPfhsavcefgvad9hmbkaoIdKhDaoIdwhwaoIdChqaoIdlhkaoIdzhxaoIdbhmkdnadTmbJbbbbJbFu9hJbbbbamax:tgmamJbbbb9DEgmakaq:tgkakam9DEgkawaD:tgwawak9DEgw:vawJbbbb9BEhwdnalmbarcdthoindndnaeclfIdbaq:tawNJbbbZMgk:lJbbb9p9DTmbak:Ohixekcjjjj94hikai:S9cC:ghHdndnaeIdbax:tawNJbbbZMgk:lJbbb9p9DTmbak:Ohixekcjjjj94hikaHai:S:ehHdndnaecwfIdbaD:tawNJbbbZMgk:lJbbb9p9DTmbak:Ohixekcjjjj94hikabaHai:T9cy:g:e83ibaeaofheabcwfhbadcufgdmbxdkkarcdthoindndnaeIdbax:tawNJbbbZMgk:lJbbb9p9DTmbak:Ohixekcjjjj94hikai:SgH9ca:gaH9cz:g9cjjj;4s:d:eaH9cFe:d:e9cF:bj;4:pj;ar:d9c:bd9:9c:p;G:d;4j:E;ar:d9cH9:9c;d;H:W:y:m:g;d;Hb:d9cv9:9c;j:KM;j:KM;j:Kd:dhOdndnaeclfIdbaq:tawNJbbbZMgk:lJbbb9p9DTmbak:Ohixekcjjjj94hikai:SgH9ca:gaH9cz:g9cjjj;4s:d:eaH9cFe:d:e9cF:bj;4:pj;ar:d9c:bd9:9c:p;G:d;4j:E;ar:d9cH9:9c;d;H:W:y:m:g;d;Hb:d9cq9:9cM;j:KM;j:KM;jl:daO:ehOdndnaecwfIdbaD:tawNJbbbZMgk:lJbbb9p9DTmbak:Ohixekcjjjj94hikabaOai:SgH9ca:gaH9cz:g9cjjj;4s:d:eaH9cFe:d:e9cF:bj;4:pj;ar:d9c:bd9:9c:p;G:d;4j:E;ar:d9cH9:9c;d;H:W:y:m:g;d;Hb:d9cC9:9c:KM;j:KM;j:KMD:d:e83ibaeaofheabcwfhbadcufgdmbkkk9teiucbcbyd;y:I:cjbgeabcifc98GfgbBd;y:I:cjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabk9teiucbcbyd;y:I:cjbgeabcrfc94GfgbBd;y:I:cjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikTeeucbabcbyd;y:I:cjbge9Rcifc98GaefgbBd;y:I:cjbdnabZbcztge9nmbabae9RcFFifcz4nb8Akkk;Sddbcj:Gdk;idbbbbdbbblbbbwbbbbbbbebbbdbbblbbbwbbbbbbbbbbbbbbbbbbbebbbdbbbbbbbebbbbbbbbbbbbbbbb4:h9w9N94:P:gW:j9O:ye9Pbbbbbb:l29hZ;69:9kZ;N;76Z;rg97Z;z;o9xZ8J;B85Z;:;u9yZ;b;k9HZ:2;Z9DZ9e:l9mZ59A8KZ:r;T3Z:A:zYZ79OHZ;j4::8::Y:D9V8:bbbb9s:49:Z8R:hBZ9M9M;M8:L;z;o8:;8:PG89q;x:J878R:hQ8::M:B;e87bbbbbbjZbbjZbbjZ:E;V;N8::Y:DsZ9i;H;68:xd;R8:;h0838:;W:NoZbbbb:WV9O8:uf888:9i;H;68:9c9G;L89;n;m9m89;D8Ko8:bbbbf:8tZ9m836ZS:2AZL;zPZZ818EZ9e:lxZ;U98F8:819E;68:FFuuFFuuFFuuFFuFFFuFFFuFbc;i:IdkCebbbebbbebbbdbbb9G:rbb",t=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 n,i=WebAssembly.instantiate(o(e),{}).then(function(g){n=g.instance,n.exports.__wasm_call_ctors(),n.exports.meshopt_encodeVertexVersion(1),n.exports.meshopt_encodeIndexVersion(1)});function o(g){for(var m=new Uint8Array(g.length),A=0;A<g.length;++A){var y=g.charCodeAt(A);m[A]=y>96?y-97:y>64?y-39:y+4}for(var x=0,A=0;A<g.length;++A)m[x++]=m[A]<60?t[m[A]]:(m[A]-60)*64+m[++A];return m.buffer.slice(0,x)}function r(g){if(!g)throw new Error("Assertion failed")}function a(g){return new Uint8Array(g.buffer,g.byteOffset,g.byteLength)}function s(g,m,A,y){var x=n.exports.sbrk,b=x(m.length*4),C=x(A*4),E=new Uint8Array(n.exports.memory.buffer),S=a(m);E.set(S,b),y&&y(b,b,m.length,A);var w=g(C,b,m.length,A);E=new Uint8Array(n.exports.memory.buffer);var P=new Uint32Array(A);new Uint8Array(P.buffer).set(E.subarray(C,C+A*4)),S.set(E.subarray(b,b+m.length*4)),x(b-x(0));for(var R=0;R<m.length;++R)m[R]=P[m[R]];return[P,w]}function c(g,m,A,y){var x=n.exports.sbrk,b=x(A*4),C=x(A*y),E=new Uint8Array(n.exports.memory.buffer);E.set(a(m),C),g(b,C,A,y),E=new Uint8Array(n.exports.memory.buffer);var S=new Uint32Array(A);return new Uint8Array(S.buffer).set(E.subarray(b,b+A*4)),x(b-x(0)),S}function u(g,m,A,y,x,b,C){var E=n.exports.sbrk,S=E(m),w=E(y*x),P=new Uint8Array(n.exports.memory.buffer);P.set(a(A),w);var R=g(S,m,w,y,x,b,C),B=new Uint8Array(R);return B.set(P.subarray(S,S+R)),E(S-E(0)),B}function f(g){for(var m=0,A=0;A<g.length;++A){var y=g[A];m=m<y?y:m}return m}function d(g,m){if(r(m==2||m==4),m==4)return new Uint32Array(g.buffer,g.byteOffset,g.byteLength/4);var A=new Uint16Array(g.buffer,g.byteOffset,g.byteLength/2);return new Uint32Array(A)}function p(g,m,A,y,x,b,C){var E=n.exports.sbrk,S=E(A*y),w=E(A*b),P=new Uint8Array(n.exports.memory.buffer);P.set(a(m),w),g(S,A,y,x,w,C);var R=new Uint8Array(A*y);return R.set(P.subarray(S,S+A*y)),E(S-E(0)),R}return{ready:i,supported:!0,reorderMesh:function(g,m,A){r(g instanceof Uint32Array||g instanceof Int32Array),r(!m||g.length%3==0);var y=m?A?n.exports.meshopt_optimizeVertexCacheStrip:n.exports.meshopt_optimizeVertexCache:void 0;return s(n.exports.meshopt_optimizeVertexFetchRemap,g,f(g)+1,y)},reorderPoints:function(g,m){return r(g instanceof Float32Array),r(g.length%m==0),r(m>=3),c(n.exports.meshopt_spatialSortRemap,g,g.length/m,m*4)},encodeVertexBuffer:function(g,m,A){r(A>0&&A<=256),r(A%4==0);var y=n.exports.meshopt_encodeVertexBufferBound(m,A);return u(n.exports.meshopt_encodeVertexBuffer,y,g,m,A)},encodeVertexBufferLevel:function(g,m,A,y,x){r(A>0&&A<=256),r(A%4==0),r(y>=0&&y<=3),r(x===void 0||x==0||x==1);var b=n.exports.meshopt_encodeVertexBufferBound(m,A);return u(n.exports.meshopt_encodeVertexBufferLevel,b,g,m,A,y,x===void 0?-1:x)},encodeIndexBuffer:function(g,m,A){r(A==2||A==4),r(m%3==0);var y=d(g,A),x=n.exports.meshopt_encodeIndexBufferBound(m,f(y)+1);return u(n.exports.meshopt_encodeIndexBuffer,x,y,m,4)},encodeIndexSequence:function(g,m,A){r(A==2||A==4);var y=d(g,A),x=n.exports.meshopt_encodeIndexSequenceBound(m,f(y)+1);return u(n.exports.meshopt_encodeIndexSequence,x,y,m,4)},encodeGltfBuffer:function(g,m,A,y,x){var b={ATTRIBUTES:this.encodeVertexBufferLevel,TRIANGLES:this.encodeIndexBuffer,INDICES:this.encodeIndexSequence};return r(b[y]),b[y](g,m,A,2,x===void 0?0:x)},encodeFilterOct:function(g,m,A,y){return r(A==4||A==8),r(y>=2&&y<=16),p(n.exports.meshopt_encodeFilterOct,g,m,A,y,16)},encodeFilterQuat:function(g,m,A,y){return r(A==8),r(y>=4&&y<=16),p(n.exports.meshopt_encodeFilterQuat,g,m,A,y,16)},encodeFilterExp:function(g,m,A,y,x){r(A>0&&A%4==0),r(y>=1&&y<=24);var b={Separate:0,SharedVector:1,SharedComponent:2,Clamped:3};return r(!x||x in b),p(n.exports.meshopt_encodeFilterExp,g,m,A,y,A,x?b[x]:1)},encodeFilterColor:function(g,m,A,y){return r(A==4||A==8),r(y>=2&&y<=16),p(n.exports.meshopt_encodeFilterColor,g,m,A,y,16)}}})();var bA=(function(){var e="b9H79Tebbbe8Fv9Gbb9Gvuuuuueu9Giuuub9Geueu9Giuuueuixkbeeeddddillviebeoweuecj:Gdkr;Neqo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbeY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVbdE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbiL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtblK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949WboY9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVJ9V29VVbrl79IV9Rbwq:VZkdbk:XYi5ud9:du8Jjjjjbcj;kb9Rgv8Kjjjjbc9:hodnalTmbcuhoaiRbbgrc;WeGc:Ge9hmbarcsGgwce0mbc9:hoalcufadcd4cbawEgDadfgrcKcaawEgqaraq0Egk6mbaicefhxcj;abad9Uc;WFbGcjdadca0EhmaialfgPar9Rgoadfhsavaoadz:jjjjbgzceVhHcbhOdndninaeaO9nmeaPax9RaD6mdamaeaO9RaOamfgoae6EgAcsfglc9WGhCabaOad2fhXaAcethQaxaDfhiaOaeaoaeao6E9RhLalcl4cifcd4hKazcj;cbfaAfhYcbh8AazcjdfhEaHh3incbh5dnawTmbaxa8Acd4fRbbh5kcbh8Eazcj;cbfhqinaih8Fdndndndna5a8Ecet4ciGgoc9:fPdebdkaPa8F9RaA6mrazcj;cbfa8EaA2fa8FaAz:jjjjb8Aa8FaAfhixdkazcj;cbfa8EaA2fcbaAz:kjjjb8Aa8FhixekaPa8F9RaK6mva8FaKfhidnaCTmbaPai9RcK6mbaocdtc:q:G:cjbfcj:G:cjbawEhaczhrcbhlinargoc9Wfghaqfhrdndndndndndnaaa8Fahco4fRbbalcoG4ciGcdtfydbPDbedvivvvlvkar9cb83bwar9cb83bbxlkarcbaiRbdai8Xbb9c:c:qj:bw9:9c:q;c1:I1e:d9c:b:c:e1z9:gg9cjjjjjz:dg8J9qE86bbaqaofgrcGfcbaicdfa8J9c8N1:NfghRbbag9cjjjjjw:dg8J9qE86bbarcVfcbaha8J9c8M1:NfghRbbag9cjjjjjl:dg8J9qE86bbarc7fcbaha8J9c8L1:NfghRbbag9cjjjjjd:dg8J9qE86bbarctfcbaha8J9c8K1:NfghRbbag9cjjjjje:dg8J9qE86bbarc91fcbaha8J9c8J1:NfghRbbag9cjjjj;ab:dg8J9qE86bbarc4fcbaha8J9cg1:NfghRbbag9cjjjja:dg8J9qE86bbarc93fcbaha8J9ch1:NfghRbbag9cjjjjz:dgg9qE86bbarc94fcbahag9ca1:NfghRbbai8Xbe9c:c:qj:bw9:9c:q;c1:I1e:d9c:b:c:e1z9:gg9cjjjjjz:dg8J9qE86bbarc95fcbaha8J9c8N1:NfgiRbbag9cjjjjjw:dg8J9qE86bbarc96fcbaia8J9c8M1:NfgiRbbag9cjjjjjl:dg8J9qE86bbarc97fcbaia8J9c8L1:NfgiRbbag9cjjjjjd:dg8J9qE86bbarc98fcbaia8J9c8K1:NfgiRbbag9cjjjjje:dg8J9qE86bbarc99fcbaia8J9c8J1:NfgiRbbag9cjjjj;ab:dg8J9qE86bbarc9:fcbaia8J9cg1:NfgiRbbag9cjjjja:dg8J9qE86bbarcufcbaia8J9ch1:NfgiRbbag9cjjjjz:dgg9qE86bbaiag9ca1:NfhixikaraiRblaiRbbghco4g8Ka8KciSg8KE86bbaqaofgrcGfaiclfa8Kfg8KRbbahcl4ciGg8La8LciSg8LE86bbarcVfa8Ka8Lfg8KRbbahcd4ciGg8La8LciSg8LE86bbarc7fa8Ka8Lfg8KRbbahciGghahciSghE86bbarctfa8Kahfg8KRbbaiRbeghco4g8La8LciSg8LE86bbarc91fa8Ka8Lfg8KRbbahcl4ciGg8La8LciSg8LE86bbarc4fa8Ka8Lfg8KRbbahcd4ciGg8La8LciSg8LE86bbarc93fa8Ka8Lfg8KRbbahciGghahciSghE86bbarc94fa8Kahfg8KRbbaiRbdghco4g8La8LciSg8LE86bbarc95fa8Ka8Lfg8KRbbahcl4ciGg8La8LciSg8LE86bbarc96fa8Ka8Lfg8KRbbahcd4ciGg8La8LciSg8LE86bbarc97fa8Ka8Lfg8KRbbahciGghahciSghE86bbarc98fa8KahfghRbbaiRbigico4g8Ka8KciSg8KE86bbarc99faha8KfghRbbaicl4ciGg8Ka8KciSg8KE86bbarc9:faha8KfghRbbaicd4ciGg8Ka8KciSg8KE86bbarcufaha8KfgrRbbaiciGgiaiciSgiE86bbaraifhixdkaraiRbwaiRbbghcl4g8Ka8KcsSg8KE86bbaqaofgrcGfaicwfa8Kfg8KRbbahcsGghahcsSghE86bbarcVfa8KahfghRbbaiRbeg8Kcl4g8La8LcsSg8LE86bbarc7faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarctfaha8KfghRbbaiRbdg8Kcl4g8La8LcsSg8LE86bbarc91faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc4faha8KfghRbbaiRbig8Kcl4g8La8LcsSg8LE86bbarc93faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc94faha8KfghRbbaiRblg8Kcl4g8La8LcsSg8LE86bbarc95faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc96faha8KfghRbbaiRbvg8Kcl4g8La8LcsSg8LE86bbarc97faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc98faha8KfghRbbaiRbog8Kcl4g8La8LcsSg8LE86bbarc99faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc9:faha8KfghRbbaiRbrgicl4g8Ka8KcsSg8KE86bbarcufaha8KfgrRbbaicsGgiaicsSgiE86bbaraifhixekarai8Pbw83bwarai8Pbb83bbaiczfhikdnaoaC9pmbalcdfhlaoczfhraPai9RcL0mekkaoaC6moaimexokaCmva8FTmvkaqaAfhqa8Ecefg8Ecl9hmbkdndndndnawTmbasa8Acd4fRbbgociGPlbedrbkaATmdaza8Afh8Fazcj;cbfhhcbh8EaEhaina8FRbbhraahocbhlinaoahalfRbbgqce4cbaqceG9R7arfgr86bbaoadfhoaAalcefgl9hmbkaacefhaa8Fcefh8FahaAfhha8Ecefg8Ecl9hmbxikkaATmeaza8Afhaazcj;cbfhhcbhoceh8EaYh8FinaEaofhlaa8Vbbhrcbhoinala8FaofRbbcwtahaofRbbgqVc;:FiGce4cbaqceG9R7arfgr87bbaladfhlaLaocefgofmbka8FaQfh8FcdhoaacdfhaahaQfhha8EceGhlcbh8EalmbxdkkaATmbaocl4h8Eaza8AfRbbhqcwhoa3hlinalRbbaotaqVhqalcefhlaocwfgoca9hmbkcbhhaEh8FaYhainazcj;cbfahfRbbhrcwhoaahlinalRbbaotarVhralaAfhlaocwfgoca9hmbkara8E94aq7hqcbhoa8Fhlinalaqao486bbalcefhlaocwfgoca9hmbka8Fadfh8FaacefhaahcefghaA9hmbkkaEclfhEa3clfh3a8Aclfg8Aad6mbkaXazcjdfaAad2z:jjjjb8AazazcjdfaAcufad2fadz:jjjjb8AaAaOfhOaihxaimbkc9:hoxdkcbc99aPax9RakSEhoxekc9:hokavcj;kbf8Kjjjjbaok:ysezu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnalaeci9UgrcHf6mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecjez:kjjjb8Aav9cu83iUav9cu83i8Wav9cu83iyav9cu83iaav9cu83iKav9cu83izav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhldnaeTmbcmcsaDceSEhkcbhxcbhmcbhrcbhicbhoindnalaq9nmbc9:hoxikdndnawRbbgDc;Ve0mbavc;abfaoaDcu7gPcl4fcsGcitfgsydlhzasydbhHdndnaDcsGgsak9pmbavaiaPfcsGcdtfydbaxasEhDaxasTgOfhxxekdndnascsSmbcehOasc987asamffcefhDxekalcefhDal8SbbgscFeGhPdndnascu9mmbaDhlxekalcvfhlaPcFbGhPcrhsdninaD8SbbgOcFbGastaPVhPaOcu9kmeaDcefhDascrfgsc8J9hmbxdkkaDcefhlkcehOaPce4cbaPceG9R7amfhDkaDhmkavc;abfaocitfgsaDBdbasazBdlavaicdtfaDBdbavc;abfaocefcsGcitfgsaHBdbasaDBdlaocdfhoaOaifhidnadcd9hmbabarcetfgsaH87ebasclfaD87ebascdfaz87ebxdkabarcdtfgsaHBdbascwfaDBdbasclfazBdbxekdnaDcpe0mbavaiaqaDcsGfRbbgscl4gP9RcsGcdtfydbaxcefgOaPEhDavaias9RcsGcdtfydbaOaPTgzfgOascsGgPEhsaPThPdndnadcd9hmbabarcetfgHax87ebaHclfas87ebaHcdfaD87ebxekabarcdtfgHaxBdbaHcwfasBdbaHclfaDBdbkavaicdtfaxBdbavc;abfaocitfgHaDBdbaHaxBdlavaicefgicsGcdtfaDBdbavc;abfaocefcsGcitfgHasBdbaHaDBdlavaiazfgicsGcdtfasBdbavc;abfaocdfcsGcitfgDaxBdbaDasBdlaocifhoaiaPfhiaOaPfhxxekaxcbalRbbgsEgHaDc;:eSgDfhOascsGhAdndnascl4gCmbaOcefhzxekaOhzavaiaC9RcsGcdtfydbhOkdndnaAmbazcefhxxekazhxavaias9RcsGcdtfydbhzkdndnaDTmbalcefhDxekalcdfhDal8SbegPcFeGhsdnaPcu9kmbalcofhHascFbGhscrhldninaD8SbbgPcFbGaltasVhsaPcu9kmeaDcefhDalcrfglc8J9hmbkaHhDxekaDcefhDkasce4cbasceG9R7amfgmhHkdndnaCcsSmbaDhsxekaDcefhsaD8SbbglcFeGhPdnalcu9kmbaDcvfhOaPcFbGhPcrhldninas8SbbgDcFbGaltaPVhPaDcu9kmeascefhsalcrfglc8J9hmbkaOhsxekascefhskaPce4cbaPceG9R7amfgmhOkdndnaAcsSmbashlxekascefhlas8SbbgDcFeGhPdnaDcu9kmbascvfhzaPcFbGhPcrhDdninal8SbbgscFbGaDtaPVhPascu9kmealcefhlaDcrfgDc8J9hmbkazhlxekalcefhlkaPce4cbaPceG9R7amfgmhzkdndnadcd9hmbabarcetfgDaH87ebaDclfaz87ebaDcdfaO87ebxekabarcdtfgDaHBdbaDcwfazBdbaDclfaOBdbkavc;abfaocitfgDaOBdbaDaHBdlavaicdtfaHBdbavc;abfaocefcsGcitfgDazBdbaDaOBdlavaicefgicsGcdtfaOBdbavc;abfaocdfcsGcitfgDaHBdbaDazBdlavaiaCTaCcsSVfgicsGcdtfazBdbaiaATaAcsSVfhiaocifhokawcefhwaocsGhoaicsGhiarcifgrae6mbkkcbc99alaqSEhokavc;aef8Kjjjjbaok:clevu8Jjjjjbcz9Rhvdnalaecvf9pmbc9:skdnaiRbbc;:eGc;qeSmbcuskav9cb83iwaicefhoaialfc98fhrdnaeTmbdnadcdSmbcbhwindnaoar6mbc9:skaocefhlao8SbbgicFeGhddndnaicu9mmbalhoxekaocvfhoadcFbGhdcrhidninal8SbbgDcFbGaitadVhdaDcu9kmealcefhlaicrfgic8J9hmbxdkkalcefhokabawcdtfadc8Etc8F91adcd47avcwfadceGcdtVglydbfgiBdbalaiBdbawcefgwae9hmbxdkkcbhwindnaoar6mbc9:skaocefhlao8SbbgicFeGhddndnaicu9mmbalhoxekaocvfhoadcFbGhdcrhidninal8SbbgDcFbGaitadVhdaDcu9kmealcefhlaicrfgic8J9hmbxdkkalcefhokabawcetfadc8Etc8F91adcd47avcwfadceGcdtVglydbfgi87ebalaiBdbawcefgwae9hmbkkcbc99aoarSEk:Lvoeue99dud99eud99dndnadcl9hmbaeTmeindndnabcdfgd8Sbb:Yab8Sbbgi:Ygl:l:tabcefgv8Sbbgo:Ygr:l:tgwJbb;:9cawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai86bbdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad86bbdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad86bbabclfhbaecufgembxdkkaeTmbindndnabclfgd8Ueb:Yab8Uebgi:Ygl:l:tabcdfgv8Uebgo:Ygr:l:tgwJb;:FSawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai87ebdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad87ebdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad87ebabcwfhbaecufgembkkk:4ioiue99dud99dud99dnaeTmbcbhiabhlindndnal8Uebgv:YgoJ:ji:1Salcof8UebgrciVgw:Y:vgDNJbbbZJbbb:;avcu9kEMgq:lJbbb9p9DTmbaq:Ohkxekcjjjj94hkkalclf8Uebhvalcdf8UebhxalarcefciGcetfak87ebdndnax:YgqaDNJbbbZJbbb:;axcu9kEMgm:lJbbb9p9DTmbam:Ohxxekcjjjj94hxkabaiarciGgkfcd7cetfax87ebdndnav:YgmaDNJbbbZJbbb:;avcu9kEMgP:lJbbb9p9DTmbaP:Ohvxekcjjjj94hvkalarcufciGcetfav87ebdndnawaw2:ZgPaPMaoaoN:taqaqN:tamamN:tgoJbbbbaoJbbbb9GE:raDNJbbbZMgD:lJbbb9p9DTmbaD:Ohrxekcjjjj94hrkalakcetfar87ebalcwfhlaiclfhiaecufgembkkk9mbdnadcd4ae2gdTmbinababydbgecwtcw91:Yaece91cjjj98Gcjjj;8if::NUdbabclfhbadcufgdmbkkk:Tvirud99eudndnadcl9hmbaeTmeindndnabRbbgiabcefgl8Sbbgvabcdfgo8Sbbgrf9R:YJbbuJabcifgwRbbgdce4adVgDcd4aDVgDcl4aDVgD:Z:vgqNJbbbZMgk:lJbbb9p9DTmbak:Ohxxekcjjjj94hxkaoax86bbdndnaraif:YaqNJbbbZMgk:lJbbb9p9DTmbak:Ohoxekcjjjj94hokalao86bbdndnavaifar9R:YaqNJbbbZMgk:lJbbb9p9DTmbak:Ohixekcjjjj94hikabai86bbdndnaDadcetGadceGV:ZaqNJbbbZMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkawad86bbabclfhbaecufgembxdkkaeTmbindndnab8Vebgiabcdfgl8Uebgvabclfgo8Uebgrf9R:YJbFu9habcofgw8Vebgdce4adVgDcd4aDVgDcl4aDVgDcw4aDVgD:Z:vgqNJbbbZMgk:lJbbb9p9DTmbak:Ohxxekcjjjj94hxkaoax87ebdndnaraif:YaqNJbbbZMgk:lJbbb9p9DTmbak:Ohoxekcjjjj94hokalao87ebdndnavaifar9R:YaqNJbbbZMgk:lJbbb9p9DTmbak:Ohixekcjjjj94hikabai87ebdndnaDadcetGadceGV:ZaqNJbbbZMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkawad87ebabcwfhbaecufgembkkk9teiucbcbyd:K:G:cjbgeabcifc98GfgbBd:K:G:cjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabkk83dbcj:Gdk8Kbbbbdbbblbbbwbbbbbbbebbbdbbblbbbwbbbbc:K:Gdkl8W:qbb",t="b9H79TebbbeKl9Gbb9Gvuuuuueu9Giuuub9Geueuixkbbebeeddddilve9Weeeviebeoweuecj:Gdkr;Neqo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbdY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVblE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtboK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbrL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949WbwY9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVJ9V29VVbDl79IV9Rbqq:W9Dklbzik94evu8Jjjjjbcz9Rhbcbheincbhdcbhiinabcwfadfaicjuaead4ceGglE86bbaialfhiadcefgdcw9hmbkaeai86b:q:W:cjbaecitab8Piw83i:q:G:cjbaecefgecjd9hmbkk:JBl8Aud97dur978Jjjjjbcj;kb9Rgv8Kjjjjbc9:hodnalTmbcuhoaiRbbgrc;WeGc:Ge9hmbarcsGgwce0mbc9:hoalcufadcd4cbawEgDadfgrcKcaawEgqaraq0Egk6mbaialfgxar9RhodnadTgmmbavaoad;8qbbkaicefhPcj;abad9Uc;WFbGcjdadca0EhsdndndnadTmbaoadfhzcbhHinaeaH9nmdaxaP9RaD6miabaHad2fhOaPaDfhAasaeaH9RaHasfae6EgCcsfgocl4cifcd4hXavcj;cbfaoc9WGgQcetfhLavcj;cbfaQci2fhKavcj;cbfaQfhYcbh8Aaoc;ab6hEincbh3dnawTmbaPa8Acd4fRbbh3kcbh5avcj;cbfh8Eindndndndna3a5cet4ciGgoc9:fPdebdkaxaA9RaQ6mwdnaQTmbavcj;cbfa5aQ2faAaQ;8qbbkaAaCfhAxdkaQTmeavcj;cbfa5aQ2fcbaQ;8kbxekaxaA9RaX6moaoclVcbawEhraAaXfhocbhidnaEmbaxao9Rc;Gb6mbcbhlina8EalfhidndndndndndnaAalco4fRbbgqciGarfPDbedibledibkaipxbbbbbbbbbbbbbbbbpklbxlkaiaopbblaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLg8Fcdp:mea8FpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogapxiiiiiiiiiiiiiiiip8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Nghcitpbi:q:G:cjbahRb:q:W:cjbghpsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spklbahaoclffagRb:q:W:cjbfhoxikaiaopbbwaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogapxssssssssssssssssp8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Nghcitpbi:q:G:cjbahRb:q:W:cjbghpsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spklbahaocwffagRb:q:W:cjbfhoxdkaiaopbbbpklbaoczfhoxekaiaopbbdaoRbbghcitpbi:q:G:cjbahRb:q:W:cjbghpsaoRbeggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPpklbahaocdffagRb:q:W:cjbfhokdndndndndndnaqcd4ciGarfPDbedibledibkaiczfpxbbbbbbbbbbbbbbbbpklbxlkaiczfaopbblaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLg8Fcdp:mea8FpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogapxiiiiiiiiiiiiiiiip8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Nghcitpbi:q:G:cjbahRb:q:W:cjbghpsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spklbahaoclffagRb:q:W:cjbfhoxikaiczfaopbbwaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogapxssssssssssssssssp8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Nghcitpbi:q:G:cjbahRb:q:W:cjbghpsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spklbahaocwffagRb:q:W:cjbfhoxdkaiczfaopbbbpklbaoczfhoxekaiczfaopbbdaoRbbghcitpbi:q:G:cjbahRb:q:W:cjbghpsaoRbeggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPpklbahaocdffagRb:q:W:cjbfhokdndndndndndnaqcl4ciGarfPDbedibledibkaicafpxbbbbbbbbbbbbbbbbpklbxlkaicafaopbblaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLg8Fcdp:mea8FpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogapxiiiiiiiiiiiiiiiip8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Nghcitpbi:q:G:cjbahRb:q:W:cjbghpsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spklbahaoclffagRb:q:W:cjbfhoxikaicafaopbbwaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogapxssssssssssssssssp8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Nghcitpbi:q:G:cjbahRb:q:W:cjbghpsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spklbahaocwffagRb:q:W:cjbfhoxdkaicafaopbbbpklbaoczfhoxekaicafaopbbdaoRbbghcitpbi:q:G:cjbahRb:q:W:cjbghpsaoRbeggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPpklbahaocdffagRb:q:W:cjbfhokdndndndndndnaqco4arfPDbedibledibkaic8Wfpxbbbbbbbbbbbbbbbbpklbxlkaic8Wfaopbblaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLg8Fcdp:mea8FpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogapxiiiiiiiiiiiiiiiip8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Ngicitpbi:q:G:cjbaiRb:q:W:cjbgipsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Ngqcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spklbaiaoclffaqRb:q:W:cjbfhoxikaic8Wfaopbbwaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogapxssssssssssssssssp8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Ngicitpbi:q:G:cjbaiRb:q:W:cjbgipsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Ngqcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spklbaiaocwffaqRb:q:W:cjbfhoxdkaic8Wfaopbbbpklbaoczfhoxekaic8WfaopbbdaoRbbgicitpbi:q:G:cjbaiRb:q:W:cjbgipsaoRbegqcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPpklbaiaocdffaqRb:q:W:cjbfhokalc;abfhialcjefaQ0meaihlaxao9Rc;Fb0mbkkdnaiaQ9pmbaici4hlinaxao9RcK6mwa8EaifhqdndndndndndnaAaico4fRbbalcoG4ciGarfPDbedibledibkaqpxbbbbbbbbbbbbbbbbpkbbxlkaqaopbblaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLg8Fcdp:mea8FpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogapxiiiiiiiiiiiiiiiip8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Nghcitpbi:q:G:cjbahRb:q:W:cjbghpsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spkbbahaoclffagRb:q:W:cjbfhoxikaqaopbbwaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogapxssssssssssssssssp8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Nghcitpbi:q:G:cjbahRb:q:W:cjbghpsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spkbbahaocwffagRb:q:W:cjbfhoxdkaqaopbbbpkbbaoczfhoxekaqaopbbdaoRbbghcitpbi:q:G:cjbahRb:q:W:cjbghpsaoRbeggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPpkbbahaocdffagRb:q:W:cjbfhokalcdfhlaiczfgiaQ6mbkkaohAaoTmoka8EaQfh8Ea5cefg5cl9hmbkdndndndnawTmbaza8Acd4fRbbglciGPlbedwbkaQTmdavcjdfa8Afhlava8Afpbdbh8Jcbhoinalavcj;cbfaofpblbg8KaYaofpblbg8LpmbzeHdOiAlCvXoQrLg8MaLaofpblbg8NaKaofpblbgypmbzeHdOiAlCvXoQrLg8PpmbezHdiOAlvCXorQLg8Fcep9Ta8Fpxeeeeeeeeeeeeeeeegap9op9Hp9rg8Fa8Jp9Ug8Jp9Abbbaladfgla8Ja8Fa8Fpmlvorlvorlvorlvorp9Ug8Jp9Abbbaladfgla8Ja8Fa8FpmwDqkwDqkwDqkwDqkp9Ug8Jp9Abbbaladfgla8Ja8Fa8FpmxmPsxmPsxmPsxmPsp9Ug8Jp9Abbbaladfgla8Ja8Ma8PpmwDKYqk8AExm35Ps8E8Fg8Fcep9Ta8Faap9op9Hp9rg8Fp9Ug8Jp9Abbbaladfgla8Ja8Fa8Fpmlvorlvorlvorlvorp9Ug8Jp9Abbbaladfgla8Ja8Fa8FpmwDqkwDqkwDqkwDqkp9Ug8Jp9Abbbaladfgla8Ja8Fa8FpmxmPsxmPsxmPsxmPsp9Ug8Jp9Abbbaladfgla8Ja8Ka8LpmwKDYq8AkEx3m5P8Es8Fg8Ka8NaypmwKDYq8AkEx3m5P8Es8Fg8LpmbezHdiOAlvCXorQLg8Fcep9Ta8Faap9op9Hp9rg8Fp9Ug8Jp9Abbbaladfgla8Ja8Fa8Fpmlvorlvorlvorlvorp9Ug8Jp9Abbbaladfgla8Ja8Fa8FpmwDqkwDqkwDqkwDqkp9Ug8Jp9Abbbaladfgla8Ja8Fa8FpmxmPsxmPsxmPsxmPsp9Ug8Jp9Abbbaladfgla8Ja8Ka8LpmwDKYqk8AExm35Ps8E8Fg8Fcep9Ta8Faap9op9Hp9rg8Fp9Ugap9Abbbaladfglaaa8Fa8Fpmlvorlvorlvorlvorp9Ugap9Abbbaladfglaaa8Fa8FpmwDqkwDqkwDqkwDqkp9Ugap9Abbbaladfglaaa8Fa8FpmxmPsxmPsxmPsxmPsp9Ug8Jp9AbbbaladfhlaoczfgoaQ6mbxikkaQTmeavcjdfa8Afhlava8Afpbdbh8Jcbhoinalavcj;cbfaofpblbg8KaYaofpblbg8LpmbzeHdOiAlCvXoQrLg8MaLaofpblbg8NaKaofpblbgypmbzeHdOiAlCvXoQrLg8PpmbezHdiOAlvCXorQLg8Fcep:nea8Fpxebebebebebebebebgap9op:bep9rg8Fa8Jp:oeg8Jp9Abbbaladfgla8Ja8Fa8Fpmlvorlvorlvorlvorp:oeg8Jp9Abbbaladfgla8Ja8Fa8FpmwDqkwDqkwDqkwDqkp:oeg8Jp9Abbbaladfgla8Ja8Fa8FpmxmPsxmPsxmPsxmPsp:oeg8Jp9Abbbaladfgla8Ja8Ma8PpmwDKYqk8AExm35Ps8E8Fg8Fcep:nea8Faap9op:bep9rg8Fp:oeg8Jp9Abbbaladfgla8Ja8Fa8Fpmlvorlvorlvorlvorp:oeg8Jp9Abbbaladfgla8Ja8Fa8FpmwDqkwDqkwDqkwDqkp:oeg8Jp9Abbbaladfgla8Ja8Fa8FpmxmPsxmPsxmPsxmPsp:oeg8Jp9Abbbaladfgla8Ja8Ka8LpmwKDYq8AkEx3m5P8Es8Fg8Ka8NaypmwKDYq8AkEx3m5P8Es8Fg8LpmbezHdiOAlvCXorQLg8Fcep:nea8Faap9op:bep9rg8Fp:oeg8Jp9Abbbaladfgla8Ja8Fa8Fpmlvorlvorlvorlvorp:oeg8Jp9Abbbaladfgla8Ja8Fa8FpmwDqkwDqkwDqkwDqkp:oeg8Jp9Abbbaladfgla8Ja8Fa8FpmxmPsxmPsxmPsxmPsp:oeg8Jp9Abbbaladfgla8Ja8Ka8LpmwDKYqk8AExm35Ps8E8Fg8Fcep:nea8Faap9op:bep9rg8Fp:oegap9Abbbaladfglaaa8Fa8Fpmlvorlvorlvorlvorp:oegap9Abbbaladfglaaa8Fa8FpmwDqkwDqkwDqkwDqkp:oegap9Abbbaladfglaaa8Fa8FpmxmPsxmPsxmPsxmPsp:oeg8Jp9AbbbaladfhlaoczfgoaQ6mbxdkkaQTmbcbhocbalcl4gl9Rc8FGhiavcjdfa8Afhrava8Afpbdbhainaravcj;cbfaofpblbg8JaYaofpblbg8KpmbzeHdOiAlCvXoQrLg8LaLaofpblbg8MaKaofpblbg8NpmbzeHdOiAlCvXoQrLgypmbezHdiOAlvCXorQLg8Faip:Rea8Falp:Tep9qg8Faap9rgap9Abbbaradfgraaa8Fa8Fpmlvorlvorlvorlvorp9rgap9Abbbaradfgraaa8Fa8FpmwDqkwDqkwDqkwDqkp9rgap9Abbbaradfgraaa8Fa8FpmxmPsxmPsxmPsxmPsp9rgap9Abbbaradfgraaa8LaypmwDKYqk8AExm35Ps8E8Fg8Faip:Rea8Falp:Tep9qg8Fp9rgap9Abbbaradfgraaa8Fa8Fpmlvorlvorlvorlvorp9rgap9Abbbaradfgraaa8Fa8FpmwDqkwDqkwDqkwDqkp9rgap9Abbbaradfgraaa8Fa8FpmxmPsxmPsxmPsxmPsp9rgap9Abbbaradfgraaa8Ja8KpmwKDYq8AkEx3m5P8Es8Fg8Ja8Ma8NpmwKDYq8AkEx3m5P8Es8Fg8KpmbezHdiOAlvCXorQLg8Faip:Rea8Falp:Tep9qg8Fp9rgap9Abbbaradfgraaa8Fa8Fpmlvorlvorlvorlvorp9rgap9Abbbaradfgraaa8Fa8FpmwDqkwDqkwDqkwDqkp9rgap9Abbbaradfgraaa8Fa8FpmxmPsxmPsxmPsxmPsp9rgap9Abbbaradfgraaa8Ja8KpmwDKYqk8AExm35Ps8E8Fg8Faip:Rea8Falp:Tep9qg8Fp9rgap9Abbbaradfgraaa8Fa8Fpmlvorlvorlvorlvorp9rgap9Abbbaradfgraaa8Fa8FpmwDqkwDqkwDqkwDqkp9rgap9Abbbaradfgraaa8Fa8FpmxmPsxmPsxmPsxmPsp9rgap9AbbbaradfhraoczfgoaQ6mbkka8Aclfg8Aad6mbkdnaCad2goTmbaOavcjdfao;8qbbkdnammbavavcjdfaCcufad2fad;8qbbkaCaHfhHc9:hoaAhPaAmbxlkkaeTmbaDalfhrcbhocuhlinaralaD9RglfaD6mdasaeao9Raoasfae6Eaofgoae6mbkaial9RhPkcbc99axaP9RakSEhoxekc9:hokavcj;kbf8Kjjjjbaokwbz:bjjjbkNsezu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnalaeci9UgrcHf6mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecje;8kbav9cu83iUav9cu83i8Wav9cu83iyav9cu83iaav9cu83iKav9cu83izav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhldnaeTmbcmcsaDceSEhkcbhxcbhmcbhrcbhicbhoindnalaq9nmbc9:hoxikdndnawRbbgDc;Ve0mbavc;abfaoaDcu7gPcl4fcsGcitfgsydlhzasydbhHdndnaDcsGgsak9pmbavaiaPfcsGcdtfydbaxasEhDaxasTgOfhxxekdndnascsSmbcehOasc987asamffcefhDxekalcefhDal8SbbgscFeGhPdndnascu9mmbaDhlxekalcvfhlaPcFbGhPcrhsdninaD8SbbgOcFbGastaPVhPaOcu9kmeaDcefhDascrfgsc8J9hmbxdkkaDcefhlkcehOaPce4cbaPceG9R7amfhDkaDhmkavc;abfaocitfgsaDBdbasazBdlavaicdtfaDBdbavc;abfaocefcsGcitfgsaHBdbasaDBdlaocdfhoaOaifhidnadcd9hmbabarcetfgsaH87ebasclfaD87ebascdfaz87ebxdkabarcdtfgsaHBdbascwfaDBdbasclfazBdbxekdnaDcpe0mbavaiaqaDcsGfRbbgscl4gP9RcsGcdtfydbaxcefgOaPEhDavaias9RcsGcdtfydbaOaPTgzfgOascsGgPEhsaPThPdndnadcd9hmbabarcetfgHax87ebaHclfas87ebaHcdfaD87ebxekabarcdtfgHaxBdbaHcwfasBdbaHclfaDBdbkavaicdtfaxBdbavc;abfaocitfgHaDBdbaHaxBdlavaicefgicsGcdtfaDBdbavc;abfaocefcsGcitfgHasBdbaHaDBdlavaiazfgicsGcdtfasBdbavc;abfaocdfcsGcitfgDaxBdbaDasBdlaocifhoaiaPfhiaOaPfhxxekaxcbalRbbgsEgHaDc;:eSgDfhOascsGhAdndnascl4gCmbaOcefhzxekaOhzavaiaC9RcsGcdtfydbhOkdndnaAmbazcefhxxekazhxavaias9RcsGcdtfydbhzkdndnaDTmbalcefhDxekalcdfhDal8SbegPcFeGhsdnaPcu9kmbalcofhHascFbGhscrhldninaD8SbbgPcFbGaltasVhsaPcu9kmeaDcefhDalcrfglc8J9hmbkaHhDxekaDcefhDkasce4cbasceG9R7amfgmhHkdndnaCcsSmbaDhsxekaDcefhsaD8SbbglcFeGhPdnalcu9kmbaDcvfhOaPcFbGhPcrhldninas8SbbgDcFbGaltaPVhPaDcu9kmeascefhsalcrfglc8J9hmbkaOhsxekascefhskaPce4cbaPceG9R7amfgmhOkdndnaAcsSmbashlxekascefhlas8SbbgDcFeGhPdnaDcu9kmbascvfhzaPcFbGhPcrhDdninal8SbbgscFbGaDtaPVhPascu9kmealcefhlaDcrfgDc8J9hmbkazhlxekalcefhlkaPce4cbaPceG9R7amfgmhzkdndnadcd9hmbabarcetfgDaH87ebaDclfaz87ebaDcdfaO87ebxekabarcdtfgDaHBdbaDcwfazBdbaDclfaOBdbkavc;abfaocitfgDaOBdbaDaHBdlavaicdtfaHBdbavc;abfaocefcsGcitfgDazBdbaDaOBdlavaicefgicsGcdtfaOBdbavc;abfaocdfcsGcitfgDaHBdbaDazBdlavaiaCTaCcsSVfgicsGcdtfazBdbaiaATaAcsSVfhiaocifhokawcefhwaocsGhoaicsGhiarcifgrae6mbkkcbc99alaqSEhokavc;aef8Kjjjjbaok:clevu8Jjjjjbcz9Rhvdnalaecvf9pmbc9:skdnaiRbbc;:eGc;qeSmbcuskav9cb83iwaicefhoaialfc98fhrdnaeTmbdnadcdSmbcbhwindnaoar6mbc9:skaocefhlao8SbbgicFeGhddndnaicu9mmbalhoxekaocvfhoadcFbGhdcrhidninal8SbbgDcFbGaitadVhdaDcu9kmealcefhlaicrfgic8J9hmbxdkkalcefhokabawcdtfadc8Etc8F91adcd47avcwfadceGcdtVglydbfgiBdbalaiBdbawcefgwae9hmbxdkkcbhwindnaoar6mbc9:skaocefhlao8SbbgicFeGhddndnaicu9mmbalhoxekaocvfhoadcFbGhdcrhidninal8SbbgDcFbGaitadVhdaDcu9kmealcefhlaicrfgic8J9hmbxdkkalcefhokabawcetfadc8Etc8F91adcd47avcwfadceGcdtVglydbfgi87ebalaiBdbawcefgwae9hmbkkcbc99aoarSEk;Toio97eue97aec98Ghedndnadcl9hmbaeTmecbhdinababpbbbgicKp:RecKp:Sep;6eglaicwp:RecKp:Sep;6ealp;Geaiczp:RecKp:Sep;6egvp;Gep;Kep;Legopxbbbbbbbbbbbbbbbbp:2egralpxbbbjbbbjbbbjbbbjgwp9op9rp;Keglpxbb;:9cbb;:9cbb;:9cbb;:9calalp;Meaoaop;Meavaravawp9op9rp;Keglalp;Mep;Kep;Kep;Jep;Negvp;Mepxbbn0bbn0bbn0bbn0grp;KepxFbbbFbbbFbbbFbbbp9oaipxbbbFbbbFbbbFbbbFp9op9qalavp;Mearp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaoavp;Mearp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpkbbabczfhbadclfgdae6mbxdkkaeTmbcbhdinabczfgDaDpbbbgipxbbbbbbFFbbbbbbFFgwp9oabpbbbgoaipmbediwDqkzHOAKY8AEgvczp:Reczp:Sep;6eglaoaipmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eavczp:Sep;6egvp;Gealp;Gep;Kep;Legipxbbbbbbbbbbbbbbbbp:2egralpxbbbjbbbjbbbjbbbjgqp9op9rp;Keglpxb;:FSb;:FSb;:FSb;:FSalalp;Meaiaip;Meavaravaqp9op9rp;Keglalp;Mep;Kep;Kep;Jep;Negvp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbp9oaiavp;Mearp;Keczp:Rep9qgialavp;Mearp;KepxFFbbFFbbFFbbFFbbp9oglpmwDKYqk8AExm35Ps8E8Fp9qpkbbabaoawp9oaialpmbezHdiOAlvCXorQLp9qpkbbabcafhbadclfgdae6mbkkk;2ileue97euo97dnaec98GgiTmbcbheinabcKfpx:ji:1S:ji:1S:ji:1S:ji:1SabpbbbglabczfgvpbbbgopmlvorxmPsCXQL358E8Fgrczp:Segwpxibbbibbbibbbibbbp9qp;6egDp;NegqaDaDp;MegDaDp;KealaopmbediwDqkzHOAKY8AEgDczp:Reczp:Sep;6eglalp;MeaDczp:Sep;6egoaop;Mearczp:Reczp:Sep;6egrarp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jep;Mepxbbn0bbn0bbn0bbn0gDp;KepxFFbbFFbbFFbbFFbbgkp9oaqaop;MeaDp;Keczp:Rep9qgoaqalp;MeaDp;Keakp9oaqarp;MeaDp;Keczp:Rep9qgDpmwDKYqk8AExm35Ps8E8Fglp5eawclp:RegqpEi:T:j83ibavalp5baqpEd:T:j83ibabcwfaoaDpmbezHdiOAlvCXorQLgDp5eaqpEe:T:j83ibabaDp5baqpEb:T:j83ibabcafhbaeclfgeai6mbkkkuee97dnadcd4ae2c98GgeTmbcbhdinababpbbbgicwp:Recwp:Sep;6eaicep:SepxbbjFbbjFbbjFbbjFp9opxbbjZbbjZbbjZbbjZp:Uep;Mepkbbabczfhbadclfgdae6mbkkk:Sodw97euaec98Ghedndnadcl9hmbaeTmecbhdinabpxbbuJbbuJbbuJbbuJabpbbbgicKp:TeglaicYp:Tep9qgvcdp:Teavp9qgvclp:Teavp9qgop;6ep;Negvaicwp:RecKp:SegraipxFbbbFbbbFbbbFbbbgwp9ogDp:Uep;6ep;Mepxbbn0bbn0bbn0bbn0gqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9oavaDarp:Xeaiczp:RecKp:Segip:Uep;6ep;Meaqp;Keawp9op9qavaDaraip:Uep:Xep;6ep;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qavaoalcep:Rep9oalpxebbbebbbebbbebbbp9op9qp;6ep;Meaqp;KecKp:Rep9qpkbbabczfhbadclfgdae6mbxdkkaeTmbcbhdinabczfgkpxbFu9hbFu9hbFu9hbFu9habpbbbglakpbbbgrpmlvorxmPsCXQL358E8Fgvczp:TegqavcHp:Tep9qgicdp:Teaip9qgiclp:Teaip9qgicwp:Teaip9qgop;6ep;NegialarpmbediwDqkzHOAKY8AEgDpxFFbbFFbbFFbbFFbbglp9ograDczp:Segwp:Ueavczp:Reczp:SegDp:Xep;6ep;Mepxbbn0bbn0bbn0bbn0gvp;Kealp9oaiarawaDp:Uep:Xep;6ep;Meavp;Keczp:Rep9qgwaiaoaqcep:Rep9oaqpxebbbebbbebbbebbbp9op9qp;6ep;Meavp;Keczp:ReaiaDarp:Uep;6ep;Meavp;Kealp9op9qgipmwDKYqk8AExm35Ps8E8FpkbbabawaipmbezHdiOAlvCXorQLpkbbabcafhbadclfgdae6mbkkk9teiucbcbydj:G:cjbgeabcifc98GfgbBdj:G:cjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikkxebcj:Gdklz:zbb",n=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 o=WebAssembly.validate(n)?s(t):s(e),r,a=WebAssembly.instantiate(o,{}).then(function(x){r=x.instance,r.exports.__wasm_call_ctors()});function s(x){for(var b=new Uint8Array(x.length),C=0;C<x.length;++C){var E=x.charCodeAt(C);b[C]=E>96?E-97:E>64?E-39:E+4}for(var S=0,C=0;C<x.length;++C)b[S++]=b[C]<60?i[b[C]]:(b[C]-60)*64+b[++C];return b.buffer.slice(0,S)}function c(x,b,C,E,S,w,P){var R=x.exports.sbrk,B=E+3&-4,L=R(B*S),_=R(w.length),T=new Uint8Array(x.exports.memory.buffer);T.set(w,_);var v=b(L,E,S,_,w.length);if(v==0&&P&&P(L,B,S),C.set(T.subarray(L,L+E*S)),R(L-R(0)),v!=0)throw new Error("Malformed buffer data: "+v)}var u={NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp",COLOR:"meshopt_decodeFilterColor"},f={ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"},d=[],p=0;function g(x){var b={object:new Worker(x),pending:0,requests:{}};return b.object.onmessage=function(C){var E=C.data;b.pending-=E.count,b.requests[E.id][E.action](E.value),delete b.requests[E.id]},b}function m(x){for(var b="self.ready = WebAssembly.instantiate(new Uint8Array(["+new Uint8Array(o)+"]), {}).then(function(result) { result.instance.exports.__wasm_call_ctors(); return result.instance; });self.onmessage = "+y.name+";"+c.toString()+y.toString(),C=new Blob([b],{type:"text/javascript"}),E=URL.createObjectURL(C),S=d.length;S<x;++S)d[S]=g(E);for(var S=x;S<d.length;++S)d[S].object.postMessage({});d.length=x,URL.revokeObjectURL(E)}function A(x,b,C,E,S){for(var w=d[0],P=1;P<d.length;++P)d[P].pending<w.pending&&(w=d[P]);return new Promise(function(R,B){var L=new Uint8Array(C),_=++p;w.pending+=x,w.requests[_]={resolve:R,reject:B},w.object.postMessage({id:_,count:x,size:b,source:L,mode:E,filter:S},[L.buffer])})}function y(x){var b=x.data;self.ready.then(function(C){if(!b.id)return self.close();try{var E=new Uint8Array(b.count*b.size);c(C,C.exports[b.mode],E,b.count,b.size,b.source,C.exports[b.filter]),self.postMessage({id:b.id,count:b.count,action:"resolve",value:E},[E.buffer])}catch(S){self.postMessage({id:b.id,count:b.count,action:"reject",value:S})}})}return{ready:a,supported:!0,useWorkers:function(x){m(x)},decodeVertexBuffer:function(x,b,C,E,S){c(r,r.exports.meshopt_decodeVertexBuffer,x,b,C,E,r.exports[u[S]])},decodeIndexBuffer:function(x,b,C,E){c(r,r.exports.meshopt_decodeIndexBuffer,x,b,C,E)},decodeIndexSequence:function(x,b,C,E){c(r,r.exports.meshopt_decodeIndexSequence,x,b,C,E)},decodeGltfBuffer:function(x,b,C,E,S,w){c(r,r.exports[f[S]],x,b,C,E,r.exports[u[w]])},decodeGltfBufferAsync:function(x,b,C,E,S){return d.length>0?A(x,b,C,f[E],u[S]):a.then(function(){var w=new Uint8Array(x*b);return c(r,r.exports[f[E]],w,x,b,C,r.exports[u[S]]),w})}}})();var D0n=(function(){var e="b9H79Tebbbe:6eO9Geueu9Geub9Gbb9Gsuuuuuuuuuuuu99uueu9Gvuuuuub9Gruuuuuuub9Gouuuuuue999Gvuuuuueu9Gzuuuuuuuuuuu99uuuub9Gquuuuuuu99uueu9GPuuuuuuuuuuu99uueu9Gquuuuuuuu99ueu9Gruuuuuu99eu9Gwuuuuuu99ueu9Giuuue999Gluuuueu9Gluuuub9GiuuueuiLQdilvorlwDiqkxmPszbHHbelve9Weiiviebeoweuecj:Gdkr:Bdxo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bbz9TW79O9V9Wt9F79P9T9W29P9M95bw8E9TW79O9V9Wt9F79P9T9W29P9M959x9Pt9OcttV9P9I91tW7bD8A9TW79O9V9Wt9F79P9T9W29P9M959x9Pt9O9v9W9K9HtWbqQ9TW79O9V9Wt9F79P9T9W29P9M959t29V9W9W95bkX9TW79O9V9Wt9F79P9T9W29P9M959qV919UWbxQ9TW79O9V9Wt9F79P9T9W29P9M959q9V9P9Ut7bmX9TW79O9V9Wt9F79P9T9W29P9M959t9J9H2WbPa9TW79O9V9Wt9F9V9Wt9P9T9P96W9wWVtW94SWt9J9O9sW9T9H9Wbs59TW79O9V9Wt9F9NW9UWV9HtW9q9V79Pt9P9V9U9sW9T9H9Wbzl79IV9RbHDwebcekdCXq;y;WeQdbk;r:herYue99iuY99Xue9:D998Jjjjjbcj;sb9Rgs8Kjjjjbcbhzasc:Cefcbc;Kbz:tjjjb8AdnabaeSmbabaeadcdtzMjjjb8AkdnamcdGTmbalcrfci4cbyd1:H:cjbHjjjjbbhHasc:Cefasyd;8egecdtfaHBdbasaecefBd;8ecbhlcbhednadTmbabheadhOinaHaeydbci4fcb86bbaeclfheaOcufgOmbkcbhlabheadhOinaHaeydbgAci4fgCaCRbbgCceaAcrGgAtV86bbaCcu7aA4ceGalfhlaeclfheaOcufgOmbkcualcdtalcFFFFi0Ehekaecbyd1:H:cjbHjjjjbbhzasc:Cefasyd;8egecdtfazBdbasaecefBd;8ealcd4alfhOcehHinaHgecethHaeaO6mbkcbhXcuaecdtgOaecFFFFi0Ecbyd1:H:cjbHjjjjbbhHasc:Cefasyd;8egAcdtfaHBdbasaAcefBd;8eaHcFeaOz:tjjjbhQdnadTmbaecufhLcbhKindndnaQabaKcdtfgYydbgAc:v;t;h;Ev2aLGgOcdtfgCydbgHcuSmbceheinazaHcdtfydbaASmdaOaefhHaecefheaQaHaLGgOcdtfgCydbgHcu9hmbkkazaXcdtfaABdbaCaXBdbaXhHaXcefhXkaYaHBdbaKcefgKad9hmbkkaQcbyd:m:H:cjbH:bjjjbbasasyd;8ecufBd;8ekcbh8AcualcefgecdtaecFFFFi0Ecbyd1:H:cjbHjjjjbbhLasc:Cefasyd;8egecdtfaLBdbasaLBdNeasaecefBd;8ecuadcitadcFFFFe0Ecbyd1:H:cjbHjjjjbbhEasc:Cefasyd;8egecdtfaEBdbasaEBd:yeasaecefBd;8eascNefabadalcbz:cjjjbcualcdtgealcFFFFi0Eg3cbyd1:H:cjbHjjjjbbhOasc:Cefasyd;8egHcdtfaOBdbasaHcefBd;8ea3cbyd1:H:cjbHjjjjbbhQasc:Cefasyd;8egHcdtfaQBdbasaHcefBd;8eaOaQaialavazasc:Cefz:djjjbalcbyd1:H:cjbHjjjjbbhYasc:Cefasyd;8egHcdtfaYBdbasaHcefBd;8ea3cbyd1:H:cjbHjjjjbbhHasc:Cefasyd;8egAcdtfaHBdbasaAcefBd;8ea3cbyd1:H:cjbHjjjjbbhAasc:Cefasyd;8egCcdtfaABdbasaCcefBd;8eaHcFeaez:tjjjbh5aAcFeaez:tjjjbh8EdnalTmbindnaLa8AgAcefg8AcdtfydbgCaLaAcdtgefydbgHSmbaCaH9Rh8FaEaHcitfhaa8Eaefhha5aefhKcbhCindndnaaaCcitfydbgXaA9hmbaKaABdbahaABdbxekdnaLaXcdtggfgeclfydbgHaeydbgeSmbaHae9RhHaEaecitfheinaeydbaASmdaecwfheaHcufgHmbkka8EagfgeaAaXaeydbcuSEBdbaKaXaAaKydbcuSEBdbkaCcefgCa8F9hmbkka8Aal9hmbkaOhHaQhAa5hXa8EhCcbheindndnaeaHydbgK9hmbdnaeaAydbgK9hmbaXydbhKdnaCydbg8Fcu9hmbaKcu9hmbaYaefcb86bbxikdna8FcuSmbaKcuSmbaea8FSmbaOa8FcdtfydbaOaKcdtfydb9hmbaYaefcd86bbxikaYaefhadnaea8FSmbaeaKSmbaace86bbxikaacl86bbxdkdnaeaQaKcdtg8Ffydb9hmbdnaCydbgacuSmbaeaaSmbaXydbggcuSmbaeagSmba8Ea8FfydbghcuSmbahaKSmba5a8Ffydbg8FcuSmba8FaKSmbdnaOaacdtfydbgKaOa8Fcdtfydb9hmbaKaOagcdtfydbg8FSmba8FaOahcdtfydb9hmbaYaefcd86bbxlkaYaefcl86bbxikaYaefcl86bbxdkaYaefcl86bbxekaYaefaYaKfRbb86bbkaHclfhHaAclfhAaXclfhXaCclfhCalaecefge9hmbkdnamcaGTmbcbh8JindndnaYa8Jfg8KRbbg8Lc9:fPibebekdndndnaOa8Jcdtfydbgea8J9hmbdnaqmbcbh8FxdkdnazTmbcbh8Fa8JheinaqazaecdtgefydbfRbbce4a8FVceGh8FaQaefydbgea8J9hmbxikkcbh8Fa8JheinaqaefRbbce4a8FVceGh8FaQaecdtfydbgea8J9hmbxdkkaYaefRbbhexeka8JheindnaLaecdtg8AfgeclfydbgHaeydbgeSmbaHae9RhgaEaecitfhhaOa8AfhacbhKinahaKcitfydbgXhednindnaLaecdtgCfgeclfydbgHaeydbgeSmbaHae9RhHaEaecitfheaaydbhAdninaOaeydbcdtfydbaASmeaecwfheaHcufgHTmdxbkkcbhexdkaQaCfydbgeaX9hmbkceheka8FaeVh8FaKcefgKag9hmbkkaQa8Afydbgea8J9hmbka8Lcia8FceGEheka8Kae86bbka8Jcefg8Jal9hmbkkdnaqTmbdndnazTmbazheaOhHalhAindnaqaeydbfRbbceGTmbaYaHydbfcl86bbkaeclfheaHclfhHaAcufgAmbxdkkaqheaOhHalhAindnaeRbbceGTmbaYaHydbfcl86bbkaecefheaHclfhHaAcufgAmbkkaOhealhAaYhHindnaYaeydbfRbbcl9hmbaHcl86bbkaeclfheaHcefhHaAcufgAmbkkamceGTmbaYhealhHindnaeRbbce9hmbaecl86bbkaecefheaHcufgHmbkkcbh8Mcualcx2alc;v:Q;v:Qe0Ecbyd1:H:cjbHjjjjbbh8Nasc:Cefasyd;8egecdtfa8NBdbasaecefBd;8eascbBd:qeas9cb83i1ea8Naialavazasc1efz:ejjjbhydndnaDmbcbh8PcbhCxekcbhCawhecbhHindnaeIdbJbbbb9ETmbasaCcdtfaHBdbaCcefhCkaeclfheaDaHcefgH9hmbkcuaCal2gecdtaecFFFFi0Ecbyd1:H:cjbHjjjjbbh8Pasc:Cefasyd;8egecdtfa8PBdbasaecefBd;8ealTmbdnaCmbcbhCxekarcd4hgdnazTmbaCcdthhcbh8Fa8Phainaoaza8Fcdtfydbag2cdtfhKasheaahHaChAinaHaKaeydbcdtgXfIdbawaXfIdbNUdbaeclfheaHclfhHaAcufgAmbkaaahfhaa8Fcefg8Fal9hmbxdkkaCcdthhcbh8Fa8Phainaoa8Fag2cdtfhKasheaahHaChAinaHaKaeydbcdtgXfIdbawaXfIdbNUdbaeclfheaHclfhHaAcufgAmbkaaahfhaa8Fcefg8Fal9hmbkkcualc8S2gHalc;D;O;f8U0EgXcbyd1:H:cjbHjjjjbbheasc:Cefasyd;8egAcdtfaeBdbasaAcefBd;8eaecbaHz:tjjjbhIcbh8RcbhgdnaCTmbcbh8MaXcbyd1:H:cjbHjjjjbbhgasc:Cefasyd;8egecdtfagBdbasaecefBd;8eagcbaHz:tjjjb8AcuaCal2gecltgHaecFFFFb0Ecbyd1:H:cjbHjjjjbbh8Rasc:Cefasyd;8egecdtfa8RBdbasaecefBd;8ea8RcbaHz:tjjjb8AamcjjjjdGTmbcualcltgealcFFFFb0Ecbyd1:H:cjbHjjjjbbh8Masc:Cefasyd;8egHcdtfa8MBdbasaHcefBd;8ea8Mcbaez:tjjjb8AkdnadTmbcbhKabhHina8NaHclfydbg8Fcx2fgeIdba8NaHydbgacx2fgAIdbg8S:tgRa8NaHcwfydbghcx2fgXIdlaAIdlg8U:tg8VNaeIdla8U:tg8WaXIdba8S:tg8XN:tg8Ya8YNa8WaXIdwaAIdwg8Z:tg80NaeIdwa8Z:tg8Wa8VN:tg81a81Na8Wa8XNaRa80N:tg80a80NMMg8V:rhBa8Yh8Xa80h8Wa81hRdna8VJbbbb9EgATmba8YaB:vh8Xa80aB:vh8Wa81aB:vhRkaIaOaacdtfydbgXc8S2fgeaRaB:rg8VaRNNg83aeIdbMUdbaea8Wa8Va8WNgUNg85aeIdlMUdlaea8Xa8Va8XNg86Ng87aeIdwMUdwaeaRaUNgUaeIdxMUdxaea86aRNg88aeIdzMUdzaea8Wa86Ng89aeIdCMUdCaeaRa8Va8Xa8ZNaRa8SNa8Ua8WNMM:mg8:Ng86NgRaeIdKMUdKaea8Wa86Ng8WaeId3MUd3aea8Xa86Ng8XaeIdaMUdaaea86a8:Ng86aeId8KMUd8Kaea8VaeIdyMUdyaIaOa8Fcdtfydbg8Fc8S2fgea83aeIdbMUdbaea85aeIdlMUdlaea87aeIdwMUdwaeaUaeIdxMUdxaea88aeIdzMUdzaea89aeIdCMUdCaeaRaeIdKMUdKaea8WaeId3MUd3aea8XaeIdaMUdaaea86aeId8KMUd8Kaea8VaeIdyMUdyaIaOahcdtfydbgac8S2fgea83aeIdbMUdbaea85aeIdlMUdlaea87aeIdwMUdwaeaUaeIdxMUdxaea88aeIdzMUdzaea89aeIdCMUdCaeaRaeIdKMUdKaea8WaeId3MUd3aea8XaeIdaMUdaaea86aeId8KMUd8Kaea8VaeIdyMUdydna8MTmbdnaATmba8YaB:vh8Ya80aB:vh80a81aB:vh81ka8MaXcltfgeaBJbbbZNgRa80Ng8VaeIdlMUdlaeaRa8YNg8WaeIdwMUdwaeaRa81Ng8XaeIdbMUdbaeaRa8S:ma81Na8Ua80N:ta8Za8YN:tNgRaeIdxMUdxa8Ma8Fcltfgea8VaeIdlMUdlaea8WaeIdwMUdwaea8XaeIdbMUdbaeaRaeIdxMUdxa8Maacltfgea8VaeIdlMUdlaea8WaeIdwMUdwaea8XaeIdbMUdbaeaRaeIdxMUdxkaHcxfhHaKcifgKad6mbkkdnalTmbJq;x8J88J;n;m;m89J:v:;;w8ZamczGEamc;abGEh80cbhHaOhXazhKaIhea8NhAindnaHaXydb9hmbaHh8FdnazTmbaKydbh8Fka80hRdnaqTmbJbbjZa80aqa8FfRbbclGEhRkaecxfg8Fa8FIdbJbbbbMUdbaeczfg8Fa8FIdbJbbbbMUdbaecCfg8Fa8FIdbJbbbbMUdbaeaRaecyfg8FIdbg8YNgRaeIdbMUdbaeclfgaaRaaIdbMUdbaecwfgaaRaaIdbMUdbaecKfgaaaIdbaAIdbg8WaRN:tUdbaAcwfIdbh8Vaec3fgaaaIdbaRaAclfIdbg8XN:tUdbaecafgaaaIdbaRa8VN:tUdbaec8KfgaIdbh81a8Fa8YaRMUdbaaa81aRa8Va8VNa8Wa8WNa8Xa8XNMMNMUdbkaXclfhXaKclfhKaec8SfheaAcxfhAalaHcefgH9hmbkkdnadTmbcbh8Aabhainaba8Acdtfh8FcbhHinaYa8FaHc:G:G:cjbfydbcdtfydbgAfRbbhedndnaYaaaHfydbgXfRbbgKc99fcFeGcpe0mbaec99fcFeGc;:e6mekdnaKcufcFeGce0mba5aXcdtfydbaA9hmekdnaecufcFeGce0mba8EaAcdtfydbaX9hmekJbbacJbbacJbbbZaecFeGceSEaKcFeGceSEhUdna8Na8FaHc:K:G:cjbfydbcdtfydbcx2fgeIdwa8NaXcx2fgKIdwg86:tg8Sa8NaAcx2fghIdwa86:tg8Xa8XNahIdbaKIdbg8U:tg80a80NahIdlaKIdlg8Z:tg8Va8VNMMg81Na8Xa8Sa8XNaeIdba8U:tg83a80Na8VaeIdla8Z:tg85NMMg8WN:tg8Ya8YNa83a81Na80a8WN:tgRaRNa85a81Na8Va8WN:tg8Wa8WNMMgBJbbbb9ETmba8YaB:rgB:vh8Ya8WaB:vh8WaRaB:vhRkaUa81:rNgBa8Ya86NaRa8UNa8Za8WNMM:mg81Ng87a81Nh88a80a85Na8Va83N:tg81a81Na8Va8SNa8Xa85N:tg8Va8VNa8Xa83Na80a8SN:tg8Xa8XNMMg83:rh80a8Ya87Nh85a8Wa87Nh89aRa87Nh87a8WaBa8YNg8SNh8:a8SaRNhZaRaBa8WNgnNhca8Ya8SNh8Ya8WanNh8WaRaBaRNNh8Sdna83Jbbbb9ETmba81a80:vh81a8Xa80:vh8Xa8Va80:vh8VkaIaOaXcdtfydbc8S2fgeaeIdba8Sa8VaUa80:rNgRa8VNNMg80MUdbaea8Wa8XaRa8XNg8SNMg83aeIdlMUdlaea8Ya81aRa81Ng8WNMg8YaeIdwMUdwaeaca8Va8SNMg8SaeIdxMUdxaeaZa8Wa8VNMgUaeIdzMUdzaea8:a8Xa8WNMg8WaeIdCMUdCaea87a8VaRa81a86Na8Va8UNa8Za8XNMMg86:mNgRNMg8VaeIdKMUdKaea89a8XaRNMg8XaeId3MUd3aea85a81aRNMg81aeIdaMUdaaea88a86aRN:tgRaeId8KMUd8KaeaBaeIdyMUdyaIaOaAcdtfydbc8S2fgea80aeIdbMUdbaea83aeIdlMUdlaea8YaeIdwMUdwaea8SaeIdxMUdxaeaUaeIdzMUdzaea8WaeIdCMUdCaea8VaeIdKMUdKaea8XaeId3MUd3aea81aeIdaMUdaaeaRaeId8KMUd8KaeaBaeIdyMUdykaHclfgHcx9hmbkaacxfhaa8Acifg8Aad6mbkaCTmbcbhainJbbbbh80a8Nabaacdtfgeclfydbg8Fcx2fgHIdwa8Naeydbghcx2fgAIdwg8Z:tg8Va8VNaHIdbaAIdbg83:tg8Wa8WNaHIdlaAIdlg85:tg8Xa8XNMMg8Sa8Naecwfydbg8Acx2fgeIdwa8Z:tg8YNa8Va8YNa8WaeIdba83:tg81Na8XaeIdla85:tgBNMMgRa8VN:tJbbbbJbbjZa8Sa8Ya8YNa81a81NaBaBNMMg8UNaRaRN:tg86:va86Jbbbb9BEg86Nh88a8Ua8VNaRa8YN:ta86Nh89a8SaBNaRa8XN:ta86Nh8:a8Ua8XNaRaBN:ta86NhZa8Sa81NaRa8WN:ta86Nhna8Ua8WNaRa81N:ta86Nhca8WaBNa8Xa81N:tgRaRNa8Xa8YNa8VaBN:tgRaRNa8Va81Na8Wa8YN:tgRaRNMM:rJbbbZNhRa8PahaC2g8JcdtfhHa8Pa8AaC2gDcdtfhAa8Pa8FaC2g8KcdtfhXa8Z:mh9ca85:mhJa83:mh9eascjdfheaChKJbbbbhBJbbbbh86Jbbbbh8SJbbbbh8UJbbbbh8ZJbbbbh83Jbbbbh85Jbbbbh87JbbbbhUinaecwfaRa89aXIdbaHIdbg8Y:tg8XNa88aAIdba8Y:tg81NMg8VNUdbaeclfaRaZa8XNa8:a81NMg8WNUdbaeaRaca8XNana81NMg8XNUdbaecxfaRa9ca8VNaJa8WNa8Ya9ea8XNMMMg8YNUdbaRa8Va8WNNa8ZMh8ZaRa8Va8XNNa8UMh8UaRa8Wa8XNNa8SMh8SaRa8Ya8YNNaUMhUaRa8Va8YNNa87Mh87aRa8Wa8YNNa85Mh85aRa8Xa8YNNa83Mh83aRa8Va8VNNa86Mh86aRa8Wa8WNNaBMhBaRa8Xa8XNNa80Mh80aHclfhHaXclfhXaAclfhAaeczfheaKcufgKmbkagahc8S2fgea80aeIdbMUdbaeaBaeIdlMUdlaea86aeIdwMUdwaea8SaeIdxMUdxaea8UaeIdzMUdzaea8ZaeIdCMUdCaea83aeIdKMUdKaea85aeId3MUd3aea87aeIdaMUdaaeaUaeId8KMUd8KaeaRaeIdyMUdyaga8Fc8S2fgea80aeIdbMUdbaeaBaeIdlMUdlaea86aeIdwMUdwaea8SaeIdxMUdxaea8UaeIdzMUdzaea8ZaeIdCMUdCaea83aeIdKMUdKaea85aeId3MUd3aea87aeIdaMUdaaeaUaeId8KMUd8KaeaRaeIdyMUdyaga8Ac8S2fgea80aeIdbMUdbaeaBaeIdlMUdlaea86aeIdwMUdwaea8SaeIdxMUdxaea8UaeIdzMUdzaea8ZaeIdCMUdCaea83aeIdKMUdKaea85aeId3MUd3aea87aeIdaMUdaaeaUaeId8KMUd8KaeaRaeIdyMUdya8Ra8Jcltfh8FcbhHaChXina8FaHfgeascjdfaHfgAIdbaeIdbMUdbaeclfgKaAclfIdbaKIdbMUdbaecwfgKaAcwfIdbaKIdbMUdbaecxfgeaAcxfIdbaeIdbMUdbaHczfhHaXcufgXmbka8Ra8Kcltfh8FcbhHaChXina8FaHfgeascjdfaHfgAIdbaeIdbMUdbaeclfgKaAclfIdbaKIdbMUdbaecwfgKaAcwfIdbaKIdbMUdbaecxfgeaAcxfIdbaeIdbMUdbaHczfhHaXcufgXmbka8RaDcltfh8FcbhHaChXina8FaHfgeascjdfaHfgAIdbaeIdbMUdbaeclfgKaAclfIdbaKIdbMUdbaecwfgKaAcwfIdbaKIdbMUdbaecxfgeaAcxfIdbaeIdbMUdbaHczfhHaXcufgXmbkaacifgaad6mbkkcbhAdndnamcwGgTmbJbbbbh8ScbhScbh9hcbh9ixekcbhSa3cbyd1:H:cjbHjjjjbbh9iasc:Cefasyd;8egecdtfa9iBdbasaecefBd;8ecua9ialabadaOz:fjjjbgXcltaXcjjjjiGEcbyd1:H:cjbHjjjjbbh9hasc:Cefasyd;8egecdtfa9hBdbasaecefBd;8ea9haXa9ia8Nalz:gjjjbJFFuuh8SaXTmba9hheaXhHinaeIdbgRa8Sa8SaR9EEh8SaeclfheaHcufgHmbkaXhSkdnalTmbaLclfheaLydbhXaYhHalhKcbhAincbaeydbg8FaX9RaHRbbcpeGEaAfhAaHcefhHaeclfhea8FhXaKcufgKmbkaAce4hAkcuadaA9Rcifg6cx2a6c;v:Q;v:Qe0Ecbyd1:H:cjbHjjjjbbh9kasc:Cefasyd;8egecdtfa9kBdbasaecefBd;8ecua6cdta6cFFFFi0Ecbyd1:H:cjbHjjjjbbh0asc:Cefasyd;8egecdtfa0BdbasaecefBd;8ea3cbyd1:H:cjbHjjjjbbh9masc:Cefasyd;8egecdtfa9mBdbasaecefBd;8ealcbyd1:H:cjbHjjjjbbh9nasc:Cefasyd;8egecdtfa9nBdbasaecefBd;8eaxaxNayJbbjZamclGEgZaZN:vh87JbbbbhUdnadak9nmbdna6ci6mbaCclth9oa9kcwfh9pJbbbbh85JbbbbhUinascNefabadalaOz:cjjjbabh8Acbh9qcbh9rinaba9rcdtfhDcbheindnaOa8AaefydbgAcdtghfydbgXaOaDaec:W:G:cjbfydbcdtfydbgHcdtg8JfydbgKSmbaYaHfRbbgacv2aYaAfRbbg8FfRb;a:G:cjbg8La8Fcv2aafg8KRb;a:G:cjbg3VcFeGTmbdnaKaX9nmba8KRb;G:G:cjbcFeGmekdna8FcufcFeGce0mbaaTmba5ahfydbaH9hmekdna8FTmbaacufcFeGce0mba8Ea8JfydbaA9hmeka9ka9qcx2fgXaHaAa3cFeGgKEBdlaXaAaHaKEBdbaXaKa8LGcb9hBdwa9qcefh9qkaeclfgecx9hmbkdna9rcifg9rad9pmba8Acxfh8Aa9qcifa69nmekka9qTmdcbh8KinaIaOa9ka8Kcx2fghydbgKcdtgXfydbg8Ac8S2fgeIdwa8Nahydlg8Fcx2fgHIdwg8WNaeIdzaHIdbg8XNaeIdaMgRaRMMa8WNaeIdlaHIdlg8YNaeIdCa8WNaeId3MgRaRMMa8YNaeIdba8XNaeIdxa8YNaeIdKMgRaRMMa8XNaeId8KMMM:lhRJbbbbJbbjZaeIdyg8V:va8VJbbbb9BEh8VdndnahydwgDmbJFFuuh86xekJbbbbJbbjZaIaOa8Fcdtfydbc8S2fgeIdyg81:va81Jbbbb9BEaeIdwa8NaKcx2fgHIdwg81NaeIdzaHIdbg80NaeIdaMgBaBMMa81NaeIdlaHIdlgBNaeIdCa81NaeId3Mg81a81MMaBNaeIdba80NaeIdxaBNaeIdKMg81a81MMa80NaeId8KMMM:lNh86ka8VaRNhBdnaCTmbagaKc8S2fgAIdwa8WNaAIdza8XNaAIdaMgRaRMMa8WNaAIdla8YNaAIdCa8WNaAId3MgRaRMMa8YNaAIdba8XNaAIdxa8YNaAIdKMgRaRMMa8XNaAId8KMMMhRa8Pa8FaC2gacdtfhHa8RaKaC2g8JcltfheaAIdyh81aChAinaHIdbg8Va8Va81NaecxfIdba8WaecwfIdbNa8XaeIdbNa8YaeclfIdbNMMMg8Va8VM:tNaRMhRaHclfhHaeczfheaAcufgAmbkdndnaDmbJbbbbh8Vxekaga8Fc8S2fgAIdwa8NaKcx2fgeIdwg8XNaAIdzaeIdbg8YNaAIdaMg8Va8VMMa8XNaAIdlaeIdlg81NaAIdCa8XNaAId3Mg8Va8VMMa81NaAIdba8YNaAIdxa81NaAIdKMg8Va8VMMa8YNaAId8KMMMh8Va8Pa8JcdtfhHa8RaacltfheaAIdyh80aChAinaHIdbg8Wa8Wa80NaecxfIdba8XaecwfIdbNa8YaeIdbNa81aeclfIdbNMMMg8Wa8WM:tNa8VMh8VaHclfhHaeczfheaAcufgAmbka8V:lh8VkaBaR:lMhBa86a8VMh86dndndnaYaKfRbbc9:fPddbekaQaXfydbgXaKSmbaOa8Fcdtfydbh8Jindndna5aXcdtgafydbgecuSmbaOaecdtfydba8JSmekdna8EaafydbgecuSmbaOaecdtfydba8JSmeka8FhekagaXc8S2fgAIdwa8Naecx2fgHIdwg8WNaAIdzaHIdbg8XNaAIdaMgRaRMMa8WNaAIdlaHIdlg8YNaAIdCa8WNaAId3MgRaRMMa8YNaAIdba8XNaAIdxa8YNaAIdKMgRaRMMa8XNaAId8KMMMhRa8PaeaC2cdtfhHa8RaXaC2cltfheaAIdyh81aChAinaHIdbg8Va8Va81NaecxfIdba8WaecwfIdbNa8XaeIdbNa8YaeclfIdbNMMMg8Va8VM:tNaRMhRaHclfhHaeczfheaAcufgAmbkaBaR:lMhBaQaafydbgXaK9hmbkkaYa8FfRbbci9hmeaDTmeaQa8FcdtfydbgXa8FSmeindndna5aXcdtgafydbgecuSmbaOaecdtfydba8ASmekdna8EaafydbgecuSmbaOaecdtfydba8ASmekaKhekagaXc8S2fgAIdwa8Naecx2fgHIdwg8WNaAIdzaHIdbg8XNaAIdaMgRaRMMa8WNaAIdlaHIdlg8YNaAIdCa8WNaAId3MgRaRMMa8YNaAIdba8XNaAIdxa8YNaAIdKMgRaRMMa8XNaAId8KMMMhRa8PaeaC2cdtfhHa8RaXaC2cltfheaAIdyh81aChAinaHIdbg8Va8Va81NaecxfIdba8WaecwfIdbNa8XaeIdbNa8YaeclfIdbNMMMg8Va8VM:tNaRMhRaHclfhHaeczfheaAcufgAmbka86aR:lMh86aQaafydbgXa8F9hmbxdkkdna8Ea5a5aXfydba8FSEaQaXfydbgacdtfydbgXcu9hmbaQa8FcdtfydbhXkagaac8S2fgAIdwa8NaXcx2fgeIdwg8WNaAIdzaeIdbg8XNaAIdaMgRaRMMa8WNaAIdlaeIdlg8YNaAIdCa8WNaAId3MgRaRMMa8YNaAIdba8XNaAIdxa8YNaAIdKMgRaRMMa8XNaAId8KMMMhRa8PaXaC2g8AcdtfhHa8RaaaC2g8JcltfheaAIdyh81aChAinaHIdbg8Va8Va81NaecxfIdba8WaecwfIdbNa8XaeIdbNa8YaeclfIdbNMMMg8Va8VM:tNaRMhRaHclfhHaeczfheaAcufgAmbkdndnaDmbJbbbbh8VxekagaXc8S2fgAIdwa8Naacx2fgeIdwg8XNaAIdzaeIdbg8YNaAIdaMg8Va8VMMa8XNaAIdlaeIdlg81NaAIdCa8XNaAId3Mg8Va8VMMa81NaAIdba8YNaAIdxa81NaAIdKMg8Va8VMMa8YNaAId8KMMMh8Va8Pa8JcdtfhHa8Ra8AcltfheaAIdyh80aChAinaHIdbg8Wa8Wa80NaecxfIdba8XaecwfIdbNa8YaeIdbNa81aeclfIdbNMMMg8Wa8WM:tNa8VMh8VaHclfhHaeczfheaAcufgAmbka8V:lh8VkaBaR:lMhBa86a8VMh86kaha86aBa86aB9DgeEUdwahaKa8FaeaDcb9hGgeEBdlaha8FaKaeEBdba8Kcefg8Ka9q9hmbkascjdfcbcj;qbz:tjjjb8Aa9phea9qhHinascjdfaeydbcA4cF8FGgAcFAaAcFA6EcdtfgAaAydbcefBdbaecxfheaHcufgHmbkcbhecbhHinascjdfaefgAydbhXaAaHBdbaXaHfhHaeclfgecj;qb9hmbkcbhea9phHinascjdfaHydbcA4cF8FGgAcFAaAcFA6EcdtfgAaAydbgAcefBdba0aAcdtfaeBdbaHcxfhHa9qaecefge9hmbkadak9RgAci9Uh9sdnalTmbcbhea9mhHinaHaeBdbaHclfhHalaecefge9hmbkkcbh9ta9ncbalz:tjjjbh3aAcO9Uh9ua9sce4h9rcbh8Lcbh8Kdnina9ka0a8Kcdtfydbcx2fg8JIdwgRa879Emea8La9s9pmeJFFuuh8Vdna9ra9q9pmba9ka0a9rcdtfydbcx2fIdwJbb;aZNh8VkdnaRa8V9ETmbaRaU9ETmba8La9u0mdkdna3aOa8JydlgDcdtg9vfg8AydbgAfg9wRbba3aOa8Jydbghcdtg9xfydbgefg9yRbbVmbaYahfRbbh9zdndnaLaecdtfgHclfydbgXaHydbgHSmbaXaH9RhXa8NaAcx2fh8Fa8Naecx2fhaaEaHcitfheindna9maeydbcdtfydbgHaASmba9maeclfydbcdtfydbgKaASmbaHaKSmba8NaKcx2fgKIdba8NaHcx2fgHIdbg8W:tgRaaIdlaHIdlg8X:tg80NaKIdla8X:tg8VaaIdba8W:tgBN:tg8YaRa8FIdla8X:tg86Na8Va8FIdba8W:tg8UN:tg8XNa8VaaIdwaHIdwg81:tg8ZNaKIdwa81:tg8Wa80N:tg80a8Va8FIdwa81:tg83Na8Wa86N:tg8VNa8WaBNaRa8ZN:tg81a8Wa8UNaRa83N:tgRNMMa8Ya8YNa80a80Na81a81NMMa8Xa8XNa8Va8VNaRaRNMMN:rJbbj8:N9FmikaecwfheaXcufgXmbkkdndndndna9zc9:fPdebdkahheina8AydbhAdndna5aecdtgHfydbgecuSmbaOaecdtfydbaASmekdna8EaHfydbgecuSmbaOaecdtfydbaASmekaDheka9maHfaeBdbaQaHfydbgeah9hmbxikkdna8Ea5a5a9xfydbaDSEaQa9xfydbghcdtfydbgecu9hmbaQa9vfydbheka9ma9xfaDBdbaehDka9mahcdtfaDBdbka9yce86bba9wce86bba8JIdwgRaUaUaR9DEhUa9tcefh9tcecda9zceSEa8Lfh8Lxeka9rcefh9rka8Kcefg8Ka9q9hmbkka9tTmddnalTmbcbh8Fcbhhindna9mahcdtgefydbgAahSmbaOaAcdtfydbh8AdnahaOaefydb9hg8JmbaIa8Ac8S2fgeaIahc8S2fgHIdbaeIdbMUdbaeaHIdlaeIdlMUdlaeaHIdwaeIdwMUdwaeaHIdxaeIdxMUdxaeaHIdzaeIdzMUdzaeaHIdCaeIdCMUdCaeaHIdKaeIdKMUdKaeaHId3aeId3MUd3aeaHIdaaeIdaMUdaaeaHId8KaeId8KMUd8KaeaHIdyaeIdyMUdya8MTmba8Ma8Acltfgea8MahcltfgHIdbaeIdbMUdbaeaHIdlaeIdlMUdlaeaHIdwaeIdwMUdwaeaHIdxaeIdxMUdxkaCTmbagaAc8S2fgeagahc8S2gDfgHIdbaeIdbMUdbaeaHIdlaeIdlMUdlaeaHIdwaeIdwMUdwaeaHIdxaeIdxMUdxaeaHIdzaeIdzMUdzaeaHIdCaeIdCMUdCaeaHIdKaeIdKMUdKaeaHId3aeId3MUd3aeaHIdaaeIdaMUdaaeaHId8KaeId8KMUd8KaeaHIdyaeIdyMUdya9oaA2haa8RhHaChXinaHaafgeaHa8FfgAIdbaeIdbMUdbaeclfgKaAclfIdbaKIdbMUdbaecwfgKaAcwfIdbaKIdbMUdbaecxfgeaAcxfIdbaeIdbMUdbaHczfhHaXcufgXmbka8JmbJbbbbJbbjZaIaDfgeIdygR:vaRJbbbb9BEaeIdwa8Na8Acx2fgHIdwgRNaeIdzaHIdbg8VNaeIdaMg8Wa8WMMaRNaeIdlaHIdlg8WNaeIdCaRNaeId3MgRaRMMa8WNaeIdba8VNaeIdxa8WNaeIdKMgRaRMMa8VNaeId8KMMM:lNgRa85a85aR9DEh85ka8Fa9ofh8Fahcefghal9hmbkcbhHa5heindnaeydbgAcuSmbdnaHa9maAcdtgXfydbgA9hmbcuhAa5aXfydbgXcuSmba9maXcdtfydbhAkaeaABdbkaeclfhealaHcefgH9hmbkcbhHa8EheindnaeydbgAcuSmbdnaHa9maAcdtgXfydbgA9hmbcuhAa8EaXfydbgXcuSmba9maXcdtfydbhAkaeaABdbkaeclfhealaHcefgH9hmbkka85aUaCEh85cbhHabhecbhAindnaOa9maeydbcdtfydbg8FcdtfydbgXaOa9maeclfydbcdtfydbgacdtfydbgKSmbaXaOa9maecwfydbcdtfydbg8AcdtfydbghSmbaKahSmbabaHcdtfgXa8FBdbaXcwfa8ABdbaXclfaaBdbaHcifhHkaecxfheaAcifgAad6mbkdndnaTmbaHhdxekdnaHak0mbaHhdxekdna8Sa859FmbaHhdxekJFFuuh8ScbhdabhecbhAindna9ha9iaeydbgXcdtfydbcdtfIdbgRa859ETmbaeclf8Pdbh9AabadcdtfgKaXBdbaKclfa9A83dbaRa8Sa8SaR9EEh8SadcifhdkaecxfheaAcifgAaH6mbkkadak0mbxdkkascNefabadalaOz:cjjjbkdndnadak0mbadhaxekdnaTmbadhaxekdna8Sa879FmbadhaxekcehKina8SJbb;aZNgRa87aRa879DEh8WJbbbbhRdnaSTmba9hheaShHinaeIdbg8VaRa8Va8W9FEaRa8VaR9EEhRaeclfheaHcufgHmbkkJFFuuh8ScbhaabhecbhHindna9ha9iaeydbgAcdtfydbcdtfIdbg8Va8W9ETmbaeclf8Pdbh9AabaacdtfgXaABdbaXclfa9A83dba8Va8Sa8Sa8V9EEh8SaacifhakaecxfheaHcifgHad6mbkdnaKaaad9hVceGmbadhaxdkaRaUaUaR9DEhUaaak9nmecbhKaahda8Sa879FmbkkdnamcjjjjdGTmba9ncbalz:tjjjbh8AdnaaTmbabheaahHina8AaeydbgAfce86bba8AaOaAcdtfydbfce86bbaeclfheaHcufgHmbkkascNefabaaalaOz:cjjjbdndnalTmbcbhXindna8AaXfRbbTmbdnaYaXfRbbgecl0mbceaetcQGmekdnaOaXcdtg8FfydbgeaXSmba8NaXcx2fgHa8Naecx2fgeydwBdwaHae8Pdb83dbxekaIaXc8S2fgKIdygcacJL:3;rUNgRMh87aKIdwg9BaRMh8SaKIdlg9CaRMh8UaKIdbg9DaRMh81aKIdag9EaRa8NaXcx2fg8JIdwg88N:th8ZaKId3g9FaRa8JIdlg89N:th83aKIdKg9Ga8JIdbg8:aRN:th80JbbbbhnaKIdCg9HJbbbbMh85aKIdzg9IJbbbbMhBaKIdxg9JJbbbbMh86dndnaCTmbaXhAinJbbbba87agaAc8S2fgHIdygR:vaRJbbbb9BEhRa8RaAaC2cltfheaHIdaa87Na8ZMh8ZaHId3a87Na83Mh83aHIdKa87Na80Mh80aHIdCa87Na85Mh85aHIdza87NaBMhBaHIdxa87Na86Mh86aHIdwa87Na8SMh8SaHIdla87Na8UMh8UaHIdba87Na81Mh81aChHina8ZaecwfIdbg8VaecxfIdbg8YNaRN:th8Za83aeclfIdbg8Wa8YNaRN:th83a85a8Wa8VNaRN:th85a81aeIdbg8Xa8XNaRN:th81a80a8Xa8YNaRN:th80aBa8Xa8VNaRN:thBa86a8Xa8WNaRN:th86a8Sa8Va8VNaRN:th8Sa8Ua8Wa8WNaRN:th8UaeczfheaHcufgHmbkaQaAcdtfydbgAaX9hmbka8MTmba8MaXcltfgeIdxhxaeIdwh9caeIdlhJaeIdbhRxekJbbbbhxJbbbbh9cJbbbbhJJbbbbhRkaBa81:vg8Wa80Na8Z:ta85aBa86a81:vg8VN:tg8Za8Ua86a8VN:tg8Y:vg8Xa8Va80Na83:tg8UN:th83a9caRa8WN:taJaRa8VN:tg86a8XN:tg85a8SaBa8WN:ta8Za8XN:tgB:vg8S:mh8Za86a8Y:vg9c:mhJdnJbbbbaRaRa81:vg9eN:ta86a9cN:ta85a8SN:tg86:la87J:983:g81NgR9ETmba8Za83NaJa8UNa9ea80Nax:tMMa86:vhnka81:laR9ETmba8Y:laR9ETmbaB:laR9ETmba9e:manNa8W:ma8ZanNa83aB:vMgBNa8V:maJanNa8X:maBNa8Ua8Y:vMMg85Na80:ma81:vMMMh87aLa8FfgeclfydbgHaeydbge9RhhaEaecitfh8FJbbbbhRdnaHaeSgDmbJbbbbhRa8FheahhAina8Naeclfydbcx2fgHIdwa88:tg8Va8VNaHIdba8::tg8Va8VNaHIdla89:tg8Va8VNMMg8Va8Naeydbcx2fgHIdwa88:tg8Wa8WNaHIdba8::tg8Wa8WNaHIdla89:tg8Wa8WNMMg8WaRaRa8W9DEgRaRa8V9DEhRaecwfheaAcufgAmbkaR:rgRaRNhRkaBa88:tg8Va8VNa87a8::tg8Va8VNa85a89:tg8Va8VNMMaR9EmbaKId8KhndnaDmbina8Na8Fclfydbcx2fgeIdba8Na8Fydbcx2fgHIdbg8W:tgRa89aHIdlg8X:tg80NaeIdla8X:tg8Va8:a8W:tg86N:tg8YaRa85a8X:tg8SNa8Va87a8W:tg8UN:tg8XNa8Va88aHIdwg81:tg8ZNaeIdwa81:tg8Wa80N:tg80a8VaBa81:tg83Na8Wa8SN:tg8VNa8Wa86NaRa8ZN:tg81a8Wa8UNaRa83N:tgRNMMa8Ya8YNa80a80Na81a81NMMa8Xa8XNa8Va8VNaRaRNMMN:rJbbj8:N9Fmda8Fcwfh8FahcufghmbkkJbbbbJbbjZac:vacJbbbb9BEgRa9BaBNa9Ia87Na9EMg8Va8VMMaBNa9Ca85Na9HaBNa9FMg8Va8VMMa85Na9Da87Na9Ja85Na9GMg8Va8VMMa87NanMMM:lNaRa9Ba88Na9Ia8:Na9EMg8Va8VMMa88Na9Ca89Na9Ha88Na9FMg8Va8VMMa89Na9Da8:Na9Ja89Na9GMg8Va8VMMa8:NanMMM:lNJbb;aZNJ:983:g81M9Emba8JaBUdwa8Ja85Udla8Ja87UdbkaXcefgXal9hmbkdnaCmbcbhCxdkcbhXindna8AaXfRbbTmbaOaXcdtgefydbaX9hmbaYaXfhhaQaefh8Ja8NaXcx2fhAa8PaXaC2cdtfhDcbhEincuhLdnahRbbci9hmbaXhLa8JydbgeaXSmba8PaEcdtgHfhKaDaHfIdbhRaXhLinaLhHcuhLdnaKaeaC2cdtfIdbaR9CmbaHcuSmbaHhLagaec8S2fIdyagaHc8S2fIdy9ETmbaehLkaQaecdtfydbgeaX9hmbkka8PaEcdtfhKa8RaEcltfh8FaXheinaKaeaC2cdtfJbbbbJbbjZagaeaLaLcuSEgHc8S2fIdygR:vaRJbbbb9BEa8FaHaC2cltfgHIdwaAIdwNaHIdbaAIdbNaHIdlaAIdlNMMaHIdxMNUdbaQaecdtfydbgeaX9hmbkaEcefgEaC9hmbkkaXcefgXal9hmbxdkkaCmbcbhCkaiavaoarawaCala8Na8Pazasayasc1efaYa8Aaqz:hjjjbkdnamcjjjjlGTmbazmbaaTmbabhecbhLinaYaeydbgAfRbbc3thQaecwfgXydbhHcjjjj94hCdna5aAcdtgEfydbaeclfgKydbgOSmbcjjjj94cba8EaOcdtfydbaASEhCkaeaQaCVaAVBdbaYaOfRbbc3th8Fcjjjj94hCcjjjj94hQdna5aOcdtfydbaHSmbcjjjj94cba8EaHcdtfydbaOSEhQkaKa8FaQVaOVBdbaYaHfRbbc3thOdna5aHcdtfydbaASmbcjjjj94cba8EaEfydbaHSEhCkaXaOaCVaHVBdbaecxfheaLcifgLaa6mbkkdnazTmbaaTmbaaheinabazabydbcdtfydbBdbabclfhbaecufgembkkdnaPTmbaPaZaU:rNUdbkdnasyd;8egHTmbaHcdtasc:Ceffc98fheinaeydbcbyd:m:H:cjbH:bjjjbbaec98fheaHcufgHmbkkascj;sbf8Kjjjjbaak;Yieouabydlhvabydbclfcbaicdtz:tjjjbhoadci9UhrdnadTmbdnalTmbaehwadhDinaoalawydbcdtfydbcdtfgqaqydbcefBdbawclfhwaDcufgDmbxdkkaehwadhDinaoawydbcdtfgqaqydbcefBdbawclfhwaDcufgDmbkkdnaiTmbcbhDaohwinawydbhqawaDBdbawclfhwaqaDfhDaicufgimbkkdnadci6mbinaecwfydbhwaeclfydbhDaeydbhidnalTmbalawcdtfydbhwalaDcdtfydbhDalaicdtfydbhikavaoaicdtfgqydbcitfaDBdbavaqydbcitfawBdlaqaqydbcefBdbavaoaDcdtfgqydbcitfawBdbavaqydbcitfaiBdlaqaqydbcefBdbavaoawcdtfgwydbcitfaiBdbavawydbcitfaDBdlawawydbcefBdbaecxfhearcufgrmbkkabydbcbBdbk:todDue99aicd4aifhrcehwinawgDcethwaDar6mbkcuaDcdtgraDcFFFFi0Ecbyd1:H:cjbHjjjjbbhwaoaoyd9GgqcefBd9GaoaqcdtfawBdbawcFearz:tjjjbhkdnaiTmbalcd4hlaDcufhxcbhminamhDdnavTmbavamcdtfydbhDkcbadaDal2cdtfgDydlgwawcjjjj94SEgwcH4aw7c:F:b:DD2cbaDydbgwawcjjjj94SEgwcH4aw7c;D;O:B8J27cbaDydwgDaDcjjjj94SEgDcH4aD7c:3F;N8N27axGhwamcdthPdndndnavTmbakawcdtfgrydbgDcuSmeadavaPfydbal2cdtfgsIdbhzcehqinaqhrdnadavaDcdtfydbal2cdtfgqIdbaz9CmbaqIdlasIdl9CmbaqIdwasIdw9BmlkarcefhqakawarfaxGgwcdtfgrydbgDcu9hmbxdkkakawcdtfgrydbgDcuSmbadamal2cdtfgsIdbhzcehqinaqhrdnadaDal2cdtfgqIdbaz9CmbaqIdlasIdl9CmbaqIdwasIdw9BmikarcefhqakawarfaxGgwcdtfgrydbgDcu9hmbkkaramBdbamhDkabaPfaDBdbamcefgmai9hmbkkakcbyd:m:H:cjbH:bjjjbbaoaoyd9GcufBd9GdnaeTmbaiTmbcbhDaehwinawaDBdbawclfhwaiaDcefgD9hmbkcbhDaehwindnaDabydbgrSmbawaearcdtfgrydbBdbaraDBdbkabclfhbawclfhwaiaDcefgD9hmbkkk;:odvuv998Jjjjjbca9Rgocbyd1:G:cjbBdKaocb8Pdj:G:cjb83izaocbydN:G:cjbBdwaocb8Pd:m:G:cjb83ibdnadTmbaicd4hrdnabmbdnalTmbcbhwinaealawcdtfydbar2cdtfhDcbhiinaoczfaifgqaDaifIdbgkaqIdbgxaxak9EEUdbaoaifgqakaqIdbgxaxak9DEUdbaiclfgicx9hmbkawcefgwad9hmbxikkarcdthwcbhDincbhiinaoczfaifgqaeaifIdbgkaqIdbgxaxak9EEUdbaoaifgqakaqIdbgxaxak9DEUdbaiclfgicx9hmbkaeawfheaDcefgDad9hmbxdkkdnalTmbcbhwinabawcx2fgiaealawcdtfydbar2cdtfgDIdbUdbaiaDIdlUdlaiaDIdwUdwcbhiinaoczfaifgqaDaifIdbgkaqIdbgxaxak9EEUdbaoaifgqakaqIdbgxaxak9DEUdbaiclfgicx9hmbkawcefgwad9hmbxdkkarcdthlcbhwaehDinabawcx2fgiaeawar2cdtfgqIdbUdbaiaqIdlUdlaiaqIdwUdwcbhiinaoczfaifgqaDaifIdbgkaqIdbgxaxak9EEUdbaoaifgqakaqIdbgxaxak9DEUdbaiclfgicx9hmbkaDalfhDawcefgwad9hmbkkJbbbbaoIdbaoIdzgx:tgkakJbbbb9DEgkaoIdlaoIdCgm:tgPaPak9DEgkaoIdwaoIdKgP:tgsasak9DEhsdnabTmbadTmbJbbbbJbbjZas:vasJbbbb9BEhkinabakabIdbax:tNUdbabclfgoakaoIdbam:tNUdbabcwfgoakaoIdbaP:tNUdbabcxfhbadcufgdmbkkdnavTmbavaPUdwavamUdlavaxUdbkask:WlewudnaeTmbcbhvabhoinaoavBdbaoclfhoaeavcefgv9hmbkkdnaiTmbcbhrinadarcdtfhwcbhDinalawaDcdtgvyd:G:G:cjbcdtfydbcdtfydbhodnalawavfydbcdtfydbgqabaqcdtfgkydbgvSmbinakabavgqcdtfgxydbgvBdbaxhkaqav9hmbkkdnaoabaocdtfgkydbgvSmbinakabavgocdtfgxydbgvBdbaxhkaoav9hmbkkdnaqaoSmbabaqaoaqao0Ecdtfaqaoaqao6EBdbkaDcefgDci9hmbkarcifgrai6mbkkdnaembcbskcbhxindnalaxcdtgvfydbax9hmbaxhodnaxabavfgDydbgvSmbaDhqinaqabavgocdtfgkydbgvBdbakhqaoav9hmbkkaDaoBdbkaxcefgxae9hmbkcbhkabhvcbhoindndnaoalydbgq9hmbdnaoavydbgq9hmbavakBdbakcefhkxdkavabaqcdtfydbBdbxekavabaqcdtfydbBdbkalclfhlavclfhvaeaocefgo9hmbkakk;jiilud99euabcbaecltz:tjjjbhvdnalTmbadhoaihralhwinarcwfIdbhDarclfIdbhqavaoydbcltfgkarIdbakIdbMUdbakaqakIdlMUdlakaDakIdwMUdwakakIdxJbbjZMUdxaoclfhoarcxfhrawcufgwmbkkdnaeTmbavhkaehrinakcxfgoIdbhDaocbBdbakakIdbJbbbbJbbjZaD:vaDJbbbb9BEgDNUdbakclfgoaDaoIdbNUdbakcwfgoaDaoIdbNUdbakczfhkarcufgrmbkkdnalTmbinavadydbcltfgkaicwfIdbakIdw:tgDaDNaiIdbakIdb:tgDaDNaiclfIdbakIdl:tgDaDNMMgDakIdxgqaqaD9DEUdxadclfhdaicxfhialcufglmbkkdnaeTmbavcxfhkinabakIdbUdbakczfhkabclfhbaecufgembkkk:moerudnaoTmbaecd4hzdnavTmbaicd4hHavcdthOcbhAindnaPaAfRbbTmbaAhednaDTmbaDaAcdtfydbhekdnasTmbasaefRbbceGmekdnamaAfRbbclSmbabaeaz2cdtfgiaraAcx2fgCIdbakNaxIdbMUdbaiaCIdlakNaxIdlMUdlaiaCIdwakNaxIdwMUdwkadaeaH2cdtfhXaqheawhiavhCinaXaeydbcdtgQfaiIdbalaQfIdb:vUdbaeclfheaiclfhiaCcufgCmbkkawaOfhwaAcefgAao9hmbxdkkdnasmbcbheaDhiindnaPaefRbbTmbaehCdnaDTmbaiydbhCkamaefRbbclSmbabaCaz2cdtfgCarIdbakNaxIdbMUdbaCarclfIdbakNaxIdlMUdlaCarcwfIdbakNaxIdwMUdwkaiclfhiarcxfhraoaecefge9hmbxdkkdnaDTmbindnaPRbbTmbasaDydbgefRbbceGmbamRbbclSmbabaeaz2cdtfgearIdbakNaxIdbMUdbaearclfIdbakNaxIdlMUdlaearcwfIdbakNaxIdwMUdwkaPcefhPaDclfhDamcefhmarcxfhraocufgombxdkkazcdthicbheindnaPaefRbbTmbasaefRbbceGmbamaefRbbclSmbabarIdbakNaxIdbMUdbabclfarclfIdbakNaxIdlMUdbabcwfarcwfIdbakNaxIdwMUdbkarcxfhrabaifhbaoaecefge9hmbkkk8MbabaeadaialavcbcbcbcbcbaoarawaDz:bjjjbk8MbabaeadaialavaoarawaDaqakaxamaPz:bjjjbkRbababaeadaialavaoarawaDaqakaxcjjjjdVamz:bjjjbk:g8Koque99due99duq998Jjjjjbc;Wb9Rgq8Kjjjjbcbhkaqcxfcbc;Kbz:tjjjb8Aaqcualcx2alc;v:Q;v:Qe0Ecbyd1:H:cjbHjjjjbbgxBdxaqceBd2axaialavcbcbz:ejjjb8AaqcualcdtalcFFFFi0Egmcbyd1:H:cjbHjjjjbbgiBdzaqcdBd2dndnJFF959eJbbjZawJbbjZawJbbjZ9DE:vawJ9VO:d869DEgw:lJbbb9p9DTmbaw:OhPxekcjjjj94hPkadci9Uhsarco9UhzdndnaombaPcd9imekdnalTmbaPcuf:YhwdnaoTmbcbhvaihHaxhOindndnaoavfRbbceGTmbavcjjjjlVhAxekdndnaOclfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhAxekcjjjj94hAkaAcqthAdndnaOcwfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhXxekcjjjj94hXkaAaXVhAdndnaOIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhXxekcjjjj94hXkaAaXcCtVhAkaHaABdbaHclfhHaOcxfhOalavcefgv9hmbxdkkaxhvaihOalhHindndnavIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhAxekcjjjj94hAkaAcCthAdndnavclfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhXxekcjjjj94hXkaXcqtaAVhAdndnavcwfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhXxekcjjjj94hXkaOaAaXVBdbavcxfhvaOclfhOaHcufgHmbkkadTmbcbhkaehvcbhOinakaiavclfydbcdtfydbgHaiavcwfydbcdtfydbgA9haiavydbcdtfydbgXaH9haXaA9hGGfhkavcxfhvaOcifgOad6mbkkarci9UhQdndnaz:Z:rJbbbZMgw:lJbbb9p9DTmbaw:Ohvxekcjjjj94hvkaQ:ZhLcbhKc:bwhzdninakaQ9pmeazaP9Rcd9imeavazcufgOavaO9iEaPcefavaP9kEhYdnalTmbaYcuf:YhwdnaoTmbcbhOaihHaxhvindndnaoaOfRbbceGTmbaOcjjjjlVhAxekdndnavclfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhAxekcjjjj94hAkaAcqthAdndnavcwfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhXxekcjjjj94hXkaAaXVhAdndnavIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhXxekcjjjj94hXkaAaXcCtVhAkaHaABdbaHclfhHavcxfhvalaOcefgO9hmbxdkkaxhvaihOalhHindndnavIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhAxekcjjjj94hAkaAcCthAdndnavclfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhXxekcjjjj94hXkaXcqtaAVhAdndnavcwfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhXxekcjjjj94hXkaOaAaXVBdbavcxfhvaOclfhOaHcufgHmbkkcbhOdnadTmbaehvcbhHinaOaiavclfydbcdtfydbgAaiavcwfydbcdtfydbgX9haiavydbcdtfydbgraA9haraX9hGGfhOavcxfhvaHcifgHad6mbkkdnas:ZgCaL:taY:Ygwaz:Y:tg8ANak:ZgEaO:Zg3:tNaEaL:tawaP:Y:tg5Na3aC:tNMg8EJbbbb9BmbaCaE:ta5a8Aa3aL:tNNNa8E:vawMhwkdndnaOaQ0mbaOhkaYhPxekaOhsaYhzkdndnaKcl0mbdnawJbbbZMgw:lJbbb9p9DTmbaw:Ohvxdkcjjjj94hvxekaPazfcd9ThvkaKcefgKcs9hmbkkdndndnakmbJbbjZhwcbhOcdhvaDmexdkalcd4alfhHcehOinaOgvcethOavaH6mbkcbhOaqcuavcdtgYavcFFFFi0Ecbyd1:H:cjbHjjjjbbgKBdCaqciBd2aqamcbyd1:H:cjbHjjjjbbgzBdKaqclBd2dndndndnalTmbaPcuf:YhwaoTmecbhOaihAaxhHindndnaoaOfRbbceGTmbaOcjjjjlVhXxekdndnaHclfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhXxekcjjjj94hXkaXcqthXdndnaHcwfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:Ohrxekcjjjj94hrkaXarVhXdndnaHIdbawNJbbbZMgC:lJbbb9p9DTmbaC:Ohrxekcjjjj94hrkaXarcCtVhXkaAaXBdbaAclfhAaHcxfhHalaOcefgO9hmbxikkaKcFeaYz:tjjjb8AcbhPcbhvxdkaxhOaihHalhAindndnaOIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhXxekcjjjj94hXkaXcCthXdndnaOclfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:Ohrxekcjjjj94hrkarcqtaXVhXdndnaOcwfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:Ohrxekcjjjj94hrkaHaXarVBdbaOcxfhOaHclfhHaAcufgAmbkkaKcFeaYz:tjjjbhravcufhocbhPcbhYindndndnaraiaYcdtgKfydbgAcm4aA7c:v;t;h;Ev2gvcs4av7aoGgHcdtfgXydbgOcuSmbcehvinaiaOcdtgOfydbaASmdaHavfhOavcefhvaraOaoGgHcdtfgXydbgOcu9hmbkkaXaYBdbaPhvaPcefhPxekazaOfydbhvkazaKfavBdbaYcefgYal9hmbkcuaPc8S2gOaPc;D;O;f8U0EhvkcbhXaqavcbyd1:H:cjbHjjjjbbgvBd3aqcvBd2avcbaOz:tjjjbhOdnadTmbaehiinaxaiclfydbgrcx2fgvIdbaxaiydbgocx2fgHIdbg3:tgCaxaicwfydbgYcx2fgAIdlaHIdlg8A:tgwNavIdla8A:tgEaAIdba3:tg8EN:tgLaLNaEaAIdwaHIdwg5:tg8FNavIdwa5:tgEawN:tgwawNaEa8ENaCa8FN:tgCaCNMMg8E:rhEJbbnnJbbjZazaocdtfydbgvazarcdtfydbgASavazaYcdtfydbgrSGgHEh8Fdna8EJbbbb9ETmbaLaE:vhLaCaE:vhCawaE:vhwkaOavc8S2fgvavIdbawa8FaE:rNgEawNNg8FMUdbavaCaEaCNgaNghavIdlMUdlavaLaEaLNg8ENggavIdwMUdwavawaaNgaavIdxMUdxava8EawNg8JavIdzMUdzavaCa8ENg8EavIdCMUdCavawaEaLa5Nawa3Na8AaCNMM:mg8ANg3NgwavIdKMUdKavaCa3NgCavId3MUd3avaLa3NgLavIdaMUdaava3a8ANg3avId8KMUd8KavaEavIdyMUdydnaHmbaOaAc8S2fgva8FavIdbMUdbavahavIdlMUdlavagavIdwMUdwavaaavIdxMUdxava8JavIdzMUdzava8EavIdCMUdCavawavIdKMUdKavaCavId3MUd3avaLavIdaMUdaava3avId8KMUd8KavaEavIdyMUdyaOarc8S2fgva8FavIdbMUdbavahavIdlMUdlavagavIdwMUdwavaaavIdxMUdxava8JavIdzMUdzava8EavIdCMUdCavawavIdKMUdKavaCavId3MUd3avaLavIdaMUdaava3avId8KMUd8KavaEavIdyMUdykaicxfhiaXcifgXad6mbkkcbhAaqcuaPcdtgvaPcFFFFi0Egicbyd1:H:cjbHjjjjbbgHBdaaqcoBd2aqaicbyd1:H:cjbHjjjjbbgiBd8KaqcrBd2aHcFeavz:tjjjbhYdnalTmbazhHinJbbbbJbbjZaOaHydbgXc8S2fgvIdygw:vawJbbbb9BEavIdwaxcwfIdbgwNavIdzaxIdbgCNavIdaMgLaLMMawNavIdlaxclfIdbgLNavIdCawNavId3MgwawMMaLNavIdbaCNavIdxaLNavIdKMgwawMMaCNavId8KMMM:lNhwdndnaYaXcdtgvfgXydbcuSmbaiavfIdbaw9ETmekaXaABdbaiavfawUdbkaHclfhHaxcxfhxalaAcefgA9hmbkkdndnaPmbJbbbbhwxekJbbbbhwinaiIdbgCawawaC9DEhwaiclfhiaPcufgPmbkaw:rhwkakcd4akfhOcehiinaigvcethiavaO6mbkcbhOaqcuavcdtgiavcFFFFi0Ecbyd1:H:cjbHjjjjbbgHBdyaHcFeaiz:tjjjbhXdnadTmbavcufhrcbhPcbhxindnazaeaxcdtfgvydbcdtfydbgiazavclfydbcdtfydbgOSmbaiazavcwfydbcdtfydbgvSmbaOavSmbaYavcdtfydbhAdndnaYaOcdtfydbgvaYaicdtfydbgi9pmbavaA9pmbaAhlaihoavhAxekdnaAai9pmbaAav9pmbaihlavhoxekavhlaAhoaihAkabaPcx2fgvaABdbavcwfaoBdbavclfalBdbdnaXaoc:3F;N8N2alc:F:b:DD27aAc;D;O:B8J27arGgOcdtfgvydbgicuSmbcehHinaHhvdnabaicx2fgiydbaA9hmbaiydlal9hmbaiydwaoSmikavcefhHaXaOavfarGgOcdtfgvydbgicu9hmbkkavaPBdbaPcefhPkaxcifgxad6mbkaPci2hOkcwhvaDTmekaDawUdbkavcdthvaqcxfc98fhiinaiavfydbcbyd:m:H:cjbH:bjjjbbavc98fgvmbkaqc;Wbf8KjjjjbaOk:3ldrue9:8Jjjjjbc;Wb9Rgr8Kjjjjbcbhwarcxfcbc;Kbz:tjjjb8AdnabaeSmbabaeadcdtzMjjjb8AkarcualcdtalcFFFFi0EgDcbyd1:H:cjbHjjjjbbgqBdxarceBd2aqcbaialavcbarcxfz:djjjbcualcx2alc;v:Q;v:Qe0Ecbyd1:H:cjbHjjjjbbhkarcxfaryd2gxcdtfakBdbaraxcefgmBd2akaialavcbcbz:ejjjb8AarcxfamcdtfaDcbyd1:H:cjbHjjjjbbgiBdbaraxcdfgvBd2arcxfavcdtfcuaialaeadaqz:fjjjbgecltaecjjjjiGEcbyd1:H:cjbHjjjjbbgqBdbaqaeaiakalz:gjjjbaxcifhkdnadTmbaoaoNhocbhwabhlcbheindnaqaialydbgvcdtfydbcdtfIdbao9ETmbalclf8PdbhPabawcdtfgDavBdbaDclfaP83dbawcifhwkalcxfhlaecifgead6mbkkdnakTmbaxcdtarcxffcwfhlinalydbcbyd:m:H:cjbH:bjjjbbalc98fhlakcufgkmbkkarc;Wbf8Kjjjjbawk:WCoDud99vue99vuv998Jjjjjbc;Wb9Rgw8KjjjjbdndnarmbcbhDxekawcxfcbc;Kbz:tjjjb8Aawcuadcx2adc;v:Q;v:Qe0Ecbyd1:H:cjbHjjjjbbgqBdxawceBd2aqaeadaicbcbz:ejjjb8AawcuadcdtadcFFFFi0Egkcbyd1:H:cjbHjjjjbbgxBdzawcdBd2adcd4adfhmceheinaegicetheaiam6mbkcbhPawcuaicdtgsaicFFFFi0Ecbyd1:H:cjbHjjjjbbgzBdCawciBd2dndnar:ZgH:rJbbbZMgO:lJbbb9p9DTmbaO:Ohexekcjjjj94hekaicufhAc:bwhCcbhXadhQcbhLinaeaCcufgiaeai9iEaPcefaeaP9kEhDdndnadTmbaDcuf:YhOaqhiaxheadhmindndnaiIdbaONJbbbZMgK:lJbbb9p9DTmbaK:OhYxekcjjjj94hYkaYcCthYdndnaiclfIdbaONJbbbZMgK:lJbbb9p9DTmbaK:Oh8Axekcjjjj94h8Aka8AcqtaYVhYdndnaicwfIdbaONJbbbZMgK:lJbbb9p9DTmbaK:Oh8Axekcjjjj94h8AkaeaYa8AVBdbaicxfhiaeclfheamcufgmmbkazcFeasz:tjjjbhEcbh3cbh5indnaEaxa5cdtfydbgYcm4aY7c:v;t;h;Ev2gics4ai7aAGgmcdtfg8AydbgecuSmbaeaYSmbcehiinaEamaifaAGgmcdtfg8AydbgecuSmeaicefhiaeaY9hmbkka8AaYBdba3aecuSfh3a5cefg5ad9hmbxdkkazcFeasz:tjjjb8Acbh3kdnaQ:ZgKaH:taD:YgOaC:Y:tg8ENaX:Zg8Fa3:Zga:tNa8FaH:taOaP:Y:tghNaaaK:tNMggJbbbb9BmbaKa8F:taha8EaaaH:tNNNag:vaOMhOkaPaDa3ar0giEhPaXa3aiEhXdna3arSmbaDaCaiEgCaP9Rcd9imbdndnaLcl0mbdnaOJbbbZMgO:lJbbb9p9DTmbaO:Ohexdkcjjjj94hexekaPaCfcd9Theka3aQaiEhQaLcefgLcs9hmekkdndnaXmbcihicbhDxekcbhiawakcbyd1:H:cjbHjjjjbbg5BdKawclBd2aPcuf:YhKdndnadTmbaqhiaxheadhmindndnaiIdbaKNJbbbZMgO:lJbbb9p9DTmbaO:OhYxekcjjjj94hYkaYcCthYdndnaiclfIdbaKNJbbbZMgO:lJbbb9p9DTmbaO:Oh8Axekcjjjj94h8Aka8AcqtaYVhYdndnaicwfIdbaKNJbbbZMgO:lJbbb9p9DTmbaO:Oh8Axekcjjjj94h8AkaeaYa8AVBdbaicxfhiaeclfheamcufgmmbkazcFeasz:tjjjbhEcbhDcbh3indndndnaEaxa3cdtgCfydbgYcm4aY7c:v;t;h;Ev2gics4ai7aAGgmcdtfg8AydbgecuSmbcehiinaxaecdtgefydbaYSmdamaifheaicefhiaEaeaAGgmcdtfg8Aydbgecu9hmbkka8Aa3BdbaDhiaDcefhDxeka5aefydbhika5aCfaiBdba3cefg3ad9hmbkcuaDc32giaDc;j:KM;jb0EhexekazcFeasz:tjjjb8AcbhDcbhekawaecbyd1:H:cjbHjjjjbbgeBd3awcvBd2aecbaiz:tjjjbh8Aavcd4hxdnadTmbdnalTmbaxcdthEa5hYaqhealhmadhAina8AaYydbc32fgiaeIdbaiIdbMUdbaiaeclfIdbaiIdlMUdlaiaecwfIdbaiIdwMUdwaiamIdbaiIdxMUdxaiamclfIdbaiIdzMUdzaiamcwfIdbaiIdCMUdCaiaiIdKJbbjZMUdKaYclfhYaecxfheamaEfhmaAcufgAmbxdkka5hmaqheadhYina8Aamydbc32fgiaeIdbaiIdbMUdbaiaeclfIdbaiIdlMUdlaiaecwfIdbaiIdwMUdwaiaiIdxJbbbbMUdxaiaiIdzJbbbbMUdzaiaiIdCJbbbbMUdCaiaiIdKJbbjZMUdKamclfhmaecxfheaYcufgYmbkkdnaDTmba8AhiaDheinaiaiIdbJbbbbJbbjZaicKfIdbgO:vaOJbbbb9BEgONUdbaiclfgmaOamIdbNUdbaicwfgmaOamIdbNUdbaicxfgmaOamIdbNUdbaiczfgmaOamIdbNUdbaicCfgmaOamIdbNUdbaic3fhiaecufgembkkcbhYawcuaDcdtgCaDcFFFFi0Egicbyd1:H:cjbHjjjjbbgeBdaawcoBd2awaicbyd1:H:cjbHjjjjbbgEBd8KaecFeaCz:tjjjbh3dnadTmbaoJbbjZJbbjZaK:vaPceSENgOaONhKaxcdthxalheinaKaec;8:G:cjbalEgmIdwa8Aa5ydbgAc32fgiIdC:tgOaONamIdbaiIdx:tgOaONamIdlaiIdz:tgOaONMMNaqcwfIdbaiIdw:tgOaONaqIdbaiIdb:tgOaONaqclfIdbaiIdl:tgOaONMMMhOdndna3aAcdtgifgmydbcuSmbaEaifIdbaO9ETmekamaYBdbaEaifaOUdbka5clfh5aqcxfhqaeaxfheadaYcefgY9hmbkkaba3aCzMjjjb8Acrhikaicdthiawcxfc98fheinaeaifydbcbyd:m:H:cjbH:bjjjbbaic98fgimbkkawc;Wbf8KjjjjbaDk:Pdidui99ducbhi8Jjjjjbca9Rglcbyd1:G:cjbBdKalcb8Pdj:G:cjb83izalcbydN:G:cjbBdwalcb8Pd:m:G:cjb83ibdndnaembJbbjFhvJbbjFhoJbbjFhrxekadcd4cdthwincbhdinalczfadfgDabadfIdbgvaDIdbgoaoav9EEUdbaladfgDavaDIdbgoaoav9DEUdbadclfgdcx9hmbkabawfhbaicefgiae9hmbkalIdwalIdK:thralIdlalIdC:thoalIdbalIdz:thvkJbbbbavavJbbbb9DEgvaoaoav9DEgvararav9DEk9DeeuabcFeaicdtz:tjjjbhlcbhbdnadTmbindnalaeydbcdtfgiydbcu9hmbaiabBdbabcefhbkaeclfheadcufgdmbkkabk;Bidqui998Jjjjjbc;Wb9Rgl8Kjjjjbalcxfcbc;Kbz:tjjjb8Aadcd4adfhvcehoinaogrcethoarav6mbkalcuarcdtgoarcFFFFi0Ecbyd1:H:cjbHjjjjbbgvBdxavcFeaoz:tjjjbhwdnadTmbaicd4hDarcufhqcbhkindndnawcbaeakaD2cdtfgrydlgiaicjjjj94SEgocH4ao7c:F:b:DD2cbarydbgxaxcjjjj94SEgocH4ao7c;D;O:B8J27cbarydwgmamcjjjj94SEgrcH4ar7c:3F;N8N27aqGgvcdtfgrydbgocuSmbam::hPai::hsax::hzcehiinaihrdnaeaoaD2cdtfgiIdbaz9CmbaiIdlas9CmbaiIdwaP9BmikarcefhiawavarfaqGgvcdtfgrydbgocu9hmbkkarakBdbakhokabakcdtfaoBdbakcefgkad9hmbkkalydxcbyd:m:H:cjbH:bjjjbbalc;Wbf8Kjjjjbk9teiucbcbyd:q:H:cjbgeabcifc98GfgbBd:q:H:cjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabk9teiucbcbyd:q:H:cjbgeabcrfc94GfgbBd:q:H:cjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikTeeucbabcbyd:q:H:cjbge9Rcifc98GaefgbBd:q:H:cjbdnabZbcztge9nmbabae9RcFFifcz4nb8Akkk:Kedbcj:Gdk1eFFuuFFuuFFuuFFuFFFuFFFuFbbbbbbbbebbbdbbbbbbbebbbebbbdbbbbbbbbbbbeeeeebebbebbebebbbeebbbbbbbbbbbbeeeeeebebbeeebeebbbbebebbbbbbbbbbbbbbbbbbc1:Hdkxebbbdbbb:G:qbb",t=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 n,i=WebAssembly.instantiate(o(e),{}).then(function(b){n=b.instance,n.exports.__wasm_call_ctors()});function o(b){for(var C=new Uint8Array(b.length),E=0;E<b.length;++E){var S=b.charCodeAt(E);C[E]=S>96?S-97:S>64?S-39:S+4}for(var w=0,E=0;E<b.length;++E)C[w++]=C[E]<60?t[C[E]]:(C[E]-60)*64+C[++E];return C.buffer.slice(0,w)}function r(b){if(!b)throw new Error("Assertion failed")}function a(b){return new Uint8Array(b.buffer,b.byteOffset,b.byteLength)}function s(b,C,E,S){var w=n.exports.sbrk,P=w(E*4),R=w(E*S*4),B=new Uint8Array(n.exports.memory.buffer);B.set(a(C),R),b(P,R,E,S*4),B=new Uint8Array(n.exports.memory.buffer);var L=new Uint32Array(E);return new Uint8Array(L.buffer).set(B.subarray(P,P+E*4)),w(P-w(0)),L}function c(b,C,E){var S=n.exports.sbrk,w=S(C.length*4),P=S(E*4),R=new Uint8Array(n.exports.memory.buffer),B=a(C);R.set(B,w);var L=b(P,w,C.length,E);R=new Uint8Array(n.exports.memory.buffer);var _=new Uint32Array(E);new Uint8Array(_.buffer).set(R.subarray(P,P+E*4)),S(w-S(0));for(var T=0;T<C.length;++T)C[T]=_[C[T]];return[_,L]}function u(b){for(var C=0,E=0;E<b.length;++E){var S=b[E];C=C<S?S:C}return C}function f(b,C,E,S,w,P,R,B,L){var _=n.exports.sbrk,T=_(4),v=_(E*4),I=_(w*P),O=_(E*4),N=new Uint8Array(n.exports.memory.buffer);N.set(a(S),I),N.set(a(C),O);var j=b(v,O,E,I,w,P,R,B,L,T);N=new Uint8Array(n.exports.memory.buffer);var k=new Uint32Array(j);a(k).set(N.subarray(v,v+j*4));var U=new Float32Array(1);return a(U).set(N.subarray(T,T+4)),_(T-_(0)),[k,U[0]]}function d(b,C,E,S,w,P,R,B,L,_,T,v,I){var O=n.exports.sbrk,N=O(4),j=O(E*4),k=O(w*P),U=O(w*B),F=O(L.length*4),H=O(E*4),q=_?O(w):0,J=new Uint8Array(n.exports.memory.buffer);J.set(a(S),k),J.set(a(R),U),J.set(a(L),F),J.set(a(C),H),_&&J.set(a(_),q);var W=b(j,H,E,k,w,P,U,B,F,L.length,q,T,v,I,N);J=new Uint8Array(n.exports.memory.buffer);var Z=new Uint32Array(W);a(Z).set(J.subarray(j,j+W*4));var K=new Float32Array(1);return a(K).set(J.subarray(N,N+4)),O(N-O(0)),[Z,K[0]]}function p(b,C,E,S,w,P,R,B,L,_,T,v,I){var O=n.exports.sbrk,N=O(4),j=O(w*P),k=O(w*B),U=O(L.length*4),F=O(E*4),H=_?O(w):0,q=new Uint8Array(n.exports.memory.buffer);q.set(a(S),j),q.set(a(R),k),q.set(a(L),U),q.set(a(C),F),_&&q.set(a(_),H);var J=b(F,E,j,w,P,k,B,U,L.length,H,T,v,I,N);q=new Uint8Array(n.exports.memory.buffer),a(C).set(q.subarray(F,F+J*4)),a(S).set(q.subarray(j,j+w*P)),a(R).set(q.subarray(k,k+w*B));var W=new Float32Array(1);return a(W).set(q.subarray(N,N+4)),O(N-O(0)),[J,W[0]]}function g(b,C,E,S){var w=n.exports.sbrk,P=w(E*S),R=new Uint8Array(n.exports.memory.buffer);R.set(a(C),P);var B=b(P,E,S);return w(P-w(0)),B}function m(b,C,E,S,w,P,R,B){var L=n.exports.sbrk,_=L(B*4),T=L(E*S),v=w?L(E*P):0,I=new Uint8Array(n.exports.memory.buffer);I.set(a(C),T),w&&I.set(a(w),v);var O=b(_,T,E,S,v,P,R,B);I=new Uint8Array(n.exports.memory.buffer);var N=new Uint32Array(O);return a(N).set(I.subarray(_,_+O*4)),L(_-L(0)),N}function A(b,C,E,S,w,P,R,B,L){var _=n.exports.sbrk,T=_(4),v=_(E*4),I=_(w*P),O=_(E*4),N=R?_(w):0,j=new Uint8Array(n.exports.memory.buffer);j.set(a(S),I),j.set(a(C),O),R&&j.set(a(R),N);var k=b(v,O,E,I,w,P,N,B,L,T);j=new Uint8Array(n.exports.memory.buffer);var U=new Uint32Array(k);a(U).set(j.subarray(v,v+k*4));var F=new Float32Array(1);return a(F).set(j.subarray(T,T+4)),_(T-_(0)),[U,F[0]]}function y(b,C,E,S,w,P,R){var B=n.exports.sbrk,L=B(E*4),_=B(w*P),T=B(E*4),v=new Uint8Array(n.exports.memory.buffer);v.set(a(S),_),v.set(a(C),T);var I=b(L,T,E,_,w,P,R);v=new Uint8Array(n.exports.memory.buffer);var O=new Uint32Array(I);return a(O).set(v.subarray(L,L+I*4)),B(L-B(0)),O}var x={LockBorder:1,Sparse:2,ErrorAbsolute:4,Prune:8,Regularize:16,Permissive:32,_InternalDebug:1<<30};return{ready:i,supported:!0,compactMesh:function(b){r(b instanceof Uint32Array||b instanceof Int32Array||b instanceof Uint16Array||b instanceof Int16Array),r(b.length%3==0);var C=b.BYTES_PER_ELEMENT==4?b:new Uint32Array(b),E=c(n.exports.meshopt_optimizeVertexFetchRemap,C,u(b)+1);if(b!==C)for(var S=0;S<C.length;++S)b[S]=C[S];return E},generatePositionRemap:function(b,C){return r(b instanceof Float32Array),r(b.length%C==0),r(C>=3),s(n.exports.meshopt_generatePositionRemap,b,b.length/C,C)},simplify:function(b,C,E,S,w,P){r(b instanceof Uint32Array||b instanceof Int32Array||b instanceof Uint16Array||b instanceof Int16Array),r(b.length%3==0),r(C instanceof Float32Array),r(C.length%E==0),r(E>=3),r(S>=0&&S<=b.length),r(S%3==0),r(w>=0);for(var R=0,B=0;B<(P?P.length:0);++B)r(P[B]in x),R|=x[P[B]];var L=b.BYTES_PER_ELEMENT==4?b:new Uint32Array(b),_=f(n.exports.meshopt_simplify,L,b.length,C,C.length/E,E*4,S,w,R);return _[0]=b instanceof Uint32Array?_[0]:new b.constructor(_[0]),_},simplifyWithAttributes:function(b,C,E,S,w,P,R,B,L,_){r(b instanceof Uint32Array||b instanceof Int32Array||b instanceof Uint16Array||b instanceof Int16Array),r(b.length%3==0),r(C instanceof Float32Array),r(C.length%E==0),r(E>=3),r(S instanceof Float32Array),r(S.length==w*(C.length/E)),r(w>=0),r(R==null||R instanceof Uint8Array),r(R==null||R.length==C.length/E),r(B>=0&&B<=b.length),r(B%3==0),r(L>=0),r(Array.isArray(P)),r(w>=P.length),r(P.length<=32);for(var T=0;T<P.length;++T)r(P[T]>=0);for(var v=0,T=0;T<(_?_.length:0);++T)r(_[T]in x),v|=x[_[T]];var I=b.BYTES_PER_ELEMENT==4?b:new Uint32Array(b),O=d(n.exports.meshopt_simplifyWithAttributes,I,b.length,C,C.length/E,E*4,S,w*4,new Float32Array(P),R,B,L,v);return O[0]=b instanceof Uint32Array?O[0]:new b.constructor(O[0]),O},simplifyWithUpdate:function(b,C,E,S,w,P,R,B,L,_){r(b instanceof Uint32Array||b instanceof Int32Array||b instanceof Uint16Array||b instanceof Int16Array),r(b.length%3==0),r(C instanceof Float32Array),r(C.length%E==0),r(E>=3),r(S instanceof Float32Array),r(S.length==w*(C.length/E)),r(w>=0),r(R==null||R instanceof Uint8Array),r(R==null||R.length==C.length/E),r(B>=0&&B<=b.length),r(B%3==0),r(L>=0),r(Array.isArray(P)),r(w>=P.length),r(P.length<=32);for(var T=0;T<P.length;++T)r(P[T]>=0);for(var v=0,T=0;T<(_?_.length:0);++T)r(_[T]in x),v|=x[_[T]];var I=b.BYTES_PER_ELEMENT==4?b:new Uint32Array(b),O=p(n.exports.meshopt_simplifyWithUpdate,I,b.length,C,C.length/E,E*4,S,w*4,new Float32Array(P),R,B,L,v);if(b!==I)for(var T=0;T<O[0];++T)b[T]=I[T];return O},getScale:function(b,C){return r(b instanceof Float32Array),r(b.length%C==0),r(C>=3),g(n.exports.meshopt_simplifyScale,b,b.length/C,C*4)},simplifyPoints:function(b,C,E,S,w,P){return r(b instanceof Float32Array),r(b.length%C==0),r(C>=3),r(E>=0&&E<=b.length/C),S?(r(S instanceof Float32Array),r(S.length%w==0),r(w>=3),r(b.length/C==S.length/w),m(n.exports.meshopt_simplifyPoints,b,b.length/C,C*4,S,w*4,P||0,E)):m(n.exports.meshopt_simplifyPoints,b,b.length/C,C*4,void 0,0,0,E)},simplifySloppy:function(b,C,E,S,w,P){r(b instanceof Uint32Array||b instanceof Int32Array||b instanceof Uint16Array||b instanceof Int16Array),r(b.length%3==0),r(C instanceof Float32Array),r(C.length%E==0),r(E>=3),r(S==null||S instanceof Uint8Array),r(S==null||S.length==C.length/E),r(w>=0&&w<=b.length),r(w%3==0),r(P>=0);var R=b.BYTES_PER_ELEMENT==4?b:new Uint32Array(b),B=A(n.exports.meshopt_simplifySloppy,R,b.length,C,C.length/E,E*4,S,w,P);return B[0]=b instanceof Uint32Array?B[0]:new b.constructor(B[0]),B},simplifyPrune:function(b,C,E,S){r(b instanceof Uint32Array||b instanceof Int32Array||b instanceof Uint16Array||b instanceof Int16Array),r(b.length%3==0),r(C instanceof Float32Array),r(C.length%E==0),r(E>=3),r(S>=0);var w=b.BYTES_PER_ELEMENT==4?b:new Uint32Array(b),P=y(n.exports.meshopt_simplifyPrune,w,b.length,C,C.length/E,E*4,S);return P=b instanceof Uint32Array?P:new b.constructor(P),P}}})();var R0n=(function(){var e="b9H79Tebbbe:neP9Geueu9Geub9Gbb9Giuuueu9Gmuuuuuuuuuuu9999eu9Gouuuuuueu9Gruuuuuuub9Gxuuuuuuuuuuuueu9Gxuuuuuuuuuuu99eu9GPuuuuuuuuuuuuu99b9Gouuuuuub9Gwuuuuuuuub9Gvuuuuub9GluuuubiQXdilvorwDqokoqxmbiibeilve9Weiiviebeoweuecj:Gdkr;Zeqo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9I919P29K9nW79O2Wt79c9V919U9KbeY9TW79O9V9Wt9F9I919P29K9nW79O2Wt7S2W94bd39TW79O9V9Wt9F9I919P29K9nW79O2Wt79t9W9Ht9P9H2bo39TW79O9V9Wt9F9J9V9T9W91tWJ2917tWV9c9V919U9K7bw39TW79O9V9Wt9F9J9V9T9W91tW9nW79O2Wt9c9V919U9K7bkE9TW79O9V9Wt9F9J9V9T9W91tW9t9W9OWVW9c9V919U9K7bxL9TW79O9V9Wt9F9V9Wt9P9T9P96W9nW79O2WtbPl79IV9RbsDwebcekdOAq;W:leXdbkIbabaec9:fgefcufae9Ugeabci9Uadfcufad9Ugbaeab0Ek:88JDPue99eux99due99euo99iu8Jjjjjbc:WD9Rgm8KjjjjbdndnalmbcbhPxekamc:Cwfcbc;Kbz:rjjjb8AcuaocdtgsaocFFFFi0Ehzcbyd;0:G:cjbhHdndnalcb9imbaoal9nmbamazaHHjjjjbbgHBd:CwamceBd;8wamazcbyd;0:G:cjbHjjjjbbgOBd:GwamcdBd;8wamcualcdtalcFFFFi0Ecbyd;0:G:cjbHjjjjbbgABd:KwamciBd;8waihzalhsinaHazydbcdtfcbBdbazclfhzascufgsmbkaihzalhsinaHazydbcdtfgCaCydbcefBdbazclfhzascufgsmbkaihzalhCcbhXindnaHazydbcdtgQfgsydbcb9imbaOaQfaXBdbasasydbgQcjjjj94VBdbaQaXfhXkazclfhzaCcufgCmbkalci9UhLdnalci6mbcbhzaihsinascwfydbhCasclfydbhXaOasydbcdtfgQaQydbgQcefBdbaAaQcdtfazBdbaOaXcdtfgXaXydbgXcefBdbaAaXcdtfazBdbaOaCcdtfgCaCydbgCcefBdbaAaCcdtfazBdbascxfhsaLazcefgz9hmbkkaihzalhsindnaHazydbcdtgCfgXydbgQcu9kmbaXaQcFFFFrGgQBdbaOaCfgCaCydbaQ9RBdbkazclfhzascufgsmbxdkkamazaHHjjjjbbgHBd:CwamceBd;8wamazcbyd;0:G:cjbHjjjjbbgOBd:GwamcdBd;8wamcualcdtalcFFFFi0Ecbyd;0:G:cjbHjjjjbbgABd:KwamciBd;8waHcbasz:rjjjbhXaihzalhsinaXazydbcdtfgCaCydbcefBdbazclfhzascufgsmbkalci9UhLdnaoTmbcbhzaOhsaXhCaohQinasazBdbasclfhsaCydbazfhzaCclfhCaQcufgQmbkkdnalci6mbcbhzaihsinascwfydbhCasclfydbhQaOasydbcdtfgKaKydbgKcefBdbaAaKcdtfazBdbaOaQcdtfgQaQydbgQcefBdbaAaQcdtfazBdbaOaCcdtfgCaCydbgCcefBdbaAaCcdtfazBdbascxfhsaLazcefgz9hmbkkaoTmbcbhzaohsinaOazfgCaCydbaXazfydb9RBdbazclfhzascufgsmbkkamaLcbyd;0:G:cjbHjjjjbbgzBd:OwamclBd;8wazcbaLz:rjjjbhYamcuaLcK2alcjjjjd0Ecbyd;0:G:cjbHjjjjbbg8ABd:SwamcvBd;8wJbbbbhEdnalci6g3mbarcd4hKaihsa8AhzaLhrJbbbbh5inavasclfydbaK2cdtfgCIdlh8EavasydbaK2cdtfgXIdlhEavascwfydbaK2cdtfgQIdlh8FaCIdwhaaXIdwhhaQIdwhgazaCIdbg8JaXIdbg8KMaQIdbg8LMJbbnn:vUdbazclfaXIdlaCIdlMaQIdlMJbbnn:vUdbaQIdwh8MaCIdwh8NaXIdwhyazcxfa8EaE:tg8Eagah:tggNaaah:tgaa8FaE:tghN:tgEJbbbbJbbjZa8Ja8K:tg8FahNa8Ea8La8K:tg8KN:tghahNaEaENaaa8KNa8FagN:tgEaENMMg8K:rg8E:va8KJbbbb9BEg8KNUdbazczfaEa8KNUdbazcCfaha8KNUdbazcwfa8Maya8NMMJbbnn:vUdba5a8EMh5ascxfhsazcKfhzarcufgrmbka5aL:Z:vJbbbZNhEkamcuaLcdtalcFFFF970Ecbyd;0:G:cjbHjjjjbbgCBd:WwamcoBd;8waq:Zhhdna3mbcbhzaChsinasazBdbasclfhsaLazcefgz9hmbkkaEahNhhamcuaLcltalcFFFFd0Ecbyd;0:G:cjbHjjjjbbg8PBd:0wamcrBd;8wcba8Pa8AaCaLcbz:djjjb8AJFFuuh8MJFFuuh8NJFFuuhydnalci6mbJFFuuhya8AhzaLhsJFFuuh8NJFFuuh8MinazcwfIdbgEa8Ma8MaE9EEh8MazclfIdbgEa8Na8NaE9EEh8NazIdbgEayayaE9EEhyazcKfhzascufgsmbkkah:rhEamaocetgzcuaocu9kEcbyd;0:G:cjbHjjjjbbgCBd:4wdndnaoal9nmbaihzalhsinaCazydbcetfcFFi87ebazclfhzascufgsmbxdkkaCcFeazz:rjjjb8AkaEJbbbZNh8JcuhIdnalci6mbcbhsJFFuuhEa8AhzcuhIinazcwfIdba8M:tghahNazIdbay:tghahNazclfIdba8N:tghahNMM:rghaEaIcuSahaE9DVgXEhEasaIaXEhIazcKfhzaLascefgs9hmbkkamczfcbcjwz:rjjjb8Aam9cb83iwam9cb83ibaxa8JNh8RJbbjZak:th8Lcbh8SJbbbbhRJbbbbh8UJbbbbh8VJbbbbh8WJbbbbh8XJbbbbh8Ycbh8ZcbhPinJbbbbhEdna8STmbJbbjZa8S:Z:vhEkJbbbbhhdna8Ya8YNa8Wa8WNa8Xa8XNMMg8KJbbbb9BmbJbbjZa8K:r:vhhka8VaENh8Ka8UaENh5aRaENh8EaIhLdndndndndna8SaPVTmbamydwg80Tmea8YahNh8Fa8XahNhaa8WahNhgaeamydbcdtfh81cbh3JFFuuhEcvhQcuhLindnaHa81a3cdtfydbcdtgzfydbgvTmbaAaOazfydbcdtfhsindndnaCaiasydbgKcx2fgzclfydbgrcetf8Vebcs4aCazydbgXcetf8Vebcs4faCazcwfydbglcetf8Vebcs4fgombcbhzxekcehzaHaXcdtfydbgXceSmbcehzaHarcdtfydbgrceSmbcehzaHalcdtfydbglceSmbdnarcdSaXcdSfalcdSfcd6mbaocefhzxekaocdfhzkdnazaQ9kmba8AaKcK2fgXIdwa8K:tghahNaXIdba8E:tghahNaXIdla5:tghahNMM:ra8J:va8LNJbbjZMJ9VO:d86JbbjZaXIdCa8FNaXIdxagNaaaXIdzNMMakN:tghahJ9VO:d869DENghaEazaQ6ahaE9DVgXEhEaKaLaXEhLazaQaXEhQkasclfhsavcufgvmbkka3cefg3a809hmbkkaLcu9hmekama8KUd:ODama5Ud:KDama8EUd:GDamcuBd:qDamcFFF;7rBdjDa8Pcba8AaYamc:GDfamc:qDfamcjDfz:ejjjbamyd:qDhLdndnaxJbbbb9ETmba8SaD6mbaLcuSmeceh3amIdjDa8R9EmixdkaLcu9hmekdna8STmbabaPcltfgHam8Piw83dwaHam8Pib83dbaPcefhPkc3hHinamc:CwfaHfydbcbyd;4:G:cjbH:bjjjbbaHc98fgHc989hmbxvkkcbh3a8Saq9pmbamydwaCaiaLcx2fgzydbcetf8Vebcs4aCazcwfydbcetf8Vebcs4faCazclfydbcetf8Vebcs4ffaw9nmekcbhzcbhsdna8ZTmbcbhsamczfhXinamczfascdtfaXydbgQBdbaXclfhXasaYaQfRbbTfhsa8Zcufg8ZmbkkamydwhlamydbhXam9cu83i:GDam9cu83i:ODam9cu83i:qDam9cu83i:yDinamcjDfazfcFFF;7rBdbazclfgzcz9hmbkasc;8easclfc:bd6Eg8Zcdth80dnalTmbaeaXcdtfhocbhrindnaHaoarcdtfydbcdtgzfydbgvTmbaAaOazfydbcdtfhscuhQcuhzinaHaiasydbgKcx2fgXclfydbcdtfydbaHaXydbcdtfydbfaHaXcwfydbcdtfydbfgXazaXaz6gXEhzaKaQaXEhQasclfhsavcufgvmbkaQcuSmba8AaQcK2fgsIdwa8M:tgEaENasIdbay:tgEaENasIdla8N:tgEaENMM:rhEcbhsindndnazamc:qDfasfgvydbgX6mbazaX9hmeaEamcjDfasfIdb9FTmekavazBdbamc:GDfasfaQBdbamcjDfasfaEUdbxdkasclfgscz9hmbkkarcefgral9hmbkkamczfa80fhQcbhzcbhsindnamc:GDfazfydbgXcuSmbaQascdtfaXBdbascefhskazclfgzcz9hmbkasa8Zfg8ZTmbJFFuuhhcuhKamczfhza8ZhvcuhQina8AazydbgXcK2fgsIdwa8M:tgEaENasIdbay:tgEaENasIdla8N:tgEaENMM:rhEdndnaHaiaXcx2fgsclfydbcdtfydbaHasydbcdtfydbfaHascwfydbcdtfydbfgsaQ6mbasaQ9hmeaEah9DTmekaEhhashQaXhKkazclfhzavcufgvmbkaKcuSmbaKhLkdnamaiaLcx2fgrydbarclfydbarcwfydbaCabaeadaPawaqa3z:fjjjbTmbaPcefhPJbbbbhRJbbbbh8UJbbbbh8VJbbbbh8WJbbbbh8XJbbbbh8YkcbhXinaAaOaraXcdtfydbcdtgsfydbcdtfgKhzaHasfgvydbgQhsdnaQTmbdninazydbaLSmeazclfhzascufgsTmdxbkkazaKaQcdtfc98fydbBdbavavydbcufBdbkaXcefgXci9hmbka8AaLcK2fgzIdbhEazIdlhhazIdwh8KazIdxh5azIdzh8EazIdCh8FaYaLfce86bba8Ya8FMh8Ya8Xa8EMh8Xa8Wa5Mh8Wa8Va8KMh8Va8UahMh8UaRaEMhRamydxh8Sxbkkamc:WDf8KjjjjbaPkjoivuv99lu8Jjjjjbca9Rgo8Kjjjjbdndnalcw0mbaiydbhraeabcitfgwalcdtciVBdlawarBdbdnalcd6mbaiclfhralcufhDawcxfhwinarydbhqawcuBdbawc98faqBdbawcwfhwarclfhraDcufgDmbkkalabfhwxekcbhqaocbBdKao9cb83izaocbBdwao9cb83ibJbbjZhkJbbjZhxinadaiaqcdtfydbcK2fhDcbhwinaoczfawfgraDawfIdbgmarIdbgP:tgsaxNaPMgPUdbaoawfgrasamaP:tNarIdbMUdbawclfgwcx9hmbkJbbjZakJbbjZMgk:vhxaqcefgqal9hmbkcbhradcbcecdaoIdlgmaoIdwgP9GEgwaoIdbgsaP9GEawasam9GEgzcdtgwfhHaoczfawfIdbhmaihwalhDinaiarcdtfgqydbhOaqawydbgABdbawaOBdbawclfhwaraHaAcK2fIdbam9DfhraDcufgDmbkdndnarcv6mbavc8X9kmbaralc98f6mekaiydbhraeabcitfgwalcdtciVBdlawarBdbaiclfhralcufhDawcxfhwinarydbhqawcuBdbawc98faqBdbawcwfhwarclfhraDcufgDmbkalabfhwxekaeabcitfgwamUdbawawydlc98GazVBdlabcefaeadaiaravcefgqz:djjjbhDawawydlciGaDabcu7fcdtVBdlaDaeadaiarcdtfalar9Raqz:djjjbhwkaocaf8Kjjjjbawk;Oddvue99dninabaecitfgrydlgwcd4gDTmednawciGgqci9hmbcihqdnawcl6mbabaecitfhbcbheawhqcehkindnaiabydbgDfRbbmbcbhkadaDcK2fgwIdwalIdw:tgxaxNawIdbalIdb:tgxaxNawIdlalIdl:tgxaxNMM:rgxaoIdb9DTmbaoaxUdbavaDBdbarydlhqkabcwfhbaecefgeaqcd46mbkakceGTmikaraqciGBdlskdnabcbaDalaqcdtfIdbarIdb:tgxJbbbb9FEgwaD7aecefgDfgecitfydlabawaDfgDcitfydlVci0mbaraqBdlkabaDadaialavaoz:ejjjbax:laoIdb9Fmbkkkjlevudndnabydwgxaladcetfgm8Vebcs4alaecetfgP8Vebgscs4falaicetfgz8Vebcs4ffaD0mbakmbcbhDabydxaq6mekavawcltfgxab8Pdw83dwaxab8Pdb83dbabydbhDdnabydwgwTmbaoaDcdtfhxawhsinalaxydbcetfcFFi87ebaxclfhxascufgsmbkkabaDawfBdbabydxhxab9cb83dwababydlaxci2fBdlaP8VebhscehDcbhxkdnascztcz91cu9kmbabaxcefBdwaPax87ebaoabydbcdtfaxcdtfaeBdbkdnam8Uebcu9kmbababydwgxcefBdwamax87ebaoabydbcdtfaxcdtfadBdbkdnaz8Uebcu9kmbababydwgxcefBdwazax87ebaoabydbcdtfaxcdtfaiBdbkarabydlfabydxci2faPRbb86bbarabydlfabydxci2fcefamRbb86bbarabydlfabydxci2fcdfazRbb86bbababydxcefBdxaDk:mPrHue99eue99eue99iu8Jjjjjbc;W;Gb9Rgx8KjjjjbdndnalmbcbhmxekcbhPaxc:m;Gbfcbc;Kbz:rjjjb8Aaxcualci9UgscltascjjjjiGEcbyd;0:G:cjbHjjjjbbgzBd:m9GaxceBd;S9GaxcuascK2gHcKfalcpFFFe0Ecbyd;0:G:cjbHjjjjbbgOBd:q9GaxcdBd;S9Gdnalci6gAmbarcd4hCascdthXaOhQazhLinavaiaPcx2fgrydwaC2cdtfhKavarydlaC2cdtfhYavarydbaC2cdtfh8AcbhraLhEinaQarfgma8Aarfg3Idbg5aYarfg8EIdbg8Fa5a8F9DEg5UdbamaKarfgaIdbg8Fa5a8Fa59DEg8FUdbamcxfgma3Idbg5a8EIdbgha5ah9EEg5UdbamaaIdbgha5aha59EEg5UdbaEa8Fa5MJbbbZNUdbaEaXfhEarclfgrcx9hmbkaQcKfhQaLclfhLaPcefgPas9hmbkkaOaHfgr9cb83dbar9cb83dzar9cb83dwaxcuascx2gralc:bjjjl0Ecbyd;0:G:cjbHjjjjbbgHBdN9GaxciBd;S9GascdthgazarfhvaxcwVhPaxclVhCaHh8Jazh8KcbhLinaxcbcj;Gbz:rjjjbhEaLas2cdthadnaAmba8Khrash3inaEarydbgmc8F91cjjjj94Vam7gmcQ4cx2fg8Ea8EydwcefBdwaEamcd4cFrGcx2fg8Ea8EydbcefBdbaEamcx4cFrGcx2fgmamydlcefBdlarclfhra3cufg3mbkkazaafh8AaHaafhXcbhmcbh3cbh8EcbhainaEamfgrydbhQara3BdbarcwfgKydbhYaKaaBdbarclfgrydbhKara8EBdbaQa3fh3aYaafhaaKa8Efh8Eamcxfgmcj;Gb9hmbkdnaAmbcbhravhminamarBdbamclfhmasarcefgr9hmbkavhrashminaEa8Aarydbg3cdtfydbg8Ec8F91a8E7cd4cFrGcx2fg8Ea8Eydbg8EcefBdbaXa8Ecdtfa3Bdbarclfhramcufgmmbka8JhrashminaCa8Aarydbg3cdtfydbg8Ec8F91a8E7cx4cFrGcx2fg8Ea8Eydbg8EcefBdbava8Ecdtfa3BdbarclfhramcufgmmbkavhrashminaPa8Aarydbg3cdtfydbg8Ec8F91cjjjj94Va8E7cQ4cx2fg8Ea8Eydbg8EcefBdbaXa8Ecdtfa3Bdbarclfhramcufgmmbkka8Jagfh8Ja8Kagfh8KaLcefgLci9hmbkaEaocetgrcuaocu9kEcbyd;0:G:cjbHjjjjbbgKBd:y9GaEclBd;S9Gdndnaoal9nmbaihralhminaKarydbcetfcFFi87ebarclfhramcufgmmbxdkkaKcFearz:rjjjb8Akcbh8EaEascbyd;0:G:cjbHjjjjbbg8ABd:C9GaOaHaHascdtfaHascitfa8AascbazaKaiawaDaqakz:hjjjbdndnalci6mba8Ahrashmina8EarRbbfh8EarcefhramcufgmmbkaE9cb83iwaE9cb83ibalawc9:fgrfcufar9UgrasaDfcufaD9Ugmaram0EhYcbhmcbhra8Ehaincbh3dnarTmba8AarfRbbceSh3kamaEaiaHydbcx2fgQydbaQclfydbaQcwfydbaKabaeadamawaqa3a3ce7a8EaY9nVaaamfaY6VGz:fjjjbfhmaHclfhHaaa8AarfRbb9Rhaasarcefgr9hmbkaEydxTmeabamcltfgraE8Piw83dwaraE8Pib83dbamcefhmxekaE9cb83iwaE9cb83ibcbhmkczhrinaEc:m;Gbfarfydbcbyd;4:G:cjbH:bjjjbbarc98fgrc989hmbkkaxc;W;Gbf8Kjjjjbamk:wKDQue99iue99iul9:euw99iu8Jjjjjbc;qb9RgP8Kjjjjbaxhsaxhzdndnavax0gHmbdnavTmbcbhOaehzavhAinawaDazydbcx2fgCcwfydbcetfgX8VebhQawaCclfydbcetfgL8VebhKawaCydbcetfgC8VebhYaXce87ebaLce87ebaCce87ebaOaKcs4aYcs4faQcs4ffhOazclfhzaAcufgAmbkaehzavhAinawaDazydbcx2fgCcwfydbcetfcFFi87ebawaCclfydbcetfcFFi87ebawaCydbcetfcFFi87ebazclfhzaAcufgAmbkcehzaqhsaOaq0mekalce86bbalcefcbavcufz:rjjjb8AxekaPaiBdxaPadBdwaPaeBdlavakaqci9Ug8Aaka8Aak6EaHEgK9RhEaxaK9Rh3aKcufh5aKceth8EaKcdtgCc98fh8FavcitgOaC9Rarfc98fhaascufhhavcufhgaraOfh8JJbbjZas:Y:vh8KcbazceakaxSEg8Lcdtg8M9Rh8NJFFuuhycuh8PcbhIcbh8RinaPclfa8RcdtfydbhQaPcb8Pd:y:G:cjbg8S83i9iaPcb8Pd:q:G:cjbgR83inaPcb8Pd1:G:cjbg8U83iUaPcb8Pdj:G:cjbg8V83i8WaPa8S83iyaPaR83iaaPa8U83iKaPa8V83izaQavcdtgYfh8WcbhXinabaQaXcdtgLfydbcK2fhAcbhzinaPc8WfazfgCaAazfgOIdbg8XaCIdbg8Ya8Xa8Y9DEUdbaCczfgCaOcxfIdbg8XaCIdbg8Ya8Xa8Y9EEUdbazclfgzcx9hmbkaba8WaXcu7cdtfydbcK2fhAcbhzaPIdUh8ZaPId9ih80aPId80h81aPId9ehBaPId8Wh83aPIdnhUinaPczfazfgCaAazfgOIdbg8XaCIdbg8Ya8Xa8Y9DEUdbaCczfgCaOcxfIdbg8XaCIdbg8Ya8Xa8Y9EEUdbazclfgzcx9hmbkaraLfgzaBa81:tg8Xa80a8Z:tg8YNaUa83:tg8Za8XNa8Za8YNMMUdbazaYfaPId8KaPIdC:tg8XaPIdyaPIdK:tg8YNaPIdaaPIdz:tg8Za8XNa8Za8YNMMUdbaXcefgXav9hmbkcbh85dnaHmbcbhAaQhza8JhCavhXinawaDazydbcx2fgOcwfydbcetfgL8Vebh8WawaOclfydbcetfg858Vebh86awaOydbcetfgO8Vebh87aLce87eba85ce87ebaOce87ebaCaAa86cs4a87cs4fa8Wcs4ffgABdbazclfhzaCclfhCaXcufgXmbkavhCinawaDaQydbcx2fgzcwfydbcetfcFFi87ebawazclfydbcetfcFFi87ebawazydbcetfcFFi87ebaQclfhQaCcufgCmbka8Jh85kdndndndndndndndndndndnava8E6mba8Eax9nmeavavaK9UgzaK29Raza320mda5aE9pmqa85Th87ceh8WaEhQxwka5ag9pmDa8Eax9nmixokavaK6mea5aE9pmwcehQaEhXa85Tmixlka5ag6mlxrka5ag9pmokcbhQaghXa85mekJFFuuh8XcbhLa5hzindnazcefgCaK6mbaQavaC9RgOaK6GmbarazcdtfIdbg8YaC:YNaravaz9RcdtfaYfc94fIdbg8ZaO:YNMg80a8X9Embdndna8KaOahf:YNg81:lJbbb9p9DTmba81:OhAxekcjjjj94hAka8ZasaA2aO9R:YNh8Zdndna8Kazasf:YNg81:lJbbb9p9DTmba81:OhOxekcjjjj94hOkamasaO2aC9R:Ya8YNa8ZMNa80Mg8Ya8Xa8Ya8X9DgOEh8XaCaLaOEhLkaza8LfgzaX6mbxlkkJFFuuh8XcbhLaEhCaahAa8FhOaKhzindnazaK6mbaQaCaK6GmbaraOfIdbg8Yaz:YNaAIdbg8ZaC:YNMg80a8X9Embdndna8Ka85aOfydbgYahf:YNg81:lJbbb9p9DTmba81:Oh8Wxekcjjjj94h8Wkamasa8W2aY9R:Yg81a8YNa8Za81NMNa80Mg8Ya8Xa8Ya8X9DgYEh8XazaLaYEhLkaCa8L9RhCaAa8NfhAaOa8MfhOaza8LfgzcufaX6mbxikka85Th87cbh8WaghQkJFFuuh8XcbhLaEhCaahAa8FhOaKhzindnazazaK9UgXaK29RaXa320mbdna8WTmbaCaCaK9UgXaK29RaXa320mekaraOfIdbg8Yaz:YNaAIdbg8ZaC:YNMg80a8X9EmbazhXaChYdna87mba85aOfydbgXhYkdndna8KaYahf:YNg81:lJbbb9p9DTmba81:Oh86xekcjjjj94h86ka8Zasa862aY9R:YNh8Zdndna8KaXahf:YNg81:lJbbb9p9DTmba81:OhYxekcjjjj94hYkamasaY2aX9R:Ya8YNa8ZMNa80Mg8Ya8Xa8Ya8X9DgXEh8XazaLaXEhLkaCa8L9RhCaAa8NfhAaOa8MfhOaza8LfgzcufaQ6mbkkaLTmba8Xay9DTmba8XhyaLhIa8Rh8Pka8Rcefg8Rci9hmbkdndnaoc8X9kmba8Pcb9omeka8Acufh85cbhYindndndnavaY9RaxaYaxfav0Eg8WTmbcbhAaeaYcdtfgzhCa8WhXinawaDaCydbcx2fgOcwfydbcetfgQ8VebhbawaOclfydbcetfgL8VebhrawaOydbcetfgO8VebhKaQce87ebaLce87ebaOce87ebaAarcs4aKcs4fabcs4ffhAaCclfhCaXcufgXmbka8WhOinawaDazydbcx2fgCcwfydbcetfcFFi87ebawaCclfydbcetfcFFi87ebawaCydbcetfcFFi87ebazclfhzaOcufgOmbkaAaq0mekalaYfgzce86bbazcefcba8Wcufz:rjjjb8AxekalaYfgzce86bbazcefcba85z:rjjjb8Aa8Ah8Wka8WaYfgYav9pmdxbkkaravcdtg8WfhLdnaITmbaPclfa8PcdtfydbhzaIhCinaLazydbfcb86bbazclfhzaCcufgCmbkkdnavaI9nmbaPclfa8PcdtfydbaIcdtfhzavaI9RhCinaLazydbfce86bbazclfhzaCcufgCmbkkcbhYindnaYa8PSmbcbhzaraPclfaYcdtfydbgKa8Wz:qjjjbhCavhXaIhOinaKaOazaLaCydbgQfRbbgAEcdtfaQBdbaCclfhCaOaAfhOazaA9RcefhzaXcufgXmbkkaYcefgYci9hmbkabaeadaialaIaocefgCarawaDaqakaxamz:hjjjbabaeaIcdtgzfadazfaiazfalaIfavaI9RaCarawaDaqakaxamz:hjjjbkaPc;qbf8Kjjjjbk:Seeru8Jjjjjbc:q;ab9Rgo8Kjjjjbaoc:q8WfcFecjzz:rjjjb8AcbhrdnadTmbaehwadhDinaoarcdtfawydbgqBdbaoc:q8WfaqcFiGcdtfgkydbhxakaqBdbawclfhwaraxaq9hfhraDcufgDmbkkabaeadaoaraiavz:jjjjbaoc:q;abf8Kjjjjbk;Sqloud99euD998Jjjjjbc:W;ab9Rgr8KjjjjbdndnadTmbaocd4hwcbhDcbhqindnavaeclfydbaw2cdtfgkIdbavaeydbaw2cdtfgxIdbgm:tgPavaecwfydbaw2cdtfgsIdlaxIdlgz:tgHNakIdlaz:tgOasIdbam:tgAN:tgCaCNaOasIdwaxIdwgX:tgQNakIdwaX:tgOaHN:tgHaHNaOaANaPaQN:tgPaPNMMgOJbbbb9Bmbarc8WfaDcltfgkaCaO:rgO:vgCUdwakaPaO:vgPUdlakaHaO:vgHUdbakaCaXNaHamNazaPNMM:mUdxaDcefhDkaecxfheaqcifgqad6mbkab9cb83dyab9cb83daab9cb83dKab9cb83dzab9cb83dwab9cb83dbaDTmearcbBd8Sar9cb83iKar9cb83izarczfavalaoarc8Sfcbcraiz:kjjjbarIdKhQarIdChLarIdzhKar9cb83iwar9cb83ibararc8WfaDczarc8Sfcbcicbz:kjjjbJbbbbhmdnarIdwgzazNarIdbgHaHNarIdlgXaXNMMgCJbbbb9BmbJbbjZaC:r:vhmkazamNhCaXamNhXaHamNhHJbbjZhmarc8WfheaDhvinaecwfIdbaCNaeIdbaHNaXaeclfIdbNMMgzamazam9DEhmaeczfheavcufgvmbkabaQUdwabaLUdlabaKUdbabarId3UdxdndnamJ;n;m;m899FmbJbbbbhzarc8WfheinaecxfIdbaQaecwfIdbgPNaKaeIdbgONaLaeclfIdbgANMMMaCaPNaHaONaXaANMM:vgPazaPaz9EEhzaeczfheaDcufgDmbkabaCUd8KabaXUdaabaHUd3abaQaCazN:tUdKabaLaXazN:tUdCabaKaHazN:tUdzabJbbjZamamN:t:rgmUdydndnaCJbbj:;aCJbbj:;9GEgzJbbjZazJbbjZ9FEJbb;:9cNJbbbZJbbb:;aCJbbbb9GEMgz:lJbbb9p9DTmbaz:Ohexekcjjjj94hekabae86b8UdndnaXJbbj:;aXJbbj:;9GEgzJbbjZazJbbjZ9FEJbb;:9cNJbbbZJbbb:;aXJbbbb9GEMgz:lJbbb9p9DTmbaz:Ohvxekcjjjj94hvkabav86bRdndnaHJbbj:;aHJbbj:;9GEgzJbbjZazJbbjZ9FEJbb;:9cNJbbbZJbbb:;aHJbbbb9GEMgz:lJbbb9p9DTmbaz:Ohwxekcjjjj94hwkabaw86b8SdndnaecKtcK91:YJbb;:9c:vaC:t:lavcKtcK91:YJbb;:9c:vaX:t:lawcKtcK91:YJbb;:9c:vaH:t:lamMMMJbb;:9cNJbbjZMgm:lJbbb9p9DTmbam:Ohexekcjjjj94hekaecFbaecFb9iEhexekabcjjj;8iBdycFbhekabae86b8Vxekab9cb83dyab9cb83daab9cb83dKab9cb83dzab9cb83dwab9cb83dbkarc:W;abf8Kjjjjbk;7woDuo99eue99euv998Jjjjjbcje9Rgw8Kjjjjbawc;abfcbaocdtgDz:rjjjb8Aawc;GbfcbaDz:rjjjb8AawcafhDawhqaohkinaqcFFF97BdbaDcFFF;7rBdbaqclfhqaDclfhDakcufgkmbkavcd4hxaicd4hmdnadTmbaocx2hPcbhsinashzdnarTmbarascdtfydbhzkaeazam2cdtfgDIdwhHaDIdlhOaDIdbhAalazax2cdtfIdbhCcbhDawcafhqawc;Gbfhvawhkawc;abfhiinaCaDc:O:G:cjbfIdbaHNaDc:G:G:cjbfIdbaANaDc:K:G:cjbfIdbaONMMgXMhQazhLdnaXaC:tgXaqIdbgK9DgYmbavydbhLkavaLBdbazhLdnaQakIdbg8A9EmbaiydbhLa8AhQkaiaLBdbakaQUdbaqaXaKaYEUdbaiclfhiakclfhkavclfhvaqclfhqaPaDcxfgD9hmbkascefgsad9hmbkkJbbbbhQcbhLawc;GbfhDawc;abfhqcbhkinalaqydbgvax2cdtfIdbalaDydbgiax2cdtfIdbaeavam2cdtfgvIdwaeaiam2cdtfgiIdw:tgCaCNavIdbaiIdb:tgCaCNavIdlaiIdl:tgCaCNMM:rMMgCaQaCaQ9EgvEhQakaLavEhLaqclfhqaDclfhDaoakcefgk9hmbkJbbbbhCdnaeawc;abfaLcdtgqfydbgkam2cdtfgDIdwaeawc;Gbfaqfydbgvam2cdtfgqIdwgH:tgXaXNaDIdbaqIdbgA:tg8Aa8ANaDIdlaqIdlgE:tgOaONMMgKJbbbb9ETmbaK:rgCalakax2cdtfIdbMalavax2cdtfIdb:taCaCM:vhCkaQJbbbZNhKaXaCNaHMhHaOaCNaEMhOa8AaCNaAMhAdnadTmbcbhqarhkinaqhDdnarTmbakydbhDkdnalaDax2cdtfIdbg3aeaDam2cdtfgDIdwaH:tgQaQNaDIdbaA:tgCaCNaDIdlaO:tgXaXNMMg5:rgEMg8EaK9ETmbJbbbbh8Adna5Jbbbb9ETmba8EaK:taEaEM:vh8Aka8AaQNaHMhHa8AaXNaOMhOa8AaCNaAMhAa3aKaEMMJbbbZNhKkakclfhkadaqcefgq9hmbkkabaKUdxabaHUdwabaOUdlabaAUdbawcjef8Kjjjjbk:reevu8Jjjjjbcj8W9Rgr8Kjjjjbaici2hwcbhDdnaiTmbarhiawhqinaiaeadRbbgkcdtfydbBdbaDakcefgkaDak0EhDaiclfhiadcefhdaqcufgqmbkkabarawaeaDalaoz:jjjjbarcj8Wf8Kjjjjbk:Eeeeu8Jjjjjbca9Rgo8Kjjjjbab9cb83dyab9cb83daab9cb83dKab9cb83dzab9cb83dwab9cb83dbdnadTmbaocbBd3ao9cb83iwao9cb83ibaoaeadaialaoc3falEavcbalEcrcbz:kjjjbabao8Pib83dbabao8Piw83dwkaocaf8Kjjjjbk::meQu8Jjjjjbcjz9Rgv8KjjjjbcbhoavcjPfcbaez:rjjjb8Aavcjxfcbaez:rjjjb8AdnaiTmbadhoaihrinavcjxfaoRbbfgwawRbbcef86bbavcjxfaocefRbbfgwawRbbcef86bbavcjxfaocdfRbbfgwawRbbcef86bbaocifhoarcufgrmbkcbhDcjehoadhqcehkindndnalTmbcbhxcuhmaqhrakhwcuhPinawcufamaoavcjPfarcefRbbgsfRbb9RcFeGgzci6aoavcjPfarRbbgHfRbb9RcFeGgOci6faoavcjPfarcdfRbbgAfRbb9RcFeGgCci6fgXcOtaOcFr7azaCf9RcwtVavcjxfaAfRbbgzavcjxfaHfRbbgHavcjxfasfRbbgsaHas6Egsazas6EcFe7VgsaP9kgzEhmaXcd6gHaxcefgOal9iVce9hmdasaPazEhPaxaOaHEhxarcifhrawai6hsawcefhwasmbxdkkcuhmaqhrakhwcuhxinawcufamaoavcjPfarcefRbbfRbb9RcFeGci6aoavcjPfarRbbfRbb9RcFeGci6faoavcjPfarcdfRbbfRbb9RcFeGci6fgPax9kgsEhmaPce0meaPaxasEhxarcifhrawai6hPawcefhwaPmbkkadamci2fgrcdfRbbhwarcefRbbhxarRbbhPadaDci2fgrcifaramaD9Rci2zNjjjb8AaPavcjPffaocefgo86bbaPavcjxffgmamRbbcuf86bbaxavcjPffao86bbaxavcjxffgmamRbbcuf86bbarcdfaw86bbarcefax86bbaraP86bbawavcjPffao86bbawavcjxffgrarRbbcuf86bbaqcifhqakcefhkaDcefgDai9hmbkcbhzdnalcb9mmbcbhsavcjPfcbaez:rjjjb8Aadcvfhlinadasci2fgxcefgDRbbhoaxcdfgqRbbhrdndnavcjPfaxRbbgmfRbbmbavcjPfarfRbbhwdndndnavcjPfaofRbbTmbawcFeGTmexikawcFeGmdascefgAai9pmdasc980mdascifhQcbhLarcFeGhCamcFeGhXalhwcbhKcbhYinawcufRbbhPawRbbhOcehkdndnawc9:fRbbgHao9hmbaPcFeGamSmekdnaPcFeGao9hmbaOcFeGamSmekaHamSaOcFeGaoSGhkkceh8AaYceGhYdndnaHar9hmbaPcFeGaoSmekdnaPcFeGar9hmbaOcFeGaoSmekaHaoSaOcFeGarSGh8AkakaYVhYaLaHcFeGgHaXSaPcFeGgPaCSGaPaXSaOcFeGgPaCSGVaHaCSaPaXSGVVhLa8AaKceGVhKdnaAcefgPai9pmbawcifhwaAaQ6hHaPhAaHmekkaYTmeaKmekarhwaohPaohHarhOamhrxdkdnaYTaLVceGTmbaYaKTVaLVceGmekamhwarhParhHamhOaohrxekaohwamhPamhHaohOkavcjPfarfce86bbavcjPfawfce86bbaxaH86bbaqar86bbaDaO86bbavcjPfaPfce86bbalcifhlascefgsai9hmbkkavcFeaecetz:rjjjbhwaici2hrindnawadRbbgmcetfgx8Uebgocu9kmbaxaz87ebawcjlfazcdtfabamcdtfydbBdbazhoazcefhzkadao86bbadcefhdarcufgrmbkazcdthokabavcjlfaoz:qjjjb8Aavcjzf8KjjjjbkObabaiaeadcbz:njjjbk9teiucbcbyd;8:G:cjbgeabcifc98GfgbBd;8:G:cjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabk9teiucbcbyd;8:G:cjbgeabcrfc94GfgbBd;8:G:cjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikTeeucbabcbyd;8:G:cjbge9Rcifc98GaefgbBd;8:G:cjbdnabZbcztge9nmbabae9RcFFifcz4nb8Akk:3qeludndnadch6mbadTmeabaead;8qbbabskabaeSmbdnaeadabfgi9Rcbadcet9R0mbadTmeabaead;8qbbabskaeab7ciGhldndndnabae9pmbdnalTmbadhvabhixikdnabciGmbadhvabhixdkadTmiabaeRbb86bbadcufhvdnabcefgiciGmbaecefhexdkavTmiabaeRbe86beadc9:fhvdnabcdfgiciGmbaecdfhexdkavTmiabaeRbd86bdadc99fhvdnabcifgiciGmbaecifhexdkavTmiabaeRbi86biabclfhiaeclfheadc98fhvxekdnalmbdnaiciGTmbadTmlabadcufgifglaeaifRbb86bbdnalciGmbaihdxekaiTmlabadc9:fgifglaeaifRbb86bbdnalciGmbaihdxekaiTmlabadc99fgifglaeaifRbb86bbdnalciGmbaihdxekaiTmlabadc98fgdfaeadfRbb86bbkadcl6mbdnadc98fgocxGcxSmbaocd4cefciGhiaec98fhlabc98fhvinavadfaladfydbBdbadc98fhdaicufgimbkkaocx6mbaec9Wfhvabc9WfhoinaoadfgicxfavadfglcxfydbBdbaicwfalcwfydbBdbaiclfalclfydbBdbaialydbBdbadc9Wfgdci0mbkkadTmdadhidnadciGglTmbaecufhvabcufhoadhiinaoaifavaifRbb86bbaicufhialcufglmbkkadcl6mdaec98fhlabc98fhvinavaifgecifalaifgdcifRbb86bbaecdfadcdfRbb86bbaecefadcefRbb86bbaeadRbb86bbaic98fgimbxikkavcl6mbdnavc98fglc3Gc3Smbavalcd4cefcrGgdcdt9RhvinaiaeydbBdbaeclfheaiclfhiadcufgdmbkkalc36mbinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaiczfaeczfydbBdbaicCfaecCfydbBdbaicKfaecKfydbBdbaic3faec3fydbBdbaecafheaicafhiavc9Gfgvci0mbkkavTmbdndnavcrGgdmbavhlxekavc94GhlinaiaeRbb86bbaicefhiaecefheadcufgdmbkkavcw6mbinaiaeRbb86bbaicefaecefRbb86bbaicdfaecdfRbb86bbaicifaecifRbb86bbaiclfaeclfRbb86bbaicvfaecvfRbb86bbaicofaecofRbb86bbaicrfaecrfRbb86bbaicwfhiaecwfhealc94fglmbkkabkk:pedbcj:GdktFFuuFFuuFFuubbbbFFuFFFuFFFuFbbbbbbjZbbbbbbbbbbbbbbjZbbbbbbbbbbbbbbjZ86;nAZ86;nAZ86;nAZ86;nA:;86;nAZ86;nAZ86;nAZ86;nA:;86;nAZ86;nAZ86;nAZ86;nA:;bc;0:Gdkxebbbdbbbj:qbb",t=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 n,i=WebAssembly.instantiate(o(e),{}).then(function(A){n=A.instance,n.exports.__wasm_call_ctors()});function o(A){for(var y=new Uint8Array(A.length),x=0;x<A.length;++x){var b=A.charCodeAt(x);y[x]=b>96?b-97:b>64?b-39:b+4}for(var C=0,x=0;x<A.length;++x)y[C++]=y[x]<60?t[y[x]]:(y[x]-60)*64+y[++x];return y.buffer.slice(0,C)}function r(A){if(!A)throw new Error("Assertion failed")}function a(A){return new Uint8Array(A.buffer,A.byteOffset,A.byteLength)}var s=48,c=16;function u(A,y){var x=A.meshlets[y*4+0],b=A.meshlets[y*4+1],C=A.meshlets[y*4+2],E=A.meshlets[y*4+3];return{vertices:A.vertices.subarray(x,x+C),triangles:A.triangles.subarray(b,b+E*3)}}function f(A,y,x,b,C,E,S,w,P,R){var B=n.exports.sbrk,L=n.exports.meshopt_buildMeshletsBound(y.length,E,S),_=B(L*c),T=B(y.length*4),v=B(y.length),I=B(y.byteLength),O=B(x.byteLength),N=new Uint8Array(n.exports.memory.buffer);N.set(a(y),I),N.set(a(x),O);var j=A(_,T,v,I,y.length,O,b,C,E,S,w,P,R);N=new Uint8Array(n.exports.memory.buffer);for(var k=N.subarray(_,_+j*c),U=new Uint32Array(k.buffer,k.byteOffset,k.byteLength/4).slice(),F=0;F<j;++F){var H=U[F*4+0],q=U[F*4+1],b=U[F*4+2],J=U[F*4+3];n.exports.meshopt_optimizeMeshlet(T+H*4,v+q,J,b)}var W=j?U[(j-1)*4+0]+U[(j-1)*4+2]:0,Z=j?U[(j-1)*4+1]+U[(j-1)*4+3]*3:0,K={meshlets:U,vertices:new Uint32Array(N.buffer,T,W).slice(),triangles:new Uint8Array(N.buffer,v,Z).slice(),meshletCount:j};return B(_-B(0)),K}function d(A){var y=new Float32Array(n.exports.memory.buffer,A,s/4);return{centerX:y[0],centerY:y[1],centerZ:y[2],radius:y[3],coneApexX:y[4],coneApexY:y[5],coneApexZ:y[6],coneAxisX:y[7],coneAxisY:y[8],coneAxisZ:y[9],coneCutoff:y[10]}}function p(A,y,x,b){var C=n.exports.sbrk,E=[],S=C(y.byteLength),w=C(A.vertices.byteLength),P=C(A.triangles.byteLength),R=C(s),B=new Uint8Array(n.exports.memory.buffer);B.set(a(y),S),B.set(a(A.vertices),w),B.set(a(A.triangles),P);for(var L=0;L<A.meshletCount;++L){var _=A.meshlets[L*4+0],T=A.meshlets[L*4+1],v=A.meshlets[L*4+3];n.exports.meshopt_computeMeshletBounds(R,w+_*4,P+T,v,S,x,b),E.push(d(R))}return C(S-C(0)),E}function g(A,y,x,b){var C=n.exports.sbrk,E=C(s),S=C(A.byteLength),w=C(y.byteLength),P=new Uint8Array(n.exports.memory.buffer);P.set(a(A),S),P.set(a(y),w),n.exports.meshopt_computeClusterBounds(E,S,A.length,w,x,b);var R=d(E);return C(E-C(0)),R}function m(A,y,x,b,C){var E=n.exports.sbrk,S=E(s),w=E(A.byteLength),P=b?E(b.byteLength):0,R=new Uint8Array(n.exports.memory.buffer);R.set(a(A),w),b&&R.set(a(b),P),n.exports.meshopt_computeSphereBounds(S,w,y,x,P,b?C:0);var B=d(S);return E(S-E(0)),B}return{ready:i,supported:!0,buildMeshlets:function(A,y,x,b,C,E){r(A.length%3==0),r(y instanceof Float32Array),r(y.length%x==0),r(x>=3),r(b>=3&&b<=256),r(C>=1&&C<=512),E=E||0;var S=A.BYTES_PER_ELEMENT==4?A:new Uint32Array(A);return f(n.exports.meshopt_buildMeshletsFlex,S,y,y.length/x,x*4,b,C,C,E,0)},buildMeshletsFlex:function(A,y,x,b,C,E,S,w){r(A.length%3==0),r(y instanceof Float32Array),r(y.length%x==0),r(x>=3),r(b>=3&&b<=256),r(C>=1&&E<=512),r(C<=E),S=S||0,w=w||0;var P=A.BYTES_PER_ELEMENT==4?A:new Uint32Array(A);return f(n.exports.meshopt_buildMeshletsFlex,P,y,y.length/x,x*4,b,C,E,S,w)},buildMeshletsSpatial:function(A,y,x,b,C,E,S){r(A.length%3==0),r(y instanceof Float32Array),r(y.length%x==0),r(x>=3),r(b>=3&&b<=256),r(C>=1&&E<=512),r(C<=E),S=S||0;var w=A.BYTES_PER_ELEMENT==4?A:new Uint32Array(A);return f(n.exports.meshopt_buildMeshletsSpatial,w,y,y.length/x,x*4,b,C,E,S)},extractMeshlet:function(A,y){return r(y>=0&&y<A.meshletCount),u(A,y)},computeClusterBounds:function(A,y,x){r(A.length%3==0),r(A.length/3<=512),r(y instanceof Float32Array),r(y.length%x==0),r(x>=3);var b=A.BYTES_PER_ELEMENT==4?A:new Uint32Array(A);return g(b,y,y.length/x,x*4)},computeMeshletBounds:function(A,y,x){return r(y instanceof Float32Array),r(y.length%x==0),r(x>=3),p(A,y,y.length/x,x*4)},computeSphereBounds:function(A,y,x,b){return r(A instanceof Float32Array),r(A.length%y==0),r(y>=3),r(!x||x instanceof Float32Array),r(!x||x.length%b==0),r(!x||b>=1),r(!x||A.length/y==x.length/b),b=b||0,m(A,A.length/y,y*4,x,b*4)}}})();var xY=class extends qi{constructor(t){super(),t=t??G.EMPTY_OBJECT;let n=t.resourceCache,i=t.gltf,o=t.bufferViewId,r=t.gltfResource,a=t.baseResource,s=t.cacheKey,c=i.bufferViews[o],u=c.buffer,f=c.byteOffset,d=c.byteLength,p=!1,g,m,A,y;if(Ci(c,"EXT_meshopt_compression")){let b=c.extensions.EXT_meshopt_compression;u=b.buffer,f=b.byteOffset??0,d=b.byteLength,p=!0,g=b.byteStride,m=b.count,A=b.mode,y=b.filter??"NONE"}let x=i.buffers[u];this._hasMeshopt=p,this._meshoptByteStride=g,this._meshoptCount=m,this._meshoptMode=A,this._meshoptFilter=y,this._resourceCache=n,this._gltfResource=r,this._baseResource=a,this._buffer=x,this._bufferId=u,this._byteOffset=f,this._byteLength=d,this._cacheKey=s,this._bufferLoader=void 0,this._typedArray=void 0,this._state=gt.UNLOADED,this._promise=void 0}get cacheKey(){return this._cacheKey}get typedArray(){return this._typedArray}async load(){return l(this._promise)?this._promise:(this._state=gt.LOADING,this._promise=t6e(this),this._promise)}unload(){l(this._bufferLoader)&&!this._bufferLoader.isDestroyed()&&this._resourceCache.unload(this._bufferLoader),this._bufferLoader=void 0,this._typedArray=void 0}};async function t6e(e){try{let t=n6e(e);if(e._bufferLoader=t,await t.load(),e.isDestroyed())return;let n=t.typedArray,i=new Uint8Array(n.buffer,n.byteOffset+e._byteOffset,e._byteLength);if(e.unload(),e._typedArray=i,e._hasMeshopt){let o=e._meshoptCount,r=e._meshoptByteStride,a=new Uint8Array(o*r);bA.decodeGltfBuffer(a,o,r,e._typedArray,e._meshoptMode,e._meshoptFilter),e._typedArray=a}return e._state=gt.READY,e}catch(t){if(e.isDestroyed())return;throw e.unload(),e._state=gt.FAILED,e.getError("Failed to load buffer view",t)}}function n6e(e){let t=e._resourceCache,n=e._buffer;if(l(n.uri)){let r=e._baseResource.getDerivedResource({url:n.uri});return t.getExternalBufferLoader({resource:r})}let i=n.extras?._pipeline?.source;return t.getEmbeddedBufferLoader({parentResource:e._gltfResource,bufferId:e._bufferId,typedArray:i})}var nv=xY;var fb=class e{static _getDecoderTaskProcessor(){if(!l(e._decoderTaskProcessor)){let t=new Gn("decodeDraco",e._maxDecodingConcurrency);t.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/draco_decoder.wasm"}).then(function(n){n?e._taskProcessorReady=!0:e._error=new re("Draco decoder could not be initialized.")}).catch(n=>{e._error=n}),e._decoderTaskProcessor=t}return e._decoderTaskProcessor}static decodePointCloud(t){let n=e._getDecoderTaskProcessor();if(l(e._error))throw e._error;if(e._taskProcessorReady)return n.scheduleTask(t,[t.buffer.buffer])}static decodeBufferView(t){let n=e._getDecoderTaskProcessor();if(l(e._error))throw e._error;if(e._taskProcessorReady)return n.scheduleTask(t,[t.array.buffer])}};fb._maxDecodingConcurrency=Math.max(sn.hardwareConcurrency-1,1);fb._decoderTaskProcessor=void 0;fb._taskProcessorReady=!1;fb._error=void 0;var cg=fb;var Pn={POSITION:"POSITION",NORMAL:"NORMAL",TANGENT:"TANGENT",TEXCOORD:"TEXCOORD",COLOR:"COLOR",JOINTS:"JOINTS",WEIGHTS:"WEIGHTS",FEATURE_ID:"_FEATURE_ID",SCALE:"KHR_gaussian_splatting:SCALE",ROTATION:"KHR_gaussian_splatting:ROTATION",CUMULATIVE_DISTANCE:"BENTLEY_materials_line_style:CUMULATIVE_DISTANCE"};function i6e(e){switch(e){case Pn.POSITION:return"positionMC";case Pn.NORMAL:return"normalMC";case Pn.TANGENT:return"tangentMC";case Pn.TEXCOORD:return"texCoord";case Pn.COLOR:return"color";case Pn.JOINTS:return"joints";case Pn.WEIGHTS:return"weights";case Pn.FEATURE_ID:return"featureId";case Pn.SCALE:return"scale";case Pn.ROTATION:return"rotation";case Pn.CUMULATIVE_DISTANCE:return"cumulativeDistance"}}Pn.hasSetIndex=function(e){switch(e){case Pn.POSITION:case Pn.NORMAL:case Pn.TANGENT:case Pn.CUMULATIVE_DISTANCE:return!1;case Pn.TEXCOORD:case Pn.COLOR:case Pn.JOINTS:case Pn.WEIGHTS:case Pn.FEATURE_ID:case Pn.SCALE:case Pn.ROTATION:return!0}};Pn.fromGltfSemantic=function(e){let t=e,i=/^(\w+)_\d+$/.exec(e);switch(i!==null&&(t=i[1]),t){case"POSITION":return Pn.POSITION;case"NORMAL":return Pn.NORMAL;case"TANGENT":return Pn.TANGENT;case"TEXCOORD":return Pn.TEXCOORD;case"COLOR":return Pn.COLOR;case"JOINTS":return Pn.JOINTS;case"WEIGHTS":return Pn.WEIGHTS;case"_FEATURE_ID":return Pn.FEATURE_ID;case"KHR_gaussian_splatting:SCALE":case"_SCALE":return Pn.SCALE;case"KHR_gaussian_splatting:ROTATION":case"_ROTATION":return Pn.ROTATION;case"BENTLEY_materials_line_style:CUMULATIVE_DISTANCE":return Pn.CUMULATIVE_DISTANCE}};Pn.fromPntsSemantic=function(e){switch(e){case"POSITION":case"POSITION_QUANTIZED":return Pn.POSITION;case"RGBA":case"RGB":case"RGB565":return Pn.COLOR;case"NORMAL":case"NORMAL_OCT16P":return Pn.NORMAL;case"BATCH_ID":return Pn.FEATURE_ID}};Pn.getGlslType=function(e){switch(e){case Pn.POSITION:case Pn.NORMAL:case Pn.TANGENT:return"vec3";case Pn.TEXCOORD:return"vec2";case Pn.COLOR:return"vec4";case Pn.JOINTS:return"ivec4";case Pn.WEIGHTS:return"vec4";case Pn.FEATURE_ID:return"int";case Pn.SCALE:return"vec3";case Pn.ROTATION:return"vec4";case Pn.CUMULATIVE_DISTANCE:return"float";case Pn.OPACITY:return"float"}};Pn.getVariableName=function(e,t){let n=i6e(e);return l(t)&&(n+=`_${t}`),n};Object.freeze(Pn);var it=Pn;var bY=class extends qi{constructor(t){super(),t=t??G.EMPTY_OBJECT;let n=t.resourceCache,i=t.gltf,o=t.primitive,r=t.draco,a=t.gltfResource,s=t.baseResource,c=t.cacheKey;this._resourceCache=n,this._gltfResource=a,this._baseResource=s,this._gltf=i,this._primitive=o,this._draco=r,this._cacheKey=c,this._bufferViewLoader=void 0,this._bufferViewTypedArray=void 0,this._decodePromise=void 0,this._decodedData=void 0,this._state=gt.UNLOADED,this._promise=void 0,this._dracoError=void 0}get cacheKey(){return this._cacheKey}get decodedData(){return this._decodedData}async load(){return l(this._promise)?this._promise:(this._state=gt.LOADING,this._promise=o6e(this),this._promise)}process(t){if(this._state===gt.READY)return!0;if(this._state!==gt.PROCESSING||(l(this._dracoError)&&xde(this,this._dracoError),!l(this._bufferViewTypedArray))||l(this._decodePromise))return!1;let n=this._draco,i=this._primitive,o=this._gltf,r=o.bufferViews,a=n.bufferView,s=r[a],c=n.attributes,u=[];for(let p in i.attributes)if(i.attributes.hasOwnProperty(p)){let g=a6e(p);l(g)&&o.accessors[i.attributes[p]].componentType===Y.FLOAT&&(u.includes(g)||u.push(g))}let f={array:new Uint8Array(this._bufferViewTypedArray),bufferView:s,compressedAttributes:c,dequantizeInShader:!0,attributesToSkipTransform:u},d=cg.decodeBufferView(f);if(!l(d))return!1;this._decodePromise=r6e(this,d)}unload(){l(this._bufferViewLoader)&&this._resourceCache.unload(this._bufferViewLoader),this._bufferViewLoader=void 0,this._bufferViewTypedArray=void 0,this._decodedData=void 0,this._gltf=void 0,this._primitive=void 0}};async function o6e(e){let t=e._resourceCache;try{let n=t.getBufferViewLoader({gltf:e._gltf,bufferViewId:e._draco.bufferView,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._bufferViewLoader=n,await n.load(),e.isDestroyed()?void 0:(e._bufferViewTypedArray=n.typedArray,e._state=gt.PROCESSING,e)}catch(n){if(e.isDestroyed())return;xde(e,n)}}function xde(e,t){throw e.unload(),e._state=gt.FAILED,e.getError("Failed to load Draco",t)}async function r6e(e,t){try{let n=await t;return e.isDestroyed()?void 0:(e.unload(),e._decodedData={indices:n.indexArray,vertexAttributes:n.attributeData},e._state=gt.READY,e._baseResource)}catch(n){if(e.isDestroyed())return;e._dracoError=n}}var db={};db[it.POSITION]="POSITION";db[it.NORMAL]="NORMAL";db[it.COLOR]="COLOR";db[it.TEXCOORD]="TEX_COORD";function a6e(e){for(let t in db)if(db.hasOwnProperty(t)&&e.startsWith(t))return db[t]}var iv=bY;function s6e(e){let{uint8Array:t,format:n,request:i}=e,o=e.flipY??!1,r=e.skipColorSpaceConversion??!1,a=new Blob([t],{type:n}),s;return De.supportsImageBitmapOptions().then(function(c){return c?Promise.resolve(De.createImageBitmapFromBlob(a,{flipY:o,premultiplyAlpha:!1,skipColorSpaceConversion:r})):(s=window.URL.createObjectURL(a),new De({url:s,request:i}).fetchImage({flipY:o,skipColorSpaceConversion:r}))}).then(function(c){return l(s)&&window.URL.revokeObjectURL(s),c}).catch(function(c){return l(s)&&window.URL.revokeObjectURL(s),Promise.reject(c)})}var lg=s6e;var iM=class extends qi{constructor(t){super(),t=t??G.EMPTY_OBJECT;let n=t.resourceCache,i=t.gltf,o=t.imageId,r=t.gltfResource,a=t.baseResource,s=t.cacheKey,c=i.images[o],u=c.bufferView,f=c.uri;this._resourceCache=n,this._gltfResource=r,this._baseResource=a,this._gltf=i,this._bufferViewId=u,this._uri=f,this._cacheKey=s,this._bufferViewLoader=void 0,this._image=void 0,this._mipLevels=void 0,this._state=gt.UNLOADED,this._promise=void 0}get cacheKey(){return this._cacheKey}get image(){return this._image}get mipLevels(){return this._mipLevels}load(){return l(this._promise)?this._promise:l(this._bufferViewId)?(this._promise=c6e(this),this._promise):(this._promise=l6e(this),this._promise)}unload(){l(this._bufferViewLoader)&&!this._bufferViewLoader.isDestroyed()&&this._resourceCache.unload(this._bufferViewLoader),this._bufferViewLoader=void 0,this._uri=void 0,this._image=void 0,this._mipLevels=void 0,this._gltf=void 0}};function bde(e){let t;return Array.isArray(e)&&(t=e.slice(1,e.length).map(function(n){return n.bufferView}),e=e[0]),{image:e,mipLevels:t}}async function c6e(e){e._state=gt.LOADING;let t=e._resourceCache;try{let n=t.getBufferViewLoader({gltf:e._gltf,bufferViewId:e._bufferViewId,gltfResource:e._gltfResource,baseResource:e._baseResource});if(e._bufferViewLoader=n,await n.load(),e.isDestroyed())return;let i=n.typedArray,o=await f6e(i);if(e.isDestroyed())return;let r=bde(o);return e.unload(),e._image=r.image,e._mipLevels=r.mipLevels,e._state=gt.READY,e}catch(n){return e.isDestroyed()?void 0:Cde(e,n,"Failed to load embedded image")}}async function l6e(e){e._state=gt.LOADING;let t=e._baseResource,n=e._uri,i=t.getDerivedResource({url:n});try{let o=await h6e(i);if(e.isDestroyed())return;let r=bde(o);return e.unload(),e._image=r.image,e._mipLevels=r.mipLevels,e._state=gt.READY,e}catch(o){return e.isDestroyed()?void 0:Cde(e,o,`Failed to load image: ${n}`)}}function Cde(e,t,n){return e.unload(),e._state=gt.FAILED,Promise.reject(e.getError(n,t))}function u6e(e){let t=e.subarray(0,2),n=e.subarray(0,4),i=e.subarray(8,12);if(t[0]===255&&t[1]===216)return"image/jpeg";if(t[0]===137&&t[1]===80)return"image/png";if(t[0]===171&&t[1]===75)return"image/ktx2";if(n[0]===82&&n[1]===73&&n[2]===70&&n[3]===70&&i[0]===87&&i[1]===69&&i[2]===66&&i[3]===80)return"image/webp";throw new re("Image format is not recognized")}async function f6e(e){let t=u6e(e);if(t==="image/ktx2"){let n=new Uint8Array(e);return Cu(n)}return iM._loadImageFromTypedArray({uint8Array:e,format:t,flipY:!1,skipColorSpaceConversion:!0})}var d6e=/(^data:image\/ktx2)|(\.ktx2$)/i;function h6e(e){let t=e.getUrlComponent(!1,!0);return d6e.test(t)?Cu(e):e.fetchImage({skipColorSpaceConversion:!0,preferImageBitmap:!0})}iM._loadImageFromTypedArray=lg;var ov=iM;var Tde={TEXTURE:0,PROGRAM:1,BUFFER:2,NUMBER_OF_JOB_TYPES:3};Object.freeze(Tde);var Pc=Tde;var CY=class extends qi{constructor(t){super(),t=t??G.EMPTY_OBJECT;let n=t.resourceCache,i=t.gltf,o=t.accessorId,r=t.gltfResource,a=t.baseResource,s=t.primitive,c=t.draco,u=t.cacheKey,f=t.asynchronous??!0,d=t.loadBuffer??!1,p=t.loadTypedArray??!1,g=i.accessors[o].componentType;this._resourceCache=n,this._gltfResource=r,this._baseResource=a,this._gltf=i,this._accessorId=o,this._indexDatatype=g,this._primitive=s,this._draco=c,this._cacheKey=u,this._asynchronous=f,this._loadBuffer=d,this._loadTypedArray=p,this._bufferViewLoader=void 0,this._dracoLoader=void 0,this._typedArray=void 0,this._buffer=void 0,this._state=gt.UNLOADED,this._promise=void 0}get cacheKey(){return this._cacheKey}get buffer(){return this._buffer}get typedArray(){return this._typedArray}get indexDatatype(){return this._indexDatatype}async load(){return l(this._promise)?this._promise:l(this._draco)?(this._promise=p6e(this),this._promise):(this._promise=g6e(this),this._promise)}process(t){if(this._state===gt.READY)return!0;if(this._state!==gt.LOADED&&this._state!==gt.PROCESSING)return!1;let n=this._typedArray,i=this._indexDatatype;if(l(this._dracoLoader))try{this._dracoLoader.process(t)&&(n=this._dracoLoader.decodedData.indices.typedArray,this._typedArray=n,i=Y.fromTypedArray(n),this._indexDatatype=i)}catch(r){EY(this,r)}if(!l(n))return!1;let o;if(this._loadBuffer&&this._asynchronous){let r=m6e;if(r.set(n,i,t.context),!t.jobScheduler.execute(r,Pc.BUFFER))return!1;o=r.buffer}else this._loadBuffer&&(o=Ede(n,i,t.context));return this.unload(),this._buffer=o,this._typedArray=this._loadTypedArray?n:void 0,this._state=gt.READY,this._resourceCache.statistics.addGeometryLoader(this),!0}unload(){l(this._buffer)&&this._buffer.destroy();let t=this._resourceCache;l(this._bufferViewLoader)&&!this._bufferViewLoader.isDestroyed()&&t.unload(this._bufferViewLoader),l(this._dracoLoader)&&t.unload(this._dracoLoader),this._bufferViewLoader=void 0,this._dracoLoader=void 0,this._typedArray=void 0,this._buffer=void 0,this._gltf=void 0,this._primitive=void 0}},TY=class{constructor(){this.typedArray=void 0,this.indexDatatype=void 0,this.context=void 0,this.buffer=void 0}set(t,n,i){this.typedArray=t,this.indexDatatype=n,this.context=i}execute(){this.buffer=Ede(this.typedArray,this.indexDatatype,this.context)}};function Ede(e,t,n){let i=Ke.createIndexBuffer({typedArray:e,context:n,usage:Oe.STATIC_DRAW,indexDatatype:t});return i.vertexArrayDestroyable=!1,i}var m6e=new TY;async function p6e(e){e._state=gt.LOADING;let t=e._resourceCache;try{let n=t.getDracoLoader({gltf:e._gltf,primitive:e._primitive,draco:e._draco,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._dracoLoader=n,await n.load(),e.isDestroyed()?void 0:(e._state=gt.LOADED,e)}catch(n){if(e.isDestroyed())return;EY(e,n)}}async function g6e(e){let t=e._gltf,n=e._accessorId,o=t.accessors[n].bufferView;e._state=gt.LOADING;let r=e._resourceCache;try{let a=r.getBufferViewLoader({gltf:t,bufferViewId:o,gltfResource:e._gltfResource,baseResource:e._baseResource});if(e._bufferViewLoader=a,await a.load(),e.isDestroyed())return;let s=a.typedArray;return e._typedArray=_6e(e,s),e._state=gt.PROCESSING,e}catch(a){if(e.isDestroyed())return;EY(e,a)}}function _6e(e,t){let n=e._gltf,i=e._accessorId,o=n.accessors[i],r=o.count,a=o.componentType,s=Ue.getSizeInBytes(a),c=t.buffer,u=t.byteOffset+o.byteOffset;if(u%s!==0){let d=r*s,p=new Uint8Array(c,u,d);c=new Uint8Array(p).buffer,u=0,Ms("index-buffer-unaligned",`The index array is not aligned to a ${s}-byte boundary.`)}let f;return a===Ue.UNSIGNED_BYTE?f=new Uint8Array(c,u,r):a===Ue.UNSIGNED_SHORT?f=new Uint16Array(c,u,r):a===Ue.UNSIGNED_INT&&(f=new Uint32Array(c,u,r)),f}function EY(e,t){throw e.unload(),e._state=gt.FAILED,e.getError("Failed to load index buffer",t)}var rv=CY;function A6e(e,t,n){if(n=n??!1,n){let i=e.indexOf(t);if(i>-1)return i}return e.push(t),e.length-1}var ds=A6e;function y6e(e,t){return l(e.extensionsUsed)&&e.extensionsUsed.indexOf(t)>=0}var Mr=y6e;function Zt(){}Zt.objectLegacy=function(e,t){if(l(e)){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){let i=e[n],o=t(i,n);if(l(o))return o}}};Zt.object=function(e,t){if(l(e)){let n=e.length;for(let i=0;i<n;i++){let o=e[i],r=t(o,i);if(l(r))return r}}};Zt.topLevel=function(e,t,n){let i=e[t];return l(i)&&!Array.isArray(i)?Zt.objectLegacy(i,n):Zt.object(i,n)};Zt.accessor=function(e,t){return Zt.topLevel(e,"accessors",t)};Zt.accessorWithSemantic=function(e,t,n){let i={};return Zt.mesh(e,function(o){return Zt.meshPrimitive(o,function(r){let a=Zt.meshPrimitiveAttribute(r,function(s,c){if(c.indexOf(t)===0&&!l(i[s])){i[s]=!0;let u=n(s);if(l(u))return u}});return l(a)?a:Zt.meshPrimitiveTarget(r,function(s){return Zt.meshPrimitiveTargetAttribute(s,function(c,u){if(u.indexOf(t)===0&&!l(i[c])){i[c]=!0;let f=n(c);if(l(f))return f}})})})})};Zt.accessorContainingVertexAttributeData=function(e,t){let n={};return Zt.mesh(e,function(i){return Zt.meshPrimitive(i,function(o){let r=Zt.meshPrimitiveAttribute(o,function(a){if(!l(n[a])){n[a]=!0;let s=t(a);if(l(s))return s}});return l(r)?r:Zt.meshPrimitiveTarget(o,function(a){return Zt.meshPrimitiveTargetAttribute(a,function(s){if(!l(n[s])){n[s]=!0;let c=t(s);if(l(c))return c}})})})})};Zt.accessorContainingIndexData=function(e,t){let n={};return Zt.mesh(e,function(i){return Zt.meshPrimitive(i,function(o){let r=o.indices;if(l(r)&&!l(n[r])){n[r]=!0;let a=t(r);if(l(a))return a}})})};Zt.animation=function(e,t){return Zt.topLevel(e,"animations",t)};Zt.animationChannel=function(e,t){let n=e.channels;return Zt.object(n,t)};Zt.animationSampler=function(e,t){let n=e.samplers;return Zt.object(n,t)};Zt.buffer=function(e,t){return Zt.topLevel(e,"buffers",t)};Zt.bufferView=function(e,t){return Zt.topLevel(e,"bufferViews",t)};Zt.camera=function(e,t){return Zt.topLevel(e,"cameras",t)};Zt.image=function(e,t){return Zt.topLevel(e,"images",t)};Zt.material=function(e,t){return Zt.topLevel(e,"materials",t)};Zt.materialValue=function(e,t){let n=e.values;l(e.extensions)&&l(e.extensions.KHR_techniques_webgl)&&(n=e.extensions.KHR_techniques_webgl.values);for(let i in n)if(Object.prototype.hasOwnProperty.call(n,i)){let o=t(n[i],i);if(l(o))return o}};Zt.mesh=function(e,t){return Zt.topLevel(e,"meshes",t)};Zt.meshPrimitive=function(e,t){let n=e.primitives;if(l(n)){let i=n.length;for(let o=0;o<i;o++){let r=n[o],a=t(r,o);if(l(a))return a}}};Zt.meshPrimitiveAttribute=function(e,t){let n=e.attributes;for(let i in n)if(Object.prototype.hasOwnProperty.call(n,i)){let o=t(n[i],i);if(l(o))return o}};Zt.meshPrimitiveTarget=function(e,t){let n=e.targets;if(l(n)){let i=n.length;for(let o=0;o<i;++o){let r=t(n[o],o);if(l(r))return r}}};Zt.meshPrimitiveTargetAttribute=function(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){let i=e[n],o=t(i,n);if(l(o))return o}};Zt.node=function(e,t){return Zt.topLevel(e,"nodes",t)};Zt.nodeInTree=function(e,t,n){let i=e.nodes;if(l(i)){let o=t.length;for(let r=0;r<o;r++){let a=t[r],s=i[a];if(l(s)){let c=n(s,a);if(l(c))return c;let u=s.children;if(l(u)&&(c=Zt.nodeInTree(e,u,n),l(c)))return c}}}};Zt.nodeInScene=function(e,t,n){let i=t.nodes;if(l(i))return Zt.nodeInTree(e,i,n)};Zt.program=function(e,t){return Mr(e,"KHR_techniques_webgl")?Zt.object(e.extensions.KHR_techniques_webgl.programs,t):Zt.topLevel(e,"programs",t)};Zt.sampler=function(e,t){return Zt.topLevel(e,"samplers",t)};Zt.scene=function(e,t){return Zt.topLevel(e,"scenes",t)};Zt.shader=function(e,t){return Mr(e,"KHR_techniques_webgl")?Zt.object(e.extensions.KHR_techniques_webgl.shaders,t):Zt.topLevel(e,"shaders",t)};Zt.skin=function(e,t){return Zt.topLevel(e,"skins",t)};Zt.skinJoint=function(e,t){let n=e.joints;if(l(n)){let i=n.length;for(let o=0;o<i;o++){let r=n[o],a=t(r);if(l(a))return a}}};Zt.techniqueAttribute=function(e,t){let n=e.attributes;for(let i in n)if(Object.prototype.hasOwnProperty.call(n,i)){let o=t(n[i],i);if(l(o))return o}};Zt.techniqueUniform=function(e,t){let n=e.uniforms;for(let i in n)if(Object.prototype.hasOwnProperty.call(n,i)){let o=t(n[i],i);if(l(o))return o}};Zt.techniqueParameter=function(e,t){let n=e.parameters;for(let i in n)if(Object.prototype.hasOwnProperty.call(n,i)){let o=t(n[i],i);if(l(o))return o}};Zt.technique=function(e,t){return Mr(e,"KHR_techniques_webgl")?Zt.object(e.extensions.KHR_techniques_webgl.techniques,t):Zt.topLevel(e,"techniques",t)};Zt.texture=function(e,t){return Zt.topLevel(e,"textures",t)};var Fe=Zt;function x6e(e){switch(e){case"SCALAR":return 1;case"VEC2":return 2;case"VEC3":return 3;case"VEC4":case"MAT2":return 4;case"MAT3":return 9;case"MAT4":return 16}}var xf=x6e;function b6e(e,t){let n=t.bufferView;if(l(n)){let i=e.bufferViews[n];if(l(i.byteStride)&&i.byteStride>0)return i.byteStride}return Y.getSizeInBytes(t.componentType)*xf(t.type)}var Pu=b6e;function C6e(e){Fe.accessor(e,function(n){l(n.bufferView)&&(n.byteOffset=n.byteOffset??0)}),Fe.bufferView(e,function(n){l(n.buffer)&&(n.byteOffset=n.byteOffset??0)}),Fe.mesh(e,function(n){Fe.meshPrimitive(n,function(i){if(i.mode=i.mode??ee.TRIANGLES,!l(i.material)){l(e.materials)||(e.materials=[]);let o={name:"default"};i.material=ds(e.materials,o)}})}),Fe.accessorContainingVertexAttributeData(e,function(n){let i=e.accessors[n],o=i.bufferView;if(i.normalized=i.normalized??!1,l(o)){let r=e.bufferViews[o];r.byteStride=Pu(e,i),r.target=ee.ARRAY_BUFFER}}),Fe.accessorContainingIndexData(e,function(n){let o=e.accessors[n].bufferView;if(l(o)){let r=e.bufferViews[o];r.target=ee.ELEMENT_ARRAY_BUFFER}}),Fe.material(e,function(n){let i=n.extensions??{},o=i.KHR_materials_common;if(l(o)){let c=o.technique,u=l(o.values)?o.values:{};o.values=u,u.ambient=l(u.ambient)?u.ambient:[0,0,0,1],u.emission=l(u.emission)?u.emission:[0,0,0,1],u.transparency=u.transparency??1,c!=="CONSTANT"&&(u.diffuse=l(u.diffuse)?u.diffuse:[0,0,0,1],c!=="LAMBERT"&&(u.specular=l(u.specular)?u.specular:[0,0,0,1],u.shininess=u.shininess??0)),o.transparent=o.transparent??!1,o.doubleSided=o.doubleSided??!1;return}n.emissiveFactor=n.emissiveFactor??[0,0,0],n.alphaMode=n.alphaMode??"OPAQUE",n.doubleSided=n.doubleSided??!1,n.alphaMode==="MASK"&&(n.alphaCutoff=n.alphaCutoff??.5);let r=i.KHR_techniques_webgl;l(r)&&Fe.materialValue(n,function(c){l(c.index)&&hb(c)}),hb(n.emissiveTexture),hb(n.normalTexture),hb(n.occlusionTexture);let a=n.pbrMetallicRoughness;l(a)&&(a.baseColorFactor=a.baseColorFactor??[1,1,1,1],a.metallicFactor=a.metallicFactor??1,a.roughnessFactor=a.roughnessFactor??1,hb(a.baseColorTexture),hb(a.metallicRoughnessTexture));let s=i.KHR_materials_pbrSpecularGlossiness;l(s)&&(s.diffuseFactor=s.diffuseFactor??[1,1,1,1],s.specularFactor=s.specularFactor??[1,1,1],s.glossinessFactor=s.glossinessFactor??1,hb(s.specularGlossinessTexture))}),Fe.animation(e,function(n){Fe.animationSampler(n,function(i){i.interpolation=i.interpolation??"LINEAR"})});let t=T6e(e);return Fe.node(e,function(n,i){l(t[i])||l(n.translation)||l(n.rotation)||l(n.scale)?(n.translation=n.translation??[0,0,0],n.rotation=n.rotation??[0,0,0,1],n.scale=n.scale??[1,1,1]):n.matrix=n.matrix??[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}),Fe.sampler(e,function(n){n.wrapS=n.wrapS??ee.REPEAT,n.wrapT=n.wrapT??ee.REPEAT}),l(e.scenes)&&!l(e.scene)&&(e.scene=0),e}function T6e(e){let t={};return Fe.animation(e,function(n){Fe.animationChannel(n,function(i){let o=i.target,r=o.node,a=o.path;(a==="translation"||a==="rotation"||a==="scale")&&(t[r]=!0)})}),t}function hb(e){l(e)&&(e.texCoord=e.texCoord??0)}var oM=C6e;function E6e(e){return Fe.shader(e,function(t){nj(t)}),Fe.buffer(e,function(t){nj(t)}),Fe.image(e,function(t){nj(t)}),nj(e),e}function nj(e){e.extras=l(e.extras)?e.extras:{},e.extras._pipeline=l(e.extras._pipeline)?e.extras._pipeline:{}}var CA=E6e;function v6e(e,t){let n=e.extensionsRequired;if(l(n)){let i=n.indexOf(t);i>=0&&n.splice(i,1),n.length===0&&delete e.extensionsRequired}}var rM=v6e;function S6e(e,t){let n=e.extensionsUsed;if(l(n)){let i=n.indexOf(t);i>=0&&n.splice(i,1),rM(e,t),n.length===0&&delete e.extensionsUsed}}var mb=S6e;var w6e=4;function I6e(e){if(Wh(e)!=="glTF")throw new re("File is not valid binary glTF");let n=vde(e,0,5),i=n[1];if(i!==1&&i!==2)throw new re("Binary glTF version is not 1 or 2");return i===1?D6e(e,n):P6e(e,n)}function vde(e,t,n){let i=new DataView(e.buffer),o=new Array(n);for(let r=0;r<n;++r)o[r]=i.getUint32(e.byteOffset+t+r*w6e,!0);return o}function D6e(e,t){let n=t[2],i=t[3];if(t[4]!==0)throw new re("Binary glTF scene format is not JSON");let r=20,a=r+i,s=wu(e,r,i),c=JSON.parse(s);CA(c);let u=e.subarray(a,n),f=c.buffers;if(l(f)&&Object.keys(f).length>0){let d=f.binary_glTF??f.KHR_binary_glTF;l(d)&&(d.extras._pipeline.source=u,delete d.uri)}return mb(c,"KHR_binary_glTF"),c}function P6e(e,t){let n=t[2],i=12,o,r;for(;i<n;){let a=vde(e,i,2),s=a[0],c=a[1];i+=8;let u=e.subarray(i,i+s);if(i+=s,c===1313821514){let f=wu(u);o=JSON.parse(f),CA(o)}else c===5130562&&(r=u)}if(l(o)&&l(r)){let a=o.buffers;if(l(a)&&a.length>0){let s=a[0];s.extras._pipeline.source=r}}return o}var pb=I6e;function R6e(e){return Fe.shader(e,function(t){ij(t)}),Fe.buffer(e,function(t){ij(t)}),Fe.image(e,function(t){ij(t)}),ij(e),e}function ij(e){l(e.extras)&&(l(e.extras._pipeline)&&delete e.extras._pipeline,Object.keys(e.extras).length===0&&delete e.extras)}var aM=R6e;function O6e(e,t){let n=e.extensionsUsed;l(n)||(n=[],e.extensionsUsed=n),ds(n,t,!0)}var Id=O6e;function M6e(e){switch(e){case Y.BYTE:return function(t,n,i,o,r){for(let a=0;a<i;++a)r[a]=t.getInt8(n+a*o)};case Y.UNSIGNED_BYTE:return function(t,n,i,o,r){for(let a=0;a<i;++a)r[a]=t.getUint8(n+a*o)};case Y.SHORT:return function(t,n,i,o,r){for(let a=0;a<i;++a)r[a]=t.getInt16(n+a*o,!0)};case Y.UNSIGNED_SHORT:return function(t,n,i,o,r){for(let a=0;a<i;++a)r[a]=t.getUint16(n+a*o,!0)};case Y.INT:return function(t,n,i,o,r){for(let a=0;a<i;++a)r[a]=t.getInt32(n+a*o,!0)};case Y.UNSIGNED_INT:return function(t,n,i,o,r){for(let a=0;a<i;++a)r[a]=t.getUint32(n+a*o,!0)};case Y.FLOAT:return function(t,n,i,o,r){for(let a=0;a<i;++a)r[a]=t.getFloat32(n+a*o,!0)};case Y.DOUBLE:return function(t,n,i,o,r){for(let a=0;a<i;++a)r[a]=t.getFloat64(n+a*o,!0)}}}var ug=M6e;function B6e(e,t){let n=e.bufferViews,i=e.buffers,o=t.bufferView,r=xf(t.type);if(!l(t.bufferView))return{min:new Array(r).fill(0),max:new Array(r).fill(0)};let a=new Array(r).fill(Number.POSITIVE_INFINITY),s=new Array(r).fill(Number.NEGATIVE_INFINITY),c=n[o],u=c.buffer,d=i[u].extras._pipeline.source,p=t.count,g=Pu(e,t),m=t.byteOffset+c.byteOffset+d.byteOffset,A=t.componentType,y=Y.getSizeInBytes(A),x=new DataView(d.buffer),b=new Array(r),C=ug(A);for(let E=0;E<p;E++){C(x,m,r,y,b);for(let S=0;S<r;S++){let w=b[S];a[S]=Math.min(a[S],w),s[S]=Math.max(s[S],w)}m+=g}return{min:a,max:s}}var gb=B6e;var L6e=[ee.FUNC_ADD,ee.FUNC_ADD],N6e=[ee.ONE,ee.ZERO,ee.ONE,ee.ZERO];function Sde(e,t){let n=e.enable;return l(n)?n.indexOf(t)>-1:!1}var F6e=[ee.ZERO,ee.ONE,ee.SRC_COLOR,ee.ONE_MINUS_SRC_COLOR,ee.SRC_ALPHA,ee.ONE_MINUS_SRC_ALPHA,ee.DST_ALPHA,ee.ONE_MINUS_DST_ALPHA,ee.DST_COLOR,ee.ONE_MINUS_DST_COLOR];function k6e(e,t){if(!l(e))return t;for(let n=0;n<4;n++)if(F6e.indexOf(e[n])===-1)return t;return e}function z6e(e){let t={},n={},i=e.techniques;return l(i)&&(Fe.technique(e,function(o,r){let a=o.states;if(l(a)){let s=n[r]={};if(Sde(a,ee.BLEND)){s.alphaMode="BLEND";let c=a.functions;l(c)&&(l(c.blendEquationSeparate)||l(c.blendFuncSeparate))&&(t[r]={blendEquation:c.blendEquationSeparate??L6e,blendFactors:k6e(c.blendFuncSeparate,N6e)})}Sde(a,ee.CULL_FACE)||(s.doubleSided=!0),delete o.states}}),Object.keys(t).length>0&&(l(e.extensions)||(e.extensions={}),Id(e,"KHR_blend")),Fe.material(e,function(o){if(l(o.technique)){let r=n[o.technique];Fe.objectLegacy(r,function(s,c){o[c]=s});let a=t[o.technique];l(a)&&(l(o.extensions)||(o.extensions={}),o.extensions.KHR_blend=a)}})),e}var sM=z6e;function U6e(e,t){let n=e.extensionsRequired;l(n)||(n=[],e.extensionsRequired=n),ds(n,t,!0),Id(e,t)}var cM=U6e;function V6e(e){let t=e.techniques,n={},i={},o={};if(l(t)){let r={programs:[],shaders:[],techniques:[]},a=e.glExtensionsUsed;delete e.glExtensionsUsed,Fe.technique(e,function(s,c){let u={name:s.name,program:void 0,attributes:{},uniforms:{}},f;if(Fe.techniqueAttribute(s,function(d,p){f=s.parameters[d],u.attributes[p]={semantic:f.semantic}}),Fe.techniqueUniform(s,function(d,p){f=s.parameters[d],u.uniforms[p]={count:f.count,node:f.node,type:f.type,semantic:f.semantic,value:f.value},l(n[c])||(n[c]={}),n[c][d]=p}),l(o[s.program]))u.program=o[s.program];else{let d=e.programs[s.program],p={name:d.name,fragmentShader:void 0,vertexShader:void 0,glExtensions:a},g=e.shaders[d.fragmentShader];p.fragmentShader=ds(r.shaders,g,!0);let m=e.shaders[d.vertexShader];p.vertexShader=ds(r.shaders,m,!0),u.program=ds(r.programs,p),o[s.program]=u.program}i[c]=ds(r.techniques,u)}),r.techniques.length>0&&(l(e.extensions)||(e.extensions={}),e.extensions.KHR_techniques_webgl=r,Id(e,"KHR_techniques_webgl"),cM(e,"KHR_techniques_webgl"))}return Fe.material(e,function(r){if(l(r.technique)){let a={technique:i[r.technique]};Fe.objectLegacy(r.values,function(s,c){l(a.values)||(a.values={});let u=n[r.technique][c];l(u)&&(a.values[u]=s)}),l(r.extensions)||(r.extensions={}),r.extensions.KHR_techniques_webgl=a}delete r.technique,delete r.values}),delete e.techniques,delete e.programs,delete e.shaders,e}var lM=V6e;function j6e(e,t){No.typeOf.object("material",e),No.defined("handler",t);let n=e.pbrMetallicRoughness;if(l(n)){if(l(n.baseColorTexture)){let r=n.baseColorTexture,a=t(r.index,r);if(l(a))return a}if(l(n.metallicRoughnessTexture)){let r=n.metallicRoughnessTexture,a=t(r.index,r);if(l(a))return a}}let{extensions:i}=e;if(l(i)){let r=i.KHR_materials_pbrSpecularGlossiness;if(l(r)){if(l(r.diffuseTexture)){let c=r.diffuseTexture,u=t(c.index,c);if(l(u))return u}if(l(r.specularGlossinessTexture)){let c=r.specularGlossinessTexture,u=t(c.index,c);if(l(u))return u}}let a=i.KHR_materials_specular;if(l(a)){let{specularTexture:c,specularColorTexture:u}=a;if(l(c)){let f=t(c.index,c);if(l(f))return f}if(l(u)){let f=t(u.index,u);if(l(f))return f}}let s=i.KHR_materials_common;if(l(s)&&l(s.values)){let{diffuse:c,ambient:u,emission:f,specular:d}=s.values;if(l(c)&&l(c.index)){let p=t(c.index,c);if(l(p))return p}if(l(u)&&l(u.index)){let p=t(u.index,u);if(l(p))return p}if(l(f)&&l(f.index)){let p=t(f.index,f);if(l(p))return p}if(l(d)&&l(d.index)){let p=t(d.index,d);if(l(p))return p}}}let o=Fe.materialValue(e,function(r){if(l(r.index)){let a=t(r.index,r);if(l(a))return a}});if(l(o))return o;if(l(e.emissiveTexture)){let r=e.emissiveTexture,a=t(r.index,r);if(l(a))return a}if(l(e.normalTexture)){let r=e.normalTexture,a=t(r.index,r);if(l(a))return a}if(l(e.occlusionTexture)){let r=e.occlusionTexture,a=t(r.index,r);if(l(a))return a}}var av=j6e;var wde=["mesh","node","material","accessor","bufferView","buffer","texture","sampler","image"];function G6e(e,t){return t=t??wde,wde.forEach(function(n){t.indexOf(n)>-1&&W6e(e,n)}),e}var H6e={accessor:"accessors",buffer:"buffers",bufferView:"bufferViews",image:"images",node:"nodes",material:"materials",mesh:"meshes",sampler:"samplers",texture:"textures"};function W6e(e,t){let n=H6e[t],i=e[n];if(l(i)){let o=0,r=bp[t](e),a=i.length;for(let s=0;s<a;++s)r[s]||(xp[t](e,s-o),o++)}}function xp(){}xp.accessor=function(e,t){e.accessors.splice(t,1),Fe.mesh(e,function(i){Fe.meshPrimitive(i,function(o){Fe.meshPrimitiveAttribute(o,function(s,c){s>t&&o.attributes[c]--}),Fe.meshPrimitiveTarget(o,function(s){Fe.meshPrimitiveTargetAttribute(s,function(c,u){c>t&&s[u]--})});let r=o.indices;l(r)&&r>t&&o.indices--;let a=o.extensions;l(a)&&l(a.CESIUM_primitive_outline)&&a.CESIUM_primitive_outline.indices>t&&--a.CESIUM_primitive_outline.indices})}),Fe.skin(e,function(i){l(i.inverseBindMatrices)&&i.inverseBindMatrices>t&&i.inverseBindMatrices--}),Fe.animation(e,function(i){Fe.animationSampler(i,function(o){l(o.input)&&o.input>t&&o.input--,l(o.output)&&o.output>t&&o.output--})})};xp.buffer=function(e,t){e.buffers.splice(t,1),Fe.bufferView(e,function(i){l(i.buffer)&&i.buffer>t&&i.buffer--,l(i.extensions)&&l(i.extensions.EXT_meshopt_compression)&&i.extensions.EXT_meshopt_compression.buffer--})};xp.bufferView=function(e,t){if(e.bufferViews.splice(t,1),Fe.accessor(e,function(i){l(i.bufferView)&&i.bufferView>t&&i.bufferView--}),Fe.shader(e,function(i){l(i.bufferView)&&i.bufferView>t&&i.bufferView--}),Fe.image(e,function(i){l(i.bufferView)&&i.bufferView>t&&i.bufferView--}),Mr(e,"KHR_draco_mesh_compression")&&Fe.mesh(e,function(i){Fe.meshPrimitive(i,function(o){l(o.extensions)&&l(o.extensions.KHR_draco_mesh_compression)&&o.extensions.KHR_draco_mesh_compression.bufferView>t&&o.extensions.KHR_draco_mesh_compression.bufferView--})}),Mr(e,"EXT_feature_metadata")){let o=e.extensions.EXT_feature_metadata.featureTables;for(let r in o)if(o.hasOwnProperty(r)){let s=o[r].properties;if(l(s)){for(let c in s)if(s.hasOwnProperty(c)){let u=s[c];l(u.bufferView)&&u.bufferView>t&&u.bufferView--,l(u.arrayOffsetBufferView)&&u.arrayOffsetBufferView>t&&u.arrayOffsetBufferView--,l(u.stringOffsetBufferView)&&u.stringOffsetBufferView>t&&u.stringOffsetBufferView--}}}}if(Mr(e,"EXT_structural_metadata")){let o=e.extensions.EXT_structural_metadata.propertyTables;if(l(o)){let r=o.length;for(let a=0;a<r;++a){let c=o[a].properties;for(let u in c)if(c.hasOwnProperty(u)){let f=c[u];l(f.values)&&f.values>t&&f.values--,l(f.arrayOffsets)&&f.arrayOffsets>t&&f.arrayOffsets--,l(f.stringOffsets)&&f.stringOffsets>t&&f.stringOffsets--}}}}};xp.image=function(e,t){e.images.splice(t,1),Fe.texture(e,function(i){l(i.source)&&i.source>t&&--i.source;let o=i.extensions;l(o)&&l(o.EXT_texture_webp)&&o.EXT_texture_webp.source>t?--i.extensions.EXT_texture_webp.source:l(o)&&l(o.KHR_texture_basisu)&&o.KHR_texture_basisu.source>t&&--i.extensions.KHR_texture_basisu.source})};xp.mesh=function(e,t){e.meshes.splice(t,1),Fe.node(e,function(i){l(i.mesh)&&(i.mesh>t?i.mesh--:i.mesh===t&&delete i.mesh)})};xp.node=function(e,t){e.nodes.splice(t,1),Fe.skin(e,function(i){l(i.skeleton)&&i.skeleton>t&&i.skeleton--,i.joints=i.joints.map(function(o){return o>t?o-1:o})}),Fe.animation(e,function(i){Fe.animationChannel(i,function(o){l(o.target)&&l(o.target.node)&&o.target.node>t&&o.target.node--})}),Fe.technique(e,function(i){Fe.techniqueUniform(i,function(o){l(o.node)&&o.node>t&&o.node--})}),Fe.node(e,function(i){l(i.children)&&(i.children=i.children.filter(function(o){return o!==t}).map(function(o){return o>t?o-1:o}))}),Fe.scene(e,function(i){i.nodes=i.nodes.filter(function(o){return o!==t}).map(function(o){return o>t?o-1:o})})};xp.material=function(e,t){e.materials.splice(t,1),Fe.mesh(e,function(i){Fe.meshPrimitive(i,function(o){l(o.material)&&o.material>t&&o.material--})})};xp.sampler=function(e,t){e.samplers.splice(t,1),Fe.texture(e,function(i){l(i.sampler)&&i.sampler>t&&--i.sampler})};xp.texture=function(e,t){if(e.textures.splice(t,1),Fe.material(e,function(i){av(i,function(o,r){r.index>t&&--r.index})}),Mr(e,"EXT_feature_metadata")){Fe.mesh(e,function(r){Fe.meshPrimitive(r,function(a){let s=a.extensions;if(l(s)&&l(s.EXT_feature_metadata)){let u=s.EXT_feature_metadata.featureIdTextures;if(l(u)){let f=u.length;for(let d=0;d<f;++d){let g=u[d].featureIds.texture;g.index>t&&--g.index}}}})});let o=e.extensions.EXT_feature_metadata.featureTextures;for(let r in o)if(o.hasOwnProperty(r)){let s=o[r].properties;if(l(s)){for(let c in s)if(s.hasOwnProperty(c)){let f=s[c].texture;f.index>t&&--f.index}}}}if(Mr(e,"EXT_mesh_features")&&Fe.mesh(e,function(i){Fe.meshPrimitive(i,function(o){let r=o.extensions;if(l(r)&&l(r.EXT_mesh_features)){let s=r.EXT_mesh_features.featureIds;if(l(s)){let c=s.length;for(let u=0;u<c;++u){let f=s[u];l(f.texture)&&f.texture.index>t&&--f.texture.index}}}})}),Mr(e,"EXT_structural_metadata")){let o=e.extensions.EXT_structural_metadata.propertyTextures;if(l(o)){let r=o.length;for(let a=0;a<r;++a){let c=o[a].properties;for(let u in c)if(c.hasOwnProperty(u)){let f=c[u];f.index>t&&--f.index}}}}};function bp(){}bp.accessor=function(e){let t={};return Fe.mesh(e,function(n){Fe.meshPrimitive(n,function(i){Fe.meshPrimitiveAttribute(i,function(r){t[r]=!0}),Fe.meshPrimitiveTarget(i,function(r){Fe.meshPrimitiveTargetAttribute(r,function(a){t[a]=!0})});let o=i.indices;l(o)&&(t[o]=!0)})}),Fe.skin(e,function(n){l(n.inverseBindMatrices)&&(t[n.inverseBindMatrices]=!0)}),Fe.animation(e,function(n){Fe.animationSampler(n,function(i){l(i.input)&&(t[i.input]=!0),l(i.output)&&(t[i.output]=!0)})}),Mr(e,"EXT_mesh_gpu_instancing")&&Fe.node(e,function(n){l(n.extensions)&&l(n.extensions.EXT_mesh_gpu_instancing)&&Object.keys(n.extensions.EXT_mesh_gpu_instancing.attributes).forEach(function(i){let o=n.extensions.EXT_mesh_gpu_instancing.attributes[i];t[o]=!0})}),Mr(e,"CESIUM_primitive_outline")&&Fe.mesh(e,function(n){Fe.meshPrimitive(n,function(i){let o=i.extensions;if(l(o)&&l(o.CESIUM_primitive_outline)){let a=o.CESIUM_primitive_outline.indices;l(a)&&(t[a]=!0)}})}),t};bp.buffer=function(e){let t={};return Fe.bufferView(e,function(n){l(n.buffer)&&(t[n.buffer]=!0),l(n.extensions)&&l(n.extensions.EXT_meshopt_compression)&&(t[n.extensions.EXT_meshopt_compression.buffer]=!0)}),t};bp.bufferView=function(e){let t={};if(Fe.accessor(e,function(n){l(n.bufferView)&&(t[n.bufferView]=!0)}),Fe.shader(e,function(n){l(n.bufferView)&&(t[n.bufferView]=!0)}),Fe.image(e,function(n){l(n.bufferView)&&(t[n.bufferView]=!0)}),Mr(e,"KHR_draco_mesh_compression")&&Fe.mesh(e,function(n){Fe.meshPrimitive(n,function(i){l(i.extensions)&&l(i.extensions.KHR_draco_mesh_compression)&&(t[i.extensions.KHR_draco_mesh_compression.bufferView]=!0)})}),Mr(e,"EXT_feature_metadata")){let i=e.extensions.EXT_feature_metadata.featureTables;for(let o in i)if(i.hasOwnProperty(o)){let a=i[o].properties;if(l(a)){for(let s in a)if(a.hasOwnProperty(s)){let c=a[s];l(c.bufferView)&&(t[c.bufferView]=!0),l(c.arrayOffsetBufferView)&&(t[c.arrayOffsetBufferView]=!0),l(c.stringOffsetBufferView)&&(t[c.stringOffsetBufferView]=!0)}}}}if(Mr(e,"EXT_structural_metadata")){let i=e.extensions.EXT_structural_metadata.propertyTables;if(l(i)){let o=i.length;for(let r=0;r<o;++r){let s=i[r].properties;for(let c in s)if(s.hasOwnProperty(c)){let u=s[c];l(u.values)&&(t[u.values]=!0),l(u.arrayOffsets)&&(t[u.arrayOffsets]=!0),l(u.stringOffsets)&&(t[u.stringOffsets]=!0)}}}}return t};bp.image=function(e){let t={};return Fe.texture(e,function(n){l(n.source)&&(t[n.source]=!0),l(n.extensions)&&l(n.extensions.EXT_texture_webp)?t[n.extensions.EXT_texture_webp.source]=!0:l(n.extensions)&&l(n.extensions.KHR_texture_basisu)&&(t[n.extensions.KHR_texture_basisu.source]=!0)}),t};bp.mesh=function(e){let t={};return Fe.node(e,function(n){if(l(n.mesh&&l(e.meshes))){let i=e.meshes[n.mesh];l(i)&&l(i.primitives)&&i.primitives.length>0&&(t[n.mesh]=!0)}}),t};function Ide(e,t,n){let i=e.nodes[t];return l(i.mesh)||l(i.camera)||l(i.skin)||l(i.weights)||l(i.extras)||l(i.extensions)&&Object.keys(i.extensions).length!==0||l(n[t])?!1:!l(i.children)||i.children.filter(function(o){return!Ide(e,o,n)}).length===0}bp.node=function(e){let t={};return Fe.skin(e,function(n){l(n.skeleton)&&(t[n.skeleton]=!0),Fe.skinJoint(n,function(i){t[i]=!0})}),Fe.animation(e,function(n){Fe.animationChannel(n,function(i){l(i.target)&&l(i.target.node)&&(t[i.target.node]=!0)})}),Fe.technique(e,function(n){Fe.techniqueUniform(n,function(i){l(i.node)&&(t[i.node]=!0)})}),Fe.node(e,function(n,i){Ide(e,i,t)||(t[i]=!0)}),t};bp.material=function(e){let t={};return Fe.mesh(e,function(n){Fe.meshPrimitive(n,function(i){l(i.material)&&(t[i.material]=!0)})}),t};bp.texture=function(e){let t={};if(Fe.material(e,function(n){av(n,function(i){t[i]=!0})}),Mr(e,"EXT_feature_metadata")){Fe.mesh(e,function(o){Fe.meshPrimitive(o,function(r){let a=r.extensions;if(l(a)&&l(a.EXT_feature_metadata)){let c=a.EXT_feature_metadata.featureIdTextures;if(l(c)){let u=c.length;for(let f=0;f<u;++f){let p=c[f].featureIds.texture;t[p.index]=!0}}}})});let i=e.extensions.EXT_feature_metadata.featureTextures;for(let o in i)if(i.hasOwnProperty(o)){let a=i[o].properties;if(l(a)){for(let s in a)if(a.hasOwnProperty(s)){let u=a[s].texture;t[u.index]=!0}}}}if(Mr(e,"EXT_mesh_features")&&Fe.mesh(e,function(n){Fe.meshPrimitive(n,function(i){let o=i.extensions;if(l(o)&&l(o.EXT_mesh_features)){let a=o.EXT_mesh_features.featureIds;if(l(a)){let s=a.length;for(let c=0;c<s;++c){let u=a[c];l(u.texture)&&(t[u.texture.index]=!0)}}}})}),Mr(e,"EXT_structural_metadata")){let i=e.extensions.EXT_structural_metadata.propertyTextures;if(l(i)){let o=i.length;for(let r=0;r<o;++r){let s=i[r].properties;for(let c in s)if(s.hasOwnProperty(c)){let u=s[c];t[u.index]=!0}}}}return t};bp.sampler=function(e){let t={};return Fe.texture(e,function(n){l(n.sampler)&&(t[n.sampler]=!0)}),t};var uM=G6e;function q6e(e,t){let n={byteLength:t.length,extras:{_pipeline:{source:t}}},o={buffer:ds(e.buffers,n),byteOffset:0,byteLength:t.length};return ds(e.bufferViews,o)}var fM=q6e;function Y6e(e,t){let n=Pu(e,t),i=Y.getSizeInBytes(t.componentType),o=xf(t.type),r=t.count,a=new Array(o*r);if(!l(t.bufferView))return a.fill(0);let s=e.bufferViews[t.bufferView],c=e.buffers[s.buffer].extras._pipeline.source,u=t.byteOffset+s.byteOffset+c.byteOffset,f=new DataView(c.buffer),d=new Array(o),p=ug(t.componentType);for(let g=0;g<r;++g){p(f,u,o,i,d);for(let m=0;m<o;++m)a[g*o+m]=d[m];u+=n}return a}var dM=Y6e;function X6e(e){let t;return Fe.accessorWithSemantic(e,"JOINTS_0",function(n){let i=e.accessors[n];t=i.componentType,t===ee.BYTE?oj(e,i,Y.UNSIGNED_BYTE):t!==ee.UNSIGNED_BYTE&&t!==ee.UNSIGNED_SHORT&&oj(e,i,Y.UNSIGNED_SHORT)}),Fe.accessorWithSemantic(e,"WEIGHTS_0",function(n){let i=e.accessors[n];t=i.componentType,t===ee.BYTE?oj(e,i,Y.UNSIGNED_BYTE):t===ee.SHORT&&oj(e,i,Y.UNSIGNED_SHORT)}),e}function oj(e,t,n){let i=Y.createTypedArray(n,dM(e,t)),o=new Uint8Array(i.buffer);t.bufferView=fM(e,o),t.componentType=n,t.byteOffset=0}var hM=X6e;function K6e(e,t){return mb(e,t),t==="CESIUM_RTC"&&Q6e(e),vY(e,t)}function Q6e(e){Fe.technique(e,function(t){Fe.techniqueUniform(t,function(n){n.semantic==="CESIUM_RTC_MODELVIEW"&&(n.semantic="MODELVIEW")})})}function vY(e,t){if(Array.isArray(e)){let n=e.length;for(let i=0;i<n;++i)vY(e[i],t)}else if(e!==null&&typeof e=="object"&&e.constructor===Object){let n=e.extensions,i;l(n)&&(i=n[t],l(i)&&(delete n[t],Object.keys(n).length===0&&delete e.extensions));for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&vY(e[o],t);return i}}var _b=K6e;var rj={.8:n5e,"1.0":T5e,"2.0":void 0};function $6e(e,t){t=t??{};let n=t.targetVersion,i=e.version;e.asset=e.asset??{version:"1.0"},e.asset.version=e.asset.version??"1.0",i=(i??e.asset.version).toString(),Object.prototype.hasOwnProperty.call(rj,i)||(l(i)&&(i=i.substring(0,3)),Object.prototype.hasOwnProperty.call(rj,i)||(i="1.0"));let o=rj[i];for(;l(o)&&i!==n;)o(e,t),i=e.asset.version,o=rj[i];return t.keepLegacyExtensions||(S5e(e,t),w5e(e)),e}function Rde(e){let t=e.materials;for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)){let i=t[n],o=i.instanceTechnique;l(o)&&(i.technique=o.technique,i.values=o.values,delete i.instanceTechnique)}}function J6e(e){let t=e.meshes;for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)){let o=t[n].primitives;if(l(o)){let r=o.length;for(let a=0;a<r;++a){let s=o[a],c=s.primitive??ee.TRIANGLES;s.mode=s.mode??c,delete s.primitive}}}}function Z6e(e){let t=e.nodes,n=new h,i=new Le;for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o)){let r=t[o];if(l(r.rotation)){let s=r.rotation;h.fromArray(s,0,n),Le.fromAxisAngle(n,s[3],i),r.rotation=[i.x,i.y,i.z,i.w]}let a=r.instanceSkin;l(a)&&(r.skeletons=a.skeletons,r.skin=a.skin,r.meshes=a.meshes,delete r.instanceSkin)}}function e5e(e){let t=e.animations,n=e.accessors,i=e.bufferViews,o=e.buffers,r={},a=new h,s=new Le;for(let c in t)if(Object.prototype.hasOwnProperty.call(t,c)){let u=t[c],f=u.channels,d=u.parameters,p=u.samplers;if(l(f)){let g=f.length;for(let m=0;m<g;++m){let A=f[m];if(A.target.path==="rotation"){let y=d[p[A.sampler].output];if(l(r[y]))continue;r[y]=!0;let x=n[y],b=i[x.bufferView],E=o[b.buffer].extras._pipeline.source,S=E.byteOffset+b.byteOffset+x.byteOffset,w=x.componentType,P=x.count,R=xf(x.type),B=x.count*R,L=Y.createArrayBufferView(w,E.buffer,S,B);for(let _=0;_<P;_++){let T=_*R;h.unpack(L,T,a);let v=L[T+3];Le.fromAxisAngle(a,v,s),Le.pack(s,L,T)}}}}}}function t5e(e){let t=e.techniques;for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)){let i=t[n],o=i.passes;if(l(o)){let r=i.pass??"defaultPass";if(Object.prototype.hasOwnProperty.call(o,r)){let a=o[r],s=a.instanceProgram;i.attributes=i.attributes??s.attributes,i.program=i.program??s.program,i.uniforms=i.uniforms??s.uniforms,i.states=i.states??a.states}delete i.passes,delete i.pass}}}function n5e(e){l(e.asset)||(e.asset={});let t=e.asset;if(t.version="1.0",typeof t.profile=="string"){let n=t.profile.split(" ");t.profile={api:n[0],version:n[1]}}else t.profile={};if(l(e.version)&&delete e.version,Rde(e),J6e(e),Z6e(e),e5e(e),t5e(e),l(e.allExtensions)&&(e.extensionsUsed=e.allExtensions,delete e.allExtensions),l(e.lights)){let n=e.extensions??{};e.extensions=n;let i=n.KHR_materials_common??{};n.KHR_materials_common=i,i.lights=e.lights,delete e.lights,Id(e,"KHR_materials_common")}}function i5e(e){let t=e.animations;for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)){let i=t[n],o=i.parameters;if(l(o)){let r=i.samplers;for(let a in r)if(Object.prototype.hasOwnProperty.call(r,a)){let s=r[a];s.input=o[s.input],s.output=o[s.output]}delete i.parameters}}}function Dde(e,t){let n=[];for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i)){let o=e[i];t[i]=n.length,n.push(o),l(o.name)||(o.name=i)}return n}function o5e(e){let t,n={accessors:{},animations:{},buffers:{},bufferViews:{},cameras:{},images:{},materials:{},meshes:{},nodes:{},programs:{},samplers:{},scenes:{},shaders:{},skins:{},textures:{},techniques:{}},i,o={},r=e.nodes;for(let a in r)Object.prototype.hasOwnProperty.call(r,a)&&(i=r[a].jointName,l(i)&&(o[i]=a));for(let a in e)if(Object.prototype.hasOwnProperty.call(e,a)&&l(n[a])){let s={},c=e[a];e[a]=Dde(c,s),n[a]=s}for(i in o)Object.prototype.hasOwnProperty.call(o,i)&&(o[i]=n.nodes[o[i]]);l(e.scene)&&(e.scene=n.scenes[e.scene]),Fe.bufferView(e,function(a){l(a.buffer)&&(a.buffer=n.buffers[a.buffer])}),Fe.accessor(e,function(a){l(a.bufferView)&&(a.bufferView=n.bufferViews[a.bufferView])}),Fe.shader(e,function(a){let s=a.extensions;if(l(s)){let c=s.KHR_binary_glTF;l(c)&&(a.bufferView=n.bufferViews[c.bufferView],delete s.KHR_binary_glTF),Object.keys(s).length===0&&delete a.extensions}}),Fe.program(e,function(a){l(a.vertexShader)&&(a.vertexShader=n.shaders[a.vertexShader]),l(a.fragmentShader)&&(a.fragmentShader=n.shaders[a.fragmentShader])}),Fe.technique(e,function(a){l(a.program)&&(a.program=n.programs[a.program]),Fe.techniqueParameter(a,function(s){l(s.node)&&(s.node=n.nodes[s.node]);let c=s.value;typeof c=="string"&&(s.value={index:n.textures[c]})})}),Fe.mesh(e,function(a){Fe.meshPrimitive(a,function(s){l(s.indices)&&(s.indices=n.accessors[s.indices]),Fe.meshPrimitiveAttribute(s,function(c,u){s.attributes[u]=n.accessors[c]}),l(s.material)&&(s.material=n.materials[s.material])})}),Fe.node(e,function(a){let s=a.children;if(l(s)){let c=s.length;for(t=0;t<c;++t)s[t]=n.nodes[s[t]]}if(l(a.meshes)){let c=a.meshes,u=c.length;if(u>0)for(a.mesh=n.meshes[c[0]],t=1;t<u;++t){let f={mesh:n.meshes[c[t]]},d=ds(e.nodes,f);l(s)||(s=[],a.children=s),s.push(d)}delete a.meshes}if(l(a.camera)&&(a.camera=n.cameras[a.camera]),l(a.skin)&&(a.skin=n.skins[a.skin]),l(a.skeletons)){let c=a.skeletons;if(c.length>0&&l(a.skin)){let f=e.skins[a.skin];f.skeleton=n.nodes[c[0]]}delete a.skeletons}l(a.jointName)&&delete a.jointName}),Fe.skin(e,function(a){l(a.inverseBindMatrices)&&(a.inverseBindMatrices=n.accessors[a.inverseBindMatrices]);let s=a.jointNames;if(l(s)){let c=[],u=s.length;for(t=0;t<u;++t)c[t]=o[s[t]];a.joints=c,delete a.jointNames}}),Fe.scene(e,function(a){let s=a.nodes;if(l(s)){let c=s.length;for(t=0;t<c;++t)s[t]=n.nodes[s[t]]}}),Fe.animation(e,function(a){let s={};a.samplers=Dde(a.samplers,s),Fe.animationSampler(a,function(c){c.input=n.accessors[c.input],c.output=n.accessors[c.output]}),Fe.animationChannel(a,function(c){c.sampler=s[c.sampler];let u=c.target;l(u)&&(u.node=n.nodes[u.id],delete u.id)})}),Fe.material(e,function(a){l(a.technique)&&(a.technique=n.techniques[a.technique]),Fe.materialValue(a,function(c,u){typeof c=="string"&&(a.values[u]={index:n.textures[c]})});let s=a.extensions;if(l(s)){let c=s.KHR_materials_common;l(c)&&l(c.values)&&Fe.materialValue(c,function(u,f){typeof u=="string"&&(c.values[f]={index:n.textures[u]})})}}),Fe.image(e,function(a){let s=a.extensions;if(l(s)){let c=s.KHR_binary_glTF;l(c)&&(a.bufferView=n.bufferViews[c.bufferView],a.mimeType=c.mimeType,delete s.KHR_binary_glTF),Object.keys(s).length===0&&delete a.extensions}}),Fe.texture(e,function(a){l(a.sampler)&&(a.sampler=n.samplers[a.sampler]),l(a.source)&&(a.source=n.images[a.source])})}function r5e(e){Fe.animation(e,function(t){Fe.animationSampler(t,function(n){delete n.name})})}function a5e(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];Array.isArray(n)&&n.length===0&&delete e[t]}Fe.node(e,function(t){l(t.children)&&t.children.length===0&&delete t.children})}function s5e(e){let t=e.asset;delete t.profile,delete t.premultipliedAlpha}var c5e={CESIUM_RTC:!0,KHR_materials_common:!0,WEB3D_quantized_attributes:!0};function l5e(e){let t=e.extensionsUsed;if(e.extensionsRequired=e.extensionsRequired??[],l(t)){let n=t.length;for(let i=0;i<n;++i){let o=t[i];l(c5e[o])&&e.extensionsRequired.push(o)}}}function u5e(e){Fe.buffer(e,function(t){delete t.type})}function f5e(e){Fe.texture(e,function(t){delete t.format,delete t.internalFormat,delete t.target,delete t.type})}function d5e(e){Fe.mesh(e,function(t){Fe.meshPrimitive(t,function(n){Fe.meshPrimitiveAttribute(n,function(i,o){o==="TEXCOORD"?n.attributes.TEXCOORD_0=i:o==="COLOR"&&(n.attributes.COLOR_0=i)}),delete n.attributes.TEXCOORD,delete n.attributes.COLOR})}),Fe.technique(e,function(t){Fe.techniqueParameter(t,function(n){let i=n.semantic;l(i)&&(i==="TEXCOORD"?n.semantic="TEXCOORD_0":i==="COLOR"&&(n.semantic="COLOR_0"))})})}var h5e={POSITION:!0,NORMAL:!0,TANGENT:!0},m5e={COLOR:"COLOR",JOINT:"JOINTS",JOINTS:"JOINTS",TEXCOORD:"TEXCOORD",WEIGHT:"WEIGHTS",WEIGHTS:"WEIGHTS"};function p5e(e){let t={};Fe.mesh(e,function(n){Fe.meshPrimitive(n,function(i){Fe.meshPrimitiveAttribute(i,function(o,r){if(r.charAt(0)!=="_"){let a=r.search(/_[0-9]+/g),s=r,c="_0";a>=0&&(s=r.substring(0,a),c=r.substring(a));let u,f=m5e[s];l(f)?(u=f+c,t[r]=u):l(h5e[s])||(u=`_${r}`,t[r]=u)}});for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o)){let r=t[o],a=i.attributes[o];l(a)&&(delete i.attributes[o],i.attributes[r]=a)}})}),Fe.technique(e,function(n){Fe.techniqueParameter(n,function(i){let o=t[i.semantic];l(o)&&(i.semantic=o)})})}function g5e(e){Fe.camera(e,function(t){let n=t.perspective;if(l(n)){let i=n.aspectRatio;l(i)&&i===0&&delete n.aspectRatio;let o=n.yfov;l(o)&&o===0&&(n.yfov=1)}})}function wY(e,t){return l(t.byteStride)&&t.byteStride!==0?t.byteStride:Pu(e,t)}function _5e(e){Fe.buffer(e,function(t){l(t.byteLength)||(t.byteLength=t.extras._pipeline.source.length)}),Fe.accessor(e,function(t){let n=t.bufferView;if(l(n)){let i=e.bufferViews[n],o=wY(e,t),r=t.byteOffset+t.count*o;i.byteLength=Math.max(i.byteLength??0,r)}})}function A5e(e){let t,n,i,o=e.bufferViews,r={};Fe.accessorContainingVertexAttributeData(e,function(s){let c=e.accessors[s];l(c.bufferView)&&(r[c.bufferView]=!0)});let a={};Fe.accessor(e,function(s){l(s.bufferView)&&(a[s.bufferView]=a[s.bufferView]??[],a[s.bufferView].push(s))});for(let s in a)if(Object.prototype.hasOwnProperty.call(a,s)){i=o[s];let c=a[s];c.sort(function(p,g){return p.byteOffset-g.byteOffset});let u=0,f=0,d=c.length;for(t=0;t<d;++t){let p=c[t],g=wY(e,p),m=p.byteOffset,A=p.count*g;delete p.byteStride;let y=t<d-1,x=y?wY(e,c[t+1]):void 0;if(g!==x){let b=We(i,!0);r[s]&&(b.byteStride=g),b.byteOffset+=u,b.byteLength=m+A-u;let C=ds(o,b);for(n=f;n<=t;++n)p=c[n],p.bufferView=C,p.byteOffset=p.byteOffset-u;u=y?c[t+1].byteOffset:void 0,f=t+1}}}uM(e,["accessor","bufferView","buffer"])}function y5e(e){Fe.accessorWithSemantic(e,"POSITION",function(t){let n=e.accessors[t];if(!l(n.min)||!l(n.max)){let i=gb(e,n);n.min=i.min,n.max=i.max}})}function Ode(e){return(!l(e.children)||e.children.length===0)&&(!l(e.meshes)||e.meshes.length===0)&&!l(e.camera)&&!l(e.skin)&&!l(e.skeletons)&&!l(e.jointName)&&(!l(e.translation)||h.fromArray(e.translation).equals(h.ZERO))&&(!l(e.scale)||h.fromArray(e.scale).equals(new h(1,1,1)))&&(!l(e.rotation)||se.fromArray(e.rotation).equals(new se(0,0,0,1)))&&(!l(e.matrix)||M.fromColumnMajorArray(e.matrix).equals(M.IDENTITY))&&!l(e.extensions)&&!l(e.extras)}function Mde(e,t){Fe.scene(e,function(n){let i=n.nodes;if(l(i)){let o=i.length;for(let r=o;r>=0;--r)if(i[r]===t){i.splice(r,1);return}}}),Fe.node(e,function(n,i){if(l(n.children)){let o=n.children.indexOf(t);o>-1&&(n.children.splice(o,1),Ode(n)&&Mde(e,i))}}),delete e.nodes[t]}function x5e(e){return Fe.node(e,function(t,n){Ode(t)&&Mde(e,n)}),e}function b5e(e){Fe.animation(e,function(t){Fe.animationSampler(t,function(n){let i=e.accessors[n.input];if(!l(i.min)||!l(i.max)){let o=gb(e,i);i.min=o.min,i.max=o.max}})})}function C5e(e){Fe.accessor(e,function(t){if(l(t.min)||l(t.max)){let n=gb(e,t);l(t.min)&&(t.min=n.min),l(t.max)&&(t.max=n.max)}})}function T5e(e){e.asset=e.asset??{},e.asset.version="2.0",Rde(e),i5e(e),x5e(e),o5e(e),r5e(e),s5e(e),l5e(e),_5e(e),A5e(e),y5e(e),b5e(e),C5e(e),u5e(e),f5e(e),d5e(e),p5e(e),hM(e),g5e(e),sM(e),lM(e),a5e(e)}var E5e=["u_tex","u_diffuse","u_emission","u_diffuse_tex"],v5e=["u_diffuse","u_diffuse_mat"];function IY(e){e.pbrMetallicRoughness=l(e.pbrMetallicRoughness)?e.pbrMetallicRoughness:{},e.pbrMetallicRoughness.roughnessFactor=1,e.pbrMetallicRoughness.metallicFactor=0}function DY(e){return l(e.index)}function PY(e){return Array.isArray(e)&&e.length===4}function Bde(e){let t=new Array(4);t[3]=e[3];for(let n=0;n<3;n++){let i=e[n];i<=.04045?t[n]=e[n]*.07739938080495357:t[n]=Math.pow((i+.055)*.9478672985781991,2.4)}return t}function S5e(e,t){t=t??{};let n=t.baseColorTextureNames??E5e,i=t.baseColorFactorNames??v5e;Fe.material(e,function(o){Fe.materialValue(o,function(r,a){n.indexOf(a)!==-1&&DY(r)?(IY(o),o.pbrMetallicRoughness.baseColorTexture=r):i.indexOf(a)!==-1&&PY(r)&&(IY(o),o.pbrMetallicRoughness.baseColorFactor=Bde(r))})}),_b(e,"KHR_techniques_webgl"),_b(e,"KHR_blend")}function SY(e,t){l(t)&&(PY(t)?e.pbrMetallicRoughness.baseColorFactor=Bde(t):DY(t)&&(e.pbrMetallicRoughness.baseColorTexture=t))}function Pde(e,t){l(t)&&(PY(t)?e.emissiveFactor=t.slice(0,3):DY(t)&&(e.emissiveTexture=t))}function w5e(e){Fe.material(e,function(t){let n=(t.extensions??{}).KHR_materials_common;if(!l(n))return;let i=n.values??{},o=i.ambient,r=i.diffuse,a=i.emission,s=i.transparency,c=n.doubleSided,u=n.transparent;IY(t),n.technique==="CONSTANT"?(Id(e,"KHR_materials_unlit"),t.extensions=l(t.extensions)?t.extensions:{},t.extensions.KHR_materials_unlit={},SY(t,a),SY(t,o)):(SY(t,r),Pde(t,o),Pde(t,a)),l(c)&&(t.doubleSided=c),l(s)&&(l(t.pbrMetallicRoughness.baseColorFactor)?t.pbrMetallicRoughness.baseColorFactor[3]*=s:t.pbrMetallicRoughness.baseColorFactor=[1,1,1,s]),l(u)&&(t.alphaMode=u?"BLEND":"OPAQUE")}),_b(e,"KHR_materials_common")}var mM=$6e;function ol(){}ol.getError=function(e,t,n){let i=`Failed to load ${e}: ${t}`;l(n)&&l(n.message)&&(i+=`
- ${n.message}`);let o=new re(i);return l(n)&&(o.stack=`Original stack:
- ${n.stack}
- Handler stack:
- ${o.stack}`),o};ol.getNodeTransform=function(e){return l(e.matrix)?e.matrix:M.fromTranslationQuaternionRotationScale(l(e.translation)?e.translation:h.ZERO,l(e.rotation)?e.rotation:Le.IDENTITY,l(e.scale)?e.scale:h.ONE)};ol.getAttributeBySemantic=function(e,t,n){let i=e.attributes,o=i.length;for(let r=0;r<o;++r){let a=i[r],s=l(n)?a.setIndex===n:!0;if(a.semantic===t&&s)return a}};ol.getAttributeByName=function(e,t){let n=e.attributes,i=n.length;for(let o=0;o<i;++o){let r=n[o];if(r.name===t)return r}};ol.getFeatureIdsByLabel=function(e,t){for(let n=0;n<e.length;n++){let i=e[n];if(i.positionalLabel===t||i.label===t)return i}};ol.hasQuantizedAttributes=function(e){if(!l(e))return!1;for(let t=0;t<e.length;t++){let n=e[t];if(l(n.quantization))return!0}return!1};ol.getAttributeInfo=function(e){let t=e.semantic,n=e.setIndex,i,o=!1;l(t)?(i=it.getVariableName(t,n),o=!0):(i=e.name,i=i.replace(/^_/,""),i=i.toLowerCase());let r=/^color_\d+$/.test(i),a=e.type,s=Ft.getGlslType(a);r&&(s="vec4");let c=l(e.quantization),u;return c&&(u=r?"vec4":Ft.getGlslType(e.quantization.type)),{attribute:e,isQuantized:c,variableName:i,hasSemantic:o,glslType:s,quantizedGlslType:u}};var I5e=new h,D5e=new h;ol.getPositionMinMax=function(e,t,n){let i=ol.getAttributeBySemantic(e,"POSITION"),o=i.max,r=i.min;return l(n)&&l(t)&&(r=h.add(r,t,D5e),o=h.add(o,n,I5e)),{min:r,max:o}};ol.getAxisCorrectionMatrix=function(e,t,n){return n=M.clone(M.IDENTITY,n),e===Li.Y?n=M.clone(Li.Y_UP_TO_Z_UP,n):e===Li.X&&(n=M.clone(Li.X_UP_TO_Z_UP,n)),t===Li.Z&&(n=M.multiplyTransformation(n,Li.Z_UP_TO_X_UP,n)),n};var P5e=new $;ol.getCullFace=function(e,t){if(!Re.isTriangles(t))return Mi.BACK;let n=M.getMatrix3(e,P5e);return $.determinant(n)<0?Mi.FRONT:Mi.BACK};ol.sanitizeGlslIdentifier=function(e){let t=e.replaceAll(/[^A-Za-z0-9]+/g,"_");return t=t.replace(/^gl_/,""),/^\d/.test(t)&&(t=`_${t}`),t};ol.supportedExtensions={AGI_articulations:!0,CESIUM_mesh_vector:!0,CESIUM_primitive_outline:!0,CESIUM_RTC:!0,EXT_feature_metadata:!0,EXT_implicit_cylinder_region:!0,EXT_implicit_ellipsoid_region:!0,EXT_instance_features:!0,EXT_mesh_features:!0,EXT_mesh_gpu_instancing:!0,EXT_mesh_polygon:!0,EXT_mesh_primitive_edge_visibility:!0,EXT_meshopt_compression:!0,EXT_primitive_voxels:!0,EXT_structural_metadata:!0,EXT_texture_webp:!0,KHR_blend:!0,KHR_draco_mesh_compression:!0,KHR_implicit_shapes:!0,KHR_materials_common:!0,KHR_materials_pbrSpecularGlossiness:!0,KHR_materials_specular:!0,KHR_materials_anisotropy:!0,KHR_materials_clearcoat:!0,KHR_materials_unlit:!0,KHR_mesh_quantization:!0,KHR_mesh_primitive_restart:!0,KHR_techniques_webgl:!0,KHR_texture_basisu:!0,KHR_texture_transform:!0,KHR_gaussian_splatting:!0,KHR_gaussian_splatting_compression_spz_2:!0,WEB3D_quantized_attributes:!0};ol.checkSupportedExtensions=function(e){let t=e.length;for(let n=0;n<t;n++){let i=e[n];if(!ol.supportedExtensions[i])throw new re(`Unsupported glTF Extension: ${i}`)}};var ht=ol;var RY=class extends qi{constructor(t){super(),t=t??G.EMPTY_OBJECT;let n=t.resourceCache,i=t.gltfResource,o=t.baseResource,r=t.typedArray,a=t.gltfJson,s=t.cacheKey;this._resourceCache=n,this._gltfResource=i,this._baseResource=o,this._typedArray=r,this._gltfJson=a,this._cacheKey=s,this._gltf=void 0,this._bufferLoaders=[],this._state=gt.UNLOADED,this._promise=void 0}get cacheKey(){return this._cacheKey}get gltf(){return this._gltf}async load(){return l(this._promise)?this._promise:(this._state=gt.LOADING,l(this._gltfJson)?(this._promise=Lde(this,this._gltfJson),this._promise):l(this._typedArray)?(this._promise=Nde(this,this._typedArray),this._promise):(this._promise=R5e(this),this._promise))}unload(){let t=this._bufferLoaders,n=t.length;for(let i=0;i<n;++i)t[i]=!t[i].isDestroyed()&&this._resourceCache.unload(t[i]);this._bufferLoaders.length=0,this._gltf=void 0}_fetchGltf(){return this._gltfResource.fetchArrayBuffer()}};async function R5e(e){let t;try{let n=await e._fetchGltf();if(e.isDestroyed())return;t=new Uint8Array(n)}catch(n){if(e.isDestroyed())return;OY(e,n)}return Nde(e,t)}function OY(e,t){e.unload(),e._state=gt.FAILED;let n=`Failed to load glTF: ${e._gltfResource.url}`;throw e.getError(n,t)}async function O5e(e,t){if(l(t.asset)&&t.asset.version==="2.0"&&!Mr(t,"KHR_techniques_webgl")&&!Mr(t,"KHR_materials_common"))return Promise.resolve();let n=[];Fe.buffer(t,function(i){if(!l(i.extras._pipeline.source)&&l(i.uri)){let o=e._baseResource.getDerivedResource({url:i.uri}),a=e._resourceCache.getExternalBufferLoader({resource:o});e._bufferLoaders.push(a),n.push(a.load().then(function(){a.isDestroyed()||(i.extras._pipeline.source=a.typedArray)}))}}),await Promise.all(n),mM(t)}function M5e(e){let t=[];return Fe.buffer(e,function(n){let i=n.uri;!l(n.extras._pipeline.source)&&l(i)&&Sh(i)&&(delete n.uri,t.push(De.fetchArrayBuffer(i).then(function(o){n.extras._pipeline.source=new Uint8Array(o)})))}),Promise.all(t)}function B5e(e,t){let n=[];return Fe.buffer(t,function(i,o){let r=i.extras._pipeline.source;if(l(r)&&!l(i.uri)){let s=e._resourceCache.getEmbeddedBufferLoader({parentResource:e._gltfResource,bufferId:o,typedArray:r});e._bufferLoaders.push(s),n.push(s.load())}}),Promise.all(n)}async function Lde(e,t){try{CA(t),await M5e(t),await O5e(e,t),oM(t),await B5e(e,t),aM(t);let n=t.asset.version;if(n!=="1.0"&&n!=="2.0")throw new re(`Unsupported glTF version: ${n}`);let i=t.extensionsRequired;return l(i)&&ht.checkSupportedExtensions(i),e._gltf=t,e._state=gt.READY,e}catch(n){if(e.isDestroyed())return;OY(e,n)}}async function Nde(e,t){let n;try{Wh(t)==="glTF"?n=pb(t):n=Cr(t)}catch(i){if(e.isDestroyed())return;OY(e,i)}return Lde(e,n)}var sv=RY;var Fde={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};Object.freeze(Fde);var Cp=Fde;var Eo={},MY=class{constructor(){this.octEncoded=!1,this.octEncodedZXY=!1,this.normalizationRange=void 0,this.quantizedVolumeOffset=void 0,this.quantizedVolumeDimensions=void 0,this.quantizedVolumeStepSize=void 0,this.componentDatatype=void 0,this.type=void 0}},BY=class{constructor(){this.name=void 0,this.semantic=void 0,this.setIndex=void 0,this.componentDatatype=void 0,this.type=void 0,this.normalized=!1,this.count=void 0,this.min=void 0,this.max=void 0,this.constant=void 0,this.quantization=void 0,this.typedArray=void 0,this.buffer=void 0,this.byteOffset=0,this.byteStride=void 0}},LY=class{constructor(){this.indexDatatype=void 0,this.count=void 0,this.buffer=void 0,this.typedArray=void 0}},NY=class{constructor(){this.featureCount=void 0,this.nullFeatureId=void 0,this.propertyTableId=void 0,this.setIndex=void 0,this.label=void 0,this.positionalLabel=void 0}},FY=class{constructor(){this.featureCount=void 0,this.nullFeatureId=void 0,this.propertyTableId=void 0,this.offset=0,this.repeat=void 0,this.label=void 0,this.positionalLabel=void 0}},kY=class{constructor(){this.featureCount=void 0,this.nullFeatureId=void 0,this.propertyTableId=void 0,this.textureReader=void 0,this.label=void 0,this.positionalLabel=void 0}},zY=class{constructor(){this.attributes=[]}},UY=class{constructor(){this.attributes=[],this.morphTargets=[],this.indices=void 0,this.material=void 0,this.primitiveType=void 0,this.polygon=void 0,this.vector=void 0,this.featureIds=[],this.propertyTextureIds=[],this.propertyAttributeIds=[],this.outlineCoordinates=void 0,this.modelPrimitiveImagery=void 0,this.edgeVisibility=void 0}},VY=class{constructor(){this.attributes=[],this.featureIds=[],this.transformInWorldSpace=!1}},jY=class{constructor(){this.index=void 0,this.joints=[],this.inverseBindMatrices=[]}},GY=class{constructor(){this.name=void 0,this.index=void 0,this.children=[],this.primitives=[],this.instances=void 0,this.skin=void 0,this.matrix=void 0,this.translation=void 0,this.rotation=void 0,this.scale=void 0,this.morphWeights=[],this.articulationName=void 0,this.meshVector=void 0}},HY=class{constructor(){this.nodes=[]}},L5e={TRANSLATION:"translation",ROTATION:"rotation",SCALE:"scale",WEIGHTS:"weights"},WY=class{constructor(){this.input=[],this.interpolation=void 0,this.output=[]}},qY=class{constructor(){this.node=void 0,this.path=void 0}},YY=class{constructor(){this.sampler=void 0,this.target=void 0}},XY=class{constructor(){this.name=void 0,this.samplers=[],this.channels=[]}},KY=class{constructor(){this.name=void 0,this.type=void 0,this.minimumValue=void 0,this.maximumValue=void 0,this.initialValue=void 0}},QY=class{constructor(){this.name=void 0,this.stages=[]}},aj=class{constructor(){this.credits=[]}},$Y=class{constructor(){this.asset=new aj,this.scene=void 0,this.nodes=[],this.skins=[],this.animations=[],this.articulations=[],this.structuralMetadata=void 0,this.upAxis=void 0,this.forwardAxis=void 0,this.transform=M.clone(M.IDENTITY),this.extensions={}}},JY=class{constructor(){this.texture=void 0,this.index=void 0,this.texCoord=0,this.transform=$.clone($.IDENTITY),this.scale=1,this.channels=void 0,this.constantLod=void 0}},TA=class TA{constructor(){this.baseColorTexture=void 0,this.metallicRoughnessTexture=void 0,this.baseColorFactor=se.clone(TA.DEFAULT_BASE_COLOR_FACTOR),this.metallicFactor=TA.DEFAULT_METALLIC_FACTOR,this.roughnessFactor=TA.DEFAULT_ROUGHNESS_FACTOR}};lt(TA,"DEFAULT_BASE_COLOR_FACTOR",se.ONE),lt(TA,"DEFAULT_METALLIC_FACTOR",1),lt(TA,"DEFAULT_ROUGHNESS_FACTOR",1);var sj=TA,EA=class EA{constructor(){this.diffuseTexture=void 0,this.specularGlossinessTexture=void 0,this.diffuseFactor=se.clone(EA.DEFAULT_DIFFUSE_FACTOR),this.specularFactor=h.clone(EA.DEFAULT_SPECULAR_FACTOR),this.glossinessFactor=EA.DEFAULT_GLOSSINESS_FACTOR}};lt(EA,"DEFAULT_DIFFUSE_FACTOR",se.ONE),lt(EA,"DEFAULT_SPECULAR_FACTOR",h.ONE),lt(EA,"DEFAULT_GLOSSINESS_FACTOR",1);var ZY=EA,cv=class cv{constructor(){this.specularFactor=cv.DEFAULT_SPECULAR_FACTOR,this.specularTexture=void 0,this.specularColorFactor=h.clone(cv.DEFAULT_SPECULAR_COLOR_FACTOR),this.specularColorTexture=void 0}};lt(cv,"DEFAULT_SPECULAR_FACTOR",1),lt(cv,"DEFAULT_SPECULAR_COLOR_FACTOR",h.ONE);var eX=cv,lv=class lv{constructor(){this.anisotropyStrength=lv.DEFAULT_ANISOTROPY_STRENGTH,this.anisotropyRotation=lv.DEFAULT_ANISOTROPY_ROTATION,this.anisotropyTexture=void 0}};lt(lv,"DEFAULT_ANISOTROPY_STRENGTH",0),lt(lv,"DEFAULT_ANISOTROPY_ROTATION",0);var tX=lv,uv=class uv{constructor(){this.clearcoatFactor=uv.DEFAULT_CLEARCOAT_FACTOR,this.clearcoatTexture=void 0,this.clearcoatRoughnessFactor=uv.DEFAULT_CLEARCOAT_ROUGHNESS_FACTOR,this.clearcoatRoughnessTexture=void 0,this.clearcoatNormalTexture=void 0}};lt(uv,"DEFAULT_CLEARCOAT_FACTOR",0),lt(uv,"DEFAULT_CLEARCOAT_ROUGHNESS_FACTOR",0);var nX=uv,iX=class{constructor(){lt(this,"width");lt(this,"pattern")}},cj=class cj{constructor(){this.metallicRoughness=new sj,this.specularGlossiness=void 0,this.specular=void 0,this.anisotropy=void 0,this.clearcoat=void 0,this.emissiveTexture=void 0,this.normalTexture=void 0,this.occlusionTexture=void 0,this.emissiveFactor=h.clone(cj.DEFAULT_EMISSIVE_FACTOR),this.alphaMode=Cp.OPAQUE,this.alphaCutoff=.5,this.doubleSided=!1,this.unlit=!1,this.pointDiameter=void 0,this.lineStyle=void 0}};lt(cj,"DEFAULT_EMISSIVE_FACTOR",h.ZERO);var oX=cj,rX=class{constructor(){lt(this,"count",0);lt(this,"triangleIndices");lt(this,"triangleIndicesOffsets");lt(this,"loopIndices");lt(this,"loopIndicesOffsets")}},aX=class{constructor(){lt(this,"vector",!0);lt(this,"count",0);lt(this,"polygonAttributeOffsets");lt(this,"polygonHoleCounts");lt(this,"polygonHoleOffsets");lt(this,"polygonIndicesOffsets")}};Eo.Quantization=MY;Eo.Attribute=BY;Eo.Indices=LY;Eo.FeatureIdAttribute=NY;Eo.FeatureIdTexture=kY;Eo.FeatureIdImplicitRange=FY;Eo.MorphTarget=zY;Eo.Primitive=UY;Eo.Instances=VY;Eo.Skin=jY;Eo.Node=GY;Eo.Scene=HY;Eo.AnimatedPropertyType=Object.freeze(L5e);Eo.AnimationSampler=WY;Eo.AnimationTarget=qY;Eo.AnimationChannel=YY;Eo.Animation=XY;Eo.ArticulationStage=KY;Eo.Articulation=QY;Eo.Asset=aj;Eo.Components=$Y;Eo.TextureReader=JY;Eo.MetallicRoughness=sj;Eo.SpecularGlossiness=ZY;Eo.Specular=eX;Eo.Anisotropy=tX;Eo.Clearcoat=nX;Eo.LineStyle=iX;Eo.Material=oX;Eo.Vector=aX;Eo.Polygon=rX;var _n=Eo;var lj={};lj.getImageIdFromTexture=function(e){e=e??G.EMPTY_OBJECT;let{gltf:t,textureId:n,supportedImageFormats:i}=e,o=t.textures[n],r=o.extensions;if(l(r)){if(i.webp&&l(r.EXT_texture_webp))return r.EXT_texture_webp.source;if(i.basis&&l(r.KHR_texture_basisu))return r.KHR_texture_basisu.source}return o.source};lj.createSampler=function(e){e=e??G.EMPTY_OBJECT;let{gltf:t,textureInfo:n,compressedTextureNoMipmap:i=!1}=e,o=un.REPEAT,r=un.REPEAT,a=Vt.LINEAR,s=ti.LINEAR,c=n.index,f=t.textures[c].sampler;if(l(f)){let d=t.samplers[f];o=d.wrapS??o,r=d.wrapT??r,a=d.minFilter??a,s=d.magFilter??s}return i&&a!==Vt.LINEAR&&a!==Vt.NEAREST&&(a===Vt.NEAREST_MIPMAP_NEAREST||a===Vt.NEAREST_MIPMAP_LINEAR?a=Vt.NEAREST:a=Vt.LINEAR),new jt({wrapS:o,wrapT:r,minificationFilter:a,magnificationFilter:s})};var N5e=new z(1,1);lj.createModelTextureReader=function(e){e=e??G.EMPTY_OBJECT;let{textureInfo:t,channels:n,texture:i}=e,o=t.texCoord??0,r,a=t.extensions?.KHR_texture_transform;if(l(a)){o=a.texCoord??o;let u=l(a.offset)?z.unpack(a.offset):z.ZERO,f=a.rotation??0,d=l(a.scale)?z.unpack(a.scale):N5e;f=-f,r=new $(Math.cos(f)*d.x,-Math.sin(f)*d.y,u.x,Math.sin(f)*d.x,Math.cos(f)*d.y,u.y,0,0,1)}let s=new _n.TextureReader;s.index=t.index,s.texture=i,s.texCoord=o,s.scale=t.scale,s.transform=r,s.channels=n;let c=t.extensions?.EXT_textureInfo_constant_lod;return l(c)&&(s.constantLod={repetitions:c.repetitions??1,offset:l(c.offset)?z.unpack(c.offset):z.ZERO,minClampDistance:c.minClampDistance??1,maxClampDistance:c.maxClampDistance??4294967296}),s};var Ru=lj;function F5e(e){let t=document.createElement("canvas");return t.width=D.nextPowerOfTwo(e.width),t.height=D.nextPowerOfTwo(e.height),t.getContext("2d").drawImage(e,0,0,e.width,e.height,0,0,t.width,t.height),t}var vA=F5e;var sX=class extends qi{constructor(t){super(),t=t??G.EMPTY_OBJECT;let n=t.resourceCache,i=t.gltf,o=t.textureInfo,r=t.gltfResource,a=t.baseResource,s=t.supportedImageFormats,c=t.cacheKey,u=t.asynchronous??!0,f=o.index,d=Ru.getImageIdFromTexture({gltf:i,textureId:f,supportedImageFormats:s});this._resourceCache=n,this._gltf=i,this._textureInfo=o,this._imageId=d,this._gltfResource=r,this._baseResource=a,this._cacheKey=c,this._asynchronous=u,this._imageLoader=void 0,this._image=void 0,this._mipLevels=void 0,this._texture=void 0,this._state=gt.UNLOADED,this._promise=void 0}get cacheKey(){return this._cacheKey}get texture(){return this._texture}async load(){return l(this._promise)?this._promise:(this._state=gt.LOADING,this._promise=z5e(this),this._promise)}process(t){if(this._state===gt.READY)return!0;if(this._state!==gt.LOADED&&this._state!==gt.PROCESSING||l(this._texture)||!l(this._image))return!1;this._state=gt.PROCESSING;let n;if(this._asynchronous){let i=k5e;if(i.set(this._gltf,this._textureInfo,this._cacheKey,this._image,this._mipLevels,t.context),!t.jobScheduler.execute(i,Pc.TEXTURE))return!1;n=i.texture}else n=kde(this._gltf,this._textureInfo,this._cacheKey,this._image,this._mipLevels,t.context);return this.unload(),this._texture=n,this._state=gt.READY,this._resourceCache.statistics.addTextureLoader(this),!0}unload(){l(this._texture)&&this._texture.destroy(),l(this._imageLoader)&&!this._imageLoader.isDestroyed()&&this._resourceCache.unload(this._imageLoader),this._imageLoader=void 0,this._image=void 0,this._mipLevels=void 0,this._texture=void 0,this._gltf=void 0}},cX=class{constructor(){this.gltf=void 0,this.textureInfo=void 0,this.textureId=void 0,this.image=void 0,this.context=void 0,this.texture=void 0}set(t,n,i,o,r,a){this.gltf=t,this.textureInfo=n,this.textureId=i,this.image=o,this.mipLevels=r,this.context=a}execute(){this.texture=kde(this.gltf,this.textureInfo,this.textureId,this.image,this.mipLevels,this.context)}};function kde(e,t,n,i,o,r){let a=i.internalFormat,s=!1;Xe.isCompressedFormat(a)&&!l(o)&&(s=!0);let c=Ru.createSampler({gltf:e,textureInfo:t,compressedTextureNoMipmap:s}),u=c.minificationFilter,f=c.wrapS,d=c.wrapT,p=u===Vt.NEAREST_MIPMAP_NEAREST||u===Vt.NEAREST_MIPMAP_LINEAR||u===Vt.LINEAR_MIPMAP_NEAREST||u===Vt.LINEAR_MIPMAP_LINEAR,g=!l(a)&&p,m=g||f===un.REPEAT||f===un.MIRRORED_REPEAT||d===un.REPEAT||d===un.MIRRORED_REPEAT,A=!D.isPowerOfTwo(i.width)||!D.isPowerOfTwo(i.height),y=m&&A,x;return l(a)?(!r.webgl2&&Xe.isCompressedFormat(a)&&A&&m&&console.warn("Compressed texture uses REPEAT or MIRRORED_REPEAT texture wrap mode and dimensions are not powers of two. The texture may be rendered incorrectly."),x=It.create({id:n,context:r,source:{arrayBufferView:i.bufferView,mipLevels:o},width:i.width,height:i.height,pixelFormat:i.internalFormat,sampler:c})):(y&&(i=vA(i)),x=It.create({id:n,context:r,source:i,sampler:c,flipY:!1,skipColorSpaceConversion:!0})),g&&x.generateMipmap(),x}var k5e=new cX;async function z5e(e){let t=e._resourceCache;try{let n=t.getImageLoader({gltf:e._gltf,imageId:e._imageId,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._imageLoader=n,await n.load(),e.isDestroyed()?void 0:(e._image=n.image,e._mipLevels=n.mipLevels,e._state=gt.LOADED,e)}catch(n){if(e.isDestroyed())return;throw e.unload(),e._state=gt.FAILED,e.getError("Failed to load texture",n)}}var fv=sX;var lX=class extends qi{constructor(t){super(),t=t??G.EMPTY_OBJECT;let n=t.resourceCache,i=t.gltf,o=t.gltfResource,r=t.baseResource,a=t.bufferViewId,s=t.primitive,c=t.draco,u=t.attributeSemantic,f=t.accessorId,d=t.cacheKey,p=t.spz,g=t.asynchronous??!0,m=t.loadBuffer??!1,A=t.loadTypedArray??!1;this._resourceCache=n,this._gltfResource=o,this._baseResource=r,this._gltf=i,this._bufferViewId=a,this._primitive=s,this._draco=c,this._spz=p,this._attributeSemantic=u,this._accessorId=f,this._cacheKey=d,this._asynchronous=g,this._loadBuffer=m,this._loadTypedArray=A,this._bufferViewLoader=void 0,this._dracoLoader=void 0,this._quantization=void 0,this._typedArray=void 0,this._buffer=void 0,this._state=gt.UNLOADED,this._promise=void 0}get cacheKey(){return this._cacheKey}get buffer(){return this._buffer}get typedArray(){return this._typedArray}get quantization(){return this._quantization}async load(){return l(this._promise)?this._promise:l(this._spz)?(this._promise=j5e(this),this._promise):U5e(this._draco,this._attributeSemantic)?(this._promise=q5e(this),this._promise):(this._promise=X5e(this),this._promise)}process(t){if(this._state===gt.READY)return!0;if(this._state!==gt.LOADED&&this._state!==gt.PROCESSING)return!1;if(l(this._dracoLoader)){try{if(!this._dracoLoader.process(t))return!1}catch(o){uj(this,o)}Y5e(this)}if(l(this._spzLoader)){try{if(!this._spzLoader.process(t))return!1}catch(o){uj(this,o)}W5e(this)}let n,i=this._typedArray;if(this._loadBuffer&&this._asynchronous){let o=K5e;if(o.set(i,t.context),!t.jobScheduler.execute(o,Pc.BUFFER))return!1;n=o.buffer}else this._loadBuffer&&(n=zde(i,t.context));return this.unload(),this._buffer=n,this._typedArray=this._loadTypedArray?i:void 0,this._state=gt.READY,this._resourceCache.statistics.addGeometryLoader(this),!0}unload(){l(this._buffer)&&this._buffer.destroy();let t=this._resourceCache;l(this._bufferViewLoader)&&!this._bufferViewLoader.isDestroyed()&&t.unload(this._bufferViewLoader),l(this._dracoLoader)&&t.unload(this._dracoLoader),l(this._spzLoader)&&t.unload(this._spzLoader),this._bufferViewLoader=void 0,this._dracoLoader=void 0,this._spzLoader=void 0,this._typedArray=void 0,this._buffer=void 0,this._gltf=void 0,this._primitive=void 0}};function U5e(e,t){return l(e)&&l(e.attributes)&&l(e.attributes[t])}function V5e(e,t,n,i){let r=(1<<e.quantizationBits)-1,a=1/r,s=new _n.Quantization;if(s.componentDatatype=t,s.octEncoded=e.octEncoded,s.octEncodedZXY=!0,s.type=i,s.octEncoded)s.type=Ft.VEC2,s.normalizationRange=r;else{let c=Ft.getMathType(i);if(c===Number){let u=e.range;s.quantizedVolumeOffset=e.minValues[0],s.quantizedVolumeDimensions=u,s.normalizationRange=r,s.quantizedVolumeStepSize=u*a}else{s.quantizedVolumeOffset=c.unpack(e.minValues),s.normalizationRange=c.unpack(new Array(n).fill(r));let u=new Array(n).fill(e.range);s.quantizedVolumeDimensions=c.unpack(u);let f=u.map(function(d){return d*a});s.quantizedVolumeStepSize=c.unpack(f)}}return s}async function j5e(e){e._state=gt.LOADING;let t=e._resourceCache;try{let n=t.getSpzLoader({gltf:e._gltf,primitive:e._primitive,spz:e._spz,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._spzLoader=n,await n.load(),e.isDestroyed()?void 0:(e._state=gt.LOADED,e)}catch{if(e.isDestroyed())return}}function G5e(e){return`${e.startsWith("KHR_gaussian_splatting:")?"KHR_gaussian_splatting:":"_"}SH_DEGREE_`}function H5e(e){let t=G5e(e),n="_COEF_",i=t.length,o=e.indexOf(n,i),r=parseInt(e.slice(i,o),10),a=parseInt(e.slice(o+n.length),10);return{l:r,n:a}}function W5e(e){e._state=gt.PROCESSING;let n=e._spzLoader.decodedData.gcloud;if(e._attributeSemantic==="POSITION")e._typedArray=n.positions;else if(e._attributeSemantic==="KHR_gaussian_splatting:SCALE"||e._attributeSemantic==="_SCALE")e._typedArray=n.scales;else if(e._attributeSemantic==="KHR_gaussian_splatting:ROTATION"||e._attributeSemantic==="_ROTATION")e._typedArray=n.rotations;else if(e._attributeSemantic==="COLOR_0"){let i=n.colors,o=n.alphas;e._typedArray=new Uint8Array(i.length/3*4);for(let r=0;r<i.length/3;r++)e._typedArray[r*4]=D.clamp(i[r*3]*255,0,255),e._typedArray[r*4+1]=D.clamp(i[r*3+1]*255,0,255),e._typedArray[r*4+2]=D.clamp(i[r*3+2]*255,0,255),e._typedArray[r*4+3]=D.clamp(o[r]*255,0,255)}else if(e._attributeSemantic.includes("SH_DEGREE_")){let{l:i,n:o}=H5e(e._attributeSemantic),r=n.shDegree,a=0,s=[0,9,24];switch(r){case 1:a=9;break;case 2:a=24;break;case 3:a=45;break}let c=n.numPoints,u=n.sh;e._typedArray=new Float32Array(c*3);for(let f=0;f<c;f++){let d=f*a+s[i-1]+o*3;e._typedArray[f*3]=u[d],e._typedArray[f*3+1]=u[d+1],e._typedArray[f*3+2]=u[d+2]}}}async function q5e(e){e._state=gt.LOADING;let t=e._resourceCache;try{let n=t.getDracoLoader({gltf:e._gltf,primitive:e._primitive,draco:e._draco,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._dracoLoader=n,await n.load(),e.isDestroyed()?void 0:(e._state=gt.LOADED,e)}catch{if(e.isDestroyed())return;uj(e)}}function Y5e(e){e._state=gt.PROCESSING;let n=e._dracoLoader.decodedData.vertexAttributes,i=e._attributeSemantic,o=n[i],r=e._accessorId,s=e._gltf.accessors[r].type,c=o.array,u=o.data.quantization;l(u)&&(e._quantization=V5e(u,o.data.componentDatatype,o.data.componentsPerAttribute,s)),e._typedArray=new Uint8Array(c.buffer,c.byteOffset,c.byteLength)}async function X5e(e){e._state=gt.LOADING;let t=e._resourceCache;try{let n=t.getBufferViewLoader({gltf:e._gltf,bufferViewId:e._bufferViewId,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._bufferViewLoader=n,await n.load(),e.isDestroyed()?void 0:(e._typedArray=n.typedArray,e._state=gt.PROCESSING,e)}catch(n){if(e.isDestroyed())return;uj(e,n)}}function uj(e,t){throw e.unload(),e._state=gt.FAILED,e.getError("Failed to load vertex buffer",t)}var uX=class{constructor(){this.typedArray=void 0,this.context=void 0,this.buffer=void 0}set(t,n){this.typedArray=t,this.context=n}execute(){this.buffer=zde(this.typedArray,this.context)}};function zde(e,t){let n=Ke.createVertexBuffer({typedArray:e,context:t,usage:Oe.STATIC_DRAW});return n.vertexArrayDestroyable=!1,n}var K5e=new uX,dv=lX;var Ude={};async function Q5e(e={}){var t,n,i,o,r=e,a=!!globalThis.window,s=!!globalThis.WorkerGlobalScope,c=((n=(t=globalThis.process)==null?void 0:t.versions)==null?void 0:n.node)&&((i=globalThis.process)==null?void 0:i.type)!="renderer";if(c){let{createRequire:ue}=await Promise.resolve().then(()=>t9e);var u=ue(Ude.url)}var f="./this.program",d=Ude.url;if(c)u("node:fs"),d.startsWith("file:")&&u("node:path").dirname(u("node:url").fileURLToPath(d)),1<process.argv.length&&(f=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2);else if(a||s)try{new URL(".",d)}catch{}var p=console.log.bind(console),g=console.error.bind(console),m=!1;function A(ue){for(var ne=0,xe=ue.length,Se=new Uint8Array(xe),qe;ne<xe;++ne)qe=ue.charCodeAt(ne),Se[ne]=~qe>>8&qe;return Se}var y,x,b,C,E,S,w,P,R,B,L,_,T=!1;function v(){var ue=Hc.buffer;b=new Int8Array(ue),E=new Int16Array(ue),r.HEAPU8=C=new Uint8Array(ue),S=new Uint16Array(ue),w=new Int32Array(ue),P=new Uint32Array(ue),r.HEAPF32=R=new Float32Array(ue),B=new Float64Array(ue),L=new BigInt64Array(ue),_=new BigUint64Array(ue)}function I(ue){var ne;throw(ne=r.onAbort)==null||ne.call(r,ue),ue="Aborted("+ue+")",g(ue),m=!0,ue=new WebAssembly.RuntimeError(ue+". Build with -sASSERTIONS for more info."),x?.(ue),ue}var O;async function N(ue){return ue}async function j(ue){var ne=O;try{var xe=await N(ne);return await WebAssembly.instantiate(xe,ue)}catch(Se){g(`failed to asynchronously prepare wasm: ${Se}`),I(Se)}}async function k(ue){return j(ue)}var U=ue=>{for(;0<ue.length;)ue.shift()(r)},F=[],H=[],q=()=>{var ue=r.preRun.shift();H.push(ue)},J={},W=ue=>{for(;ue.length;){var ne=ue.pop();ue.pop()(ne)}};function Z(ue){return this.O(P[ue>>2])}var K={},le={},me={},ae=class extends Error{constructor(ue){super(ue),this.name="InternalError"}},be=(ue,ne,xe)=>{function Se(Et){if(Et=xe(Et),Et.length!==ue.length)throw new ae("Mismatched type converter count");for(var Cn=0;Cn<ue.length;++Cn)ke(ue[Cn],Et[Cn])}ue.forEach(Et=>me[Et]=ne);var qe=Array(ne.length),Ct=[],ft=0;for(let[Et,Cn]of ne.entries())le.hasOwnProperty(Cn)?qe[Et]=le[Cn]:(Ct.push(Cn),K.hasOwnProperty(Cn)||(K[Cn]=[]),K[Cn].push(()=>{qe[Et]=le[Cn],++ft,ft===Ct.length&&Se(qe)}));Ct.length===0&&Se(qe)},ge=ue=>{for(var ne="";;){var xe=C[ue++];if(!xe)return ne;ne+=String.fromCharCode(xe)}},we=class extends Error{constructor(ue){super(ue),this.name="BindingError"}},Ee=ue=>{throw new we(ue)};function Be(ue,ne,xe={}){var Se=ne.name;if(!ue)throw new we(`type "${Se}" must have a positive integer typeid pointer`);if(le.hasOwnProperty(ue)){if(xe.Aa)return;throw new we(`Cannot register type '${Se}' twice`)}le[ue]=ne,delete me[ue],K.hasOwnProperty(ue)&&(ne=K[ue],delete K[ue],ne.forEach(qe=>qe()))}function ke(ue,ne,xe={}){return Be(ue,ne,xe)}var Ge=(ue,ne,xe)=>{switch(ne){case 1:return xe?Se=>b[Se]:Se=>C[Se];case 2:return xe?Se=>E[Se>>1]:Se=>S[Se>>1];case 4:return xe?Se=>w[Se>>2]:Se=>P[Se>>2];case 8:return xe?Se=>L[Se>>3]:Se=>_[Se>>3];default:throw new TypeError(`invalid integer width (${ne}): ${ue}`)}},rt=ue=>{throw new we(ue.M.R.N.name+" instance already deleted")},et=!1,Pe=()=>{},Ye=ue=>globalThis.FinalizationRegistry?(et=new FinalizationRegistry(ne=>{ne=ne.M,--ne.count.value,ne.count.value===0&&(ne.V?ne.Y.Z(ne.V):ne.R.N.Z(ne.P))}),Ye=ne=>{var xe=ne.M;return xe.V&&et.register(ne,{M:xe},ne),ne},Pe=ne=>{et.unregister(ne)},Ye(ue)):(Ye=ne=>ne,ue);function ut(){}var Tt=(ue,ne)=>Object.defineProperty(ne,"name",{value:ue}),tn={},Ht=(ue,ne,xe)=>{if(ue[ne].U===void 0){var Se=ue[ne];ue[ne]=function(...qe){if(!ue[ne].U.hasOwnProperty(qe.length))throw new we(`Function '${xe}' called with an invalid number of arguments (${qe.length}) - expects one of (${ue[ne].U})!`);return ue[ne].U[qe.length].apply(this,qe)},ue[ne].U=[],ue[ne].U[Se.$]=Se}},xt=(ue,ne,xe)=>{if(r.hasOwnProperty(ue)){if(xe===void 0||r[ue].U!==void 0&&r[ue].U[xe]!==void 0)throw new we(`Cannot register public name '${ue}' twice`);if(Ht(r,ue,ue),r[ue].U.hasOwnProperty(xe))throw new we(`Cannot register multiple overloads of a function with the same number of arguments (${xe})!`);r[ue].U[xe]=ne}else r[ue]=ne,r[ue].$=xe},Pt=ue=>{ue=ue.replace(/[^a-zA-Z0-9_]/g,"$");var ne=ue.charCodeAt(0);return 48<=ne&&57>=ne?`_${ue}`:ue};function bn(ue,ne,xe,Se,qe,Ct,ft,Et){this.name=ue,this.constructor=ne,this.ba=xe,this.Z=Se,this.W=qe,this.va=Ct,this.fa=ft,this.ta=Et,this.Ca=[]}var at=(ue,ne,xe)=>{for(;ne!==xe;){if(!ne.fa)throw new we(`Expected null or instance of ${xe.name}, got an instance of ${ne.name}`);ue=ne.fa(ue),ne=ne.W}return ue},st=ue=>{if(ue===null)return"null";var ne=typeof ue;return ne==="object"||ne==="array"||ne==="function"?ue.toString():""+ue};function Ln(ue,ne){if(ne===null){if(this.ia)throw new we(`null is not a valid ${this.name}`);return 0}if(!ne.M)throw new we(`Cannot pass "${st(ne)}" as a ${this.name}`);if(!ne.M.P)throw new we(`Cannot pass deleted object as a pointer of type ${this.name}`);return at(ne.M.P,ne.M.R.N,this.N)}function Nn(ue,ne){if(ne===null){if(this.ia)throw new we(`null is not a valid ${this.name}`);if(this.ha){var xe=this.ka();return ue!==null&&ue.push(this.Z,xe),xe}return 0}if(!ne||!ne.M)throw new we(`Cannot pass "${st(ne)}" as a ${this.name}`);if(!ne.M.P)throw new we(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.ga&&ne.M.R.ga)throw new we(`Cannot convert argument of type ${ne.M.Y?ne.M.Y.name:ne.M.R.name} to parameter type ${this.name}`);if(xe=at(ne.M.P,ne.M.R.N,this.N),this.ha){if(ne.M.V===void 0)throw new we("Passing raw pointer to smart pointer is illegal");switch(this.Ha){case 0:if(ne.M.Y===this)xe=ne.M.V;else throw new we(`Cannot convert argument of type ${ne.M.Y?ne.M.Y.name:ne.M.R.name} to parameter type ${this.name}`);break;case 1:xe=ne.M.V;break;case 2:if(ne.M.Y===this)xe=ne.M.V;else{var Se=ne.clone();xe=this.Da(xe,Lo(()=>Se.delete())),ue!==null&&ue.push(this.Z,xe)}break;default:throw new we("Unsupported sharing policy")}}return xe}function uo(ue,ne){if(ne===null){if(this.ia)throw new we(`null is not a valid ${this.name}`);return 0}if(!ne.M)throw new we(`Cannot pass "${st(ne)}" as a ${this.name}`);if(!ne.M.P)throw new we(`Cannot pass deleted object as a pointer of type ${this.name}`);if(ne.M.R.ga)throw new we(`Cannot convert argument of type ${ne.M.R.name} to parameter type ${this.name}`);return at(ne.M.P,ne.M.R.N,this.N)}var Yo=(ue,ne,xe)=>ne===xe?ue:xe.W===void 0?null:(ue=Yo(ue,ne,xe.W),ue===null?null:xe.ta(ue)),oo={},ro=(ue,ne)=>{if(ne===void 0)throw new we("ptr should not be undefined");for(;ue.W;)ne=ue.fa(ne),ue=ue.W;return oo[ne]},Xn=(ue,ne)=>{if(!ne.R||!ne.P)throw new ae("makeClassHandle requires ptr and ptrType");if(!!ne.Y!=!!ne.V)throw new ae("Both smartPtrType and smartPtr must be specified");return ne.count={value:1},Ye(Object.create(ue,{M:{value:ne,writable:!0}}))};function Kn(ue,ne,xe,Se,qe,Ct,ft,Et,Cn,Zn,mn){this.name=ue,this.N=ne,this.ia=xe,this.ga=Se,this.ha=qe,this.Ba=Ct,this.Ha=ft,this.pa=Et,this.ka=Cn,this.Da=Zn,this.Z=mn,qe||ne.W!==void 0?this.S=Nn:(this.S=Se?Ln:uo,this.T=null)}var cn=(ue,ne,xe)=>{if(!r.hasOwnProperty(ue))throw new ae("Replacing nonexistent public symbol");r[ue].U!==void 0&&xe!==void 0?r[ue].U[xe]=ne:(r[ue]=ne,r[ue].$=xe)},Jn=(ue,ne)=>{ue=ge(ue);var xe=sE.get(ne);if(typeof xe!="function")throw new we(`unknown function pointer with signature ${ue}: ${ne}`);return xe};class Pr extends Error{}var Da=ue=>{ue=Ko(ue);var ne=ge(ue);return ws(ue),ne},rs=(ue,ne)=>{function xe(Ct){qe[Ct]||le[Ct]||(me[Ct]?me[Ct].forEach(xe):(Se.push(Ct),qe[Ct]=!0))}var Se=[],qe={};throw ne.forEach(xe),new Pr(`${ue}: `+Se.map(Da).join([", "]))},Ga=(ue,ne)=>{for(var xe=[],Se=0;Se<ue;Se++)xe.push(P[ne+4*Se>>2]);return xe};function as(ue){for(var ne=1;ne<ue.length;++ne)if(ue[ne]!==null&&ue[ne].T===void 0)return!0;return!1}function pr(ue,ne,xe,Se,qe,Ct){var ft=ne.length;if(2>ft)throw new we("argTypes array size mismatch! Must at least get return value and 'this' types!");var Et=ne[1]!==null&&xe!==null,Cn=as(ne);xe=!ne[0].oa;var Zn=ne[0],mn=ne[1];for(Se=[ue,Ee,Se,qe,W,Zn.O.bind(Zn),mn?.S.bind(mn)],qe=2;qe<ft;++qe)Zn=ne[qe],Se.push(Zn.S.bind(Zn));if(!Cn)for(qe=Et?1:2;qe<ne.length;++qe)ne[qe].T!==null&&Se.push(ne[qe].T);for(Cn=as(ne),qe=ne.length-2,mn=[],Zn=["fn"],Et&&Zn.push("thisWired"),ft=0;ft<qe;++ft)mn.push(`arg${ft}`),Zn.push(`arg${ft}Wired`);mn=mn.join(","),Zn=Zn.join(","),mn=`return function (${mn}) {
- `,Cn&&(mn+=`var destructors = [];
- `);var Wr=Cn?"destructors":"null",qr="humanName throwBindingError invoker fn runDestructors fromRetWire toClassParamWire".split(" ");for(Et&&(mn+=`var thisWired = toClassParamWire(${Wr}, this);
- `),ft=0;ft<qe;++ft){var Is=`toArg${ft}Wire`;mn+=`var arg${ft}Wired = ${Is}(${Wr}, arg${ft});
- `,qr.push(Is)}if(mn+=(xe||Ct?"var rv = ":"")+`invoker(${Zn});
- `,Cn)mn+=`runDestructors(destructors);
- `;else for(ft=Et?1:2;ft<ne.length;++ft)Ct=ft===1?"thisWired":"arg"+(ft-2)+"Wired",ne[ft].T!==null&&(mn+=`${Ct}_dtor(${Ct});
- `,qr.push(`${Ct}_dtor`));return xe&&(mn+=`var ret = fromRetWire(rv);
- return ret;
- `),ne=new Function(qr,mn+`}
- `)(...Se),Tt(ue,ne)}var ri=ue=>{ue=ue.trim();let ne=ue.indexOf("(");return ne===-1?ue:ue.slice(0,ne)},Gr=[],Po=[0,1,,1,null,1,!0,1,!1,1],Ri=ue=>{9<ue&&--Po[ue+1]===0&&(Po[ue]=void 0,Gr.push(ue))},ui=ue=>{if(!ue)throw new we(`Cannot use deleted val. handle = ${ue}`);return Po[ue]},Lo=ue=>{switch(ue){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:let ne=Gr.pop()||Po.length;return Po[ne]=ue,Po[ne+1]=1,ne}},bc={name:"emscripten::val",O:ue=>{var ne=ui(ue);return Ri(ue),ne},S:(ue,ne)=>Lo(ne),X:Z,T:null},sa=(ue,ne,xe)=>{switch(ne){case 1:return xe?function(Se){return this.O(b[Se])}:function(Se){return this.O(C[Se])};case 2:return xe?function(Se){return this.O(E[Se>>1])}:function(Se){return this.O(S[Se>>1])};case 4:return xe?function(Se){return this.O(w[Se>>2])}:function(Se){return this.O(P[Se>>2])};default:throw new TypeError(`invalid integer width (${ne}): ${ue}`)}},cf=(ue,ne)=>{var xe=le[ue];if(xe===void 0)throw ue=`${ne} has unknown type ${Da(ue)}`,new we(ue);return xe},Ks=(ue,ne)=>{switch(ne){case 4:return function(xe){return this.O(R[xe>>2])};case 8:return function(xe){return this.O(B[xe>>3])};default:throw new TypeError(`invalid float width (${ne}): ${ue}`)}},G_=(ue,ne,xe)=>{let Se=(qe,Ct)=>{let ft=0;return{next(){if(ft>=qe)return{done:!0};let Et=ft;return ft++,{value:Ct(Et),done:!1}},[Symbol.iterator](){return this}}};ue[Symbol.iterator]||(ue[Symbol.iterator]=function(){let qe=this[ne]();return Se(qe,Ct=>this[xe](Ct))})},Xo=Object.assign({optional:!0},bc),gr=(ue,ne,xe)=>{var Se=C;if(!(0<xe))return 0;var qe=ne;xe=ne+xe-1;for(var Ct=0;Ct<ue.length;++Ct){var ft=ue.codePointAt(Ct);if(127>=ft){if(ne>=xe)break;Se[ne++]=ft}else if(2047>=ft){if(ne+1>=xe)break;Se[ne++]=192|ft>>6,Se[ne++]=128|ft&63}else if(65535>=ft){if(ne+2>=xe)break;Se[ne++]=224|ft>>12,Se[ne++]=128|ft>>6&63,Se[ne++]=128|ft&63}else{if(ne+3>=xe)break;Se[ne++]=240|ft>>18,Se[ne++]=128|ft>>12&63,Se[ne++]=128|ft>>6&63,Se[ne++]=128|ft&63,Ct++}}return Se[ne]=0,ne-qe},Ch=ue=>{for(var ne=0,xe=0;xe<ue.length;++xe){var Se=ue.charCodeAt(xe);127>=Se?ne++:2047>=Se?ne+=2:55296<=Se&&57343>=Se?(ne+=4,++xe):ne+=3}return ne},Hr=new TextDecoder,Vc=(ue,ne,xe,Se)=>{if(xe=ne+xe,Se)return xe;for(;ue[ne]&&!(ne>=xe);)++ne;return ne},jc=new TextDecoder("utf-16le"),Cc=(ue,ne,xe)=>(ue>>=1,jc.decode(S.subarray(ue,Vc(S,ue,ne/2,xe)))),Co=(ue,ne,xe)=>{if(xe??(xe=2147483647),2>xe)return 0;xe-=2;var Se=ne;xe=xe<2*ue.length?xe/2:ue.length;for(var qe=0;qe<xe;++qe)E[ne>>1]=ue.charCodeAt(qe),ne+=2;return E[ne>>1]=0,ne-Se},Ha=ue=>2*ue.length,H_=(ue,ne,xe)=>{var Se="";ue>>=2;for(var qe=0;!(qe>=ne/4);qe++){var Ct=P[ue+qe];if(!Ct&&!xe)break;Se+=String.fromCodePoint(Ct)}return Se},HI=(ue,ne,xe)=>{if(xe??(xe=2147483647),4>xe)return 0;var Se=ne;xe=Se+xe-4;for(var qe=0;qe<ue.length;++qe){var Ct=ue.codePointAt(qe);if(65535<Ct&&qe++,w[ne>>2]=Ct,ne+=4,ne+4>xe)break}return w[ne>>2]=0,ne-Se},Q9=ue=>{for(var ne=0,xe=0;xe<ue.length;++xe)65535<ue.codePointAt(xe)&&xe++,ne+=4;return ne},rE=[],O4=ue=>{var ne=rE.length;return rE.push(ue),ne},aE=(ue,ne)=>{for(var xe=Array(ue),Se=0;Se<ue;++Se)xe[Se]=cf(P[ne+4*Se>>2],`parameter ${Se}`);return xe},W_=(ue,ne,xe)=>{var Se=[];return ue=ue(Se,xe),Se.length&&(P[ne>>2]=Lo(Se)),ue},yn={},Te=ue=>{var ne=yn[ue];return ne===void 0?ge(ue):ne},ot={},$t=()=>{var ue;if(!fo){var ne={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(((ue=globalThis.navigator)==null?void 0:ue.language)??"C").replace("-","_")+".UTF-8",_:f||"./this.program"},xe;for(xe in ot)ot[xe]===void 0?delete ne[xe]:ne[xe]=ot[xe];var Se=[];for(xe in ne)Se.push(`${xe}=${ne[xe]}`);fo=Se}return fo},fo,ki=[null,[],[]];if((()=>{let ue=ut.prototype;Object.assign(ue,{isAliasOf:function(xe){if(!(this instanceof ut&&xe instanceof ut))return!1;var Se=this.M.R.N,qe=this.M.P;xe.M=xe.M;var Ct=xe.M.R.N;for(xe=xe.M.P;Se.W;)qe=Se.fa(qe),Se=Se.W;for(;Ct.W;)xe=Ct.fa(xe),Ct=Ct.W;return Se===Ct&&qe===xe},clone:function(){if(this.M.P||rt(this),this.M.ea)return this.M.count.value+=1,this;var xe=Ye,Se=Object,qe=Se.create,Ct=Object.getPrototypeOf(this),ft=this.M;return xe=xe(qe.call(Se,Ct,{M:{value:{count:ft.count,da:ft.da,ea:ft.ea,P:ft.P,R:ft.R,V:ft.V,Y:ft.Y}}})),xe.M.count.value+=1,xe.M.da=!1,xe},delete(){if(this.M.P||rt(this),this.M.da&&!this.M.ea)throw new we("Object already scheduled for deletion");Pe(this);var xe=this.M;--xe.count.value,xe.count.value===0&&(xe.V?xe.Y.Z(xe.V):xe.R.N.Z(xe.P)),this.M.ea||(this.M.V=void 0,this.M.P=void 0)},isDeleted:function(){return!this.M.P},deleteLater:function(){if(this.M.P||rt(this),this.M.da&&!this.M.ea)throw new we("Object already scheduled for deletion");return this.M.da=!0,this}});let ne=Symbol.dispose;ne&&(ue[ne]=ue.delete)})(),Object.assign(Kn.prototype,{wa(ue){return this.pa&&(ue=this.pa(ue)),ue},ma(ue){var ne;(ne=this.Z)==null||ne.call(this,ue)},X:Z,O:function(ue){function ne(){return this.ha?Xn(this.N.ba,{R:this.Ba,P:xe,Y:this,V:ue}):Xn(this.N.ba,{R:this,P:ue})}var xe=this.wa(ue);if(!xe)return this.ma(ue),null;var Se=ro(this.N,xe);if(Se!==void 0)return Se.M.count.value===0?(Se.M.P=xe,Se.M.V=ue,Se.clone()):(Se=Se.clone(),this.ma(ue),Se);if(Se=this.N.va(xe),Se=tn[Se],!Se)return ne.call(this);Se=this.ga?Se.sa:Se.pointerType;var qe=Yo(xe,this.N,Se.N);return qe===null?ne.call(this):this.ha?Xn(Se.N.ba,{R:Se,P:qe,Y:this,V:ue}):Xn(Se.N.ba,{R:Se,P:qe})}}),r.print&&(p=r.print),r.printErr&&(g=r.printErr),r.thisProgram&&(f=r.thisProgram),r.preInit)for(typeof r.preInit=="function"&&(r.preInit=[r.preInit]);0<r.preInit.length;)r.preInit.shift()();var Ko,Gc,ws,Hc,sE,ss={y:()=>I(""),r:ue=>{var ne=J[ue];delete J[ue];var xe=ne.ka,Se=ne.Z,qe=ne.na,Ct=qe.map(ft=>ft.za).concat(qe.map(ft=>ft.Fa));be([ue],Ct,ft=>{var Et={},Cn,Zn;for([Cn,Zn]of qe.entries()){let mn=ft[Cn],Wr=Zn.xa,qr=Zn.ya,Is=ft[Cn+qe.length],vl=Zn.Ea,ld=Zn.Ga;Et[Zn.ua]={read:w0=>mn.O(Wr(qr,w0)),write:(w0,WI)=>{var lf=[];vl(ld,w0,Is.S(lf,WI)),W(lf)},optional:mn.optional}}return[{name:ne.name,O:mn=>{var Wr={},qr;for(qr in Et)Wr[qr]=Et[qr].read(mn);return Se(mn),Wr},S:(mn,Wr)=>{for(var qr in Et)if(!(qr in Wr||Et[qr].optional))throw new TypeError(`Missing field: "${qr}"`);var Is=xe();for(qr in Et)Et[qr].write(Is,Wr[qr]);return mn!==null&&mn.push(Se,Is),Is},X:Z,T:Se}]})},o:(ue,ne,xe,Se,qe)=>{ne=ge(ne),Se=Se===0n;let Ct=ft=>ft;if(Se){let ft=8*xe;Ct=Et=>BigInt.asUintN(ft,Et),qe=Ct(qe)}ke(ue,{name:ne,O:Ct,S:(ft,Et)=>(typeof Et=="number"&&(Et=BigInt(Et)),Et),X:Ge(ne,xe,!Se),T:null})},C:(ue,ne,xe,Se)=>{ne=ge(ne),ke(ue,{name:ne,O:function(qe){return!!qe},S:function(qe,Ct){return Ct?xe:Se},X:function(qe){return this.O(C[qe])},T:null})},k:(ue,ne,xe,Se,qe,Ct,ft,Et,Cn,Zn,mn,Wr,qr)=>{mn=ge(mn),Ct=Jn(qe,Ct),Et&&(Et=Jn(ft,Et)),Zn&&(Zn=Jn(Cn,Zn)),qr=Jn(Wr,qr);var Is=Pt(mn);xt(Is,function(){rs(`Cannot construct ${mn} due to unbound types`,[Se])}),be([ue,ne,xe],Se?[Se]:[],vl=>{if(vl=vl[0],Se)var ld=vl.N,w0=ld.ba;else w0=ut.prototype;vl=Tt(mn,function(...$9){if(Object.getPrototypeOf(this)!==WI)throw new we(`Use 'new' to construct ${mn}`);if(lf.aa===void 0)throw new we(`${mn} has no accessible constructor`);var Ore=lf.aa[$9.length];if(Ore===void 0)throw new we(`Tried to invoke ctor of ${mn} with invalid number of parameters (${$9.length}) - expected (${Object.keys(lf.aa).toString()}) parameters instead!`);return Ore.apply(this,$9)});var WI=Object.create(w0,{constructor:{value:vl}});vl.prototype=WI;var lf=new bn(mn,vl,WI,qr,ld,Ct,Et,Zn);if(lf.W){var qI;(qI=lf.W).la??(qI.la=[]),lf.W.la.push(lf)}return ld=new Kn(mn,lf,!0,!1,!1),qI=new Kn(mn+"*",lf,!1,!1,!1),w0=new Kn(mn+" const*",lf,!1,!0,!1),tn[ue]={pointerType:qI,sa:w0},cn(Is,vl),[ld,qI,w0]})},g:(ue,ne,xe,Se,qe,Ct)=>{var ft=Ga(ne,xe);qe=Jn(Se,qe),be([],[ue],Et=>{Et=Et[0];var Cn=`constructor ${Et.name}`;if(Et.N.aa===void 0&&(Et.N.aa=[]),Et.N.aa[ne-1]!==void 0)throw new we(`Cannot register multiple constructors with identical number of parameters (${ne-1}) for class '${Et.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return Et.N.aa[ne-1]=()=>{rs(`Cannot construct ${Et.name} due to unbound types`,ft)},be([],ft,Zn=>(Zn.splice(1,0,null),Et.N.aa[ne-1]=pr(Cn,Zn,null,qe,Ct),[])),[]})},b:(ue,ne,xe,Se,qe,Ct,ft,Et,Cn)=>{var Zn=Ga(xe,Se);ne=ge(ne),ne=ri(ne),Ct=Jn(qe,Ct),be([],[ue],mn=>{function Wr(){rs(`Cannot call ${qr} due to unbound types`,Zn)}mn=mn[0];var qr=`${mn.name}.${ne}`;ne.startsWith("@@")&&(ne=Symbol[ne.substring(2)]),Et&&mn.N.Ca.push(ne);var Is=mn.N.ba,vl=Is[ne];return vl===void 0||vl.U===void 0&&vl.className!==mn.name&&vl.$===xe-2?(Wr.$=xe-2,Wr.className=mn.name,Is[ne]=Wr):(Ht(Is,ne,qr),Is[ne].U[xe-2]=Wr),be([],Zn,ld=>(ld=pr(qr,ld,mn,Ct,ft,Cn),Is[ne].U===void 0?(ld.$=xe-2,Is[ne]=ld):Is[ne].U[xe-2]=ld,[])),[]})},A:ue=>ke(ue,bc),s:(ue,ne,xe,Se,qe)=>{switch(ne=ge(ne),qe=qe===0?"object":qe===1?"number":"string",qe){case"object":let ft=function(){};ft.values={},ke(ue,{name:ne,constructor:ft,valueType:qe,O:function(Et){return this.constructor.values[Et]},S:(Et,Cn)=>Cn.value,X:sa(ne,xe,Se),T:null}),xt(ne,ft);break;case"number":var Ct={};ke(ue,{name:ne,ja:Ct,valueType:qe,O:Et=>Et,S:(Et,Cn)=>Cn,X:sa(ne,xe,Se),T:null}),xt(ne,Ct),delete r[ne].$;break;case"string":Ct={},ke(ue,{name:ne,ra:{},qa:{},ja:Ct,valueType:qe,O:function(Et){return this.qa[Et]},S:function(Et,Cn){return this.ra[Cn]},X:sa(ne,xe,Se),T:null}),xt(ne,Ct),delete r[ne].$}},d:(ue,ne,xe)=>{var Se=cf(ue,"enum");switch(ne=ge(ne),Se.valueType){case"object":ue=Se.constructor,Se=Object.create(Se.constructor.prototype,{value:{value:xe},constructor:{value:Tt(`${Se.name}_${ne}`,function(){})}}),ue.values[xe]=Se,ue[ne]=Se;break;case"number":Se.ja[ne]=xe;break;case"string":Se.ra[ne]=xe,Se.qa[xe]=ne,Se.ja[ne]=ne}},n:(ue,ne,xe)=>{ne=ge(ne),ke(ue,{name:ne,O:Se=>Se,S:(Se,qe)=>qe,X:Ks(ne,xe),T:null})},m:(ue,ne,xe,Se,qe,Ct,ft)=>{var Et=Ga(ne,xe);ue=ge(ue),ue=ri(ue),qe=Jn(Se,qe),xt(ue,function(){rs(`Cannot call ${ue} due to unbound types`,Et)},ne-1),be([],Et,Cn=>(Cn=[Cn[0],null].concat(Cn.slice(1)),cn(ue,pr(ue,Cn,null,qe,Ct,ft),ne-1),[]))},c:(ue,ne,xe,Se,qe)=>{ne=ge(ne);let Ct=Et=>Et;if(Se===0){var ft=32-8*xe;Ct=Et=>Et<<ft>>>ft,qe=Ct(qe)}ke(ue,{name:ne,O:Ct,S:(Et,Cn)=>Cn,X:Ge(ne,xe,Se!==0),T:null})},j:(ue,ne,xe,Se)=>{xe=ge(xe),Se=ge(Se),be([],[ue,ne],qe=>(G_(qe[0].N.ba,xe,Se),[]))},a:(ue,ne,xe)=>{function Se(Ct){return new qe(b.buffer,P[Ct+4>>2],P[Ct>>2])}var qe=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][ne];xe=ge(xe),ke(ue,{name:xe,O:Se,X:Se},{Aa:!0})},h:ue=>{ke(ue,Xo)},B:(ue,ne)=>{ne=ge(ne),ke(ue,{name:ne,O(xe){var Se=(Se=xe+4)?Hr.decode(C.subarray(Se,Vc(C,Se,P[xe>>2],!0))):"";return ws(xe),Se},S(xe,Se){Se instanceof ArrayBuffer&&(Se=new Uint8Array(Se));var qe=typeof Se=="string";if(!(qe||ArrayBuffer.isView(Se)&&Se.BYTES_PER_ELEMENT==1))throw new we("Cannot pass non-string to std::string");var Ct=qe?Ch(Se):Se.length,ft=Gc(4+Ct+1),Et=ft+4;return P[ft>>2]=Ct,qe?gr(Se,Et,Ct+1):C.set(Se,Et),xe!==null&&xe.push(ws,ft),ft},X:Z,T(xe){ws(xe)}})},f:(ue,ne,xe)=>{if(xe=ge(xe),ne===2)var Se=Cc,qe=Co,Ct=Ha;else Se=H_,qe=HI,Ct=Q9;ke(ue,{name:xe,O:ft=>{var Et=Se(ft+4,P[ft>>2]*ne,!0);return ws(ft),Et},S:(ft,Et)=>{if(typeof Et!="string")throw new we(`Cannot pass non-string to C++ string type ${xe}`);var Cn=Ct(Et),Zn=Gc(4+Cn+ne);return P[Zn>>2]=Cn/ne,qe(Et,Zn+4,Cn+ne),ft!==null&&ft.push(ws,Zn),Zn},X:Z,T(ft){ws(ft)}})},i:(ue,ne,xe,Se,qe,Ct)=>{J[ue]={name:ge(ne),ka:Jn(xe,Se),Z:Jn(qe,Ct),na:[]}},e:(ue,ne,xe,Se,qe,Ct,ft,Et,Cn,Zn)=>{J[ue].na.push({ua:ge(ne),za:xe,xa:Jn(Se,qe),ya:Ct,Fa:ft,Ea:Jn(Et,Cn),Ga:Zn})},D:(ue,ne)=>{ne=ge(ne),ke(ue,{oa:!0,name:ne,O:()=>{},S:()=>{}})},q:(ue,ne,xe)=>{var[Se,...qe]=aE(ue,ne);ne=Se.S.bind(Se);var Ct=qe.map(Cn=>Cn.X.bind(Cn));ue--;var ft={toValue:ui};switch(ue=Ct.map((Cn,Zn)=>{var mn=`argFromPtr${Zn}`;return ft[mn]=Cn,`${mn}(args${Zn?"+"+8*Zn:""})`}),xe){case 0:var Et="toValue(handle)";break;case 2:Et="new (toValue(handle))";break;case 3:Et="";break;case 1:ft.getStringOrSymbol=Te,Et="toValue(handle)[getStringOrSymbol(methodName)]"}return Et+=`(${ue})`,Se.oa||(ft.toReturnWire=ne,ft.emval_returnValue=W_,Et=`return emval_returnValue(toReturnWire, destructorsRef, ${Et})`),Et=`return function (handle, methodName, destructorsRef, args) {
- ${Et}
- }`,xe=new Function(Object.keys(ft),Et)(...Object.values(ft)),Et=`methodCaller<(${qe.map(Cn=>Cn.name)}) => ${Se.name}>`,O4(Tt(Et,xe))},F:Ri,p:(ue,ne,xe,Se,qe)=>rE[ue](ne,xe,Se,qe),E:ue=>{var ne=ui(ue);W(ne),Ri(ue)},t:(ue,ne,xe,Se)=>{var qe=new Date().getFullYear(),Ct=new Date(qe,0,1).getTimezoneOffset();qe=new Date(qe,6,1).getTimezoneOffset(),P[ue>>2]=60*Math.max(Ct,qe),w[ne>>2]=+(Ct!=qe),ne=ft=>{var Et=Math.abs(ft);return`UTC${0<=ft?"-":"+"}${String(Math.floor(Et/60)).padStart(2,"0")}${String(Et%60).padStart(2,"0")}`},ue=ne(Ct),ne=ne(qe),qe<Ct?(gr(ue,xe,17),gr(ne,Se,17)):(gr(ue,Se,17),gr(ne,xe,17))},z:ue=>{var ne=C.length;if(ue>>>=0,2147483648<ue)return!1;for(var xe=1;4>=xe;xe*=2){var Se=ne*(1+.2/xe);Se=Math.min(Se,ue+100663296);e:{Se=(Math.min(2147483648,65536*Math.ceil(Math.max(ue,Se)/65536))-Hc.buffer.byteLength+65535)/65536|0;try{Hc.grow(Se),v();var qe=1;break e}catch{}qe=void 0}if(qe)return!0}return!1},u:(ue,ne)=>{var xe=0,Se=0,qe;for(qe of $t()){var Ct=ne+xe;P[ue+Se>>2]=Ct,xe+=gr(qe,Ct,1/0)+1,Se+=4}return 0},v:(ue,ne)=>{var xe=$t();P[ue>>2]=xe.length,ue=0;for(var Se of xe)ue+=Ch(Se)+1;return P[ne>>2]=ue,0},w:()=>52,x:function(){return 70},l:(ue,ne,xe,Se)=>{for(var qe=0,Ct=0;Ct<xe;Ct++){var ft=P[ne>>2],Et=P[ne+4>>2];ne+=8;for(var Cn=0;Cn<Et;Cn++){var Zn=ue,mn=C[ft+Cn],Wr=ki[Zn];mn===0||mn===10?(Zn=Zn===1?p:g,mn=Vc(Wr,0),mn=Hr.decode(Wr.buffer?Wr.subarray(0,mn):new Uint8Array(Wr.slice(0,mn))),Zn(mn),Wr.length=0):Wr.push(mn)}qe+=Et}return P[Se>>2]=qe,0}},sx;return sx=await(async function(){function ue(xe){return xe=sx=xe.exports,Ko=xe.J,Gc=r._malloc=xe.K,ws=r._free=xe.L,Hc=xe.G,sE=xe.I,v(),sx}var ne={a:ss};return r.instantiateWasm?new Promise(xe=>{r.instantiateWasm(ne,(Se,qe)=>{xe(ue(Se))})}):(O??(O=A(`\0asm\0\0\0\xD79\`\x7F\x7F\`\x7F\x7F\0\`\x7F\x7F\x7F\x7F\`\x7F\x7F\x7F\`\x7F\0\`\x7F\x7F\x7F\x7F\x7F\x7F\x7F\`\x7F\x7F\x7F\x7F\x7F\`\x7F\x7F\x7F\0\`\x7F\x7F\x7F\x7F\0\`\x7F\x7F\x7F\x7F\x7F\x7F\`\x7F\x7F\x7F\x7F\x7F\0\`\x7F\x7F\x7F\x7F\x7F\x7F\0\`\b\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\`\0\0\`\x07\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\`\x7F~~~~\0\`\0\x7F\`
- \x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\0\`\x07\x7F\x7F\x7F\x7F\x7F\x7F\x7F\0\`\x7F\x7F\x7F\x7F~\x7F\`\b\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\0\`\x7F~~\x7F\0\`\x7F~\x7F~\`\x7F\x7F~\x7F\x7F\0\`
- \x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\`\f\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\`\x7F\x7F\x7F~\`\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\0\`\v\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\`\x7F\x7F\x7F\x7F~\`\x7F|\x7F\x7F\x7F\x7F\x7F\`\x07\x7F\x7F\x7F\x7F\x7F~~\x7F\`\x7F\x7F\x7F\x7F~~\x7F\`\x7F\x7F\x7F\x7F|\x7F\`\r\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\0\`\x7F\x7F\x7F~~\0\`\x7F\x7F\x7F\x7F\x7F|\`\x7F~\x7F\x7F\x7F\`\x7F~\0\`\x7F|\0\`~~~~\x7F\`~\x7F\x7F\`\x7F\x7F\x7F~\x7F\0\`\x7F\x7F\x7F~~\`~~|\`\x7F|\`\x7F\x7F\x7F|\`\x7F\x7F\x7F}\`\x7F\x7F~\0\`~~}\`\x7F\x7F~\`\x7F~~~\0\`~~~\x7F\`|\x7F|\`\x7F\x7F\x7F}\x7F\`\x7F\x7F\x7F}\0\`\x7F\x7F}\0\xC1 aa\0\x07ab\0ac\0
- ad\0\x07ae\0af\0\x07ag\0\vah\0ai\0\vaj\0\bak\0"al\0am\0an\0\x07ao\0#ap\0$aq\0ar\0as\0
- at\0\bau\0av\0aw\0\0ax\0%ay\0\raz\0\0aA\0aB\0aC\0\baD\0aE\0aF\0\x8D\x8B\0\0\0\0\r\x07\0\b
- \0\0\0\0\0\0\0\0\0\0\0&\0\0 \0\0\0'\0\f\f\0\r(\x07\r\x07\0\0\0\0\0)\0 \x07\x07\0\r
- \0\0\0*
- \r\0\0
- \v\b\x07\0\0
-
- \b\0+\0\0,\x07-\0\r\0\x07\b\0\x07\b\x07\x07\x07\0\0 \f\f \f\f\0 \f\0\0\0\x1B\x1B\0\0
- \0\0\x07\v
- \v\v
- \v\v\0\r\b./\x07\0012\b34\0 \0\0\0\0\0\0\b\0\b\0 5\0\b\x07678\x07\x07\v\v\v
-
-
- \b\b\b\x07\0\0\0\0\0\0\0\0\0\0\0\x07\0\0\0\0\0\0\0\0\0\0 \0 \f\f\x07 \0 \x07\v\v\0\f\f ! ! \0\b\b \b \0\0\b\0\0\0\0\0\0\0\0\0\0\b\0\r\x07p\xFD\xFD\x07\x82\x80\x80\b\x7FA\xC0\xEC\v\x07\x1BG\0H\0\xAAI\0J\0\xD4K\0/L\0! \xAE\0A\v\xFC\x95\xF3\xEF\xD4\xCD\xC9\x81\xFA\xBE\xB7\xAE\xA5\x9D\x9B\x81\xFA\x91\x87\xFC\xF1\xEF\xEE\xEA\xD8\xD7\xE1\xE0\xDF\xDE\xDD,\xD8\xD7\xD5\xDC\xDB\xD3\xDA\xD9\xD5\xD8\xD7\xD3\xD6\xD5\xCC\xD3\xD28\xA9\xA8\xA7\xA6\xC3\xA3\xC2\xA2\xA1\xA088\x9F\x9E\x9D\xC6\x9C\xC6\xB0\x8C\x8D\x8B\x90\x8F\x8E\x81\xC0\x8A\x89\x88\x87\x95\xC1\x94\x92\x93\x91\x9B\xC5\x9A\x99\x98\xC1\x97\x96K\x86\x85\x84\xA0!\xF2\x8D\x8B\x89\x86\x84\x82\x80\xFE\xFB\xF9\xF7\xF5\xF3\xF0\xF5\xBD\xBC\xF0\xAF\xAD\xAC\xAB\xAA\xF1\xA9\xA8\xA7\xF6\xA4\xA3\xA2\xA1\xA08\x9F\x9E\xE6\x9C\x99\x97\x95\x93\x90\xE5\x9A\x98\x96\x94\x92\x8Fq,,\xBB\xBA\xB9\xB8\xB6\xB5\xB4\xB3\xF1\xB2\xB1\xB0,\xEF\xEF{\xA1\xA1\xA6\xA1,\xEC\xEB{88\xEA\x8B,\xEC\xEB{88\xEA\x8B,\xE9\xE8{88\xE7\x8B,\xE9\xE8{88\xE7\x8Bq,\x83\x82\x81q,\x80\xFF\xFE,\xFD\xFC\xFB\xFA\x9E\x9E\xF9\xF8\xF7\xF6\xF5,\xF4\xF2\xF1\xF0\x97\x97\xEE\xED\xEC\xEB\xEA,\xE9\xE8\xE7\xE6\xE5\xE4\xE3\xE2,\xE1\xE0\xDF\xDE\xDD\xDC\xDB\xDAq,\x8F\xD9\xD8\xD7\xD6\xD5\xD3\x8E\x8A\x85\xF8\xF4\x81\xFDq,\x8F\xD2\xD1\xD0\xCF\xCE\xCC\x8C\x88\x83\xF6\xF2\xFF\xFA\xAE\xE4\xCB\xAE\xE4\xCA,\x8E\x8EFFF\x878[[,\x8E\x8EFFF\x878[[,\x8D\x8DFFF\x868[[,\x8D\x8DFFF\x868[[,\xC8\xC7,\xC6\xC5,\xC4\xC3,\xC2\xC1,\xF7\xC0\xC2,\xF7\xBF\xC2\xA4\xA5q,\xA0\xA0\xDB,\xDB,\xED\xE2\xE5\xEC,\xE3\xE6\xEB,\xE4\xE7\xE9,\xE8\f(
- \xC9\xCB\b\x8B\0 \0,\0\vA\0H@ \0(\b \0(\0!\v \0\v\x82\f\b\x7F@ \0E\r\0 \0A\bk" \0Ak(\0"Axq"\0j!@ Aq\r\0 AqE\r (\0"k"A\x8C\xD8(\0I\r \0 j!\0@@@A\x90\xD8(\0 G@ (\f! A\xFFM@ (\b"G\rA\xFC\xD7A\xFC\xD7(\0A~ Avwq6\0\f\v (!\x07 G@ (\b" 6\f 6\b\f\v ("\x7F Aj ("E\r Aj\v!@ ! "Aj! ("\r\0 Aj! ("\r\0\v A\x006\0\f\v ("AqAG\rA\x84\xD8 \x006\0 A~q6 \0Ar6 \x006\0\v 6\f 6\b\f\vA\0!\v \x07E\r\0@ ("At"(\xAC\xDA F@ A\xAC\xDAj 6\0 \rA\x80\xD8A\x80\xD8(\0A~ wq6\0\f\v@ \x07(F@ \x07 6\f\v \x07 6\v E\r\v \x076 ("@ 6 6\v ("E\r\0 6 6\v O\r\0 ("AqE\r\0@@@@ AqE@A\x94\xD8(\0 F@A\x94\xD8 6\0A\x88\xD8A\x88\xD8(\0 \0j"\x006\0 \0Ar6 A\x90\xD8(\0G\rA\x84\xD8A\x006\0A\x90\xD8A\x006\0\vA\x90\xD8(\0"\x07 F@A\x90\xD8 6\0A\x84\xD8A\x84\xD8(\0 \0j"\x006\0 \0Ar6 \0 j \x006\0\v Axq \0j!\0 (\f! A\xFFM@ (\b" F@A\xFC\xD7A\xFC\xD7(\0A~ Avwq6\0\f\v 6\f 6\b\f\v (!\b G@ (\b" 6\f 6\b\f\v ("\x7F Aj ("E\r Aj\v!@ ! "Aj! ("\r\0 Aj! ("\r\0\v A\x006\0\f\v A~q6 \0Ar6 \0 j \x006\0\f\vA\0!\v \bE\r\0@ ("At"(\xAC\xDA F@ A\xAC\xDAj 6\0 \rA\x80\xD8A\x80\xD8(\0A~ wq6\0\f\v@ \b(F@ \b 6\f\v \b 6\v E\r\v \b6 ("@ 6 6\v ("E\r\0 6 6\v \0Ar6 \0 j \x006\0 \x07G\r\0A\x84\xD8 \x006\0\v \0A\xFFM@ \0A\xF8qA\xA4\xD8j!\x7FA\xFC\xD7(\0"A \0Avt"\0qE@A\xFC\xD7 \0 r6\0 \f\v (\b\v!\0 6\b \0 6\f 6\f \x006\b\vA! \0A\xFF\xFF\xFF\x07M@ \0A& \0A\bvg"kvAq AtrA>s!\v 6 B\x007 AtA\xAC\xDAj!\x7F@\x7FA\x80\xD8(\0"A t"qE@A\x80\xD8 r6\0 6\0A!A\b\f\v \0A AvkA\0 AG\x1Bt! (\0!@ "(Axq \0F\r Av! At! Aqj"("\r\0\v 6A! !A\b\v!\0 "\f\v (\b" 6\f 6\bA!\0A\b!A\0\v! j 6\0 6\f \0 j 6\0A\x9C\xD8A\x9C\xD8(\0Ak"\0A\x7F \0\x1B6\0\v\v\xA0\x7F \0( \0,\0\v" A\0H\x1B" I@ k"@\x7F \0(\b"A\xFF\xFF\xFF\xFF\x07qAkA
- \0,\0\v"A\0H"\x1B" \0( \x1B"kM@ Av\f\v \0 j k \xA4 \0-\0\v\v! \0(\0 \0 \xC0A\0H\x1B" j! !@ @ A\0:\0\0 Ak! Aj!\f\v\v j!@ \0,\0\vA\0H@ \0 6\f\v \0 A\xFF\0q:\0\v\v jA\0:\0\0\v\v@ \0,\0\vA\0H@ \0 6 \0(\0!\0\f\v \0 A\xFF\0q:\0\v\v \0 jA\0:\0\0\v0\x7F@ \0A\xEC\xDEF\r\0 \0 \0("Ak6 \r\0 \0 \0(\0(\b\0\v\v%\0 \0 ("\x006\0 \0A\xEC\xDEG@ \0 \0(Aj6\v\v\x8B\x7F~@ \0)p"PE \0)x \0(" \0(,"k\xAC|"WqE@#\0Ak"$\0A\x7F!@ \0\xC8\r\0 \0 AjA \0( \0AG\r\0 -\0!\v Aj$\0 "A\0N\r \0(! \0(,!\v \0B\x7F7p \0 6h \0 k\xAC|7xA\x7F\v B|! \0(! \0(\b!@ \0)p"P\r\0 }" k\xACY\r\0 \xA7j!\v \0 6h \0 \0(,"\0 k\xAC|7x \0 O@ Ak :\0\0\v \v\xB1\x7F@ \xA5" \0(\b"A\xFF\xFF\xFF\xFF\x07qAkA \0,\0\v"A\0H"\x1B"M@ \0(\0 \0 \x1B!@ \x7F At"@ \xFC
- \0\0\v \0,\0\v Av\v\xC0A\0H@ \0 6\f\v \0 A\xFF\0q:\0\v\v AtjA\x006\0\f\v \0 k \0( \x1B"\0A\0 \0 \xDE\v\v\r\0 \0 y\xE0\v\0 \0\xBC \xBCsAs\v\0 \0\xBD \xBDsAs\v\xE5\x7FA\xE8\xDE-\0\0@A\xE4\xDE(\0\v#\0A k"$\0@@@ A\bj" \0At"j\x7FA \0tA\xFF\xFF\xFF\xFF\x07q"ArE@ (\0\f\v \0A\xAFA\xD7 \x1B\xBB\v"6\0 A\x7FF\r \0Aj"\0AG\r\0\vA\0\xBAE@A\xF8\xFC\0! A\xF8\xFC\0AhE\rA\x90\xFD\0! A\x90\xFD\0AhE\rA\0!\0A\xA8\xDC-\0\0E@@ \0At \0A\xD7\xBB6\xF8\xDB \0Aj"\0AG\r\0\vA\xA8\xDCA:\0\0A\x90\xDCA\xF8\xDB(\x006\0\vA\xF8\xDB! A\bj"\0A\xF8\xDBAhE\rA\x90\xDC! \0A\x90\xDCAhE\rA/"E\r\v )7 )7\b )\b7\0\f\vA\0!\v A j$\0A\xE8\xDEA:\0\0A\xE4\xDE 6\0 \v\xCB
- \x7F ~#\0A\xE0\0k"$\0 B\xFF\xFF\xFF\xFF\xFF\xFF?\x83!
- \x85B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F\x83!\v B\xFF\xFF\xFF\xFF\xFF\xFF?\x83"\fB \x88! B0\x88\xA7A\xFF\xFFq!\x07@@ B0\x88\xA7A\xFF\xFFq" A\xFF\xFFkA\x82\x80~O@ \x07A\xFF\xFFkA\x81\x80~K\r\v P B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83"\rB\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0T \rB\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0Q\x1BE@ B\x80\x80\x80\x80\x80\x80 \x84!\v\f\v P B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83"B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0T B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0Q\x1BE@ B\x80\x80\x80\x80\x80\x80 \x84!\v !\f\v \rB\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x85\x84P@ \x84P@B\x80\x80\x80\x80\x80\x80\xE0\xFF\xFF\0!\vB\0!\f\v \vB\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x84!\vB\0!\f\v B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x85\x84P@ \r\x84B\0!P@B\x80\x80\x80\x80\x80\x80\xE0\xFF\xFF\0!\v\f\v \vB\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x84!\v\f\v \r\x84P@B\0!\f\v \x84P@B\0!\f\v \rB\xFF\xFF\xFF\xFF\xFF\xFF?X@ A\xD0\0j \f \f \fP"\x1ByB\xC0\0B\0 \x1B|\xA7"Ak6A k! )X"\fB \x88! )P!\v B\xFF\xFF\xFF\xFF\xFF\xFF?V\r\0 A@k
-
-
- P"\b\x1ByB\xC0\0B\0 \b\x1B|\xA7"\bAk6 \bkAj! )H!
- )@!\v \x07 j jA\xFF\xFF\0k!@
- B\x86"B \x88B\x80\x80\x80\x80\b\x84" B \x88"~" B\x86"B \x88"
- B\x80\x80\x84"\r~|" T\xAD B1\x88 \x84B\xFF\xFF\xFF\xFF\x83" \fB\xFF\xFF\xFF\xFF\x83"\f~|" T\xAD| \r~| B\x80\x80\xFE\xFF\x83" \f~"
- ~|" T\xAD B\xFF\xFF\xFF\xFF\x83"~|"V\xAD||"V\xAD| \r~" \f~|" T\xADB \x86 B \x88\x84| B \x86|"V\xAD| \r ~"\r
- \f~|"\f ~|" ~|"B \x88 V\xAD \f \rT\xAD \fT\xAD||B \x86\x84|" T\xAD| ~"\f
- ~|"B \x88 \fT\xADB \x86\x84|"
- T\xAD
- B \x86|"
- T\xAD||"
- T\xAD|
- B \x86" ~|" T\xAD|" T\xAD|"
- T\xAD|"B\x80\x80\x80\x80\x80\x80\xC0\0\x83PE@ Aj!\f\v B?\x88 B\x86 B?\x88\x84! B\x86 B?\x88\x84! B\x86! B\x86\x84!\v A\xFF\xFFN@ \vB\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x84!\vB\0!\f\v~ A\0L@A k"\x07A\xFF\0M@ A0j A\xFF\0j"6 A j 6 Aj \x07g \x07g )0 )8\x84B\0R\xAD ) )\x84\x84! )( )\x84! )\0! )\b\f\vB\0!\f\v B\xFF\xFF\xFF\xFF\xFF\xFF?\x83 \xADB0\x86\x84\v \v\x84!\v P B\0Y B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7FQ\x1BE@ \v B|"P\xAD|!\v\f\v B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F\x85\x84PE@ !\f\v \v B\x83|" T\xAD|!\v\v \0 7\0 \0 \v7\b A\xE0\0j$\0\v\0 \0!\vr\x7F#\0Ak"$\0 \x006 \0(\0A\x7FG@ Aj6\f A\fj6\b A\bj!@ \0(\0AF\r\0\v \0(\0E@ \0A6\0 \xF2 \0A\x7F6\0\v\v \0( Aj$\0Ak\v\xB2\x7F#\0Ak"$\0 \0 \0(Aj6 \x006\f@A\xF8\xDE(\0A\xF4\xDE(\0"\0kAu M\x7F@ Aj"\0A\xF8\xDE(\0A\xF4\xDE(\0"kAu"K@#\0A k"\x07$\0@ \0 k"A\xFC\xDE(\0A\xF8\xDE(\0"kAuM@A\xF4\xDE \xB9\f\v A\xF4\xDE(\0kAu j"\0A\x80\x80\x80\x80O@0\0\vA\xFF\xFF\xFF\xFFA\xFC\xDE(\0A\xF4\xDE(\0k"Au" \0 \0 I\x1B A\xFC\xFF\xFF\xFF\x07O\x1B!A\xF8\xDE(\0A\xF4\xDE(\0kAu!A\0! \x07A\fj"\0A\x80\xDF6 \0A\x006\f @A\x80\xDF \xE3!\v \0 6\0 \0 Atj"6\b \0 Atj6\f \0 6 \0 \xCFA\xF4\xDE \0\x96 \0\xD4 \0(\0"@ \0(\f \0( \xE2\v\v \x07A j$\0\f\v \0 I@A\xF8\xDE \0Atj6\0\v\vA\xF4\xDE(\0 \0\v Atj(\0"\0E\r\0 \0 \0("Ak6 \r\0 \0 \0(\0(\b\0\v (\f!\0 A\x006\fA\xF4\xDE(\0 Atj \x006\0 (\f!\0 A\x006\f@ \0E\r\0 \0 \0("Ak6 \r\0 \0 \0(\0(\b\0\v Aj$\0\v\xBC(\v\x7F#\0Ak"
- $\0@@@@@@@@@@ \0A\xF4M@A\xFC\xD7(\0"A \0A\vjA\xF8q \0A\vI\x1B"Av"\0v"Aq@@ A\x7FsAq \0j"At"A\xA4\xD8j"\0 (\xAC\xD8"(\b"F@A\xFC\xD7 A~ wq6\0\f\v \x006\f \0 6\b\v A\bj!\0 Ar6 j" (Ar6\f\v\v A\x84\xD8(\0"\bM\r @@A \0t"A\0 kr \0tqh"At"A\xA4\xD8j" (\xAC\xD8"\0(\b"F@A\xFC\xD7 A~ wq"6\0\f\v 6\f 6\b\v \0 Ar6 \0 j"\x07 k"Ar6 \0 j 6\0 \b@ \bAxqA\xA4\xD8j!A\x90\xD8(\0!\x7F A \bAvt"qE@A\xFC\xD7 r6\0 \f\v (\b\v! 6\b 6\f 6\f 6\b\v \0A\bj!\0A\x90\xD8 \x076\0A\x84\xD8 6\0\f\v\vA\x80\xD8(\0"\vE\r \vhAt(\xAC\xDA"(Axq k! !@@ ("\0E@ ("\0E\r\v \0(Axq k" I"\x1B! \0 \x1B! \0!\f\v\v (! (\f"\0G@ (\b" \x006\f \0 6\b\f
- \v ("\x7F Aj ("E\r Aj\v!@ !\x07 "\0Aj! \0("\r\0 \0Aj! \0("\r\0\v \x07A\x006\0\f \vA\x7F! \0A\xBF\x7FK\r\0 \0A\vj"Axq!A\x80\xD8(\0"\x07E\r\0A!\bA\0 k! \0A\xF4\xFF\xFF\x07M@ A& A\bvg"\0kvAq \0AtkA>j!\b\v@@@ \bAt(\xAC\xDA"E@A\0!\0\f\vA\0!\0 A \bAvkA\0 \bAG\x1Bt!@@ (Axq k" O\r\0 ! "\r\0A\0! !\0\f\v \0 (" AvAqj("F\x1B \0 \x1B!\0 At! \r\0\v\v \0 rE@A\0!A \bt"\0A\0 \0kr \x07q"\0E\r \0hAt(\xAC\xDA!\0\v \0E\r\v@ \0(Axq k" I! \x1B! \0 \x1B! \0("\x7F \0(\v"\0\r\0\v\v E\r\0 A\x84\xD8(\0 kO\r\0 (!\b (\f"\0G@ (\b" \x006\f \0 6\b\f\b\v ("\x7F Aj ("E\r Aj\v!@ ! "\0Aj! \0("\r\0 \0Aj! \0("\r\0\v A\x006\0\f\x07\v A\x84\xD8(\0"M@A\x90\xD8(\0!\0@ k"AO@ \0 j" Ar6 \0 j 6\0 \0 Ar6\f\v \0 Ar6 \0 j" (Ar6A\0!A\0!\vA\x84\xD8 6\0A\x90\xD8 6\0 \0A\bj!\0\f \v A\x88\xD8(\0"I@A\x88\xD8 k"6\0A\x94\xD8A\x94\xD8(\0"\0 j"6\0 Ar6 \0 Ar6 \0A\bj!\0\f \vA\0!\0 A/j"\x7FA\xD4\xDB(\0@A\xDC\xDB(\0\f\vA\xE0\xDBB\x7F7\0A\xD8\xDBB\x80\xA0\x80\x80\x80\x807\0A\xD4\xDB
- A\fjApqA\xD8\xAA\xD5\xAAs6\0A\xE8\xDBA\x006\0A\xB8\xDBA\x006\0A\x80 \v"j"A\0 k"\x07q" M\r\bA\xB4\xDB(\0"@A\xAC\xDB(\0"\b j" \bM Ir\r \v@A\xB8\xDB-\0\0AqE@@@@@A\x94\xD8(\0"@A\xBC\xDB!\0@ \0(\0"\b M@ \b \0(jI\r\v \0(\b"\0\r\0\v\vA\0v"A\x7FF\r !A\xD8\xDB(\0"\0Ak" q@ k jA\0 \0kqj!\v M\rA\xB4\xDB(\0"\0@A\xAC\xDB(\0" j"\x07 M \0 \x07Ir\r\v v"\0 G\r\f\v k \x07q"v" \0(\0 \0(jF\r !\0\v \0A\x7FF\r A0j M@ \0!\f\vA\xDC\xDB(\0" kjA\0 kq"vA\x7FF\r j! \0!\f\v A\x7FG\r\vA\xB8\xDBA\xB8\xDB(\0Ar6\0\v v"A\x7FFA\0v"\0A\x7FFr \0 Mr\r \0 k" A(jM\r\vA\xAC\xDBA\xAC\xDB(\0 j"\x006\0A\xB0\xDB(\0 \0I@A\xB0\xDB \x006\0\v@A\x94\xD8(\0"@A\xBC\xDB!\0@ \0(\0" \0("jF\r \0(\b"\0\r\0\v\f\vA\x8C\xD8(\0"\0A\0 \0 M\x1BE@A\x8C\xD8 6\0\vA\0!\0A\xC0\xDB 6\0A\xBC\xDB 6\0A\x9C\xD8A\x7F6\0A\xA0\xD8A\xD4\xDB(\x006\0A\xC8\xDBA\x006\0@ \0At" A\xA4\xD8j"6\xAC\xD8 6\xB0\xD8 \0Aj"\0A G\r\0\vA\x88\xD8 A(k"\0Ax kA\x07q"k"6\0A\x94\xD8 j"6\0 Ar6 \0 jA(6A\x98\xD8A\xE4\xDB(\x006\0\f\v M Kr\r \0(\fA\bq\r \0 j6A\x94\xD8 Ax kA\x07q"\0j"6\0A\x88\xD8A\x88\xD8(\0 j" \0k"\x006\0 \0Ar6 jA(6A\x98\xD8A\xE4\xDB(\x006\0\f\vA\0!\0\f\vA\0!\0\f\vA\x8C\xD8(\0 K@A\x8C\xD8 6\0\v j!A\xBC\xDB!\0@@ \0(\0"G@ \0(\b"\0\r\f\v\v \0-\0\fA\bqE\r\vA\xBC\xDB!\0@@ \0(\0" M@ \0(j"I\r\v \0(\b!\0\f\v\vA\x88\xD8 A(k"\0Ax kA\x07q"k"\x076\0A\x94\xD8 j"6\0 \x07Ar6 \0 jA(6A\x98\xD8A\xE4\xDB(\x006\0 A' kA\x07qjA/k"\0 \0 AjI\x1B"A\x1B6 A\xC4\xDB)\x007 A\xBC\xDB)\x007\bA\xC4\xDB A\bj6\0A\xC0\xDB 6\0A\xBC\xDB 6\0A\xC8\xDBA\x006\0 Aj!\0@ \0A\x076 \0A\bj \0Aj!\0 I\r\0\v F\r\0 (A~q6 k"Ar6 6\0\x7F A\xFFM@ A\xF8qA\xA4\xD8j!\0\x7FA\xFC\xD7(\0"A Avt"qE@A\xFC\xD7 r6\0 \0\f\v \0(\b\v! \0 6\b 6\fA\f!A\b\f\vA!\0 A\xFF\xFF\xFF\x07M@ A& A\bvg"\0kvAq \0AtrA>s!\0\v \x006 B\x007 \0AtA\xAC\xDAj!@@A\x80\xD8(\0"A \0t"qE@A\x80\xD8 r6\0 6\0\f\v A \0AvkA\0 \0AG\x1Bt!\0 (\0!@ "(Axq F\r \0Av! \0At!\0 Aqj"("\r\0\v 6\v 6A\b! "!\0A\f\f\v (\b"\0 6\f 6\b \x006\bA\0!\0A!A\f\v j 6\0 j \x006\0\vA\x88\xD8(\0"\0 M\r\0A\x88\xD8 \0 k"6\0A\x94\xD8A\x94\xD8(\0"\0 j"6\0 Ar6 \0 Ar6 \0A\bj!\0\f\vA\xF8\xD7A06\0A\0!\0\f\v \0 6\0 \0 \0( j6 Ax kA\x07qj"\b Ar6 Ax kA\x07qj" \bj"k!\x07@A\x94\xD8(\0 F@A\x94\xD8 6\0A\x88\xD8A\x88\xD8(\0 \x07j"\x006\0 \0Ar6\f\vA\x90\xD8(\0 F@A\x90\xD8 6\0A\x84\xD8A\x84\xD8(\0 \x07j"\x006\0 \0Ar6 \0 j \x006\0\f\v ("\0AqAF@ \0Axq! (\f!@ \0A\xFFM@ (\b" F@A\xFC\xD7A\xFC\xD7(\0A~ \0Avwq6\0\f\v 6\f 6\b\f\v (!@ G@ (\b"\0 6\f \x006\b\f\v@ ("\0\x7F Aj ("\0E\r Aj\v!@ ! \0"Aj! \0("\0\r\0 Aj! ("\0\r\0\v A\x006\0\f\vA\0!\v E\r\0@ ("\0At"(\xAC\xDA F@ A\xAC\xDAj 6\0 \rA\x80\xD8A\x80\xD8(\0A~ \0wq6\0\f\v@ (F@ 6\f\v 6\v E\r\v 6 ("\0@ \x006 \0 6\v ("\0E\r\0 \x006 \0 6\v \x07 j!\x07 j"(!\0\v \0A~q6 \x07Ar6 \x07j \x076\0 \x07A\xFFM@ \x07A\xF8qA\xA4\xD8j!\0\x7FA\xFC\xD7(\0"A \x07Avt"qE@A\xFC\xD7 r6\0 \0\f\v \0(\b\v! \0 6\b 6\f \x006\f 6\b\f\vA! \x07A\xFF\xFF\xFF\x07M@ \x07A& \x07A\bvg"\0kvAq \0AtrA>s!\v 6 B\x007 AtA\xAC\xDAj!\0@@A\x80\xD8(\0"A t"qE@A\x80\xD8 r6\0 \0 6\0\f\v \x07A AvkA\0 AG\x1Bt! \0(\0!@ "\0(Axq \x07F\r Av! At! \0 Aqj"("\r\0\v 6\v \x006 6\f 6\b\f\v \0(\b" 6\f \0 6\b A\x006 \x006\f 6\b\v \bA\bj!\0\f\v@ \bE\r\0@ ("At"(\xAC\xDA F@ A\xAC\xDAj \x006\0 \0\rA\x80\xD8 \x07A~ wq"\x076\0\f\v@ \b(F@ \b \x006\f\v \b \x006\v \0E\r\v \0 \b6 ("@ \0 6 \x006\v ("E\r\0 \0 6 \x006\v@ AM@ j"\0Ar6 \0 j"\0 \0(Ar6\f\v Ar6 j" Ar6 j 6\0 A\xFFM@ A\xF8qA\xA4\xD8j!\0\x7FA\xFC\xD7(\0"A Avt"qE@A\xFC\xD7 r6\0 \0\f\v \0(\b\v! \0 6\b 6\f \x006\f 6\b\f\vA!\0 A\xFF\xFF\xFF\x07M@ A& A\bvg"\0kvAq \0AtrA>s!\0\v \x006 B\x007 \0AtA\xAC\xDAj!@@ \x07A \0t"qE@A\x80\xD8 \x07r6\0 6\0 6\f\v A \0AvkA\0 \0AG\x1Bt!\0 (\0!@ "(Axq F\r \0Av! \0At!\0 Aqj"\x07("\r\0\v \x07 6 6\v 6\f 6\b\f\v (\b"\0 6\f 6\b A\x006 6\f \x006\b\v A\bj!\0\f\v@ E\r\0@ ("At"(\xAC\xDA F@ A\xAC\xDAj \x006\0 \0\rA\x80\xD8 \vA~ wq6\0\f\v@ (F@ \x006\f\v \x006\v \0E\r\v \0 6 ("@ \0 6 \x006\v ("E\r\0 \0 6 \x006\v@ AM@ j"\0Ar6 \0 j"\0 \0(Ar6\f\v Ar6 j" Ar6 j 6\0 \b@ \bAxqA\xA4\xD8j!\0A\x90\xD8(\0!\x7FA \bAvt"\x07 qE@A\xFC\xD7 \x07r6\0 \0\f\v \0(\b\v! \0 6\b 6\f \x006\f 6\b\vA\x90\xD8 6\0A\x84\xD8 6\0\v A\bj!\0\v
- Aj$\0 \0\v\0\x9C\0\v;\x7F#\0Ak"$\0 \x006\f (\f"\0(\0"@ \0 6 \0(\b !\v Aj$\0\vu~ \0 ~ ~| B \x88" B \x88"~| B\xFF\xFF\xFF\xFF\x83" B\xFF\xFF\xFF\xFF\x83"~"B \x88 ~|"B \x88| ~ B\xFF\xFF\xFF\xFF\x83|"B \x88|7\b \0 B\xFF\xFF\xFF\xFF\x83 B \x86\x847\0\v\xC1\x7F \0-\0\0A qE@@ \0("\x7F \0\xC9\r \0(\v \0("k I@ \0 \0($\0\f\v@@ E \0(PA\0Hr\r\0 !@ j"Ak-\0\0A
- G@ Ak"\r\f\v\v \0 \0($\0 I\r k! \0(!\f\v !\v Y \0 \0( j6\v\v\v\x7FA9" \0(\x006\0 \v\xC0\x7F@ kAH\r\0 \0( \0,\0\v" A\0H\x1BE\r\0 \x8F \0(\0 \0 \0,\0\v"A\0H"\x1B" \0( \x1Bj! Ak!\0@@@ -\0\0"Ak! \0 M\r\0 A\xFFqA\xFD\0M@ (\0 G\r\v Aj! kAJj!\f\v\v A\xFFqA\xFD\0K\r \0(\0Ak I\r\v A6\0\v\vP~@ A\xC0\0q@ A@j\xAD\x86!B\0!\f\v E\r\0 \xAD"\x86 A\xC0\0 k\xAD\x88\x84! \x86!\v \0 7\0 \0 7\b\vi\x7F#\0A\x80k"$\0 A\x80\xC0q LrE@ k"A\x80 A\x80I"\x1B\xC6 E@@ \0 A\x803 A\x80k"A\xFFK\r\0\v\v \0 3\v A\x80j$\0\v\0A\0\v<\x7FA \0 \0AM\x1B!@@ /"\0\r\0A\xB4\xEC(\0"E\r\0 \r\0\f\v\v \0E@0\0\v \0\v \0 \0(\0C\v
- \0 \0(\0A\xC0\v\xCD \x7F~#\0A\xF0\0k"$\0 B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83! @@ P" B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83"
- B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0}B\x80\x80\x80\x80\x80\x80\xC0\x80\x80\x7FT
- P\x1BE@ B\0R B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0}"\vB\x80\x80\x80\x80\x80\x80\xC0\x80\x80\x7FV \vB\x80\x80\x80\x80\x80\x80\xC0\x80\x80\x7FQ\x1B\r\v
- B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0T
- B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0Q\x1BE@ B\x80\x80\x80\x80\x80\x80 \x84! !\f\v P B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0T B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0Q\x1BE@ B\x80\x80\x80\x80\x80\x80 \x84!\f\v
- B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x85\x84P@B\x80\x80\x80\x80\x80\x80\xE0\xFF\xFF\0 \x85 \x85B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F\x85\x84P"\x1B!B\0 \x1B!\f\v B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x85\x84P\r
- \x84P@ \x84B\0R\r \x83! \x83!\f\v \x84PE\r\0 ! !\f\v T
- V
- Q\x1B"\b\x1B!
- \b\x1B"\fB\xFF\xFF\xFF\xFF\xFF\xFF?\x83! \b\x1B"\vB0\x88\xA7A\xFF\xFFq!\x07 \fB0\x88\xA7A\xFF\xFFq"E@ A\xE0\0j
-
- P"\x1ByB\xC0\0B\0 \x1B|\xA7"Ak6 )h! )\`!
- A k!\v \b\x1B! \vB\xFF\xFF\xFF\xFF\xFF\xFF?\x83! \x07~ A\xD0\0j P"\x07\x1ByB\xC0\0B\0 \x07\x1B|\xA7"\x07Ak6A \x07k!\x07 )P! )X\vB\x86 B=\x88\x84B\x80\x80\x80\x80\x80\x80\x80\x84! B\x86
- B=\x88\x84 \x85!~ B\x86" \x07F\r\0 \x07k"\x07A\xFF\0K@B\0!B\f\v A@k A\x80 \x07k6 A0j \x07g )8! )0 )@ )H\x84B\0R\xAD\x84\v! B\x80\x80\x80\x80\x80\x80\x80\x84!\v
- B\x86!
- @ B\0S@B\0!B\0!
- \x85 \v\x85\x84P\r
- }! \v }
- V\xAD}"B\xFF\xFF\xFF\xFF\xFF\xFF\xFFV\r A j P"\x07\x1ByB\xC0\0B\0 \x07\x1B\x84\xA7A\fk"\x076 \x07k! )(! ) !\f\v
- |" T\xAD \v||"B\x80\x80\x80\x80\x80\x80\x80\b\x83P\r\0 B\x83 B?\x86 B\x88\x84\x84! Aj! B\x88!\v \fB\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F\x83! A\xFF\xFFN@ B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x84!B\0!\f\vA\0!\x07@ A\0J@ !\x07\f\v Aj A\xFF\0j6 A kg )\0 ) )\x84B\0R\xAD\x84! )\b!\v B=\x86 B\x88\x84! B\x88B\xFF\xFF\xFF\xFF\xFF\xFF?\x83 \x07\xADB0\x86\x84 \x84!@@ \xA7A\x07q"AG@ AK\xAD|"V\xAD|!\f\v B\x83|"V\xAD|!\f\v E\r\v\v \0 7\0 \0 7\b A\xF0\0j$\0\v
- \0 \0A\x9C\xE0^\v
- \0 \0A\xA4\xE0^\v\x84\x7F~#\0Ak"$\0 \0~ E@B\0\f\v Au"s k"\xADB\0 g"A\xD1\0j6 )\bB\x80\x80\x80\x80\x80\x80\xC0\0\x85A\x9E\x80 k\xADB0\x86|B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7FB\0 A\0H\x1B\x84! )\0\v7\0 \0 7\b Aj$\0\v1\x7F \0(\f" \0(F@ \0 \0(\0((\0\0\v -\0\0 \0 Aj6\f\v'\x7F \0(\f" \0(F@ \0 \0(\0($\0\0\v -\0\0\v1\x7F \0(\f" \0(F@ \0 \0(\0((\0\0\v (\0 \0 Aj6\f\v'\x7F \0(\f" \0(F@ \0 \0(\0($\0\0\v (\0\v\xAA\f\b\x7F\x7FA\0 E\r\0 \0A\x7Fs! AO@@ AqE\r\0 -\0\0 sA\xFFqAt(\xE03 A\bvs! Ak"\0E Aj"AqErE@ -\0 sA\xFFqAt(\xE03 A\bvs! Ak"\0E Aj"AqErE@ -\0 sA\xFFqAt(\xE03 A\bvs! Ak"\0E Aj"AqErE@ -\0 sA\xFFqAt(\xE03 A\bvs! Aj! Ak!\f\v \0! !\f\v \0! !\f\v \0! !\v An"\bAll!
- @ \bAk" E@A\0!\f\v !\0A\0!@ \0( \x07s"\x07AvA\xFC\x07q(\xE0S \x07AvA\xFC\x07q(\xE0K \x07AvA\xFC\x07q(\xE0C \x07A\xFFqAt(\xE0;sss!\x07 \0(\f s"AvA\xFC\x07q(\xE0S AvA\xFC\x07q(\xE0K AvA\xFC\x07q(\xE0C A\xFFqAt(\xE0;sss! \0(\b s"AvA\xFC\x07q(\xE0S AvA\xFC\x07q(\xE0K AvA\xFC\x07q(\xE0C A\xFFqAt(\xE0;sss! \0( s"AvA\xFC\x07q(\xE0S AvA\xFC\x07q(\xE0K AvA\xFC\x07q(\xE0C A\xFFqAt(\xE0;sss! \0(\0 s"AvA\xFC\x07q(\xE0S AvA\xFC\x07q(\xE0K AvA\xFC\x07q(\xE0C A\xFFqAt(\xE0;sss! \0Aj!\0 Ak" \r\0\v \bAljAk!\v
- j! ( (\f (\b ( (\0 s"\0A\bv \0A\xFFqAt(\xE03s"\0A\bv \0A\xFFqAt(\xE03s"\0A\bv \0A\xFFqAt(\xE03s"\0A\xFFqAt(\xE03 ss \0A\bvs"\0A\bv \0A\xFFqAt(\xE03s"\0A\bv \0A\xFFqAt(\xE03s"\0A\bv \0A\xFFqAt(\xE03s"\0A\xFFqAt(\xE03 ss \0A\bvs"\0A\bv \0A\xFFqAt(\xE03s"\0A\bv \0A\xFFqAt(\xE03s"\0A\bv \0A\xFFqAt(\xE03s"\0A\xFFqAt(\xE03 ss \0A\bvs"\0A\bv \0A\xFFqAt(\xE03s"\0A\bv \0A\xFFqAt(\xE03s"\0A\bv \0A\xFFqAt(\xE03s"\0A\xFFqAt(\xE03 \x07ss \0A\bvs"\0A\bv \0A\xFFqAt(\xE03s"\0A\bv \0A\xFFqAt(\xE03s"\0A\bv \0A\xFFqAt(\xE03s"\0A\bv \0A\xFFqAt(\xE03s! Aj!\v A\x07K@@ -\0\0 sA\xFFqAt(\xE03 A\bvs"\0A\bv -\0 \0sA\xFFqAt(\xE03s"\0A\bv -\0 \0sA\xFFqAt(\xE03s"\0A\bv -\0 \0sA\xFFqAt(\xE03s"\0A\bv -\0 \0sA\xFFqAt(\xE03s"\0A\bv -\0 \0sA\xFFqAt(\xE03s"\0A\bv -\0 \0sA\xFFqAt(\xE03s"\0A\bv -\0\x07 \0sA\xFFqAt(\xE03s! A\bj! A\bk"A\x07K\r\0\v\v@ E\r\0 -\0\0 sA\xFFqAt(\xE03 A\bvs! AF\r\0 -\0 sA\xFFqAt(\xE03 A\bvs! AF\r\0 -\0 sA\xFFqAt(\xE03 A\bvs! AF\r\0 -\0 sA\xFFqAt(\xE03 A\bvs! AF\r\0 -\0 sA\xFFqAt(\xE03 A\bvs! AF\r\0 -\0 sA\xFFqAt(\xE03 A\bvs! AF\r\0 -\0 sA\xFFqAt(\xE03 A\bvs!\v A\x7Fs\v\v\x97\x7F#\0A@j"$\0 \0 \0(\0"A\bk(\0"j!@ Ak(\0"( (F@A\0 \x1B!\0\f\v \0 N@ B\x007 A\x006 6\f \x006\b 6 B\x007 B\x007$ B\x007, A\x006< B\x81\x80\x80\x80\x80\x80\x80\x8074 Aj AA\0 (\0(\v\0 (\r\v B\x007 A\x006 A\x98\xC46\f \x006\b 6 B\x007 B\x007$ B\x007, B\x007\x003 A\x006< A:\0; Aj AA\0 (\0(
- \0A\0!\0@@ ((\0\v (A\0 ($AF\x1BA\0 ( AF\x1BA\0 (,AF\x1B!\0\f\v (AG@ (,\r ( AG\r ($AG\r\v (!\0\v A@k$\0 \0\v\0 \0A\x006\b \0B\x007\0\vc\0 (A\xB0q"A F@ \v@ AG\r\0@@ \0-\0\0"A+k\0\0\v \0Aj\v A0G \0kAHr\r\0 \0-\0A rA\xF8\0G\r\0 \0Aj!\0\v \0\v1\x7FA\xCC\xCF(\0! \0@A\xCC\xCFA\xD4\xCE \0 \0A\x7FF\x1B6\0\vA\x7F A\xD4\xCEF\x1B\v\0 \0(\0"\0@ \0H\v\vA\x7F \0 7p \0 \0(, \0("k\xAC7x \0 P \0(\b"\0 k\xACYr\x7F \0 \xA7j\v6h\vs\x7F \0A\x90\xFC\x006\0 \0(@ \0((!@ @A\0 \0 Ak"At" \0($j(\0 \0( j(\0\x07\0\f\v\v \0Aj\xF3 \0( ! \0($! \0(0! \0(<!\v \0\v\xEC\x7F \0E@A\xC8\xCC(\0@A\xC8\xCC(\0L!\vA\xF8\xCD(\0@A\xF8\xCD(\0L r!\vA\xB0\xCE(\0"\0@@ \0(L \0( \0(G@ \0L r!\v \0(8"\0\r\0\v\v \v \0(LA\0H!@@ \0( \0(F\r\0 \0A\0A\0 \0($\0 \0(\r\0A\x7F!\f\v \0(" \0(\b"G@ \0 k\xACA \0((\0\vA\0! \0A\x006 \0B\x007 \0B\x007 \r\0\v \v-\0 E@ \0( (F\v \0 F@A\v \0( (\x9BE\v\xDB\x7F#\0Ak"$\0 6\fA\0!@ \x7FA \0 A\fj(\r\0A A\xC0\0 \0:" (\0(\f\0E\r\0 A\0 (\0(4\0!@@ \0Q A0k! \0 A\fj( AHr\r\0 A\xC0\0 \0:" (\0(\f\0E\r Ak! A\0 (\0(4\0 A
- lj!\f\v\v \0 A\fj(E\rA\v (\0r6\0\v Aj$\0 \v\xF6\x7F#\0Ak"$\0 6\f@@ \0 A\fj)@A\0!A!\f\vA\0!A! \0;"\x07A\0H\r\0 (\b \x07Atj-\0\0A\xC0\0qE\r\0 \x07A\0 (\0($\0!@@ \0S A0k! \0 A\fj) AHr\r\0 \0;"A\0H\r (\b Atj-\0\0A\xC0\0qE\r Ak! A\0 (\0($\0 A
- lj!\f\v\v \0 A\fj)E\rA!\v (\0 r6\0\v Aj$\0 \v\x90\x7F#\0Ak"$\0 6\f H6\b (\f!#\0Ak"$\0 6\f 6\bA\x7F!@A\0A\0 \x9A"A\0H\r\0 \0 Aj"/"\x006\0 \0E\r\0 \0 (\f\x9A!\v Aj$\0 A\bjI Aj$\0 \v\f\0 \0(\0B \0\v.\0@ \0(A\xCA\0q"\0@ \0A\xC0\0F@A\b\v \0A\bG\rA\vA\0\vA
- \v\f\0 \0(\0@ \0\v\xCE~\x7F#\0Ak"$\0 \xBD"B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x07\x83! \0~ B4\x88B\xFF\x83"PE@ B\xFFR@ B\x88! B\x80\xF8\0|! B<\x86\f\v B\x88!B\xFF\xFF! B<\x86\f\v P@B\0!B\0\f\v B\0 y\xA7"\x07A1j6 )\bB\x80\x80\x80\x80\x80\x80\xC0\0\x85!A\x8C\xF8\0 \x07k\xAD! )\0\v7\0 \0 B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F\x83 B0\x86\x84 \x847\b Aj$\0\v\0 \0A\x80\x80\x80\x80O@A\xBFA\0\xDC\0\v \0At9\v\x85\x7F#\0Ak"\b$\0 \b 6\b \b 6\f \bAj" $ =! \b(# A\x006\0A\0!@@ \x07F r\r@ \bA\fj \bA\bj(\r\0@ (\0A\0 (\0(4\0A%F@ Aj \x07F\rA\0!\x7F@ (A\0 (\0(4\0"A\xC5\0F\r\0A!
- A\xFFqA0F\r\0 \f\v A\bj \x07F\rA\b!
- ! (\bA\0 (\0(4\0\v! \b \0 \b(\f \b(\b \0(\0($\f\x006\f
- jAj!\f\v A (\0 (\0(\f\0@@ \x07 Aj"G@ A (\0 (\0(\f\0\r\v\v@ \bA\fj \bA\bj(\r A \b(\fC (\0(\f\0E\r \b(\fB\f\0\v\0\v \b(\fC (\0(\0 (\0 (\0(\0F@ \b(\fB Aj!\f\v A6\0\v (\0!\f\v\v A6\0\v \bA\fj \bA\bj(@ (\0Ar6\0\v \b(\f \bAj$\0\v\xB1\x7F#\0Ak"\b$\0 \b 6\b \b 6\f \bAj" $ >! \b(# A\x006\0A\0!@@ \x07F r\r@ \bA\fj \bA\bj)\r\0@ ,\0\0A\0 (\0($\0A%F@ Aj \x07F\rA\0!\x7F@ ,\0A\0 (\0($\0"A\xC5\0F\r\0A!
- A\xFFqA0F\r\0 \f\v Aj \x07F\rA!
- ! ,\0A\0 (\0($\0\v! \b \0 \b(\f \b(\b \0(\0($\f\x006\f
- jAj!\f\v@ ,\0\0"A\0H\r\0 (\b" Atj-\0\0AqE\r\0@@ \x07 Aj"F@ \x07!\f\v ,\0\0"A\0H\r\0 Atj-\0\0Aq\r\v\v@ \bA\fj \bA\bj)\r \b(\fA"A\x80q\r (\b A\xFF\0qAtj-\0\0AqE\r \b(\f@\f\0\v\0\v \b(\fA\xC0 (\0(\f\0 ,\0\0 (\0(\f\0F@ \b(\f@ Aj!\f\v A6\0\v (\0!\f\v\v A6\0\v \bA\fj \bA\bj)@ (\0Ar6\0\v \b(\f \bAj$\0\v<\0 \0,\0\vA\0H@ \0(\b \0(\0!\v \0 (\b6\b \0 )\x007\0 A\0:\0\v A\0:\0\0\v\0 @ \0 \xFC
- \0\0\v \0\v\xC3\x7F#\0Ak"\x07$\0@ \0E\r\0 (\f! k"A\0J@ \0 \0(\0(0\0 G\r\v k" H@ \x07Aj" k" \xE1 \0 \x07( \x07,\0A\0H\x1B \0(\0(0\0! G\r\v k"A\0J@ \0 \0(\0(0\0 G\r\v A\x006\f \0!\b\v \x07Aj$\0 \b\v\f\0 \0A\x82\x86\x80 6\0\0\v\xCC\x7F#\0Ak"\x07$\0@ \0E\r\0 (\f! kAu"A\0J@ \0 \0(\0(0\0 G\r\v kAu" H@ \x07Aj" k" \xDF \0 \x07( \x07,\0A\0H\x1B \0(\0(0\0! G\r\v kAu"A\0J@ \0 \0(\0(0\0 G\r\v A\x006\f \0!\b\v \x07Aj$\0 \b\v9\x7F#\0Ak"$\0 6\f H6\b \0A (\f\x9A A\bjI Aj$\0\vK\x7F \0(\0!\0 -" \0(\f \0(\b"kAuI\x7F Atj(\0A\0GA\0\vE@0\0\v \0(\b Atj(\0\v\0 \0A F \0A kAIr\v\xD7\x7F@A\x84\xCC(\0"\0A\0N@ \0E\rA\x84\xCF(\0 \0A\xFF\xFF\xFF\xFFqG\r\v@A\x88\xCC(\0A
- F\r\0A\xCC\xCB(\0"\0A\xC8\xCB(\0F\r\0A\xCC\xCB \0Aj6\0 \0A
- :\0\0\vA\xB8\xCB\x9F\vA\x84\xCCA\x84\xCC(\0"\0A\xFF\xFF\xFF\xFF \0\x1B6\0@@A\x88\xCC(\0A
- F\r\0A\xCC\xCB(\0"\0A\xC8\xCB(\0F\r\0A\xCC\xCB \0Aj6\0 \0A
- :\0\0\f\vA\xB8\xCB\x9F\vA\x84\xCC(\0A\x84\xCCA\x006\0\v+\x7F#\0Ak"$\0 6\fA\xB8\xCB \0 A\0A\0\xD0 Aj$\0\v^\x7F \0A\x006\b \0B\x007\0 (\0! (" k"Au"@ \0 \xA8 \0(! E FrE@ \xFC
- \0\0\v \0 j6\v \0\v?\x7F@ \0 F\r\0@ \0 Ak"O\r \0-\0\0! \0 -\0\0:\0\0 :\0\0 \0Aj!\0\f\0\v\0\v\v\xDB\x7F~A!@ \0B\0R B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83"B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0V B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0Q\x1B\r\0 B\0R B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83"B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0V B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0Q\x1B\r\0 \0 \x84 \x84\x84P@A\0\v \x83B\0Y@ \0 T S Q\x1B@A\x7F\v \0 \x85 \x85\x84B\0R\v \0 V U Q\x1B@A\x7F\v \0 \x85 \x85\x84B\0R!\v \v'\x7F#\0Ak"$\0 6\f \0A\xE4\0 \x9A Aj$\0\v\xD7\x7F#\0Ak"$\0 \0A\x006#\0Ak"$\0 A\0:\0@ \0 \0(\0"A\fk(\0j"(E@ \0 (H"\x7F \xC4 \0(\0 \vA\fk(\0j(E:\0\f\v A\x99\v Aj$\0A! -\0AF@ \0 \0 \0(\0A\fk(\0j(" (\0( \0"6AA\0 G\x1B!\v \0 \0(\0A\fk(\0j \x99 Aj$\0\vP~@ A\xC0\0q@ A@j\xAD\x88!B\0!\f\v E\r\0 A\xC0\0 k\xAD\x86 \xAD"\x88\x84! \x88!\v \0 7\0 \0 7\b\vC\x7F@ E\r\0@ \0-\0\0" -\0\0"F@ Aj! \0Aj!\0 Ak"\r\f\v\v k!\v \v \0A\x97\xD6\0\v\x88\x7F@ \xA5"A\xF7\xFF\xFF\xFFI@@@ AO@ Ar"AjU! \0 A\xFF\xFF\xFF\xFF\x07k6\b \0 6\0 \0 6 !\0\f\v \0 :\0\v E\r\v At"E\r\0 \0 \xFC
- \0\0\v \0 AtjA\x006\0\f\v0\0\v\v\xBB\x7F (\0!\x07A\0 \0(\0" \0(A\xE3\0F"\x1BA\x7FA (\0" k"At F\x1B A\xFF\xFF\xFF\xFF\x07O\x1B"\b\x9D"@@ E@ \0 6\0\f\v \0(\0! @ \xFC
- \0\0\v \0 6\0 E\r\0 \0(\0 \0(\0!\v \0A\xE4\x006 \x07 kj6\0 \0(\0 \bA|qj6\0\v0\0\vA\x7F#\0Ak"$\0 6\fA\xB0 A\xFC A\xDD,A A\fj"4A\xFC A\xE1,A 4 Aj$\0 \0\v\xFA\x7F#\0Ak"
- $\0
- \x006\f@@@ (\0"\v G\r\0 (\` \0F\x7FA+ \0 (dG\rA-\v!\0 \vAj6\0 \v \0:\0\0\f\v@ \0 G\r\0 ( ,\0\v"\0 \0A\0H\x1BE\r\0A\0!\0 \b(\0" \x07kA\x9FJ\r (\0!\0 \b Aj6\0 \x006\0\f\vA\x7F!\0 A\xE8\0j
- A\fj\xB1 kAu"AJ\r@@@ A\bk\0\0\v J\r\f\v AG AHr\r\0 (\0" F kAJr\r Ak-\0\0A0G\rA\0!\0 A\x006\0 Aj6\0 -\0\xD0\x85:\0\0\f\v (\0"\0Aj6\0 \0 A\xD0\x85j-\0\0:\0\0 (\0Aj6\0A\0!\0\f\vA\0!\0 A\x006\0\v
- Aj$\0 \0\v
- \0 \0A\xE4\xE0^\v\xFC\x7F#\0Ak"
- $\0
- \0:\0@@@ (\0"\v G\r\0 \0A\xFFq"\f -\0F\x7FA+ \f -\0G\rA-\v!\0 \vAj6\0 \v \0:\0\0\f\v@ \0 G\r\0 ( ,\0\v"\0 \0A\0H\x1BE\r\0A\0!\0 \b(\0" \x07kA\x9FJ\r (\0!\0 \b Aj6\0 \x006\0\f\vA\x7F!\0 Aj
- Aj\xB4 k"AJ\r@@@ A\bk\0\0\v J\r\f\v AG AHr\r\0 (\0" F kAJr\r Ak-\0\0A0G\rA\0!\0 A\x006\0 Aj6\0 -\0\xD0\x85:\0\0\f\v (\0"\0Aj6\0 \0 A\xD0\x85j-\0\0:\0\0 (\0Aj6\0A\0!\0\f\vA\0!\0 A\x006\0\v
- Aj$\0 \0\v
- \0 \0A\xDC\xE0^\v\0 \0\vf\x7F~#\0Ak"$\0 \0~ E@B\0\f\v \xADB\0A\xF0\0 g"Ask6 )\bB\x80\x80\x80\x80\x80\x80\xC0\0\x85A\x9E\x80 k\xADB0\x86|! )\0\v7\0 \0 7\b Aj$\0\v\0 \0A\xDF\0q \0 \0A\xE1\0kAI\x1B\v<\0 \0A\x006\b \0B\x007\0 \0 (\x006\0 \0 (6 \0 (\b6\b A\x006\b B\x007\0\v,\x7F \0A\x006\b \0B\x007\0 \0 (\0" (" k\xC2 \0\vW\x7F~@A\xCC\xCC(\0"\xAD \0\xADB\x07|B\xF8\xFF\xFF\xFF\x83|"B\xFF\xFF\xFF\xFFX@ \xA7"\0?\0AtM\r \0\r\vA\xF8\xD7A06\0A\x7F\vA\xCC\xCC \x006\0 \v\xA7\x7F \0( \0(\0"kAu" I@#\0A k"$\0@ k" \0(\b \0("kAuM@ \0 \xB9\f\v A\fj \0 \0(\0kAu j\x86 \0( \0(\0kAu \0\xB8" \xCF \0 \x96 \xB5\v A j$\0\v I@ \0 Atj6\v\vt\x7F~ \0B\x80\x80\x80\x80Z@@ Ak" \0" \0B
- \x80"\0B
- ~}\xA7A0r:\0\0 B\xFF\xFF\xFF\xFF\x9FV\r\0\v\v \0PE@ \0\xA7!@ Ak" A
- n"A
- lkA0r:\0\0 A K !\r\0\v\v \v}\x7F@@ \0"AqE\r\0 -\0\0E@A\0\v@ Aj"AqE\r -\0\0\r\0\v\f\v@ "Aj!A\x80\x82\x84\b (\0"k rA\x80\x81\x82\x84xqA\x80\x81\x82\x84xF\r\0\v@ "Aj! -\0\0\r\0\v\v \0k\v\xBF\x7F \0( \0(\0"k" I@#\0A k"$\0@ k" \0(\b \0("kM@ \0 \x96\f\v A\fj \0 j \0(\0k\x83 \0( \0(\0k \0\x8C"(\b"j!@ G@ A\0:\0\0 Aj!\f\v\v 6\b \0 \xA9 \x87\v A j$\0\v I@ \0 j6\v\v\v\0 6\0A\v<\0 \0,\0\vA\0H@ \0(\b \0(\0!\v \0 (\b6\b \0 )\x007\0 A\0:\0\v A\x006\0\vK\x7F#\0Ak"$\0 A\fj" $ n" (\0(\0\x006\0 \0 (\0(\0 (\f# Aj$\0\vD\x7F#\0Ak"$\0 A\fj" \0$ ="\0A\xD0\x85A\xEA\x85 \0(\0(0\0 (\f# Aj$\0 \vK\x7F#\0Ak"$\0 A\fj" $ p" (\0(\0\0:\0\0 \0 (\0(\0 (\f# Aj$\0\v\x7F\x7F@ y"A\xF7\xFF\xFF\xFF\x07I@@@ A\vO@ A\x07r"Aj9! \0 A\xFF\xFF\xFF\xFF\x07k6\b \0 6\0 \0 6 !\0\f\v \0 :\0\v E\r\v E\r\0 \0 \xFC
- \0\0\v \0 jA\0:\0\0\f\vi\0\v\vF\x7F \0A\x80\xFA\0(\0"6\0 \0 A\fk(\0jA\xA0\xFA\0(\x006\0 \0A\xA4\xFA\0(\x006\b \0A\fj\xB0 \0A@kK \0\v\xB5\x07\x7F\x7F \0A\xFF\xFFq! \0Av! AF@ -\0\0j"\0A\xF1\xFFk \0 \0A\xF0\xFFK\x1B"\0 j"At"A\x80\x80<j A\xF0\xFFK\x1B \0r\f\v \x7F@@@@ AO@@ A\xAF+K@@A\xDB! !\0@ \0-\0\0j" j \0-\0j"j \0-\0j"j \0-\0j"j \0-\0j"j \0-\0j"j \0-\0j"j \0-\0\x07j"j \0-\0\bj"j \0-\0 j"j \0-\0
- j"j \0-\0\vj"j \0-\0\fj"j \0-\0\rj"j \0-\0j"j \0-\0j"j! \0Aj!\0 Ak"\r\0\v A\xF1\xFFp! A\xF1\xFFp! A\xB0+j! A\xB0+k"A\xAF+K\r\0\v E\r AI\r\v@ -\0\0j"\0 j \0 -\0j"\0j \0 -\0j"\0j \0 -\0j"\0j \0 -\0j"\0j \0 -\0j"\0j \0 -\0j"\0j \0 -\0\x07j"\0j \0 -\0\bj"\0j \0 -\0 j"\0j \0 -\0
- j"\0j \0 -\0\vj"\0j \0 -\0\fj"\0j \0 -\0\rj"\0j \0 -\0j"\0j \0 -\0j"j! Aj! Ak"AK\r\0\v E\r\v Aq"\x07\r !\0\f\v@ E\r\0@ Aq"\x07E@ !\0\f\v !\0@ "Aj! \0Ak!\0 -\0\0j" j! Aj" \x07G\r\0\v\v AI\r\0@ -\0\0j" -\0j" -\0j" -\0j" jjjj! Aj! \0Ak"\0\r\0\v\v A\xF1\xFFpAt A\xF1\xFFk A\xF0\xFFK\x1Br\f\vA\0! !\0@ "Aj! \0Ak!\0 -\0\0j" j! Aj" \x07G\r\0\v\v AI\r\0@ -\0\0j" -\0j" -\0j" -\0j" jjjj! Aj! \0Ak"\0\r\0\v\v A\xF1\xFFp! A\xF1\xFFp!\v At rA\v\v\v:\x7F A\0H@\x85\0\vA\xFF\xFF\xFF\xFF\x07 \0(\b \0(\0k"\0At" I\x1B \0A\xFF\xFF\xFF\xFFO\x1B\v\0 \0("\0A O@ \0\v\v \0A\x9F\f\xD6\0\v>\x7F A\x80\x80\x80\x80O@\x85\0\vA\xFF\xFF\xFF\xFF \0(\b \0(\0k"\0Au" I\x1B \0A\xFC\xFF\xFF\xFF\x07O\x1B\v?\x7F \0(! \0(\b!@ G@ \0 Ak"6\b\f\v\v \0(\0"@ \0(\f !\v\vI\x7F \0("A\bu! \0(\0"\0 Aq\x7F (\0 j(\0 \v j A Aq\x1B \0(\0(
- \0\v\xF1\x7FA\xF6\xFF\xFF\xFF\x07 k O@A\xF7\xFF\xFF\xFF\x07!\b \0(\0 \0 \0,\0\vA\0H\x1B! A\xF2\xFF\xFF\xFFM@A\v j" At"\b \bK\x1B"A\x07rAj A\vI\x1B!\b\v \b9! @ \xFC
- \0\0\v @ j \x07 \xFC
- \0\0\v j"
- k"\x07E
- FrE@ j j j j \x07\xFC
- \0\0\v A
- G@ !\v \0 6\0 \0 \bA\x80\x80\x80\x80xr6\b \0 j \x07j"\x006 \0 jA\0:\0\0\vi\0\v,\x7F \0 A\xC0\x84=n"At/\xC0\xBB;\0\0 \0Aj A\xC0\x84=lk\xAB\v\0A\v;\0 \0 6 \0 \x7F 9A\0\v"6\0 \0 j"6\b \0 j6\f \0 6 \0\v\b\0A\xFF\xFF\xFF\xFF\x07\v\0A\xFF\0\v?\x7F@ \0 F\r\0@ \0 Ak"O\r \0(\0! \0 (\x006\0 6\0 \0Aj!\0\f\0\v\0\v\v\xCB \x7F#\0Ak" $\0 =!
- Aj n" (\0(\0@ (\b ,\0"\x07 \x07A\0H\x1BE@
- \0
- (\0(0\0 \0kAtj"6\0\f\v 6\0@@ \0"\x07-\0\0"\bA+k\0\0\v
- \b\xC0
- (\0(,\0!\x07 (\0"\bAj6\0 \b \x076\0 \0Aj!\x07\v@ \x07kAH\r\0 \x07-\0\0A0G\r\0 \x07-\0A rA\xF8\0G\r\0
- A0
- (\0(,\0!\b (\0"\vAj6\0 \v \b6\0
- \x07,\0
- (\0(,\0!\b (\0"\vAj6\0 \v \b6\0 \x07Aj!\x07\v \x07 c (\0(\0\0!A\0!\vA\0!\b \x07!\x7F M\x7F \x07 \0kAtj (\0\x8F (\0@ ("\f Aj"\r ,\0A\0H"\x1B \bj-\0\0E\r\0 \v \f \r \x1B \bj,\0\0G\r\0 (\0"\vAj6\0 \v 6\0A\0!\v \b \b (\b ,\0"\f \fA\0H\x1BAkIj!\b\v
- ,\0\0
- (\0(,\0!\f (\0"\rAj6\0 \r \f6\0 Aj! \vAj!\v\f\v\v!\v \0kAtj F\x1B6\0 Aj Aj$\0\v\xD0\x7F A\x80q@ \0A+:\0\0 \0Aj!\0\v A\x80\bq@ \0A#:\0\0 \0Aj!\0\v A\x84q"A\x84G@ \0A\xAE\xD4\0;\0\0 \0Aj!\0\v A\x80\x80q!@ -\0\0"@ \0 :\0\0 \0Aj!\0 Aj!\f\v\v \0\x7F@ A\x80G@ AG\rA\xC6\0A\xE6\0 \x1B\f\vA\xC5\0A\xE5\0 \x1B\f\vA\xC1\0A\xE1\0 \x1B A\x84F\r\0A\xC7\0A\xE7\0 \x1B\v:\0\0 A\x84G\v\xB4\x7F~@@@@@@ AkAw\b\0\v \0\x7F k"AL@A= A\xC0\0 B\x84y\xA7kA\xD1 lA\fv" At)\xD0\xC2TkAjH\r\v\x7F B\xFF\xFF\xFF\xFFX@ \xA7\xAD\f\v B\x80\xC8\xAF\xA0%Z@ B\x80\xC8\xAF\xA0%\x80"B\x80\xC8\xAF\xA0%~}! \xA7\xAD!\v B\x80\xC2\xD7/\x80"\xA7At/\xC0\xBB;\0\0 Aj B\x80\xC2\xD7/~}\xA7\x8A\v!A\0\v6\f\v \0A\xC0\0 B\x84y\xA7k" kJ\x7FA= j"!\x7F BT\x7F@ Ak" \xA7Aq-\0\x91:\0\0 B\x88"B\0R\r\0\vA\0 Ak" \xA7AtA<q(\x90\xBD6\0\0 B\x88!\f\v\v\v6\f\v \0A\xC2\0 B\x84y\xA7kAn" kJ\x7FA= j"!\x7F B\xC1\0T\x7F@ Ak" \xA7A\x07q-\0\xFA\x1B:\0\0 B\x88"B\0R\r\0\vA\0 Ak" \xA7AtA\xFE\0q/\xD0\xBD;\0\0 B\x88!\f\v\v\v6\f\v \0A\xC3\0 B\x84y\xA7kAv" kJ\x7FA= j"!\x7F B\x81T\x7F@ Ak" \xA7Aq-\0\xD2:\0\0 B\x88"B\0R\r\0\vA\0 Ak" \xA7AtA\xFEq/\xD0\xBE;\0\0 B\b\x88!\f\v\v\v6\f\v\x7F ! l" l\xAD!\b \xAD! \xAD!
- l\xAD!\x07A\0!\x7F Ar T\r Ar
- T\r Ar \bT\r \x07T\x7F Aj Aj! \x07\x80!\f\v\v\v" kJ@ \0A=6\f\v \xAC!\x07 j"!@ Ak" \x07\x80" \x07~}\xA7-\0\x80\b:\0\0 \x07Z !\r\0\v \0A\x006 \0 6\0\v \0 6\0\v\xC1 \x7F#\0Ak" $\0 >!
- Aj p" (\0(\0@ (\b ,\0"\x07 \x07A\0H\x1BE@
- \0
- (\0( \0 \0kj"6\0\f\v 6\0@@ \0"\x07-\0\0"\bA+k\0\0\v
- \b\xC0
- (\0(\0!\x07 (\0"\bAj6\0 \b \x07:\0\0 \0Aj!\x07\v@ \x07kAH\r\0 \x07-\0\0A0G\r\0 \x07-\0A rA\xF8\0G\r\0
- A0
- (\0(\0!\b (\0"\vAj6\0 \v \b:\0\0
- \x07,\0
- (\0(\0!\b (\0"\vAj6\0 \v \b:\0\0 \x07Aj!\x07\v \x07 c (\0(\0\0!A\0!\vA\0!\b \x07!\x7F M\x7F \x07 \0kj (\0c (\0@ ("\f Aj"\r ,\0A\0H"\x1B \bj-\0\0E\r\0 \v \f \r \x1B \bj,\0\0G\r\0 (\0"\vAj6\0 \v :\0\0A\0!\v \b \b (\b ,\0"\f \fA\0H\x1BAkIj!\b\v
- ,\0\0
- (\0(\0!\f (\0"\rAj6\0 \r \f:\0\0 Aj! \vAj!\v\f\v\v!\v \0kj F\x1B6\0 Aj Aj$\0\v\x9A\x7F@@@@@@ AkAw\b\0\v \0\x7F k"A L@A= A ArgkA\xD1 lA\fv" At(\x90\xBBIkAjH\r\v \xAD!A\0\v6\f\v \0A Argk" kJ\x7FA= j"!\x7F AI\x7F@ Ak" Aq-\0\x91:\0\0 Av"\r\0\vA\0 Ak" AtA<q(\x90\xBD6\0\0 Av!\f\v\v\v6\f\v \0A" ArgkAn" kJ\x7FA= j"!\x7F A\xC1\0I\x7F@ Ak" A\x07q-\0\xFA\x1B:\0\0 Av"\r\0\vA\0 Ak" AtA\xFE\0q/\xD0\xBD;\0\0 Av!\f\v\v\v6\f\v \0A# ArgkAv" kJ\x7FA= j"!\x7F A\x81I\x7F@ Ak" Aq-\0\xD2:\0\0 Av"\r\0\vA\0 Ak" AtA\xFEq/\xD0\xBE;\0\0 A\bv!\f\v\v\v6\f\v\x7F ! l"\x07 l! \x07 \x07l!\b\x7F Ar K\r Ar \x07I\r Ar I\r \bI\x7F Aj Aj! \bn!\f\v\v\v" kJ@ \0A=6\f\v j"!@ Ak" n" lk-\0\x80\b:\0\0 O !\r\0\v \0A\x006 \0 6\0\v \0 6\0\v\xCB\v\x7F#\0A\xF0\0k"\f$\0 \f 6l \f! @@@ kA\fm"
- A\xE5\0O@
- /"! E\r\v !\x07 !@ F@A\0!\b@ \0 \fA\xEC\0j"(A
- \x1B@ \0 (@ (\0Ar6\0\v@ F\r -\0\0AF\r\x07 Aj! A\fj!\f\0\v\0\v \0:!\r E@ \r (\0(\0!\r\v \bAj!A\0! !\x07 !@ F@ !\b E\r \0Q !\x07 !
- \vjAI\r@ F@\f@ \x07-\0\0AG\r\0 ( ,\0\v" A\0H\x1B \bF\r\0 \x07A\0:\0\0 \vAk!\v\v \x07Aj!\x07 A\fj!\f\v\0\v\0@ \x07-\0\0AG\r\0 \bAt (\0 ,\0\vA\0H\x1Bj(\0!@ \x7F (\0(\0\v \rF@A! ( ,\0\v" A\0H\x1B G\r \x07A:\0\0 \vAj!\v\f\v \x07A\0:\0\0\v
- Ak!
- \v \x07Aj!\x07 A\fj!\f\v\0\v\0\v\0 \x07AA ( ,\0\v"\b \bA\0H\x1B"\b\x1B:\0\0 \x07Aj!\x07 A\fj! \v \bE"\bj!\v
- \bk!
- \f\v\0\v\0\v0\0\v (\0Ar6\0\v ! \fA\xF0\0j$\0 \v\x88\x7F ( \0( \0(\0"k"k! @ \xFC
- \0\0\v 6 \0 \0(\0"6 \0 (6\0 6 \0(! \0 (\b6 6\b \0(\b! \0 (\f6\b 6\f (6\0\v\xC8\v\x7F#\0A\xF0\0k"\f$\0 \f 6l \f! @@@ kA\fm"
- A\xE5\0O@
- /"! E\r\v !\x07 !@ F@A\0!\b@ \0 \fA\xEC\0j")A
- \x1B@ \0 )@ (\0Ar6\0\v@ F\r -\0\0AF\r\x07 Aj! A\fj!\f\0\v\0\v \0;!\r E@ \r (\0(\f\0!\r\v \bAj!A\0! !\x07 !@ F@ !\b E\r \0S !\x07 !
- \vjAI\r@ F@\f@ \x07-\0\0AG\r\0 ( ,\0\v" A\0H\x1B \bF\r\0 \x07A\0:\0\0 \vAk!\v\v \x07Aj!\x07 A\fj!\f\v\0\v\0@ \x07-\0\0AG\r\0 (\0 ,\0\vA\0H\x1B \bj,\0\0!@ \x7F (\0(\f\0\v \rF@A! ( ,\0\v" A\0H\x1B G\r \x07A:\0\0 \vAj!\v\f\v \x07A\0:\0\0\v
- Ak!
- \v \x07Aj!\x07 A\fj!\f\v\0\v\0\v\0 \x07AA ( ,\0\v"\b \bA\0H\x1B"\b\x1B:\0\0 \x07Aj!\x07 A\fj! \v \bE"\bj!\v
- \bk!
- \f\v\0\v\0\v0\0\v (\0Ar6\0\v ! \fA\xF0\0j$\0 \v\xBB\x7F A\xF4\xDC \x1B"(\0!@\x7F@ E@ \rA\0\vA~ E\r@ @ !\f\v -\0\0"\xC0"A\0N@ \0@ \0 6\0\v A\0G\vA\xCC\xCF(\0(\0E@A \0E\r \0 A\xFF\xBFq6\0A\v A\xC2k"A2K\r At(\x80\x84! Ak"E\r Aj!\v -\0\0"Av"\x07Ak Au \x07jrA\x07K\r\0@ Ak! A\xFFqA\x80k Atr"A\0N@ A\x006\0 \0@ \0 6\0\v k\v E\r Aj",\0\0"A@H\r\0\v\v A\x006\0A\xF8\xD7A6\0A\x7F\v\v 6\0A~\v'\0 \0 \0(E \0( rr"6 \0( q@\x9C\0\v\v}\x7F#\0A\xA0k"$\0 \0 A\x9Ej \x1B"\x006\x94 A\0Gk6\x98 A\0A\x90\xFC\v\0 A\x7F6L A\xE1\x006$ A\x7F6P A\x9Fj6, A\x94j6T \0A\0:\0\0 \xCB A\xA0j$\0\vJ\x7F@ \0-\0\0"E -\0\0"Gr\r\0@ -\0! \0-\0"E\r Aj! \0Aj!\0 F\r\0\v\v k\v\0\0\v\x8D\b\v\x7F \0E@ /\v A@O@A\xF8\xD7A06\0A\0\v\x7FA A\vjAxq A\vI\x1B! \0A\bk"(" Axq!\b@ AqE@ A\x80I\r Aj \bM@ ! \b kA\xDC\xDB(\0AtM\r\vA\0\f\v \bj!\x07@ \bM@ \b k"AI\r AqrAr6 j" Ar6 \x07 \x07(Ar6 \xC9\f\vA\x94\xD8(\0 \x07F@A\x88\xD8(\0 \bj"\b M\r AqrAr6 j" \b k"Ar6A\x88\xD8 6\0A\x94\xD8 6\0\f\vA\x90\xD8(\0 \x07F@A\x84\xD8(\0 \bj" I\r@ k"AO@ AqrAr6 j"\b Ar6 j" 6\0 (A~q6\f\v Aq rAr6 j" (Ar6A\0!\bA\0!\vA\x90\xD8 \b6\0A\x84\xD8 6\0\f\v \x07("Aq\r Axq \bj"\v I\r \v k!\f \x07(\f!@ A\xFFM@ \x07(\b" F@A\xFC\xD7A\xFC\xD7(\0A~ Avwq6\0\f\v 6\f 6\b\f\v \x07(!
- @ \x07G@ \x07(\b" 6\f 6\b\f\v@ \x07("\x7F \x07Aj \x07("E\r \x07Aj\v!\b@ \b! "Aj!\b ("\r\0 Aj!\b ("\r\0\v A\x006\0\f\vA\0!\v
- E\r\0@ \x07("At"(\xAC\xDA \x07F@ A\xAC\xDAj 6\0 \rA\x80\xD8A\x80\xD8(\0A~ wq6\0\f\v@ \x07
- (F@
- 6\f\v
- 6\v E\r\v
- 6 \x07("@ 6 6\v \x07("E\r\0 6 6\v \fAM@ Aq \vrAr6 \vj" (Ar6\f\v AqrAr6 j" \fAr6 \vj" (Ar6 \f\xC9\v !\v \v"@ A\bj\v /"E@A\0\v \0A|Ax \0Ak(\0"Aq\x1B Axqj" K\x1BY \0! \v\0 \0E@A\0\vA\xF8\xD7 \x006\0A\x7F\v}\x7F#\0Ak"$\0 A
- :\0@@ \0("\x7F \0\xC9\r \0(\v \0("F\r\0 \0(PA
- F\r\0 \0 Aj6 A
- :\0\0\f\v \0 AjA \0($\0AG\r\0 -\0\v Aj$\0\v\0\v\0A\v\xF4\x7F#\0A@j"\x07B\x007 \x07B\x007( \x07B\x0070 \x07B\x0078@@\x7F@\x7F @ Aq!@ AO@ A|q!@ \x07A j"\f \bAtj"/\0Atj" /\0Aj;\0 /At \fj" /\0Aj;\0 /At \fj" /\0Aj;\0 /At \fj" /\0Aj;\0 \bAj!\b Aj" G\r\0\v E\r\v@ \x07A j \bAtj/\0Atj" /\0Aj;\0 \bAj!\b
- Aj"
- G\r\0\v\v (\0"\b \x07/>"\rE\rA!\v\f\v (\0\v!\bA\0!\r \x07/<@A!\v\f\v \x07/:@A\r!\v\f\v \x07/8@A\f!\v\f\v \x07/6@A\v!\v\f\v \x07/4@A
- !\v\f\v \x07/2@A !\v\f\v \x07/0@A\b!\v\f\v \x07/.@A\x07!\v\f\v \x07/,@A!\v\f\v \x07/*@A!\v\f\v \x07/(@A!\v\f\v \x07/&@A!\v\f\v \x07/$@A!\v\f\v \x07/"@A!\fA!\vA!\bA\0\f\v (\0"\0Aj6\0 \0A\xC06\0 (\0"\0Aj6\0 \0A\xC06\0A!\f\f\v \b \v \b \vI\x1B!A!\b@@ \x07A j \bAtj/\0\r \bAj"\b \vG\r\0\v \v!\b\v \b \bK\x1B!\fA\v! A\x7F!
- \x07/""AK\rA AtkA\xFE\xFFq \x07/$"k"A\0H\r At \x07/&"k"A\0H\r At \x07/("k"A\0H\r At \x07/*"k"A\0H\r At \x07/,"k"A\0H\r At \x07/."k"A\0H\r At \x07/0"k"A\0H\r At \x07/2"k"A\0H\r At \x07/4"k"A\0H\r At \x07/6"\x1Bk"A\0H\r At \x07/8"k"A\0H\r At \x07/:"k"A\0H\r At \x07/<"k"A\0H\r At" \rI \rGA\0 \0E r\x1Br\rA\0!
- \x07A\0; \x07 ; \x07 j"; \x07 j";\b \x07 j";
- \x07 j";\f \x07 j"; \x07 j"; \x07 j"; \x07 j"; \x07 j"; \x07 \x1Bj"; \x07 j"; \x07 j"; \x07 j;@ E\r\0 AG@ Aq A~q!A\0! @
- Atj/\0"@ \x07 Atj" /\0"Aj;\0 Atj
- ;\0\v
- Ar"Atj/\0"@ \x07 Atj" /\0"Aj;\0 Atj ;\0\v
- Aj!
- Aj" G\r\0\vE\r\v
- Atj/\0"E\r\0 \x07 Atj" /\0"Aj;\0 Atj
- ;\0\vA!A\0! "!A\0!@@@ \0\0\vA!
- \fA K\rA\x81!A\xD0\xED\0!A\x90\xED\0!A!\f\v \0AF!A\0!A\xD0\xEE\0!A\x90\xEE\0! \0AG@\f\vA!
- \fA K\r\vA \ft"Ak! (\0!A\0! \f! A\0!A\0!\rA\x7F!@A t!@@\x7FA\0 Atj/\0" AjK\r\0 I@A\0! A\xE0\0\f\v kAt"\0j/\0! \0 j-\0\0\v!\0A\x7F \b k"t!\x1B \r vAtj! !
- @
- \x1Bj"
- Atj" ; :\0 \0:\0\0
- \r\0\vA \bAkt! @ "\0Av! \0 \rq\r\0\v \x07A j \bAtj" /\0Ak" ;\0 \0Ak \rq \0jA\0 \0\x1B!\r Aj! A\xFF\xFFqE@ \b \vF\r Atj/\0Atj/\0!\b\v \b \fM\r\0 \r q"\0 F\r\0\vA \b \f \x1B"k" t! \b \vI@ \v k! \b!
- @@ \x07A j
- Atj/\0k"A\0L\r At! Aj" j"
- \vI\r\0\v ! \vA t!\vA!
- j"A\xD4Kq A\xD0Kqr\r (\0" \0Atj"
- \f:\0
- :\0\0
- Atj" kAv; \0!\f\v\v \r@ \rAtj"\0A\0; \0 :\0 \0A\xC0\0:\0\0\v (\0 Atj6\0\v \f6\0A\0!
- \v
- \v\x9C\x7F ,\0\vA\0N@ \0 (\b6\b \0 )\x007\0\v (\0!@@@ ("A
- M@ \0 :\0\v\f\v A\xF7\xFF\xFF\xFF\x07O\r A\x07r"Aj9! \0 A\xFF\xFF\xFF\xFF\x07k6\b \0 6\0 \0 6 !\0\v Aj"@ \0 \xFC
- \0\0\v\f\vi\0\v\v\xCC\x7F@A\xF6\xFF\xFF\xFF\x07 k O@ \0,\0\vA\0H! \0(\0A\xF7\xFF\xFF\xFF\x07! A\xF2\xFF\xFF\xFFM@A\v j" At" K\x1B"A\x07rAj A\vI\x1B!\v \0 \x1B! 9! @ \xFC
- \0\0\v@ F\r\0 k"\x07E\r\0 j j \x07\xFC
- \0\0\v A
- G@ !\v \0 6\0 \0 A\x80\x80\x80\x80xr6\b\f\vi\0\v \0 6\v\0 \0 \0(\0A\fk(\0j"\0 jK \0\vK\x7F \0("A\bu!\x07 \0(\0"\0 Aq\x7F (\0 \x07j(\0 \x07\v j A Aq\x1B \0(\0(\v\0\v\x9A\0 \0A:\x005@ \0(G\r\0 \0A:\x004@ \0("E@ \0A6$ \0 6 \0 6 AG\r \0(0AF\r\f\v F@ \0("AF@ \0 6 !\v \0(0AG\r AF\r\f\v \0 \0($Aj6$\v \0A:\x006\v\vv\x7F \0($"E@ \0 6 \0 6 \0A6$ \0 \0(86\v@@ \0( \0(8G\r\0 \0( G\r\0 \0(AG\r \0 6\v \0A:\x006 \0A6 \0 Aj6$\v\v\x8D\x7F ( \0(\0" \0("kj! k"@ \xFC
- \0\0\v 6 \0 \0(\0"6 \0 (6\0 6 \0(! \0 (\b6 6\b \0(\b! \0 (\f6\b 6\f (6\0\v\x85\x7F@@@ \0,\0\v"A\0N@A
- ! A
- F\r \0 AjA\xFF\0q:\0\v\f\v \0(" \0(\bA\xFF\xFF\xFF\xFF\x07qAk"G\r\v \0 A \xA4 !\v \0 Aj6 \0(\0!\0\v \0 j"\0A\0:\0 \0 :\0\0\v,\x7F \0 A\x90\xCE\0n"At/\xC0\xBB;\0\0 \0Aj A\x90\xCE\0lk\xAC\v4\x7F \0 A\xE4\0n"At/\xC0\xBB;\0\0 \0 A\xE4\0lkAt/\xC0\xBB;\0 \0Aj\v\xE9\x7F A\xBF\x84=M@ A\x8F\xCE\0M@ A\xE3\0M@ A M@ \0 A0r:\0\0 \0Aj\v \0 At/\xC0\xBB;\0\0 \0Aj\v A\xE7\x07M@ \0 A\xFF\xFFqA\xE4\0n"A0r:\0\0 \0 A\xE4\0lkA\xFF\xFFqAt/\xC0\xBB;\0 \0Aj\v \0 \xAC\v A\x9F\x8DM@ \0 A\x90\xCE\0n"A0j:\0\0 \0Aj A\x90\xCE\0lk\xAC\v \0 \xAB\v A\xFF\xC1\xD7/M@ A\xFF\xAC\xE2M@ \0 A\xC0\x84=n"A0j:\0\0 \0Aj A\xC0\x84=lk\xAB\v \0 \x8A\v A\xFF\x93\xEB\xDCM@ \0 A\x80\xC2\xD7/n"A0j:\0\0 \0Aj A\x80\xC2\xD7/lk\x8A\v \0 A\x80\xC2\xD7/n"At/\xC0\xBB;\0\0 \0Aj A\x80\xC2\xD7/lk\x8A\v\0 \0(\b*G@ \0(\b\xA6\v \0\v+\x7F#\0Ak"$\0 H6\f \0 \xC5 A\fjI Aj$\0\v\0 \0A\xE8\xF5\x006\0 \0A j \0\xC3\vT\x7F#\0Ak"$\0\x7F (\0! \0kAu"@@ \0 \0(\0F\r \0Aj!\0 Ak"\r\0\v\vA\0\v"\0 \0\x1B Aj$\0\v\x9F\x7F#\0Ak"\f$\0 \f \x006\f@@ \0 F@ -\0\0AG\rA\0!\0 A\0:\0\0 (\0"Aj6\0 A.:\0\0 \x07( \x07,\0\v" A\0H\x1BE\r (\0" \bkA\x9FJ\r
- (\0! Aj6\0 6\0\f\v@@ \0 G\r\0 \x07( \x07,\0\v"\0 \0A\0H\x1BE\r\0 -\0\0AG\r (\0"\0 \bkA\x9FJ\r
- (\0! \0Aj6\0 \0 6\0A\0!\0
- A\x006\0\f\v \v \vA\xF0\0j \fA\fj\xB1 \vk"\0Au"A\x1BJ\r A\xD0\x85j,\0\0!@@ \0A{q"\0A\xD8\0G@ \0A\xE0\0G\r (\0"G@A\x7F!\0 Ak,\0\0s ,\0\0sG\r\v Aj6\0 :\0\0\f\v A\xD0\0:\0\0\f\v s"\0 ,\0\0G\r\0 \0\xB9:\0\0 -\0\0AG\r\0 A\0:\0\0 \x07( \x07,\0\v"\0 \0A\0H\x1BE\r\0 (\0"\0 \bkA\x9FJ\r\0
- (\0! \0Aj6\0 \0 6\0\v (\0"\0Aj6\0 \0 :\0\0A\0!\0 AJ\r
-
- (\0Aj6\0\f\vA\0!\0\f\vA\x7F!\0\v \fAj$\0 \0\vy\x7F#\0Ak"$\0 A\fj" $ ="A\xD0\x85A\xEC\x85 (\0(0\0 n" (\0(\f\0\x006\0 (\0(\0\x006\0 \0 (\0(\0 (\f# Aj$\0\v*\x7F#\0Ak"$\0 \0 ,\0\0 \0k\xCA"\0 \0\x1B Aj$\0\v\x7F \0\xD4 \0(\0"@ \0(\f !\v\v\x97\x7F#\0Ak"\f$\0 \f \0:\0@@ \0 F@ -\0\0AG\rA\0!\0 A\0:\0\0 (\0"Aj6\0 A.:\0\0 \x07( \x07,\0\v" A\0H\x1BE\r (\0" \bkA\x9FJ\r
- (\0! Aj6\0 6\0\f\v@@ \0 G\r\0 \x07( \x07,\0\v"\0 \0A\0H\x1BE\r\0 -\0\0AG\r (\0"\0 \bkA\x9FJ\r
- (\0! \0Aj6\0 \0 6\0A\0!\0
- A\x006\0\f\v \v \vAj \fAj\xB4 \vk"A\x1BJ\r A\xD0\x85j,\0\0!@@@@ A~qAk\0\v (\0"G@A\x7F!\0 Ak,\0\0s ,\0\0sG\r\v Aj6\0 :\0\0\f\v A\xD0\0:\0\0\f\v s"\0 ,\0\0G\r\0 \0\xB9:\0\0 -\0\0AG\r\0 A\0:\0\0 \x07( \x07,\0\v"\0 \0A\0H\x1BE\r\0 (\0"\0 \bkA\x9FJ\r\0
- (\0! \0Aj6\0 \0 6\0\v (\0"\0Aj6\0 \0 :\0\0A\0!\0 AJ\r
-
- (\0Aj6\0\f\vA\0!\0\f\vA\x7F!\0\v \fAj$\0 \0\vy\x7F#\0Ak"$\0 A\fj" $ >"A\xD0\x85A\xEC\x85 (\0( \0 p" (\0(\f\0\0:\0\0 (\0(\0\0:\0\0 \0 (\0(\0 (\f# Aj$\0\vI\x7F \0 6 \0A\x006\f @ U!\v \0 6\0 \0 Atj"6\b \0 Atj6\f \0 6 \0\v6\x7F \0(" Atj!@ F@ \0 6 A\x006\0 Aj!\f\v\v\v~\x7F~#\0A\xA0k"$\0 6< 6 A\x7F6 Aj"B\0J A\xAD )\b! )\0!\x07 @ (\x88 ( (<kjj6\0\v \0 7\b \0 \x077\0 A\xA0j$\0\v\r\0 \0 B\x7F\xBE\vD\x7F#\0Ak"$\0 B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F\x85< )\0! \0 )\b7\b \0 7\0 Aj$\0\v\x9C\x7FA5!@ \0(" \0("AjA\x07pkA\x07jA\x07n k"A\xF1jA\x07pAIj"A5G@ "\rA4!@@ AjA\x07pAk\0\v \0(A\x90oAk\xB3E\r\vA5\v@@ A\xF3jA\x07pAk\0\v \0(\xB3\r\vA!\v \v\x95\x07\x7F~#\0Ak"\b$\0@@@ A$L@ \0-\0\0"\r \0!\f\vA\xF8\xD7A6\0B\0!\f\v \0!@@ \xC0_E\r -\0! Aj! \r\0\v\f\v@ A\xFFq"A+k\0\0\vA\x7FA\0 A-F\x1B!\x07 Aj!\v\x7F@ ArAG\r\0 -\0\0A0G\r\0A! -\0A\xDFqA\xD8\0F@ Aj!A\f\v Aj! A\b \x1B\f\v A
- \x1B\v"
- \xAD!\fA\0!@@@ -\0\0"A0k"A\xFFqA
- I\r\0 A\xE1\0kA\xFFqAM@ A\xD7\0k!\f\v A\xC1\0kA\xFFqAK\r A7k!\v
- A\xFFqL\r\0 \b \fB\0 \vB\02A!@ \b)\bB\0R\r\0 \v \f~"\r \xADB\xFF\x83"B\x7F\x85V\r\0 \r |!\vA! !\v Aj! !\f\v\v @ \0 \x1B6\0\v@@ @A\xF8\xD7A\xC4\x006\0 \x07A\0 B\x83P\x1B!\x07 !\v\f\v \vV\r\v \x07 \xA7AqrE@A\xF8\xD7A\xC4\x006\0 B}!\f\v \vZ\r\0A\xF8\xD7A\xC4\x006\0\f\v \v \x07\xAC"\x85 }!\v \bAj$\0 \v\x9A\b\x7F@ \0"Aq@@ -\0\0"E A=Fr\r Aj"Aq\r\0\v\v@@A\x80\x82\x84\b (\0"k rA\x80\x81\x82\x84xqA\x80\x81\x82\x84xG\r\0@A\x80\x82\x84\b A\xBD\xFA\xF4\xE9s"k rA\x80\x81\x82\x84xqA\x80\x81\x82\x84xG\r (! Aj"! A\x80\x82\x84\b krA\x80\x81\x82\x84xqA\x80\x81\x82\x84xF\r\0\v\f\v !\v@ "-\0\0"E\r Aj! A=G\r\0\v\v \0 F@A\0\v@ \0 \0k"j-\0\0\r\0A\xEC\xDB(\0"E\r\0 (\0"E\r\0@@\x7F \0!A\0 "E\r\0 \0-\0\0"\x7F@@ -\0\0"\x07G \x07Er\r Ak"E\r Aj! -\0! Aj! \r\0\vA\0!\v A\0\v -\0\0k\vE@ (\0 j"-\0\0A=F\r\v (! Aj! \r\f\v\v Aj!\b\v \b\v \0 \0\x81!\v\0 \0A\fjK \0!\v\0\v\0 \0A\xA8\xF5\x006\0 \0Aj\xF3 \0\v\xFD~\x7F#\0A k"$\0 B\xFF\xFF\xFF\xFF\xFF\xFF?\x83!~ B0\x88B\xFF\xFF\x83"\xA7"A\x81\xF8\0kA\xFDM@ B\x86 \0B<\x88\x84! A\x80\xF8\0k\xAD!@ \0B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83"\0B\x81\x80\x80\x80\x80\x80\x80\x80\bZ@ B|!\f\v \0B\x80\x80\x80\x80\x80\x80\x80\x80\bR\r\0 B\x83 |!\vB\0 B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x07V"\x1B!\0 \xAD |\f\v \0 \x84P B\xFF\xFFRrE@ B\x86 \0B<\x88\x84B\x80\x80\x80\x80\x80\x80\x80\x84!\0B\xFF\f\v A\xFE\x87K@B\0!\0B\xFF\f\vA\x80\xF8\0A\x81\xF8\0 P"\x1B"\b k"\x07A\xF0\0J@B\0!\0B\0\f\v B\x80\x80\x80\x80\x80\x80\xC0\0\x84 \x1B!A\0! \bG@ Aj \0 A\x80 \x07k6 ) )\x84B\0R!\v \0 \x07g )\bB\x86 )\0"B<\x88\x84!\0@ \xAD B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x84"B\x81\x80\x80\x80\x80\x80\x80\x80\bZ@ \0B|!\0\f\v B\x80\x80\x80\x80\x80\x80\x80\x80\bR\r\0 \0B\x83 \0|!\0\v \0B\x80\x80\x80\x80\x80\x80\x80\b\x85 \0 \0B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x07V"\x1B!\0 \xAD\v! A j$\0 B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F\x83 B4\x86\x84 \0\x84\xBF\v\x89\0@ \0\x7F A\xFF\0M\r@A\xCC\xCF(\0(\0E@ A\x80\x7FqA\x80\xBFF\r\f\v A\xFFM@ \0 A?qA\x80r:\0 \0 AvA\xC0r:\0\0A\v A\x80@qA\x80\xC0G A\x80\xB0OqE@ \0 A?qA\x80r:\0 \0 A\fvA\xE0r:\0\0 \0 AvA?qA\x80r:\0A\v A\x80\x80kA\xFF\xFF?M@ \0 A?qA\x80r:\0 \0 AvA\xF0r:\0\0 \0 AvA?qA\x80r:\0 \0 A\fvA?qA\x80r:\0A\v\vA\xF8\xD7A6\0A\x7FA\v\v \0 :\0\0A\v\0 @ \0 \xC0 \xFC\v\0\v\v0\x7F#\0Ak"$\0 (\x006\0 \0 a\`A\xB0\xF1\0(\0L Aj$\0\v\xA9|D\0\0\0\0\0\0\xF0?!@ \0A\x80\bN@D\0\0\0\0\0\0\xE0\x7F! \0A\xFFI@ \0A\xFF\x07k!\0\f\vD\0\0\0\0\0\0\xF0\x7F!A\xFD \0 \0A\xFDO\x1BA\xFEk!\0\f\v \0A\x81xJ\r\0D\0\0\0\0\0\0\`! \0A\xB8pK@ \0A\xC9\x07j!\0\f\vD\0\0\0\0\0\0\0\0!A\xF0h \0 \0A\xF0hM\x1BA\x92j!\0\v \0A\xFF\x07j\xADB4\x86\xBF\xA2\vY\x7F \0 \0(H"Ak r6H \0(\0"A\bq@ \0 A r6\0A\x7F\v \0B\x007 \0 \0(,"6 \0 6 \0 \0(0j6A\0\v\xE2\x7F A\0G!@@@ \0AqE Er\r\0 A\xFFq!@ \0-\0\0 F\r Ak"A\0G! \0Aj"\0AqE\r \r\0\v\v E\r A\xFFq" \0-\0\0F AIrE@ A\x81\x82\x84\bl!@A\x80\x82\x84\b \0(\0 s"k rA\x80\x81\x82\x84xqA\x80\x81\x82\x84xG\r \0Aj!\0 Ak"AK\r\0\v\v E\r\v A\xFFq!@ \0-\0\0F@ \0\v \0Aj!\0 Ak"\r\0\v\vA\0\vx\x7F@ \0E\r\0 \0( E\r\0 \0($"E\r\0 \0("E\r\0 (\0 \0G\r\0 (A\xB4\xFE\0kAK\r\0 (8"@ \0(( \0 \0($! \0(!\v \0(( \0 \0A\x006\v\v\xE9\0A\x98\xC7A\xA8A\xA8\xC7A\xA9AA\0A\xB4\xC7A\x96\rAA\x80\x7FA\xFF\0A\xCC\xC7A\x8F\rAA\x80\x7FA\xFF\0A\xC0\xC7A\x8D\rAA\0A\xFFA\xD8\xC7A\xC8 AA\x80\x80~A\xFF\xFFA\xE4\xC7A\xBF AA\0A\xFF\xFFA\xF0\xC7A\xD7 AA\x80\x80\x80\x80xA\xFF\xFF\xFF\xFF\x07A\xFC\xC7A\xCE AA\0A\x7FA\x88\xC8A\x85AA\x80\x80\x80\x80xA\xFF\xFF\xFF\xFF\x07A\x94\xC8A\xFCAA\0A\x7FA\xA0\xC8A\xF2A\bB\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7FB\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0A\xAC\xC8A\xE9A\bB\0B\x7FA\xB8\xC8A\xC7
- A\rA\xC4\xC8A\xAFA\b\rA\xA8-A\xA4\x1BA\xF0-AA\x8AA\xB8.AA\xB0A\x84/AA\xBFA\xDC&A\xD0/A\0A\x98\0A\xF8/A\0A\xDD\0A\xA00AA\xB6\0A\xC80AA\xE5\0A\xF00AA\x84\0A\x981AA\xAC\0A\xC01AA\xC9\0A\xE81AA\x82\x1B\0A\x902AA\xA0\x1B\0A\xF8/A\0A\xAF\0A\xA00AA\x8E\0A\xC80AA\xF1\0A\xF00AA\xCF\0A\x981AA\xF7\0A\xC01AA\xD5\0A\xB82A\bA\xB4\0A\xE02A A\x92\0A\x883AA\xEF\0A\xB03A\x07A\xC7\x1B\0\v>\x7F#\0Ak"$\0 \x006\f\x7F \0AO@A\xAE A\fj\xC7A\0\f\v \0At(\x98-\v Aj$\0\v\x85\x7F@ k"A\xF7\xFF\xFF\xFF\x07I@@ A
- M@ \0 :\0\v\f\v A\x07r"Aj9! \0 A\xFF\xFF\xFF\xFF\x07k6\b \0 6\0 \0 6 !\0\v k"E FrE@ \0 \xFC
- \0\0\v \0 jA\0:\0\0\f\vi\0\v\v6\x7F \0(\b" Atj!@ FE@ A\x006\0 Aj!\f\v\v \0 6\b\vD\x7F#\0Ak"$\0 \0(\0!\0 6\b \x006 A\x9F6\0A\xED\v a\`A\xB0\xF1\0(\0L Aj$\0\v\`\x7F \0(" k"\x07j! !@ M@ \0 6 \x07E FrE@ \x07k \x07\xFC
- \0\0\v -\0\0:\0\0 Aj! Aj!\f\v\v\v\0 \0(\0"\0@ \0\v\v\f\0 \0(\0\0\0\v+\x7F \0(! \0(\b!@ G@ \0 Ak"6\b\f\v\v\v\x07\0 \0\0\v\x7F#\0Ak"$\0 \x006\0A\xEC \xDC\0\v\0 \0(\0j 6\0\v\r\0 \0(\0j(\0\vQ\x7F@ E\r\0 A\x8C\xC6E"E\r\0 (\b \0(\bA\x7Fsq\r\0 \0(\f( (\f(G\r\0 \0(( ((F!\v \v{\x7F \0("Aq!\x7F -\x007AF@ A\bu" E\r (\0 j(\0\f\v A\bu E\r\0 \0(\0(68A\0!A\0\v! \0(\0"\0 j A Aq\x1B \0(\0(\b\0\v\r\0 \0( (F\v\xF6\x7F#\0Ak"$\0 6\fA\x94\xC4(\0" \0 \xCB \0y \0jAk-\0\0A
- G@@@ (L"\0A\0N@ \0E\rA\x84\xCF(\0 \0A\xFF\xFF\xFF\xFFqG\r\v@ (PA
- F\r\0 ("\0 (F\r\0 \0Aj6 \0A
- :\0\0\f\v \x9F\f\v (L"\0A\xFF\xFF\xFF\xFF \0\x1B6L@@ (PA
- F\r\0 ("\0 (F\r\0 \0Aj6 \0A
- :\0\0\f\v \x9F\v (L A\x006L\v\v\x9C\0\v\x88\x7F@@@ \0,\0\v"A\0N@A! AF\r \0 AjA\xFF\0q:\0\v\f\v \0(" \0(\bA\xFF\xFF\xFF\xFF\x07qAk"G\r\v \0 A \xFF !\v \0 Aj6 \0(\0!\0\v \0 Atj"\0A\x006 \0 6\0\v\x9B\x7FA\xF6\xFF\xFF\xFF k O@A\xF7\xFF\xFF\xFF! \0(\0 \0 \0,\0\vA\0H\x1B!
- A\xF2\xFF\xFF\xFFM@ j" At" K\x1BArAj! \v U!@ E\r\0 At"\bE\r\0
- \b\xFC
- \0\0\v@ E\r\0 At"\bE\r\0 Atj \x07 \b\xFC
- \0\0\v j"\bk!\x07@ \bF\r\0 \x07At"E\r\0 At"\bj Atj \b
- j Atj \xFC
- \0\0\v AG@
- !\v \0 6\0 \0 A\x80\x80\x80\x80xr6\b \0 j \x07j"\x006 \0AtjA\x006\0\v0\0\v\x8A\x7F A\xF7\xFF\xFF\xFFI@@ AM@ \0 :\0\v\f\v Ar"AjU! \0 A\xFF\xFF\xFF\xFF\x07k6\b \0 6\0 \0 6 !\0\v ! \0!@ @ 6\0 Ak! Aj!\f\v\v \0 AtjA\x006\0\v0\0\v\xA0\x7F \0(\b"A\xFF\xFF\xFF\xFF\x07qAkA
- \0,\0\v"A\0H"\x1B" O@ \0(\0 \0 \x1B!@ \x7F @ \xFC
- \0\0\v \0,\0\v Av\v\xC0A\0H@ \0 6\f\v \0 A\xFF\0q:\0\v\v jA\0:\0\0\v \0 k \0( \x1B"\0A\0 \0 \x89\v\x87\x7F A\xF7\xFF\xFF\xFF\x07I@@ A
- M@ \0 :\0\v\f\v A\x07r"Aj9! \0 A\xFF\xFF\xFF\xFF\x07k6\b \0 6\0 \0 6 !\0\v ! \0!@ @ :\0\0 Ak! Aj!\f\v\v \0 jA\0:\0\0\vi\0\v\0 \0 F@ \0A\0:\0x\v !\v<\x7F#\0Ak"$\0@@ AK\r\0 \0-\0xAq\r\0 \0A:\0x\f\v U!\0\v Aj$\0 \0\v \0 \0\xAE!\v\0 \0A\xF0\x906\0 \0Aj \0\v\0 \0A\xC8\x906\0 \0A\fj \0\v\x80\x7F !\0@@ \x07M \0 Or\r\0 \0,\0\0"A\xFFq!\x7FA A\0N\r\0 ABI\r A_M@ \0kAH\r \0-\0A\xC0qA\x80G\rA\f\v AoM@ \0kAH\r \0-\0 \0,\0!@@ A\xEDG@ A\xE0G\r A\`qA\xA0\x7FF\r\f\v A\xA0\x7FN\r\f\v A\xBF\x7FJ\r\vA\xC0qA\x80G\rA\f\v \0kAH AtKr\r \0-\0! \0-\0!\b \0,\0!@@@@ A\xF0k\0\v A\xF0\0jA\xFFqA0O\r\f\v A\x90\x7FN\r\f\v A\xBF\x7FJ\r\v \bA\xC0qA\x80G A\xC0qA\x80Gr A?q \bAtA\xC0q AtA\x80\x80\xF0\0q A?qA\ftrrrA\xFF\xFF\xC3\0Kr\rA\v! \x07Aj!\x07 \0 j!\0\f\v\v \0 k\v\xB8\x7F#\0Ak"\0$\0\x7F \0 6\f \0 6\b@@@ O OrE@ ,\0\0"\bA\xFFq!\x7F \bA\0N@ A\xFF\xFF\xC3\0K\rA\f\v \bABI\r \bA_M@A kAH\rA!\b -\0" A\xC0qA\x80G\r A?q AtA\xC0qr!A\f\v \bAoM@A!\b k"
- AH\r ,\0! @@ A\xEDG@ A\xE0G\r A\`qA\xA0\x7FF\r\f\b\v A\xA0\x7FH\r\f\x07\v A\xBF\x7FJ\r\v
- AF\r -\0"\bA\xC0qA\x80G\r \bA?q A\ftA\x80\xE0q A?qAtrr!A\f\v \bAtK\rA!\b k"
- AH\r ,\0! @@@@ A\xF0k\0\v A\xF0\0jA\xFFqA0O\r\x07\f\v A\x90\x7FN\r\f\v A\xBF\x7FJ\r\v
- AF\r -\0"\vA\xC0qA\x80G\r
- AF\r -\0"
- A\xC0qA\x80G\rA!\b
- A?q \vAtA\xC0q AtA\x80\x80\xF0\0q A?qA\ftrrr"A\xFF\xFF\xC3\0K\rA\v!\b 6\0 \0 \bj"6\f \0 Aj"6\b\f\v\v I!\b\v \b\f\vA\v \0(\f6\0 \x07 \0(\b6\0 \0Aj$\0\v\xF5\0#\0Ak"\0$\0\x7F \0 6\f \0 6\b@@@ O@A\0!\f\vA! (\0"A\xFF\xFF\xC3\0K A\x80pqA\x80\xB0Fr\r\0@ A\xFF\0M@A! \0(\b"kA\0L\r \0 Aj6\b :\0\0\f\v A\xFFM@ \0(\b"kAH\r \0 Aj6\b AvA\xC0r:\0\0 \0 \0(\b"Aj6\b A?qA\x80r:\0\0\f\v \0(\b"k! A\xFF\xFFM@ AH\r \0 Aj6\b A\fvA\xE0r:\0\0 \0 \0(\b"Aj6\b AvA?qA\x80r:\0\0 \0 \0(\b"Aj6\b A?qA\x80r:\0\0\f\v AH\r \0 Aj6\b AvA\xF0r:\0\0 \0 \0(\b"Aj6\b A\fvA?qA\x80r:\0\0 \0 \0(\b"Aj6\b AvA?qA\x80r:\0\0 \0 \0(\b"Aj6\b A?qA\x80r:\0\0\v \0 \0(\fAj"6\f\f\v\v \f\vA\v \0(\f6\0 \x07 \0(\b6\0 \0Aj$\0\v\x92\x7F !\0@@ M \0 Or\r\0\x7F \0Aj \0-\0\0"\xC0A\0N\r\0 A\xC2I\r A\xDFM@ \0kAH\r \0-\0A\xC0qA\x80G\r \0Aj\f\v A\xEFM@ \0kAH\r \0-\0 \0,\0!@@ A\xEDG@ A\xE0G\r A\`qA\xA0\x7FF\r\f\v A\xA0\x7FN\r\f\v A\xBF\x7FJ\r\vA\xC0qA\x80G\r \0Aj\f\v \0kAH A\xF4Kr kAIr\r \0-\0!\x07 \0-\0!\b \0,\0!@@@@ A\xF0k\0\v A\xF0\0jA\xFFqA0O\r\f\v A\x90\x7FN\r\f\v A\xBF\x7FJ\r\v \bA\xC0qA\x80G \x07A\xC0qA\x80Gr \x07A?q \bAtA\xC0q AtA\x80\x80\xF0\0q A?qA\ftrrrA\xFF\xFF\xC3\0Kr\r Aj! \0Aj\v!\0 Aj!\f\v\v \0 k\v\x81\x7F#\0Ak"\0$\0\x7F \0 6\f \0 6\b@@@ O OrE@A! \0\x7F -\0\0"\xC0A\0N@ ;\0A\f\v A\xC2I\r A\xDFM@A kAH\r -\0"\bA\xC0qA\x80G\r \bA?q AtA\xC0qr;\0A\f\v A\xEFM@A! k"
- AH\r ,\0!\b@@ A\xEDG@ A\xE0G\r \bA\`qA\xA0\x7FG\r\b\f\v \bA\xA0\x7FN\r\x07\f\v \bA\xBF\x7FJ\r\v
- AF\r -\0" A\xC0qA\x80G\r A?q \bA?qAt A\ftrr;\0A\f\v A\xF4K\rA! k"
- AH\r -\0"\v\xC0!\b@@@@ A\xF0k\0\v \bA\xF0\0jA\xFFqA0O\r\x07\f\v \bA\x90\x7FN\r\f\v \bA\xBF\x7FJ\r\v
- AF\r -\0"\bA\xC0qA\x80G\r
- AF\r -\0"
- A\xC0qA\x80G\r kAH\rA!
- A?q"
- \bAt"\fA\xC0q \vA\ftA\x80\xE0q A\x07q"AtrrrA\xFF\xFF\xC3\0K\r
- \fA\xC0\x07qrA\x80\xB8r; \bAvAq \vAt" A\xC0q A\btr A<qrrA\xC0\xFF\0jA\x80\xB0r;\0 Aj!A\v j"6\f \0 Aj"6\b\f\v\v I! \v \f\vA\v \0(\f6\0 \x07 \0(\b6\0 \0Aj$\0\v\xCB\x7F#\0Ak"\0$\0\x7F \0 6\f \0 6\b@@@ O@A\0!\f\vA!@@ /\0"A\xFF\0M@A! \0(\b"kA\0L\r \0 Aj6\b :\0\0\f\v A\xFFM@ \0(\b"kAH\r \0 Aj6\b AvA\xC0r:\0\0 \0 \0(\b"Aj6\b A?qA\x80r:\0\0\f\v A\xFF\xAFM@ \0(\b"kAH\r \0 Aj6\b A\fvA\xE0r:\0\0 \0 \0(\b"Aj6\b AvA?qA\x80r:\0\0 \0 \0(\b"Aj6\b A?qA\x80r:\0\0\f\v A\xFF\xB7M@A! kAH\r /"\bA\x80\xF8qA\x80\xB8G\r \0(\b" kAH\r \bA\xFF\x07q A
- tA\x80\xF8q A\xC0\x07q"A
- trrA\xFF\xFF?K\r \0 Aj6\f \0 Aj6\b AvAj"AvA\xF0r:\0\0 \0 \0(\b"Aj6\b AtA0q AvAqrA\x80r:\0\0 \0 \0(\b"Aj6\b \bAvAq AtA0qrA\x80r:\0\0 \0 \0(\b"Aj6\b \bA?qA\x80r:\0\0\f\v A\x80\xC0I\r \0(\b"kAH\r \0 Aj6\b A\fvA\xE0r:\0\0 \0 \0(\b"Aj6\b AvA\xBFq:\0\0 \0 \0(\b"Aj6\b A?qA\x80r:\0\0\v \0 \0(\fAj"6\f\f\v\vA\f\v \f\vA\v \0(\f6\0 \x07 \0(\b6\0 \0Aj$\0\v3\x7F#\0Ak"$\0 \0H6\fAAA\xCC\xCF(\0(\0\x1B A\fjI Aj$\0\v/\x7F#\0Ak"$\0 H6\f \0 \x98 A\fjI Aj$\0\v\0 6\0 \x07 6\0A\v+\x7F \0A\xDC\x876\0@ \0(\b"E\r\0 \0-\0\fAqE\r\0 !\v \0\v\0 \v'\x7F \0(\0(\0(\0A\x98\xE0A\x98\xE0(\0Aj"6\0 6\v \0 \0(\0#\v\xDB
- \x7F \0A\x94\xE0-\0\0E@A\x8C\xE0-\0\0E@A\xEC\xDEA\xC8\x876\0A\xF0\xDEA\x006\0A\xF8\xDFA\0:\0\0A\xFC\xDEA\x006\0A\xF4\xDEB\x007\0A\xF8\xDEA\x80\xDFA\xE3"\x006\0A\xF4\xDE \x006\0A\xFC\xDE \0A\xF8\0j6\0A\xF4\xDEA\xB9A\xFC\xDFA\xAF\x80A\xF8\xDEA\xF4\xDE(\x006\0A\xFC\xE9A\xE8\x9B6\0A\x80\xEAA\x006\0A\xFC\xE9A\xC4\xDD-.A\x84\xEAA\x88\x9C6\0A\x88\xEAA\x006\0A\x84\xEAA\xCC\xDD-.A\x8C\xEAA\xDC\x876\0A\x94\xEAA\x90\x886\0A\x98\xEAA\0:\0\0A\x90\xEAA\x006\0A\x8C\xEAA\xA4\xE0-.A\x9C\xEAA\xC8\x936\0A\xA0\xEAA\x006\0A\x9C\xEAA\x9C\xE0-.A\xA4\xEAA\xE0\x946\0A\xA8\xEAA\x006\0A\xA4\xEAA\xAC\xE0-.A\xAC\xEAA\x98\x906\0A\xB0\xEAA\x006\0A\xB4\xEA*6\0A\xAC\xEAA\xB4\xE0-.A\xB8\xEAA\xF4\x956\0A\xBC\xEAA\x006\0A\xB8\xEAA\xBC\xE0-.A\xC0\xEAA\xDC\x976\0A\xC4\xEAA\x006\0A\xC0\xEAA\xCC\xE0-.A\xC8\xEAA\xE8\x966\0A\xCC\xEAA\x006\0A\xC8\xEAA\xC4\xE0-.A\xD0\xEAA\xD0\x986\0A\xD4\xEAA\x006\0A\xD0\xEAA\xD4\xE0-.A\xE4\xEAB\x007\0A\xE0\xEAA\xAE\xD8\0;\0A\xD8\xEAA\xC8\x906\0A\xDC\xEAA\x006\0A\xEC\xEAA\x006\0A\xD8\xEAA\xDC\xE0-.A\x80\xEBB\x007\0A\xFC\xEAA,6\0A\xF0\xEAA\xF0\x906\0A\xF4\xEAB\x80\x80\x80\x80\xE07\0A\x88\xEBA\x006\0A\xF0\xEAA\xE4\xE0-.A\x8C\xEBA\xA8\x9C6\0A\x90\xEBA\x006\0A\x8C\xEBA\xD4\xDD-.A\x94\xEBA\xA0\x9E6\0A\x98\xEBA\x006\0A\x94\xEBA\xDC\xDD-.A\x9C\xEBA\xF4\x9F6\0A\xA0\xEBA\x006\0A\x9C\xEBA\xE4\xDD-.A\xA4\xEBA\xE0\xA16\0A\xA8\xEBA\x006\0A\xA4\xEBA\xEC\xDD-.A\xAC\xEBA\xC4\xA96\0A\xB0\xEBA\x006\0A\xAC\xEBA\x94\xDE-.A\xB4\xEBA\xD8\xAA6\0A\xB8\xEBA\x006\0A\xB4\xEBA\x9C\xDE-.A\xBC\xEBA\xCC\xAB6\0A\xC0\xEBA\x006\0A\xBC\xEBA\xA4\xDE-.A\xC4\xEBA\xC0\xAC6\0A\xC8\xEBA\x006\0A\xC4\xEBA\xAC\xDE-.A\xCC\xEBA\xB4\xAD6\0A\xD0\xEBA\x006\0A\xCC\xEBA\xB4\xDE-.A\xD4\xEBA\xDC\xAE6\0A\xD8\xEBA\x006\0A\xD4\xEBA\xBC\xDE-.A\xDC\xEBA\x84\xB06\0A\xE0\xEBA\x006\0A\xDC\xEBA\xC4\xDE-.A\xE4\xEBA\xAC\xB16\0A\xE8\xEBA\x006\0A\xE4\xEBA\xCC\xDE-.A\xF4\xEBA\xD8\xA36\0A\xEC\xEBA\xA8\xA36\0A\xF0\xEBA\x006\0A\xEC\xEBA\xF4\xDD-.A\x80\xECA\xE4\xA56\0A\xF8\xEBA\xB4\xA56\0A\xFC\xEBA\x006\0A\xF8\xEBA\xFC\xDD-.A\x84\xECA\x90\x936\0A\x88\xECA\x006\0*!\0A\x84\xECA\xA4\xA76\0A\x8C\xEC \x006\0A\x84\xECA\x84\xDE-.A\x90\xECA\x90\x936\0A\x94\xECA\x006\0*!\0A\x90\xECA\xC4\xA86\0A\x98\xEC \x006\0A\x90\xECA\x8C\xDE-.A\x9C\xECA\xD4\xB26\0A\xA0\xECA\x006\0A\x9C\xECA\xD4\xDE-.A\xA4\xECA\xCC\xB36\0A\xA8\xECA\x006\0A\xA4\xECA\xDC\xDE-.A\x8C\xE0A:\0\0A\x88\xE0A\xEC\xDE6\0\vA\x90\xE0A\x88\xE0(\0"\x006\0 \0A\xEC\xDEG@ \0 \0(Aj6\vA\x94\xE0A:\0\0\vA\x90\xE0(\0"\x006\0 \0A\xEC\xDEG@ \0 \0(Aj6\v\v\xB1\x7F \0A\xC8\x876\0 \0A\bj!@ \0(\f \0(\b"kAu K@@ Atj(\0"E\r\0 ("Ak6 \r\0 (\0(\b\0\v Aj!\f\v\v \0A\x90j #\0Ak"$\0 6\f (\f"(\0"@ 6 (\b A\fj \xE2\v Aj$\0 \0\v \0 \0A\x98\x906\0 \0(\b*G@ \0(\b\xA6\v \0\v\0A\x7F\v\x9D\x07 \x7F \x006\0AA\0 \x07\x1B! A\x80q!@ AF@ \r( \r,\0\v" A\0H"\x1B"AK@ (\0! AtAk"@ \r(\0 \r \x1BAj \xFC
- \0\0\v j6\0\v A\xB0q"AG@ A F\x7F (\0 \0\v6\0\v@@@@@@ \b j-\0\0\0\v (\x006\0\f\v (\x006\0 A (\0(,\0!\x07 (\0"Aj6\0 \x076\0\f\v \r( \r,\0\v"\x07 \x07A\0H"\x07\x1BE\r \r(\0 \r \x07\x1B(\0!\x07 (\0"Aj6\0 \x076\0\f\v E\r \f( \f,\0\v"\x07 \x07A\0H"\x1B"E\r (\0!\x07 At"@ \x07 \f(\0 \f \x1B \xFC
- \0\0\v \x07 j6\0\f\v (\0 j"!\x07@@ \x07M\r\0 A\xC0\0 \x07(\0 (\0(\f\0E\r\0 \x07Aj!\x07\f\v\v A\0J@ (\0! !@ E \x07OrE@ Ak! \x07Ak"\x07(\0! Aj"6\0 6\0 !\f\v\v \x7F A0 (\0(,\0A\0\v! (\0!@ A\0LE@ Aj"6\0 6\0 Ak! !\f\v\v (\0"Aj6\0 6\0\v@ \x07F@ A0 (\0(,\0!\x07 (\0"Aj6\0 \x076\0\f\v \v( \v,\0\v" A\0H"\x1B\x7F \v(\0 \v \x1B,\0\0A\x7F\v!A\0!A\0!@ \x07F\r@ G@ !\f\v (\0"Aj6\0
- 6\0A\0! Aj" \v( \v,\0\v" A\0H\x1BO@ !\f\vA\x7F! \v(\0" \v A\0H"\x1B j-\0\0A\xFF\0F\r\0 \v \x1B j,\0\0!\v \x07Ak"\x07(\0! (\0"Aj6\0 6\0 Aj!\f\0\v\0\v (\0\x8F\v Aj!\f\v\v\v\x8A\x7F#\0Ak"
- $\0@ \0@ \xFE!\f\v \xFD!\v@ @
- Aj"\0 (\0(,\0
- (6\0\0 \0 (\0( \0\f\v
- Aj"\0 (\0((\0
- (6\0\0 \0 (\0(\0\v \b \0| \0 (\0(\f\0\x006\0 (\0(\0\x006\0
- Aj"\0 (\0(\0 \0X \0 \0 (\0(\0 \x07 \0| \0 (\0($\0\x006\0
- Aj$\0\v\x7FA\f9"\0A\x006\b \0B\x007\0 \0\v\xF7 \x7F \x006\0 A\x80q!@ AF@ \r( \r,\0\v" A\0H"\x1B"AK@ (\0! Ak"@ \r(\0 \r \x1BAj \xFC
- \0\0\v j6\0\v A\xB0q"AG@ A F\x7F (\0 \0\v6\0\v@@@@@@ \b j-\0\0\0\v (\x006\0\f\v (\x006\0 A (\0(\0! (\0"Aj6\0 :\0\0\f\v \r( \r,\0\v" A\0H"\x1BE\r \r(\0 \r \x1B-\0\0! (\0"Aj6\0 :\0\0\f\v E\r \f( \f,\0\v" A\0H"\x1B"E\r (\0! @ \f(\0 \f \x1B \xFC
- \0\0\v j6\0\f\v (\b! (\0 \x07j"!@@ M\r\0 ,\0\0"A\0H\r\0 Atj-\0\0A\xC0\0qE\r\0 Aj!\f\v\v "A\0J@@ E OrE@ Ak! Ak"-\0\0! (\0"Aj6\0 :\0\0\f\v\v \x7F A0 (\0(\0A\0\v!@ (\0"Aj6\0 A\0LE@ :\0\0 Ak!\f\v\v :\0\0\v@ F@ A0 (\0(\0! (\0"Aj6\0 :\0\0\f\v \v( \v,\0\v" A\0H"\x1B\x7F \v(\0 \v \x1B,\0\0A\x7F\v!A\0!A\0!@ F\r@ G@ !\f\v (\0"Aj6\0
- :\0\0A\0! Aj" \v( \v,\0\v" A\0H\x1BO@ !\f\vA\x7F! \v(\0" \v A\0H"\x1B j-\0\0A\xFF\0F\r\0 \v \x1B j,\0\0!\v Ak"-\0\0! (\0"Aj6\0 :\0\0 Aj!\f\0\v\0\v (\0c\v Aj!\f\v\v\v\x8A\x7F#\0Ak"
- $\0@ \0@ \x83!\f\v \x82!\v@ @
- Aj"\0 (\0(,\0
- (6\0\0 \0 (\0( \0\f\v
- Aj"\0 (\0((\0
- (6\0\0 \0 (\0(\0\v \b \0X \0 (\0(\f\0\0:\0\0 (\0(\0\0:\0\0
- Aj"\0 (\0(\0 \0X \0 \0 (\0(\0 \x07 \0X \0 (\0($\0\x006\0
- Aj$\0\v
- \0 \0A\xA4\xDE^\v
- \0 \0A\xAC\xDE^\v\xD7\x7F@A\xF6\xFF\xFF\xFF k O@ \0,\0\vA\0H! \0(\0A\xF7\xFF\xFF\xFF! A\xF2\xFF\xFF\xFFM@ j" At" K\x1BArAj!\v \0 \x1B! U!@ E\r\0 At"\x07E\r\0 \x07\xFC
- \0\0\v@ F\r\0 kAt"\x07E\r\0 At" j j \x07\xFC
- \0\0\v AG@ !\v \0 6\0 \0 A\x80\x80\x80\x80xr6\b\f\v0\0\v \0 6\v\xD8\x7F#\0A\x90k"\v$\0 \v
- 6\x88 \v 6\x8C@ \0 \vA\x8Cj(@ (\0Ar6\0A\0!\0\f\v \vA\xE3\x006l \v \vA\xF0\0j"6h \v 6d \v \vA\x80j6\` \vA\x006P \vB\x007H \vA\x006@ \vB\x0078 \vA\x0060 \vB\x007( \vA\x006 \vB\x007 \vA\x006 \vB\x007\b \vA\xC8\0j \vA8j!\f \vA(j \vAj#\0Ak"
- $\0@ @
- Aj" \xFE" (\0(,\0\f\v
- Aj" \xFD" (\0(,\0\v \v
- (6\0\\ (\0( \0 | (\0(\0 | \v (\0(\f\0\x006X \v (\0(\0\x006T (\0(\0 X (\0(\0 \f | \v (\0($\0\x006
- Aj$\0 \b(\x006\0 A\x80q!A\0!A\0!
- @
- !@@\x7F@@@@ AF\r\0 \0 \vA\x8Cj(\r\0A\0!@@@@@@ \vA\xDC\0j j"\f-\0\0\0\f\v AF\r
- \x07A \0: \x07(\0(\f\0\r\x07 (\0Ar6\0A\0!\0\f\v AG\r\x07\f \v@ \v(, \v,\x003" A\0H\x1BE\r\0 \0: \v(( \vA(j" \v,\x003"A\0H\x1B(\0G\r\0 \0Q A\0:\0\0 \v(, \v,\x003" A\0H\x1BAK\x1B!
- \f
- \v \v( \v,\0#"
-
- A\0H\x1B@ \0: \v( \vAj \v,\0#"
- A\0H\x1B(\0F\r \v-\x003!\v \v(
-
- A\0H\x1B!@ \v(, A\xFFq \xC0A\0H\x1B"@ E\r (\0Ar6\0A\0!\0\f\v E\r \v A\0G:\0\0\f\b\v AIrrE@A\0!
- AF \v-\0_A\0GqE\r \v \v(8" \vA8j \v,\0C"
- A\0H\x1B!@ E\r\0 \fAk-\0\0AK\r\0@@ \vA8j
- \xC0A\0H"\f\x1B \v(<
- A\xFFq \f\x1BAtjF\r\0 \x07A (\0 \x07(\0(\f\0 \v(8! \v-\0C!
- E\r\0 Aj!\f\v\v \vA8j
- \xC0A\0H\x1B"\fkAu"\r \v(\f \v,\0" A\0H"\x1B"M\x7F At \v(\b \vA\bj \x1Bj"
- \rAtk!#\0Ak"\r$\0 \f
- kA|qhE \rAj$\0\r \v-\0C!
- \v(8 \v \vA8j
- \xC0A\0H\x1B!\v@@ \v(8 \vA8j \v,\0C"A\0H"
- \x1B \v(<
- \x1BAtjF\r\0 \0 \vA\x8Cj(\r\0 \0: (\0G\r\0 \0Q Aj!\f\v\v E\r\x07 !
- \v(8 \vA8j \v,\0C"A\0H"\x1B \v(< \x1BAtjF\r\b (\0Ar6\0A\0!\0\f\v@@ \0 \vA\x8Cj(\r\0\x7F \x07A\xC0\0 \0:"
- \x07(\0(\f\0@ (\0" \v(\x88F@ \b \vA\x88jk (\0!\v Aj6\0
- 6\0 Aj\f\v \v(L \v,\0S" A\0H\x1BE Er\r
- \v(TG\r \v(d"
- \v(\`F@ \vA\xE8\0j \vA\xE4\0j \vA\xE0\0jk \v(d!
- \v \v
- Aj6d
- 6\0A\0\v! \0Q\f\v\v E \v(d"
- \v(hFrE@ \v(\`
- F@ \vA\xE8\0j \vA\xE4\0j \vA\xE0\0jk \v(d!
- \v \v
- Aj6d
- 6\0\v@ \v(A\0L\r\0@ \0 \vA\x8Cj(E@ \0: \v(XF\r\v (\0Ar6\0A\0!\0\f\v@ \0Q \v(A\0L\r@ \0 \vA\x8Cj(E@ \x07A\xC0\0 \0: \x07(\0(\f\0\r\v (\0Ar6\0A\0!\0\f\v (\0 \v(\x88F@ \b \vA\x88jk\v \0:! (\0"Aj6\0 6\0 \v \v(Ak6\f\0\v\0\v !
- (\0 \b(\0G\r\x07 (\0Ar6\0A\0!\0\f\v \0Q A:\0\0 \vAj \v( \v,\0#" A\0H\x1BAK\x1B!
- \f\v@ E\r\0A!\x07@ \x07 ( ,\0\v" A\0H\x1BO\r@ \0 \vA\x8Cj(E@ \0: \x07At (\0 ,\0\vA\0H\x1Bj(\0F\r\v (\0Ar6\0A\0!\0\f\v \0Q \x07Aj!\x07\f\0\v\0\vA!\0 \v(h" \v(d"F\r\0A\0!\0 \vA\x006\0 \vA\xC8\0j \v5 \v(\0@ (\0Ar6\0\f\vA!\0\v \vA\bj \vAj \vA(j \vA8j \vA\xC8\0j \v(h! \vA\x006h E\r \v(l\0\f\vA\0\f\vA\v!@ E@ \vA\bj \0(\0B\xDDA!\f\v \0 \vA\x8Cj(\r \x07A \0: \x07(\0(\f\0E\rA\0!\f\0\v\0\v !
- \v Aj!\f\0\v\0\v \vA\x90j$\0 \0\v\0 \0@ \01\v \0!\v
- \0 \0A\x94\xDE^\v
- \0 \0A\x9C\xDE^\v\xB8\x7F (\0!\x07A\0 \0(\0" \0(A\xE3\0F"\x1BA\x7FA (\0 k"At" AM\x1B A\xFF\xFF\xFF\xFF\x07O\x1B"\b\x9D"@@ E@ \0 6\0\f\v \0(\0! @ \xFC
- \0\0\v \0 6\0 E\r\0 \0(\0 \0(\0!\v \0A\xE4\x006 \x07 kj6\0 \0(\0 \bj6\0\v0\0\v\xEE\x7F#\0A\x90k"\v$\0 \v
- 6\x88 \v 6\x8C@ \0 \vA\x8Cj)@ (\0Ar6\0A\0!\0\f\v \vA\xE3\x006l \v \vA\xF0\0j"6h \v 6d \v \vA\x80j6\` \vA\x006P \vB\x007H \vA\x006@ \vB\x0078 \vA\x0060 \vB\x007( \vA\x006 \vB\x007 \vA\x006 \vB\x007\b \vA\xC8\0j \vA8j! \vA(j \vAj#\0Ak"
- $\0@ @
- Aj" \x83" (\0(,\0\f\v
- Aj" \x82" (\0(,\0\v \v
- (6\0\\ (\0( \0 X (\0(\0 X \v (\0(\f\0\0:\0[ \v (\0(\0\0:\0Z (\0(\0 X (\0(\0 X \v (\0($\0\x006
- Aj$\0 \b(\x006\0 A\x80q!A\0!A\0!
- @@
- !@@@@@@@\x7F@@@ AF\r\0 \0 \vA\x8Cj)\r\0A\0!@@@@@@ \vA\xDC\0j j"\f-\0\0\0\v AF\r\r \0;"A\0N@ \x07(\b Atj-\0\0Aq\r\x07\v (\0Ar6\0A\0!\0\f\v AG\r\f\f\v@ \v(, \v,\x003" A\0H\x1BE\r\0 \0;A\xFFq \v(( \vA(j" \v,\x003"A\0H\x1B-\0\0G\r\0 \0S A\0:\0\0 \v(, \v,\x003" A\0H\x1BAK\x1B!
- \f\v \v( \v,\0#"
-
- A\0H\x1B@ \0;A\xFFq \v( \vAj \v,\0#"
- A\0H\x1B-\0\0F\r \v-\x003!\v \v(
-
- A\0H\x1B!@ \v(, A\xFFq \xC0A\0H\x1B"@ E\r (\0Ar6\0A\0!\0\f\v E\r\f\v A\0G:\0\0\f\v\v AIrrE@A\0!
- AF \v-\0_A\0GqE\r\r\v \v(8" \vA8j \v,\0C"\rA\0H"\x1B! E\r\b \fAk-\0\0AK\r\b \v(< \r \x1Bj! \x07(\b!\f !
- @
- F\r\b
- ,\0\0"A\0H\r\x07 \f Atj-\0\0AqE\r\x07
- Aj!
- \f\0\v\0\v@@ \0 \vA\x8Cj)\r\0\x7F@ \0;"
- A\0H\r\0 \x07(\b
- Atj-\0\0A\xC0\0qE\r\0 (\0" \v(\x88F@ \b \vA\x88j\x84 (\0!\v Aj6\0
- :\0\0 Aj\f\v \v(L \v,\0S" A\0H\x1BE Er\r \v-\0Z
- A\xFFqG\r \v(d"
- \v(\`F@ \vA\xE8\0j \vA\xE4\0j \vA\xE0\0jk \v(d!
- \v \v
- Aj6d
- 6\0A\0\v! \0S\f\v\v E \v(d"
- \v(hFrE@ \v(\`
- F@ \vA\xE8\0j \vA\xE4\0j \vA\xE0\0jk \v(d!
- \v \v
- Aj6d
- 6\0\v@ \v(A\0L\r\0@ \0 \vA\x8Cj)E@ \0;A\xFFq \v-\0[F\r\v (\0Ar6\0A\0!\0\f\v@ \0S \v(A\0L\r@@ \0 \vA\x8Cj)\r\0 \0;"A\0H\r\0 \x07(\b Atj-\0\0A\xC0\0q\r\v (\0Ar6\0A\0!\0\f\v (\0 \v(\x88F@ \b \vA\x88j\x84\v \0;! (\0"Aj6\0 :\0\0 \v \v(Ak6\f\0\v\0\v !
- (\0 \b(\0G\r\v (\0Ar6\0A\0!\0\f\f\v \0S A:\0\0 \vAj \v( \v,\0#" A\0H\x1BAK\x1B!
- \f
- \v@ E\r\0A!@ ( ,\0\v" A\0H\x1BO\r@ \0 \vA\x8Cj)E@ \0;A\xFFq (\0 ,\0\vA\0H\x1B j-\0\0F\r\v (\0Ar6\0A\0!\0\f\r\v \0S Aj!\f\0\v\0\vA!\0 \v(h" \v(d"F\r
- A\0!\0 \vA\x006\0 \vA\xC8\0j \v5 \v(\0@ (\0Ar6\0\f\v\vA!\0\f
- \vA\0\f\vA\v!@ E@ \vA\bj \0(\0@\xC0\xAAA!\f\v \0 \vA\x8Cj)\r \0;"A\0H\r \x07(\b Atj-\0\0AqE\rA\0!\f\0\v\0\v
- !\v k"
- \v(\f \v,\0"\f \fA\0H"\f\x1B"M@ \v(\b \vA\bj \f\x1B j"\r
- k"
- \r
- khE\r \v(8! \v-\0C!\r\v \vA8j \r\xC0A\0H\x1B!\f\v !\v@@ \v(8 \vA8j \v,\0C"A\0H"
- \x1B \v(<
- \x1BjF\r\0 \0 \vA\x8Cj)\r\0 \0;A\xFFq -\0\0G\r\0 \0S Aj!\f\v\v \r\v !
- \f\v !
- \v(8 \vA8j \v,\0C"A\0H"\x1B \v(< \x1BjF\r\0 (\0Ar6\0A\0!\0\f\v Aj!\f\v\v \vA\bj \vAj \vA(j \vA8j \vA\xC8\0j \v(h! \vA\x006h E\r\0 \v(l\0\v \vA\x90j$\0 \0\v\v\0 \0AA-\xDF\v\v\0 \0AA-\xE1\vd\x7F#\0Ak"$\0 A\0:\0 :\0 :\0\r A%:\0\f @ :\0 :\0\r\v (\0 k A\fj \0(\0\xB4 j6\0 Aj$\0\vA\0 AN! -\0\0AqE@ \0 A\xD0j A\xECj A\xE4\0I\x1B A\xC5\0H\x1BA\xECk6\0\v\v@\0 \0A\bj \0(\b(\0\0"\0 \0A\xA0j A\0\x95 \0k"\0A\x9FL@ \0A\fmA\fo6\0\v\v@\0 \0A\bj \0(\b(\0\0\0"\0 \0A\xA8j A\0\x95 \0k"\0A\xA7L@ \0A\fmA\x07o6\0\v\vA\0 AO! -\0\0AqE@ \0 A\xD0j A\xECj A\xE4\0I\x1B A\xC5\0H\x1BA\xECk6\0\v\v@\0 \0A\bj \0(\b(\0\0"\0 \0A\xA0j A\0\x97 \0k"\0A\x9FL@ \0A\fmA\fo6\0\v\v@\0 \0A\bj \0(\b(\0\0\0"\0 \0A\xA8j A\0\x97 \0k"\0A\xA7L@ \0A\fmA\x07o6\0\v\v\0A\v\xBD\x7F#\0Ak"
- $\0 =!
- Aj n"\f \f(\0(\0 6\0@@ \0"\b-\0\0"A+k\0\0\v \xC0 (\0(,\0! (\0"\x07Aj6\0 \x07 6\0 \0Aj!\b\v@@ \b"kAL\r\0 -\0\0A0G\r\0 -\0A rA\xF8\0G\r\0 A0 (\0(,\0!\x07 (\0"\bAj6\0 \b \x076\0 ,\0 (\0(,\0!\x07 (\0"\bAj6\0 \b \x076\0 Aj"\b!@ M\r ,\0\0*!\xB8E\r Aj!\f\0\v\0\v@ M\r ,\0\0*!\xB7E\r Aj!\f\0\v\0\v@
- (\b
- ,\0"\x07 \x07A\0H\x1BE@ \b (\0 (\0(0\0 (\0 \bkAtj6\0\f\v \b c \f \f(\0(\0\0! \b!\x07@ \x07M@ \b \0kAtj (\0\x8F@
- ("
- Aj"
- ,\0A\0H"\x1B \rj,\0\0A\0L\r\0 \v \x1B \rj,\0\0G\r\0 (\0"\vAj6\0 \v 6\0A\0!\v \r \r
- (\b
- ,\0" A\0H\x1BAkIj!\r\v \x07,\0\0 (\0(,\0! (\0"Aj6\0 6\0 \x07Aj!\x07 \vAj!\v\f\v\v\v@@@ M\r Aj!\x07 ,\0\0"A.G@ (\0(,\0! (\0"\bAj6\0 \b 6\0 \x07!\f\v\v \f \f(\0(\f\0\0! (\0"\bAj"\v6\0 \b 6\0\f\v (\0!\v !\x07\v \x07 \v (\0(0\0 (\0 \x07kAtj"6\0 \0kAtj F\x1B6\0
- Aj
- Aj$\0\v\xC4\x7F#\0A\x90k"$\0A\bAA
- ("A\xCA\0q"\x07A\bF\x1B \x07A\xC0\0F"\b\x1B! A\x83j!@ E A\x80qEr\r\0 \b@ A0:\0\x83 A\x84j!\f\v \x07A\bG\r\0 A0:\0\x83 A\xD8\0A\xF8\0 A\x80\x80q\x1B:\0\x84 A\x85j!\v A\xF8\0j A\x90j \x94 (x!@ A\x88\x80qA\x88\x80G\r\0@ F\r -\0\0"A k A\xE1\0kA\xFFqAI\x1B:\0\0 Aj!\f\0\v\0\v A\x83j" G! Aj"\x07 $ Aj" A\fj A\bj \x07\x90 (# \0 (\f (\b \\ A\x90j$\0\vC\x7F#\0Ak"$\0 6\fA\xB0 A\xF0\xC7A\xCB,A A\fj"4A\xF0\xC7A\xCF,A 4 Aj$\0 \0\v\xAC\x7F#\0Ak"
- $\0 >!
- Aj p"\f \f(\0(\0 6\0@@ \0"\b-\0\0"A+k\0\0\v \xC0 (\0(\0! (\0"\x07Aj6\0 \x07 :\0\0 \0Aj!\b\v@@ \b"kAL\r\0 -\0\0A0G\r\0 -\0A rA\xF8\0G\r\0 A0 (\0(\0!\x07 (\0"\bAj6\0 \b \x07:\0\0 ,\0 (\0(\0!\x07 (\0"\bAj6\0 \b \x07:\0\0 Aj"\b!@ M\r ,\0\0*!\xB8E\r Aj!\f\0\v\0\v@ M\r ,\0\0*!\xB7E\r Aj!\f\0\v\0\v@
- (\b
- ,\0"\x07 \x07A\0H\x1BE@ \b (\0 (\0( \0 (\0 \bkj6\0\f\v \b c \f \f(\0(\0\0! \b!\x07@ \x07M@ \b \0kj (\0c@
- ("
- Aj"
- ,\0A\0H"\x1B \rj,\0\0A\0L\r\0 \v \x1B \rj,\0\0G\r\0 (\0"\vAj6\0 \v :\0\0A\0!\v \r \r
- (\b
- ,\0" A\0H\x1BAkIj!\r\v \x07,\0\0 (\0(\0! (\0"Aj6\0 :\0\0 \x07Aj!\x07 \vAj!\v\f\v\v\v@@@ M@ !\x07\f\v Aj!\x07 ,\0\0"A.G\r \f \f(\0(\f\0\0! (\0"\bAj6\0 \b :\0\0\v \x07 (\0 (\0( \0 (\0 \x07kj"6\0 \0kj F\x1B6\0
- Aj
- Aj$\0\v (\0(\0! (\0"\bAj6\0 \b :\0\0 \x07!\f\0\v\0\v\xB9\x7F#\0A@j"$\0A\bAA
- ("A\xCA\0q"\x07A\bF\x1B \x07A\xC0\0F"\b\x1B! A3j!@ E A\x80qEr\r\0 \b@ A0:\x003 A4j!\f\v \x07A\bG\r\0 A0:\x003 A\xD8\0A\xF8\0 A\x80\x80q\x1B:\x004 A5j!\v A(j A@k \x94 ((!@ A\x88\x80qA\x88\x80G\r\0@ F\r -\0\0"A k A\xE1\0kA\xFFqAI\x1B:\0\0 Aj!\f\0\v\0\v A3j" G! Aj"\x07 $ Aj" A\fj A\bj \x07\x93 (# \0 (\f (\b Z A@k$\0\v\xED\b\x7F#\0Ak"$\0A\xA5\bAA\xA0 A\xEE AAA\0A\0\fA\x92\fAA\xF4 A\xA8!AAA\0A\0\fA\x88\xCE-\0\0E@A\x88\xCEA:\0\0A\xAC!A\xB8\xC8\x07\vA\xFC A\x9C%A\xD4%A\0A\x8A&AA\x8D&A\0A\x8D&A\0A\x83A\x8F&A\x07
- A\xFC AA\x94&A\x98&A"A\b#\0Ak"\0$\0 \0A 6\fA\xFC A\x9CAA\x9C&A\xA8&A# \0A\fj4A\0A\0A\0 \0Aj$\0#\0Ak"\0$\0 \0A
- 6\fA\xFC A\xEDAA\xB0&A\xC0&A$ \0A\fj4A\0A\0A\0 \0Aj$\0#\0Ak"\0$\0 \0A\v6\fA\xFC A\x83AA\xC8&A\xD0&A% \0A\fj4A\0A\0A\0 \0Aj$\0#\0Ak"\0$\0 \0A\f6\fA\xFC A\xBF
- AA\xF8&A\x84'A& \0A\fj4A\0A\0A\0 \0Aj$\0#\0Ak"\0$\0 \0A\r6\fA\xFC A\xBB
- AA\x90'A\xA0'A' \0A\fj4A\0A\0A\0 \0Aj$\0A\xFC A\xB8\xC8A\x83A\xBF
- A\x94\xCE-\0\0E@A\x94\xCEA:\0\0A\xA8'A\xC0\xC7\x07\vA\xB4*A\xE0*A\x98+A\0A\xCE+AA\x8D&A\0A\x8D&A\0A\xD7A\xD1+A
- A\xB4*AA\xD4+A\xD8+A(A#\0Ak"\0$\0 \0A6\fA\xB4*A\x9CAA\xDC+A\xE8+A) \0A\fj4A\0A\0A\0 \0Aj$\0#\0Ak"\0$\0 \0A6\fA\xB4*A\xEDAA\xF0+A\x80,A* \0A\fj4A\0A\0A\0 \0Aj$\0#\0Ak"\0$\0 \0A6\fA\xB4*A\x83AA\x88,A\x90,A+ \0A\fj4A\0A\0A\0 \0Aj$\0#\0Ak"\0$\0 \0A6\fA\xB4*A\xBF
- AA\x9C,A\xA8,A, \0A\fj4A\0A\0A\0 \0Aj$\0#\0Ak"\0$\0 \0A6\fA\xB4*A\xBB
- AA\xB0,A\xC0,A- \0A\fj4A\0A\0A\0 \0Aj$\0A\xB4*A\xC0\xC7A\x83A\xBF
- A\xB0 A\xA9A\xC6,AA\xC8,A\b AjA\xEB
- A\0\x92A\xB6A\x92#\0Ak"\0$\0 \0A\b6\fA\xB0 A\xC2A\xA8\xC7A\xD4,A \0A\fj"4A\xA8\xC7A\xD8,A\x1B 4 \0Aj$\0A\x8A\vA\flA\xDF\vAlA\x94\vA$lA\xE6\vA0lA\xF5
- A<lA\xC8A\xC8\0lA\xB0 A\xE8,A\x94AAA\0A\xE8,A\xA3A\0A\xE8,A\xBDAA\xE8,A\xB9AA\xE8,A\xB5AA\xE8,A\xB1AA\xE8,A\x9FAA\xE8,A\x9BAA\xE8,A\x93A\x07A\xE8,A\x8FA\bA\xD0 A\xFC
- A\x89-AA\x8B-A\b#\0Ak"\0$\0 \0A\x006\fA\xD0 A\x83A\xE8,A\x8E-A \0A\fj"4A\xE8,A\x92-A! 4 \0Aj$\0A\xD0 Aj$\0\v3\x7F \0("j!@ F@ \0 6 A\0:\0\0 Aj!\f\v\v\v\xF1\x7F#\0A\xD0k"\0$\0 \0 6\xC8 \0 6\xCC R! \0A\xD0j~! \0A\xC4j \0A\xC4j} \0A\x006\xC0 \0B\x007\xB8 \0A\xB8j"A
- " \0 \0(\xB8 \0,\0\xC3A\0H\x1B"6\xB4 \0 \0Aj6\f \0A\x006\b@@ \0A\xCCj \0A\xC8j(\r\0 \0(\xB4 \0(\xBC \0,\0\xC3" A\0H\x1B"jF@ \0A\xB8j" At" A
- \0(\xC0A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xC3A\0N\x1B" \0 \0(\xB8 \0,\0\xC3A\0H\x1B" j6\xB4\v \0(\xCCC \0A\xB4j \0A\bj \0(\xC4 \0A\xC4j \0Aj \0A\fj m\r\0 \0(\xCCB\f\v\v@ \0(\xC8 \0,\0\xCF" A\0H\x1BE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f \0(\b6\0\v \0(\xB4 \x9D6\0 \0A\xC4j \0Aj \0(\f 5 \0A\xCCj \0A\xC8j(@ (\0Ar6\0\v \0(\xCC \0A\xB8j \0A\xC4j \0A\xD0j$\0\v8\x7F#\0Ak"$\0 6\f H6\b \0A\xEC\r (\f\xA9 A\bjI Aj$\0\v\xB1~\x7F#\0A k"\b$\0@@@ G@A\xF8\xD7(\0!\fA\xF8\xD7A\x006\0#\0Ak" $\0*#\0Ak"
- $\0#\0Ak"\v$\0 \v \bAjA\xBA \v)\0!
- \v)\b7\b
- 7\0 \vAj$\0
- )\0!
- )\b7\b 7\0
- Aj$\0 )\0! \b )\b7 \b 7\b Aj$\0 \b)! \b)\b!A\xF8\xD7(\0"E\r \b( G\r ! !\x07 A\xC4\0G\r\f\v A6\0\f\vA\xF8\xD7 \f6\0 \b( F\r\v A6\0 ! \x07!\v \0 7\0 \0 7\b \bA j$\0\v\xC0\x7F|#\0Ak"$\0@@@ \0 G@A\xF8\xD7(\0!A\xF8\xD7A\x006\0*#\0Ak"$\0 \0 A\fjA\xBA )\0 )\b\xC4! Aj$\0@A\xF8\xD7(\0"\0@ (\f F\r\f\vA\xF8\xD7 6\0 (\f G\r\f\v \0A\xC4\0G\r\f\v A6\0\f\vD\0\0\0\0\0\0\0\0!\v A6\0\v Aj$\0 \v\xBC\x7F}#\0Ak"$\0@@@ \0 G@A\xF8\xD7(\0!A\xF8\xD7A\x006\0*#\0Ak"$\0 \0 A\fjA\0\xBA )\0 )\b\xAB! Aj$\0@A\xF8\xD7(\0"\0@ (\f F\r\f\vA\xF8\xD7 6\0 (\f G\r\f\v \0A\xC4\0G\r\f\v A6\0\f\vC\0\0\0\0!\v A6\0\v Aj$\0 \v\xBD\x7F~#\0Ak"$\0~ \0 G@@@ \0-\0\0"A-G\r\0 \0Aj"\0 G\r\0\f\vA\xF8\xD7(\0!A\xF8\xD7A\x006\0* \0 A\fj \xBB!\x07@A\xF8\xD7(\0"\0@ (\f G\r \0A\xC4\0G\r A6\0B\x7F\f\vA\xF8\xD7 6\0 (\f F\r\0\f\vB\0 \x07} \x07 A-F\x1B\f\v\v A6\0B\0\v Aj$\0\v\xD8\x7F~#\0Ak"$\0\x7F@ \0 G@@@ \0-\0\0"A-G\r\0 \0Aj"\0 G\r\0\f\vA\xF8\xD7(\0!A\xF8\xD7A\x006\0* \0 A\fj \xBB!\x07@A\xF8\xD7(\0"\0@ (\f G\r \0A\xC4\0F \x07B\xFF\xFF\xFF\xFFVr\r\f\vA\xF8\xD7 6\0 (\fG\r \x07B\x80\x80\x80\x80T\r\v A6\0A\x7F\f\v\v A6\0A\0\f\vA\0 \x07\xA7"\0k \0 A-F\x1B\v Aj$\0\v\xE6\0#\0A\xE0k"\0$\0 \0 6\xD8 \0 6\xDC R! \0A\xC8j \0A\xD7j\x7F \0A\x006\xC0 \0B\x007\xB8 \0A\xB8j"A
- " \0 \0(\xB8 \0,\0\xC3A\0H\x1B"6\xB4 \0 \0Aj6\f \0A\x006\b@@ \0A\xDCj \0A\xD8j)\r\0 \0(\xB4 \0(\xBC \0,\0\xC3" A\0H\x1B"jF@ \0A\xB8j" At" A
- \0(\xC0A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xC3A\0N\x1B" \0 \0(\xB8 \0,\0\xC3A\0H\x1B" j6\xB4\v \0(\xDCA\xC0 \0A\xB4j \0A\bj \0,\0\xD7 \0A\xC8j \0Aj \0A\fjA\xD0\x85o\r\0 \0(\xDC@\f\v\v@ \0(\xCC \0,\0\xD3" A\0H\x1BE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f \0(\b6\0\v \0(\xB4 \x9D6\0 \0A\xC8j \0Aj \0(\f 5 \0A\xDCj \0A\xD8j)@ (\0Ar6\0\v \0(\xDC \0A\xB8j \0A\xC8j \0A\xE0j$\0\v\xDB\x7F~#\0Ak"$\0\x7F@ \0 G@@@ \0-\0\0"A-G\r\0 \0Aj"\0 G\r\0\f\vA\xF8\xD7(\0!A\xF8\xD7A\x006\0* \0 A\fj \xBB!\x07@A\xF8\xD7(\0"\0@ (\f G\r \0A\xC4\0F \x07B\xFF\xFFVr\r\f\vA\xF8\xD7 6\0 (\fG\r \x07B\x80\x80T\r\v A6\0A\xFF\xFF\f\v\v A6\0A\0\f\vA\0 \x07\xA7"\0k \0 A-F\x1B\v Aj$\0A\xFF\xFFq\v\xAC\x7F~#\0Ak"$\0@ \0 G@A\xF8\xD7(\0!A\xF8\xD7A\x006\0* \0 A\fj \xA3!@A\xF8\xD7(\0"\0@ (\f G\r \0A\xC4\0G\r A6\0B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F B\0U\x1B!\f\vA\xF8\xD7 6\0 (\f F\r\v\v A6\0B\0!\v Aj$\0 \v\xDD\x7F~#\0Ak"$\0\x7F@ \0 G@@A\xF8\xD7(\0!A\xF8\xD7A\x006\0* \0 A\fj \xA3!@A\xF8\xD7(\0"\0@ (\f G\r \0A\xC4\0G\r A6\0A\xFF\xFF\xFF\xFF\x07 B\0U\r\f\vA\xF8\xD7 6\0 (\f F\r\0\f\v B\xFF\xFF\xFF\xFFwW@ A6\0\f\v B\x80\x80\x80\x80\bY@ A6\0A\xFF\xFF\xFF\xFF\x07\f\v \xA7\f\v\v A6\0A\0\f\vA\x80\x80\x80\x80x\v Aj$\0\v\x88\x7F@ kAu"A\xF7\xFF\xFF\xFFI@@ AM@ \0 :\0\v\f\v Ar"AjU! \0 A\xFF\xFF\xFF\xFF\x07k6\b \0 6\0 \0 6 !\0\v k"E FrE@ \0 \xFC
- \0\0\v \0 jA\x006\0\f\v0\0\v\v\0 \0 B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F\xBE\v\x86\b\x7F (\0!@@@@@@@\x7F@@@@ E\r\0 (\0"E\r\0 \0E@ !\f\v A\x006\0 !\f\v@A\xCC\xCF(\0(\0E@ \0E\r E\r\f !@ ,\0\0"@ \0 A\xFF\xBFq6\0 \0Aj!\0 Aj! Ak"\r\f\v\v \0A\x006\0 A\x006\0 k\v ! \0E\r\f\v y\vA!\x07\f\vA\0\f\vA\v!\x07@ \x07E@ -\0\0Av"Ak Au jrA\x07K\r\x7F Aj" A\x80\x80\x80qE\r\0 ,\0\0A@N@ Ak!\f\x07\v Aj" A\x80\x80 qE\r\0 ,\0\0A@N@ Ak!\f\x07\v Aj\v! Ak!A!\x07\f\v@@ Aq ,\0\0"A\0Lr\r\0 (\0"A\x81\x82\x84\bk rA\x80\x81\x82\x84xq\r\0@ Ak! "Aj! ("A\x81\x82\x84\bk rA\x80\x81\x82\x84xqE\r\0\v\v \xC0A\0J@ Ak! Aj!\f\v\v A\xFFqA\xC2k"A2K\r Aj! At(\x80\x84!A\0!\x07\f\0\v\0\v@ \x07E@ E\r\x07@@ -\0\0"\x07\xC0"A\0L\r\0 Aq AIrE@@@ (\0"A\x81\x82\x84\bk rA\x80\x81\x82\x84xq\r \0 A\xFFq6\0 \0 -\06 \0 -\06\b \0 -\06\f \0Aj!\0 Aj! Ak"AK\r\0\v -\0\0!\v A\xFFq!\x07 \xC0A\0L\r\v \0 \x076\0 \0Aj!\0 Aj! Ak"\r\f \v\v \x07A\xC2k"A2K\r Aj! At(\x80\x84!A!\x07\f\v -\0\0"\bAv"Ak AujrA\x07K\r@@\x7F Aj" \bA\x80k Atr"\x07A\0N\r\0 -\0\0A\x80k"A?K\r \x07At"\br!\x07 Aj" \bA\0N\r\0 -\0\0A\x80k"A?K\r \x07Atr!\x07 Aj\v! \0 \x076\0 Ak! \0Aj!\0\f\vA\xF8\xD7A6\0 Ak!\f\vA\0!\x07\f\0\v\0\v Ak! \r -\0\0!\v A\xFFq\r\0 \0@ \0A\x006\0 A\x006\0\v k\vA\xF8\xD7A6\0 \0E\r\v 6\0\vA\x7F\v 6\0 \v#\x7F \0!@ "Aj! (\0\r\0\v \0kAu\v\0 \0\xBA@ \0!\v\v%\x7F#\0Ak"$\0 6\f \0A\xE9 \xA9 Aj$\0\v3\x7F A\x80\x80\x80\x80O@\x85\0\v \0 U"6 \0 6\0 \0 Atj6\b\v\xC9\x7F~#\0A\x90k"$\0 A\0A\x90\xFC\v\0 A\x7F6L \x006, A\xE2\x006 \x006T ! !#\0A\xB0k"$\0 (L@@ (E@ \xC8 (E\r\v -\0\0"E\r@@@@@ A\xFFq"\0_@@ "Aj! -\0_\r\0\v B\0J@\x7F ("\0 (hG@ \0Aj6 \0-\0\0\f\v %\v_\r\0\v (! )pB\0Y@ Ak"6\v (,k\xAC )x ||!\f\v\x7F@@ \0A%F@ -\0"\0A*F\r \0A%G\r\v B\0J@ -\0\0A%F@@\x7F ("\0 (hG@ \0Aj6 \0-\0\0\f\v %\v"_\r\0\v Aj!\f\v ("\0 (hG@ \0Aj6 \0-\0\0!\f\v %!\v -\0\0 G@ )pB\0Y@ (Ak6\v A\0N \rr\r
- \f \v ( (,k\xAC )x ||! !\f\vA\0!\x07 Aj\f\v@ \0A0k"\0A K\r\0 -\0A$G\r\0#\0Ak" 6\f \0AtjAk \0AK\x1B"\0Aj6\b \0(\0!\x07 Aj\f\v (\0!\x07 Aj! Aj\v!A\0!\vA\0! -\0\0"A0kA\xFFqA M@@ A
- l A\xFFqjA0k! -\0! Aj! A0kA\xFFqA
- I\r\0\v\v A\xFFqA\xED\0G\x7F A\0! \x07A\0G!\v -\0!A\0!
- Aj\v"Aj!A!\0@@@@@@ A\xFFqA\xC1\0k: \0 \v Aj -\0A\xE8\0F"\0\x1B!A~A\x7F \0\x1B!\0\f\v Aj -\0A\xEC\0F"\0\x1B!AA \0\x1B!\0\f\vA!\0\f\vA!\0\f\vA\0!\0 !\vA \0 -\0\0"\0A/qAF"\x1B!@ \0A r \0 \x1B"\fA\xDB\0F\r\0@ \fA\xEE\0G@ \fA\xE3\0G\rA AL\x1B!\f\v \x07 \xAA\f\v B\0J@\x7F ("\0 (hG@ \0Aj6 \0-\0\0\f\v %\v_\r\0\v (! )pB\0Y@ Ak"6\v (,k\xAC )x ||!\v \xAC"J@ ("\0 (hG@ \0Aj6\f\v %A\0H\r\v )pB\0Y@ (Ak6\vA!@@@@@@@@@@@@ \fA\xD8\0k!\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\0\v \fA\xC1\0k"\0AKA \0tA\xF1\0qEr\r
- \v A\bj A\0\xAD )xB\0 ( (,k\xAC}Q\r \x07E\r )! )\b! \x07 \v \fArA\xF3\0F@ A jA\x7FA\x81\xC6 A\0:\0 \fA\xF3\0G\r\b A\0:\0A A\0:\0. A\x006*\f\b\v A j -\0"\0A\xDE\0F"A\x81\xC6 A\0:\0 Aj Aj \x1B!\x7F@@ AA \x1Bj-\0\0"A-G@ A\xDD\0F\r \0A\xDE\0G!\b \f\v \0A\xDE\0G"\b:\0N\f\v \0A\xDE\0G"\b:\0~\v Aj\v!@@ -\0\0"\0A-G@ \0E\r \0A\xDD\0F\r
- \f\vA-!\0 -\0"E A\xDD\0Fr\r\0 Aj!@ Ak-\0\0"M@ !\0\f\v@ Aj" A jj \b:\0\0 -\0\0"\0I\r\0\v\v !\v A j \0j \b:\0 Aj!\f\0\v\0\vA\b!\f\vA
- !\f\vA\0!\vB\0!A\0!A\0!A\0!#\0Ak"\b$\0@ AG A$MqE@A\xF8\xD7A6\0\f\v@\x7F ("\0 (hG@ \0Aj6 \0-\0\0\f\v %\v"\0_\r\0\v@@ \0A+k\0\0\vA\x7FA\0 \0A-F\x1B! ("\0 (hG@ \0Aj6 \0-\0\0!\0\f\v %!\0\v@@@@ A\0G AGq \0A0GrE@\x7F ("\0 (hG@ \0Aj6 \0-\0\0\f\v %\v"\0A_qA\xD8\0F@A!\x7F ("\0 (hG@ \0Aj6 \0-\0\0\f\v %\v"\0A\xF1\x81j-\0\0AI\r )pB\0Y@ (Ak6\v B\0J\f\v \rA\b!\f\v A
- \x1B" \0A\xF1\x81j-\0\0K\r\0 )pB\0Y@ (Ak6\v B\0JA\xF8\xD7A6\0\f\v A
- G\r\0 \0A0k"A M@A\0!\0@ \0A
- l j"\0A\x99\xB3\xE6\xCCI\x7F (" (hG@ Aj6 -\0\0\f\v %\vA0k"A Mq\r\0\v \0\xAD!\v A K\r B
- ~! \xAD!@@\x7F ("\0 (hG@ \0Aj6 \0-\0\0\f\v %\v"\0A0k"A M |"B\x9A\xB3\xE6\xCC\x99\xB3\xE6\xCCTqE@ A M\r\f\v B
- ~" \xAD"B\x7F\x85X\r\v\vA
- !\f\v@@ Akq@ \0A\xF1\x81j-\0\0"K\r\f\v \0A\xF1\x81j-\0\0"M\r AlAvA\x07q,\0\xF1\x83!@ t"r! \x7F ("\0 (hG@ \0Aj6 \0-\0\0\f\v %\v"\0A\xF1\x81j-\0\0"M"E A\x80\x80\x80\xC0\0Iq\r\0\v \xAD! \rB\x7F \xAD"\x88" T\r@ \xADB\xFF\x83 \x86\x84! \x7F ("\0 (hG@ \0Aj6 \0-\0\0\f\v %\v"\0A\xF1\x81j-\0\0"M\r X\r\0\v\f\v@ lj! \x7F ("\0 (hG@ \0Aj6 \0-\0\0\f\v %\v"\0A\xF1\x81j-\0\0"M"E A\xC7\xE3\xF18Iq\r\0\v \xAD! \r \xAD!@ ~" \xADB\xFF\x83"B\x7F\x85V\r |! \x7F ("\0 (hG@ \0Aj6 \0-\0\0\f\v %\v"\0A\xF1\x81j-\0\0"M\r \b B\0 B\02 \b)\bP\r\0\v\v\v \0A\xF1\x81j-\0\0M\r\0@ \x7F ("\0 (hG@ \0Aj6 \0-\0\0\f\v %\vA\xF1\x81j-\0\0K\r\0\vA\xF8\xD7A\xC4\x006\0A\0!B\x7F!\v )pB\0Y@ (Ak6\v ArE B\x7FQq@A\xF8\xD7A\xC4\x006\0B~!\f\v \xAC"\x85 }!\v \bAj$\0 )xB\0 ( (,k\xAC}Q\r \x07E \fA\xF0\0GrE@ \x07 >\0\f\v \x07 \xAA\f\v \x07 \xAB8\0\f\v \x07 \xC49\0\f\v \x07 7\0 \x07 7\b\f\vA Aj \fA\xE3\0G"\x1B!\b\x7F AF@ \x07! \v@ \bAt/"E\r\v B\x007\xA8A\0!@@@ !\0@ \x7F (" (hG@ Aj6 -\0\0\f\v %\v"j-\0!E\r :\0\x1B Aj A\x1BjA A\xA8j\x98"A~F\r\0 A\x7FF@A\0! \f\v \0@ \0 Atj (6\0 Aj!\v \vE \bGr\r\0\v \0 \bAtAr"\bAt\x9D"\r\0\vA\0! \0!
- A!\v\f\b\vA\0! \0 A\xA8j\x7F (\xA8A\0\vE\r\v \0!
- \f\v \v@A\0! \b/"E\r@ !\0@ \x7F (" (hG@ Aj6 -\0\0\f\v %\v"j-\0!E@ \0! A\0\f\v \0 j :\0\0 Aj" \bG\r\0\v \0 \bAtAr"\b\x9D"\r\0\vA\0!
- \0! A!\v\f\vA\0! \x07@@ \x7F ("\0 (hG@ \0Aj6 \0-\0\0\f\v %\v"\0j-\0!@ \x07j \0:\0\0 Aj!\f \x07"\0! A\0\f\v\0\v\0\v@\x7F ("\0 (hG@ \0Aj6 \0-\0\0\f\v %\v j-\0!\r\0\vA\0!\0A\0! A\0\v!
- (! )pB\0Y@ Ak"6\v )x (,k\xAC|"P QrEr\r \v@ \x07 \x006\0\v \fA\xE3\0F\r\0
- @
- AtjA\x006\0\v E@A\0! \f\v jA\0:\0\0\v ( (,k\xAC )x ||! \r \x07A\0Gj!\r\v Aj! -\0"\r\f\v\vA!\vA\0! A\0!
- \v \rA\x7F \r\x1B!\r\v \vE\r !
- !\f\vA\x7F!\r\v A\xB0j$\0 A\x90j$\0 \r\vC\0@ \0E\r\0@@@@ Aj\0\v \0 <\0\0\v \0 =\0\v \0 >\0\v \0 7\0\v\v\xE4\x7F~#\0A k"$\0 B\xFF\xFF\xFF\xFF\xFF\xFF?\x83!\x07@ B0\x88B\xFF\xFF\x83"\b\xA7"A\x81\xFF\0kA\xFDM@ \x07B\x88\xA7!@ \0P B\xFF\xFF\xFF\x83"\x07B\x80\x80\x80\bT \x07B\x80\x80\x80\bQ\x1BE@ Aj!\f\v \0 \x07B\x80\x80\x80\b\x85\x84B\0R\r\0 Aq j!\vA\0 A\xFF\xFF\xFFK"\x1B!A\x81\x81\x7FA\x80\x81\x7F \x1B j!\f\v \0 \x07\x84P \bB\xFF\xFFRrE@ \x07B\x88\xA7A\x80\x80\x80r!A\xFF!\f\v A\xFE\x80K@A\xFF!\f\vA\x80\xFF\0A\x81\xFF\0 \bP"\x1B" k"A\xF0\0J@A\0!A\0!\f\v \x07 \x07B\x80\x80\x80\x80\x80\x80\xC0\0\x84 \x1B!\x07A\0! G@ Aj \0 \x07A\x80 k6 ) )\x84B\0R!\v \0 \x07 g )\b"\0B\x88\xA7!@ )\0 \xAD\x84"\x07P \0B\xFF\xFF\xFF\x83"\0B\x80\x80\x80\bT \0B\x80\x80\x80\bQ\x1BE@ Aj!\f\v \x07 \0B\x80\x80\x80\b\x85\x84B\0R\r\0 Aq j!\v A\x80\x80\x80s A\xFF\xFF\xFFK"\x1B!\v A j$\0 B \x88\xA7A\x80\x80\x80\x80xq Atr r\xBE\v\x89\x7F~@@\x7F@@\x7F \0(" \0(hG@ \0 Aj6 -\0\0\f\v \0%\v"A+k\0\0\v A-F E\x7F \0(" \0(hG@ \0 Aj6 -\0\0\f\v \0%\v"A:k"AuKr\r \0)pB\0S\r \0 \0(Ak6\f\v A:k! !A\0\v! AvI\r\0@ A0kA
- O\r\0A\0!@ A
- lj\x7F \0(" \0(hG@ \0 Aj6 -\0\0\f\v \0%\v!A0k! A\xCC\x99\xB3\xE6\0H A0k"A Mq\r\0\v \xAC! A
- O\r\0@ \xAD B
- ~|!\x7F \0(" \0(hG@ \0 Aj6 -\0\0\f\v \0%\v"A0k"A M B0}"B\xAE\x8F\x85\xD7\xC7\xC2\xEB\xA3Sq\r\0\v A
- O\r\0@\x7F \0(" \0(hG@ \0 Aj6 -\0\0\f\v \0%\vA0kA
- I\r\0\v\v \0)pB\0Y@ \0 \0(Ak6\vB\0 } \x1B!\f\vB\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F! \0)pB\0S\r\0 \0 \0(Ak6B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F\v \v\x842\x7F\x07~|#\0A0k"\r$\0@@ AK\r\0 At"(\xDC\x81! (\xD0\x81!@\x7F (" (hG@ Aj6 -\0\0\f\v %\v"_\r\0\vA!\b@@ A+k\0\0\vA\x7FA A-F\x1B!\b (" (hG@ Aj6 -\0\0!\f\v %!\v@@ A_qA\xC9\0F@@ A\x07F\r\x7F (" (hG@ Aj6 -\0\0\f\v %\v! ,\0\xAF\b Aj! A rF\r\0\v\v AG@ A\bF"\f\r E AIr\r \f\r\v )p"B\0Y@ (Ak6\v E AIr\r\0 B\0S!@ E@ (Ak6\v Ak"AK\r\0\v\vB\0!#\0Ak"$\0 \b\xB2C\0\0\x80\x7F\x94\xBC"A\xFF\xFF\xFFq!\b\x7F Av"A\xFFq"@ A\xFFG@ \b\xADB\x86! A\xFFqA\x80\xFF\0j\f\v \b\xADB\x86!A\xFF\xFF\f\vA\0 \bE\r\0 \b\xADB\0 \bg"A\xD1\0j6 )\bB\x80\x80\x80\x80\x80\x80\xC0\0\x85! )\0!A\x89\xFF\0 k\v! \r 7\0 \r \xADB0\x86 Av\xADB?\x86\x84 \x847\b Aj$\0 \r)\b! \r)\0!\f\v@@@@@@ \r\0A\0! A_qA\xCE\0G\r\0@ AF\r\x7F (" (hG@ Aj6 -\0\0\f\v %\v! ,\0\xFC\r Aj! A rF\r\0\v\v \0\v@\x7F (" (hG@ Aj6 -\0\0\f\v %\vA(F@A!\f\vB\x80\x80\x80\x80\x80\x80\xE0\xFF\xFF\0! )pB\0S\r (Ak6\f\v@\x7F (" (hG@ Aj6 -\0\0\f\v %\v"A0kA
- I A\xC1\0kAIr A\xDF\0FrE A\xE1\0kAOqE@ Aj!\f\v\vB\x80\x80\x80\x80\x80\x80\xE0\xFF\xFF\0! A)F\r )p"B\0Y@ (Ak6\v@ @ \r\f\vA\xF8\xD7A6\0B\0!\f\v@ B\0Y@ (Ak6\v Ak"\r\0\v\f\v )pB\0Y@ (Ak6\vA\xF8\xD7A6\0\v B\0J\f\v@ A0G\r\0\x7F (" (hG@ Aj6 -\0\0\f\v %\vA_qA\xD8\0F@#\0A\xB0k"$\0\x7F (" (hG@ Aj6 -\0\0\f\v %\v!@\x7F@ A0G@@ A.G\r (" (hF\r\0 Aj6 -\0\0\f\v (" (hG\x7FA! Aj6 -\0\0A! %\v!\f\v\v %\v"A0G@A!\v\f\v@ B}!\x7F (" (hG@ Aj6 -\0\0\f\v %\v"A0F\r\0\vA!\vA!\vB\x80\x80\x80\x80\x80\x80\xC0\xFF?!@@ !@@ A0k"\x07A
- I\r\0 A.G"\f A r"A\xE1\0kAKq\r \f\r\0 \v\rA!\v !\f\v A\xD7\0k \x07 A9J\x1B!@ B\x07W@ Atj! \f\v BX@ A0j ? A j B\0B\x80\x80\x80\x80\x80\x80\xC0\xFD?+ Aj )0 )8 ) " )("+ ) ) < )\b! )\0!\f\v E
- r\r\0 A\xD0\0j B\0B\x80\x80\x80\x80\x80\x80\x80\xFF?+ A@k )P )X <A!
- )H! )@!\v B|!A!\v (" (hG\x7F Aj6 -\0\0 %\v!\f\v\v~ E@@@ )pB\0Y@ ("Ak6 E\r Ak6 \vE\r Ak6\f\v \r\v B\0J\v A\xE0\0jD\0\0\0\0\0\0\0\0 \b\xB7\xA6T )\`! )h\f\v B\x07W@ !@ At! B|"B\bR\r\0\v\v@@@ A_qA\xD0\0F@ \xAC"B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7FR\r @ )pB\0Y\r\f\vB\0! B\0JB\0\f\vB\0! )pB\0S\r\v (Ak6\vB\0!\v E@ A\xF0\0jD\0\0\0\0\0\0\0\0 \b\xB7\xA6T )p! )x\f\v \v\x1BB\x86 |B }"A\0 k\xADU@A\xF8\xD7A\xC4\x006\0 A\xA0j \b? A\x90j )\xA0 )\xA8B\x7FB\xFF\xFF\xFF\xFF\xFF\xFF\xBF\xFF\xFF\0+ A\x80j )\x90 )\x98B\x7FB\xFF\xFF\xFF\xFF\xFF\xFF\xBF\xFF\xFF\0+ )\x80! )\x88\f\v A\xE2k\xAC W@ A\0N@@ A\xA0j B\0B\x80\x80\x80\x80\x80\x80\xC0\xFF\xBF\x7F< B\x80\x80\x80\x80\x80\x80\x80\xFF?\xB2! A\x90j )\xA0 A\0N"\x1B )\xA8 \x1B< At"r! B}! )\x98! )\x90! A\0N\r\0\v\v~ A k\xAD|"\xA7"A\0 A\0J\x1B \xADS\x1B"A\xF1\0O@ A\x80j \b? )\x88! )\x80!B\0\f\v A\xE0jA\x90 k\xC8T A\xD0j \b? )\xD0! A\xF0j )\xE0 )\xE8 )\xD8"\xB1 )\xF8! )\xF0\v! A\xC0j AqE B\0B\0dA\0G A Iqq"rr A\xB0j )\xC0 )\xC8+ A\x90j )\xB0 )\xB8 < A\xA0j B\0 \x1BB\0 \x1B+ A\x80j )\xA0 )\xA8 )\x90 )\x98< A\xF0j )\x80 )\x88 \xBC )\xF0" )\xF8"B\0B\0dE@A\xF8\xD7A\xC4\x006\0\v A\xE0j \xA7\xB0 )\xE0! )\xE8\f\vA\xF8\xD7A\xC4\x006\0 A\xD0j \b? A\xC0j )\xD0 )\xD8B\0B\x80\x80\x80\x80\x80\x80\xC0\0+ A\xB0j )\xC0 )\xC8B\0B\x80\x80\x80\x80\x80\x80\xC0\0+ )\xB0! )\xB8\v! \r 7 \r 7 A\xB0j$\0 \r)! \r)!\f\v )pB\0S\r\0 (Ak6\v !\x07 ! \b!\f !\bA\0!#\0A\x90\xC6\0k"$\0A\0 k" k!@\x7F@@ A0G@ A.G\r \x07(" \x07(hF\r \x07 Aj6 -\0\0\f\v \x07(" \x07(hG@ \x07 Aj6 -\0\0! \x07%!\vA!\f\v\v \x07%\v"A0F@@ B}!\x7F \x07(" \x07(hG@ \x07 Aj6 -\0\0\f\v \x07%\v"A0F\r\0\vA!\vA!\v\v A\x006\x90~@@@@ A.F" A0k"A Mr@@@ Aq@ \vE@ !A!\v\f\v E!\f\v B|! A\xFCL@ \xA7 A0F\x1B! A\x90j Atj"
- \x7F (\0A
- ljA0k \v6\0A!A\0
- Aj" A F"\x1B!
- j! \f\v A0F\r\0 (\x80FAr6\x80FA\xDC\x8F!\v\x7F \x07(" \x07(hG@ \x07 Aj6 -\0\0\f\v \x07%\v"A.F" A0k"A
- Ir\r\0\v\v \v\x1B! E A_qA\xC5\0GrE@@ \x07 \b\xAC"B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7FR\r\0 \bE\rB\0! \x07)pB\0S\r\0 \x07 \x07(Ak6\v |!\f\v E! A\0H\r\v \x07)pB\0S\r\0 \x07 \x07(Ak6\v E\rA\xF8\xD7A6\0\v \x07B\0JB\0!B\0\f\v (\x90"E@ D\0\0\0\0\0\0\0\0 \f\xB7\xA6T )\b! )\0\f\v R B Ur AMA\0 v\x1BrE@ A0j \f? A j r Aj )0 )8 ) )(+ )! )\f\v Av\xAD S@A\xF8\xD7A\xC4\x006\0 A\xE0\0j \f? A\xD0\0j )\` )hB\x7FB\xFF\xFF\xFF\xFF\xFF\xFF\xBF\xFF\xFF\0+ A@k )P )XB\x7FB\xFF\xFF\xFF\xFF\xFF\xFF\xBF\xFF\xFF\0+ )H! )@\f\v A\xE2k\xAC U@A\xF8\xD7A\xC4\x006\0 A\x90j \f? A\x80j )\x90 )\x98B\0B\x80\x80\x80\x80\x80\x80\xC0\0+ A\xF0\0j )\x80 )\x88B\0B\x80\x80\x80\x80\x80\x80\xC0\0+ )x! )p\f\v
- @
- A\bL@ A\x90j Atj"(\0!@ A
- l!
- Aj"
- A G\r\0\v 6\0\v Aj! \v@ A N BUr \xA7"
- Hr\r\0 B Q@ A\xC0j \f? A\xB0j (\x90r A\xA0j )\xC0 )\xC8 )\xB0 )\xB8+ )\xA8! )\xA0\f\v B\bW@ A\x90j \f? A\x80j (\x90r A\xF0j )\x90 )\x98 )\x80 )\x88+ A\xE0jA\b
- kAt(\xB0\x81? A\xD0j )\xF0 )\xF8 )\xE0 )\xE8\xAF )\xD8! )\xD0\f\v
- A}ljA\x1Bj"ALA\0 (\x90" v\x1B\r\0 A\xE0j \f? A\xD0j r A\xC0j )\xE0 )\xE8 )\xD0 )\xD8+ A\xB0j
- AtA\x88\x81j(\0? A\xA0j )\xC0 )\xC8 )\xB0 )\xB8+ )\xA8! )\xA0\f\v@ "Ak! A\x90j Atj"Ak(\0E\r\0\vA\0!@
- A o"E@A\0!\f\v A j B\0S\x1B!@ E@A\0!A\0!\f\vA\x80\x94\xEB\xDCA\0 kAtA\xD0\x81j(\0"\vm!\x07A\0!A\0!A\0!@ A\x90j Atj"\b \b(\0" \vn"\bj"6\0 AjA\xFFq E Fq"\x1B!
- A k
- \x1B!
- \x07 \b \vlkl! Aj" G\r\0\v E\r\0 6\0 Aj!\v
- kA j!
- \v@ A\x90j Atj!
- A$H!\x07@@ \x07E@
- A$G\r (\0A\xD1\xE9\xF9O\r\v A\xFFj! A\0!@ !\b \xAD A\x90j A\xFFq"\vAtj"5\0B\x86|"B\x81\x94\xEB\xDCT\x7FA\0 B\x80\x94\xEB\xDC\x80"B\x80\x94\xEB\xDC~}! \xA7\v! >\0 \b \b \b \v B\0R\x1B \v \bAkA\xFFq"G\x1B \vF\x1B! \vAk! \vG\r\0\v Ak! \b! E\r\0\v AkA\xFFq" F@ A\x90j"\b A\xFEjA\xFFqAtj" (\0 At \bj(\0r6\0 !\v
- A j!
- A\x90j Atj 6\0\f\v\v@@ AjA\xFFq!\b A\x90j AkA\xFFqAtj!@A A
- A-J\x1B!@@ !A\0!@@@ jA\xFFq" F\r\0 A\x90j Atj(\0" At(\xA0\x81"I\r\0 I\r Aj"AG\r\v\v
- A$G\r\0B\0!A\0!B\0!@ jA\xFFq"F@ AjA\xFFq"At jA\x006\x8C\v A\x80j A\x90j Atj(\0r A\xF0j B\0B\x80\x80\x80\x80\xE5\x9A\xB7\x8E\xC0\0+ A\xE0j )\xF0 )\xF8 )\x80 )\x88< )\xE8! )\xE0! Aj"AG\r\0\v A\xD0j \f? A\xC0j )\xD0 )\xD8+B\0! )\xC8! )\xC0! A\xF1\0j" k" A\0 A\0J\x1B H"\b\x1B"\x07A\xF0\0M\r\f\v j! ! F\r\0\vA\x80\x94\xEB\xDC v!\vA\x7F tA\x7Fs!A\0! !@ A\x90j"\x07 Atj" (\0" vj"6\0 AjA\xFFq E Fq"\x1B!
- A k
- \x1B!
- q \vl! AjA\xFFq" G\r\0\v E\r \bG@ At \x07j 6\0 \b!\f\v (\0Ar6\0\f\v\v\v A\x90jA\xE1 \x07k\xC8T A\xB0j )\x90 )\x98 \xB1 )\xB8! )\xB0! A\x80jA\xF1\0 \x07k\xC8T A\xA0j )\x80 )\x88\xAE A\xF0j )\xA0" )\xA8"\xBC A\xE0j )\xF0 )\xF8< )\xE8! )\xE0!\v@ AjA\xFFq" F\r\0@ A\x90j Atj(\0"A\xFF\xC9\xB5\xEEM@ E AjA\xFFq Fq\r A\xF0j \f\xB7D\0\0\0\0\0\0\xD0?\xA2T A\xE0j )\xF0 )\xF8< )\xE8! )\xE0!\f\v A\x80\xCA\xB5\xEEG@ A\xD0j \f\xB7D\0\0\0\0\0\0\xE8?\xA2T A\xC0j )\xD0 )\xD8< )\xC8! )\xC0!\f\v \f\xB7!\x1B AjA\xFFqF@ A\x90j \x1BD\0\0\0\0\0\0\xE0?\xA2T A\x80j )\x90 )\x98< )\x88! )\x80!\f\v A\xB0j \x1BD\0\0\0\0\0\0\xE8?\xA2T A\xA0j )\xB0 )\xB8< )\xA8! )\xA0!\v \x07A\xEF\0K\r\0 A\xD0j B\0B\x80\x80\x80\x80\x80\x80\xC0\xFF?\xAE )\xD0 )\xD8B\0B\0d\r\0 A\xC0j B\0B\x80\x80\x80\x80\x80\x80\xC0\xFF?< )\xC8! )\xC0!\v A\xB0j < A\xA0j )\xB0 )\xB8 \xBC )\xA8! )\xA0!@ Ak A\xFF\xFF\xFF\xFF\x07qN\r\0 B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x837\x98 7\x90 A\x80j B\0B\x80\x80\x80\x80\x80\x80\x80\xFF?+ )\x90 )\x98B\x80\x80\x80\x80\x80\x80\x80\xB8\xC0\0\xB2! )\x88 A\0N"\x1B! )\x80 \x1B! \b \x07 G A\0Hrq B\0B\0dA\0GqE j"A\xEE\0jNq\r\0A\xF8\xD7A\xC4\x006\0\v A\xF0j \xB0 )\xF8! )\xF0\v! \r 7( \r 7 A\x90\xC6\0j$\0 \r)(! \r) !\f\vB\0!\f\vB\0!\v \0 7\0 \0 7\b \rA0j$\0\v\xC0\x7F~#\0A\x80k"$\0@@@ B\0B\0dE\r\0\x7F B\xFF\xFF\xFF\xFF\xFF\xFF?\x83!
- \x7F B0\x88\xA7A\xFF\xFFq"\x07A\xFF\xFFG@A \x07\rAA
- \x84P\x1B\f\v
- \x84P\v\vE\r\0 B0\x88\xA7"\bA\xFF\xFFq"A\xFF\xFFG\r\v Aj + )" )" \xAF )\b! )\0!\f\v B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83"
- B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83" dA\0L@
- d@ !\f\v A\xF0\0j B\0B\0+ )x! )p!\f\v B0\x88\xA7A\xFF\xFFq!\x07 ~ A\xE0\0j
- B\0B\x80\x80\x80\x80\x80\x80\xC0\xBB\xC0\0+ )h"
- B0\x88\xA7A\xF8\0k! )\`\v! \x07E@ A\xD0\0j B\0B\x80\x80\x80\x80\x80\x80\xC0\xBB\xC0\0+ )X" B0\x88\xA7A\xF8\0k!\x07 )P!\v B\xFF\xFF\xFF\xFF\xFF\xFF?\x83B\x80\x80\x80\x80\x80\x80\xC0\0\x84!\v
- B\xFF\xFF\xFF\xFF\xFF\xFF?\x83B\x80\x80\x80\x80\x80\x80\xC0\0\x84!
- \x07J@@~
- \v} V\xAD}" B\0Y@ }"\x84P@ A j B\0B\0+ )(! ) !\f\v B\x86 B?\x88\x84\f\v
- B\x86 B?\x88\x84\v!
- B\x86! Ak" \x07J\r\0\v \x07!\v@
- \v} V\xAD}" B\0S@
- ! \f\v }"\x84B\0R\r\0 A0j B\0B\0+ )8! )0!\f\v B\xFF\xFF\xFF\xFF\xFF\xFF?X@@ B?\x88 Ak! B\x86! B\x86\x84" B\x80\x80\x80\x80\x80\x80\xC0\0T\r\0\v\v \bA\x80\x80q!\x07 A\0L@ A@k B\xFF\xFF\xFF\xFF\xFF\xFF?\x83 A\xF8\0j \x07r\xADB0\x86\x84B\0B\x80\x80\x80\x80\x80\x80\xC0\xC3?+ )H! )@!\f\v B\xFF\xFF\xFF\xFF\xFF\xFF?\x83 \x07r\xADB0\x86\x84!\v \0 7\0 \0 7\b A\x80j$\0\v\x87\x7F~#\0A\xD0k"$\0 B\xFF\xFF\xFF\xFF\xFF\xFF?\x83!\v B\xFF\xFF\xFF\xFF\xFF\xFF?\x83!
- \x85B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F\x83!\f B0\x88\xA7A\xFF\xFFq!\x07@@ B0\x88\xA7A\xFF\xFFq"\bA\xFF\xFFkA\x82\x80~O@ \x07A\xFF\xFFkA\x81\x80~K\r\v P B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83"B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0T B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0Q\x1BE@ B\x80\x80\x80\x80\x80\x80 \x84!\f\f\v P B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83"B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0T B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0Q\x1BE@ B\x80\x80\x80\x80\x80\x80 \x84!\f !\f\v B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x85\x84P@ B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x85\x84P@B\0!B\x80\x80\x80\x80\x80\x80\xE0\xFF\xFF\0!\f\f\v \fB\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x84!\fB\0!\f\v B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x85\x84P@B\0!\f\v \x84P@B\x80\x80\x80\x80\x80\x80\xE0\xFF\xFF\0 \f \x84P\x1B!\fB\0!\f\v \x84P@ \fB\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x84!\fB\0!\f\v B\xFF\xFF\xFF\xFF\xFF\xFF?X@ A\xC0j
-
-
- P"\x1ByB\xC0\0B\0 \x1B|\xA7"Ak6A k! )\xC8!
- )\xC0!\v B\xFF\xFF\xFF\xFF\xFF\xFF?V\r\0 A\xB0j \v \v \vP" \x1ByB\xC0\0B\0 \x1B|\xA7" Ak6 jAk! )\xB8!\v )\xB0!\v A\xA0j \vB\x80\x80\x80\x80\x80\x80\xC0\0\x84"B\x86 B1\x88\x84"B\0B\x80\x80\x80\x80\xB0\xE6\xBC\x82\xF5\0 }"B\02 A\x90jB\0 )\xA8}B\0 B\02 A\x80j )\x98B\x86 )\x90B?\x88\x84"B\0 B\02 A\xF0j B\0B\0 )\x88}B\02 A\xE0j )\xF8B\x86 )\xF0B?\x88\x84"B\0 B\02 A\xD0j B\0B\0 )\xE8}B\02 A\xC0j )\xD8B\x86 )\xD0B?\x88\x84"B\0 B\02 A\xB0j B\0B\0 )\xC8}B\02 A\xA0j B\0 )\xB8B\x86 )\xB0B?\x88\x84B}"B\02 A\x90j B\x86B\0 B\02 A\xF0\0j B\0B\0 )\xA8 )\xA0" )\x98|" T\xAD| BV\xAD|}B\02 A\x80jB }B\0 B\02 \b \x07kj"\bA\xFF\xFF\0j!~ )p"B\x86"\r )\x88"B\x86 )\x80B?\x88\x84|"B\xE7\xEC\0}"B \x88"
- B\x80\x80\x80\x80\x80\x80\xC0\0\x84"B\x86"B \x88"~" B\x86"B \x88"\v V\xAD \r V\xAD )xB\x86 B?\x88\x84 B?\x88|||B}"B \x88"~|"\r T\xAD \r \r B\xFF\xFF\xFF\xFF\x83" B?\x88"
- B\x86\x84B\xFF\xFF\xFF\xFF\x83"
- ~|"\rV\xAD| ~| ~"
- ~|" T\xADB \x86 B \x88\x84| \r B \x86|" \rT\xAD| B\xFF\xFF\xFF\xFF\x83"
- ~"\r \v~|" \rT\xAD B\xFE\xFF\xFF\xFF\x83"\r~|"V\xAD||"V\xAD| ~" \r ~|"
- ~|"
- \v ~|"B \x88
- V\xAD T\xAD
- V\xAD||B \x86\x84|" T\xAD| \r~"
- \v ~|"B \x88
- T\xADB \x86\x84|"
- T\xAD
-
- B \x86|"
- V\xAD||"V\xAD|
- B \x86" \r ~| T\xADB\x7F\x85"V
- Rq\xAD|"V\xAD|"B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0X@ \x84! A\xD0\0j B\x80\x80\x80\x80\x80\x80\xC0\0T"\x07\xAD"\v\x86"
- \v\x86 B\x88 \x07A?s\xAD\x88\x84" 2 \bA\xFE\xFF\0j \x07\x1BAk! B1\x86 )X} )P"B\0R\xAD}!\vB\0 }\f\v A\xE0\0j B?\x86 B\x88\x84"
- B\x88" 2 B0\x86 )h} )\`"B\0R\xAD}!\v !B\0 }\v! A\xFF\xFFN@ \fB\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x84!\fB\0!\f\v~ A\0J@ \vB\x86 B?\x88\x84! B\xFF\xFF\xFF\xFF\xFF\xFF?\x83 \xADB0\x86\x84!\v B\x86\f\v A\x8F\x7FL@B\0!\f\v A@k
- A kg A0j A\xF0\0j6 A j )@"
- )H"\v2 )8 )(B\x86 ) "B?\x88\x84} )0" B\x86"T\xAD}! }\v! Aj BB\02 BB\02 \v
-
- B\x83" |"T T\xAD|" V Q\x1B\xAD|"
- T\xAD|" B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0T )V )"V Q\x1Bq\xAD|"V\xAD|" B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0T )\0V )\b"V Q\x1Bq\xAD|" T\xAD| \f\x84!\f\v \0 7\0 \0 \f7\b A\xD0j$\0\v\xBF\x7F#\0A\xD0\0k"$\0@ A\x80\x80N@ A j B\0B\x80\x80\x80\x80\x80\x80\x80\xFF\xFF\0+ )(! ) ! A\xFF\xFFI@ A\xFF\xFF\0k!\f\v Aj B\0B\x80\x80\x80\x80\x80\x80\x80\xFF\xFF\0+A\xFD\xFF A\xFD\xFFO\x1BA\xFE\xFFk! )! )!\f\v A\x81\x80\x7FJ\r\0 A@k B\0B\x80\x80\x80\x80\x80\x80\x809+ )H! )@! A\xF4\x80~K@ A\x8D\xFF\0j!\f\v A0j B\0B\x80\x80\x80\x80\x80\x80\x809+A\xE8\x81} A\xE8\x81}M\x1BA\x9A\xFEj! )8! )0!\v B\0 A\xFF\xFF\0j\xADB0\x86+ \0 )\b7\b \0 )\x007\0 A\xD0\0j$\0\v<\0 \0 7\0 \0 B\xFF\xFF\xFF\xFF\xFF\xFF?\x83 B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x83B0\x88\xA7 B0\x88\xA7A\x80\x80qr\xADB0\x86\x847\b\v\xC0\x7F~A\x7F!@ \0B\0R B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83"B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0V B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0Q\x1B\r\0 B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83"B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0V B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0Rq\r\0 \0 \x84\x84P@A\0\v \x83B\0Y@ R Sq\r \0 \x85\x84B\0R\v \0B\0R U Q\x1B\r\0 \0 \x85\x84B\0R!\v \v8\0 \0A\xD0k \0 \0A\x93\xF1\xFF\xFF\x07J\x1B"\0Aq@A\0\v \0A\xECj"\0A\xE4\0o@A\v \0A\x90oE\v\x85\x7F~#\0A\x80k"\b$\0 @\x7F@@\x7F@@@ -\0\0"A%G@ \r
- \f\x07\vA\0!A! @ -\0"\x07A-k\0\v \x07A\xDF\0F\r \x07\r\v \0
- j :\0\0
- Aj\f\v \x07! -\0!\x07A! \vA\0!@\x7F j \x07"A+Fj" ,\0\0A0kA M@ \bA\fjA
- B\xFF\xFF\xFF\xFF\xBE\xA7! \b(\f\f\v \b 6\fA\0! \v"\x07-\0\0"A\xC3\0k"\vAKA \vtA\x99\x80\x80qEr\r\0 "\r\0 \x07 G!\v A\xCF\0F A\xC5\0Fr\x7F \x07-\0! \x07Aj \x07\v! \bAj!\x07 ! A\0!#\0A\xD0\0k"\v$\0A\x8A !\rA0!A\xA8\x80\b!\f@ \b\x7F@@@@@@@\x7F@@@@@@@@@~@@@@@@@@@@@@@@@@@@@@@@@@@@ \xC0"A%kV!---------------------------'-\x07\b
- ---\r---- ------\0&-\b-\v--\f--%-\x1B-\v ("AM\r"\f*\v ("AK\r) A\x87\x80\bj\f"\v ("A\vK\r( A\x8E\x80\bj\f!\v ("A\vK\r' A\x9A\x80\bj\f \v 4B\xEC|B\xE4\0\x7F!\f#\vA\xDF\0!\v 4\f!\f!\vA\xD2!\r\f\v 4"B\xEC|!@ ("AL@ B\xEB| \xBDAF\x1B!\f\v A\xE9I\r\0 B\xED| \xBDAF\x1B!\v A\xE7\0F\r\f \v 4\b!\f\vA! (\b"E@B\f!\f \v \xAC"B\f} A\fJ\x1B!\f\v (Aj\xAC!A!\f\v (Aj\xAC!\f\x1B\v 4!\f\v \bA6|A\xD4!\f\vA\xA7\x80\bA\xA6\x80\b (\bA\vJ\x1B\f\vA\xF7!\r\f\vA\0!\fA\0!#\0Ak"$\0 4!~ ("\rA\fO@ \r \rA\fm"A\flk"A\fj A\0H\x1B!\r Auj\xAC |!\v A\fj! B}B\x88X@ \xA7"\fA\xC4\0kAu!@ \x7F \fAqE@ Ak! E\rA\f\v E\rA\0\v6\0\v \fA\x80\xE7\x84l A\x80\xA3ljA\x80\xD6\xAF\xE3\x07j\xAC\f\v B\xE4\0}" B\x90\x7F"B\x90~}"B?\x87\xA7 \xA7j!@@@ \xA7"A\x90j B\0S\x1B"\x7F\x7F A\xC8N@ A\xACO@A!\f A\xACk\f\vA!\f A\xC8k\f\v A\xE4\0k A\xE3\0J"\f\x1B\v"\rA\0A\v! \r\f\v Av! AqE! E\r\v 6\0\v B\x80\xE7\x84~ \fAl A\xE1\0ljj k\xACB\x80\xA3~|B\x80\xAA\xBA\xC3|\v! \rAtA\x80\xFE\0j(\0"A\x80\xA3j (\f\x1B \rAJ\x1B! (\f! 4\b! 4! 4\0 Aj$\0 \xAC| Ak\xACB\x80\xA3~| B\x90~| B<~|| 4$}\f\b\v 4\0!\f\v \bA6|A\xD6!\f\vA\xE4!\r\f\v ("A\x07 \x1B\xAC\f\v ( (kA\x07jA\x07n\xAD!\f\v ( (AjA\x07pkA\x07jA\x07n\xAD!\f\v \xBD\xAD!\f\v 4\v!A!\f\vA\xA9\x80\b!\f\f
- \vA\xAA\x80\b!\f\f \v 4B\xEC|B\xE4\0\x81" B?\x87"\x85 }!\f
- \v 4"B\xEC|! B\xA4?S\r
- \v 70 \b \x07A\x9B \vA0je6| \x07!\f\v ( A\0H@ \bA\x006|A\xD7!\f\v \v ($"A\x90m"A\xE4\0l A\x90lk\xC1A<m\xC1j6@ \b \x07A\xA1 \vA@ke6| \x07!\f\r\v ( A\0H@ \bA\x006|A\xD7!\f\r\v ((A\xB4\xDC(\0E@A\xAC\xDCA\xB0\xDCA\xC0\xDCA\xE0\xDCA\xB8\xDCA\xE0\xDC6\0A\xB4\xDCA\xC0\xDC6\0\v\f\v\v \bA6|A\xEA!\f\v\v B\xE4\0\x81!\f\v A\x80\x80\br\v \xB5\f\x07\vA\xAB\x80\b!\f\v \f \xB5!\r\v \b \x07A\xE4\0 \r \xB4"6| \x07A\0 \x1B!\f\vA!\f\vA!\v@ \x1B"A\xDF\0G@ A-G\r \v 7 \b \x07A\x9C \vAje6| \x07!\f\v \v 7( \v 6 \b \x07A\x95 \vA je6| \x07!\f\v \v 7\b \v 6\0 \b \x07A\x8E \ve6| \x07!\f\vA\x9C\v"y6|\v \vA\xD0\0j$\0 E\r@ E@ \b(|! \f\v\x7F@@ -\0\0"A+k\0\0\v \b(|\f\v -\0! Aj! \b(|Ak\v! @ A\xFFqA0G\r\0@ ,\0"\x07A0kA K\r Aj! Ak! \x07A0F\r\0\v\v \b 6|A\0!@ "\x07Aj! \x07j,\0\0A0kA
- I\r\0\v I\x1B!@ \0
- j (A\x94qH\x7FA- A+G\r k \x07jAA \b(\f-\0\0A\xC3\0F\x1BI\rA+\v:\0\0 Ak!
- Aj!
- \v M
- Mr\r\0@ \0
- jA0:\0\0
- Aj!
- Ak" M\r
- K\r\0\v\v \b
- k"\x07 \x07 K\x1B"\x076| \0
- j \x07Y \b(|
- j\v!
- Aj!
- K\r\v\v Ak
-
- F\x1B!
- A\0\v! \0
- jA\0:\0\0\v \bA\x80j$\0 \v\xB8\x7F \0AF@A\xF4\x1BA\x84 (\0\x1B\v \0A\xFF\xFFq"A\xFF\xFFG \0Au"AJrE@ Atj(\0"\0A\bjA\xAF \0\x1B\vA\xD7!\0@\x7F@@@ Ak\0\v AK\rA\xB0\xFE\0\f\v A1K\rA\xC0\xFE\0\f\v AK\rA\x80\x81\v!\0 E\r\0@ \0"Aj!\0 -\0\0\r\0 Ak"\r\0\v\v \0\v,\x7F A\0H@\x85\0\v \0 9"6 \0 6\0 \0 j6\b\v
- \0 \0A0kA
- I\v\0 \0A0kA
- I \0A rA\xE1\0kAIr\v\0 \0A r \0 \0A\xC1\0kAI\x1B\v'\0 \0A\0G \0A\xF8\xFC\0Gq \0A\x90\xFD\0Gq \0A\xF8\xDBGq \0A\x90\xDCGq\v\xE4\x7F@ -\0\0\r\0A\xFD\xBF"@ -\0\0\r\v \0A\flA\xB0\xFD\0j\xBF"@ -\0\0\r\vA\x8A\xBF"@ -\0\0\r\vA\xF2\x1B!\v@@ j-\0\0"E A/FrE@A! Aj"AG\r\f\v\v !\vA\xF2\x1B!@@@@@ -\0\0"A.F\r\0 j-\0\0\r\0 ! A\xC3\0G\r\v -\0E\r\v A\xF2\x1B\x9BE\r\0 A\xD1\x9B\r\v \0E@A\xD4\xFC\0! -\0A.F\r\vA\0\vA\xF4\xDB(\0"@@ A\bj\x9BE\r ( "\r\0\v\vA$/"@ A\xD4\xFC\0)\x007\0 A\bj" Y jA\0:\0\0 A\xF4\xDB(\x006 A\xF4\xDB 6\0\v A\xD4\xFC\0 \0 r\x1B!\v \v(\x7F \0(\0"@ CA\x7FG@ \0(\0E\v \0A\x006\0\vA\v(\x7F \0(\0"@ AA\x7FG@ \0(\0E\v \0A\x006\0\vA\vT\x7F@ \0(\0"E\r\0\x7F (" (F@ (\0(4\0\f\v 6\0 Aj6 \vA\x7FG\r\0 \0A\x006\0\v\v.\x7F#\0Ak"$\0 \x006\0A\x8F\f a\`A\xB0\xF1\0(\0L Aj$\0\v$\x7F@ \0(\0"E\r\0 \xC3A\x7FG\r\0 \0A\x006\0\v\v\0 \0AjK \0!\v=\x7F @ \0 \xB6 \0(! k"E FrE@ \xFC
- \0\0\v \0 j6\v\vB\x7F \0(" \0(F@ \0 A\xFFq \0(\0(4\0\v :\0\0 \0 \0(Aj6 A\xFFq\v\x96\x7F#\0Ak"$\0 \0 \0(\0A\fk(\0j(@ \x006\f A\0:\0\b \0 \0(\0A\fk(\0j"(E@ (H"@ \xC4\v A:\0\b\v@ -\0\bAG\r\0 \0 \0(\0A\fk(\0j(" (\0(\0\0A\x7FG\r\0 \0 \0(\0A\fk(\0jA\x99\v@ (\f"\0 \0(\0A\fk(\0j"\0(E\r\0 \0(\r\0 \0-\0A qE\r\0 (\f"\0 \0(\0A\fk(\0j("\0 \0(\0(\0\0A\x7FG\r\0 (\f"\0 \0(\0A\fk(\0jA\x99\v\v Aj$\0\v\0 \0A\bjK \0!\v\0A\x7F\v-\0 \0A\xC8\0j1 \0A<j1 \0A0j1 \0A$j1 \0Aj1 \0A\fj1\v|\x7F \0 \0(H"Ak r6H \0( \0(G@ \0A\0A\0 \0($\0\v \0A\x006 \0B\x007 \0(\0"Aq@ \0 A r6\0A\x7F\v \0 \0(, \0(0j"6\b \0 6 A\x1BtAu\v\xAD\v\x07\x7F \0 j!@@ \0("Aq\r\0 AqE\r \0(\0" j!@@@ \0 k"\0A\x90\xD8(\0G@ \0(\f! A\xFFM@ \0(\b"G\rA\xFC\xD7A\xFC\xD7(\0A~ Avwq6\0\f\v \0(! \0 G@ \0(\b" 6\f 6\b\f\v \0("\x7F \0Aj \0("E\r \0Aj\v!@ !\x07 "Aj! ("\r\0 Aj! ("\r\0\v \x07A\x006\0\f\v ("AqAG\rA\x84\xD8 6\0 A~q6 \0 Ar6 6\0\v 6\f 6\b\f\vA\0!\v E\r\0@ \0("At"(\xAC\xDA \0F@ A\xAC\xDAj 6\0 \rA\x80\xD8A\x80\xD8(\0A~ wq6\0\f\v@ \0 (F@ 6\f\v 6\v E\r\v 6 \0("@ 6 6\v \0("E\r\0 6 6\v@@@@ ("AqE@A\x94\xD8(\0 F@A\x94\xD8 \x006\0A\x88\xD8A\x88\xD8(\0 j"6\0 \0 Ar6 \0A\x90\xD8(\0G\rA\x84\xD8A\x006\0A\x90\xD8A\x006\0\vA\x90\xD8(\0"\b F@A\x90\xD8 \x006\0A\x84\xD8A\x84\xD8(\0 j"6\0 \0 Ar6 \0 j 6\0\v Axq j! (\f! A\xFFM@ (\b" F@A\xFC\xD7A\xFC\xD7(\0A~ Avwq6\0\f\v 6\f 6\b\f\v (! G@ (\b" 6\f 6\b\f\v ("\x7F Aj ("E\r Aj\v!@ !\x07 "Aj! ("\r\0 Aj! ("\r\0\v \x07A\x006\0\f\v A~q6 \0 Ar6 \0 j 6\0\f\vA\0!\v E\r\0@ ("At"(\xAC\xDA F@ A\xAC\xDAj 6\0 \rA\x80\xD8A\x80\xD8(\0A~ wq6\0\f\v@ (F@ 6\f\v 6\v E\r\v 6 ("@ 6 6\v ("E\r\0 6 6\v \0 Ar6 \0 j 6\0 \0 \bG\r\0A\x84\xD8 6\0\v A\xFFM@ A\xF8qA\xA4\xD8j!\x7FA\xFC\xD7(\0"A Avt"qE@A\xFC\xD7 r6\0 \f\v (\b\v! \x006\b \x006\f \0 6\f \0 6\b\vA! A\xFF\xFF\xFF\x07M@ A& A\bvg"kvAq AtrA>s!\v \0 6 \0B\x007 AtA\xAC\xDAj!@@A\x80\xD8(\0"A t"\x07qE@A\x80\xD8 \x07r6\0 \x006\0 \0 6\f\v A AvkA\0 AG\x1Bt! (\0!@ "(Axq F\r Av! At! Aqj"\x07("\r\0\v \x07 \x006 \0 6\v \0 \x006\f \0 \x006\b\v (\b" \x006\f \x006\b \0A\x006 \0 6\f \0 6\b\v\v\0 \0E@A\0\v \0 \xC5\v\0 \0 A4A5\xD0\v-\0 \0A\xCC\0j1 \0A@k1 \0A4j1 \0A(j1 \0Aj1 \0Aj1\v\xBC\0@@@@@@@@@@@ A k\0\b
- \b
-
-
- \b \x07\v (\0"Aj6\0 \0 (\x006\0\v (\0"Aj6\0 \0 2\x007\0\v (\0"Aj6\0 \0 3\x007\0\v (\0"Aj6\0 \0 0\0\x007\0\v (\0"Aj6\0 \0 1\0\x007\0\v (\0A\x07jAxq"A\bj6\0 \0 +\x009\0\v \0 \0\v\v (\0"Aj6\0 \0 4\x007\0\v (\0"Aj6\0 \0 5\x007\0\v (\0A\x07jAxq"A\bj6\0 \0 )\x007\0\vo\x7F \0(\0",\0\0A0k"A K@A\0\v@A\x7F! A\xCC\x99\xB3\xE6\0M@A\x7F A
- l"j A\xFF\xFF\xFF\xFF\x07sK\x1B!\v \0 Aj"6\0 ,\0 ! !A0k"A
- I\r\0\v \v\xF5\x7F~#\0A@j"\b$\0 \b 6< \bA)j! \bA'j! \bA(j!@@@@@A\0!\x07@ !\r \x07 A\xFF\xFF\xFF\xFF\x07sJ\r \x07 j!@@@@ "\x07-\0\0"\v@@@@ \vA\xFFq"E@ \x07!\f\v A%G\r \x07!\v@ \v-\0A%G@ \v!\f\v \x07Aj!\x07 \v-\0 \vAj"!\vA%F\r\0\v\v \x07 \rk"\x07 A\xFF\xFF\xFF\xFF\x07s"J\r \0@ \0 \r \x073\v \x07\r\x07 \b 6< Aj!\x07A\x7F!@ ,\0A0k"
- A K\r\0 -\0A$G\r\0 Aj!\x07A!
- !\v \b \x076<A\0!\f@ \x07,\0\0"\vA k"AK@ \x07!
- \f\v \x07!
- A t"A\x89\xD1qE\r\0@ \b \x07Aj"
- 6< \fr!\f \x07,\0"\vA k"A O\r
- !\x07A t"A\x89\xD1q\r\0\v\v@ \vA*F@\x7F@
- ,\0A0k"A K\r\0
- -\0A$G\r\0\x7F \0E@ AtjA
- 6\0A\0\f\v Atj(\0\v!
- Aj!A\f\v \r
- Aj! \0E@ \b 6<A\0!A\0!\f\v (\0"\x07Aj6\0 \x07(\0!A\0\v! \b 6< A\0N\rA\0 k! \fA\x80\xC0\0r!\f\f\v \bA<j\xCE"A\0H\r
- \b(<!\vA\0!\x07A\x7F! \x7FA\0 -\0\0A.G\r\0 -\0A*F@\x7F@ ,\0A0k"
- A K\r\0 -\0A$G\r\0 Aj!\x7F \0E@
- AtjA
- 6\0A\0\f\v
- Atj(\0\v\f\v \r Aj!A\0 \0E\r\0 (\0"
- Aj6\0
- (\0\v! \b 6< A\0N\f\v \b Aj6< \bA<j\xCE! \b(<!A\v!@ \x07!A!
- ",\0\0"\x07A\xFB\0kAFI\r\v Aj! A:l \x07jA\xFF\xF0\0j-\0\0"\x07AkA\xFFqA\bI\r\0\v \b 6<@ \x07A\x1BG@ \x07E\r\f A\0N@ \0E@ Atj \x076\0\f\f\v \b Atj)\x0070\f\v \0E\r\b \bA0j \x07 \xCD\f\v A\0N\r\vA\0!\x07 \0E\r\b\v \0-\0\0A q\r\v \fA\xFF\xFF{q"\v \f \fA\x80\xC0\0q\x1B!\fA\0!A\x93 ! !
- @@\x7F@@@@@@\x7F@@@@@@@ -\0\0"\x07\xC0"ASq \x07AqAF\x1B \x1B"\x07A\xD8\0k!
- \0\v@ \x07A\xC1\0k\x07\v\0\v \x07A\xD3\0F\r\v\f\v \b)0!A\x93 \f\vA\0!\x07@@@@@@@ \b\0\v \b(0 6\0\f\x1B\v \b(0 6\0\f\v \b(0 \xAC7\0\f\v \b(0 ;\0\f\v \b(0 :\0\0\f\v \b(0 6\0\f\v \b(0 \xAC7\0\f\vA\b A\bM\x1B! \fA\br!\fA\xF8\0!\x07\v ! \x07A q!\r \b)0""\x1BPE@@ Ak" \x1B\xA7Aq-\0\x90u \rr:\0\0 \x1BB\x88"\x1BB\0R\r\0\v\v !\r \fA\bqE Pr\r \x07AvA\x93 j!A!\f\v ! \b)0""\x1BPE@@ Ak" \x1B\xA7A\x07qA0r:\0\0 \x1BB\x88"\x1BB\0R\r\0\v\v !\r \fA\bqE\r k" H\x1B! \f\v \b)0"B\0S@ \bB\0 }"70A!A\x93 \f\v \fA\x80q@A!A\x94 \f\vA\x95 A\x93 \fAq"\x1B\v! x!\r\v A\0Hq\r \fA\xFF\xFF{q \f \x1B!\f B\0R rE@ !\rA\0! \f\v P \rkj" H\x1B! \f\r\v \b-\x000!\x07\f\v\v \b(0"A\xC4 \x1B"\rA\0A\xFF\xFF\xFF\xFF\x07 A\xFF\xFF\xFF\xFF\x07O\x1B"\x07\xCA" \rk \x07 \x1B" \rj!
- A\0N@ \v!\f ! \f\f\v \v!\f !
- -\0\0\r\f\v\v \b)0"\x1BPE\rA\0!\x07\f \v @ \b(0\f\vA\0!\x07 \0A A\0 \f7\f\v \bA\x006\f \b \x1B>\b \b \bA\bj"\x0760A\x7F! \x07\v!\vA\0!\x07@@ \v(\0"\rE\r\0 \bAj \r\xCA"\rA\0H\r \r \x07kK\r\0 \vAj!\v \x07 \rj"\x07 I\r\v\vA=!
- \x07A\0H\r\f \0A \x07 \f7 \x07E@A\0!\x07\f\vA\0!
- \b(0!\v@ \v(\0"\rE\r \bAj" \r\xCA"\r
- j"
- \x07K\r \0 \r3 \vAj!\v \x07
- K\r\0\v\v \0A \x07 \fA\x80\xC0\0s7 \x07 \x07 H\x1B!\x07\f\b\v A\0Hq\r A=!
- \0 \b+0 \f \x07 \0"\x07A\0N\r\x07\f
- \v \x07-\0!\v \x07Aj!\x07\f\0\v\0\v \0\r E\rA!\x07@ \x07Atj(\0"\0@ \x07Atj \0 \xCDA! \x07Aj"\x07A
- G\r\f\v\v\v \x07A
- O@A!\f
- \v@ \x07Atj(\0\rA! \x07Aj"\x07A
- G\r\0\v\f \vA!
- \f\v \b \x07:\0'A! !\r \v!\f\v
- \rk"\v \vJ\x1B" A\xFF\xFF\xFF\xFF\x07sJ\rA=!
- j" H\x1B"\x07 K\r \0A \x07 \f7 \0 3 \0A0 \x07 \fA\x80\x80s7 \0A0 \vA\07 \0 \r \v3 \0A \x07 \fA\x80\xC0\0s7 \b(<!\f\v\v\vA\0!\f\vA=!
- \vA\xF8\xD7
- 6\0\vA\x7F!\v \bA@k$\0 \v\xC2\x7F#\0A\xD0k"$\0 6\xCC A\xA0j"A\0A(\xFC\v\0 (\xCC6\xC8@A\0 A\xC8j A\xD0\0j \xCFA\0H@A\x7F!\f\v \0(LA\0H \0 \0(\0"\bA_q6\0\x7F@@ \0(0E@ \0A\xD0\x0060 \0A\x006 \0B\x007 \0(,! \0 6,\f\v \0(\r\vA\x7F \0\xC9\r\v \0 A\xC8j A\xD0\0j A\xA0j \xCF\v! @ \0A\0A\0 \0($\0 \0A\x0060 \0 6, \0A\x006 \0(! \0B\x007 A\x7F \x1B!\v \0 \0(\0"\0 \bA qr6\0A\x7F \0A q\x1B!\r\0\v A\xD0j$\0 \v\x7F\x7F~ \0\xBD"B4\x88\xA7A\xFFq"A\xFFG| E@ \0D\0\0\0\0\0\0\0\0a\x7FA\0 \0D\0\0\0\0\0\0\xF0C\xA2 \xD1!\0 (\0A@j\v6\0 \0\v A\xFE\x07k6\0 B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x87\x80\x7F\x83B\x80\x80\x80\x80\x80\x80\x80\xF0?\x84\xBF \0\v\v\0 !\v \0 l/\v$\x7F \0("\0yAj"/"\x7F \0 YA\0\v\v0\x7F#\0Ak"$\0 \0(\0!\0 :\0 Aj \0\0 Aj$\0\v\x8D\x7F|#\0Ak"$\0 Aj \0(\0\x07\0 /\0;\f#\0Ak"$\0@ -\0\rAF@#\0Ak"$\0A\x9C\xCE-\0\0AqE@AA\x94,A!\0A\x9C\xCEA:\0\0A\x98\xCE \x006\0\v -\0\f6\b A\x006A\x98\xCE(\0A\0A\0 Aj A\bj! (6\0 A\bj"\0 \xFC6 \0A\xEC\xCE6\0 \xD2 Aj$\0 \0(! \0A\x006 \0\x84\f\v A\x006\f A\xEC\xCE6\b A\bj\x84A!\v Aj$\0 Aj$\0 \v0\x7F#\0Ak"$\0 \0(\0!\0 :\0 Aj \0\x07\0 Aj$\0\v.\x7F#\0Ak"$\0 \0(\0!\0 :\0 Aj \0\0 Aj$\0\v0\x7F#\0Ak"$\0 \0(\0!\0 8\f A\fj \0\0 Aj$\0\v\x8D\x7F|#\0Ak"$\0 A\bj \0(\0\x07\0 )\b7\0#\0Ak"$\0@ -\0AF@#\0Ak"$\0A\x90\xCE-\0\0AqE@AA\xD4&A!\0A\x90\xCEA:\0\0A\x8C\xCE \x006\0\v *\x008\b A\x006A\x8C\xCE(\0A\0A\0 Aj A\bj! (6\0 A\bj"\0 \xFC6 \0A\xEC\xCE6\0 \xD2 Aj$\0 \0(! \0A\x006 \0\x84\f\v A\x006\f A\xEC\xCE6\b A\bj\x84A!\v Aj$\0 Aj$\0 \v0\x7F#\0Ak"$\0 \0(\0!\0 8\f A\fj \0\x07\0 Aj$\0\v.\x7F#\0Ak"$\0 \0(\0!\0 8\f A\fj \0\0 Aj$\0\v\x7FA9"\0A\x006\0 \0\v\xA9\x7F \0(\0j"\0G@@ (" (\0"kAu" \0(\b \0(\0"kAuM@ \0(" k"AuK@ G@ @ \xFC
- \0\0\v \0(!\v j"k"E FrE@ \xFC
- \0\0\v \0 j6\f\v k"E FrE@ \xFC
- \0\0\v \0 j6\f\v \0(\0"@ \0 6 \0(\b ! \0A\x006\b \0B\x007\0\v \0 \0 \x86\xA8 \0(! k"E FrE@ \xFC
- \0\0\v \0 j6\v\v\v\0 \0(\0j!\0A\f9 \0b\v\0 \0(\0j :\0\0\v\r\0 \0(\0j-\0\0\v\x1B\0 \0 (\b M@ \xA7\v\v8\0 \0 (\b M@ \xA7\v \0(\b"\0 \0(\0(\v\0\v\x92\x7F \0 (\b M@ \xA7\v -\x005 \0(\f! A\0:\x005 -\x004 A\0:\x004 \0Aj" \xA6 -\x004"
- r!\b -\x005"\vr!\x07@ AI\r\0 Atj! \0Aj!@ -\x006\r@
- Aq@ (AF\r \0-\0\bAq\r\f\v \vAqE\r\0 \0-\0\bAqE\r\v A\0;4 \xA6 -\x005"\v \x07rAq!\x07 -\x004"
- \brAq!\b A\bj" I\r\0\v\v \x07Aq:\x005 \bAq:\x004\v\xA4\0@ \0 (\b M@ (G\r (AF\r 6\v \0 (\0 ME\r\0@ ( G@ (G\r\v AG\r A6 \v 6 6 ((Aj6(@ ($AG\r\0 (AG\r\0 A:\x006\v A6,\v\v\x88\0@ \0 (\b M@ (G\r (AF\r 6\v \0 (\0 M@@ ( G@ (G\r\v AG\r A6 \v 6 @ (,AF\r\0 A\0;4 \0(\b"\0 A \0(\0(\v\0 -\x005AF@ A6, -\x004E\r\f\v A6,\v 6 ((Aj6( ($AG\r (AG\r A:\x006\v \0(\b"\0 \0(\0(
- \0\v\v\xC1\x7F@ \0 (\b M@ (G\r (AF\r 6\v@ \0 (\0 M@@ ( G@ (G\r\v AG\r A6 \v 6 (,AF\r \0Aj" \0(\fAtj!\x07A\0!@@@ \x7F@ \x07O\r\0 A\0;4 A \xA6 -\x006\r\0 -\x005AG\r -\x004AF@ (AF\rA!A! \0-\0\bAqE\r\f\vA! \0-\0\bAq\rA\f\vAA \x1B\v6, \r\f\v A6,\f\v A\bj!\f\0\v\0\v \0(\f! \0Aj" \x88 AI\r Atj! \0Aj!@ \0(\b"\0AqE@ ($AG\r\v@ -\x006\r \x88 A\bj" I\r\0\v\f\v \0AqE@@ -\x006\r ($AF\r \x88 A\bj" I\r\0\f\v\0\v@ -\x006\r ($AF@ (AF\r\v \x88 A\bj" I\r\0\v\f\v 6 ((Aj6( ($AG\r\0 (AG\r\0 A:\x006\v\v\xCB\x7F#\0A@j"$\0@@@ (A\xA2\xC7F@ A\x006\0\f\v@ \0 \0-\0\bAq\x7FA E\r A\xF8\xC4E"E\r -\0\bAqA\0G\vM!\v @A! (\0"\0E\r \0(\x006\0\f\v A\xA8\xC5E"E\rA\0! (\0"@ (\0"6\0\v (\b"\x07 \0(\b"A\x7FsqA\x07q \x07A\x7Fs qA\xE0\0qr\r \0(\f"\x07(" (\f"\0(G\r\vA!\f\v A\xA0\xC7F@ \0A\xD8\xC5EE!\f\vA\0! \x07A\xA8\xC5E"@ AqE\r\x7F !A\0!@@A\0 \0E\r \0A\xA8\xC5E"\0E\r \0(\b (\b"A\x7Fsq\rA (\f"( \0(\f"\0(F\r AqE\r A\xA8\xC5E"\r\0\v A\x8C\xC6E"E\r\0 \0\xD9!\v \v!\f\v \x07A\x8C\xC6E"@ AqE\r \0\xD9!\f\v \x07A\xC8\xC4E"E\r\0 \0A\xC8\xC4E"\0E\r\0 A\bjA\0A8\xFC\v\0 A\0G:\0; A\x7F6 6\f \x006 A64 \0 Aj A \0(\0(\b\0 ("\0AF@ (A\0 \x1B6\0\v \0AF!\v A@k$\0 \vr\x7F \0( (\b(F@ \xA8\v \0(\f! \0Aj" \xDA@ AI\r\0 Atj! \0Aj!\0@ \0 \xDA -\x006\r \0A\bj"\0 I\r\0\v\v\v\0 \0@ \0\xC7\v \0!\v5\0 \0( (\b(F@ \xA8\v \0(\b"\0 \0(\0(\b\0\v\0 \0( (\b(F@ \xA8\v\v\xC4\x7F#\0A\xD0\0k"$\0@\x7FA \0( (F\r\0A\0 A\xC8\xC4E"E\r\0 (\0"E\r AjA\0A8\xFC\v\0 A:\0K A\x7F6 \x006 6 A6D Aj A (\0(\b\0 (,"\0AF@ ($6\0\v \0AF\v A\xD0\0j$\0\v A\xC16\b A\xE76 A\x9F\r6\0\x9C\0\v\x7FA\xD4\09"\0A\0A\xD4\0\xFC\v\0 \0\v\0 \0(\0 j -\0\0:\0\0A\v \0A\xEC\xE1 \v3\x7F ( (\0"k K@A! j-\0\0!\v \0 :\0 \0 :\0\0\v$\0A\xF8\xE1-\0\0E@A\xEC\xE1A\xD8\x92jA\xF8\xE1A:\0\0\vA\xEC\xE1\v \0A\xDC\xE1 \v$\0A\xE8\xE1-\0\0E@A\xDC\xE1A\xE3\r\x80A\xE8\xE1A:\0\0\vA\xDC\xE1\v \0A\xCC\xE1 \v$\0A\xD8\xE1-\0\0E@A\xCC\xE1A\x84\x92jA\xD8\xE1A:\0\0\vA\xCC\xE1\v \0A\xBC\xE1 \v$\0A\xC8\xE1-\0\0E@A\xBC\xE1A\xBC\x80A\xC8\xE1A:\0\0\vA\xBC\xE1\v \0A\xAC\xE1 \v$\0A\xB8\xE1-\0\0E@A\xAC\xE1A\xE0\x91jA\xB8\xE1A:\0\0\vA\xAC\xE1\v \0A\xDC\xCC \v\r\0 \0( \0(\0k\v\0A\xA9\xE1-\0\0E@A\xA9\xE1A:\0\0\vA\xDC\xCC\v \0A\x9C\xE1 \v$\0A\xA8\xE1-\0\0E@A\x9C\xE1A\xBC\x91jA\xA8\xE1A:\0\0\vA\x9C\xE1\v \0A\xD0\xCC \v\0A\x99\xE1-\0\0E@A\x99\xE1A:\0\0\vA\xD0\xCC\v\x1B\0A\xF8\xE9!\0@ \0A\fk "\0A\xE0\xE9G\r\0\v\vT\0A\x98\xE1-\0\0@A\x94\xE1(\0\vA\xF8\xE9-\0\0E@A\xF8\xE9A:\0\0\vA\xE0\xE9A\xF8\xBA&A\xEC\xE9A\x84\xBB&A\x98\xE1A:\0\0A\x94\xE1A\xE0\xE96\0A\xE0\xE9\v\x1B\0A\xD8\xE9!\0@ \0A\fk "\0A\xC0\xE9G\r\0\v\vR\0A\x90\xE1-\0\0@A\x8C\xE1(\0\vA\xD8\xE9-\0\0E@A\xD8\xE9A:\0\0\vA\xC0\xE9A\xF4'A\xCC\xE9A\xF1'A\x90\xE1A:\0\0A\x8C\xE1A\xC0\xE96\0A\xC0\xE9\v\x1B\0A\xB0\xE9!\0@ \0A\fk "\0A\x90\xE7G\r\0\v\v\xF1\x7F@ \0( \0(\0"k" I@#\0A k"$\0@ k" \0(\b \0("kM@ \0("j!@ F@ \0 6 -\0\0:\0\0 Aj!\f\v\v\f\v A\fj \0 j \0(\0k\x83 \0( \0(\0k \0\x8C"(\b"j!@ G@ -\0\0:\0\0 Aj!\f\v\v 6\b \0 \xA9 \x87\v A j$\0\f\v I@ \0 j6\v\v\v\xB0\0A\x88\xE1-\0\0@A\x84\xE1(\0\vA\xB0\xE9-\0\0E@A\xB0\xE9A:\0\0\vA\x90\xE7A\xF0\xB6&A\x9C\xE7A\x90\xB7&A\xA8\xE7A\xB4\xB7&A\xB4\xE7A\xCC\xB7&A\xC0\xE7A\xE4\xB7&A\xCC\xE7A\xF4\xB7&A\xD8\xE7A\x88\xB8&A\xE4\xE7A\x9C\xB8&A\xF0\xE7A\xB8\xB8&A\xFC\xE7A\xE0\xB8&A\x88\xE8A\x80\xB9&A\x94\xE8A\xA4\xB9&A\xA0\xE8A\xC8\xB9&A\xAC\xE8A\xD8\xB9&A\xB8\xE8A\xE8\xB9&A\xC4\xE8A\xF8\xB9&A\xD0\xE8A\xE4\xB7&A\xDC\xE8A\x88\xBA&A\xE8\xE8A\x98\xBA&A\xF4\xE8A\xA8\xBA&A\x80\xE9A\xB8\xBA&A\x8C\xE9A\xC8\xBA&A\x98\xE9A\xD8\xBA&A\xA4\xE9A\xE8\xBA&A\x88\xE1A:\0\0A\x84\xE1A\x90\xE76\0A\x90\xE7\v\x1B\0A\x80\xE7!\0@ \0A\fk "\0A\xE0\xE4G\r\0\v\v\x98\0A\x80\xE1-\0\0@A\xFC\xE0(\0\vA\x80\xE7-\0\0E@A\x80\xE7A:\0\0\vA\xE0\xE4A\xC0\b'A\xEC\xE4A\xB7\b'A\xF8\xE4A\xDF'A\x84\xE5A\xAE'A\x90\xE5A\x86 'A\x9C\xE5A\xAA'A\xA8\xE5A\xC8\b'A\xB4\xE5A\xB8 'A\xC0\xE5A\xFA\f'A\xCC\xE5A\xE9\f'A\xD8\xE5A\xF1\f'A\xE4\xE5A\x84\r'A\xF0\xE5A\xFF\r'A\xFC\xE5A\xB8'A\x88\xE6A\x9B\r'A\x94\xE6A\x9B\f'A\xA0\xE6A\x86 'A\xAC\xE6A\xF3\r'A\xB8\xE6A\xA5'A\xC4\xE6A\xE5'A\xD0\xE6A\xDF\r'A\xDC\xE6A\xC3
- 'A\xE8\xE6A\xB0 'A\xF4\xE6A\x9B'A\x80\xE1A:\0\0A\xFC\xE0A\xE0\xE46\0A\xE0\xE4\v\x1B\0A\xD8\xE4!\0@ \0A\fk "\0A\xB0\xE3G\r\0\v\v\xCC\0A\xF8\xE0-\0\0@A\xF4\xE0(\0\vA\xD8\xE4-\0\0E@A\xD8\xE4A:\0\0\vA\xB0\xE3A\x9C\xB4&A\xBC\xE3A\xB8\xB4&A\xC8\xE3A\xD4\xB4&A\xD4\xE3A\xF4\xB4&A\xE0\xE3A\x9C\xB5&A\xEC\xE3A\xC0\xB5&A\xF8\xE3A\xDC\xB5&A\x84\xE4A\x80\xB6&A\x90\xE4A\x90\xB6&A\x9C\xE4A\xA0\xB6&A\xA8\xE4A\xB0\xB6&A\xB4\xE4A\xC0\xB6&A\xC0\xE4A\xD0\xB6&A\xCC\xE4A\xE0\xB6&A\xF8\xE0A:\0\0A\xF4\xE0A\xB0\xE36\0A\xB0\xE3\v\x1B\0A\xA8\xE3!\0@ \0A\fk "\0A\x80\xE2G\r\0\v\v\xBE\0A\xF0\xE0-\0\0@A\xEC\xE0(\0\vA\xA8\xE3-\0\0E@A\xA8\xE3A:\0\0\vA\x80\xE2A\xF1\b'A\x8C\xE2A\xF8\b'A\x98\xE2A\xD6\b'A\xA4\xE2A\xDE\b'A\xB0\xE2A\xCD\b'A\xBC\xE2A\xFF\b'A\xC8\xE2A\xE8\b'A\xD4\xE2A\xEF\r'A\xE0\xE2A\xF7\r'A\xEC\xE2A\x8D'A\xF8\xE2A\xCE'A\x84\xE3A\xB4 'A\x90\xE3A\xC4'A\x9C\xE3A\xE7
- 'A\xF0\xE0A:\0\0A\xEC\xE0A\x80\xE26\0A\x80\xE2\v
- \0 \0A\xA4\x91j\v
- \0 \0A\x91\x80\v\x90\x7F \0\x7F \0(" \0(\bI@ -\0\0:\0\0 Aj\f\v#\0A k"$\0 A\fj \0 \0( \0(\0kAj\x83 \0( \0(\0k \0\x8C"(\b -\0\0:\0\0 (\bAj6\b \0 \xA9 \0( \x87 A j$\0\v6\v
- \0 \0A\x90\x91j\v
- \0 \0A\x88\x80\v\f\0 \0 Aj\xA3\v\f\0 \0 A\fj\xA3\v\x07\0 \0(\f\v\x07\0 \0,\0 \v\x07\0 \0(\b\v\x07\0 \0,\0\b\v \0 \0\xE5!\v\0A\xB4*\v \0 \0\xE6!\v\0 \0(\0 Atj *\x008\0A\v\0 \0(\b"\0E@A\v \0\xED\v\x87\x7F@@ F \bMr\r\0A! \0(\b!#\0Ak"\x07$\0 \x07 H6\fA\0 k A\xC0\xDD \x1B\x98! \x07A\fjI \x07Aj$\0@@ Aj\0\v !\v \bAj!\b j! j!\f\v\v \vA\x7F \0(\b!#\0Ak"$\0 H6\f A\fjI Aj$\0 \0(\b"\0E@A\v \0\xEDAF\v\x89\x7F#\0Ak"$\0 6\0\x7FA A\fj"A\0 \0(\b\xAF"\0AjAI\r\0A \0Ak" (\0kK\r\0\x7F \x7F -\0\0!\0 (\0"Aj6\0 \0:\0\0 Ak! Aj!\fA\0\v\v\v Aj$\0\v\xBD\f\x7F#\0Ak"$\0 !\b@@ \bF@ !\b\f\v \b-\0\0E\r\0 \bAj!\b\f\v\v \x07 6\0 6\0@@\x7F@ F Fr\r\0 )\x007\b \0(\b! #\0Ak"$\0 H6\f \b k!A\0!
- #\0A\x90\bk"\f$\0 \f (\0" 6\f \fAj \x1B!@@@ E kAuA\x80 \x1B"\rErE@@ A\x83K Av"\v \rOrE@ !\v\f\v \fA\fj \v \r \v \rI\x1B \xA4! \f(\f!\v A\x7FF@A\0!\rA\x7F!
- \f\v \r A\0 \fAjG\x1B"k!\r Atj! j \vkA\0 \v\x1B!
- j!
- \vE\r \v! \r\r\0\f\v\0\v !\v\v \vE\r\v \rE Er\r\0
- ! @@@ \v \x98"
- AjAM@@@
- Aj\0\v \fA\x006\f\f\v A\x006\0\f\v \f \f(\f
- j"\v6\f Aj! \rAk"\r\r\v !
- \f\v Aj!
- k! !
- \r\0\v\v @ \f(\f6\0\v \fA\x90\bj$\0 A\fjI Aj$\0@@@@
- A\x7FF@@@ \x07 6\0 (\0F\r\0A!@@@ \b k A\bj \0(\b\xEE"Aj\b\0\v 6\0\f\v !\v j! \x07(\0Aj!\f\v\v 6\0\f\v \x07 \x07(\0
- Atj"6\0 F\r (\0! \bF\r A \0(\b\xEEE\r\vA\f\v \x07 \x07(\0Aj"6\0 (\0Aj"6\0 !\b@ \bF\r \b-\0\0E\r \bAj!\b\f\0\v\0\v 6\0A\f\v (\0!\v G\v Aj$\0\v !\b\f\0\v\0\v\x9F\v\x7F#\0Ak"$\0 !\b@@ \bF@ !\b\f\v \b(\0E\r\0 \bAj!\b\f\v\v \x07 6\0 6\0@@@@ F Fr\x7F )\x007\bA! \0(\b! #\0Ak"$\0 H6\f ! k!
- A\0!\f#\0Ak"$\0@ (\0"\vE \b kAu"Er\r\0
- A\0 \x1B!
- @ A\fj
- AI\x1B \v(\0\xC5"\rA\x7FF@A\x7F!\f\f\v \x7F
- AM@
- \rI\r A\fj \rY\v
- \rk!
- \rjA\0\v! \v(\0E@A\0!\v\f\v \f \rj!\f \vAj!\v Ak"\r\0\v\v @ \v6\0\v Aj$\0 A\fjI Aj$\0@@@@ \fAj\0\b\v \x07 6\0@ (\0F\r (\0 \0(\b\xAF"A\x7FF\r \x07 \x07(\0 j"6\0 Aj!\f\0\v\0\v \x07 \x07(\0 \fj"6\0 F\r \bF@ (\0! !\b\f\v Aj"A\0 \0(\b\xAF"\bA\x7FF\r \x07(\0k \bI\r@ \b@ -\0\0! \x07 \x07(\0" Aj6\0 :\0\0 \bAk!\b Aj!\f\v\v (\0Aj"6\0 !\b@ \bF@ !\b\f\v \b(\0E\r \bAj!\b\f\0\v\0\v 6\0\f\v (\0\v G!\f\v \x07(\0!\f\v\vA!\v Aj$\0 \v \0 \0\xF6!\v=\0 \0\x7F ( (\0"kAu K@ \0 Atj*\x008\0A\f\v \0A\0:\0\0A\0\v:\0\v\0 k"\0 \0 I\x1B\v4\0@ FE@ ,\0\0"\0 \0A\0H\x1B:\0\0 Aj! Aj!\f\v\v \v\f\0 A\0H\x1B\v*\0@ FE@ -\0\0:\0\0 Aj! Aj!\f\v\v \v9\0@ FE@ -\0\0"\0 \0A r \0A\xDB\0kA\xFFqA\xE6I\x1B:\0\0 Aj!\f\v\v \v\0 A r A\xDB\0kA\xFFqA\xE6I\x1B\v:\0@ FE@ -\0\0"\0 \0A\xDF\0q \0A\xFB\0kA\xFFqA\xE6I\x1B:\0\0 Aj!\f\v\v \v\0 A\xDF\0q A\xFB\0kA\xFFqA\xE6I\x1B\v\0 \0( \0(\0kAu\v \0 \0\xF0!\v5\0@ FE@ (\0"\0 \0A\x80I\x1B:\0\0 Aj! Aj!\f\v\v \v\0 A\x80I\x1B\xC0\v*\0@ FE@ ,\0\x006\0 Aj! Aj!\f\v\v \v4\0@ FE@ (\0"\0 \0A r \0A\xDB\0kAfI\x1B6\0 Aj!\f\v\v \v\0 A r A\xDB\0kAfI\x1B\v5\0@ FE@ (\0"\0 \0A\xDF\0q \0A\xFB\0kAfI\x1B6\0 Aj!\f\v\v \v\0 A\xDF\0q A\xFB\0kAfI\x1B\v\x86\x7F@ \0( \0(\0"kAu" I@#\0A k"$\0@ k" \0(\b \0("kAuM@ \0(" Atj!@ F@ \0 6 *\x008\0 Aj!\f\v\v\f\v A\fj \0 \0(\0kAu j\x86 \0( \0(\0kAu \0\xB8"(\b" Atj!@ G@ *\x008\0 Aj!\f\v\v 6\b \0 \x96 \xB5\v A j$\0\f\v I@ \0 Atj6\v\v\v7\0@@ F\r\0 (\0"\0A\xFF\0K\r\0 \0At(\x90\x88 qE\r\0 Aj!\f\v\v \v7\0@@ F\r\0 (\0"\0A\xFF\0M@ \0At(\x90\x88 q\r\v Aj!\f\v\v \vF\x7F@ FE@A\0!\0 (\0"A\xFF\0M\x7F At(\x90\x88A\0\v6\0 Aj! Aj!\f\v\v \v"\0A\0!\0 A\xFF\0M\x7F At(\x90\x88 qA\0GA\0\v\v\0 \0 \0(\0(\0\v \0 \0\xF5!\v\x95\x7F \0\x7F \0(" \0(\bI@ *\x008\0 Aj\f\v#\0A k"$\0 A\fj \0 \0( \0(\0kAuAj\x86 \0( \0(\0kAu \0\xB8"(\b" *\x008\0 Aj6\b \0 \x96 \0( \xB5 A j$\0\v6\v\xA1\0@ ,\0\vA\0N@ \0 (\b6\b \0 )\x007\0\f\v (\0!@@@ ("AM@ \0 :\0\v\f\v A\xF7\xFF\xFF\xFFO\r Ar"AjU! \0 A\xFF\xFF\xFF\xFF\x07k6\b \0 6\0 \0 6 !\0\v AtAj"@ \0 \xFC
- \0\0\v\f\v0\0\v\v\v \0 \0 \xA3\v\x9F\x07\x7F#\0A\xF0k"$\0 A\xECj"\0 $ \0=!
- ( ,\0\v"\0 \0A\0H"\0\x1B@ (\0 \0\x1B(\0
- A-
- (\0(,\0F!\x07\v A\x006\xD8 B\x007\xD0 A\x006\xC8 B\x007\xC0 A\x006\xB8 B\x007\xB0 \x07 A\xECj A\xE8j A\xE4j A\xE0j A\xD0j A\xC0j A\xB0j A\xACj\xF9@\x7F\x7F ("\v ,\0\v"\b \bA\0H\x1B"\0 (\xAC" J@ \0 kAtj (\xB4 ,\0\xBB"\0 \0A\0H\x1Bj (\xC4 ,\0\xCB"\0 \0A\0H\x1BjAj\f\v (\xB4 ,\0\xBB"\0 \0A\0H\x1Bj (\xC4 ,\0\xCB"\0 \0A\0H\x1BjAj\v"\0A\xE5\0I@A\0! Aj\f\v \0At/"E\r -\0\v!\b (!\v \v"\0 A\fj A\bj ( (\0 \b\xC0A\0H"\x1B"\f \f \v \b \x1BAtj
- \x07 A\xE8j (\xE4 (\xE0 A\xD0j" A\xC0j"\x07 A\xB0j"\b \xF8 \0 (\f (\b \\ ! \b \x07 (\xEC# A\xF0j$\0\v0\0\v\xE4\b\x7F#\0A\xA0\bk"\0$\0 \0 7 \0 7 \0 \0A\xB0\x07j"\x076\xAC\x07 \0A\x90j! @ \x07A\xE3 \0Aje"\x07A\xE4\0O@*!\x07 \0 7\0 \0 7\b \0A\xAC\x07j \x07A\xE3 \0P"\x07A\x7FF\r \0(\xAC\x07!\r \x07At/"\v! \vE\r\v \0A\x8Cj"\b $ \b=" \0(\xAC\x07"\b \x07 \bj (\0(0\0 \x07A\0J@ \0(\xAC\x07-\0\0A-F!
- \v \0A\x006\xF8 \0B\x007\xF0 \0A\x006\xE8 \0B\x007\xE0 \0A\x006\xD8 \0B\x007\xD0
- \0A\x8Cj \0A\x88j \0A\x84j \0A\x80j \0A\xF0j \0A\xE0j \0A\xD0j \0A\xCCj\xF9@\x7F \0(\xCC"\b \x07H@ \b \x07 \bkAtj \0(\xD4 \0,\0\xDB" A\0H\x1Bj \0(\xE4 \0,\0\xEB" A\0H\x1BjAj\f\v \b \0(\xD4 \0,\0\xDB" A\0H\x1Bj \0(\xE4 \0,\0\xEB" A\0H\x1BjAj\v"A\xE5\0I@ \0A0j!\f\v At/"\f! \fE\r\v \0A,j \0A(j ( \x07Atj
- \0A\x88j \0(\x84 \0(\x80 \0A\xF0j"
- \0A\xE0j"\x07 \0A\xD0j" \b\xF8 \0(, \0(( \\ \f! \x07
- \0(\x8C# \v! \r! \0A\xA0\bj$\0\v0\0\v\x99\x07\x7F#\0A\xB0k"$\0 A\xACj"\0 $ \0>!
- ( ,\0\v"\0 \0A\0H"\0\x1B@ (\0 \0\x1B-\0\0
- A-
- (\0(\0A\xFFqF!\x07\v A\x006\xA0 B\x007\x98 A\x006\x90 B\x007\x88 A\x006\x80 B\x007x \x07 A\xACj A\xA8j A\xA7j A\xA6j A\x98j A\x88j A\xF8\0j A\xF4\0j\xFC@\x7F\x7F ("\v ,\0\v"\b \bA\0H\x1B"\0 (t" J@ \0 kAtj (| ,\0\x83"\0 \0A\0H\x1Bj (\x8C ,\0\x93"\0 \0A\0H\x1BjAj\f\v (| ,\0\x83"\0 \0A\0H\x1Bj (\x8C ,\0\x93"\0 \0A\0H\x1BjAj\v"\0A\xE5\0I@A\0! Aj\f\v \0/"E\r -\0\v!\b (!\v \v"\0 A\fj A\bj ( (\0 \b\xC0A\0H"\x1B"\f \f \v \b \x1Bj
- \x07 A\xA8j ,\0\xA7 ,\0\xA6 A\x98j" A\x88j"\x07 A\xF8\0j"\b \xFB \0 (\f (\b Z ! \b \x07 (\xAC# A\xB0j$\0\v0\0\v\xDB\b\x7F#\0A\xB0k"\0$\0 \0 7 \0 7 \0 \0A\xC0j"\x076\xBC \0A\xD0j! @ \x07A\xE3 \0Aje"\x07A\xE4\0O@*!\x07 \0 7\0 \0 7\b \0A\xBCj \x07A\xE3 \0P"\x07A\x7FF\r \0(\xBC!\r \x07/"\v! \vE\r\v \0A\xCCj"\b $ \b>" \0(\xBC"\b \x07 \bj (\0( \0 \x07A\0J@ \0(\xBC-\0\0A-F!
- \v \0A\x006\xC0 \0B\x007\xB8 \0A\x006\xB0 \0B\x007\xA8 \0A\x006\xA0 \0B\x007\x98
- \0A\xCCj \0A\xC8j \0A\xC7j \0A\xC6j \0A\xB8j \0A\xA8j \0A\x98j \0A\x94j\xFC@\x7F \0(\x94"\b \x07H@ \b \x07 \bkAtj \0(\x9C \0,\0\xA3" A\0H\x1Bj \0(\xAC \0,\0\xB3" A\0H\x1BjAj\f\v \b \0(\x9C \0,\0\xA3" A\0H\x1Bj \0(\xAC \0,\0\xB3" A\0H\x1BjAj\v"A\xE5\0I@ \0A0j!\f\v /"\f! \fE\r\v \0A,j \0A(j ( \x07 j
- \0A\xC8j \0,\0\xC7 \0,\0\xC6 \0A\xB8j"
- \0A\xA8j"\x07 \0A\x98j" \b\xFB \0(, \0(( Z \f! \x07
- \0(\xCC# \v! \r! \0A\xB0j$\0\v0\0\v\xC0\x7F#\0A\xC0k"\0$\0 \0 6\xB8 \0 6\xBC \0A\xE3\x006 \0 \0A j6 \0Aj"\x07 $ \x07=! \0A\0:\0 \0A\xBCj \x07 ( \0Aj \0Aj \0Aj \0A\xB0j\x80@@ ,\0\vA\0H@ (\0A\x006\0 A\x006\f\v A\0:\0\v A\x006\0\v \0-\0AF@ A- (\0(,\0\xDD\v A0 (\0(,\0! \0("Ak! \0(!@@ O\r\0 (\0 G\r\0 Aj!\f\v\v#\0Ak"$\0@ F\r\0 ,\0\v! (\b!\b (!\x07 (\0 ,\0\v" A\0H"
- \x1B"\vO \v (
- \x1BAtjAjIqE@ \x07 A\0H" \x1B" k"Au"
- j!\x07
- \bA\xFF\xFF\xFF\xFF\x07qAkA \x1B"\b kK@ \b \x07 \bk \xFF\v At (\0 ,\0\vA\0H\x1Bj! @ \xFC
- \0\0\v jA\x006\0 ,\0\vA\0H@ \x076\f\v \x07A\xFF\0q:\0\v\f\v Aj"\x07 \xA2 ( \x07 ,\0"A\0H"
- \x1B!@ (\b
- \x1B" (\bA\xFF\xFF\xFF\xFF\x07qAkA ,\0\v"\bA\0H"\x1B" ( \b \x1B"kM@ E\r (\0 \bA\0H\x1B!\b At" @ \b Atj \xFC
- \0\0\v j!@ ,\0\vA\0H@ 6\f\v A\xFF\0q:\0\v\v \b AtjA\x006\0\f\v j k A\0 \xDE\v \x07 \v Aj$\0\v \0A\xBCj \0A\xB8j(@ (\0Ar6\0\v \0(\xBC \0(# \0(! \0A\x006 @ \0(\0\v \0A\xC0j$\0\v\xDD\x7F#\0A\xF0k"\x07$\0 \x07 6\xE8 \x07 6\xEC \x07A\xE3\x006\xCC \x07 \x07A\xD0j6\xC8 \x07A\xC0j" $ =!\0 \x07A\0:\0\xBF@ \x07A\xECj ( \x07A\xBFj \0 \x07A\xC8j \x07A\xC4j \x07A\xE0j\x80E\r\0 \x07A\xEE\x1B(\0\x006\0\xB7 \x07A\xE7\x1B)\0\x007\xB0 \0 \x07A\xB0j \x07A\xBAj \x07A\x80j \0(\0(0\0 \x07Aj!\0@ \x07(\xC4" \x07(\xC8"k"A\x89N@ AvAj/"\0!\b \0E\r\v \0! \x07-\0\xBFAF@ \0A-:\0\0 \0Aj!\v \x07A\xA8j!@ M@@ A\0:\0\0 \x07 6\0 \0 \x07\xA7AG\r\0 \b!\f\v \x07A\xB0j \x07A\x80j" \xB1 kAuj-\0\0:\0\0 Aj! Aj! \x07(\xC4!\f\v\v0\0\v0\0\v \x07A\xECj \x07A\xE8j(@ (\0Ar6\0\v \x07(\xEC \x07(\xC0# \x07(\xC8!\0 \x07A\x006\xC8 \0@ \0 \x07(\xCC\0\v \x07A\xF0j$\0\v\xAE\x7F#\0A\x90k"\0$\0 \0 6\x88 \0 6\x8C \0A\xE3\x006 \0 \0A j6 \0Aj"\x07 $ \x07>! \0A\0:\0 \0A\x8Cj \x07 ( \0Aj \0Aj \0Aj \0A\x84j\x85@@ ,\0\vA\0H@ (\0A\0:\0\0 A\x006\f\v A\0:\0\v A\0:\0\0\v \0-\0AF@ A- (\0(\0\xAA\v A0 (\0(\0 \0("Ak! \0(!A\xFFq!@@ O\r\0 -\0\0 G\r\0 Aj!\f\v\v#\0Ak"$\0@ F\r\0 ,\0\v! (\b!\b (!\x07 (\0 ,\0\v" A\0H"
- \x1B"\vO \v (
- \x1BjAjIqE@ \x07 A\0H" \x1B" k"j!\x07 \bA\xFF\xFF\xFF\xFF\x07qAkA
- \x1B"\b kK@ \b \x07 \bk \xA4\v (\0 ,\0\vA\0H\x1B j! @ \xFC
- \0\0\v jA\0:\0\0 ,\0\vA\0H@ \x076\f\v \x07A\xFF\0q:\0\v\f\v Aj"\x07 \xCE ( \x07 ,\0"A\0H"
- \x1B!@ (\b
- \x1B" (\bA\xFF\xFF\xFF\xFF\x07qAkA
- ,\0\v"\bA\0H"\x1B" ( \b \x1B"kM@ E\r (\0 \bA\0H\x1B!\b @ \bj \xFC
- \0\0\v j!@ ,\0\vA\0H@ 6\f\v A\xFF\0q:\0\v\v \bjA\0:\0\0\f\v j k A\0 \x89\v \x07 \v Aj$\0\v \0A\x8Cj \0A\x88j)@ (\0Ar6\0\v \0(\x8C \0(# \0(! \0A\x006 @ \0(\0\v \0A\x90j$\0\v\xD1\x7F#\0A\x90k"\x07$\0 \x07 6\x88 \x07 6\x8C \x07A\xE3\x006\x9C \x07 \x07A\xA0j6\x98 \x07A\x90j" $ >!\0 \x07A\0:\0\x8F@ \x07A\x8Cj ( \x07A\x8Fj \0 \x07A\x98j \x07A\x94j \x07A\x84j\x85E\r\0 \x07A\xEE\x1B(\0\x006\0\x87 \x07A\xE7\x1B)\0\x007\x80 \0 \x07A\x80j \x07A\x8Aj \x07A\xF6\0j \0(\0( \0 \x07Aj!\0@ \x07(\x94" \x07(\x98"k"A\xE3\0N@ Aj/"\0!\b \0E\r\v \0! \x07-\0\x8FAF@ \0A-:\0\0 \0Aj!\v \x07A\x80j!@ M@@ A\0:\0\0 \x07 6\0 \0 \x07\xA7AG\r\0 \b!\f\v \x07A\xF6\0j \xB4 \x07k \x07j-\0
- :\0\0 Aj! Aj! \x07(\x94!\f\v\v0\0\v0\0\v \x07A\x8Cj \x07A\x88j)@ (\0Ar6\0\v \x07(\x8C \x07(\x90# \x07(\x98!\0 \x07A\x006\x98 \0@ \0 \x07(\x9C\0\v \x07A\x90j$\0\v\0A\xFC \v\xC7\x7F#\0A\xA0k"\b$\0 \b \bA\xA0j"6\f#\0A\x90k"\x07$\0 \x07 \x07A\x84j6 \0A\bj \x07A j" \x07Aj \x88 \x07B\x007 \x07 6\f \b(\f \bAj"kAu! \0(\b!\0#\0Ak"$\0 \0H6\f \x07A\fj \x07Aj\xA4!\0 A\fjI Aj$\0 \0A\x7FF@0\0\v \b \0Atj6\f \x07A\x90j$\0 \b(\f!\0#\0Ak"$\0#\0Ak"$\0#\0Ak"$\0 6\f@ \0 G@ A\fj (\0\xBE Aj!\f\v\v 6\b (\f6\f Aj$\0 )\b7\b Aj$\0 (\f Aj$\0 $\0\v\xB8\0#\0A\x80k"$\0 A\xF4\0j6\f \0A\bj Aj" A\fj \x88 (\f!\0#\0Ak"$\0#\0Ak"$\0#\0Ak"$\0 6\f@ \0 G@ A\fj ,\0\0\xC0 Aj!\f\v\v 6\b (\f6\f Aj$\0 )\b7\b Aj$\0 (\f Aj$\0 A\x80j$\0\v\xB8\r\x7F#\0A0k"\x07$\0 \x07 6, A\x006\0 \x07 $ \x07=!\b \x07(\0#\x7F@@@@@@@@@@@@@@@@@@@@@@@@@@ A\xC1\0k9\0\x07
- \0\b \v\f\r\v\v \0 Aj \x07A,j \b\x8B\f\v \0 Aj \x07A,j \b\x8A\f\v \0A\bj \0(\b(\f\0\0! \x07 \0 \x07(, (\0 ,\0\v"\0A\0H"\x1B" ( \0 \x1BAtjV6,\f\v \x07A,j \bAN!\0@ (\0"Aq \0AkAKrE@ \x006\f\f\v Ar6\0\v\f\v \x07A\xA8\x86)\x007 \x07A\xA0\x86)\x007 \x07A\x98\x86)\x007\b \x07A\x90\x86)\x007\0 \x07 \0 \x07 \x07A jV6,\f\v \x07A\xC8\x86)\x007 \x07A\xC0\x86)\x007 \x07A\xB8\x86)\x007\b \x07A\xB0\x86)\x007\0 \x07 \0 \x07 \x07A jV6,\f\v \x07A,j \bAN!\0@ (\0"Aq \0AJrE@ \x006\b\f\v Ar6\0\v\f\v \x07A,j \bAN!\0@ (\0"Aq \0AkA\vKrE@ \x006\b\f\v Ar6\0\v\f\v \x07A,j \bAN!\0@ (\0"Aq \0A\xEDJrE@ \x006\f\v Ar6\0\v\f\v \x07A,j \bAN!\0@ (\0"Aq \0Ak"\0A\vKrE@ \x006\f\v Ar6\0\v\f\v \x07A,j \bAN!\0@ (\0"Aq \0A;JrE@ \x006\f\v Ar6\0\v\f\v \x07A,j!\0#\0Ak"$\0 6\f@@ \0 A\fj(\r\0 \bA \0: \b(\0(\f\0E\r\0 \0Q\f\v\v \0 A\fj(@ (\0Ar6\0\v Aj$\0\f\r\v \x07A,j!@ \0A\bj \0(\b(\b\0\0"\0( \0,\0\v" A\0H\x1BA\0 \0( \0,\0" A\0H\x1BkF@ (\0Ar6\0\f\v \0 \0Aj \b A\0\x95" \0G (\b"A\fGrE@ A\x006\b\f\v \0kA\fG A\vJrE@ A\fj6\b\v\v\f\f\v \x07A\xD0\x86A,\xFC
- \0\0 \x07 \0 \x07 \x07A,jV6,\f\v\v \x07A\x90\x87(\x006 \x07A\x88\x87)\x007\b \x07A\x80\x87)\x007\0 \x07 \0 \x07 \x07AjV6,\f
- \v \x07A,j \bAN!\0@ (\0"Aq \0A<JrE@ \x006\0\f\v Ar6\0\v\f \v \x07A\xB8\x87)\x007 \x07A\xB0\x87)\x007 \x07A\xA8\x87)\x007\b \x07A\xA0\x87)\x007\0 \x07 \0 \x07 \x07A jV6,\f\b\v \x07A,j \bAN!\0@ (\0"Aq \0AJrE@ \x006\f\v Ar6\0\v\f\x07\v \0 \0(\0(\0\f\x07\v \0A\bj \0(\b(\0\0! \x07 \0 \x07(, (\0 ,\0\v"\0A\0H"\x1B" ( \0 \x1BAtjV6,\f\v Aj \x07A,j \b\x89\f\v \x07A,j \bAN!\0 -\0\0AqE@ \0A\xECk6\v\f\v A%F\r\v (\0Ar6\0\f\v#\0Ak"\0$\0 \0 6\f@ \x7FA \x07A,j" \0A\fj"(\r\0A \b :A\0 \b(\0(4\0A%G\r\0 Q (E\rA\v (\0r6\0\v \0Aj$\0\v \x07(,\v \x07A0j$\0\v \0 \0\0\0\vK\x7F#\0Ak"$\0 6\f A\bj" $ =! (\b# Aj A\fj \x89 (\f Aj$\0\vM\x7F#\0Ak"$\0 6\f A\bj" $ =! (\b# \0 Aj A\fj \x8A (\f Aj$\0\vM\x7F#\0Ak"$\0 6\f A\bj" $ =! (\b# \0 Aj A\fj \x8B (\f Aj$\0\vF\0 \0 \0A\bj \0(\b(\0\0"\0(\0 \0 \0,\0\v"A\0H"\x1B" \0( \x1BAtjV\vX\x7F#\0A k"$\0 A\xB8\x87)\x007 A\xB0\x87)\x007 A\xA8\x87)\x007\b A\xA0\x87)\x007\0 \0 A j"V $\0\v\xDB\f\x7F#\0Ak"\x07$\0 \x07 6\f A\x006\0 \x07 $ \x07>!\b \x07(\0#\x7F@@@@@@@@@@@@@@@@@@@@@@@@@@ A\xC1\0k9\0\x07
- \0\b \v\f\r\v\v \0 Aj \x07A\fj \b\x8E\f\v \0 Aj \x07A\fj \b\x8D\f\v \0A\bj \0(\b(\f\0\0! \x07 \0 \x07(\f (\0 ,\0\v"\0A\0H"\x1B" ( \0 \x1BjW6\f\f\v \x07A\fj \bAO!\0@ (\0"Aq \0AkAKrE@ \x006\f\f\v Ar6\0\v\f\v \x07B\xA5\xDA\xBD\xA9\xC2\xEC\xCB\x92\xF9\x007\0 \x07 \0 \x07 \x07A\bjW6\f\f\v \x07B\xA5\xB2\xB5\xA9\xD2\xAD\xCB\x92\xE4\x007\0 \x07 \0 \x07 \x07A\bjW6\f\f\v \x07A\fj \bAO!\0@ (\0"Aq \0AJrE@ \x006\b\f\v Ar6\0\v\f\v \x07A\fj \bAO!\0@ (\0"Aq \0AkA\vKrE@ \x006\b\f\v Ar6\0\v\f\v \x07A\fj \bAO!\0@ (\0"Aq \0A\xEDJrE@ \x006\f\v Ar6\0\v\f\v \x07A\fj \bAO!\0@ (\0"Aq \0Ak"\0A\vKrE@ \x006\f\v Ar6\0\v\f\v \x07A\fj \bAO!\0@ (\0"Aq \0A;JrE@ \x006\f\v Ar6\0\v\f\v \x07A\fj!\0#\0Ak"$\0 6\f@@ \0 A\fj)\r\0 \0;"A\0H\r\0 \b(\b Atj-\0\0AqE\r\0 \0S\f\v\v \0 A\fj)@ (\0Ar6\0\v Aj$\0\f\r\v \x07A\fj!@ \0A\bj \0(\b(\b\0\0"\0( \0,\0\v" A\0H\x1BA\0 \0( \0,\0" A\0H\x1BkF@ (\0Ar6\0\f\v \0 \0Aj \b A\0\x97" \0G (\b"A\fGrE@ A\x006\b\f\v \0kA\fG A\vJrE@ A\fj6\b\v\v\f\f\v \x07A\xF8\x85(\0\x006\0\x07 \x07A\xF1\x85)\0\x007\0 \x07 \0 \x07 \x07A\vjW6\f\f\v\v \x07A\x80\x86-\0\0:\0 \x07A\xFC\x85(\0\x006\0 \x07 \0 \x07 \x07AjW6\f\f
- \v \x07A\fj \bAO!\0@ (\0"Aq \0A<JrE@ \x006\0\f\v Ar6\0\v\f \v \x07B\xA5\x90\xE9\xA9\xD2\xC9\xCE\x92\xD3\x007\0 \x07 \0 \x07 \x07A\bjW6\f\f\b\v \x07A\fj \bAO!\0@ (\0"Aq \0AJrE@ \x006\f\v Ar6\0\v\f\x07\v \0 \0(\0(\0\f\x07\v \0A\bj \0(\b(\0\0! \x07 \0 \x07(\f (\0 ,\0\v"\0A\0H"\x1B" ( \0 \x1BjW6\f\f\v Aj \x07A\fj \b\x8C\f\v \x07A\fj \bAO!\0 -\0\0AqE@ \0A\xECk6\v\f\v A%F\r\v (\0Ar6\0\f\v#\0Ak"\0$\0 \0 6\f@ \x7FA \x07A\fj" \0A\fj")\r\0A \b ;A\0 \b(\0($\0A%G\r\0 S )E\rA\v (\0r6\0\v \0Aj$\0\v \x07(\f\v \x07Aj$\0\v\x9B\x7F#\0A\xE0\0k"$\0 A\fj" (\0 \0\b\0A\xD4\09"\0 -\0\b:\0\b \0 )\x007\0 \0A\fj A\fjb \0Aj Ajb \0A$j A$jb \0A0j A0jb \0A<j A<jb \0A\xC8\0j A\xC8\0jb \xC7 A\xE0\0j$\0 \0\vK\x7F#\0Ak"$\0 6\f A\bj" $ >! (\b# Aj A\fj \x8C (\f Aj$\0\vM\x7F#\0Ak"$\0 6\f A\bj" $ >! (\b# \0 Aj A\fj \x8D (\f Aj$\0\vM\x7F#\0Ak"$\0 6\f A\bj" $ >! (\b# \0 Aj A\fj \x8E (\f Aj$\0\vC\0 \0 \0A\bj \0(\b(\0\0"\0(\0 \0 \0,\0\v"A\0H"\x1B" \0( \x1BjW\v;\x7F#\0Ak"$\0 B\xA5\x90\xE9\xA9\xD2\xC9\xCE\x92\xD3\x007\b \0 A\bj Aj"W $\0\v+\x7F ("A\xB5\xFB~qA\x88r6 \x91 6\v\xB7\x07\x7F\x7F#\0A\x90k"\0$\0 \0B%7\x88 \0A\x88j"\x07ArA\x82 (\x91!\b \0 \0A\xE0j" 6\xDC*!@\x7F@\x7F@ \b@ (\b!\b \0 70 \0 7( \0 \b6 \x07 \0A j]"AJ\r\f\v \0 7P \0 7X \0A\xE0j \0A\x88j"\x07 \0A\xD0\0j]"AL\r*! \0 7@ \0 7H \0A\xDCj \x07 \0A@kP\f\v*! (\b!\x07 \0 7 \0 7\b \0 \x076\0 \0A\xDCj \0A\x88j \0P\v"A\x7FF\r \0(\xDC\f\vA\0\v \0(\xDC"\x07 \x07j"
- G!\v@ \0A\xE0j \x07F@ \0A\xF0\0j!A\0!\b\f\v At/"\b! \bE\r\v \0A\xE4\0j"\f $ \x07 \v
- \0A\xEC\0j \0A\xE8\0j \f\x90 \0(d# \0(l \0(h \\! \b!! \0A\x90j$\0 \f\v0\0\v\v\x9A\x07\x7F\x7F#\0A\xF0k"\0$\0 \0B%7\xE8 \0A\xE8j"ArA\xD7 (\x91!\x07 \0 \0A\xC0j"\b6\xBC*!@\x7F@\x7F@ \x07@ (\b!\x07 \0 9 \0 \x076 \b \0Aj]"AJ\r\f\v \0 90 \0A\xC0j \0A\xE8j" \0A0j]"AL\r*! \0 9 \0A\xBCj \0A jP\f\v*! (\b! \0 9\b \0 6\0 \0A\xBCj \0A\xE8j \0P\v"A\x7FF\r \0(\xBC\f\vA\0\v \0(\xBC" j" G!
- @ \0A\xC0j F@ \0A\xD0\0j!A\0!\x07\f\v At/"\x07! \x07E\r\v \0A\xC4\0j"\v $
- \0A\xCC\0j \0A\xC8\0j \v\x90 \0(D# \0(L \0(H \\! \x07!! \0A\xF0j$\0 \f\v0\0\v\v\xC7\x7F#\0A\xF0k"\0$\0A\bAA
- ("A\xCA\0q"\x07A\bF\x1B \x07A\xC0\0F"\b\x1B! \0A\xD0j!@ A\x80qE Pr\r\0 \b@ \0A0:\0\xD0 Ar!\f\v \x07A\bG\r\0 \0A0:\0\xD0 \0A\xD8\0A\xF8\0 A\x80\x80q\x1B:\0\xD1 \0A\xD0jAr!\v \0A\xC8j \0A\xE8j \x92 \0(\xC8!\x07@ A\x88\x80qA\x88\x80G\r\0@ \x07F\r -\0\0"A k A\xE1\0kA\xFFqAI\x1B:\0\0 Aj!\f\0\v\0\v \0A\xD0j" \x07 G! \0Aj"\b $ \x07 \0Aj" \0A\fj \0A\bj \b\x90 \0(# \0(\f \0(\b \\ \0A\xF0j$\0\v\r\0 \x91\v\xA8\x7F~#\0A\xF0k"$\0 A\xD0j!\0~ ("A\xCA\0q"\x07A\bF"\b B\0YrE@ \x07A\xC0\0F\r A-:\0\xD0 \0Ar!\0B\0 }\f\v \v!
- \b \x07A\xC0\0F" r A\x80qE B\0SrrE@ \0A+:\0\0 \0Aj!\0\vA\bAA
- \b\x1B \x1B!\b@ A\x80qE Pr\r\0 \x07A\xC0\0F@ \0A0:\0\0 \0Aj!\0\f\v \x07A\bG\r\0 \0A0:\0\0 \0A\xD8\0A\xF8\0 A\x80\x80q\x1B:\0 \0Aj!\0\v A\xC8j \0 A\xE8j
- \b\x92@ A\x88\x80qA\x88\x80F@@ \0 (\xC8"F\r \0 \0-\0\0"A k A\xE1\0kA\xFFqAI\x1B:\0\0 \0Aj!\0\f\0\v\0\v (\xC8!\v A\xD0j"\0 G!\x07 Aj"\b $ \0 \x07 Aj"\0 A\fj A\bj \b\x90 (# \0 (\f (\b \\ A\xF0j$\0\v\xA5\x7F#\0A\x90k"$\0 A\x83j!\0\x7F ("A\xCA\0q"\x07A\bF"\b A\0NrE@ \x07A\xC0\0F\r A-:\0\x83 A\x84j!\0A\0 k\f\v \v! \b \x07A\xC0\0F"
- r A\x80qE A\0HrrE@ \0A+:\0\0 \0Aj!\0\vA\bAA
- \b\x1B
- \x1B!\b@ E A\x80qEr\r\0 \x07A\xC0\0F@ \0A0:\0\0 \0Aj!\0\f\v \x07A\bG\r\0 \0A0:\0\0 \0A\xD8\0A\xF8\0 A\x80\x80q\x1B:\0 \0Aj!\0\v A\xF8\0j \0 A\x90j \b\x94@ A\x88\x80qA\x88\x80F@@ \0 (x"F\r \0 \0-\0\0"A k A\xE1\0kA\xFFqAI\x1B:\0\0 \0Aj!\0\f\0\v\0\v (x!\v A\x83j"\0 G! Aj"\x07 $ \0 Aj"\0 A\fj A\bj \x07\x90 (# \0 (\f (\b \\ A\x90j$\0\v\xDE\x7F#\0Ak"$\0 6\f@ -\0AqE@ \0 \0(\0( \0!\f\v $ n!\0 (\0# \0 \0(\0AA \x1Bj(\0\0 (\0" ,\0\v"A\0H\x1B!@ \xC0A\0H"\0\x1B ( A\xFFq \0\x1BAtj F@ (\f! A\fj (\0\xBE Aj! (\0! -\0\v!\f\v\v\v Aj$\0 \v+\x7F ("A\xB5\xFB~qA\x88r6 \x94 6\v\xB7\x07\x7F\x7F#\0A\xE0k"\0$\0 \0B%7\xD8 \0A\xD8j"\x07ArA\x82 (\x91!\b \0 \0A\xB0j" 6\xAC*!@\x7F@\x7F@ \b@ (\b!\b \0 70 \0 7( \0 \b6 \x07 \0A j]"AJ\r\f\v \0 7P \0 7X \0A\xB0j \0A\xD8j"\x07 \0A\xD0\0j]"AL\r*! \0 7@ \0 7H \0A\xACj \x07 \0A@kP\f\v*! (\b!\x07 \0 7 \0 7\b \0 \x076\0 \0A\xACj \0A\xD8j \0P\v"A\x7FF\r \0(\xAC\f\vA\0\v \0(\xAC"\x07 \x07j"
- G!\v@ \0A\xB0j \x07F@ \0A\xF0\0j!A\0!\b\f\v At/"\b! \bE\r\v \0A\xE4\0j"\f $ \x07 \v
- \0A\xEC\0j \0A\xE8\0j \f\x93 \0(d# \0(l \0(h Z! \b!! \0A\xE0j$\0 \f\v0\0\v\v\x9A\x07\x7F\x7F#\0A\xC0k"\0$\0 \0B%7\xB8 \0A\xB8j"ArA\xD7 (\x91!\x07 \0 \0A\x90j"\b6\x8C*!@\x7F@\x7F@ \x07@ (\b!\x07 \0 9 \0 \x076 \b \0Aj]"AJ\r\f\v \0 90 \0A\x90j \0A\xB8j" \0A0j]"AL\r*! \0 9 \0A\x8Cj \0A jP\f\v*! (\b! \0 9\b \0 6\0 \0A\x8Cj \0A\xB8j \0P\v"A\x7FF\r \0(\x8C\f\vA\0\v \0(\x8C" j" G!
- @ \0A\x90j F@ \0A\xD0\0j!A\0!\x07\f\v At/"\x07! \x07E\r\v \0A\xC4\0j"\v $
- \0A\xCC\0j \0A\xC8\0j \v\x93 \0(D# \0(L \0(H Z! \x07!! \0A\xC0j$\0 \f\v0\0\v\v\xC3\x7F#\0A\xF0\0k"\0$\0A\bAA
- ("A\xCA\0q"\x07A\bF\x1B \x07A\xC0\0F"\b\x1B! \0A\xD0\0j!@ A\x80qE Pr\r\0 \b@ \0A0:\0P Ar!\f\v \x07A\bG\r\0 \0A0:\0P \0A\xD8\0A\xF8\0 A\x80\x80q\x1B:\0Q \0A\xD0\0jAr!\v \0A\xC8\0j \0A\xE8\0j \x92 \0(H!\x07@ A\x88\x80qA\x88\x80G\r\0@ \x07F\r -\0\0"A k A\xE1\0kA\xFFqAI\x1B:\0\0 Aj!\f\0\v\0\v \0A\xD0\0j" \x07 G! \0Aj"\b $ \x07 \0Aj" \0A\fj \0A\bj \b\x93 \0(# \0(\f \0(\b Z \0A\xF0\0j$\0\v\r\0 \x94\v\xA5\x7F~#\0A\xF0\0k"$\0 A\xD0\0j!\0~ ("A\xCA\0q"\x07A\bF"\b B\0YrE@ \x07A\xC0\0F\r A-:\0P \0Ar!\0B\0 }\f\v \v!
- \b \x07A\xC0\0F" r A\x80qE B\0SrrE@ \0A+:\0\0 \0Aj!\0\vA\bAA
- \b\x1B \x1B!\b@ A\x80qE Pr\r\0 \x07A\xC0\0F@ \0A0:\0\0 \0Aj!\0\f\v \x07A\bG\r\0 \0A0:\0\0 \0A\xD8\0A\xF8\0 A\x80\x80q\x1B:\0 \0Aj!\0\v A\xC8\0j \0 A\xE8\0j
- \b\x92@ A\x88\x80qA\x88\x80F@@ \0 (H"F\r \0 \0-\0\0"A k A\xE1\0kA\xFFqAI\x1B:\0\0 \0Aj!\0\f\0\v\0\v (H!\v A\xD0\0j"\0 G!\x07 Aj"\b $ \0 \x07 Aj"\0 A\fj A\bj \b\x93 (# \0 (\f (\b Z A\xF0\0j$\0\v\x9D\x7F#\0A@j"$\0 A3j!\0\x7F ("A\xCA\0q"\x07A\bF"\b A\0NrE@ \x07A\xC0\0F\r A-:\x003 A4j!\0A\0 k\f\v \v! \b \x07A\xC0\0F"
- r A\x80qE A\0HrrE@ \0A+:\0\0 \0Aj!\0\vA\bAA
- \b\x1B
- \x1B!\b@ E A\x80qEr\r\0 \x07A\xC0\0F@ \0A0:\0\0 \0Aj!\0\f\v \x07A\bG\r\0 \0A0:\0\0 \0A\xD8\0A\xF8\0 A\x80\x80q\x1B:\0 \0Aj!\0\v A(j \0 A@k \b\x94@ A\x88\x80qA\x88\x80F@@ \0 (("F\r \0 \0-\0\0"A k A\xE1\0kA\xFFqAI\x1B:\0\0 \0Aj!\0\f\0\v\0\v ((!\v A3j"\0 G! Aj"\x07 $ \0 Aj"\0 A\fj A\bj \x07\x93 (# \0 (\f (\b Z A@k$\0\v\xDB\x7F#\0Ak"$\0 6\f@ -\0AqE@ \0 \0(\0( \0!\f\v $ p!\0 (\0# \0 \0(\0AA \x1Bj(\0\0 (\0" ,\0\v"A\0H\x1B!@ \xC0A\0H"\0\x1B ( A\xFFq \0\x1Bj F@ (\f! A\fj ,\0\0\xC0 Aj! (\0! -\0\v!\f\v\v\v Aj$\0 \v\xED\x7F#\0A\xD0k"\0$\0 \0 6\xC8 \0 6\xCC \0A\x006\xD8 \0B\x007\xD0 \0Aj" $ ="A\xD0\x85A\xEA\x85 \0A\xE0j (\0(0\0 \0(# \0A\x006\xC8 \0B\x007\xC0 \0A\xC0j"A
- " \0 \0(\xC0 \0,\0\xCBA\0H\x1B"6\xBC \0 6\f \0A\x006\b@@ \0A\xCCj \0A\xC8j(\r\0 \0(\xBC \0(\xC4 \0,\0\xCB" A\0H\x1B"jF@ \0A\xC0j" At" A
- \0(\xC8A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xCBA\0N\x1B" \0 \0(\xC0 \0,\0\xCBA\0H\x1B" j6\xBC\v \0(\xCCCA \0A\xBCj \0A\bjA\0 \0A\xD0j \0Aj \0A\fj \0A\xE0jm\r\0 \0(\xCCB\f\v\v \0A\xC0j" \0(\xBC k" \0(\xC0 \0,\0\xCB!*! \0 6\0 A\0H\x1B \0\x98AG@ A6\0\v \0A\xCCj \0A\xC8j(@ (\0Ar6\0\v \0(\xCC \0A\xC0j \0A\xD0j \0A\xD0j$\0\v\xBD\x7F~\x7F#\0A\xF0k"\0$\0 \0 6\xE8 \0 6\xEC \0A\xDCj \0A\xF0j \0A\xECj \0A\xE8j\xB3 \0A\x006\xD8 \0B\x007\xD0 \0A\xD0j"A
- " \0 \0(\xD0 \0,\0\xDBA\0H\x1B"6\xCC \0 \0A j6 \0A\x006 \0A:\0 \0A\xC5\0:\0A\0!@@@@ \0A\xECj \0A\xE8j(\r\0 \0(\xCC \0(\xD4 \0,\0\xDB" A\0H\x1B"jF@ \0A\xD0j" At" A
- \0(\xD8A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xDBA\0N\x1B" \0 \0(\xD0 \0,\0\xDBA\0H\x1B" j6\xCC\v \0(\xECC \0Aj \0Aj \0A\xCCj \0(\xEC \0(\xE8 \0A\xDCj \0A j \0Aj \0Aj \0A\xF0j\xB2\r\0 \rA\0! \0(\xCC k"A\0L\r@@ -\0\0"A+k"\x07\0\0\v A.F\rA! A0kA\xFFqA
- I\r\f\v AF\r@ \x07\0\0\v -\0"A.F\rA! A0kA\xFFqA M\r\v@ \0(\xE0 \0,\0\xE7" A\0H\x1BE\r\0 \0-\0AqE\r\0 \0(" \0A jkA\x9FJ\r\0 \0 Aj6 \0(6\0\v \0 \0(\xCC \x99 \0)\0!\b \0)\b7\b \b7\0 \0A\xDCj \0A j \0( 5 \0A\xECj \0A\xE8j(@ (\0Ar6\0\v \0(\xEC \0A\xD0j \0A\xDCj \0A\xF0j$\0\f\vA!\v \0(\xECB\f\0\v\0\v\v\xA6\x7F\x7F#\0A\xE0k"\0$\0 \0 6\xD8 \0 6\xDC \0A\xCCj \0A\xE0j \0A\xDCj \0A\xD8j\xB3 \0A\x006\xC8 \0B\x007\xC0 \0A\xC0j"A
- " \0 \0(\xC0 \0,\0\xCBA\0H\x1B"6\xBC \0 \0Aj6\f \0A\x006\b \0A:\0\x07 \0A\xC5\0:\0A\0!@@@@ \0A\xDCj \0A\xD8j(\r\0 \0(\xBC \0(\xC4 \0,\0\xCB" A\0H\x1B"jF@ \0A\xC0j" At" A
- \0(\xC8A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xCBA\0N\x1B" \0 \0(\xC0 \0,\0\xCBA\0H\x1B" j6\xBC\v \0(\xDCC \0A\x07j \0Aj \0A\xBCj \0(\xDC \0(\xD8 \0A\xCCj \0Aj \0A\fj \0A\bj \0A\xE0j\xB2\r\0 \rA\0! \0(\xBC k"A\0L\r@@ -\0\0"A+k"\x07\0\0\v A.F\rA! A0kA\xFFqA
- I\r\f\v AF\r@ \x07\0\0\v -\0"A.F\rA! A0kA\xFFqA M\r\v@ \0(\xD0 \0,\0\xD7" A\0H\x1BE\r\0 \0-\0\x07AqE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f \0(\b6\0\v \0(\xBC \x9A9\0 \0A\xCCj \0Aj \0(\f 5 \0A\xDCj \0A\xD8j(@ (\0Ar6\0\v \0(\xDC \0A\xC0j \0A\xCCj \0A\xE0j$\0\f\vA!\v \0(\xDCB\f\0\v\0\v\v\xA6\x7F\x7F#\0A\xE0k"\0$\0 \0 6\xD8 \0 6\xDC \0A\xCCj \0A\xE0j \0A\xDCj \0A\xD8j\xB3 \0A\x006\xC8 \0B\x007\xC0 \0A\xC0j"A
- " \0 \0(\xC0 \0,\0\xCBA\0H\x1B"6\xBC \0 \0Aj6\f \0A\x006\b \0A:\0\x07 \0A\xC5\0:\0A\0!@@@@ \0A\xDCj \0A\xD8j(\r\0 \0(\xBC \0(\xC4 \0,\0\xCB" A\0H\x1B"jF@ \0A\xC0j" At" A
- \0(\xC8A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xCBA\0N\x1B" \0 \0(\xC0 \0,\0\xCBA\0H\x1B" j6\xBC\v \0(\xDCC \0A\x07j \0Aj \0A\xBCj \0(\xDC \0(\xD8 \0A\xCCj \0Aj \0A\fj \0A\bj \0A\xE0j\xB2\r\0 \rA\0! \0(\xBC k"A\0L\r@@ -\0\0"A+k"\x07\0\0\v A.F\rA! A0kA\xFFqA
- I\r\f\v AF\r@ \x07\0\0\v -\0"A.F\rA! A0kA\xFFqA M\r\v@ \0(\xD0 \0,\0\xD7" A\0H\x1BE\r\0 \0-\0\x07AqE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f \0(\b6\0\v \0(\xBC \x9B8\0 \0A\xCCj \0Aj \0(\f 5 \0A\xDCj \0A\xD8j(@ (\0Ar6\0\v \0(\xDC \0A\xC0j \0A\xCCj \0A\xE0j$\0\f\vA!\v \0(\xDCB\f\0\v\0\v\v\xF1\x7F#\0A\xD0k"\0$\0 \0 6\xC8 \0 6\xCC R! \0A\xD0j~! \0A\xC4j \0A\xC4j} \0A\x006\xC0 \0B\x007\xB8 \0A\xB8j"A
- " \0 \0(\xB8 \0,\0\xC3A\0H\x1B"6\xB4 \0 \0Aj6\f \0A\x006\b@@ \0A\xCCj \0A\xC8j(\r\0 \0(\xB4 \0(\xBC \0,\0\xC3" A\0H\x1B"jF@ \0A\xB8j" At" A
- \0(\xC0A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xC3A\0N\x1B" \0 \0(\xB8 \0,\0\xC3A\0H\x1B" j6\xB4\v \0(\xCCC \0A\xB4j \0A\bj \0(\xC4 \0A\xC4j \0Aj \0A\fj m\r\0 \0(\xCCB\f\v\v@ \0(\xC8 \0,\0\xCF" A\0H\x1BE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f \0(\b6\0\v \0(\xB4 \x9C7\0 \0A\xC4j \0Aj \0(\f 5 \0A\xCCj \0A\xC8j(@ (\0Ar6\0\v \0(\xCC \0A\xB8j \0A\xC4j \0A\xD0j$\0\v\x07\0 \0(\0\v\xF1\x7F#\0A\xD0k"\0$\0 \0 6\xC8 \0 6\xCC R! \0A\xD0j~! \0A\xC4j \0A\xC4j} \0A\x006\xC0 \0B\x007\xB8 \0A\xB8j"A
- " \0 \0(\xB8 \0,\0\xC3A\0H\x1B"6\xB4 \0 \0Aj6\f \0A\x006\b@@ \0A\xCCj \0A\xC8j(\r\0 \0(\xB4 \0(\xBC \0,\0\xC3" A\0H\x1B"jF@ \0A\xB8j" At" A
- \0(\xC0A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xC3A\0N\x1B" \0 \0(\xB8 \0,\0\xC3A\0H\x1B" j6\xB4\v \0(\xCCC \0A\xB4j \0A\bj \0(\xC4 \0A\xC4j \0Aj \0A\fj m\r\0 \0(\xCCB\f\v\v@ \0(\xC8 \0,\0\xCF" A\0H\x1BE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f \0(\b6\0\v \0(\xB4 \x9F;\0 \0A\xC4j \0Aj \0(\f 5 \0A\xCCj \0A\xC8j(@ (\0Ar6\0\v \0(\xCC \0A\xB8j \0A\xC4j \0A\xD0j$\0\v\xF1\x7F#\0A\xD0k"\0$\0 \0 6\xC8 \0 6\xCC R! \0A\xD0j~! \0A\xC4j \0A\xC4j} \0A\x006\xC0 \0B\x007\xB8 \0A\xB8j"A
- " \0 \0(\xB8 \0,\0\xC3A\0H\x1B"6\xB4 \0 \0Aj6\f \0A\x006\b@@ \0A\xCCj \0A\xC8j(\r\0 \0(\xB4 \0(\xBC \0,\0\xC3" A\0H\x1B"jF@ \0A\xB8j" At" A
- \0(\xC0A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xC3A\0N\x1B" \0 \0(\xB8 \0,\0\xC3A\0H\x1B" j6\xB4\v \0(\xCCC \0A\xB4j \0A\bj \0(\xC4 \0A\xC4j \0Aj \0A\fj m\r\0 \0(\xCCB\f\v\v@ \0(\xC8 \0,\0\xCF" A\0H\x1BE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f \0(\b6\0\v \0(\xB4 \xA07\0 \0A\xC4j \0Aj \0(\f 5 \0A\xCCj \0A\xC8j(@ (\0Ar6\0\v \0(\xCC \0A\xB8j \0A\xC4j \0A\xD0j$\0\v\xF1\x7F#\0A\xD0k"\0$\0 \0 6\xC8 \0 6\xCC R! \0A\xD0j~! \0A\xC4j \0A\xC4j} \0A\x006\xC0 \0B\x007\xB8 \0A\xB8j"A
- " \0 \0(\xB8 \0,\0\xC3A\0H\x1B"6\xB4 \0 \0Aj6\f \0A\x006\b@@ \0A\xCCj \0A\xC8j(\r\0 \0(\xB4 \0(\xBC \0,\0\xC3" A\0H\x1B"jF@ \0A\xB8j" At" A
- \0(\xC0A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xC3A\0N\x1B" \0 \0(\xB8 \0,\0\xC3A\0H\x1B" j6\xB4\v \0(\xCCC \0A\xB4j \0A\bj \0(\xC4 \0A\xC4j \0Aj \0A\fj m\r\0 \0(\xCCB\f\v\v@ \0(\xC8 \0,\0\xCF" A\0H\x1BE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f \0(\b6\0\v \0(\xB4 \xA16\0 \0A\xC4j \0Aj \0(\f 5 \0A\xCCj \0A\xC8j(@ (\0Ar6\0\v \0(\xCC \0A\xB8j \0A\xC4j \0A\xD0j$\0\v\x99\x8B.\x7F}|#\0Ak"$\0 6\f A\x006\b B\x007\0 j" k\xC2#\0A\xE0\0k"%$\0 %A\bj! (\0"! ( k!#\0A\xC0k"$\0 A\x006\xA0 B\x007\x98 A\x006\xB0 B\x007\xA8 A\xB4j"A\x006\b B\x007\0 A\x80\xC0\0\xB6 A\x80\xC0\0\x96 A\fjA\0A0\xFC\v\0 6\b 6@\x7F Aj!\v\x7FAzA\x94-\0\0A1G\r\0A~ \vE\r \vA\x006 \v( "E@ \vA\x006( \vA/6 A/!\v \v($E@ \vA06$\vA| \v((AA\xD07 \0"E\r \v 6 A\x0068 \v6\0 A\xB4\xFE\x006A~!@ \vE\r\0 \v( E\r\0 \v($"E\r\0 \v("E\r\0 (\0 \vG\r\0 (A\xB4\xFE\0kAK\r\0@@ (8"@ ((AG\r\v A6( A6\f\f\v \v(( \0 A\x0068 \v( A6( A6\fE\r\v \v($E\r\0 \v("E\r\0 (\0 \vG\r\0 (A\xB4\xFE\0kAK\r\0A\0! A\x0064 B\x007, A\x006 \vA\x006\b \vB\x007 (\f"@ \v Aq60\v B\x007< A\x006$ A\x80\x806 B\x80\x80\x80\x80p7 B\xB4\xFE\x007 B\x81\x80\x80\x80p7\xC47 A\xB4
- j"6p 6T 6P\vA\0 E\r\0 \v(( \v($\0 \vA\x006 \v\vE@ A\x006\xAC@@ (\0"6 ( k6A\0!\v#\0Ak"$\0A~!\x1B@ Aj"\rE\r\0 \r( E\r\0 \r($E\r\0 \r("\x07E\r\0 \x07(\0 \rG\r\0 \x07("A\xB4\xFE\0kAK\r\0 \r(\f"E\r\0 \r(\0"E@ \r(\r\v A\xBF\xFE\0F@ \x07A\xC0\xFE\x006A\xC0\xFE\0!\v \x07A\xDC\0j!- \x07A\xF2\0j!. \x07A\xF4j!" \x07A\xD8\0j!& \x07A\xF0\0j!# \x07A\xB4
- j! \x07A\xF4\0j! \x07(@! \x07(<! \r("'! \r("!@@@@@@A}!@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ A\xB4\xFE\0k\x07
- \r9:;<%&(\0*@BCD\v \x07(L! \f(\v \x07(L! \f%\v \x07(l! \f!\v \x07(\f!\f9\v AO\r E\r< A\bj! Aj! Ak! -\0\0 t j! AM\r ! ! !\f\v A O\r E\r; Aj! Ak! -\0\0 t j! AM\r\r ! !\f\v AO\r E\r: A\bj! Aj! Ak! -\0\0 t j! A\x07M\r ! ! !\f\v \x07(\f"
- E\r@ AO\r\0 E\r: A\bj! Aj! Ak! -\0\0 t j! A\x07K@ ! ! !\f\v E@ !A\0! ! \v!\f<\v Ar! Ak! -\0 t j! Aj!\v
- AqE A\x9F\x96GrE@ \x07((E@ \x07A6(\vA\0! \x07A\0A\0A\0D"6 A\x9F\x96;\f A\fjAD! \x07A\xB5\xFE\x006 \x07 6A\0! \x07(!\f7\v \x07($"@ A\x7F60\v A\btA\x80\xFEq A\bvjApE
- AqqE@ \rA\xD96 \x07A\xD1\xFE\x006 \x07(!\f7\v AqA\bG@ \rA\xBA6 \x07A\xD1\xFE\x006 \x07(!\f7\v Av"Aq" A\bj!
- A\x07M \x07(("\x7F \x07
- 6(
- \v
- OqE@ Ak! \rA\xF46 \x07A\xD1\xFE\x006 ! \x07(!\f7\vA\0! \x07A\x006 \x07A\x80 t6 \x07A\0A\0A\0\x82"6 \r 60 \x07A\xBD\xFE\0A\xBF\xFE\0 A\x80\xC0\0q\x1B6A\0! \x07(!\f6\v E@ !A\0! ! \v!\f:\v Ar! Ak! -\0 t j! Aj!\v \x07 6 A\xFFqA\bG@ \rA\xBA6 \x07A\xD1\xFE\x006 \x07(!\f5\v A\x80\xC0q@ \rA\x90
- 6 \x07A\xD1\xFE\x006 \x07(!\f5\v \x07($"@ A\bvAq6\0\v@ A\x80qE\r\0 \x07-\0\fAqE\r\0 A\b:\0\f A\bv:\0\r \x07 \x07( A\fjAD6\v \x07A\xB6\xFE\x006A\0!A\0!\f\v AK\r\v E\r5 Aj! Ak! -\0\0 t j! AK@ ! !\f\v A\bj! E@ !A\0! ! \v!\f7\v Aj! Ak! -\0 t j! AK@ ! !\f\v Aj! E@ !A\0! ! \v!\f7\v Aj! Ak! -\0 t j! A\x07K@ ! !\f\v Aj! E@ !\f6\v Ak! -\0 t j! Aj!\v \x07($"@ 6\v@ \x07-\0AqE\r\0 \x07-\0\fAqE\r\0 6\f \x07 \x07( A\fjAD6\v \x07A\xB7\xFE\x006A\0!A\0!\f\v AK\r\v E\r2 Aj! Ak! -\0\0 t j! A\x07K@ ! !\f\v A\bj! E@ !\f3\v Ak! -\0 t j! Aj!\v \x07($"@ A\bv6\f A\xFFq6\b\v@ \x07-\0AqE\r\0 \x07-\0\fAqE\r\0 ;\f \x07 \x07( A\fjAD6\v \x07A\xB8\xFE\x006A\0!A\0!A\0! \x07("A\x80\bq\r\f'\v \x07("A\x80\bqE@ !\f'\v ! AK\r\v E@A\0! ! \v!\f1\v Aj! Ak!
- -\0\0 t j! A\x07K@ !
- !\f\v A\bj!
- E@ !\f0\v Ak! -\0 t j! Aj!\v \x07 6D \x07($"@ 6\vA\0!@ A\x80qE\r\0 \x07-\0\fAqE\r\0 ;\f \x07 \x07( A\fjAD6\vA\0!\f%\v A\bj! E@ !A\0! ! \v!\f/\v Aj! Ak! -\0 t j! AK@ ! !\f\v Aj! E@ !A\0! ! \v!\f/\v Aj! Ak! -\0 t j! A\x07K@ ! !\f\v Aj! E@ !\f.\v Ak! -\0 t j! Aj!\v \x07 AxA\xFF\x81\xFC\x07q A\xFF\x81\xFC\x07qA\bxr"6 \r 60 \x07A\xBE\xFE\x006A\0!A\0!\v \x07(E@ \r 6 \r 6\f \r 6 \r 6\0 \x07 6@ \x07 6<A!\x1B\f/\v \x07A\0A\0A\0\x82"6 \r 60 \x07A\xBF\xFE\x006\v\x7F@ \x07(\bE@ AK\r \r\f-\v \x07A\xCE\xFE\x006 A\x07qv! Axq! \x07(!\f)\v Ak! -\0\0 t j! Aj! A\br\v \x07 Aq6\bA\xC1\xFE\0!@@@@@ AvAqAk\0\v \x07A\x90\xDC\x006P \x07B\x89\x80\x80\x80\xD0\x007X \x07A\x90\xEC\x006T \x07A\xC7\xFE\x006\f\vA\xC4\xFE\0!\f\v \rA\x976A\xD1\xFE\0!\v \x07 6\vAk! Av! \x07(!\f'\v A\x07qv!\x7F Axq"\b AK\r\0 E@A\0! \b! \v!\f,\v \bA\bj! Aj! Ak! -\0\0 \bt j! AK@ ! ! \f\v E@ !A\0! ! \v!\f,\v \bAj!
- Aj! Ak! -\0 t j! AK@ ! !
- \f\v E@ !A\0!
- ! \v!\f,\v \bAj! Aj! Ak! -\0
- t j! A\x07K@ ! ! \f\v E@ !A\0! ! \v!\f,\v Ak! -\0 t j! Aj!A \v! A\xFF\xFFq" A\x7FsAvG@ \rA\xC2\v6 \x07A\xD1\xFE\x006 \x07(!\f'\v \x07A\xC2\xFE\x006 \x07 6DA\0!A\0!\v \x07A\xC3\xFE\x006\v \x07(D"@ I\x1B" I\x1B"E@ \v!\f*\v @ \xFC
- \0\0\v \x07 \x07(D k6D j! k! j! k! \x07(!\f%\v \x07A\xBF\xFE\x006 \x07(!\f$\v E@ !A\0! ! \v!\f(\v Ar! Ak! -\0 t j! Aj!\v \x07 Aq"A\x81j6d \x07 AvAq"Aj6h \x07 A
- vAqAj"
- 6\` Ak! Av! AI AMqE@ \rA\x9E\v6 \x07A\xD1\xFE\x006 \x07(!\f#\v \x07A\xC5\xFE\x006A\0! \x07A\x006l\f\v \x07(l" \x07(\`"
- I\r\f\v E\r\r \x07(D:\0\0 \x07A\xC8\xFE\x006 Ak! Aj! \x07(!\f \v \x07(\f"E@A\0!\f\v@ AK@ ! \f\v E\r# A\bj! Aj! Ak!
- -\0\0 t j! AK@
- ! !\f\v
- E@ !A\0! ! \v!\f%\v Aj!
- Aj! Ak!\b -\0 t j! AK@ \b!
- !\f\v \bE@ !A\0!
- ! \v!\f%\v Aj! Aj! Ak!\b -\0
- t j! A\x07K@ \b! !\f\v \bE@ !A\0! ! \v!\f%\v A r! Aj! Ak! -\0 t j!\v \r k"
- \r(j6 \x07 \x07(
- j6 Aq"E Fr\x7F
- k! \x07(! \x07\x7F \x07(@
- D\f\v
- \x82\v"6 \r 60 \x07(\f"Aq\vE\r \x07( AxA\xFF\x81\xFC\x07q A\xFF\x81\xFC\x07qA\bxr \x07(\x1BF\r \rA\x876 \x07A\xD1\xFE\x006 ! ! \x07(!\f\v \x07A\xC0\xFE\x006\f\v !A\0!A\0! !\v \x07A\xCF\xFE\x006\f\x1B\v@ AM@ E\r Ak! -\0\0 t j! A\br! Aj!\v \x07 Aj"6l At/\xE0[Atj A\x07q;\0 Ak! Av! "
- G\r\0\v
- !\v AM@A\0! "Aq"\vAG@@ At/\xE0[AtjA\0;\0 Aj! \v Aj" sAG\r\0\v\v AM@@ At"A\xE0\xDB\0j/\0AtjA\0;\0 A\xE2\xDB\0j/\0AtjA\0;\0 A\xE4\xDB\0j/\0AtjA\0;\0 A\xE6\xDB\0j/\0AtjA\0;\0 Aj"AG\r\0\v\v \x07A6l\v \x07A\x076X \x07 6P \x07 6pA\0! A\0 A # & "\xA2"\v@ \rA\xF7 6 \x07A\xD1\xFE\x006 \x07(!\f\x1B\v \x07A\xC6\xFE\x006 \x07A\x006lA\0!\v\v \x07(d" \x07(hj" K@A\x7F \x07(XtA\x7Fs! \x07(P!@ !\f ! !@@@@@@ q"Atj-\0"\b M@ !
- \f\v@ E\r -\0\0 \ft!\b Aj! Ak! \fA\bj"
- !\f
- \bj" q"Atj-\0"\bI\r\0\v\v Atj/"AM@ \x07 Aj"6l Atj ;\0
- \bk! \bv! ! \f\v\x7F\x7F@@@ Ak\0\v \bAj"
- K@@ E\r Ak! -\0\0
- t j! Aj!
- A\bj"
- I\r\0\v\v
- \bk! \bv!
- E@ \rA\xCD
- 6 \x07A\xD1\xFE\x006 ! !
- ! \x07(!\f%\v Ak!
- Av!
- AqAj!\b . Atj/\0\f\v \bAj"
- K@@ E\r Ak! -\0\0
- t j! Aj!
- A\bj"
- I\r\0\v\v
- \bkAk! \bv"Av! A\x07qAj\f\v \bA\x07j"
- K@@ E\r Ak! -\0\0
- t j! Aj!
- A\bj"
- I\r\0\v\v
- \bkA\x07k! \bv"A\x07v! A\xFF\0qA\vj\v!\bA\0\v!\f \b j K\rA\0!
- \bAq"E\r \b!@ Atj \f;\0 Aj! Ak!
- Aj"
- G\r\0\v\f\v j! Atj!\f"\v \b!\f\v \rA\xCD
- 6 \x07A\xD1\xFE\x006 ! ! \x07(!\f\v \bAO@@ Atj" \f;\0 \f; \f; \f; Aj! Ak"\r\0\v\v \x07 6l\v ! ! I\r\0\v\v \x07/\xF4E@ \rA\xB46 \x07A\xD1\xFE\x006 \x07(!\f\v \x07A 6X \x07 6P \x07 6pA # & "\xA2"\v@ \rA\xDB 6 \x07A\xD1\xFE\x006 \x07(!\f\v \x07A6\\ \x07 \x07(p6TA \x07(dAtj \x07(h # - "\xA2"\v@ \rA\xA9
- 6 \x07A\xD1\xFE\x006 \x07(!\f\v \x07A\xC7\xFE\x006A\0!\v\v \x07A\xC8\xFE\x006\v AI A\x82IrE@ \r 6 \r 6\f \r 6 \r 6\0 \x07 6@ \x07 6< \r("(4"\bA\x07q!( \b j!/ \b (,"0j!1 \r(\f" \r("j"$A\x81k!) kj! \r(\0" \r(jAk!*A\x7F (\\tA\x7Fs!A\x7F (XtA\x7Fs! (T!+ (P!, (@! (<!\f (8!
- (0!@ AM\x7F -\0\0 t \fj -\0 A\bjtj!\f Aj! Ar \v , \f qAtj"-\0"k! \f v!\f@@@@@ \x7F \r\x7F@@ -\0\0"E@ -\0:\0\0 Aj!\f\b\v Aq@ /!\x7F Aq"E@ ! \f\f\v\x7F M@ ! \f\v A\bj! -\0\0 t \fj!\f Aj\v! k! \fA\x7F tA\x7Fsq j! \f v\v! AM@ -\0\0 t j -\0 A\bjtj! Ar! Aj!\v + qAtj"-\0" k! v!\f -\0\0"Aq\r@ A\xC0\0qE@ + /Atj \fA\x7F tA\x7FsqAtj"-\0"k! \f v!\f -\0\0"AqE\r\f\v\v ! A\x93\f\v A\xC0\0qE@ , /Atj \fA\x7F tA\x7FsqAtj"-\0"k! \f v!\f\f\v\vA\xBF\xFE\0 A q\rA\xF7\f\v /!\x7F Aq" M@ ! \f\v -\0\0 t \fj!\f Aj A\bj"M\r\0 -\0 t \fj!\f Aj! Aj\v! \fA\x7F tA\x7Fsq! k! \f v!\f j"! k"M\r ! k" M\r (\xC47E\rA\xA6\v6A\xD1\xFE\0\v6\f\v@@ \bE@
- 0 kj! O@ !\f\vA\0! ! "A\x07q"@@ -\0\0:\0\0 Ak! Aj! Aj! Aj" G\r\0\v\v $j jk jAxK\r@ -\0\0:\0\0 -\0:\0 -\0:\0 -\0:\0 -\0:\0 -\0:\0 -\0:\0 -\0\x07:\0\x07 A\bj! A\bj! A\bk"\r\0\v\f\v \bK@
- 1 kj! \bk" O@ !\f\vA\0! ! "A\x07q"@@ -\0\0:\0\0 Ak! Aj! Aj! Aj" G\r\0\v\v / $j jk jAxM@@ -\0\0:\0\0 -\0:\0 -\0:\0 -\0:\0 -\0:\0 -\0:\0 -\0:\0 -\0\x07:\0\x07 A\bj! A\bj! A\bk"\r\0\v\v \b k"O@
- !\f\vA\0! \b!
- ! (@@ -\0\0:\0\0 Ak! Aj! Aj! Aj" (G\r\0\v\v \bA\bO@@ -\0\0:\0\0 -\0:\0 -\0:\0 -\0:\0 -\0:\0 -\0:\0 -\0:\0 -\0\x07:\0\x07 A\bj! A\bj! A\bk"\r\0\v\v !k! \bk!\f\v
- \b kj! O@ !\f\vA\0! ! "A\x07q"@@ -\0\0:\0\0 Ak! Aj! Aj! Aj" G\r\0\v\v $j jk jAxK\r\0@ -\0\0:\0\0 -\0:\0 -\0:\0 -\0:\0 -\0:\0 -\0:\0 -\0:\0 -\0\x07:\0\x07 A\bj! A\bj! A\bk"\r\0\v\v !k! k!\v@ AI\r\0A\0! Ak"AnAjAq"@@ -\0\0:\0\0 -\0:\0 -\0:\0 Ak! Aj! Aj! Aj" G\r\0\v\v A I\r\0@ -\0\0:\0\0 -\0:\0 -\0:\0 -\0:\0 -\0:\0 -\0:\0 -\0:\0 -\0\x07:\0\x07 -\0\b:\0\b -\0 :\0 -\0
- :\0
- -\0\v:\0\v A\fj! A\fj! A\fk"AK\r\0\v\v E@ !\f\v -\0\0:\0\0 AF\r Aj!\f\v !k!@ " "-\0\0:\0\0 -\0:\0 -\0:\0 Aj! Aj! Ak"AK\r\0\v E\r -\0\0:\0 AG@ Aj!\f\v -\0:\0 Aj!\f\v -\0:\0 Aj!\v *O\r\0 )I\r\v\v \r 6\f \r Avk"6\0 \r ) kA\x81j6 \r * kAj6 A\x07q"6@ \fA\x7F tA\x7Fsq6< \x07(@! \x07(<! \r(! \r(\0! \r(! \r(\f! \x07(A\xBF\xFE\0G\r \x07A\x7F6\xC87 \x07(!\f\v \x07A\x006\xC87 ! ! !@ \x07(P" A\x7F \x07(XtA\x7Fs"qAtj"\b-\0"\f M@ !
- \f\v@ E\r\r -\0\0 t!\b Aj! Ak! A\bj"
- !
- \bj" qAtj"\b-\0"\fI\r\0\v\v \f! \b/!@ \b-\0\0"\bAkA\xFFqAK@A\0! ! !\f\v ! !@
- " Atj" A\x7F \bjtA\x7Fs"q vAtj"-\0"\fjO@
- !\b\f\v@ E\r\r -\0\0 t!\f Aj! Ak! A\bj"\b! \fj" q vAtj"-\0"\fj \bK\r\0\v\v \b k!
- v! -\0\0!\b /!\v \x07 A\xFF\xFFq6D \x07 \fj6\xC87
- \fk! \fv! \bA\xFFq"E@ \x07A\xCD\xFE\x006 \x07(!\f\v A q@ \x07A\xBF\xFE\x006 \x07A\x7F6\xC87 \x07(!\f\v A\xC0\0q@ \rA\xF76 \x07A\xD1\xFE\x006 \x07(!\f\v \x07A\xC9\xFE\x006 \x07 Aq" 6L\v !
- !\b@ E@ \x07(D!\f\v ! ! I@@ E\r\v Ak! -\0\0 t j! Aj"! A\bj" I\r\0\v\v \x07 \x07(\xC87 j6\xC87 \x07 \x07(D A\x7F tA\x7Fsqj"6D k! v!\v \x07A\xCA\xFE\x006 \x07 6\xCC7\v ! ! !@ \x07(T" A\x7F \x07(\\tA\x7Fs"qAtj"\b-\0"\f M@ !
- \f\v@ E\r\b -\0\0 t!\b Aj! Ak! A\bj"
- !
- \bj" qAtj"\b-\0"\fI\r\0\v\v \b/! \x07\x7F \b-\0\0" AO@ ! ! \f!\b \x07(\xC87\f\v ! !@
- " \f Atj" A\x7F \fjtA\x7Fs"q \fvAtj"-\0"\bjO@ ! \f\v@ E\r\b -\0\0 t!\b Aj! Ak! A\bj" ! \f \bj" q \fvAtj"-\0"\bj K\r\0\v\v \fk!
- \fv! -\0\0! /! \x07(\xC87 \fj\v \bj6\xC87
- \bk! \bv! A\xC0\0q@ \rA\x936 \x07A\xD1\xFE\x006 \x07(!\f\v \x07A\xCB\xFE\x006 \x07 Aq" 6L \x07 A\xFF\xFFq6H\v !
- !\b @ ! ! I@@ E\r Ak! -\0\0 t j! Aj"! A\bj" I\r\0\v\v \x07 \x07(\xC87 j6\xC87 \x07 \x07(H A\x7F tA\x7Fsqj6H v! k!\v \x07A\xCC\xFE\x006\v \r\vA\0! \v!\f\v\x7F \x07(H" k"K@@ k" \x07(0M\r\0 \x07(\xC47E\r\0 \rA\xA66 \x07A\xD1\xFE\x006 \x07(!\f\v\x7F \x07(4" I@ \x07(8 \x07(, k"kj\f\v \x07(8 kj\v! \x07(D" I\x1B\f\v k! \x07(D" \v! \x07 I\x1B"
- k6D
- Ak!\fA\0!
- A\x07q"\bE\r
- !@ -\0\0:\0\0 Ak! Aj! Aj! Aj" \bG\r\0\v\f\x07\v \b
- j! \bAtj!\f\v j!
- Atj!\f\v j! Atj!\f\v \b
- j! \bAtj!\f\v j!
- Atj!\f\v j! Atj!\f\v
- !\v \fA\x07O@@ -\0\0:\0\0 -\0:\0 -\0:\0 -\0:\0 -\0:\0 -\0:\0 -\0:\0 -\0\x07:\0\x07 A\bj! A\bj! A\bk"\r\0\v\v
- k! \x07(D\r\0 \x07A\xC8\xFE\x006 \x07(!\f \v \x07(!\f\b\vA\0! !
- ! \v!\f\v\v \x07($"@ A\x006\v !\v \x07A\xB9\xFE\x006\v@ \x07(" A\x80\bqE\r\0 \x07(D" K\x1B"\f@@ \x07($"\bE\r\0 \b("
- E\r\0 \b(" \b( k"M\r\0 k \f \fj K\x1B"@
- j \xFC
- \0\0\v \x07(! \v@ A\x80qE\r\0 \x07-\0\fAqE\r\0 \x07 \x07( \fD6\v \x07 \x07(D \fk"6D \fk! \fj!\v E\r\0 \v!\f \v \x07A\xBA\xFE\x006 \x07A\x006D\v@ \x07-\0A\bq@A\0! E\r\b@ j-\0\0!\b@ \x07($"
- E\r\0
- ("E\r\0 \x07(D"
- ( O\r\0 \x07 Aj6D j \b:\0\0\v \bA\0 Aj"K\x1B\r\0\v@ \x07-\0AqE\r\0 \x07-\0\fAqE\r\0 \x07 \x07( D6\v j! k! \bE\r \v!\f \v \x07($"E\r\0 A\x006\v \x07A\xBB\xFE\x006 \x07A\x006D\v@ \x07-\0Aq@A\0! E\r\x07@ j-\0\0!\b@ \x07($"
- E\r\0
- ($"E\r\0 \x07(D"
- ((O\r\0 \x07 Aj6D j \b:\0\0\v \bA\0 Aj"K\x1B\r\0\v@ \x07-\0AqE\r\0 \x07-\0\fAqE\r\0 \x07 \x07( D6\v j! k! \bE\r \v!\f\b\v \x07($"E\r\0 A\x006$\v \x07A\xBC\xFE\x006\v \x07("
- A\x80q@@ AK@ !\f\v E\r A\bj! Aj! Ak! -\0\0 t j! A\x07K@ ! !\f\v E@ !A\0! ! \v!\f\b\v Ar! Aj! Ak! -\0 t j!\v@ \x07-\0\fAqE\r\0 \x07/F\r\0 \rA\xCB6 \x07A\xD1\xFE\x006 ! \x07(!\f\vA\0!A\0! !\v \x07($"@ A60
- A vAq6,\v \x07A\0A\0A\0D"6 \r 60 \x07A\xBF\xFE\x006 \x07(!\f\v E\r \x07(E\r@ AK@ !\f\v E\r A\bj! Aj! Ak!
- -\0\0 t j! AK@
- ! !\f\v
- E@ !A\0! ! \v!\f\v Aj!
- Aj! Ak!\b -\0 t j! AK@ \b!
- !\f\v \bE@ !A\0!
- ! \v!\f\v Aj! Aj! Ak!\b -\0
- t j! A\x07K@ \b! !\f\v \bE@ !A\0! ! \v!\f\v A r! Aj! Ak! -\0 t j!\v@ AqE\r\0 \x07( F\r\0 \rA\xF06 \x07A\xD1\xFE\x006 ! \x07(!\f\v\v !A\0!A\0!\v \x07A\xD0\xFE\x006\vA!\f\vA\0! \v!\v \r 6 \r 6\f \r 6 \r 6\0 \x07 6@ \x07 6<@@ \x07(,E@ F\r \x07(A\xD0\xFE\0K\r\v\x7F k! @@ \r("
- (8"\vE@A!
- \r((A
- ((tA \r( \0"\v68 \vE\r\v
- (,"E@
- B\x0070
- A
- ((t"6,\v M@ @ \v k \xFC
- \0\0\v
- A\x0064\f\v
- (4"k" I\x1B"@ \vj k \xFC
- \0\0\v I@ k"@
- (8 k \xFC
- \0\0\v
- 64\f\vA\0!
-
- (4 j"A\0
- (,"G\x1B64
- (0"M\r\0
- j60\v \f\v
-
- (,60A\0\v\r \r(! \r(!\v \r \r(\b ' kj6\b \r k" \r(j6 \x07 \x07( j6 \x07-\0\fAqE FrE@ \r(\f k! \x07(! \x07\x7F \x07(@ D\f\v \x82\v"6 \r 60\v \r \x07(@A\xC0\0A\0 \x07(\b\x1BjA\x80A\0 \x07("A\xBF\xFE\0F\x1BjA\x80A\x80A\0 A\xC2\xFE\0F\x1B A\xC7\xFE\0F\x1Bj6, A{ \x1B F\x1B 'F\x1B!\x1B\f\v \x07A\xD2\xFE\x006\vA|!\x1B\v Aj$\0 \x1BAK\r A\xA8j!
- (\xAC!\b (\0! ( (k!#\0A k"$\0@ k" A\0L\r\0
- (\b
- ("\vk N@ \v \bk" H@ j"k"E FrE@ \v \xFC
- \0\0\v
- \vj6 A\0L\r
- \b \v \b j\xD1 \bj!@ \bF\r \b -\0\0:\0\0 Aj! \bAj!\b\f\0\v\0\v
- \b \v \b j"\xD1@ \bF\r \b -\0\0:\0\0 Aj! \bAj!\b\f\0\v\0\v A\fj
-
- (\0k \vj\x83 \b
- (\0k
- \x8C"\v(\b"j!@ G@ -\0\0:\0\0 Aj! Aj!\f\v\v \v 6\b \v(
- ( \bk"@ \v(\b \b \xFC
- \0\0\v \v \v(\b
- ( \bkj6\b
- \b6 \v(
- (\0" \bkj! \b k"@ \xFC
- \0\0\v \v 6
-
- (\0"6
- \v(6\0 \v 6
- (!
- \v(\b6 \v 6\b
- (\b!
- \v(\f6\b \v 6\f \v \v(6\0 \v\x87\v A j$\0 \x1BAG\r\0\v \r\xCB 1 A\x98j" (\xA8" (\xAC k\xE0
- 1 \rA\x006\\ \rA\xF8\xF9\x006@ \rA\xD0\xF9\x006\0 \rA\xE4\xF9\x006\b \rA\x88\xFA\0(\0"6\0 \r A\fk(\0jA\x8C\xFA\0(\x006\0 \rA\x006 \r \r(\0A\fk(\0j"A\x006 \rA\fj""6 A\x006\f B\x82\xA0\x80\x80\xE0\x007 E6 A jA\0A(\xFC\v\0 Aj\xF4 A\0:\0P B\x80\x80\x80\x80p7H \rA\x90\xFA\0(\0"6\b A\fk(\0 \rA\bjjA\x94\xFA\0(\x006\0 \rA\x84\xFA\0(\0"6\0 \r A\fk(\0jA\x98\xFA\0(\x006\0 \rA\x9C\xFA\0(\x006\b \r"A\xD0\xF9\x006\0 A\xE4\xF9\x006\b A\xF8\xF9\x006@ A\xA8\xF5\x006\0 Aj\xF4 B\x007 B\x007 B\x007\b B\x007 A\xE8\xF5\x006\0 B\x007( A60 A j"\vG@@ ,\0\v! \v,\0\vA\0H@ (\0 A\0H"\x1B!@ ( \x1B" \v(\bA\xFF\xFF\xFF\xFF\x07q"I@ \v 6 \v(\0! @ \xFC
- \0\0\v jA\0:\0\0\f\v \v Ak kAj \v("A\0 \x89\v\f\v A\0H@ (\0!@ ("A
- M@ \v :\0\v @ \v \xFC
- \0\0\v \vjA\0:\0\0\f\v \vA
- A
- k \v-\0\vA\xFF\0q"A\0 \x89\v\f\v \v (\b6\b \v )\x007\0\v\v A\x006, ( A j" ,\0+"A\0H"\x1B!
- ($ \x1B! (0"A\bq@
- 6\f
- 6\b
- j"6 6,\v@ AqE\r\0
- j6, A
- ((A\xFF\xFF\xFF\xFF\x07qAk A\0N\x1B"
- 6
- 6
- ($ ,\0+" A\0H\x1Bj6 -\x000AqE\r\0@ A\0H@
- A\xFF\xFF\xFF\xFF\x07j"
- 6 A\xFF\xFF\xFF\xFF\x07k! \f\v\v E\r\0
- j6\v#\0A\xC0k"\b$\0 \bB\x007\xB8 \bB\xCE\x8E\xCD\x8257\xB0 \bA\xB0jAf@@ (\0A\fk(\0j-\0AqE@ \b(\xB0A\xCE\x8E\xCD\x82F\r\vA\xD5\xBF B\x007\0 B\x007\0 A:\0\r AjA\0A\xC8\0\xFC\v\0\f\v \b(\xB4AkA|M@A\xD9 \bA\xB4j\xC7 B\x007\0 B\x007\0 A:\0\r AjA\0A\xC8\0\xFC\v\0\f\v \b(\xB8"A\x81\xAD\xE2O@A\xDB \bA\xB8j\xC7 B\x007\0 B\x007\0 A:\0\r AjA\0A\xC8\0\xFC\v\0\f\v \b-\0\xBC"AO@ \b 6\0A\x97 \ba\`A\xB0\xF1\0(\0L B\x007\0 B\x007\0 A:\0\r AjA\0A\xC8\0\xFC\v\0\f\v \xCD! \b(\xB4! \bA:\0e \bA\xE8\0j"
- A\0A\xC8\0\xFC\v\0 \b 6X \b \b-\0\xBC6\\ \b \b-\0\xBD6\` \b \b-\0\xBEAq:\0d
- Al"AA AF\x1Blz \bA\xF4\0j"\v z \b AK":\0e \bA\x80j"AA \x1B lz \bA\x8Cj" z \bA\x98j" z \bA\xA4j" lz \b(h \bA\xCC\0j
- u" ( (\0kf 1 \b(\x8C \bA@k u"( (\0kf 1 \b(\x98 \bA4j u"( (\0kf 1 \b(t \bA(j \vu"( (\0kf 1 \b(\x80 \bAj u"( (\0kf 1 \b(\xA4 \bAj u"( (\0kf 1@ (\0A\fk(\0j-\0Aq@A\xB6\f\xBF B\x007\0 B\x007\0 A:\0\r AjA\0A\xC8\0\xFC\v\0\f\v \bA\xD8\0j")7 )\x007\0 Aj Ajt Aj Ajt A(j A(jt A4j A4jt A@k A@kt A\xCC\0j A\xCC\0jt\v \bA\xD8\0j\xCC\v \bA\xC0j$\0 \x81\f\v Aj\xCB\v 1 A\xA8j1 B\x007\0 B\x007\0 A:\0\r AjA\0A\xC8\0\xFC\v\0\v A\x98j A\xC0j$\0#\0A\x90k"\b$\0 (\0! (\xCD!@@@ ( (k"\v Al"
- AA \v (\0"Al"F\x1BlG@ \bA\xA568 \bA\xF8\x0064 \bA\x9F60A\xED\v \bA0ja\`A\xB0\xF1\0(\0L\f\v
- ( (kG@ \bA\xF9\x006< \bA<jA\xF5\xD0\f\v (, ((kAA -\0\r"Aq\x1B lG@ \bA\xCD6( \bA\xFA\x006$ \bA\x9F6 A\xED\v \bA ja\`A\xB0\xF1\0(\0L\f\v (8 (4kG@ \bA\x9E6 \bA\xFB\x006 \bA\x9F6A\xED\v \bAja\`A\xB0\xF1\0(\0L\f\v
- (D (@kG@ \bA\xFC\x006< \bA<jA\xCB\xD0\f\v (P (Lk"
- lF\r \bA\x9F6\b \bA\xFD\x006 \bA\x9F6\0A\xED\v \ba\`A\xB0\xF1\0(\0L\v \0A\0:\0\b \0B\x007\0 \0A\fjA\0A\xC8\0\xFC\v\0\f\v \0A\fj"A\0A\xC8\0\xFC\v\0 \0 6\0 \0 (6 \0 -\0\f:\0\b
- w \0Aj
- w \0A$j Atw \0A0j w \0A<j
- w \0A\xC8\0j w@ \vF@ (\0! (!A\0!\f@
- \fF\r \fAtj}C\0\0\x80?C\0\0\x80\xBF \fAtj/\0"\xC1A\0N\x1B!2 A\xFF\x07q!@ A
- vAq"AG@ \r 2C\0\0\x808\x94 \xB3\x94C\0\0\x80:\x94\f\vC\0\0\xC0\x7F 2C\0\0\x80\x7F\x94 \x1B\f\vC\0\0\x80?!3@ Ak"A\x80N@C\0\0\0\x7F!3 A\xFFI@ A\xFF\0k!\f\vC\0\0\x80\x7F!3A\xFD A\xFDO\x1BA\xFEk!\f\v A\x81\x7FJ\r\0C\0\0\x80\f!3 A\x9B~K@ A\xE6\0j!\f\vC\0\0\0\0!3A\xB6} A\xB6}M\x1BA\xCCj!\v \xB3C\0\0\x80:\x94C\0\0\x80?\x92 2 3 AtA\x80\x80\x80\xFCj\xBE\x94\x94\x94\v8\0 \fAj!\f\f\0\v\0\vD\0\0\0\0\0\0\xF0?A (\bt\xB7\xA3\xB6!2 (\0! (!A\0!\f@
- \fF\r \fAtj 2 \fAlj"/\0\0 ,\0"A\xFFqAtrA\x80\x80\x80xA\0 A\0H\x1Br\xB2\x948\0 \fAj!\f\f\0\v\0\v \0(! (!A\0!\f@
- \fF@ \bA\xD4\0j!\vA\0!\f Aq!\x7F \fF\x7F \0(0! (4!A\0@ @ \0($ ((! \bB\x80\x80\x80\xFC\x83\x80\x80\xC0?7L \bB\x80\x80\x80\xFC\x83\x80\x80\xC0?7D \bB\x80\x80\x80\xFC\x83\x80\x80\xC0?7< \vA\xD8A<\xFC
- \0\0 \fAtj! \bA<j!C\0\0\0\0!3 \fAtj"/\0\0 -\0Atr -\0"Atr! Av!A!\x7F A\0H\x7F AtjC\0\0\x80? 3\x93\x918\0 A\fj!A\0 G@ Atj A\xFFq\xB3C\xF35?\x94C\0\x80\xFFC\x95"2\x8C 2 A\x80q\x1B"28\0 2 2\x94 3\x92!3 A
- v!\v Ak!\f\v\v!@ AG@ At"j" j*\0 *\0\x948\0 Aj!\f\v\v\f\v \0($ (( \bB\x80\x80\x80\xFC\x83\x80\x80\xC0?7L \bB\x80\x80\x80\xFC\x83\x80\x80\xC0?7D \bB\x80\x80\x80\xFC\x83\x80\x80\xC0?7< \vA\xD8A<\xFC
- \0\0#\0Ak"$\0 \fAlj"-\0! -\0! -\0\0\xB3C\x81\x80\0<\x94C\0\0\x80\xBF\x92 \b*H\x948 \xB3C\x81\x80\0<\x94C\0\0\x80\xBF\x92 \b*L\x948\b \xB3C\x81\x80\0<\x94C\0\0\x80\xBF\x92 \b*P\x94"28\f \fAtj" 28\b )7\0 C\0\0\x80? *\f *\f\x94 * *\x94 *\b *\b\x94\x92\x92\x93"2C\0\0\0\0 2C\0\0\0\0^\x1B\x918\f Aj$\0\v \fAj!\f\f\v\v!\f@ \fG@ \fAtj}C\0\0\0\0 \fj-\0\0\xB3C\0\0\x7FC\x95"2C\0\0\x80? 2\x93\x95"3\xBC"A\x80\x80\x80\xFCF\r\0@ A\x80\x80\x80\xFC\x07kA\xFF\xFF\xFF\x87xM@ At"E@#\0Ak"C\0\0\x80\xBF8\f *\fC\0\0\0\0\x95\f\v A\x80\x80\x80\xFC\x07F\r A\x80\x80\x80xI A\0NqE@ 3 3\x93"2 2\x95\f\v 3C\0\0\0K\x94\xBCA\x80\x80\x80\xDC\0k!\vA\x98\xF1\0+\0 A\x80\x80\xCC\xF9k"A\x80\x80\x80|qk\xBE\xBB AvA\xF0q"+\x90o\xA2D\0\0\0\0\0\0\xF0\xBF\xA0"7 7\xA2"8\xA2A\xA0\xF1\0+\0 7\xA2A\xA8\xF1\0+\0\xA0\xA0 8\xA2 Au\xB7A\x90\xF1\0+\0\xA2 +\x98o\xA0 7\xA0\xA0\xB6!3\v 3\v8\0 \fAj!\f\f\v\v \0(<! (@!A\0!\f@
- \fF@ (P (L"k! \0(H!A\0!@ F@ (\f!A\0!#\0A\xE0\0k"\v$\0#\0Ak"$\0A!\x7FA!A A\0L\r\0 AkAs"A\x7FsAq! AqE! AqE\v! :\0 :\0 :\0\r -\0! -\0! -\0\r! \vA\x80\x80\x80\xFC6@ \vA\x80\x80\x80\xFC68 \vC\0\0\x80?C\0\0\x80\xBF \x1B"68\\ \vC\0\0\x80?C\0\0\x80\xBF \x1B"58X \v 68T \v 58P \vC\0\0\x80?C\0\0\x80\xBF \x1B"48L \v 48D \v 68, \v 58( \v 48$ \v 58 \v 48 \v 68\f \v 6 5\x94"38< \v 4 5\x94"284 \v 6 4\x94"480 \v 48 \v 38 \v 28 \v 4 5\x948H Aj$\0 \0( \0(\f"kAu!@ M@ \0(( \0($"kAu!A\0!@ M@@ \0(L \0(H"kAuAn" \0(\0n! \vA$j!\0A\0!A\0!@A\0!\f M\r@ \fM@ j!\f Atj" \0 \fAtj*\0"2 *\0\x948\0 2 *\x948 2 *\b\x948\b Aj! \fAj!\f\f\v\0\v\0\v\0\v Atj" \v* *\0\x948\0 \v* *\x948 \v* *\b\x948\b Aj!\f\v\v \vA\xE0\0j$\0 Atj" \v*\f *\0\x948\0 \v* *\x948 \v* *\b\x948\b Aj!\f\v\v Atj j-\0\0\xB3C\0\0\0\xC3\x92C\0\0\0<\x948\0 Aj!\f\v\v \fAtj \fj-\0\0\xB3C\0\0\x7FC\x95C\0\0\0\xBF\x92C\x9A\x99>\x958\0 \fAj!\f\f\v\v \fAtj \fj-\0\0\xB3C\0\0\x80=\x94C\0\0 \xC1\x928\0 \fAj!\f\f\v\v\v \bA\x90j$\0 \xCC %A\xE0\0j$\0 1 Aj$\0\v\x81\x7F#\0A k"$\0 6@ -\0AqE@ A\x7F6\0 \0 \0(\0(\0!@@@ (\0\0\v A\0:\0\0\f\v A:\0\0\f\v A:\0\0 A6\0\f\v $ =! (\0# $ n!\0 (\0# \0 \0(\0(\0 A\fr \0 \0(\0(\0 Aj Aj" A\x95 F:\0\0 (!@ A\fk " G\r\0\v\v A j$\0 \v\xEE\x7F#\0A\x90k"\0$\0 \0 6\x88 \0 6\x8C \0A\x006\xD8 \0B\x007\xD0 \0Aj" $ >"A\xD0\x85A\xEA\x85 \0A\xE0j (\0( \0 \0(# \0A\x006\xC8 \0B\x007\xC0 \0A\xC0j"A
- " \0 \0(\xC0 \0,\0\xCBA\0H\x1B"6\xBC \0 6\f \0A\x006\b@@ \0A\x8Cj \0A\x88j)\r\0 \0(\xBC \0(\xC4 \0,\0\xCB" A\0H\x1B"jF@ \0A\xC0j" At" A
- \0(\xC8A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xCBA\0N\x1B" \0 \0(\xC0 \0,\0\xCBA\0H\x1B" j6\xBC\v \0(\x8CA\xC0A \0A\xBCj \0A\bjA\0 \0A\xD0j \0Aj \0A\fj \0A\xE0jo\r\0 \0(\x8C@\f\v\v \0A\xC0j" \0(\xBC k" \0(\xC0 \0,\0\xCB!*! \0 6\0 A\0H\x1B \0\x98AG@ A6\0\v \0A\x8Cj \0A\x88j)@ (\0Ar6\0\v \0(\x8C \0A\xC0j \0A\xD0j \0A\x90j$\0\v\xBE\x7F~\x7F#\0A\xA0k"\0$\0 \0 6\x98 \0 6\x9C \0A\xE0j \0A\xF0j \0A\xEFj \0A\xEEj\xB7 \0A\x006\xD8 \0B\x007\xD0 \0A\xD0j"A
- " \0 \0(\xD0 \0,\0\xDBA\0H\x1B"6\xCC \0 \0A j6 \0A\x006 \0A:\0 \0A\xC5\0:\0A\0!@@@@ \0A\x9Cj \0A\x98j)\r\0 \0(\xCC \0(\xD4 \0,\0\xDB" A\0H\x1B"jF@ \0A\xD0j" At" A
- \0(\xD8A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xDBA\0N\x1B" \0 \0(\xD0 \0,\0\xDBA\0H\x1B" j6\xCC\v \0(\x9CA\xC0 \0Aj \0Aj \0A\xCCj \0,\0\xEF \0,\0\xEE \0A\xE0j \0A j \0Aj \0Aj \0A\xF0j\xB6\r\0 \rA\0! \0(\xCC k"A\0L\r@@ -\0\0"A+k"\x07\0\0\v A.F\rA! A0kA\xFFqA
- I\r\f\v AF\r@ \x07\0\0\v -\0"A.F\rA! A0kA\xFFqA M\r\v@ \0(\xE4 \0,\0\xEB" A\0H\x1BE\r\0 \0-\0AqE\r\0 \0(" \0A jkA\x9FJ\r\0 \0 Aj6 \0(6\0\v \0 \0(\xCC \x99 \0)\0!\b \0)\b7\b \b7\0 \0A\xE0j \0A j \0( 5 \0A\x9Cj \0A\x98j)@ (\0Ar6\0\v \0(\x9C \0A\xD0j \0A\xE0j \0A\xA0j$\0\f\vA!\v \0(\x9C@\f\0\v\0\v\v\xA7\x7F\x7F#\0A\x90k"\0$\0 \0 6\x88 \0 6\x8C \0A\xD0j \0A\xE0j \0A\xDFj \0A\xDEj\xB7 \0A\x006\xC8 \0B\x007\xC0 \0A\xC0j"A
- " \0 \0(\xC0 \0,\0\xCBA\0H\x1B"6\xBC \0 \0Aj6\f \0A\x006\b \0A:\0\x07 \0A\xC5\0:\0A\0!@@@@ \0A\x8Cj \0A\x88j)\r\0 \0(\xBC \0(\xC4 \0,\0\xCB" A\0H\x1B"jF@ \0A\xC0j" At" A
- \0(\xC8A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xCBA\0N\x1B" \0 \0(\xC0 \0,\0\xCBA\0H\x1B" j6\xBC\v \0(\x8CA\xC0 \0A\x07j \0Aj \0A\xBCj \0,\0\xDF \0,\0\xDE \0A\xD0j \0Aj \0A\fj \0A\bj \0A\xE0j\xB6\r\0 \rA\0! \0(\xBC k"A\0L\r@@ -\0\0"A+k"\x07\0\0\v A.F\rA! A0kA\xFFqA
- I\r\f\v AF\r@ \x07\0\0\v -\0"A.F\rA! A0kA\xFFqA M\r\v@ \0(\xD4 \0,\0\xDB" A\0H\x1BE\r\0 \0-\0\x07AqE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f \0(\b6\0\v \0(\xBC \x9A9\0 \0A\xD0j \0Aj \0(\f 5 \0A\x8Cj \0A\x88j)@ (\0Ar6\0\v \0(\x8C \0A\xC0j \0A\xD0j \0A\x90j$\0\f\vA!\v \0(\x8C@\f\0\v\0\v\v\xA7\x7F\x7F#\0A\x90k"\0$\0 \0 6\x88 \0 6\x8C \0A\xD0j \0A\xE0j \0A\xDFj \0A\xDEj\xB7 \0A\x006\xC8 \0B\x007\xC0 \0A\xC0j"A
- " \0 \0(\xC0 \0,\0\xCBA\0H\x1B"6\xBC \0 \0Aj6\f \0A\x006\b \0A:\0\x07 \0A\xC5\0:\0A\0!@@@@ \0A\x8Cj \0A\x88j)\r\0 \0(\xBC \0(\xC4 \0,\0\xCB" A\0H\x1B"jF@ \0A\xC0j" At" A
- \0(\xC8A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xCBA\0N\x1B" \0 \0(\xC0 \0,\0\xCBA\0H\x1B" j6\xBC\v \0(\x8CA\xC0 \0A\x07j \0Aj \0A\xBCj \0,\0\xDF \0,\0\xDE \0A\xD0j \0Aj \0A\fj \0A\bj \0A\xE0j\xB6\r\0 \rA\0! \0(\xBC k"A\0L\r@@ -\0\0"A+k"\x07\0\0\v A.F\rA! A0kA\xFFqA
- I\r\f\v AF\r@ \x07\0\0\v -\0"A.F\rA! A0kA\xFFqA M\r\v@ \0(\xD4 \0,\0\xDB" A\0H\x1BE\r\0 \0-\0\x07AqE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f \0(\b6\0\v \0(\xBC \x9B8\0 \0A\xD0j \0Aj \0(\f 5 \0A\x8Cj \0A\x88j)@ (\0Ar6\0\v \0(\x8C \0A\xC0j \0A\xD0j \0A\x90j$\0\f\vA!\v \0(\x8C@\f\0\v\0\v\v\xE6\0#\0A\xE0k"\0$\0 \0 6\xD8 \0 6\xDC R! \0A\xC8j \0A\xD7j\x7F \0A\x006\xC0 \0B\x007\xB8 \0A\xB8j"A
- " \0 \0(\xB8 \0,\0\xC3A\0H\x1B"6\xB4 \0 \0Aj6\f \0A\x006\b@@ \0A\xDCj \0A\xD8j)\r\0 \0(\xB4 \0(\xBC \0,\0\xC3" A\0H\x1B"jF@ \0A\xB8j" At" A
- \0(\xC0A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xC3A\0N\x1B" \0 \0(\xB8 \0,\0\xC3A\0H\x1B" j6\xB4\v \0(\xDCA\xC0 \0A\xB4j \0A\bj \0,\0\xD7 \0A\xC8j \0Aj \0A\fjA\xD0\x85o\r\0 \0(\xDC@\f\v\v@ \0(\xCC \0,\0\xD3" A\0H\x1BE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f \0(\b6\0\v \0(\xB4 \x9C7\0 \0A\xC8j \0Aj \0(\f 5 \0A\xDCj \0A\xD8j)@ (\0Ar6\0\v \0(\xDC \0A\xB8j \0A\xC8j \0A\xE0j$\0\v\xE6\0#\0A\xE0k"\0$\0 \0 6\xD8 \0 6\xDC R! \0A\xC8j \0A\xD7j\x7F \0A\x006\xC0 \0B\x007\xB8 \0A\xB8j"A
- " \0 \0(\xB8 \0,\0\xC3A\0H\x1B"6\xB4 \0 \0Aj6\f \0A\x006\b@@ \0A\xDCj \0A\xD8j)\r\0 \0(\xB4 \0(\xBC \0,\0\xC3" A\0H\x1B"jF@ \0A\xB8j" At" A
- \0(\xC0A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xC3A\0N\x1B" \0 \0(\xB8 \0,\0\xC3A\0H\x1B" j6\xB4\v \0(\xDCA\xC0 \0A\xB4j \0A\bj \0,\0\xD7 \0A\xC8j \0Aj \0A\fjA\xD0\x85o\r\0 \0(\xDC@\f\v\v@ \0(\xCC \0,\0\xD3" A\0H\x1BE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f \0(\b6\0\v \0(\xB4 \x9F;\0 \0A\xC8j \0Aj \0(\f 5 \0A\xDCj \0A\xD8j)@ (\0Ar6\0\v \0(\xDC \0A\xB8j \0A\xC8j \0A\xE0j$\0\v\xE6\0#\0A\xE0k"\0$\0 \0 6\xD8 \0 6\xDC R! \0A\xC8j \0A\xD7j\x7F \0A\x006\xC0 \0B\x007\xB8 \0A\xB8j"A
- " \0 \0(\xB8 \0,\0\xC3A\0H\x1B"6\xB4 \0 \0Aj6\f \0A\x006\b@@ \0A\xDCj \0A\xD8j)\r\0 \0(\xB4 \0(\xBC \0,\0\xC3" A\0H\x1B"jF@ \0A\xB8j" At" A
- \0(\xC0A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xC3A\0N\x1B" \0 \0(\xB8 \0,\0\xC3A\0H\x1B" j6\xB4\v \0(\xDCA\xC0 \0A\xB4j \0A\bj \0,\0\xD7 \0A\xC8j \0Aj \0A\fjA\xD0\x85o\r\0 \0(\xDC@\f\v\v@ \0(\xCC \0,\0\xD3" A\0H\x1BE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f \0(\b6\0\v \0(\xB4 \xA07\0 \0A\xC8j \0Aj \0(\f 5 \0A\xDCj \0A\xD8j)@ (\0Ar6\0\v \0(\xDC \0A\xB8j \0A\xC8j \0A\xE0j$\0\v\xE6\0#\0A\xE0k"\0$\0 \0 6\xD8 \0 6\xDC R! \0A\xC8j \0A\xD7j\x7F \0A\x006\xC0 \0B\x007\xB8 \0A\xB8j"A
- " \0 \0(\xB8 \0,\0\xC3A\0H\x1B"6\xB4 \0 \0Aj6\f \0A\x006\b@@ \0A\xDCj \0A\xD8j)\r\0 \0(\xB4 \0(\xBC \0,\0\xC3" A\0H\x1B"jF@ \0A\xB8j" At" A
- \0(\xC0A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xC3A\0N\x1B" \0 \0(\xB8 \0,\0\xC3A\0H\x1B" j6\xB4\v \0(\xDCA\xC0 \0A\xB4j \0A\bj \0,\0\xD7 \0A\xC8j \0Aj \0A\fjA\xD0\x85o\r\0 \0(\xDC@\f\v\v@ \0(\xCC \0,\0\xD3" A\0H\x1BE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f \0(\b6\0\v \0(\xB4 \xA16\0 \0A\xC8j \0Aj \0(\f 5 \0A\xDCj \0A\xD8j)@ (\0Ar6\0\v \0(\xDC \0A\xB8j \0A\xC8j \0A\xE0j$\0\v\x81\x7F#\0A k"$\0 6@ -\0AqE@ A\x7F6\0 \0 \0(\0(\0!@@@ (\0\0\v A\0:\0\0\f\v A:\0\0\f\v A:\0\0 A6\0\f\v $ >! (\0# $ p!\0 (\0# \0 \0(\0(\0 A\fr \0 \0(\0(\0 Aj Aj" A\x97 F:\0\0 (!@ A\fk " G\r\0\v\v A j$\0 \v@\x7FA\0!\0\x7F F\x7F \0 (\0 \0Atj"\0A\x80\x80\x80\x80\x7Fq"Av r \0s!\0 Aj!\f\v\v\v\v\0 \0 \xA2\vT\x7F@@ G@A\x7F!\0 F\r (\0" (\0"H\r J@A Aj! Aj!\f\v\0\v\v G!\0\v \0\v@\x7FA\0!\0\x7F F\x7F \0 ,\0\0 \0Atj"\0A\x80\x80\x80\x80\x7Fq"Av r \0s!\0 Aj!\f\v\v\v\v\0 \0 \xCE\v^\x7F kj!@@ G@A\x7F!\0 F\r ,\0\0" ,\0\0"\x07H\r \x07J@A Aj! Aj!\f\v\0\v\v G!\0\v \0\vT\x7F \0(T" A\0 A\x80j"\xCA" k \x1B" K\x1B"Y \0 j"6T \0 6\b \0 j6 \v\xA8\x7F \0(T"(\0! (" \0( \0("\x07k" I\x1B"@ \x07 Y (\0 j"6\0 ( k"6\v K\x1B"@ Y (\0 j"6\0 ( k6\v A\0:\0\0 \0 \0(,"6 \0 6 \v\b\0 \0K!\v\0 \0 \0(\0A\fk(\0j\xC0\v\0 \0 \0(\0A\fk(\0j\x81\v
- \0 \0A\bk\xC0\v
- \0 \0A\bk\x81\v\0 \0 )\bA\0 (\0(\0\v \0 \0\xB0!\v\x95\x7F~ (," ("I@ 6, !\vB\x7F!
- @ Aq"\x07E AF \x07AFqr\r\0 @ ( A j ,\0+A\0H\x1Bk\xAC! \v@@@ \0\v A\bq@ (\f (\bk\xAC!\b\f\v (k\xAC!\b\f\v !\b\v \b|"B\0S Ur\r\0 A\bq!@ P\r\0 @ (\fE\r\v AqE\r\0 E\r\v @ 6 (\b \xA7j6\f\v Aq@ ( \xA7j6\v !
- \v \0
- 7\b \0B\x007\0\v\x99\b\x7F A\x7FF@A\0\v \0(\b! \0(\f! \0\x7F \0(" \0(G@ \0(,\f\v \0-\x000AqE@A\x7F\v \0(,!\x07 \0(! \0A j"A\0\xAA A
- \0((A\xFF\xFF\xFF\xFF\x07qAk \0,\0+A\0N\x1B" \0 \0( \0,\0+"\bA\0H" \x1B"6 \0 \0($ \b \x1Bj6 \0 kj"6 \x07 kj\v" Aj" I\x1B"6, \0-\x000A\bq@ \0 6 \0 \0( \0A j \0,\0+A\0H\x1B"6\b \0 kj6\f\v \0 \xC0\xC3\v\x8E\x7F \0(," \0("I@ \0 6, !\v\x7FA\x7F \0(\f" \0(\bM\r\0 A\x7FF@ \0 6 \0 Ak6\fA\0\v \0-\x000AqE@A\x7F Ak-\0\0 A\xFFqG\r\v \0 6 \0 Ak"\x006\f \0 :\0\0 \v\v_\x7F \0(," \0("I@ \0 6, !\vA\x7F!@ \0-\x000A\bqE\r\0 \0("K\x7F \0 6 \v \0(\f"\0M\r\0 \0-\0\0!\v \v\0 \0 \0(\0A\fk(\0j\xC1\v
- \0 \0A\bk\xC1\v \0 \0A\f\xA5\v\0 \0AjK \0A\bk\v\f\0 \0A\fjK \0\v\0 \0 \0(\0A\fk(\0j\xC1\v \0 \0A\xA5\v\f\0 \0AjK \0\v\0 \0 \0(\0A\fk(\0j\xC5\v \0 \0A\b\xA5\v\f\0 \0A\bjK \0\v\x96\x7F@@ L\r\0 \0(" \0("O@ \0 -\0\0 \0(\0(4\0A\x7FF\r Aj! Aj!\f \0 k" k" J\x1B"\x7F @ \xFC
- \0\0\v \0( \v j6 j! j!\f\v\0\v\v \v3\x7FA\x7F! \0 \0(\0($\0\0A\x7FG@ \0(\f"-\0\0! \0 Aj6\f\v \v\0A\x7F\v\x91\x7F@@ L\r\0@ \0(\f" \0("I@ \0 k" k" J\x1B"\x7F @ \xFC
- \0\0\v \0(\f \v j6\f\f\v \0 \0(\0((\0\0"A\x7FF\r :\0\0A!\v j! j!\f\v\v \v\0 \0B\x7F7\b \0B\x007\0\v\0 \0B\x7F7\b \0B\x007\0\v\0 \0\v\f\0 \0\xC3 \0!\v\f\0 \0(<\x9E\v;\x7F \0(<#\0Ak"\0$\0 A\xFFq \0A\bj\x9E! \0)\b! \0Aj$\0B\x7F \x1B\v)\0 (\0A\x07jAxq"Aj6\0 \0 )\0 )\b\xC49\0\v\xB4\x7F|~#\0A\xB0k"\v$\0 \vA\x006,@ \xBD"B\0S@A!A\x9D ! \x9A"\xBD!\f\v A\x80q@A!A\xA0 !\f\vA\xA3 A\x9E Aq"\x1B! E!\v@ B\x80\x80\x80\x80\x80\x80\x80\xF8\xFF\0\x83B\x80\x80\x80\x80\x80\x80\x80\xF8\xFF\0Q@ \0A Aj" A\xFF\xFF{q7 \0 3 \0A\xFB\rA\xED A q"\x1BA\xCEA\x97 \x1B b\x1BA3 \0A A\x80\xC0\0s7 J\x1B!\r\f\v \vAj!@@@ \vA,j\xD1" \xA0"D\0\0\0\0\0\0\0\0b@ \v \v(,"Ak6, A r"A\xE1\0G\r\f\v A r"A\xE1\0F\r \v(,!\f\f\v \v Ak"\f6, D\0\0\0\0\0\0\xB0A\xA2!\vA A\0H\x1B!
- \vA0jA\xA0A\0 \fA\0N\x1Bj"!\x07@ \x07 \xFC"6\0 \x07Aj!\x07 \xB8\xA1D\0\0\0\0e\xCD\xCDA\xA2"D\0\0\0\0\0\0\0\0b\r\0\v@ \fA\0L@ \f! \x07! !\b\f\v !\b \f! @A AO\x1B!@ \x07Ak" \bI\r\0 \xAD!\x1BB\0!@ 5\0 \x1B\x86 |" B\x80\x94\xEB\xDC\x80"B\x80\x94\xEB\xDC~}>\0 Ak" \bO\r\0\v B\x80\x94\xEB\xDCT\r\0 \bAk"\b >\0\v@ \b \x07"I@ Ak"\x07(\0E\r\v\v \v \v(, k" 6, !\x07 A\0J\r\0\v\v A\0H@
- AjA nAj! A\xE6\0F!@A A\0 k" A O\x1B!\r@ \bM@A\0A \b(\0\x1B!\x07\f\vA\x80\x94\xEB\xDC \rv!A\x7F \rtA\x7Fs!A\0! \b!\x07@ \x07 \x07(\0" \rv j6\0 q l! \x07Aj"\x07 I\r\0\vA\0A \b(\0\x1B!\x07 E\r\0 6\0 Aj!\v \v \v(, \rj" 6, \x07 \bj"\b \x1B" Atj kAu J\x1B! A\0H\r\0\v\vA\0! @ \bM\r\0 \bkAuA l! A
- !\x07 \b(\0"A
- I\r\0@ Aj! \x07A
- l"\x07O\r\0\v\v
- A\0 A\xE6\0G\x1Bk A\xE7\0F
- A\0Gqk" kAuA lA kH@ \vA0jA\x84\`A\xA4b \fA\0H\x1Bj A\x80\xC8\0j"\fA m"Atj!\rA
- !\x07 \f A lk"A\x07L@@ \x07A
- l!\x07 Aj"A\bG\r\0\v\v@ \r(\0"\f \f \x07n" \x07lk"E \rAj" Fq\r\0@ AqE@D\0\0\0\0\0\0@C! \x07A\x80\x94\xEB\xDCG \b \rOr\r \rAk-\0\0AqE\r\vD\0\0\0\0\0@C!\vD\0\0\0\0\0\0\xE0?D\0\0\0\0\0\0\xF0?D\0\0\0\0\0\0\xF8? F\x1BD\0\0\0\0\0\0\xF8? \x07Av"F\x1B K\x1B!@ \r\0 -\0\0A-G\r\0 \x9A! \x9A!\v \r \f k"6\0 \xA0 a\r\0 \r \x07j"6\0 A\x80\x94\xEB\xDCO@@ \rA\x006\0 \b \rAk"\rK@ \bAk"\bA\x006\0\v \r \r(\0Aj"6\0 A\xFF\x93\xEB\xDCK\r\0\v\v \bkAuA l! A
- !\x07 \b(\0"A
- I\r\0@ Aj! \x07A
- l"\x07O\r\0\v\v \rAj" I\x1B!\v@ "\f \bM"\x07E@ Ak"(\0E\r\v\v@ A\xE7\0G@ A\bq!\f\v A\x7FsA\x7F
- A
- \x1B" J A{Jq"\x1B j!
- A\x7FA~ \x1B j! A\bq"\r\0Aw!@ \x07\r\0 \fAk(\0"E\r\0A
- !A\0! A
- p\r\0@ "\x07Aj! A
- l"pE\r\0\v \x07A\x7Fs!\v \f kAuA l! A_qA\xC6\0F@A\0!
- jA k"A\0 A\0J\x1B"
- J\x1B!
- \f\vA\0!
- j jA k"A\0 A\0J\x1B"
- J\x1B!
- \vA\x7F!\r
- A\xFD\xFF\xFF\xFF\x07A\xFE\xFF\xFF\xFF\x07
- r"\x1BJ\r
- A\0GjAj!@ A_q"\x07A\xC6\0F@ A\xFF\xFF\xFF\xFF\x07sJ\r A\0 A\0J\x1B!\f\v Au"s k\xAD x"kAL@@ Ak"A0:\0\0 kAH\r\0\v\v Ak" :\0\0 AkA-A+ A\0H\x1B:\0\0 k" A\xFF\xFF\xFF\xFF\x07sJ\r\v j" A\xFF\xFF\xFF\xFF\x07sJ\r \0A j" 7 \0 3 \0A0 A\x80\x80s7@@@ \x07A\xC6\0F@ \vAjA r! \b \b K\x1B"!\b@ \b5\0 x!@ \bG@ \vAjM\r@ Ak"A0:\0\0 \vAjK\r\0\v\f\v G\r\0 Ak"A0:\0\0\v \0 k3 \bAj"\b M\r\0\v @ \0A\x9AA3\v
- A\0L \b \fOr\r@ \b5\0 x" \vAjK@@ Ak"A0:\0\0 \vAjK\r\0\v\v \0 A
-
- A N\x1B3
- A k! \bAj"\b \fO\r
- A J !
- \r\0\v\f\v@
- A\0H\r\0 \f \bAj \b \fI\x1B! \vAjA r!\f \b!\x07@ \f \x075\0 \fx"F@ Ak"A0:\0\0\v@ \x07 \bG@ \vAjM\r@ Ak"A0:\0\0 \vAjK\r\0\v\f\v \0 A3 Aj!
- rE\r\0 \0A\x9AA3\v \0 \f k"
-
- H\x1B3
- k!
- \x07Aj"\x07 O\r
- A\0N\r\0\v\v \0A0
- AjAA\07 \0 k3\f\v
- !\v \0A0 A jA A\07\v \0A A\x80\xC0\0s7 J\x1B!\r\f\v AtAuA qj! @ A\vK\r\0A\f k!D\0\0\0\0\0\x000@!@ D\0\0\0\0\0\x000@\xA2! Ak"\r\0\v -\0\0A-F@ \x9A \xA1\xA0\x9A!\f\v \xA0 \xA1!\v \v(,"\x07 \x07Au"s k\xAD x"F@ Ak"A0:\0\0 \v(,!\x07\v Ar!
- A q!\f Ak" Aj:\0\0 AkA-A+ \x07A\0H\x1B:\0\0 A\bqE A\0Lq!\b \vAj!\x07@ \x07" \xFC"A\x90\xF5\0j-\0\0 \fr:\0\0 \xB7\xA1D\0\0\0\0\0\x000@\xA2"D\0\0\0\0\0\0\0\0a \bq \x07Aj"\x07 \vAjkAGrE@ A.:\0 Aj!\x07\v D\0\0\0\0\0\0\0\0b\r\0\vA\x7F!\r A\xFD\xFF\xFF\xFF\x07
- k"\bj"kJ\r\0 \0A Aj \x07 \vAj"k"\x07 \x07Ak H\x1B \x07 \x1B"j" 7 \0
- 3 \0A0 A\x80\x80s7 \0 \x073 \0A0 \x07kA\0A\07 \0 \b3 \0A A\x80\xC0\0s7 J\x1B!\r\v \vA\xB0j$\0 \r\v\0B\0\v\xD6\x07\x7F#\0A k"$\0 \0("6 \0(! 6 6 k"6 j! Aj!A!\x07\x7F@@@ \0(< A A\fj\v\x9E@ !\f\v@ (\f"F\r A\0H@ !\f\v A\bA\0 ("\bK" \x1Bj" \bA\0 \x1Bk"\b (\0j6\0 A\fA \x1Bj" (\0 \bk6\0 k! \0(< " \x07 k"\x07 A\fj\v\x9EE\r\0\v\v A\x7FG\r\v \0 \0(,"6 \0 6 \0 \0(0j6 \f\v \0A\x006 \0B\x007 \0 \0(\0A r6\0A\0 \x07AF\r\0 (k\v A j$\0\v\x89\x7F#\0Ak"\0$\0@ \0A\fj \0A\bj\r\0A\xEC\xDB \0(\fAtAj/"6\0 E\r\0 \0(\b/"@A\xEC\xDB(\0" \0(\fAtjA\x006\0 E\r\vA\xEC\xDBA\x006\0\v \0Aj$\0A\x84\xCEA\x006\0A\x80\xCEA6\0\x95A\x84\xCEA\xA0\xCE(\x006\0A\xA0\xCEA\x80\xCE6\0A\xA4\xCEA.6\0A\xA8\xCEA\x006\0\xCCA\xA8\xCEA\xA0\xCE(\x006\0A\xA0\xCEA\xA4\xCE6\0A\xCC\xCFA\xD4\xCE6\0A\xA4\xCFA\x80\x806\0A\xA0\xCFA\xC0\xEC6\0A\x84\xCFA*6\0A\xA8\xCFA\xB0\xCB(\x006\0\v\v\xBF\xBE(\0A\x80\b\v\x940123456789abcdefghijklmnopqrstuvwxyz\0load_spz\0infinity\0February\0January\0July\0Thursday\0Tuesday\0Wednesday\0Saturday\0Sunday\0Monday\0Friday\0May\0%m/%d/%y\0-+ 0X0x\0-0X+0X 0X-0x+0x 0x\0Nov\0Thu\0August\0unsigned short\0unsigned int\0invalid literal/lengths set\0invalid code lengths set\0unknown header flags set\0invalid distances set\0get\0Oct\0float\0invalid bit length repeat\0Sat\0numPoints\0colors\0UnpackOptions\0positions\0rotations\0too many length or distance symbols\0invalid stored block lengths\0scales\0alphas\0[SPZ: ERROR] Check failed: %s:%d: %s\0vf32_ptr\0Apr\0vector\0money_get error\0[SPZ ERROR] deserializePackedGaussians: read error\0October\0November\0September\0December\0unsigned char\0Mar\0/emsdk/emscripten/system/lib/libcxxabi/src/private_typeinfo.cpp\0Sep\0%I:%M:%S %p\0Sun\0Jun\0Mon\0nan\0Jan\0coordinateSystem\0CoordinateSystem\0Jul\0bool\0April\0invalid code -- missing end-of-block\0incorrect header check\0incorrect length check\0incorrect data check\0push_back\0invalid distance too far back\0Fri\0sh\0header crc mismatch\0March\0Aug\0unsigned long long\0unsigned long\0std::wstring\0basic_string\0std::string\0std::u16string\0std::u32string\0inf\x000123456789abcdef\0%.0Lf\0%Lf\0resize\0invalid window size\0true\0Tue\0false\0invalid block type\0June\0double\0shDegree\0bad_array_new_length was thrown in -fno-exceptions mode\0invalid literal/length code\0invalid distance code\0RawGaussianCloud\0unknown compression method\0[SPZ ERROR] deserializePackedGaussians: header not found\0%0*lld\0%*lld\0+%lld\0%+.4ld\0void\0locale not supported\0antialiased\0Wed\0%Y-%m-%d\0[SPZ ERROR] deserializePackedGaussians: Too many points: %d\0[SPZ ERROR] deserializePackedGaussians: Unsupported SH degree: %d\0[SPZ ERROR] deserializePackedGaussians: version not supported: %d\0Dec\0./spz/src/cc/load-spz.cc\0Feb\0%a %b %d %H:%M:%S %Y\0POSIX\0VectorUInt8T\0%H:%M:%S\0NAN\0PM\0AM\0%H:%M\0LC_ALL\0ASCII\0LANG\0RUF\0LUF\0INF\0RDF\0LDF\0UNSPECIFIED\0C\0RUB\0LUB\0RDB\0LDB\0catching a class without an object?\0emscripten::memory_view<short>\0emscripten::memory_view<unsigned short>\0emscripten::memory_view<int>\0emscripten::memory_view<unsigned int>\0emscripten::memory_view<float>\0emscripten::memory_view<uint8_t>\0emscripten::memory_view<int8_t>\0emscripten::memory_view<uint16_t>\0emscripten::memory_view<int16_t>\0emscripten::memory_view<uint64_t>\0emscripten::memory_view<int64_t>\0emscripten::memory_view<uint32_t>\0emscripten::memory_view<int32_t>\0emscripten::memory_view<char>\0emscripten::memory_view<unsigned char>\0emscripten::memory_view<signed char>\0emscripten::memory_view<long>\0emscripten::memory_view<unsigned long>\0emscripten::memory_view<double>\x000123456789\0C.UTF-8\x0001234567\0VectorFloat32\x0001\x001.3.1\0.\0-\0(packed.alphas.size()) == (numPoints)\0(null)\0(packed.colors.size()) == (numPoints * 3)\0(packed.scales.size()) == (numPoints * 3)\0(packed.sh.size()) == (numPoints * shDim * 3)\0(packed.rotations.size()) == (numPoints * (packed.usesQuaternionSmallestThree ? 4 : 3))\0(packed.positions.size()) == (numPoints * 3 * (usesFloat16 ? 2 : 3))\0%\0length_error was thrown in -fno-exceptions mode with message "%s"\0[SPZ: ERROR] Unsupported SH degree: %d
- \0 \0\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0A\xA0 \v\xB60\0\0\xF0c\0\0\xF0c\0\0P\0\0\xA4d\0\x008\0\0N3spz13GaussianCloudE\0\0\0\xA4d\0\0X\0\0N3spz13UnpackOptionsE\0ppiip\0\xF0c\0\0|\0\0\xA4d\0\0\x84\0\0NSt3__26vectorIfNS_9allocatorIfEEEE\0ipp\0(e\0\0\xD4\0\0\0\0\0\0\0\0\0\xEC\0\0\0\0\0\x008\0\0\0\0\0\0h\0\0\0\0\0\0NSt3__28optionalIfEE\0\0\0\0\xCCd\0\0\xF8\0\0(\0\0NSt3__227__optional_move_assign_baseIfLb1EEE\0\0\0\0\xCCd\0\x004\0\0d\0\0NSt3__227__optional_copy_assign_baseIfLb1EEE\0\0\0\0\xCCd\0\0p\0\0\x98\0\0NSt3__220__optional_move_baseIfLb1EEE\0\0\0\xCCd\0\0\xA4\0\0\xCC\0\0NSt3__220__optional_copy_baseIfLb1EEE\0\0\0\xCCd\0\0\xD8\0\0\0\0NSt3__223__optional_storage_baseIfLb0EEE\0\0\0\0\xA4d\0\0\f\0\0NSt3__224__optional_destruct_baseIfLb1EEE\0\0\0\xA4d\0\0@\0\0NSt3__218__sfinae_ctor_baseILb1ELb1EEE\0\0\xA4d\0\0p\0\0NSt3__220__sfinae_assign_baseILb1ELb1EEE\0\0\0\0\x84e\0\0\xAC\0\0\0\0\0\0|\0\0PNSt3__26vectorIfNS_9allocatorIfEEEE\0\0\0\0\x84e\0\0\xE4\0\0\0\0\0|\0\0PKNSt3__26vectorIfNS_9allocatorIfEEEE\0pp\0v\0vp\0\0\0\x9C\0\0pp\0\0\x98c\0\0|\0\x008d\0\0vppf\0\0\0\0\x98c\0\0|\0\0\xFCc\0\x008d\0\0vppif\0\0\0\xFCc\0\0|\0\0ipp\0\\\0\x008d\0\0\xA4d\0\0d\0\0N10emscripten3valE\0\0\xAC\0\0|\0\0\xFCc\0\0pppi\0\0\0\0\0\0\0\0\xA8c\0\0|\0\0\xFCc\0\x008d\0\0ippif\0\0\0(e\0\0\xD0\0\0\0\0\0\0\0\0\0\xE8\0\0\0\0\0\x008\0\0\0\0\0\0h\0\0\0\0\0\0NSt3__28optionalIhEE\0\0\0\0\xCCd\0\0\xF4\0\0$\0\0NSt3__227__optional_move_assign_baseIhLb1EEE\0\0\0\0\xCCd\0\x000\0\0\`\0\0NSt3__227__optional_copy_assign_baseIhLb1EEE\0\0\0\0\xCCd\0\0l\0\0\x94\0\0NSt3__220__optional_move_baseIhLb1EEE\0\0\0\xCCd\0\0\xA0\0\0\xC8\0\0NSt3__220__optional_copy_baseIhLb1EEE\0\0\0\xCCd\0\0\xD4\0\0\0\0\0NSt3__223__optional_storage_baseIhLb0EEE\0\0\0\0\xA4d\0\0\b\0\0NSt3__224__optional_destruct_baseIhLb1EEE\0\0\0\xA4d\0\0<\0\0NSt3__26vectorIhNS_9allocatorIhEEEE\0\x84e\0\0p\0\0\0\0\0\x004\0\0PNSt3__26vectorIhNS_9allocatorIhEEEE\0\0\0\0\x84e\0\0\xA8\0\0\0\0\x004\0\0PKNSt3__26vectorIhNS_9allocatorIhEEEE\0pp\0vp\0\`\0\0pp\0\0\x98c\0\x004\0\0\xC0c\0\0vppi\0\0\0\0\x98c\0\x004\0\0\xFCc\0\0\xC0c\0\0vppii\0\0\0\xFCc\0\x004\0\0ipp\0\\\0\0\xC0c\0\0\xA8\0\x004\0\0\xFCc\0\0pppi\0\0\0\0\xA8c\0\x004\0\0\xFCc\0\0\xC0c\0\0ippii\0p\0vp\0ipp\0vppi\0ipp\0vppi\0ppp\0vppp\0\0\0Xd\0\0p\0\0N3spz16CoordinateSystemE\0p\0vp\0ipp\0vppi\0\0\0\0\0\0\0\0\0\b\0\0\0\0\0\0\xA4d\0\0\xB0\0\0NSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE\0\0\xA4d\0\0\xF8\0\0NSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEE\0\0\xA4d\0\0@\0\0NSt3__212basic_stringIDsNS_11char_traitsIDsEENS_9allocatorIDsEEEE\0\0\0\xA4d\0\0\x8C\0\0NSt3__212basic_stringIDiNS_11char_traitsIDiEENS_9allocatorIDiEEEE\0\0\0\xA4d\0\0\xD8\0\0N10emscripten11memory_viewIcEE\0\0\xA4d\0\0\0\0\0N10emscripten11memory_viewIaEE\0\0\xA4d\0\0(\0\0N10emscripten11memory_viewIhEE\0\0\xA4d\0\0P\0\0N10emscripten11memory_viewIsEE\0\0\xA4d\0\0x\0\0N10emscripten11memory_viewItEE\0\0\xA4d\0\0\xA0\0\0N10emscripten11memory_viewIiEE\0\0\xA4d\0\0\xC8\0\0N10emscripten11memory_viewIjEE\0\0\xA4d\0\0\xF0\0\0N10emscripten11memory_viewIlEE\0\0\xA4d\0\0\0\0N10emscripten11memory_viewImEE\0\0\xA4d\0\0@\0\0N10emscripten11memory_viewIxEE\0\0\xA4d\0\0h\0\0N10emscripten11memory_viewIyEE\0\0\xA4d\0\0\x90\0\0N10emscripten11memory_viewIfEE\0\0\xA4d\0\0\xB8\0\0N10emscripten11memory_viewIdEE\0A\xE43\v\xA1(\x960\x07w,a\xEE\xBAQ \x99\xC4m\x07\x8F\xF4jp5\xA5c\xE9\xA3\x95d\x9E2\x88\xDB\xA4\xB8\xDCy\xE9\xD5\xE0\x88\xD9\xD2\x97+L\xB6 \xBD|\xB1~\x07-\xB8\xE7\x91\xBF\x90d\xB7\xF2 \xB0jHq\xB9\xF3\xDEA\xBE\x84}\xD4\xDA\xEB\xE4\xDDmQ\xB5\xD4\xF4\xC7\x85\xD3\x83V\x98l\xC0\xA8kdz\xF9b\xFD\xEC\xC9e\x8AO\\\xD9lcc=\xFA\xF5\r\b\x8D\xC8 n;^iL\xE4A\`\xD5rqg\xA2\xD1\xE4<G\xD4K\xFD\x85\r\xD2k\xB5
- \xA5\xFA\xA8\xB55l\x98\xB2B\xD6\xC9\xBB\xDB@\xF9\xBC\xAC\xE3l\xD82u\\\xDFE\xCF\r\xD6\xDCY=\xD1\xAB\xAC0\xD9&:\0\xDEQ\x80Q\xD7\xC8a\xD0\xBF\xB5\xF4\xB4!#\xC4\xB3V\x99\x95\xBA\xCF\xA5\xBD\xB8\x9E\xB8(\b\x88_\xB2\xD9\f\xC6$\xE9\v\xB1\x87|o/LhX\xABa\xC1=-f\xB6\x90A\xDCvq\xDB\xBC \xD2\x98*\xD5\xEF\x89\x85\xB1q\xB5\xB6\xA5\xE4\xBF\x9F3\xD4\xB8\xE8\xA2\xC9\x07x4\xF9\0\x8E\xA8 \x96\x98\xE1\xBB\rj\x7F-=m\b\x97ld\x91\\c\xE6\xF4Qkkbal\xD80e\x85N\0b\xF2\xED\x95l{\xA5\x1B\xC1\xF4\b\x82W\xC4\xF5\xC6\xD9\xB0eP\xE9\xB7\xEA\xB8\xBE\x8B|\x88\xB9\xFC\xDF\xDDbI-\xDA\xF3|\xD3\x8CeL\xD4\xFBXa\xB2M\xCEQ\xB5:t\0\xBC\xA3\xE20\xBB\xD4A\xA5\xDFJ\xD7\x95\xD8=m\xC4\xD1\xA4\xFB\xF4\xD6\xD3j\xE9iC\xFC\xD9n4F\x88g\xAD\xD0\xB8\`\xDAs-D\xE53_L
- \xAA\xC9|\r\xDD<qP\xAAA'\v\xBE\x86 \f\xC9%\xB5hW\xB3\x85o \xD4f\xB9\x9F\xE4a\xCE\xF9\xDE^\x98\xC9\xD9)"\x98\xD0\xB0\xB4\xA8\xD7\xC7=\xB3Y\x81\r\xB4.;\\\xBD\xB7\xADl\xBA\xC0 \x83\xB8\xED\xB6\xB3\xBF\x9A\f\xE2\xB6\x9A\xD2\xB1t9G\xD5\xEA\xAFw\xD2\x9D&\xDB\x83\xDCs\vc\xE3\x84;d\x94>jm\r\xA8Zjz\v\xCF\xE4\x9D\xFF \x93'\xAE\0
- \xB1\x9E\x07}D\x93\xF0\xD2\xA3\b\x87h\xF2\xFE\xC2i]Wb\xF7\xCBge\x80q6l\xE7knv\x1B\xD4\xFE\xE0+\xD3\x89Zz\xDA\xCCJ\xDDgo\xDF\xB9\xF9\xF9\xEF\xBE\x8EC\xBE\xB7\xD5\x8E\xB0\`\xE8\xA3\xD6\xD6~\x93\xD1\xA1\xC4\xC2\xD88R\xF2\xDFO\xF1g\xBB\xD1gW\xBC\xA6\xDD\xB5?K6\xB2H\xDA+\r\xD8L\x1B
- \xAF\xF6J6\`zA\xC3\xEF\`\xDFU\xDFg\xA8\xEF\x8En1y\xBEiF\x8C\xB3a\xCB\x83f\xBC\xA0\xD2o%6\xE2hR\x95w\f\xCCG\v\xBB\xB9"/&U\xBE;\xBA\xC5(\v\xBD\xB2\x92Z\xB4+j\xB3\\\xA7\xFF\xD7\xC21\xCF\xD0\xB5\x8B\x9E\xD9,\xAE\xDE[\xB0\xC2d\x9B&\xF2c\xEC\x9C\xA3ju
- \x93m\xA9 \x9C?6\xEB\x85g\x07rW\0\x82J\xBF\x95z\xB8\xE2\xAE+\xB1{8\x1B\xB6\f\x9B\x8E\xD2\x92\r\xBE\xD5\xE5\xB7\xEF\xDC|!\xDF\xDB\v\xD4\xD2\xD3\x86B\xE2\xD4\xF1\xF8\xB3\xDDhn\x83\xDA\xCD\xBE\x81[&\xB9\xF6\xE1w\xB0owG\xB7\xE6Z\b\x88pj\xFF\xCA;f\\\v\xFF\x9Ee\x8Fi\xAEb\xF8\xD3\xFFkaE\xCFlx\xE2
- \xA0\xEE\xD2\r\xD7T\x83N\xC2\xB39a&g\xA7\xF7\`\xD0MGiI\xDBwn>Jj\xD1\xAE\xDCZ\xD6\xD9f\v\xDF@\xF0;\xD87S\xAE\xBC\xA9\xC5\x9E\xBB\xDE\x7F\xCF\xB2G\xE9\xFF\xB50\xF2\xBD\xBD\x8A\xC2\xBA\xCA0\x93\xB3S\xA6\xA3\xB4$6\xD0\xBA\x93\xD7\xCD)W\xDET\xBFg\xD9#.zf\xB3\xB8Ja\xC4\x1Bh]\x94+o*7\xBE\v\xB4\xA1\x8E\f\xC3\x1B\xDFZ\x8D\xEF-\0\0\0\0F;ge\x8Cv\xCE\xCA\xCAM\xA9\xAFY\xEB\xEDN\xD0\x8A+\xD5\x9D#\x84\x93\xA6D\xE1\xB2\xD6\xDB\x9D\xF4\xED\xBC\xF8>\xA0Wx\x9Br2\xEB=6\xD3\xADQ\xB6gK\xF8!p\x9F|%\xAB\xC6\xE0c\x90\xA1\x85\xA9\xDD\b*\xEF\xE6oO|@+\xAE:{L\xCB\xF06\xE5d\xB6\r\x82\x97}}\xD1Fz\x1B\v\xD3\xB7]0\xB4\xD2\xCE\x96\xF03\x88\xAD\x97VB\xE0>\xF9\xDBY\x9C\vP\xFCMk\x9B\x7F\x87&2\xD0\xC1U\xB5R\xBBT\x80v1\xDE\xCD\xDF\x9E\x98\xF6\xB8\xFB\xB9\x86'\x87\xFF\xBD@\xE25\xF0\xE9Ms\xCB\x8E(\xE0m\xCA\xC9\xA6V\xAD\xACl\x1B* cf.\xFB:\xFAh\xC0]\x9F\xA2\x8D\xF40\xE4\xB6\x93Uw\xD7\xB41+\xB0\xD1\xFBf~\xBD]~\x1B\x9C-\xE1g\xDA\x86[/\xADV\`H\xC8\xC5\xC6\f)\x83\xFDkLI\xB0\xC2\xE3\x8B\xA5\x86\xA0\xF85P\x9B\x9FP\x9A\xD66\xFF\xDC\xEDQ\x9AOK{ pr\xC3=\xDB\xB1\x85\xBC\xD4\xA4v#\xA8\xE2MD\xCD(\0\xEDbn;\x8A\x07\xFD\x9D\xCE\xE6\xBB\xA6\xA9\x83q\xEB\0,7\xD0gI3\v>\xD5u0Y\xB0\xBF}\xF0\xF9F\x97zj\xE0\xD3\x9B,\xDB\xB4\xFE\xE6\x96Q\xA0\xADz4\x81\xDD\xE5H\xC7\xE6\x82-\r\xAB+\x82K\x90L\xE7\xD86\b\x9E\rocT@\xC6\xCC{\xA1\xA9\xF0/[\xCBcJ\x91\x86\xCA\xE5\xD7\xBD\xAD\x80D\x1B\xE9a \x8E\xC8m'\xAB\x8EV@\xCE\xAF&\xDF\xB2\xE9\xB8\xD7#Pxekv\xF6\xCD2\xFC\xB0\xF6U\x99z\xBB\xFC6<\x80\x9BS8[\xC2\xCF~\`\xA5\xAA\xB4-\f\xF2k\`a\xB0/\x81'\x8BH\xE4\xED\xC6\xE1K\xAB\xFD\x86.\x8A\x8DR\xCC\xB6~7\xFB\xD7\x98@\xC0\xB0\xFD\xD3f\xF4\x95]\x93y_:\xD6+]\xB3,@\xF1kj{\x96\xA06?\xA1\xE6\rX\xC4u\xAB%3\x90{@\xF9\xDD\xD2\xEF\xBF\xE6\xB5\x8A\x9E\x96*\xF6\xD8\xADM\x93\xE0\xE4<T\xDB\x83Y\xC7}\xC7\xB8\x81F\xA0\xDDK\v r\r0n \xEB7\x8BO\xD0P\xEE\x85\x9D\xF9A\xC3\xA6\x9E$P\0\xDA\xC5;\xBD\xA0\xDCv\x9AMsj\xBB=\xEC\xFD\x8Bs7K"\xDCqpE\xB9\xE2\xD6X\xA4\xEDf=n\xA0\xCF\x92(\x9B\xA8\xF7'\rqa+j\xABf\xC3\xBB\xED]\xA4\xDE~\xFB\xE0?8\xC0\x87Z\xF2\x8D.\xF5\xB4\xB6I\x90\x95\xC6\xD6\xEC\xD3\xFD\xB1\x89\xB0&_\x8B\x7FC\xCC-;\xA2\x8A\\\xC7@[\xF5h\`\x92\r\xBB\xCB\x91D\x80\xAC\xF4\x8E\xCD[\xC8\xF6b>[P&\xDFkA\xBA\xD7&\xE8\x91\x8Fp\xB0m\f\xF6Vwi<\x1B\xDE\xC6z \xB9\xA3\xE9\x86\xFDB\xAF\xBD\x9A'e\xF03\x88#\xCBT\xED:\xE0 ^|\xDBn;\xB6\x96\xC7\x94\xF0\xAD\xA0\xF1c\v\xE4%0\x83u\xEF}*\xDA\xA9FM\xBF\x886\xD2\xC3\xCE\r\xB5\xA6@ B{{l\xD1\xDD?\x8D\x97\xE6X\xE8]\xAB\xF1G\x1B\x90\x96"K\xCF\xBEYp\xA8\xDB\x93=t\xD5fF\xA0"\xF0\0\x9BE\x95\xCA\xD6\xEC:\x8C\xED\x8B_\xAD\x9D#\xEB\xA6sF!\xEB\xDA\xE9g\xD0\xBD\x8C\xF4v\xF9m\xB2M\x9E\bx\x007\xA7>;P\xC21\xB0\xF5Dw\x8B\x92!\xBD\xC6;\x8E\xFB\xFD\\\xEBh[
- .\`\x7Fo\xE4-\xD6\xC0\xA2\xB1\xA5\x83f.\xD9\xC5]I\xBC\xE0I+\x87v\xDA\x8D\xC3\x97\x9C\xB6\xA4\xF2V\xFB\r]\xC0j8\x1B3\xA4R T\xC1\x98m\xFDn\xDEV\x9A\vM\xF0\xDE\xEA\v\xCB\xB9\x8F\xC1\x86 \x87\xBDwE\xA6\xCD\xE89\xE0\xF6\x8F\\*\xBB&\xF3l\x80A\x96\xFF&w\xB9bsP\xCB\xBD5k\xAC\xD8\0\0\0\0X\x80\xE2\xD7\xF1\xB4t\xA9\x86V\xA3\xE2\rh\xE9\xBA\x8D\x8A>\v\xDC\x9DK\x8B>J\x85\xA1 \xDD\x9DC\xDEt\x1B},\x9B\xF7\xAAg\xC9\xE0?\x90+7\x96}\x94\xCE\x96\x9FC
- ;BR\xBB\xA0\xC4\xFB=\xF6g\xA3\xBD\xB0\xE86*\xFA\xB0\xB6\xC8-0\x9E\x8EA\xB0|Y\x8F&\xE3\xD7\xA6\xCD~ Wn&\xA0\xB5\xB9m+\x8B\xF35\xABi$\x9C-?\x87\xC4\xAD\xDDPv\x84&L\xF6f\xF1\xE5p0R\xBD\xF0\xD2\x85\xF6{\xEC\xCF\xAE\xFB\x07}X\xBB_\xFD\xBAl\x91k%/\xC9\xEB\xC7\xF8\`m\x91[8\xEDs\x8CsfM\xC6+\xE6\xAF\x82\`\xF9\xB2\xDA\xE0\x1BeM\xC65F\xCD$\xE2\xEFKrA\xB7\xCB\x90\x96\xFC@\xAE\xDC\xA4\xC0L\v\rF\xA8U\xC6\xF8\x7F\x9BPg<\xC3\xD0\x85\xEBjV\xD3H2\xD61\x9Fy]\xD5!\xDD\xED\x88[\xBB\xA1\xD0\xDBYv(\xEC\bMpl\xEA\x9A\xD9\xEA\xBC9\x81j^\xEE\xCA\xE1\`\xA4\x92a\x82s;\xE7\xD4\xD0cg6\x07\xAD\xF1\xA9D\xF5qK\x93\\\xF70w\xFF\xE7O\xFC\xC1\xAD|#z\xBE\xFAu\xD9\xE6z\x97"\xD7J^zW\xA8\x89\xD3\xD1\xFE*\x8BQ\xFD\xC0\xDA"\xB7\x98Z\xC0\`1\xDC\x96\xC3i\\t\xA7\xCA\xEBW\xFFJ \x80V\xCC_#L\xBD\xF4E\xC7\x83\xBEGai\xB4\xC17\xCA\xECA\xD5<\x9A\x8Ckdn\xBC\xCD\x9C8\x95\xDA\xC8\xDE\x97\xE4\x82\x86U/\x91P\xF6w\xB2!\xB9\x87-b\xE1\x07\xCF\xB5H\x81\x99{\xC1[\x8AE\x8B
- \xA7\\\xAA\x8C\xF1\xFF\xF2\f(6\xA1\xCExn!,\xAF\xC7\xA7z\f\x9F'\x98\xDB\xD4\xAC\xA6\x91\x8C,DF%\xAA\xE5}*\xF02\xB3\xBCoq\xEB<\x8D\xA6B\xBA\xDB:9\xD2Q\xB1\x07\x98 1\xE5O\xA0\xB7\xB3\xEC\xF87Q;P\xD8\x9A\bX\xF3M\xA1\xDE\xA5\xEE\xF9^G9\xB2\xD5ys\xEAU\x9B\xA4C\xD3\xCD\x07\x1BS/\xD0\xD5\xC5\xB0\x93\x8DERD$\xC3\xE7|C\xE607\xC8\xD8zoH:\xAD\xC6\xCEl\x9EN\x8E\xD9Z\xE3S\x89c\xB1^\xAB\xE5\xE7\xFD\xF3e*\xB8\xEE;\`\xE0n\xD9\xB7I\xE8\x8Fhm\xC3\xDF\xFE\xF2\x80\x87~W.\xF8F\xF4vx\xA4#=\xF3\x9Aiesx\xBE\xCC\xF5.\x94u\xCC\xCAD\xAE\x95\xBC.wk\xB5\xA8!\xC8\xED(\xC3\xA6\xA3\xFDU\xFE#\x82W\xA5I!%\xAB\xF6\xC1\xB34\xB5\x993\xD6b0\xB5\x80\xC1h5b#\xBE\\\\{>\xBE\x8B\xD2\xB8\xE8(\x8A8
- \xFFN\x95\xD7\xAF5x\xBF\x93c\xDB\xE7\x81\f\xAC\x98\xBFF\xF4]\x91]\x9E\v2\xE9\xE5\xCB\x88v\xA6\x93\b\x94q:\x8E\xC2\xD2b )\x85Oq\xFC\x98\xD8\x83\xAA;\x80H\xECx4\xD7 \xB4\xFB\0\x892\xAD\xA3\xD1\xB2Ot\x9A9q>\xC2\xB9\x93\xE9k?\xC5J3\xBF'\x9D\xFD)\xB8\xDE\xA5\xA9Z \f/\f\xAAT\xAF\xEE}$\xD07G\xA42\xE0\xEE"dC\xB6\xA2\x86\x94r[\xC4*\x8F\xB9\x83 \xEF\xB0\xDB\x89\rg\x903-\xC8\x82\xD1\xFAa\x87Y9\x84e\x8E\xF7\xFA\xCD\xAF\x92N\xB9^\x94\xACn\x92$M\x9Fp\xF3\xE4&P\xBC\x99\xC4\x87lB\x9D\xF14\xC2\x7F&\x9DD)\x85\xC5\xC4\xCBR\x8EO\xF5\xD6\xCF\xCF\x7FIAl'\xC9\xA3\xBB\xE9_<\xF8\xB1\xDF\xDE/Y\x88\x8C@\xD9j[\vRTS\xD2\xB6\xC6\xFAT\xE0e\xA2\xD4\xB2fy\xDF\xE2>\xF9=5\x97\x7Fk\x96\xCF\xFF\x89A\x84t\xB7\v\xDC\xF4U\xDCur\x7F-\xF2\xE1\xA8\xE3d~\xEB\xBB\xE4\x9C<b\xCA\x9FJ\xE2(HiY\xE9\xF4\xD5\xF0o\xA2v\xA8\xEF@\xA1\0\0\0\0\xE1\xB6R\xEF\x83k\xD4b\xDD\x86\xEA\xD7\xA8\v\xE7a\xFA\xE4\x85\xBC|d
- .\xE1\f\xAEQ\xED\xF8\x8F\xC5\x85ns\xD7\xFD
- y\xF9\xEB\xCF\xAB\xF3\x89-h\xA4\x7F\xF6\\\xA3.\xF9\xEA\xF1\xC1\x9B7w+z\x81%\xC4\x8B\v%\xFF=Y\xCA\x9D\xE0\xDF |V\x8D\xCF\xF2\xF29\xF5D\xA0\xD6\x97\x99&<v/t\xD3%Z2\xF3\x93\b\xDD\x91N\x8E7p\xF8\xDC\xD80\xB8F]\xD1\xB2\xB3\xD3\x92XRe\xC0\xB76o\xEEV\xD7\xD9\xBC\xB9\xB5:ST\xB2h\xBC<J\xDD\xA0E\xA5\xBF}\xC3O^\xCB\x91\xA0:\xC1\xBFA\xDBw\xED\xAE\xB9\xAAkDX9\xAB(\xE4\xE5s\xC9R\xB7\x9C\xAB\x8F1vJ9c\x99.3Mx\xCF\x85\x97\xADX\x99}L\xEE\xCB\x92$J\xB4d\xC5\xFC\xE6\x8B\xA7!\`aF\x972\x8E"\x9Do\xC3+N\x80\xA1\xF6\xC8j@@\x9A\x85\`p\x8D\xBA\x81\xC6\xDFU\xE3\x1BY\xBF\xAD\vPf\xA7%\xB1\x87w^\xE5\xCC\xF1\xB4z\xA3[l\xDE\xDC\xAD\x8Dh\x8EB\xEF\xB5\b\xA8ZGj t\xA6\x8B\xBF&I\xE9b\xA0\xA3\b\xD4\xF2Lx,.\x94\x99\x9A|{\xFBG\xFA\x91\xF1\xA8~~\xFB\x86\x9F\x9FM\xD4p\xFD\x90R\x9A&\0ut\x82\x7F\x83\x954-l\xF7\xE9\xAB\x86_\xF9irU\xD7\x88\x93\xE3\x85g\xF1>\x8D\x88QbP\xC8\xCB\xE7\xB1~\x99\b\xD3\xA3\xE22M\rVc\xEC\xB7\xA91\xD5t\xB7\xE94\xC2\xE5\\f\x9A\xF0\xBD\xD0\xC8\xDF\rN\xF5>\xBBZ\xB12\xFB\xBB\x07\`\xD9\xDA\xE6\xFE8l\xB4H\x94h\xC9\xA9":&\xCB\xFF\xBC\xCC*I\xEE#NC\xC0\xC2\xAF\xF5\x92-\xCD(\xC7,\x9EF(D:9\xDE\xA5\x8Ck1\xC7Q\xED\xDB&\xE7\xBF4B\xED\x91\xD5\xA3[\xC3:\xC1\x86E\xD0 0?\x81\xE6k\xAE\`P9A\x8D\xBF\xAB\xE3;\xEDD\x871\xC3\xA5f\x87\x91JZ\xA0\xE5\xECEO\x8DH:\xB9l\xFEhV#\xEE\xBC\xEF\x95\xBCS\x8B\x9F\x92\xB2j)\xC0]\b\xF4F\xB7\xE9BX\x99\xBA\xC8\x80x\f\x9Ao\xD1\x85\xFBgNj\x9Fm\`\x8B~\xDB2d\xB4\x8E\xFD\xB0\xE6a\x95\x99\x97t\xA2\xCBx\x7FM\x92\xF7\xC9}\x93\xC31\x9Crucs\xA8\xE5\x99\xF1\xB7v\xB1^-\xF3P\xE8\x7F25\xF9\xF6\xD3\x83\xAB\xB7\x89\x85\xF8V?\xD74\xE2Q\xFD\xD5T\xBD\xF0|\xE4\\F.\v>\x9B\xA8\xE1\xDF-\xFA\xBB'\xD4\xEFZ\x91\x86\x008L\0\xEA\xD9\xFAR\xA9\x8E\xDDH\xB4\xDC2*iZ\xD8\xCB\xDF\b7\xAF\xD5&\xD6Nct9,\xBE\xF2\xD3\xCD\b\xA0<\xA5\xAC\xDF\xCAD\x8D%&\xC7\v\xCF\xC7qY \xA3{w\xC1B\xCD%. \xA3\xC4\xC1\xA6\xF1+\xE1\x96\xE6\0 \xB4\xFBb\xFD2\x83K\`\xFE\xE7AN\xF7\xF0d*\x9A\x85\x9C\xC8\xF5\xED8\xB7\f\x8E\xE5\xECnSc\x8F\xE51\xE9\xEB\xEF\b
- YM\xE7h\x84\xCB\r\x892\x99\xE2\xF9\xCAE:|\xD5z\xA1\x91?\x9B\xC3\xD0\xFF\xED1\xAB\xBF\xDE|v94\x9D\xC0k\xDB\xF5d-\xD2F\xC2v\xC0(\x97\xB9\x92\xC7\xF3\xB3\xBC&\xEE\xC9p\xD8h#\x91n:\xCC\xD1.\xA0I0\x98\xF2\xA6REtL\xB3\xF3&\xA3\xD7\xF9\bB6OZ\xADT\x92\xDCG\xB5$\x8E\xA8\xDD\x80\xF1^<6\xA3\xB1^\xEB%[\xBF]w\xB4\xDBWYU:\xE1\v\xBAX<\x8DP\xB9\x8A\xDF\xBF\xC9rg(\xC4Q\x88J\xD7b\xAB\xAF\x85\x8D\xCF\xA5\xABl.\xF9\x83L\xCE\x7Fi\xADx-\x86\xC5\xDCRp$j\0\x9FF\xB7\x86u\xA7\xD4\x9A\xC3\v\xFA{"\xBD\xA8\x94@\`.~\xA1\xD6|\x91\0\0\0\0C\xCB\xA6\x87\xC7\x90<\xD4\x84[\x9AS\xCF'\bs\x8C\xEC\xAE\xF4\b\xB74\xA7K|\x92 \x9EO\xE6\xDD\x84\xB6aY\xDF,2\x8A\xB5Qh\x95\xA3\xBE\x96\xF8$A\xD53\x82\xC6}\x99Q>R\xF7\x90\xBA m\xC3\xF9\xC2\xCBD\xB2\xBEYd\xF1u\xFF\xE3u.e\xB06\xE5\xC37\xE3\xD6A\xF1\xA0\xE7v$F}%g\x8D\xDB\xA2,\xF1I\x82o:\xEF\xEBauV\xA8\xAA\xD3\xD1\xFA2\xA3.\xB9\xF9\xA9=\xA2\x9F\xFA~i9}5\xAB]v\xDE\r\xDA\xF2\x85\x97\x89\xB1N1d}\xB3\xC8'\xB6O\xA3\xED\x8F\xE0&)\x9B\xABZ\xBB\xBB\xE8\x91<l\xCA\x87o/!\xE8\x87\xAB\xF29\xC4\`T\xBE@;\xCE\xED\xF0hjH\x8C\xFAJ\vG\\\xCD\x8F\xC6\x9E\xCC\xD7\`\xE4\xE2\xDFZ/DX\xDEt\xDE\v\x9D\xBFx\x8C\xD6\xC3\xEA\xAC\x95\bL+S\xD6xR\x98p\xFF\xF4eF]\xB7\xAE\xE0\xDA3\xF5z\x89p>\xDC;BN.x\x89\xE8\xA9\xFC\xD2r\xFA\xBF\xD4}j*V\xBB)\xE1\xF0<\xAD\xBAjo\xEEq\xCC\xE8\xA5\r^\xC8\xE6\xC6\xF8Ob\x9Db!V\xC4\x9B\x89\xFCJ\xCA7\xB1\xCDNl+\x9E\r\xA7\x8DF\xDB9\xB9\xBE\x81K#\xED\xC2\x80\x85j\xB3\x07\xACTx\xA1+\xD0#;x\x93\xE8\x9D\xFF\xD8\x94\xDF\x9B_\xA9X3\v\\\xCF\x95\x8CW\xE5sM\x9CC\xF4\xC9\xC7\xD9\xA7\x8A\f\x7F \xC1p\xED\0\x82\xBBK\x87\xE0\xD1\xD4E+wS\x90\xF5\x95\xD3\xD3SW\x88\xC9ACo\xC6_?\xFD\xE6\xF4[a\x98\xAF\xC12\xDBdg\xB5s\xCE\xB4d0\xE3\xB4^\x88\xB0\xF7\x95.7\xBC\xE9\xBC\xFF"\x90{y\x80\xC38\xB2&D\xED\x81\xA4\x82\xAEJ*\x98Vi\xDA>\xD1"\xA6\xAC\xF1am
- v\xE56\x90%\xA6\xFD6\xA2\xE8\xCB\x8C\xBA\xAB\0*=/[\xB0nl\x90\xE9'\xEC\x84\xC9d'"N\xE0|\xB8\xA3\xB7\x9Av\x84\x9C\\5O:\xDB\xB1\xA0\x88\xF2\xDF\xB9\xA3\x94/\xFAh2\xA8~3\xA8\xFB=\xF8|\x95R\xDD\xAD\xD6\x99{*R\xC2\xE1y G\xFEZu\xD5\xDE\xBEsY\x9D\xE5\xE9
- \xDE.O\x8D\v\xCDKH\xD6k\xCC\xCC\x8D\xF1\x9F\x8FFW\xC4:\xC58\x87\xF1c\xBF\xAA\xF9\xEC@a_k\xF9/\x94Q2\x89\xD5i@\x96\xA2\xB5\xC7\xDD\xDE'\xE7\x9E\x81\`N\x1B3Y\x85\xBD\xB4\x8C\xB6?r\xCF}\x99\xF5K&\xA6\b\xED\xA5!C\x917\0Z\x91\x86\x84\v\xD5\xC7\xCA\xADRo\`~\x83,\xAB\xD8\xA8\xF0BW\xEB;\xE4\xD0\xA0Gv\xF0\xE3\x8C\xD0wg\xD7J$$\xEC\xA3\xF1/ne\xB2\xE4\xC8\xE26\xBFR\xB1ut\xF46>\bf}\xC3\xC0\x91\xF9\x98Z\xC2\xBAS\xFCE\xAE\xCA\xE7_el\`\xDB>\xF63\x98\xF5P\xB4\xD3\x89\xC2\x94\x90Bd\xFE@W\xD2X\xC7\x82\xE1\xDA\xC1*|\x86Eq\xE6\xD5\xBA@RM\xC6\xD2r\rt\xF5\x8AV\xEE\xA6\xC9\x9DH!a7\x9B\xF0"\xFC=w\xA6\xA7\xA7$\xE5l\xA3\xAE\x93\x83\xED\xDB5i\x80\xAFW*K \xD0\xFFx\x8B\xBC\xB3-\x918\xE8\xB7\xC2{#E0_\x83es\x94%\xE2\xF7\xCF\xBF\xB1\xB46\xE6\x9Ci\xC9\xA5W\xCFN!\fUb\xC7\xF3\x9A)\xBBa\xBAjp\xC7=\xEE+]n\xAD\xE0\xFB\xE9x\xD3y/;\xDF\xA8\xBFCE\xFB\xFC\x88\xE3|\xB7\xF4q\\\xF4?\xD7\xDBpdM\x883\xAF\xEB\x9B8\xDE\xD8\xCE\x9EY\\\x95
- ^\xA2\x8DT"0\xAD\xE9\x96*\x93\xB2\fy\xD0y\xAA\xFEJ(8F\x81\x8E\xBF\xC2\xDA\xEC\x81\xB2k\xCAm K\x89\xA6\x86\xCC\r\xFD\x9FN6\xBA\0\0\0\0\0\b\0\x07\0 \0\0
- \0\0\v\0\0\f\0\0\r\0\0\0\0\0A\x90\xDC\0\v\xA2\`\x07\0\0\0\bP\0\0\b\0\bs\0\x07\0\0\bp\0\0\b0\0\0 \xC0\0\x07
- \0\0\b\`\0\0\b \0\0 \xA0\0\0\b\0\0\0\b\x80\0\0\b@\0\0 \xE0\0\x07\0\0\bX\0\0\b\0\0 \x90\0\x07;\0\0\bx\0\0\b8\0\0 \xD0\0\x07\0\0\bh\0\0\b(\0\0 \xB0\0\0\b\b\0\0\b\x88\0\0\bH\0\0 \xF0\0\x07\0\0\bT\0\0\b\0\b\xE3\0\x07+\0\0\bt\0\0\b4\0\0 \xC8\0\x07\r\0\0\bd\0\0\b$\0\0 \xA8\0\0\b\0\0\b\x84\0\0\bD\0\0 \xE8\0\x07\b\0\0\b\\\0\0\b\0\0 \x98\0\x07S\0\0\b|\0\0\b<\0\0 \xD8\0\x07\0\0\bl\0\0\b,\0\0 \xB8\0\0\b\f\0\0\b\x8C\0\0\bL\0\0 \xF8\0\x07\0\0\bR\0\0\b\0\b\xA3\0\x07#\0\0\br\0\0\b2\0\0 \xC4\0\x07\v\0\0\bb\0\0\b"\0\0 \xA4\0\0\b\0\0\b\x82\0\0\bB\0\0 \xE4\0\x07\x07\0\0\bZ\0\0\b\0\0 \x94\0\x07C\0\0\bz\0\0\b:\0\0 \xD4\0\x07\0\0\bj\0\0\b*\0\0 \xB4\0\0\b
- \0\0\b\x8A\0\0\bJ\0\0 \xF4\0\x07\0\0\bV\0\0\b\0@\b\0\0\x073\0\0\bv\0\0\b6\0\0 \xCC\0\x07\0\0\bf\0\0\b&\0\0 \xAC\0\0\b\0\0\b\x86\0\0\bF\0\0 \xEC\0\x07 \0\0\b^\0\0\b\0\0 \x9C\0\x07c\0\0\b~\0\0\b>\0\0 \xDC\0\x07\x1B\0\0\bn\0\0\b.\0\0 \xBC\0\0\b\0\0\b\x8E\0\0\bN\0\0 \xFC\0\`\x07\0\0\0\bQ\0\0\b\0\b\x83\0\x07\0\0\bq\0\0\b1\0\0 \xC2\0\x07
- \0\0\ba\0\0\b!\0\0 \xA2\0\0\b\0\0\b\x81\0\0\bA\0\0 \xE2\0\x07\0\0\bY\0\0\b\0\0 \x92\0\x07;\0\0\by\0\0\b9\0\0 \xD2\0\x07\0\0\bi\0\0\b)\0\0 \xB2\0\0\b \0\0\b\x89\0\0\bI\0\0 \xF2\0\x07\0\0\bU\0\0\b\0\b\x07+\0\0\bu\0\0\b5\0\0 \xCA\0\x07\r\0\0\be\0\0\b%\0\0 \xAA\0\0\b\0\0\b\x85\0\0\bE\0\0 \xEA\0\x07\b\0\0\b]\0\0\b\0\0 \x9A\0\x07S\0\0\b}\0\0\b=\0\0 \xDA\0\x07\0\0\bm\0\0\b-\0\0 \xBA\0\0\b\r\0\0\b\x8D\0\0\bM\0\0 \xFA\0\x07\0\0\bS\0\0\b\0\b\xC3\0\x07#\0\0\bs\0\0\b3\0\0 \xC6\0\x07\v\0\0\bc\0\0\b#\0\0 \xA6\0\0\b\0\0\b\x83\0\0\bC\0\0 \xE6\0\x07\x07\0\0\b[\0\0\b\x1B\0\0 \x96\0\x07C\0\0\b{\0\0\b;\0\0 \xD6\0\x07\0\0\bk\0\0\b+\0\0 \xB6\0\0\b\v\0\0\b\x8B\0\0\bK\0\0 \xF6\0\x07\0\0\bW\0\0\b\0@\b\0\0\x073\0\0\bw\0\0\b7\0\0 \xCE\0\x07\0\0\bg\0\0\b'\0\0 \xAE\0\0\b\x07\0\0\b\x87\0\0\bG\0\0 \xEE\0\x07 \0\0\b_\0\0\b\0\0 \x9E\0\x07c\0\0\b\x7F\0\0\b?\0\0 \xDE\0\x07\x1B\0\0\bo\0\0\b/\0\0 \xBE\0\0\b\0\0\b\x8F\0\0\bO\0\0 \xFE\0\`\x07\0\0\0\bP\0\0\b\0\bs\0\x07\0\0\bp\0\0\b0\0\0 \xC1\0\x07
- \0\0\b\`\0\0\b \0\0 \xA1\0\0\b\0\0\0\b\x80\0\0\b@\0\0 \xE1\0\x07\0\0\bX\0\0\b\0\0 \x91\0\x07;\0\0\bx\0\0\b8\0\0 \xD1\0\x07\0\0\bh\0\0\b(\0\0 \xB1\0\0\b\b\0\0\b\x88\0\0\bH\0\0 \xF1\0\x07\0\0\bT\0\0\b\0\b\xE3\0\x07+\0\0\bt\0\0\b4\0\0 \xC9\0\x07\r\0\0\bd\0\0\b$\0\0 \xA9\0\0\b\0\0\b\x84\0\0\bD\0\0 \xE9\0\x07\b\0\0\b\\\0\0\b\0\0 \x99\0\x07S\0\0\b|\0\0\b<\0\0 \xD9\0\x07\0\0\bl\0\0\b,\0\0 \xB9\0\0\b\f\0\0\b\x8C\0\0\bL\0\0 \xF9\0\x07\0\0\bR\0\0\b\0\b\xA3\0\x07#\0\0\br\0\0\b2\0\0 \xC5\0\x07\v\0\0\bb\0\0\b"\0\0 \xA5\0\0\b\0\0\b\x82\0\0\bB\0\0 \xE5\0\x07\x07\0\0\bZ\0\0\b\0\0 \x95\0\x07C\0\0\bz\0\0\b:\0\0 \xD5\0\x07\0\0\bj\0\0\b*\0\0 \xB5\0\0\b
- \0\0\b\x8A\0\0\bJ\0\0 \xF5\0\x07\0\0\bV\0\0\b\0@\b\0\0\x073\0\0\bv\0\0\b6\0\0 \xCD\0\x07\0\0\bf\0\0\b&\0\0 \xAD\0\0\b\0\0\b\x86\0\0\bF\0\0 \xED\0\x07 \0\0\b^\0\0\b\0\0 \x9D\0\x07c\0\0\b~\0\0\b>\0\0 \xDD\0\x07\x1B\0\0\bn\0\0\b.\0\0 \xBD\0\0\b\0\0\b\x8E\0\0\bN\0\0 \xFD\0\`\x07\0\0\0\bQ\0\0\b\0\b\x83\0\x07\0\0\bq\0\0\b1\0\0 \xC3\0\x07
- \0\0\ba\0\0\b!\0\0 \xA3\0\0\b\0\0\b\x81\0\0\bA\0\0 \xE3\0\x07\0\0\bY\0\0\b\0\0 \x93\0\x07;\0\0\by\0\0\b9\0\0 \xD3\0\x07\0\0\bi\0\0\b)\0\0 \xB3\0\0\b \0\0\b\x89\0\0\bI\0\0 \xF3\0\x07\0\0\bU\0\0\b\0\b\x07+\0\0\bu\0\0\b5\0\0 \xCB\0\x07\r\0\0\be\0\0\b%\0\0 \xAB\0\0\b\0\0\b\x85\0\0\bE\0\0 \xEB\0\x07\b\0\0\b]\0\0\b\0\0 \x9B\0\x07S\0\0\b}\0\0\b=\0\0 \xDB\0\x07\0\0\bm\0\0\b-\0\0 \xBB\0\0\b\r\0\0\b\x8D\0\0\bM\0\0 \xFB\0\x07\0\0\bS\0\0\b\0\b\xC3\0\x07#\0\0\bs\0\0\b3\0\0 \xC7\0\x07\v\0\0\bc\0\0\b#\0\0 \xA7\0\0\b\0\0\b\x83\0\0\bC\0\0 \xE7\0\x07\x07\0\0\b[\0\0\b\x1B\0\0 \x97\0\x07C\0\0\b{\0\0\b;\0\0 \xD7\0\x07\0\0\bk\0\0\b+\0\0 \xB7\0\0\b\v\0\0\b\x8B\0\0\bK\0\0 \xF7\0\x07\0\0\bW\0\0\b\0@\b\0\0\x073\0\0\bw\0\0\b7\0\0 \xCF\0\x07\0\0\bg\0\0\b'\0\0 \xAF\0\0\b\x07\0\0\b\x87\0\0\bG\0\0 \xEF\0\x07 \0\0\b_\0\0\b\0\0 \x9F\0\x07c\0\0\b\x7F\0\0\b?\0\0 \xDF\0\x07\x1B\0\0\bo\0\0\b/\0\0 \xBF\0\0\b\0\0\b\x8F\0\0\bO\0\0 \xFF\0\0\0\x1B\0A\0@\0!\0 \0\b\x81\0@\0\0\0\x81\0\x1B\x07\0a\0\`\01\00\r\0\f\xC1\0@\0\0\0\0\0\0\x07\0\b\0 \0
- \0\v\0\r\0\0\0\0\0\x1B\0\0#\0+\x003\0;\0C\0S\0c\0s\0\x83\0\xA3\0\xC3\0\xE3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xCB\0M\0\0\0\0\0\0\0\0\x07\0 \0\r\0\0\0!\x001\0A\0a\0\x81\0\xC1\0\x81\b\f 0@\`\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x1B\0\x1B\0\0\0\0\0@\0@\0\xBE\xF3\xF8y\xECa\xF6?\xDE\xAA\x8C\x80\xF7{\xD5\xBF=\x88\xAFJ\xEDq\xF5?\xDBm\xC0\xA7\xF0\xBE\xD2\xBF\xB0\xF0\xF09\x95\xF4?g:Q\x7F\xAE\xD0\xBF\x85\xB8\xB0\x95\xC9\xF3?\xE9$\x82\xA6\xD81\xCB\xBF\xA5d\x88\f\r\xF3?Xw\xC0
- OW\xC6\xBF\xA0\x8E\v{"^\xF2?\0\x81\x9C\xC7+\xAA\xC1\xBF?4JJ\xBB\xF1?^\x8C\xCEvN\xBA\xBF\xBA\xE5\x8A\xF0X#\xF1?\xCCaZ<\x97\xB1\xBF\xA7\0\x99A?\x95\xF0?\f\xE18\xF4R\xA2\xBF\0\0\0\0\0\0\xF0?\0\0\0\0\0\0\0\0\xACG\x9A\xFD\x8C\`\xEE?\x84Y\xF2]\xAA\xA5\xAA?\xA0j\xB3\xA4\xEC?\xB4.6\xAAS^\xBC?\xE6\xFCjW6 \xEB?\b\xDB w\xE5&\xC5?-\xAA\xA1c\xD1\xC2\xE9?pG"\r\x86\xC2\xCB?\xEDAx\xE6\x86\xE8?\xE1~\xA0\xC8\x8B\xD1?bHS\xF5\xDCg\xE7? \xEE\xB6W0\xD4?\xEF9\xFA\xFEB.\xE6?4\x83\xB8H\xA3\xD0\xBFj\v\xE0\v[W\xD5?#A
- \xF2\xFE\xFF\xDF\xBF\xB8e\0A\xC0\xF1\0\vA\0\v\0\0\0\0\0\0\0\0\0\0\0 \0\0\0\0\v\0\0\0\0\0\0\0\0\0
-
-
- \x07\0\0 \v\0\0 \v\0\0\v\0\0\0\0\0A\x91\xF2\0\v!\0\0\0\0\0\0\0\0\0\v\r\0\r\0\0\0 \0\0\0 \0\0\0\0A\xCB\xF2\0\v\f\0A\xD7\xF2\0\v\0\0\0\0\0\0\0\0 \f\0\0\0\0\0\f\0\0\f\0A\x85\xF3\0\v\0A\x91\xF3\0\v\0\0\0\0\0\0\0 \0\0\0\0\0\0\0\0A\xBF\xF3\0\v\0A\xCB\xF3\0\v\0\0\0\0\0\0\0\0 \0\0\0\0\0\0\0\0\0\0\0\0\0A\x82\xF4\0\v\0\0\0\0\0\0\0\0\0 \0A\xB3\xF4\0\v\0A\xBF\xF4\0\v\0\0\0\0\0\0\0\0 \0\0\0\0\0\0\0\0A\xED\xF4\0\v\0A\xF9\xF4\0\v\xB8\x07\0\0\0\0\0\0\0\0 \0\0\0\0\0\0\0\0\x000123456789ABCDEF\0\0\0\0X;\0\x006\0\0\x007\0\0\x008\0\0\x009\0\0\0:\0\0\0;\0\0\0<\0\0\0=\0\0\0>\0\0\0?\0\0\0@\0\0\0A\0\0\0B\0\0\0C\0\0\0\0\0\0\0t<\0\0D\0\0\0E\0\0\x008\0\0\x009\0\0\0F\0\0\0G\0\0\0<\0\0\0=\0\0\0>\0\0\0H\0\0\0@\0\0\0I\0\0\0B\0\0\0J\0\0\0\xCCd\0\0,;\0\0>\0\0NSt3__29basic_iosIcNS_11char_traitsIcEEEE\0\0\0\xA4d\0\0\`;\0\0NSt3__215basic_streambufIcNS_11char_traitsIcEEEE\0\0\0\0(e\0\0\xAC;\0\0\0\0\0\0\0\0\0 ;\0\0\xF4\xFF\xFFNSt3__213basic_istreamIcNS_11char_traitsIcEEEE\0\0(e\0\0\xF4;\0\0\0\0\0\0\0\0\0 ;\0\0\xF4\xFF\xFFNSt3__213basic_ostreamIcNS_11char_traitsIcEEEE\0\0(e\0\0D<\0\0\0\0\0\0\0\0\x94;\0\0\0\0\0\xDC;\0\0\b\0\0NSt3__214basic_iostreamIcNS_11char_traitsIcEEEE\0\xCCd\0\0\x80<\0\0X;\0\0NSt3__215basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEEE\0\0\0@\0\0\0\0\0\0\0\xB4=\0\0K\0\0\0L\0\0\x008\0\0\0\xF8\xFF\xFF\xFF\xB4=\0\0M\0\0\0N\0\0\0\xC0\xFF\xFF\xFF\xC0\xFF\xFF\xFF\xB4=\0\0O\0\0\0P\0\0\0\xD0<\0\x004=\0\0p=\0\0\x84=\0\0\x98=\0\0\xAC=\0\0\\=\0\0H=\0\0\xF8<\0\0\xE4<\0\0@\0\0\0\0\0\0\0$<\0\0Q\0\0\0R\0\0\x008\0\0\0\xF8\xFF\xFF\xFF$<\0\0S\0\0\0T\0\0\0\xC0\xFF\xFF\xFF\xC0\xFF\xFF\xFF$<\0\0U\0\0\0V\0\0\0@\0\0\0\0\0\0\0\x94;\0\0W\0\0\0X\0\0\0\xC0\xFF\xFF\xFF\xC0\xFF\xFF\xFF\x94;\0\0Y\0\0\0Z\0\0\x008\0\0\0\0\0\0\0\xDC;\0\0[\0\0\0\\\0\0\0\xC8\xFF\xFF\xFF\xC8\xFF\xFF\xFF\xDC;\0\0]\0\0\0^\0\0\0\xCCd\0\0\xC0=\0\0$<\0\0NSt3__218basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE\0\0\0\0\0\0\0\0>\0\0_\0\0\0\`\0\0\0\xA4d\0\0 >\0\0NSt3__28ios_baseE\0A\xC0\xFC\0\v#\xDE\x95\0\0\0\0\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF@>\0\0\0\0\0C.UTF-8\0A\x90\xFD\0\vT>\0A\xB0\xFD\0\vGLC_CTYPE\0\0\0\0LC_NUMERIC\0\0LC_TIME\0\0\0\0\0LC_COLLATE\0\0LC_MONETARY\0LC_MESSAGES\0A\x84\xFE\0\v-\x80\xDE(\0\x80\xC8M\0\0\xA7v\0\x004\x9E\0\x80\xC7\0\x80\x9F\xEE\0\0~\x80\\@\x80\xE9g\0\xC8\x90\0U\xB8.\0A\xC0\xFE\0\v\xD2Sun\0Mon\0Tue\0Wed\0Thu\0Fri\0Sat\0Sunday\0Monday\0Tuesday\0Wednesday\0Thursday\0Friday\0Saturday\0Jan\0Feb\0Mar\0Apr\0May\0Jun\0Jul\0Aug\0Sep\0Oct\0Nov\0Dec\0January\0February\0March\0April\0May\0June\0July\0August\0September\0October\0November\0December\0AM\0PM\0%a %b %e %T %Y\0%m/%d/%y\0%H:%M:%S\0%I:%M:%S %p\0\0\0%m/%d/%y\x000123456789\0%a %b %e %T %Y\0%H:%M:%S\0\0\0\0\0^[yY]\0^[nN]\0yes\0no\0A\xA0\x81\v\xE1\xD1t\x9E\0W\x9D\xBD*\x80pR\xFF\xFF>'
- \0\0\0d\0\0\0\xE8\0\0'\0\0\xA0\x86\0@B\0\x80\x96\x98\0\0\xE1\xF5\0\0\x005\0\0\0q\0\0\0k\xFF\xFF\xFF\xCE\xFB\xFF\xFF\x92\xBF\xFF\xFF\0\0\0\0\0\0\0\0\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x07\b \xFF\xFF\xFF\xFF\xFF\xFF\xFF
- \v\f\r\x1B !"#\xFF\xFF\xFF\xFF\xFF\xFF
- \v\f\r\x1B !"#\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x07\0\0\0\0\0\0\0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\x07\0\0\xC0\b\0\0\xC0 \0\0\xC0
- \0\0\xC0\v\0\0\xC0\f\0\0\xC0\r\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\x1B\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\0\xB3\0\0\xC3\0\0\xC3\0\0\xC3\0\0\xC3\0\0\xC3\0\0\xC3\x07\0\0\xC3\b\0\0\xC3 \0\0\xC3
- \0\0\xC3\v\0\0\xC3\f\0\0\xC3\r\0\0\xD3\0\0\xC3\0\0\xC3\0\0\f\xBB\0\f\xC3\0\f\xC3\0\f\xC3\0\f\xDB\0\0\0\x000123456789abcdefABCDEFxX+-pPiInN\0%I:%M:%S %p%H:%M\0A\x90\x86\v\x81%\0\0\0m\0\0\0/\0\0\0%\0\0\0d\0\0\0/\0\0\0%\0\0\0y\0\0\0%\0\0\0Y\0\0\0-\0\0\0%\0\0\0m\0\0\0-\0\0\0%\0\0\0d\0\0\0%\0\0\0I\0\0\0:\0\0\0%\0\0\0M\0\0\0:\0\0\0%\0\0\0S\0\0\0 \0\0\0%\0\0\0p\0\0\0\0\0\0\0%\0\0\0H\0\0\0:\0\0\0%\0\0\0M\0A\xA0\x87\ve%\0\0\0H\0\0\0:\0\0\0%\0\0\0M\0\0\0:\0\0\0%\0\0\0S\0\0\0\0\0\0\0\0M\0\0t\0\0\0u\0\0\0v\0\0\0\0\0\0\0dM\0\0w\0\0\0x\0\0\0v\0\0\0y\0\0\0z\0\0\0{\0\0\0|\0\0\0}\0\0\0~\0\0\0\x7F\0\0\0\x80\0A\x90\x88\v\xFD\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0B\0\0B\0\0B\0\0B\0\0B\0\0B\0\0B\0\0B\0\0B\0\0B\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0*\0\0*\0\0*\0\0*\0\0*\0\0*\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\x002\0\x002\0\x002\0\x002\0\x002\0\x002\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\0A\x94\x90\v\xED\xBCL\0\0\x81\0\0\0\x82\0\0\0v\0\0\0\x83\0\0\0\x84\0\0\0\x85\0\0\0\x86\0\0\0\x87\0\0\0\x88\0\0\0\x89\0\0\0\0\0\0\0\x98M\0\0\x8A\0\0\0\x8B\0\0\0v\0\0\0\x8C\0\0\0\x8D\0\0\0\x8E\0\0\0\x8F\0\0\0\x90\0\0\0\0\0\0\0\xBCM\0\0\x91\0\0\0\x92\0\0\0v\0\0\0\x93\0\0\0\x94\0\0\0\x95\0\0\0\x96\0\0\0\x97\0\0\0t\0\0\0r\0\0\0u\0\0\0e\0\0\0\0\0\0\0f\0\0\0a\0\0\0l\0\0\0s\0\0\0e\0\0\0\0\0\0\0%\0\0\0m\0\0\0/\0\0\0%\0\0\0d\0\0\0/\0\0\0%\0\0\0y\0\0\0\0\0\0\0%\0\0\0H\0\0\0:\0\0\0%\0\0\0M\0\0\0:\0\0\0%\0\0\0S\0\0\0\0\0\0\0%\0\0\0a\0\0\0 \0\0\0%\0\0\0b\0\0\0 \0\0\0%\0\0\0d\0\0\0 \0\0\0%\0\0\0H\0\0\0:\0\0\0%\0\0\0M\0\0\0:\0\0\0%\0\0\0S\0\0\0 \0\0\0%\0\0\0Y\0\0\0\0\0\0\0%\0\0\0I\0\0\0:\0\0\0%\0\0\0M\0\0\0:\0\0\0%\0\0\0S\0\0\0 \0\0\0%\0\0\0p\0A\x8C\x93\v\xFD'\x9CI\0\0\x98\0\0\0\x99\0\0\0v\0\0\0\xCCd\0\0\xA8I\0\0\xF0a\0\0NSt3__26locale5facetE\0\0\0\0\0\0\0J\0\0\x98\0\0\0\x9A\0\0\0v\0\0\0\x9B\0\0\0\x9C\0\0\0\x9D\0\0\0\x9E\0\0\0\x9F\0\0\0\xA0\0\0\0\xA1\0\0\0\xA2\0\0\0\xA3\0\0\0\xA4\0\0\0\xA5\0\0\0\xA6\0\0\0(e\0\0$J\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\x008J\0\0\0\0\0NSt3__25ctypeIwEE\0\0\0\xA4d\0\0@J\0\0NSt3__210ctype_baseE\0\0\0\0\0\0\0\0\x88J\0\0\x98\0\0\0\xA7\0\0\0v\0\0\0\xA8\0\0\0\xA9\0\0\0\xAA\0\0\0\xAB\0\0\0\xAC\0\0\0\xAD\0\0\0\xAE\0\0\0(e\0\0\xA8J\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\xCCJ\0\0\0\0\0NSt3__27codecvtIcc11__mbstate_tEE\0\0\0\xA4d\0\0\xD4J\0\0NSt3__212codecvt_baseE\0\0\0\0\0\0K\0\0\x98\0\0\0\xAF\0\0\0v\0\0\0\xB0\0\0\0\xB1\0\0\0\xB2\0\0\0\xB3\0\0\0\xB4\0\0\0\xB5\0\0\0\xB6\0\0\0(e\0\0<K\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\xCCJ\0\0\0\0\0NSt3__27codecvtIDsc11__mbstate_tEE\0\0\0\0\0\0\x90K\0\0\x98\0\0\0\xB7\0\0\0v\0\0\0\xB8\0\0\0\xB9\0\0\0\xBA\0\0\0\xBB\0\0\0\xBC\0\0\0\xBD\0\0\0\xBE\0\0\0(e\0\0\xB0K\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\xCCJ\0\0\0\0\0NSt3__27codecvtIDsDu11__mbstate_tEE\0\0\0\0\0L\0\0\x98\0\0\0\xBF\0\0\0v\0\0\0\xC0\0\0\0\xC1\0\0\0\xC2\0\0\0\xC3\0\0\0\xC4\0\0\0\xC5\0\0\0\xC6\0\0\0(e\0\0$L\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\xCCJ\0\0\0\0\0NSt3__27codecvtIDic11__mbstate_tEE\0\0\0\0\0\0xL\0\0\x98\0\0\0\xC7\0\0\0v\0\0\0\xC8\0\0\0\xC9\0\0\0\xCA\0\0\0\xCB\0\0\0\xCC\0\0\0\xCD\0\0\0\xCE\0\0\0(e\0\0\x98L\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\xCCJ\0\0\0\0\0NSt3__27codecvtIDiDu11__mbstate_tEE\0(e\0\0\xDCL\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\xCCJ\0\0\0\0\0NSt3__27codecvtIwc11__mbstate_tEE\0\0\0\xCCd\0\0\fM\0\0\x9CI\0\0NSt3__26locale5__impE\0\0\0\xCCd\0\x000M\0\0\x9CI\0\0NSt3__27collateIcEE\0\xCCd\0\0PM\0\0\x9CI\0\0NSt3__27collateIwEE\0(e\0\0\x84M\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\x008J\0\0\0\0\0NSt3__25ctypeIcEE\0\0\0\xCCd\0\0\xA4M\0\0\x9CI\0\0NSt3__28numpunctIcEE\0\0\0\0\xCCd\0\0\xC8M\0\0\x9CI\0\0NSt3__28numpunctIwEE\0\0\0\0\0\0\0\0$M\0\0\xCF\0\0\0\xD0\0\0\0v\0\0\0\xD1\0\0\0\xD2\0\0\0\xD3\0\0\0\0\0\0\0DM\0\0\xD4\0\0\0\xD5\0\0\0v\0\0\0\xD6\0\0\0\xD7\0\0\0\xD8\0\0\0\0\0\0\0\`N\0\0\x98\0\0\0\xD9\0\0\0v\0\0\0\xDA\0\0\0\xDB\0\0\0\xDC\0\0\0\xDD\0\0\0\xDE\0\0\0\xDF\0\0\0\xE0\0\0\0\xE1\0\0\0\xE2\0\0\0\xE3\0\0\0\xE4\0\0\0(e\0\0\x80N\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\xC4N\0\0\0\0\0\0NSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE\0(e\0\0\xDCN\0\0\0\0\0\0\0\0\0\xF4N\0\0\0\0\0\0NSt3__29__num_getIcEE\0\0\0\xA4d\0\0\xFCN\0\0NSt3__214__num_get_baseE\0\0\0\0\0\0\0\0XO\0\0\x98\0\0\0\xE5\0\0\0v\0\0\0\xE6\0\0\0\xE7\0\0\0\xE8\0\0\0\xE9\0\0\0\xEA\0\0\0\xEB\0\0\0\xEC\0\0\0\xED\0\0\0\xEE\0\0\0\xEF\0\0\0\xF0\0\0\0(e\0\0xO\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\xBCO\0\0\0\0\0\0NSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE\0(e\0\0\xD4O\0\0\0\0\0\0\0\0\0\xF4N\0\0\0\0\0\0NSt3__29__num_getIwEE\0\0\0\0\0\0\0 P\0\0\x98\0\0\0\xF1\0\0\0v\0\0\0\xF2\0\0\0\xF3\0\0\0\xF4\0\0\0\xF5\0\0\0\xF6\0\0\0\xF7\0\0\0\xF8\0\0\0\xF9\0\0\0(e\0\0@P\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\x84P\0\0\0\0\0\0NSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE\0(e\0\0\x9CP\0\0\0\0\0\0\0\0\0\xB4P\0\0\0\0\0\0NSt3__29__num_putIcEE\0\0\0\xA4d\0\0\xBCP\0\0NSt3__214__num_put_baseE\0\0\0\0\0\0\0\0\fQ\0\0\x98\0\0\0\xFA\0\0\0v\0\0\0\xFB\0\0\0\xFC\0\0\0\xFD\0\0\0\xFE\0\0\0\xFF\0\0\0\0\0\0\0\0\0\0(e\0\0,Q\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0pQ\0\0\0\0\0\0NSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE\0(e\0\0\x88Q\0\0\0\0\0\0\0\0\0\xB4P\0\0\0\0\0\0NSt3__29__num_putIwEE\0\0\0\0\0\0\0\xF4Q\0\0\0\0\0\0v\0\0\0\0\0\0\0\x07\0\0\b\0\0 \0\0
- \0\0\v\0\0\xF8\xFF\xFF\xFF\xF4Q\0\0\f\0\0\r\0\0\0\0\0\0\0\0\0\0\0\0(e\0\0R\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0dR\0\0\0\0\0\x80R\0\0\0\b\0\0NSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE\0\0\0\0\xA4d\0\0lR\0\0NSt3__29time_baseE\0\0\xA4d\0\0\x88R\0\0NSt3__220__time_get_c_storageIcEE\0\0\0\0\0\0\0\0S\0\0\0\0\0\0v\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x1B\0\0\xF8\xFF\xFF\xFF\0S\0\0\0\0\0\0\0\0\0\0 \0\0!\0\0"\0\0(e\0\0(S\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0dR\0\0\0\0\0pS\0\0\0\b\0\0NSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE\0\0\0\0\xA4d\0\0xS\0\0NSt3__220__time_get_c_storageIwEE\0\0\0\0\0\0\0\xB4S\0\0#\0\0$\0\0v\0\0\0%\0\0(e\0\0\xD4S\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0T\0\0\0\b\0\0NSt3__28time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE\0\0\0\0\xA4d\0\0$T\0\0NSt3__210__time_putE\0\0\0\0\0\0\0\0TT\0\0&\0\0'\0\0v\0\0\0(\0\0(e\0\0tT\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0T\0\0\0\b\0\0NSt3__28time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE\0\0\0\0\0\0\0\0\xF4T\0\0\x98\0\0\0)\0\0v\0\0\0*\0\0+\0\0,\0\0-\0\0.\0\0/\0\x000\0\x001\0\x002\0\0(e\0\0U\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\x000U\0\0\0\0\0NSt3__210moneypunctIcLb0EEE\0\xA4d\0\x008U\0\0NSt3__210money_baseE\0\0\0\0\0\0\0\0\x88U\0\0\x98\0\0\x003\0\0v\0\0\x004\0\x005\0\x006\0\x007\0\x008\0\x009\0\0:\0\0;\0\0<\0\0(e\0\0\xA8U\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\x000U\0\0\0\0\0NSt3__210moneypunctIcLb1EEE\0\0\0\0\0\xFCU\0\0\x98\0\0\0=\0\0v\0\0\0>\0\0?\0\0@\0\0A\0\0B\0\0C\0\0D\0\0E\0\0F\0\0(e\0\0V\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\x000U\0\0\0\0\0NSt3__210moneypunctIwLb0EEE\0\0\0\0\0pV\0\0\x98\0\0\0G\0\0v\0\0\0H\0\0I\0\0J\0\0K\0\0L\0\0M\0\0N\0\0O\0\0P\0\0(e\0\0\x90V\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\x000U\0\0\0\0\0NSt3__210moneypunctIwLb1EEE\0\0\0\0\0\xC8V\0\0\x98\0\0\0Q\0\0v\0\0\0R\0\0S\0\0(e\0\0\xE8V\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\x000W\0\0\0\0\0\0NSt3__29money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE\0\0\0\xA4d\0\x008W\0\0NSt3__211__money_getIcEE\0\0\0\0\0\0\0\0pW\0\0\x98\0\0\0T\0\0v\0\0\0U\0\0V\0\0(e\0\0\x90W\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\xD8W\0\0\0\0\0\0NSt3__29money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE\0\0\0\xA4d\0\0\xE0W\0\0NSt3__211__money_getIwEE\0\0\0\0\0\0\0\0X\0\0\x98\0\0\0W\0\0v\0\0\0X\0\0Y\0\0(e\0\x008X\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\x80X\0\0\0\0\0\0NSt3__29money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE\0\0\0\xA4d\0\0\x88X\0\0NSt3__211__money_putIcEE\0\0\0\0\0\0\0\0\xC0X\0\0\x98\0\0\0Z\0\0v\0\0\0[\0\0\\\0\0(e\0\0\xE0X\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0(Y\0\0\0\0\0\0NSt3__29money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE\0\0\0\xA4d\0\x000Y\0\0NSt3__211__money_putIwEE\0\0\0\0\0\0\0\0lY\0\0\x98\0\0\0]\0\0v\0\0\0^\0\0_\0\0\`\0\0(e\0\0\x8CY\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\xA4Y\0\0\0\0\0NSt3__28messagesIcEE\0\0\0\0\xA4d\0\0\xACY\0\0NSt3__213messages_baseE\0\0\0\0\0\xE4Y\0\0\x98\0\0\0a\0\0v\0\0\0b\0\0c\0\0d\0\0(e\0\0Z\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\xA4Y\0\0\0\0\0NSt3__28messagesIwEE\0\0\0\0S\0\0\0u\0\0\0n\0\0\0d\0\0\0a\0\0\0y\0\0\0\0\0\0\0M\0\0\0o\0\0\0n\0\0\0d\0\0\0a\0\0\0y\0\0\0\0\0\0\0T\0\0\0u\0\0\0e\0\0\0s\0\0\0d\0\0\0a\0\0\0y\0\0\0\0\0\0\0W\0\0\0e\0\0\0d\0\0\0n\0\0\0e\0\0\0s\0\0\0d\0\0\0a\0\0\0y\0\0\0\0\0\0\0T\0\0\0h\0\0\0u\0\0\0r\0\0\0s\0\0\0d\0\0\0a\0\0\0y\0\0\0\0\0\0\0F\0\0\0r\0\0\0i\0\0\0d\0\0\0a\0\0\0y\0\0\0\0\0\0\0S\0\0\0a\0\0\0t\0\0\0u\0\0\0r\0\0\0d\0\0\0a\0\0\0y\0\0\0\0\0\0\0S\0\0\0u\0\0\0n\0\0\0\0\0\0\0M\0\0\0o\0\0\0n\0\0\0\0\0\0\0T\0\0\0u\0\0\0e\0\0\0\0\0\0\0W\0\0\0e\0\0\0d\0\0\0\0\0\0\0T\0\0\0h\0\0\0u\0\0\0\0\0\0\0F\0\0\0r\0\0\0i\0\0\0\0\0\0\0S\0\0\0a\0\0\0t\0\0\0\0\0\0\0J\0\0\0a\0\0\0n\0\0\0u\0\0\0a\0\0\0r\0\0\0y\0\0\0\0\0\0\0F\0\0\0e\0\0\0b\0\0\0r\0\0\0u\0\0\0a\0\0\0r\0\0\0y\0\0\0\0\0\0\0M\0\0\0a\0\0\0r\0\0\0c\0\0\0h\0\0\0\0\0\0\0A\0\0\0p\0\0\0r\0\0\0i\0\0\0l\0\0\0\0\0\0\0M\0\0\0a\0\0\0y\0\0\0\0\0\0\0J\0\0\0u\0\0\0n\0\0\0e\0\0\0\0\0\0\0J\0\0\0u\0\0\0l\0\0\0y\0\0\0\0\0\0\0A\0\0\0u\0\0\0g\0\0\0u\0\0\0s\0\0\0t\0\0\0\0\0\0\0S\0\0\0e\0\0\0p\0\0\0t\0\0\0e\0\0\0m\0\0\0b\0\0\0e\0\0\0r\0\0\0\0\0\0\0O\0\0\0c\0\0\0t\0\0\0o\0\0\0b\0\0\0e\0\0\0r\0\0\0\0\0\0\0N\0\0\0o\0\0\0v\0\0\0e\0\0\0m\0\0\0b\0\0\0e\0\0\0r\0\0\0\0\0\0\0D\0\0\0e\0\0\0c\0\0\0e\0\0\0m\0\0\0b\0\0\0e\0\0\0r\0\0\0\0\0\0\0J\0\0\0a\0\0\0n\0\0\0\0\0\0\0F\0\0\0e\0\0\0b\0\0\0\0\0\0\0M\0\0\0a\0\0\0r\0\0\0\0\0\0\0A\0\0\0p\0\0\0r\0\0\0\0\0\0\0J\0\0\0u\0\0\0n\0\0\0\0\0\0\0J\0\0\0u\0\0\0l\0\0\0\0\0\0\0A\0\0\0u\0\0\0g\0\0\0\0\0\0\0S\0\0\0e\0\0\0p\0\0\0\0\0\0\0O\0\0\0c\0\0\0t\0\0\0\0\0\0\0N\0\0\0o\0\0\0v\0\0\0\0\0\0\0D\0\0\0e\0\0\0c\0\0\0\0\0\0\0A\0\0\0M\0\0\0\0\0\0\0P\0\0\0M\0A\x94\xBB\v\x98
- \0\0\0d\0\0\0\xE8\0\0'\0\0\xA0\x86\0@B\0\x80\x96\x98\0\0\xE1\xF5\0\xCA\x9A;\0\0\0\0\0\0\0\x0000010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899\0\0\0\0\0\0\0\x00000000010010001101000101011001111000100110101011110011011110111100010203040506071011121314151617202122232425262730313233343536374041424344454647505152535455565760616263646566677071727374757677000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff\0\0\0\0\0\0\0\0
- \0\0\0\0\0\0\0d\0\0\0\0\0\0\0\xE8\0\0\0\0\0\0'\0\0\0\0\0\0\xA0\x86\0\0\0\0\0@B\0\0\0\0\0\x80\x96\x98\0\0\0\0\0\0\xE1\xF5\0\0\0\0\0\xCA\x9A;\0\0\0\0\0\xE4\vT\0\0\0\0\xE8vH\0\0\0\0\xA5\xD4\xE8\0\0\0\0\xA0rN \0\0\0@z\xF3Z\0\0\0\x80\xC6\xA4~\x8D\0\0\0\xC1o\xF2\x86#\0\0\0\x8A]xEc\0\0d\xA7\xB3\xB6\xE0\r\0\0\xE8\x89#\xC7\x8A\xA4d\0\0\xF8a\0\0NSt3__214__shared_countE\0\0\0\0hf\0\0\xCCd\0\0$b\0\0\x98e\0\0N10__cxxabiv116__shim_type_infoE\0\0\0\0\xCCd\0\0Tb\0\0b\0\0N10__cxxabiv117__class_type_infoE\0\0\0\xCCd\0\0\x84b\0\0b\0\0N10__cxxabiv117__pbase_type_infoE\0\0\0\xCCd\0\0\xB4b\0\0xb\0\0N10__cxxabiv119__pointer_type_infoE\0\xCCd\0\0\xE4b\0\0b\0\0N10__cxxabiv120__function_type_infoE\0\0\0\0\xCCd\0\0c\0\0xb\0\0N10__cxxabiv129__pointer_to_member_type_infoE\0\0\0\0\0\0\0dc\0\0g\0\0h\0\0i\0\0j\0\0k\0\0\xCCd\0\0pc\0\0b\0\0N10__cxxabiv123__fundamental_type_infoE\0Pc\0\0\xA0c\0\0v\0Dn\0\0\0\0Pc\0\0\xB0c\0\0b\0\0\0Pc\0\0\xBCc\0\0c\0\0\0Pc\0\0\xC8c\0\0h\0\0\0Pc\0\0\xD4c\0\0a\0\0\0Pc\0\0\xE0c\0\0s\0\0\0Pc\0\0\xECc\0\0t\0\0\0Pc\0\0\xF8c\0\0i\0\0\0Pc\0\0d\0\0j\0\0\0Pc\0\0d\0\0l\0\0\0Pc\0\0d\0\0m\0\0\0Pc\0\0(d\0\0x\0\0\0Pc\0\x004d\0\0y\0\0\0Pc\0\0@d\0\0f\0\0\0Pc\0\0Ld\0\0d\0\0\0\0\0\0\0ld\0\0g\0\0l\0\0i\0\0j\0\0m\0\0\xCCd\0\0xd\0\0b\0\0N10__cxxabiv116__enum_type_infoE\0\0\0\0\0\0\0\0Hb\0\0g\0\0n\0\0i\0\0j\0\0o\0\0p\0\0q\0\0r\0\0\0\0\0\0\xECd\0\0g\0\0s\0\0i\0\0j\0\0o\0\0t\0\0u\0\0v\0\0\xCCd\0\0\xF8d\0\0Hb\0\0N10__cxxabiv120__si_class_type_infoE\0\0\0\0\0\0\0\0He\0\0g\0\0w\0\0i\0\0j\0\0o\0\0x\0\0y\0\0z\0\0\xCCd\0\0Te\0\0Hb\0\0N10__cxxabiv121__vmi_class_type_infoE\0\0\0\0\0\0\0\xA8b\0\0g\0\0{\0\0i\0\0j\0\0|\0\0\xA4d\0\0\xA0e\0\0St9type_info\0A\xB1\xCB\v\b \0\0\0\0\0\0\0A\xC4\xCB\v1\0A\xDC\xCB\v2\0\0\x003\0\0\0\xF8g\0\0\0\0A\xF4\xCB\v\0A\x84\xCC\v\xFF\xFF\xFF\xFF
- \0A\xC8\xCC\v!\xB8e\0\0@v\0%m/%d/%y\0\0\0\b%H:%M:%S\0\0\0\b\0A\xF4\xCC\ve\0A\x8C\xCD\v
- 2\0\0\0f\0\x004v\0A\xA4\xCD\v\0A\xB4\xCD\v\b\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0A\xF8\xCD\vhf`)),ue((await k(ne)).instance))})(),(function(){function ue(){var ne;if(r.calledRun=!0,!m){if(T=!0,sx.H(),y?.(r),(ne=r.onRuntimeInitialized)==null||ne.call(r),r.postRun)for(typeof r.postRun=="function"&&(r.postRun=[r.postRun]);r.postRun.length;){var xe=r.postRun.shift();F.push(xe)}U(F)}}if(r.preRun)for(typeof r.preRun=="function"&&(r.preRun=[r.preRun]);r.preRun.length;)q();U(H),r.setStatus?(r.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>r.setStatus(""),1),ue()},1)):ue()})(),T?o=r:o=new Promise((ue,ne)=>{y=ue,x=ne}),o}var hv=(e,t,n)=>{let i=e.vf32_ptr(t),o=t.size(),r=i>>2,a=e.HEAPF32.slice(r,r+o);if(n!==void 0)for(let s=0;s<o;s++)a[s]=n(a[s]);return a},$5e=e=>1/(1+Math.exp(-e)),J5e=e=>t=>t*e+.5,Z5e=(e,t,n)=>{let i=n?.colorScaleFactor??.282;return{numPoints:t.numPoints,shDegree:t.shDegree,antialiased:t.antialiased,positions:hv(e,t.positions),scales:hv(e,t.scales,Math.exp),rotations:hv(e,t.rotations),alphas:hv(e,t.alphas,$5e),colors:hv(e,t.colors,J5e(i)),sh:hv(e,t.sh)}},e9e=(e,t)=>{e._free(e.vf32_ptr(t.positions)),e._free(e.vf32_ptr(t.scales)),e._free(e.vf32_ptr(t.rotations)),e._free(e.vf32_ptr(t.alphas)),e._free(e.vf32_ptr(t.colors)),e._free(e.vf32_ptr(t.sh))},Vde=async(e,t)=>{var n;let i=await Q5e(),o=e instanceof Uint8Array?e:new Uint8Array(e),r=null;try{if(r=i._malloc(Uint8Array.BYTES_PER_ELEMENT*o.length),r===null)throw new Error("couldn't allocate memory");i.HEAPU8.set(o,r/Uint8Array.BYTES_PER_ELEMENT);let a=i.CoordinateSystem[((n=t?.unpackOptions)==null?void 0:n.coordinateSystem)??"UNSPECIFIED"],s=i.load_spz(r,o.length,{coordinateSystem:a}),c=Z5e(i,s,t);return e9e(i,s),c}catch(a){throw a}finally{r!==null&&i._free(r)}};var t9e=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var n9e=[0,9,24,45],i9e=14,o9e=1.6*1024*1024*1024;function r9e(e,t){let n=t?.attributes;if(!l(n))return;let i=n.POSITION;if(!l(i))return;let o=e?.accessors?.[i];if(!l(o)||o.count<=0)return;let r=0;for(let a in n)if(Object.prototype.hasOwnProperty.call(n,a)){let s=/SH_DEGREE_(\d+)_COEF_/.exec(a);s&&(r=Math.max(r,parseInt(s[1],10)))}return{numPoints:o.count,shDegree:r}}function a9e(e,t){let n=i9e+(n9e[t]??0);return e*n*Float32Array.BYTES_PER_ELEMENT*2}var fX=class extends qi{constructor(t){super(),t=t??G.EMPTY_OBJECT;let n=t.resourceCache,i=t.gltf,o=t.primitive,r=t.spz,a=t.gltfResource,s=t.baseResource,c=t.cacheKey;this._resourceCache=n,this._gltfResource=a,this._baseResource=s,this._gltf=i,this._primitive=o,this._spz=r,this._cacheKey=c,this._bufferViewLoader=void 0,this._bufferViewTypedArray=void 0,this._decodePromise=void 0,this._decodedData=void 0,this._state=gt.UNLOADED,this._promise=void 0,this._spzError=void 0}get cacheKey(){return this._cacheKey}get decodedData(){return this._decodedData}async load(){return l(this._promise)?this._promise:(this._state=gt.LOADING,this._promise=s9e(this),this._promise)}process(t){if(this._state===gt.READY)return!0;if(this._state!==gt.PROCESSING||(l(this._spzError)&&dX(this,this._spzError),!l(this._bufferViewTypedArray))||l(this._decodePromise))return!1;let n=r9e(this._gltf,this._primitive);if(l(n)){let o=a9e(n.numPoints,n.shDegree);if(o>o9e){let r=Math.round(o/1048576);return dX(this,new re(`SPZ data too large to decode: ${n.numPoints.toLocaleString()} splats with spherical harmonics degree ${n.shDegree} would require approximately ${r} MB, which exceeds the WASM memory limit. Consider using a lower spherical harmonics degree or splitting the dataset into smaller tiles.`)),!1}}let i=Vde(this._bufferViewTypedArray,{unpackOptions:{coordinateSystem:"UNSPECIFIED"}});if(!l(i))return!1;this._decodePromise=c9e(this,i)}unload(){l(this._bufferViewLoader)&&this._resourceCache.unload(this._bufferViewLoader),this._bufferViewLoader=void 0,this._bufferViewTypedArray=void 0,this._decodedData=void 0,this._gltf=void 0,this._primitive=void 0}};async function s9e(e){let t=e._resourceCache;try{let n=t.getBufferViewLoader({gltf:e._gltf,bufferViewId:0,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._bufferViewLoader=n,await n.load(),e.isDestroyed()?void 0:(e._bufferViewTypedArray=n.typedArray,e._state=gt.PROCESSING,e)}catch(n){if(e.isDestroyed())return;dX(e,n)}}function dX(e,t){throw e.unload(),e._state=gt.FAILED,e.getError("Failed to load SPZ",t)}async function c9e(e,t){try{let n=await t;return e.isDestroyed()?void 0:(e.unload(),e._decodedData={gcloud:n},e._state=gt.READY,e._baseResource)}catch(n){if(e.isDestroyed())return;e._spzError=n}}var pM=fX;function gM(e){e=e??G.EMPTY_OBJECT;let t=e.id,n=e.properties??{},i={};for(let o in n)if(n.hasOwnProperty(o)){let r=n[o];l(r.semantic)&&(i[r.semantic]=r)}this._id=t,this._name=e.name,this._description=e.description,this._properties=n,this._propertiesBySemantic=i,this._extras=We(e.extras,!0),this._extensions=We(e.extensions,!0)}gM.fromJson=function(e){e=e??G.EMPTY_OBJECT;let t=e.id,n=e.class,i={};for(let o in n.properties)if(n.properties.hasOwnProperty(o)){let r=yp.fromJson({id:o,property:n.properties[o],enums:e.enums});i[o]=r}return new gM({id:t,name:n.name,description:n.description,properties:i,extras:n.extras,extensions:n.extensions})};Object.defineProperties(gM.prototype,{properties:{get:function(){return this._properties}},propertiesBySemantic:{get:function(){return this._propertiesBySemantic}},id:{get:function(){return this._id}},name:{get:function(){return this._name}},description:{get:function(){return this._description}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});gM.BATCH_TABLE_CLASS_NAME="_batchTable";var Kh=gM;function fj(e){e=e??G.EMPTY_OBJECT;let t=e.value,n=e.name;this._value=t,this._name=n,this._description=e.description,this._extras=We(e.extras,!0),this._extensions=We(e.extensions,!0)}fj.fromJson=function(e){return new fj({value:e.value,name:e.name,description:e.description,extras:e.extras,extensions:e.extensions})};Object.defineProperties(fj.prototype,{value:{get:function(){return this._value}},name:{get:function(){return this._name}},description:{get:function(){return this._description}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});var _M=fj;function dj(e){e=e??G.EMPTY_OBJECT;let t=e.id,n=e.values,i={},o={},r=n.length;for(let s=0;s<r;++s){let c=n[s];i[c.value]=c.name,o[c.name]=c.value}let a=e.valueType??Dt.UINT16;this._values=n,this._namesByValue=i,this._valuesByName=o,this._valueType=a,this._id=t,this._name=e.name,this._description=e.description,this._extras=We(e.extras,!0),this._extensions=We(e.extensions,!0)}dj.fromJson=function(e){e=e??G.EMPTY_OBJECT;let t=e.id,n=e.enum,i=n.values.map(function(o){return _M.fromJson(o)});return new dj({id:t,values:i,valueType:Dt[n.valueType],name:n.name,description:n.description,extras:n.extras,extensions:n.extensions})};Object.defineProperties(dj.prototype,{values:{get:function(){return this._values}},namesByValue:{get:function(){return this._namesByValue}},valuesByName:{get:function(){return this._valuesByName}},valueType:{get:function(){return this._valueType}},id:{get:function(){return this._id}},name:{get:function(){return this._name}},description:{get:function(){return this._description}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});var AM=dj;function hj(e){e=e??G.EMPTY_OBJECT;let t=e.classes??{},n=e.enums??{};this._classes=t,this._enums=n,this._id=e.id,this._name=e.name,this._description=e.description,this._version=e.version,this._extras=We(e.extras,!0),this._extensions=We(e.extensions,!0)}hj.fromJson=function(e){let t={};if(l(e.enums))for(let i in e.enums)e.enums.hasOwnProperty(i)&&(t[i]=AM.fromJson({id:i,enum:e.enums[i]}));let n={};if(l(e.classes))for(let i in e.classes)e.classes.hasOwnProperty(i)&&(n[i]=Kh.fromJson({id:i,class:e.classes[i],enums:t}));return new hj({id:e.id,name:e.name,description:e.description,version:e.version,classes:n,enums:t,extras:e.extras,extensions:e.extensions})};Object.defineProperties(hj.prototype,{classes:{get:function(){return this._classes}},enums:{get:function(){return this._enums}},id:{get:function(){return this._id}},name:{get:function(){return this._name}},description:{get:function(){return this._description}},version:{get:function(){return this._version}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});var Xl=hj;var hX=class extends qi{constructor(t){super(),t=t??G.EMPTY_OBJECT;let n=t.schema,i=t.resource,o=t.cacheKey;this._schema=l(n)?Xl.fromJson(n):void 0,this._resource=i,this._cacheKey=o,this._state=gt.UNLOADED,this._promise=void 0}get cacheKey(){return this._cacheKey}get schema(){return this._schema}async load(){return l(this._promise)?this._promise:l(this._schema)?(this._promise=Promise.resolve(this),this._promise):(this._promise=l9e(this),this._promise)}unload(){this._schema=void 0}};async function l9e(e){let t=e._resource;e._state=gt.LOADING;try{let n=await t.fetchJson();return e.isDestroyed()?void 0:(e._schema=Xl.fromJson(n),e._state=gt.READY,e)}catch(n){if(e.isDestroyed())return;e._state=gt.FAILED;let i=`Failed to load schema: ${t.url}`;throw e.getError(i,n)}}var SA=hX;var Dd={};function mv(e){return hd(e.url)}function yM(e){let{byteOffset:t,byteLength:n}=e;if(Ci(e,"EXT_meshopt_compression")){let i=e.extensions.EXT_meshopt_compression;t=i.byteOffset??0,n=i.byteLength}return`${t}-${t+n}`}function u9e(e,t){let n=t.byteOffset+e.byteOffset,{componentType:i,type:o,count:r}=e;return`${n}-${i}-${o}-${r}`}function jde(e,t){return`${mv(e)}-buffer-id-${t}`}function pv(e,t,n,i){if(l(e.uri)){let o=i.getDerivedResource({url:e.uri});return mv(o)}return jde(n,t)}function mX(e,t,n,i){let o=t.bufferView,r=e.bufferViews[o],a=r.buffer,s=e.buffers[a],c=pv(s,a,n,i),u=yM(r);return`${c}-range-${u}`}function Gde(e,t,n,i){let r=e.bufferViews[0],a=r.buffer,s=e.buffers[a],c=pv(s,a,n,i),u=yM(r);return`${c}-range-${u}`}function Hde(e,t,n,i){let o=e.images[t],r=o.bufferView,a=o.uri;if(l(a)){let p=i.getDerivedResource({url:a});return mv(p)}let s=e.bufferViews[r],c=s.buffer,u=e.buffers[c],f=pv(u,c,n,i),d=yM(s);return`${f}-range-${d}`}function f9e(e,t){let n=Ru.createSampler({gltf:e,textureInfo:t});return`${n.wrapS}-${n.wrapT}-${n.minificationFilter}-${n.magnificationFilter}`}Dd.getSchemaCacheKey=function(e){let{schema:t,resource:n}=e;return l(t)?`embedded-schema:${JSON.stringify(t)}`:`external-schema:${mv(n)}`};Dd.getExternalBufferCacheKey=function(e){e=e??G.EMPTY_OBJECT;let{resource:t}=e;return`external-buffer:${mv(t)}`};Dd.getEmbeddedBufferCacheKey=function(e){e=e??G.EMPTY_OBJECT;let{parentResource:t,bufferId:n}=e;return`embedded-buffer:${jde(t,n)}`};Dd.getGltfCacheKey=function(e){e=e??G.EMPTY_OBJECT;let{gltfResource:t}=e;return`gltf:${mv(t)}`};Dd.getBufferViewCacheKey=function(e){e=e??G.EMPTY_OBJECT;let{gltf:t,bufferViewId:n,gltfResource:i,baseResource:o}=e,r=t.bufferViews[n],a=r.buffer,s=t.buffers[a];Ci(r,"EXT_meshopt_compression")&&(a=r.extensions.EXT_meshopt_compression.buffer);let c=pv(s,a,i,o),u=yM(r);return`buffer-view:${c}-range-${u}`};Dd.getDracoCacheKey=function(e){e=e??G.EMPTY_OBJECT;let{gltf:t,draco:n,gltfResource:i,baseResource:o}=e;return`draco:${mX(t,n,i,o)}`};Dd.getSpzCacheKey=function(e){e=e??G.EMPTY_OBJECT;let{gltf:t,primitive:n,gltfResource:i,baseResource:o}=e;return`spz:${Gde(t,n,i,o)}`};Dd.getVertexBufferCacheKey=function(e){e=e??G.EMPTY_OBJECT;let{gltf:t,gltfResource:n,baseResource:i,frameState:o,bufferViewId:r,draco:a,spz:s,attributeSemantic:c,dequantize:u=!1,loadBuffer:f=!1,loadTypedArray:d=!1}=e,p="";if(u&&(p+="-dequantize"),f&&(p+="-buffer",p+=`-context-${o.context.id}`),d&&(p+="-typed-array"),l(a))return`vertex-buffer:${mX(t,a,n,i)}-draco-${c}${p}`;if(s)return`vertex-buffer:${Gde(t,s,n,i)}-spz-${c}${p}`;let g=t.bufferViews[r],m=g.buffer,A=t.buffers[m],y=pv(A,m,n,i),x=yM(g);return`vertex-buffer:${y}-range-${x}${p}`};Dd.getIndexBufferCacheKey=function(e){e=e??G.EMPTY_OBJECT;let{gltf:t,accessorId:n,gltfResource:i,baseResource:o,frameState:r,draco:a,loadBuffer:s=!1,loadTypedArray:c=!1}=e,u="";if(s&&(u+="-buffer",u+=`-context-${r.context.id}`),c&&(u+="-typed-array"),l(a))return`index-buffer:${mX(t,a,i,o)}-draco${u}`;let f=t.accessors[n],d=f.bufferView,p=t.bufferViews[d],g=p.buffer,m=t.buffers[g],A=pv(m,g,i,o),y=u9e(f,p);return`index-buffer:${A}-accessor-${y}${u}`};Dd.getImageCacheKey=function(e){e=e??G.EMPTY_OBJECT;let{gltf:t,imageId:n,gltfResource:i,baseResource:o}=e;return`image:${Hde(t,n,i,o)}`};Dd.getTextureCacheKey=function(e){e=e??G.EMPTY_OBJECT;let{gltf:t,textureInfo:n,gltfResource:i,baseResource:o,supportedImageFormats:r,frameState:a}=e,s=n.index,c=Ru.getImageIdFromTexture({gltf:t,textureId:s,supportedImageFormats:r}),u=Hde(t,c,i,o),f=f9e(t,n);return`texture:${u}-sampler-${f}-context-${a.context.id}`};var Kl=Dd;function xM(){this.geometryByteLength=0,this.texturesByteLength=0,this._geometrySizes={},this._textureSizes={}}xM.prototype.clear=function(){this.geometryByteLength=0,this.texturesByteLength=0,this._geometrySizes={},this._textureSizes={}};xM.prototype.addGeometryLoader=function(e){let t=e.cacheKey;if(this._geometrySizes.hasOwnProperty(t))return;this._geometrySizes[t]=0;let n=e.buffer,i=e.typedArray,o=0;l(n)&&(o+=n.sizeInBytes),l(i)&&(o+=i.byteLength),this.geometryByteLength+=o,this._geometrySizes[t]=o};xM.prototype.addTextureLoader=function(e){let t=e.cacheKey;if(this._textureSizes.hasOwnProperty(t))return;this._textureSizes[t]=0;let n=e.texture.sizeInBytes;this.texturesByteLength+=e.texture.sizeInBytes,this._textureSizes[t]=n};xM.prototype.removeLoader=function(e){let t=e.cacheKey,n=this._geometrySizes[t];delete this._geometrySizes[t],l(n)&&(this.geometryByteLength-=n);let i=this._textureSizes[t];delete this._textureSizes[t],l(i)&&(this.texturesByteLength-=i)};var bM=xM;function Rn(){}Rn.cacheEntries={};Rn.statistics=new bM;function d9e(e){this.referenceCount=1,this.resourceLoader=e,this._statisticsPromise=void 0}Rn.get=function(e){let t=Rn.cacheEntries[e];if(l(t))return++t.referenceCount,t.resourceLoader};Rn.add=function(e){let t=e.cacheKey;return Rn.cacheEntries[t]=new d9e(e),e};Rn.unload=function(e){let t=e.cacheKey,n=Rn.cacheEntries[t];--n.referenceCount,n.referenceCount===0&&(Rn.statistics.removeLoader(e),e.destroy(),delete Rn.cacheEntries[t])};Rn.getSchemaLoader=function(e){e=e??G.EMPTY_OBJECT;let{schema:t,resource:n}=e,i=Kl.getSchemaCacheKey({schema:t,resource:n}),o=Rn.get(i);return l(o)?o:(o=new SA({schema:t,resource:n,cacheKey:i}),Rn.add(o))};Rn.getEmbeddedBufferLoader=function(e){e=e??G.EMPTY_OBJECT;let{parentResource:t,bufferId:n,typedArray:i}=e,o=Kl.getEmbeddedBufferCacheKey({parentResource:t,bufferId:n}),r=Rn.get(o);return l(r)?r:(r=new ub({typedArray:i,cacheKey:o}),Rn.add(r))};Rn.getExternalBufferLoader=function(e){e=e??G.EMPTY_OBJECT;let{resource:t}=e,n=Kl.getExternalBufferCacheKey({resource:t}),i=Rn.get(n);return l(i)?i:(i=new ub({resource:t,cacheKey:n}),Rn.add(i))};Rn.getGltfJsonLoader=function(e){e=e??G.EMPTY_OBJECT;let{gltfResource:t,baseResource:n,typedArray:i,gltfJson:o}=e,r=Kl.getGltfCacheKey({gltfResource:t}),a=Rn.get(r);return l(a)?a:(a=new sv({resourceCache:Rn,gltfResource:t,baseResource:n,typedArray:i,gltfJson:o,cacheKey:r}),Rn.add(a))};Rn.getBufferViewLoader=function(e){e=e??G.EMPTY_OBJECT;let{gltf:t,bufferViewId:n,gltfResource:i,baseResource:o}=e,r=Kl.getBufferViewCacheKey({gltf:t,bufferViewId:n,gltfResource:i,baseResource:o}),a=Rn.get(r);return l(a)?a:(a=new nv({resourceCache:Rn,gltf:t,bufferViewId:n,gltfResource:i,baseResource:o,cacheKey:r}),Rn.add(a))};Rn.getDracoLoader=function(e){e=e??G.EMPTY_OBJECT;let{gltf:t,primitive:n,draco:i,gltfResource:o,baseResource:r}=e,a=Kl.getDracoCacheKey({gltf:t,draco:i,gltfResource:o,baseResource:r}),s=Rn.get(a);return l(s)?s:(s=new iv({resourceCache:Rn,gltf:t,primitive:n,draco:i,gltfResource:o,baseResource:r,cacheKey:a}),Rn.add(s))};Rn.getSpzLoader=function(e){e=e??G.EMPTY_OBJECT;let{gltf:t,primitive:n,spz:i,gltfResource:o,baseResource:r}=e,a=Kl.getSpzCacheKey({gltf:t,primitive:n,gltfResource:o,baseResource:r}),s=Rn.get(a);return l(s)?s:(s=new pM({resourceCache:Rn,gltf:t,primitive:n,spz:i,gltfResource:o,baseResource:r,cacheKey:a}),Rn.add(s))};Rn.getVertexBufferLoader=function(e){e=e??G.EMPTY_OBJECT;let{gltf:t,gltfResource:n,baseResource:i,frameState:o,bufferViewId:r,primitive:a,draco:s,spz:c,attributeSemantic:u,accessorId:f,asynchronous:d=!0,dequantize:p=!1,loadBuffer:g=!1,loadTypedArray:m=!1}=e,A=Kl.getVertexBufferCacheKey({gltf:t,gltfResource:n,baseResource:i,frameState:o,bufferViewId:r,draco:s,spz:c,attributeSemantic:u,dequantize:p,loadBuffer:g,loadTypedArray:m}),y=Rn.get(A);return l(y)?y:(y=new dv({resourceCache:Rn,gltf:t,gltfResource:n,baseResource:i,bufferViewId:r,primitive:a,draco:s,spz:c,attributeSemantic:u,accessorId:f,cacheKey:A,asynchronous:d,dequantize:p,loadBuffer:g,loadTypedArray:m}),Rn.add(y))};Rn.getIndexBufferLoader=function(e){e=e??G.EMPTY_OBJECT;let{gltf:t,accessorId:n,gltfResource:i,baseResource:o,frameState:r,primitive:a,draco:s,asynchronous:c=!0,loadBuffer:u=!1,loadTypedArray:f=!1}=e,d=Kl.getIndexBufferCacheKey({gltf:t,accessorId:n,gltfResource:i,baseResource:o,frameState:r,draco:s,loadBuffer:u,loadTypedArray:f}),p=Rn.get(d);return l(p)?p:(p=new rv({resourceCache:Rn,gltf:t,accessorId:n,gltfResource:i,baseResource:o,primitive:a,draco:s,cacheKey:d,asynchronous:c,loadBuffer:u,loadTypedArray:f}),Rn.add(p))};Rn.getImageLoader=function(e){e=e??G.EMPTY_OBJECT;let{gltf:t,imageId:n,gltfResource:i,baseResource:o}=e,r=Kl.getImageCacheKey({gltf:t,imageId:n,gltfResource:i,baseResource:o}),a=Rn.get(r);return l(a)?a:(a=new ov({resourceCache:Rn,gltf:t,imageId:n,gltfResource:i,baseResource:o,cacheKey:r}),Rn.add(a))};Rn.getTextureLoader=function(e){e=e??G.EMPTY_OBJECT;let{gltf:t,textureInfo:n,gltfResource:i,baseResource:o,supportedImageFormats:r,frameState:a,asynchronous:s=!0}=e,c=Kl.getTextureCacheKey({gltf:t,textureInfo:n,gltfResource:i,baseResource:o,supportedImageFormats:r,frameState:a}),u=Rn.get(c);return l(u)?u:(u=new fv({resourceCache:Rn,gltf:t,textureInfo:n,gltfResource:i,baseResource:o,supportedImageFormats:r,cacheKey:c,asynchronous:s}),Rn.add(u))};Rn.clearForSpecs=function(){let e=[dv,rv,iv,fv,ov,nv,ub,SA,sv],t,n=Rn.cacheEntries,i=[];for(t in n)n.hasOwnProperty(t)&&i.push(n[t]);i.sort(function(r,a){let s=e.indexOf(r.resourceLoader.constructor),c=e.indexOf(a.resourceLoader.constructor);return s-c});let o=i.length;for(let r=0;r<o;++r){let a=i[r];t=a.resourceLoader.cacheKey,l(n[t])&&(a.resourceLoader.destroy(),delete n[t])}Rn.statistics.clear()};var Ii=Rn;function oc(e,t,n){this._resource=e,this._subtreeJson=void 0,this._bufferLoader=void 0,this._tileAvailability=void 0,this._contentAvailabilityBitstreams=[],this._childSubtreeAvailability=void 0,this._implicitCoordinates=n,this._subtreeLevels=t.subtreeLevels,this._subdivisionScheme=t.subdivisionScheme,this._branchingFactor=t.branchingFactor,this._metadata=void 0,this._tileMetadataTable=void 0,this._tilePropertyTableJson=void 0,this._contentMetadataTables=[],this._contentPropertyTableJsons=[],this._tileJumpBuffer=void 0,this._contentJumpBuffers=[],this._ready=!1}Object.defineProperties(oc.prototype,{ready:{get:function(){return this._ready}},metadata:{get:function(){return this._metadata}},tileMetadataTable:{get:function(){return this._tileMetadataTable}},tilePropertyTableJson:{get:function(){return this._tilePropertyTableJson}},contentMetadataTables:{get:function(){return this._contentMetadataTables}},contentPropertyTableJsons:{get:function(){return this._contentPropertyTableJsons}},implicitCoordinates:{get:function(){return this._implicitCoordinates}}});oc.prototype.tileIsAvailableAtIndex=function(e){return this._tileAvailability.getBit(e)};oc.prototype.tileIsAvailableAtCoordinates=function(e){let t=this.getTileIndex(e);return this.tileIsAvailableAtIndex(t)};oc.prototype.contentIsAvailableAtIndex=function(e,t){return t=t??0,this._contentAvailabilityBitstreams[t].getBit(e)};oc.prototype.contentIsAvailableAtCoordinates=function(e,t){let n=this.getTileIndex(e);return this.contentIsAvailableAtIndex(n,t)};oc.prototype.childSubtreeIsAvailableAtIndex=function(e){return this._childSubtreeAvailability.getBit(e)};oc.prototype.childSubtreeIsAvailableAtCoordinates=function(e){let t=this.getChildSubtreeIndex(e);return this.childSubtreeIsAvailableAtIndex(t)};oc.prototype.getLevelOffset=function(e){let t=this._branchingFactor;return(Math.pow(t,e)-1)/(t-1)};oc.prototype.getParentMortonIndex=function(e){let t=2;return this._subdivisionScheme===La.OCTREE&&(t=3),e>>t};oc.fromSubtreeJson=async function(e,t,n,i,o){let r=new oc(e,i,o),a;l(t)?a={json:t,binary:void 0}:a=h9e(n);let s=a.json;r._subtreeJson=s;let c;if(Ci(s,"3DTILES_metadata"))c=s.extensions["3DTILES_metadata"];else if(l(s.tileMetadata)){let b=s.tileMetadata;c=s.propertyTables[b]}let u=[];if(l(s.contentMetadata)){let b=s.contentMetadata.length;for(let C=0;C<b;C++){let E=s.contentMetadata[C];u.push(s.propertyTables[E])}}let f,d=i.metadataSchema,p=s.subtreeMetadata;if(l(p)){let b=p.class,C=d.classes[b];f=new eM({subtreeMetadata:p,class:C})}r._metadata=f,r._tilePropertyTableJson=c,r._contentPropertyTableJsons=u;let g={constant:0};s.contentAvailabilityHeaders=[],Ci(s,"3DTILES_multiple_contents")?s.contentAvailabilityHeaders=s.extensions["3DTILES_multiple_contents"].contentAvailability:Array.isArray(s.contentAvailability)?s.contentAvailabilityHeaders=s.contentAvailability:s.contentAvailabilityHeaders.push(s.contentAvailability??g);let m=m9e(s.buffers),A=p9e(s.bufferViews,m);g9e(s,A),l(c)&&Wde(c,A);for(let b=0;b<u.length;b++){let C=u[b];Wde(C,A)}let y=await _9e(r,m,a.binary),x=y9e(A,y);return x9e(r,s,i,x),l(c)&&(b9e(r,i,x),T9e(r)),C9e(r,i,x),E9e(r),r._ready=!0,r};function h9e(e){let n=new DataView(e.buffer,e.byteOffset),i=8,o=n.getUint32(i,!0);i+=8;let r=n.getUint32(i,!0);i+=8;let a=Cr(e,i,o);i+=o;let s=e.subarray(i,i+r);return{json:a,binary:s}}function m9e(e){e=l(e)?e:[];for(let t=0;t<e.length;t++){let n=e[t];n.isExternal=l(n.uri),n.isActive=!1}return e}function p9e(e,t){e=l(e)?e:[];for(let n=0;n<e.length;n++){let i=e[n],o=t[i.buffer];i.bufferHeader=o,i.isActive=!1}return e}function g9e(e,t){let n,i=e.tileAvailability;l(i.bitstream)?n=t[i.bitstream]:l(i.bufferView)&&(n=t[i.bufferView]),l(n)&&(n.isActive=!0,n.bufferHeader.isActive=!0);let o=e.contentAvailabilityHeaders;for(let a=0;a<o.length;a++)n=void 0,l(o[a].bitstream)?n=t[o[a].bitstream]:l(o[a].bufferView)&&(n=t[o[a].bufferView]),l(n)&&(n.isActive=!0,n.bufferHeader.isActive=!0);n=void 0;let r=e.childSubtreeAvailability;l(r.bitstream)?n=t[r.bitstream]:l(r.bufferView)&&(n=t[r.bufferView]),l(n)&&(n.isActive=!0,n.bufferHeader.isActive=!0)}function Wde(e,t){let n=e.properties,i;for(let o in n)if(n.hasOwnProperty(o)){let r=n[o],a=r.values??r.bufferView;i=t[a],i.isActive=!0,i.bufferHeader.isActive=!0;let s=r.stringOffsets??r.stringOffsetBufferView;l(s)&&(i=t[s],i.isActive=!0,i.bufferHeader.isActive=!0);let c=r.arrayOffsets??r.arrayOffsetBufferView;l(c)&&(i=t[c],i.isActive=!0,i.bufferHeader.isActive=!0)}}function _9e(e,t,n){let i=[];for(let o=0;o<t.length;o++){let r=t[o];if(!r.isActive)i.push(Promise.resolve(void 0));else if(r.isExternal){let a=A9e(e,r);i.push(a)}else i.push(Promise.resolve(n))}return Promise.all(i).then(function(o){let r={};for(let a=0;a<o.length;a++){let s=o[a];l(s)&&(r[a]=s)}return r})}async function A9e(e,t){let i=e._resource.getDerivedResource({url:t.uri}),o=Ii.getExternalBufferLoader({resource:i});e._bufferLoader=o;try{await o.load()}catch(r){if(o.isDestroyed())return;throw r}return o.typedArray}function y9e(e,t){let n={};for(let i=0;i<e.length;i++){let o=e[i];if(!o.isActive)continue;let r=o.byteOffset,a=r+o.byteLength,c=t[o.buffer].subarray(r,a);n[i]=c}return n}function x9e(e,t,n,i){let o=n.branchingFactor,r=n.subtreeLevels,a=(Math.pow(o,r)-1)/(o-1),s=Math.pow(o,r),c=Ci(t,"3DTILES_metadata"),u=l(e._tilePropertyTableJson),f=c||u;e._tileAvailability=pX(t.tileAvailability,i,a,f);let d=e._contentPropertyTableJsons.length>0;f=f||d;for(let p=0;p<t.contentAvailabilityHeaders.length;p++){let g=pX(t.contentAvailabilityHeaders[p],i,a,f);e._contentAvailabilityBitstreams.push(g)}e._childSubtreeAvailability=pX(t.childSubtreeAvailability,i,s)}function pX(e,t,n,i){if(l(e.constant))return new ev({constant:!!e.constant,lengthBits:n,availableCount:e.availableCount});let o;return l(e.bitstream)?o=t[e.bitstream]:l(e.bufferView)&&(o=t[e.bufferView]),new ev({bitstream:o,lengthBits:n,availableCount:e.availableCount,computeAvailableCountEnabled:i})}function b9e(e,t,n){let i=e._tilePropertyTableJson,o=e._tileAvailability.availableCount,r=t.metadataSchema,a=i.class,s=r.classes[a];e._tileMetadataTable=new wd({class:s,count:o,properties:i.properties,bufferViews:n})}function C9e(e,t,n){let i=e._contentPropertyTableJsons,o=e._contentAvailabilityBitstreams,r=t.metadataSchema,a=e._contentMetadataTables;for(let s=0;s<i.length;s++){let c=i[s],f=o[s].availableCount,d=c.class,p=r.classes[d],g=new wd({class:p,count:f,properties:c.properties,bufferViews:n});a.push(g)}}function qde(e){let t=0,n=e.lengthBits,i=e.availableCount,o;i<256?o=new Uint8Array(n):i<65536?o=new Uint16Array(n):o=new Uint32Array(n);for(let r=0;r<e.lengthBits;r++)e.getBit(r)&&(o[r]=t,t++);return o}function T9e(e){let t=qde(e._tileAvailability);e._tileJumpBuffer=t}function E9e(e){let t=e._contentJumpBuffers,n=e._contentAvailabilityBitstreams;for(let i=0;i<n.length;i++){let o=n[i],r=qde(o);t.push(r)}}oc.prototype.getTileIndex=function(e){let t=e.level-this._implicitCoordinates.level;if(t<0||this._subtreeLevels<=t)throw new re("level is out of bounds for this subtree");return e.getSubtreeCoordinates().getOffsetCoordinates(e).tileIndex};oc.prototype.getChildSubtreeIndex=function(e){if(e.level-this._implicitCoordinates.level!==this._implicitCoordinates.subtreeLevels)throw new re("level is out of bounds for this subtree");return e.getParentSubtreeCoordinates().getOffsetCoordinates(e).mortonIndex};function v9e(e,t){if(!l(e._tileMetadataTable))return;let n=e.getTileIndex(t);if(e._tileAvailability.getBit(n))return e._tileJumpBuffer[n]}function S9e(e,t,n){let i=e._contentMetadataTables;if(!l(i))return;let o=i[n];if(!l(o))return;let r=e._contentAvailabilityBitstreams[n],a=e.getTileIndex(t);if(r.getBit(a))return e._contentJumpBuffers[n][a]}oc.prototype.getTileMetadataView=function(e){let t=v9e(this,e);if(!l(t))return;let n=this._tileMetadataTable;return new tv({class:n.class,metadataTable:n,entityId:t,propertyTableJson:this._tilePropertyTableJson})};oc.prototype.getContentMetadataView=function(e,t){let n=S9e(this,e,t);if(!l(n))return;let i=this._contentMetadataTables[t],o=this._contentPropertyTableJsons[t];return new tv({class:i.class,metadataTable:i,entityId:n,contentIndex:t,propertyTableJson:o})};oc.prototype.isDestroyed=function(){return!1};oc.prototype.destroy=function(){return l(this._bufferLoader)&&Ii.unload(this._bufferLoader),fe(this)};var fg=oc;var Yde={ID:"ID",NAME:"NAME",DESCRIPTION:"DESCRIPTION",TILESET_TILE_COUNT:"TILESET_TILE_COUNT",TILE_BOUNDING_BOX:"TILE_BOUNDING_BOX",TILE_BOUNDING_REGION:"TILE_BOUNDING_REGION",TILE_BOUNDING_SPHERE:"TILE_BOUNDING_SPHERE",TILE_MINIMUM_HEIGHT:"TILE_MINIMUM_HEIGHT",TILE_MAXIMUM_HEIGHT:"TILE_MAXIMUM_HEIGHT",TILE_HORIZON_OCCLUSION_POINT:"TILE_HORIZON_OCCLUSION_POINT",TILE_GEOMETRIC_ERROR:"TILE_GEOMETRIC_ERROR",CONTENT_BOUNDING_BOX:"CONTENT_BOUNDING_BOX",CONTENT_BOUNDING_REGION:"CONTENT_BOUNDING_REGION",CONTENT_BOUNDING_SPHERE:"CONTENT_BOUNDING_SPHERE",CONTENT_MINIMUM_HEIGHT:"CONTENT_MINIMUM_HEIGHT",CONTENT_MAXIMUM_HEIGHT:"CONTENT_MAXIMUM_HEIGHT",CONTENT_HORIZON_OCCLUSION_POINT:"CONTENT_HORIZON_OCCLUSION_POINT"};Object.freeze(Yde);var Pd=Yde;var wA={};wA.parseAllBoundingVolumeSemantics=function(e,t){return{boundingVolume:wA.parseBoundingVolumeSemantic(e,t),minimumHeight:wA._parseMinimumHeight(e,t),maximumHeight:wA._parseMaximumHeight(e,t)}};wA.parseBoundingVolumeSemantic=function(e,t){let n=`${e}_BOUNDING_BOX`,i=t.getPropertyBySemantic(n);if(l(i))return{box:i};let o=`${e}_BOUNDING_REGION`,r=t.getPropertyBySemantic(o);if(l(r))return{region:r};let a=`${e}_BOUNDING_SPHERE`,s=t.getPropertyBySemantic(a);if(l(s))return{sphere:s}};wA._parseMinimumHeight=function(e,t){let n=`${e}_MINIMUM_HEIGHT`;return t.getPropertyBySemantic(n)};wA._parseMaximumHeight=function(e,t){let n=`${e}_MAXIMUM_HEIGHT`;return t.getPropertyBySemantic(n)};var IA=wA;var gv=class e{constructor(t,n,i){let o=n.implicitTileset,r=n.implicitCoordinates;this._implicitTileset=o,this._implicitCoordinates=r,this._implicitSubtree=void 0,this._tileset=t,this._tile=n,this._resource=i,this._metadata=void 0,this.featurePropertiesDirty=!1,this._group=void 0;let a=r.getTemplateValues(),s=o.subtreeUriTemplate.getDerivedResource({templateValues:a});this._url=s.getUrlComponent(!0),this._ready=!1}get featuresLength(){return 0}get pointsLength(){return 0}get trianglesLength(){return 0}get geometryByteLength(){return 0}get texturesByteLength(){return 0}get batchTableByteLength(){return 0}get innerContents(){}get ready(){return this._ready}get tileset(){return this._tileset}get tile(){return this._tile}get url(){return this._url}get metadata(){}set metadata(t){}get batchTable(){}get group(){return this._group}set group(t){this._group=t}static async fromSubtreeJson(t,n,i,o,r,a){a=a??0;let s;l(r)&&(s=new Uint8Array(r,a));let c=n.implicitTileset,u=n.implicitCoordinates,f=await fg.fromSubtreeJson(i,o,s,c,u),d=new e(t,n,i);return d._implicitSubtree=f,w9e(d,f),d._ready=!0,d}hasProperty(t,n){return!1}getFeature(t){}applyDebugSettings(t,n){}applyStyle(t){}update(t,n){}pick(t,n,i){}isDestroyed(){return!1}destroy(){return this._implicitSubtree=this._implicitSubtree&&this._implicitSubtree.destroy(),fe(this)}};function w9e(e,t){let n=e._tile,i=e._implicitCoordinates.childIndex,o=D9e(e,t,n,i),r=e._tileset.statistics;n.children.push(o.rootTile),r.numberOfTilesTotal++;let a=I9e(e,t,o.bottomRow);for(let s=0;s<a.length;s++){let c=a[s],u=c.tile,f=k9e(e,u,c.childIndex);u.children.push(f),r.numberOfTilesTotal++}}function I9e(e,t,n){let i=[],o=e._implicitTileset.branchingFactor;for(let r=0;r<n.length;r++){let a=n[r];if(l(a))for(let s=0;s<o;s++){let c=r*o+s;t.childSubtreeIsAvailableAtIndex(c)&&i.push({tile:a,childIndex:s})}}return i}function D9e(e,t,n,i){let a=Xde(e,t,n,i,0,!0),s=e._tileset.statistics,c=[a],u=[],f=e._implicitTileset;for(let d=1;d<f.subtreeLevels;d++){let p=t.getLevelOffset(d),g=f.branchingFactor*c.length;for(let m=0;m<g;m++){let A=p+m;if(!t.tileIsAvailableAtIndex(A)){u.push(void 0);continue}let y=t.getParentMortonIndex(m),x=c[y],b=m%f.branchingFactor,C=Xde(e,t,x,b,A);x.children.push(C),s.numberOfTilesTotal++,u.push(C)}c=u,u=[]}return{rootTile:a,bottomRow:c}}function Kde(e,t,n){let i=Pd.TILE_GEOMETRIC_ERROR;return l(e)&&e.hasPropertyBySemantic(i)?e.getPropertyBySemantic(i):t.geometricError/Math.pow(2,n.level)}function Xde(e,t,n,i,o,r){let a=e._implicitTileset,s;r??!1?s=n.implicitCoordinates:s=n.implicitCoordinates.getChildCoordinates(i);let c,u;l(t.tilePropertyTableJson)&&(c=t.getTileMetadataView(s),u=IA.parseAllBoundingVolumeSemantics("TILE",c));let d=t.contentPropertyTableJsons.length,p=!1;for(let S=0;S<d;S++)if(t.contentIsAvailableAtCoordinates(s,S)){p=!0;break}let g=O9e(a,s,i,r,n,u),m=[];for(let S=0;S<a.contentCount;S++){if(!t.contentIsAvailableAtIndex(o,S))continue;let R={uri:a.contentUriTemplates[S].getDerivedResource({templateValues:s.getTemplateValues()}).url},B;if(t.contentPropertyTableJsons.length>0){let _=t.getContentMetadataView(s,S);B=IA.parseAllBoundingVolumeSemantics("CONTENT",_)}let L=M9e(g,B);l(L)&&(R.boundingVolume=L),m.push(wt(R,a.contentHeaders[S]))}let A=Kde(c,a,s),y={boundingVolume:g,geometricError:A,refine:a.refine,contents:m},x=!0,b=We(a.tileHeader,x);delete b.boundingVolume,delete b.transform,delete b.metadata;let C=wt(y,b,x),E=ehe(e,a.baseResource,C,n);return E.implicitCoordinates=s,E.implicitSubtree=t,E.metadata=c,E.hasImplicitContentMetadata=p,E}function mj(e,t){return l(e)&&l(t)&&(l(t.minimumHeight)||l(t.maximumHeight))&&(Ci(e,"3DTILES_bounding_volume_S2")||l(e.region))}function _X(e,t){l(t)&&(Ci(e,"3DTILES_bounding_volume_S2")?R9e(e.extensions["3DTILES_bounding_volume_S2"],t.minimumHeight,t.maximumHeight):l(e.region)&&P9e(e.region,t.minimumHeight,t.maximumHeight))}function P9e(e,t,n){l(t)&&(e[4]=t),l(n)&&(e[5]=n)}function R9e(e,t,n){l(t)&&(e.minimumHeight=t),l(n)&&(e.maximumHeight=n)}function O9e(e,t,n,i,o,r){let a;return!l(r)||!l(r.boundingVolume)||!mj(r.boundingVolume,r)&&mj(e.boundingVolume,r)?a=Qde(e,t,n,i??!1,o):a=r.boundingVolume,_X(a,r),a}function M9e(e,t){let n;return l(t)&&(n=t.boundingVolume),mj(n,t)?_X(n,t):mj(e,t)&&(n=We(e,!0),_X(n,t)),n}function Qde(e,t,n,i,o){let r=e.boundingVolume;return Ci(r,"3DTILES_bounding_volume_S2")?$de(i,o,n,t.level,t.x,t.y,t.z):l(r.region)?{region:Zde(r.region,t.level,t.x,t.y,t.z)}:{box:Jde(r.box,t.level,t.x,t.y,t.z)}}function $de(e,t,n,i,o,r,a){let s=t._boundingVolume;if(e)return{extensions:{"3DTILES_bounding_volume_S2":{token:rg.getTokenFromId(s.s2Cell._cellId),minimumHeight:s.minimumHeight,maximumHeight:s.maximumHeight}}};let c=Number(t._boundingVolume.s2Cell._cellId>>BigInt(61)),u=c%2===0?JE.encode2D(i,o,r):JE.encode2D(i,r,o),f=rg.fromFacePositionLevel(c,BigInt(u),i),d,p;if(l(a)){let g=(s.maximumHeight+s.minimumHeight)/2;d=n<4?s.minimumHeight:g,p=n<4?g:s.maximumHeight}else d=s.minimumHeight,p=s.maximumHeight;return{extensions:{"3DTILES_bounding_volume_S2":{token:rg.getTokenFromId(f._cellId),minimumHeight:d,maximumHeight:p}}}}var B9e=new h,L9e=new h,gX=new h,N9e=new $;function Jde(e,t,n,i,o){if(t===0)return e;let r=h.unpack(e,0,L9e),a=$.unpack(e,3,N9e),s=Math.pow(2,-t),c=-1+(2*n+1)*s,u=-1+(2*i+1)*s,f=0,d=h.fromElements(s,s,1,B9e);l(o)&&(f=-1+(2*o+1)*s,d.z=s);let p=h.fromElements(c,u,f,gX);p=$.multiplyByVector(a,p,gX),p=h.add(p,r,gX);let g=$.clone(a);g=$.multiplyByScale(g,d,g);let m=new Array(12);return h.pack(p,m),$.pack(g,m,3),m}var F9e=new oe;function Zde(e,t,n,i,o){if(t===0)return e.slice();let r=oe.unpack(e,0,F9e),a=e[4],s=e[5],c=Math.pow(2,-t),u=c*r.width,f=D.negativePiToPi(r.west+n*u),d=D.negativePiToPi(f+u),p=c*r.height,g=D.negativePiToPi(r.south+i*p),m=D.negativePiToPi(g+p),A=a,y=s;if(l(o)){let x=c*(s-a);A+=o*x,y=A+x}return[f,g,d,m,A,y]}function k9e(e,t,n){let i=e._implicitTileset,o=t.implicitCoordinates.getChildCoordinates(n),r=Qde(i,o,n,!1,t),a=Kde(void 0,i,o),s=i.subtreeUriTemplate.getDerivedResource({templateValues:o.getTemplateValues()}).url,c={boundingVolume:r,geometricError:a,refine:i.refine,contents:[{uri:s}]},u=ehe(e,i.baseResource,c,t);return u.implicitTileset=i,u.implicitCoordinates=o,u}function ehe(e,t,n,i){let o=e._tile.constructor;return new o(e._tileset,t,n,i)}gv._deriveBoundingBox=Jde;gv._deriveBoundingRegion=Zde;gv._deriveBoundingVolumeS2=$de;var _v=gv;var the={NONE:0,REPEAT:1,MIRRORED_REPEAT:2};Object.freeze(the);var Ou=the;function Av(e,t){this._distance=t,this._normal=new nhe(e,this),this.onChangeCallback=void 0,this.index=-1}Object.defineProperties(Av.prototype,{distance:{get:function(){return this._distance},set:function(e){l(this.onChangeCallback)&&e!==this._distance&&this.onChangeCallback(this.index),this._distance=e}},normal:{get:function(){return this._normal},set:function(e){l(this.onChangeCallback)&&!h.equals(this._normal._cartesian3,e)&&this.onChangeCallback(this.index),h.clone(e,this._normal._cartesian3)}}});Av.fromPlane=function(e,t){return l(t)?(t.normal=e.normal,t.distance=e.distance):t=new Av(e.normal,e.distance),t};Av.clone=function(e,t){return l(t)?(t.normal=e.normal,t.distance=e.distance,t):new Av(e.normal,e.distance)};function nhe(e,t){this._clippingPlane=t,this._cartesian3=h.clone(e)}Object.defineProperties(nhe.prototype,{x:{get:function(){return this._cartesian3.x},set:function(e){l(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.x&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.x=e}},y:{get:function(){return this._cartesian3.y},set:function(e){l(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.y&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.y=e}},z:{get:function(){return this._cartesian3.z},set:function(e){l(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.z&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.z=e}}});var $a=Av;function rl(e){e=e??G.EMPTY_OBJECT,this._planes=[],this._dirtyIndex=-1,this._multipleDirtyPlanes=!1,this._enabled=e.enabled??!0,this.modelMatrix=M.clone(e.modelMatrix??M.IDENTITY),this.edgeColor=V.clone(e.edgeColor??V.WHITE),this.edgeWidth=e.edgeWidth??0,this.planeAdded=new ye,this.planeRemoved=new ye,this._owner=void 0;let t=e.unionClippingRegions??!1;this._unionClippingRegions=t,this._testIntersection=t?she:che,this._uint8View=void 0,this._float32View=void 0,this._clippingPlanesTexture=void 0;let n=e.planes;if(l(n)){let i=n.length;for(let o=0;o<i;++o)this.add(n[o])}}function she(e){return e===qt.OUTSIDE}function che(e){return e===qt.INSIDE}Object.defineProperties(rl.prototype,{length:{get:function(){return this._planes.length}},unionClippingRegions:{get:function(){return this._unionClippingRegions},set:function(e){this._unionClippingRegions!==e&&(this._unionClippingRegions=e,this._testIntersection=e?she:che)}},enabled:{get:function(){return this._enabled},set:function(e){this._enabled!==e&&(this._enabled=e)}},texture:{get:function(){return this._clippingPlanesTexture}},owner:{get:function(){return this._owner}},clippingPlanesState:{get:function(){return this._unionClippingRegions?this._planes.length:-this._planes.length}}});function ihe(e,t){e._multipleDirtyPlanes=e._multipleDirtyPlanes||e._dirtyIndex!==-1&&e._dirtyIndex!==t,e._dirtyIndex=t}rl.prototype.add=function(e){let t=this._planes.length,n=this;e.onChangeCallback=function(i){ihe(n,i)},e.index=t,ihe(this,t),this._planes.push(e),this.planeAdded.raiseEvent(e,t)};rl.prototype.get=function(e){return this._planes[e]};function lhe(e,t){let n=e.length;for(let i=0;i<n;++i)if(en.equals(e[i],t))return i;return-1}rl.prototype.contains=function(e){return lhe(this._planes,e)!==-1};rl.prototype.remove=function(e){let t=this._planes,n=lhe(t,e);if(n===-1)return!1;e instanceof $a&&(e.onChangeCallback=void 0,e.index=-1);let i=t.length-1;for(let o=n;o<i;++o){let r=t[o+1];t[o]=r,r instanceof $a&&(r.index=o)}return this._multipleDirtyPlanes=!0,t.length=i,this.planeRemoved.raiseEvent(e,n),!0};rl.prototype.removeAll=function(){let e=this._planes,t=e.length;for(let n=0;n<t;++n){let i=e[n];i instanceof $a&&(i.onChangeCallback=void 0,i.index=-1),this.planeRemoved.raiseEvent(i,n)}this._multipleDirtyPlanes=!0,this._planes=[]};var z9e=new se,U9e=new se;function ohe(e,t,n){let i=e._uint8View,o=e._planes,r=0;for(let a=t;a<n;++a){let s=o[a],c=nn.octEncodeToCartesian4(s.normal,U9e);i[r]=c.x,i[r+1]=c.y,i[r+2]=c.z,i[r+3]=c.w;let u=se.packFloat(s.distance,z9e);i[r+4]=u.x,i[r+5]=u.y,i[r+6]=u.z,i[r+7]=u.w,r+=8}}function rhe(e,t,n){let i=e._float32View,o=e._planes,r=0;for(let a=t;a<n;++a){let s=o[a],c=s.normal;i[r]=c.x,i[r+1]=c.y,i[r+2]=c.z,i[r+3]=s.distance,r+=4}}function uhe(e,t){let n=Rt.maximumTextureSize;return t.x=Math.min(e,n),t.y=Math.ceil(e/t.x),t}var V9e=new z;rl.prototype.update=function(e){let t=this._clippingPlanesTexture,n=e.context,i=rl.useFloatTexture(n),o=i?this.length:this.length*2;if(l(t)){let a=t.width*t.height;(a<o||o<.25*a)&&(t.destroy(),t=void 0,this._clippingPlanesTexture=void 0)}if(this.length===0)return;if(!l(t)){let a=uhe(o,V9e);a.y*=2,i?(t=new It({context:n,width:a.x,height:a.y,pixelFormat:Xe.RGBA,pixelDatatype:je.FLOAT,sampler:jt.NEAREST,flipY:!1}),this._float32View=new Float32Array(a.x*a.y*4)):(t=new It({context:n,width:a.x,height:a.y,pixelFormat:Xe.RGBA,pixelDatatype:je.UNSIGNED_BYTE,sampler:jt.NEAREST,flipY:!1}),this._uint8View=new Uint8Array(a.x*a.y*4)),this._clippingPlanesTexture=t,this._multipleDirtyPlanes=!0}let r=this._dirtyIndex;if(!(!this._multipleDirtyPlanes&&r===-1)){if(this._multipleDirtyPlanes)i?(rhe(this,0,this._planes.length),t.copyFrom({source:{width:t.width,height:t.height,arrayBufferView:this._float32View}})):(ohe(this,0,this._planes.length),t.copyFrom({source:{width:t.width,height:t.height,arrayBufferView:this._uint8View}}));else{let a=0,s=0;i?(s=Math.floor(r/t.width),a=Math.floor(r-s*t.width),rhe(this,r,r+1),t.copyFrom({source:{width:1,height:1,arrayBufferView:this._float32View},xOffset:a,yOffset:s})):(s=Math.floor(r*2/t.width),a=Math.floor(r*2-s*t.width),ohe(this,r,r+1),t.copyFrom({source:{width:2,height:1,arrayBufferView:this._uint8View},xOffset:a,yOffset:s}))}this._multipleDirtyPlanes=!1,this._dirtyIndex=-1}};var j9e=new M,ahe=new en(h.UNIT_X,0);rl.prototype.computeIntersectionWithBoundingVolume=function(e,t){let n=this._planes,i=n.length,o=this.modelMatrix;l(t)&&(o=M.multiply(t,o,j9e));let r=qt.INSIDE;!this.unionClippingRegions&&i>0&&(r=qt.OUTSIDE);for(let a=0;a<i;++a){let s=n[a];en.transform(s,o,ahe);let c=e.intersectPlane(ahe);if(c===qt.INTERSECTING)r=c;else if(this._testIntersection(c))return c}return r};rl.setOwner=function(e,t,n){e!==t[n]&&(t[n]=t[n]&&t[n].destroy(),l(e)&&(e._owner=t,t[n]=e))};rl.useFloatTexture=function(e){return e.floatingPointTexture};rl.getTextureResolution=function(e,t,n){let i=e.texture;if(l(i))return n.x=i.width,n.y=i.height,n;let o=rl.useFloatTexture(t)?e.length:e.length*2,r=uhe(o,n);return r.y*=2,r};rl.prototype.isDestroyed=function(){return!1};rl.prototype.destroy=function(){return this._clippingPlanesTexture=this._clippingPlanesTexture&&this._clippingPlanesTexture.destroy(),fe(this)};var ma=rl;function xX(e,t,n=2){let i=t&&t.length,o=i?t[0]*n:e.length,r=dhe(e,0,o,n,!0),a=[];if(!r||r.next===r.prev)return a;let s,c,u;if(i&&(r=Y9e(e,t,r,n)),e.length>80*n){s=e[0],c=e[1];let f=s,d=c;for(let p=n;p<o;p+=n){let g=e[p],m=e[p+1];g<s&&(s=g),m<c&&(c=m),g>f&&(f=g),m>d&&(d=m)}u=Math.max(f-s,d-c),u=u!==0?32767/u:0}return TM(r,a,n,s,c,u,0),a}function dhe(e,t,n,i,o){let r;if(o===o7e(e,t,n,i)>0)for(let a=t;a<n;a+=i)r=fhe(a/i|0,e[a],e[a+1],r);else for(let a=n-i;a>=t;a-=i)r=fhe(a/i|0,e[a],e[a+1],r);return r&&yv(r,r.next)&&(vM(r),r=r.next),r}function Ab(e,t){if(!e)return e;t||(t=e);let n=e,i;do if(i=!1,!n.steiner&&(yv(n,n.next)||pa(n.prev,n,n.next)===0)){if(vM(n),n=t=n.prev,n===n.next)break;i=!0}else n=n.next;while(i||n!==t);return t}function TM(e,t,n,i,o,r,a){if(!e)return;!a&&r&&J9e(e,i,o,r);let s=e;for(;e.prev!==e.next;){let c=e.prev,u=e.next;if(r?H9e(e,i,o,r):G9e(e)){t.push(c.i,e.i,u.i),vM(e),e=u.next,s=u.next;continue}if(e=u,e===s){a?a===1?(e=W9e(Ab(e),t),TM(e,t,n,i,o,r,2)):a===2&&q9e(e,t,n,i,o,r):TM(Ab(e),t,n,i,o,r,1);break}}}function G9e(e){let t=e.prev,n=e,i=e.next;if(pa(t,n,i)>=0)return!1;let o=t.x,r=n.x,a=i.x,s=t.y,c=n.y,u=i.y,f=Math.min(o,r,a),d=Math.min(s,c,u),p=Math.max(o,r,a),g=Math.max(s,c,u),m=i.next;for(;m!==t;){if(m.x>=f&&m.x<=p&&m.y>=d&&m.y<=g&&CM(o,s,r,c,a,u,m.x,m.y)&&pa(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function H9e(e,t,n,i){let o=e.prev,r=e,a=e.next;if(pa(o,r,a)>=0)return!1;let s=o.x,c=r.x,u=a.x,f=o.y,d=r.y,p=a.y,g=Math.min(s,c,u),m=Math.min(f,d,p),A=Math.max(s,c,u),y=Math.max(f,d,p),x=AX(g,m,t,n,i),b=AX(A,y,t,n,i),C=e.prevZ,E=e.nextZ;for(;C&&C.z>=x&&E&&E.z<=b;){if(C.x>=g&&C.x<=A&&C.y>=m&&C.y<=y&&C!==o&&C!==a&&CM(s,f,c,d,u,p,C.x,C.y)&&pa(C.prev,C,C.next)>=0||(C=C.prevZ,E.x>=g&&E.x<=A&&E.y>=m&&E.y<=y&&E!==o&&E!==a&&CM(s,f,c,d,u,p,E.x,E.y)&&pa(E.prev,E,E.next)>=0))return!1;E=E.nextZ}for(;C&&C.z>=x;){if(C.x>=g&&C.x<=A&&C.y>=m&&C.y<=y&&C!==o&&C!==a&&CM(s,f,c,d,u,p,C.x,C.y)&&pa(C.prev,C,C.next)>=0)return!1;C=C.prevZ}for(;E&&E.z<=b;){if(E.x>=g&&E.x<=A&&E.y>=m&&E.y<=y&&E!==o&&E!==a&&CM(s,f,c,d,u,p,E.x,E.y)&&pa(E.prev,E,E.next)>=0)return!1;E=E.nextZ}return!0}function W9e(e,t){let n=e;do{let i=n.prev,o=n.next.next;!yv(i,o)&&mhe(i,n,n.next,o)&&EM(i,o)&&EM(o,i)&&(t.push(i.i,n.i,o.i),vM(n),vM(n.next),n=e=o),n=n.next}while(n!==e);return Ab(n)}function q9e(e,t,n,i,o,r){let a=e;do{let s=a.next.next;for(;s!==a.prev;){if(a.i!==s.i&&t7e(a,s)){let c=phe(a,s);a=Ab(a,a.next),c=Ab(c,c.next),TM(a,t,n,i,o,r,0),TM(c,t,n,i,o,r,0);return}s=s.next}a=a.next}while(a!==e)}function Y9e(e,t,n,i){let o=[];for(let r=0,a=t.length;r<a;r++){let s=t[r]*i,c=r<a-1?t[r+1]*i:e.length,u=dhe(e,s,c,i,!1);u===u.next&&(u.steiner=!0),o.push(e7e(u))}o.sort(X9e);for(let r=0;r<o.length;r++)n=K9e(o[r],n);return n}function X9e(e,t){let n=e.x-t.x;if(n===0&&(n=e.y-t.y,n===0)){let i=(e.next.y-e.y)/(e.next.x-e.x),o=(t.next.y-t.y)/(t.next.x-t.x);n=i-o}return n}function K9e(e,t){let n=Q9e(e,t);if(!n)return t;let i=phe(n,e);return Ab(i,i.next),Ab(n,n.next)}function Q9e(e,t){let n=t,i=e.x,o=e.y,r=-1/0,a;if(yv(e,n))return n;do{if(yv(e,n.next))return n.next;if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){let d=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(d<=i&&d>r&&(r=d,a=n.x<n.next.x?n:n.next,d===i))return a}n=n.next}while(n!==t);if(!a)return null;let s=a,c=a.x,u=a.y,f=1/0;n=a;do{if(i>=n.x&&n.x>=c&&i!==n.x&&hhe(o<u?i:r,o,c,u,o<u?r:i,o,n.x,n.y)){let d=Math.abs(o-n.y)/(i-n.x);EM(n,e)&&(d<f||d===f&&(n.x>a.x||n.x===a.x&&$9e(a,n)))&&(a=n,f=d)}n=n.next}while(n!==s);return a}function $9e(e,t){return pa(e.prev,e,t.prev)<0&&pa(t.next,e,e.next)<0}function J9e(e,t,n,i){let o=e;do o.z===0&&(o.z=AX(o.x,o.y,t,n,i)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next;while(o!==e);o.prevZ.nextZ=null,o.prevZ=null,Z9e(o)}function Z9e(e){let t,n=1;do{let i=e,o;e=null;let r=null;for(t=0;i;){t++;let a=i,s=0;for(let u=0;u<n&&(s++,a=a.nextZ,!!a);u++);let c=n;for(;s>0||c>0&&a;)s!==0&&(c===0||!a||i.z<=a.z)?(o=i,i=i.nextZ,s--):(o=a,a=a.nextZ,c--),r?r.nextZ=o:e=o,o.prevZ=r,r=o;i=a}r.nextZ=null,n*=2}while(t>1);return e}function AX(e,t,n,i,o){return e=(e-n)*o|0,t=(t-i)*o|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function e7e(e){let t=e,n=e;do(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next;while(t!==e);return n}function hhe(e,t,n,i,o,r,a,s){return(o-a)*(t-s)>=(e-a)*(r-s)&&(e-a)*(i-s)>=(n-a)*(t-s)&&(n-a)*(r-s)>=(o-a)*(i-s)}function CM(e,t,n,i,o,r,a,s){return!(e===a&&t===s)&&hhe(e,t,n,i,o,r,a,s)}function t7e(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!n7e(e,t)&&(EM(e,t)&&EM(t,e)&&i7e(e,t)&&(pa(e.prev,e,t.prev)||pa(e,t.prev,t))||yv(e,t)&&pa(e.prev,e,e.next)>0&&pa(t.prev,t,t.next)>0)}function pa(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function yv(e,t){return e.x===t.x&&e.y===t.y}function mhe(e,t,n,i){let o=gj(pa(e,t,n)),r=gj(pa(e,t,i)),a=gj(pa(n,i,e)),s=gj(pa(n,i,t));return!!(o!==r&&a!==s||o===0&&pj(e,n,t)||r===0&&pj(e,i,t)||a===0&&pj(n,e,i)||s===0&&pj(n,t,i))}function pj(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function gj(e){return e>0?1:e<0?-1:0}function n7e(e,t){let n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&mhe(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}function EM(e,t){return pa(e.prev,e,e.next)<0?pa(e,t,e.next)>=0&&pa(e,e.prev,t)>=0:pa(e,t,e.prev)<0||pa(e,e.next,t)<0}function i7e(e,t){let n=e,i=!1,o=(e.x+t.x)/2,r=(e.y+t.y)/2;do n.y>r!=n.next.y>r&&n.next.y!==n.y&&o<(n.next.x-n.x)*(r-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next;while(n!==e);return i}function phe(e,t){let n=yX(e.i,e.x,e.y),i=yX(t.i,t.x,t.y),o=e.next,r=t.prev;return e.next=t,t.prev=e,n.next=o,o.prev=n,i.next=n,n.prev=i,r.next=i,i.prev=r,i}function fhe(e,t,n,i){let o=yX(e,t,n);return i?(o.next=i.next,o.prev=i,i.next.prev=o,i.next=o):(o.prev=o,o.next=o),o}function vM(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function yX(e,t,n){return{i:e,x:t,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function o7e(e,t,n,i){let o=0;for(let r=t,a=n-i;r<n;r+=i)o+=(e[a]-e[r])*(e[r+1]+e[a+1]),a=r;return o}var r7e=new h,a7e=new h,DA={};DA.computeArea2D=function(e){let t=e.length,n=0;for(let i=t-1,o=0;o<t;i=o++){let r=e[i],a=e[o];n+=r.x*a.y-a.x*r.y}return n*.5};DA.computeWindingOrder2D=function(e){return DA.computeArea2D(e)>0?Ya.COUNTER_CLOCKWISE:Ya.CLOCKWISE};DA.triangulate=function(e,t){let n=z.packArray(e);return xX(n,t,2)};var yhe=new h,xhe=new h,bhe=new h,ghe=new h,_he=new h,Ahe=new h,dg=new h,Che=new z,The=new z,Ehe=new z,xv=new z;DA.computeSubdivision=function(e,t,n,i,o){o=o??D.RADIANS_PER_DEGREE;let r=l(i),a=n.slice(0),s,c=t.length,u=new Array(c*3),f=new Array(c*2),d=0,p=0;for(s=0;s<c;s++){let C=t[s];if(u[d++]=C.x,u[d++]=C.y,u[d++]=C.z,r){let E=i[s];f[p++]=E.x,f[p++]=E.y}}let g=[],m={},A=e.maximumRadius,y=D.chordLength(o,A),x=y*y;for(;a.length>0;){let C=a.pop(),E=a.pop(),S=a.pop(),w=h.fromArray(u,S*3,yhe),P=h.fromArray(u,E*3,xhe),R=h.fromArray(u,C*3,bhe),B,L,_;r&&(B=z.fromArray(f,S*2,Che),L=z.fromArray(f,E*2,The),_=z.fromArray(f,C*2,Ehe));let T=h.multiplyByScalar(h.normalize(w,ghe),A,ghe),v=h.multiplyByScalar(h.normalize(P,_he),A,_he),I=h.multiplyByScalar(h.normalize(R,Ahe),A,Ahe),O=h.magnitudeSquared(h.subtract(T,v,dg)),N=h.magnitudeSquared(h.subtract(v,I,dg)),j=h.magnitudeSquared(h.subtract(I,T,dg)),k=Math.max(O,N,j),U,F,H;k>x?O===k?(U=`${Math.min(S,E)} ${Math.max(S,E)}`,s=m[U],l(s)||(F=h.add(w,P,dg),h.multiplyByScalar(F,.5,F),u.push(F.x,F.y,F.z),s=u.length/3-1,m[U]=s,r&&(H=z.add(B,L,xv),z.multiplyByScalar(H,.5,H),f.push(H.x,H.y))),a.push(S,s,C),a.push(s,E,C)):N===k?(U=`${Math.min(E,C)} ${Math.max(E,C)}`,s=m[U],l(s)||(F=h.add(P,R,dg),h.multiplyByScalar(F,.5,F),u.push(F.x,F.y,F.z),s=u.length/3-1,m[U]=s,r&&(H=z.add(L,_,xv),z.multiplyByScalar(H,.5,H),f.push(H.x,H.y))),a.push(E,s,S),a.push(s,C,S)):j===k&&(U=`${Math.min(C,S)} ${Math.max(C,S)}`,s=m[U],l(s)||(F=h.add(R,w,dg),h.multiplyByScalar(F,.5,F),u.push(F.x,F.y,F.z),s=u.length/3-1,m[U]=s,r&&(H=z.add(_,B,xv),z.multiplyByScalar(H,.5,H),f.push(H.x,H.y))),a.push(C,s,E),a.push(s,S,E)):(g.push(S),g.push(E),g.push(C))}let b={attributes:{position:new Me({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:u})},indices:g,primitiveType:Re.TRIANGLES};return r&&(b.attributes.st=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:f})),new At(b)};var s7e=new de,c7e=new de,l7e=new de,bX=new de;DA.computeRhumbLineSubdivision=function(e,t,n,i,o){o=o??D.RADIANS_PER_DEGREE;let r=l(i),a=n.slice(0),s,c=t.length,u=new Array(c*3),f=new Array(c*2),d=0,p=0;for(s=0;s<c;s++){let S=t[s];if(u[d++]=S.x,u[d++]=S.y,u[d++]=S.z,r){let w=i[s];f[p++]=w.x,f[p++]=w.y}}let g=[],m={},A=e.maximumRadius,y=D.chordLength(o,A),x=new wc(void 0,void 0,e),b=new wc(void 0,void 0,e),C=new wc(void 0,void 0,e);for(;a.length>0;){let S=a.pop(),w=a.pop(),P=a.pop(),R=h.fromArray(u,P*3,yhe),B=h.fromArray(u,w*3,xhe),L=h.fromArray(u,S*3,bhe),_,T,v;r&&(_=z.fromArray(f,P*2,Che),T=z.fromArray(f,w*2,The),v=z.fromArray(f,S*2,Ehe));let I=e.cartesianToCartographic(R,s7e),O=e.cartesianToCartographic(B,c7e),N=e.cartesianToCartographic(L,l7e);x.setEndPoints(I,O);let j=x.surfaceDistance;b.setEndPoints(O,N);let k=b.surfaceDistance;C.setEndPoints(N,I);let U=C.surfaceDistance,F=Math.max(j,k,U),H,q,J,W,Z;F>y?j===F?(H=`${Math.min(P,w)} ${Math.max(P,w)}`,s=m[H],l(s)||(q=x.interpolateUsingFraction(.5,bX),J=(I.height+O.height)*.5,W=h.fromRadians(q.longitude,q.latitude,J,e,dg),u.push(W.x,W.y,W.z),s=u.length/3-1,m[H]=s,r&&(Z=z.add(_,T,xv),z.multiplyByScalar(Z,.5,Z),f.push(Z.x,Z.y))),a.push(P,s,S),a.push(s,w,S)):k===F?(H=`${Math.min(w,S)} ${Math.max(w,S)}`,s=m[H],l(s)||(q=b.interpolateUsingFraction(.5,bX),J=(O.height+N.height)*.5,W=h.fromRadians(q.longitude,q.latitude,J,e,dg),u.push(W.x,W.y,W.z),s=u.length/3-1,m[H]=s,r&&(Z=z.add(T,v,xv),z.multiplyByScalar(Z,.5,Z),f.push(Z.x,Z.y))),a.push(w,s,P),a.push(s,S,P)):U===F&&(H=`${Math.min(S,P)} ${Math.max(S,P)}`,s=m[H],l(s)||(q=C.interpolateUsingFraction(.5,bX),J=(N.height+I.height)*.5,W=h.fromRadians(q.longitude,q.latitude,J,e,dg),u.push(W.x,W.y,W.z),s=u.length/3-1,m[H]=s,r&&(Z=z.add(v,_,xv),z.multiplyByScalar(Z,.5,Z),f.push(Z.x,Z.y))),a.push(S,s,w),a.push(s,P,w)):(g.push(P),g.push(w),g.push(S))}let E={attributes:{position:new Me({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:u})},indices:g,primitiveType:Re.TRIANGLES};return r&&(E.attributes.st=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:f})),new At(E)};DA.scaleToGeodeticHeight=function(e,t,n,i){n=n??te.default;let o=r7e,r=a7e;if(t=t??0,i=i??!0,l(e)){let a=e.length;for(let s=0;s<a;s+=3)h.fromArray(e,s,r),i&&(r=n.scaleToGeodeticSurface(r,r)),t!==0&&(o=n.geodeticSurfaceNormal(r,o),h.multiplyByScalar(o,t,o),h.add(r,o,r)),e[s]=r.x,e[s+1]=r.y,e[s+2]=r.z}return e};var ni=DA;function PA(){this._array=[],this._offset=0,this._length=0}Object.defineProperties(PA.prototype,{length:{get:function(){return this._length}}});PA.prototype.enqueue=function(e){this._array.push(e),this._length++};PA.prototype.dequeue=function(){if(this._length===0)return;let e=this._array,t=this._offset,n=e[t];return e[t]=void 0,t++,t>10&&t*2>e.length&&(this._array=e.slice(t),t=0),this._offset=t,this._length--,n};PA.prototype.peek=function(){if(this._length!==0)return this._array[this._offset]};PA.prototype.contains=function(e){return this._array.indexOf(e)!==-1};PA.prototype.clear=function(){this._array.length=this._offset=this._length=0};PA.prototype.sort=function(e){this._offset>0&&(this._array=this._array.slice(this._offset),this._offset=0),this._array.sort(e)};var RA=PA;var Tr={};Tr.computeHierarchyPackedLength=function(e,t){let n=0,i=[e];for(;i.length>0;){let o=i.pop();if(!l(o))continue;n+=2;let r=o.positions,a=o.holes;if(l(r)&&r.length>0&&(n+=r.length*t.packedLength),l(a)){let s=a.length;for(let c=0;c<s;++c)i.push(a[c])}}return n};Tr.packPolygonHierarchy=function(e,t,n,i){let o=[e];for(;o.length>0;){let r=o.pop();if(!l(r))continue;let a=r.positions,s=r.holes;if(t[n++]=l(a)?a.length:0,t[n++]=l(s)?s.length:0,l(a)){let c=a.length;for(let u=0;u<c;++u,n+=i.packedLength)i.pack(a[u],t,n)}if(l(s)){let c=s.length;for(let u=0;u<c;++u)o.push(s[u])}}return n};Tr.unpackPolygonHierarchy=function(e,t,n){let i=e[t++],o=e[t++],r=new Array(i),a=o>0?new Array(o):void 0;for(let s=0;s<i;++s,t+=n.packedLength)r[s]=n.unpack(e,t);for(let s=0;s<o;++s)a[s]=Tr.unpackPolygonHierarchy(e,t,n),t=a[s].startingIndex,delete a[s].startingIndex;return{positions:r,holes:a,startingIndex:t}};var yb=new z;function whe(e,t,n,i){return z.subtract(t,e,yb),z.multiplyByScalar(yb,n/i,yb),z.add(e,yb,yb),[yb.x,yb.y]}var OA=new h;function u7e(e,t,n,i){return h.subtract(t,e,OA),h.multiplyByScalar(OA,n/i,OA),h.add(e,OA,OA),[OA.x,OA.y,OA.z]}Tr.subdivideLineCount=function(e,t,n){let o=h.distance(e,t)/n,r=Math.max(0,Math.ceil(D.log2(o)));return Math.pow(2,r)};var Aj=new de,yj=new de,f7e=new de,d7e=new h,_j=new wc;Tr.subdivideRhumbLineCount=function(e,t,n,i){let o=e.cartesianToCartographic(t,Aj),r=e.cartesianToCartographic(n,yj),s=new wc(o,r,e).surfaceDistance/i,c=Math.max(0,Math.ceil(D.log2(s)));return Math.pow(2,c)};Tr.subdivideTexcoordLine=function(e,t,n,i,o,r){let a=Tr.subdivideLineCount(n,i,o),s=z.distance(e,t),c=s/a,u=r;u.length=a*2;let f=0;for(let d=0;d<a;d++){let p=whe(e,t,d*c,s);u[f++]=p[0],u[f++]=p[1]}return u};Tr.subdivideLine=function(e,t,n,i){let o=Tr.subdivideLineCount(e,t,n),r=h.distance(e,t),a=r/o;l(i)||(i=[]);let s=i;s.length=o*3;let c=0;for(let u=0;u<o;u++){let f=u7e(e,t,u*a,r);s[c++]=f[0],s[c++]=f[1],s[c++]=f[2]}return s};Tr.subdivideTexcoordRhumbLine=function(e,t,n,i,o,r,a){let s=n.cartesianToCartographic(i,Aj),c=n.cartesianToCartographic(o,yj);_j.setEndPoints(s,c);let u=_j.surfaceDistance/r,f=Math.max(0,Math.ceil(D.log2(u))),d=Math.pow(2,f),p=z.distance(e,t),g=p/d,m=a;m.length=d*2;let A=0;for(let y=0;y<d;y++){let x=whe(e,t,y*g,p);m[A++]=x[0],m[A++]=x[1]}return m};Tr.subdivideRhumbLine=function(e,t,n,i,o){let r=e.cartesianToCartographic(t,Aj),a=e.cartesianToCartographic(n,yj),s=new wc(r,a,e);if(l(o)||(o=[]),s.surfaceDistance<=i)return o.length=3,o[0]=t.x,o[1]=t.y,o[2]=t.z,o;let c=s.surfaceDistance/i,u=Math.max(0,Math.ceil(D.log2(c))),f=Math.pow(2,u),d=s.surfaceDistance/f,p=o;p.length=f*3;let g=0;for(let m=0;m<f;m++){let A=s.interpolateUsingSurfaceDistance(m*d,f7e),y=e.cartographicToCartesian(A,d7e);p[g++]=y.x,p[g++]=y.y,p[g++]=y.z}return p};var h7e=new h,m7e=new h,p7e=new h,g7e=new h;Tr.scaleToGeodeticHeightExtruded=function(e,t,n,i,o){i=i??te.default;let r=h7e,a=m7e,s=p7e,c=g7e;if(l(e)&&l(e.attributes)&&l(e.attributes.position)){let u=e.attributes.position.values,f=u.length/2;for(let d=0;d<f;d+=3)h.fromArray(u,d,s),i.geodeticSurfaceNormal(s,r),c=i.scaleToGeodeticSurface(s,c),a=h.multiplyByScalar(r,n,a),a=h.add(c,a,a),u[d+f]=a.x,u[d+1+f]=a.y,u[d+2+f]=a.z,o&&(c=h.clone(s,c)),a=h.multiplyByScalar(r,t,a),a=h.add(c,a,a),u[d]=a.x,u[d+1]=a.y,u[d+2]=a.z}return e};Tr.polygonOutlinesFromHierarchy=function(e,t,n){let i=[],o=new RA;o.enqueue(e);let r,a,s;for(;o.length!==0;){let c=o.dequeue(),u=c.positions;if(t)for(s=u.length,r=0;r<s;r++)n.scaleToGeodeticSurface(u[r],u[r]);if(u=Fo(u,h.equalsEpsilon,!0),u.length<3)continue;let f=c.holes?c.holes.length:0;for(r=0;r<f;r++){let d=c.holes[r],p=d.positions;if(t)for(s=p.length,a=0;a<s;++a)n.scaleToGeodeticSurface(p[a],p[a]);if(p=Fo(p,h.equalsEpsilon,!0),p.length<3)continue;i.push(p);let g=0;for(l(d.holes)&&(g=d.holes.length),a=0;a<g;a++)o.enqueue(d.holes[a])}i.push(u)}return i};var _7e=new de;function A7e(e,t,n){let i=n.cartesianToCartographic(e,Aj),o=n.cartesianToCartographic(t,yj);if(Math.sign(i.latitude)===Math.sign(o.latitude))return;_j.setEndPoints(i,o);let r=_j.findIntersectionWithLatitude(0,_7e);if(!l(r))return;let a=Math.min(i.longitude,o.longitude),s=Math.max(i.longitude,o.longitude);if(Math.abs(s-a)>D.PI){let c=a;a=s,s=c}if(!(r.longitude<a||r.longitude>s))return n.cartographicToCartesian(r)}function y7e(e,t,n,i){if(i===on.RHUMB)return A7e(e,t,n);let o=si.lineSegmentPlane(e,t,en.ORIGIN_XY_PLANE);if(l(o))return n.scaleToGeodeticSurface(o,o)}var x7e=new de;function b7e(e,t,n){let i=[],o,r,a,s,c,u=0;for(;u<e.length;){o=e[u],r=e[(u+1)%e.length],a=D.sign(o.z),s=D.sign(r.z);let f=d=>t.cartesianToCartographic(d,x7e).longitude;if(a===0)i.push({position:u,type:a,visited:!1,next:s,theta:f(o)});else if(s!==0){if(c=y7e(o,r,t,n),++u,!l(c))continue;e.splice(u,0,c),i.push({position:u,type:a,visited:!1,next:s,theta:f(c)})}++u}return i}function Ihe(e,t,n,i,o,r,a){let s=[],c=r,u=d=>p=>p.position===d,f=[];do{let d=n[c];s.push(d);let p=i.findIndex(u(c)),g=i[p];if(!l(g)){++c;continue}let{visited:m,type:A,next:y}=g;if(g.visited=!0,A===0){if(y===0){let E=i[p-(a?1:-1)];if(E?.position===c+1)E.visited=!0;else{++c;continue}}if(!m&&a&&y>0||r===c&&!a&&y<0){++c;continue}}if(!(a?A>=0:A<=0)){++c;continue}m||f.push(c);let b=p+(a?1:-1),C=i[b];if(!l(C)){++c;continue}c=C.position}while(c<n.length&&c>=0&&c!==r&&s.length<n.length);e.splice(t,o,s);for(let d of f)t=Ihe(e,++t,n,i,0,d,!a);return t}Tr.splitPolygonsOnEquator=function(e,t,n,i){l(i)||(i=[]),i.splice(0,0,...e),i.length=e.length;let o=0;for(;o<i.length;){let r=i[o],a=r.slice();if(r.length<3){i[o]=a,++o;continue}let s=b7e(a,t,n);if(a.length===r.length||s.length<=1){i[o]=a,++o;continue}s.sort((u,f)=>u.theta-f.theta);let c=a[0].z>=0;o=Ihe(i,o,a,s,1,0,c)}return i};Tr.polygonsFromHierarchy=function(e,t,n,i,o,r){let a=[],s=[],c=new RA;c.enqueue(e);let u=l(r);for(;c.length!==0;){let f=c.dequeue(),d=f.positions,p=f.holes,g,m;if(i)for(m=d.length,g=0;g<m;g++)o.scaleToGeodeticSurface(d[g],d[g]);if(t||(d=Fo(d,h.equalsEpsilon,!0)),d.length<3)continue;let A=n(d);if(!l(A))continue;let y=[],x=ni.computeWindingOrder2D(A);if(x===Ya.CLOCKWISE&&(A.reverse(),d=d.slice().reverse()),u){u=!1;let w=[d];if(w=r(w,w),w.length>1){for(let P of w)c.enqueue(new Ic(P,p));continue}}let b=d.slice(),C=l(p)?p.length:0,E=[],S;for(g=0;g<C;g++){let w=p[g],P=w.positions;if(i)for(m=P.length,S=0;S<m;++S)o.scaleToGeodeticSurface(P[S],P[S]);if(t||(P=Fo(P,h.equalsEpsilon,!0)),P.length<3)continue;let R=n(P);if(!l(R))continue;x=ni.computeWindingOrder2D(R),x===Ya.CLOCKWISE&&(R.reverse(),P=P.slice().reverse()),E.push(P),y.push(b.length),b=b.concat(P),A=A.concat(R);let B=0;for(l(w.holes)&&(B=w.holes.length),S=0;S<B;S++)c.enqueue(w.holes[S])}a.push({outerRing:d,holes:E}),s.push({positions:b,positions2D:A,holes:y})}return{hierarchy:a,polygons:s}};var C7e=new z,T7e=new h,E7e=new Le,v7e=new $;Tr.computeBoundingRectangle=function(e,t,n,i,o){let r=Le.fromAxisAngle(e,i,E7e),a=$.fromQuaternion(r,v7e),s=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,u=Number.POSITIVE_INFINITY,f=Number.NEGATIVE_INFINITY,d=n.length;for(let p=0;p<d;++p){let g=h.clone(n[p],T7e);$.multiplyByVector(a,g,g);let m=t(g,C7e);l(m)&&(s=Math.min(s,m.x),c=Math.max(c,m.x),u=Math.min(u,m.y),f=Math.max(f,m.y))}return o.x=s,o.y=u,o.width=c-s,o.height=f-u,o};Tr.createGeometryFromPositions=function(e,t,n,i,o,r,a){let s=ni.triangulate(t.positions2D,t.holes);s.length<3&&(s=[0,1,2]);let c=t.positions,u=l(n),f=u?n.positions:void 0;if(o){let d=c.length,p=new Array(d*3),g=0;for(let y=0;y<d;y++){let x=c[y];p[g++]=x.x,p[g++]=x.y,p[g++]=x.z}let m={attributes:{position:new Me({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:p})},indices:s,primitiveType:Re.TRIANGLES};u&&(m.attributes.st=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:z.packArray(f)}));let A=new At(m);return r.normal?kn.computeNormal(A):A}if(a===on.GEODESIC)return ni.computeSubdivision(e,c,s,f,i);if(a===on.RHUMB)return ni.computeRhumbLineSubdivision(e,c,s,f,i)};var vhe=[],She=[],S7e=new h,w7e=new h;Tr.computeWallGeometry=function(e,t,n,i,o,r){let a,s,c,u,f,d,p,g,m,A=e.length,y=0,x=0,b=l(t),C=b?t.positions:void 0;if(o)for(s=A*3*2,a=new Array(s*2),b&&(m=A*2*2,g=new Array(m*2)),c=0;c<A;c++)u=e[c],f=e[(c+1)%A],a[y]=a[y+s]=u.x,++y,a[y]=a[y+s]=u.y,++y,a[y]=a[y+s]=u.z,++y,a[y]=a[y+s]=f.x,++y,a[y]=a[y+s]=f.y,++y,a[y]=a[y+s]=f.z,++y,b&&(d=C[c],p=C[(c+1)%A],g[x]=g[x+m]=d.x,++x,g[x]=g[x+m]=d.y,++x,g[x]=g[x+m]=p.x,++x,g[x]=g[x+m]=p.y,++x);else{let R=D.chordLength(i,n.maximumRadius),B=0;if(r===on.GEODESIC)for(c=0;c<A;c++)B+=Tr.subdivideLineCount(e[c],e[(c+1)%A],R);else if(r===on.RHUMB)for(c=0;c<A;c++)B+=Tr.subdivideRhumbLineCount(n,e[c],e[(c+1)%A],R);for(s=(B+A)*3,a=new Array(s*2),b&&(m=(B+A)*2,g=new Array(m*2)),c=0;c<A;c++){u=e[c],f=e[(c+1)%A];let L,_;b&&(d=C[c],p=C[(c+1)%A]),r===on.GEODESIC?(L=Tr.subdivideLine(u,f,R,She),b&&(_=Tr.subdivideTexcoordLine(d,p,u,f,R,vhe))):r===on.RHUMB&&(L=Tr.subdivideRhumbLine(n,u,f,R,She),b&&(_=Tr.subdivideTexcoordRhumbLine(d,p,n,u,f,R,vhe)));let T=L.length;for(let v=0;v<T;++v,++y)a[y]=L[v],a[y+s]=L[v];if(a[y]=f.x,a[y+s]=f.x,++y,a[y]=f.y,a[y+s]=f.y,++y,a[y]=f.z,a[y+s]=f.z,++y,b){let v=_.length;for(let I=0;I<v;++I,++x)g[x]=_[I],g[x+m]=_[I];g[x]=p.x,g[x+m]=p.x,++x,g[x]=p.y,g[x+m]=p.y,++x}}}A=a.length;let E=Ue.createTypedArray(A/3,A-e.length*6),S=0;for(A/=6,c=0;c<A;c++){let R=c,B=R+1,L=R+A,_=L+1;u=h.fromArray(a,R*3,S7e),f=h.fromArray(a,B*3,w7e),!h.equalsEpsilon(u,f,D.EPSILON10,D.EPSILON10)&&(E[S++]=R,E[S++]=L,E[S++]=B,E[S++]=B,E[S++]=L,E[S++]=_)}let w={attributes:new pn({position:new Me({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:a})}),indices:E,primitiveType:Re.TRIANGLES};return b&&(w.attributes.st=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:g})),new At(w)};var Yn=Tr;function ga(e,t){this.position=e,l(this.position)||(this.position=new z),this.tangentPlane=t,l(this.tangentPlane)||(this.tangentPlane=ga.NORTH_POLE_TANGENT_PLANE)}Object.defineProperties(ga.prototype,{ellipsoid:{get:function(){return this.tangentPlane.ellipsoid}},x:{get:function(){return this.position.x}},y:{get:function(){return this.position.y}},conformalLatitude:{get:function(){let e=z.magnitude(this.position),t=2*this.ellipsoid.maximumRadius;return this.tangentPlane.plane.normal.z*(D.PI_OVER_TWO-2*Math.atan2(e,t))}},longitude:{get:function(){let e=D.PI_OVER_TWO+Math.atan2(this.y,this.x);return e>Math.PI&&(e-=D.TWO_PI),e}}});var bv=new de,I7e=new h;ga.prototype.getLatitude=function(e){l(e)||(e=te.default),bv.latitude=this.conformalLatitude,bv.longitude=this.longitude,bv.height=0;let t=this.ellipsoid.cartographicToCartesian(bv,I7e);return e.cartesianToCartographic(t,bv),bv.latitude};var D7e=new gn,P7e=new h,R7e=new h;ga.fromCartesian=function(e,t){let n=D.signNotZero(e.z),i=ga.NORTH_POLE_TANGENT_PLANE,o=ga.SOUTH_POLE;n<0&&(i=ga.SOUTH_POLE_TANGENT_PLANE,o=ga.NORTH_POLE);let r=D7e;r.origin=i.ellipsoid.scaleToGeocentricSurface(e,r.origin),r.direction=h.subtract(r.origin,o,P7e),h.normalize(r.direction,r.direction);let a=si.rayPlane(r,i.plane,R7e),s=h.subtract(a,o,a),c=h.dot(i.xAxis,s),u=n*h.dot(i.yAxis,s);return l(t)?(t.position=new z(c,u),t.tangentPlane=i,t):new ga(new z(c,u),i)};ga.fromCartesianArray=function(e,t){let n=e.length;l(t)?t.length=n:t=new Array(n);for(let i=0;i<n;i++)t[i]=ga.fromCartesian(e[i],t[i]);return t};ga.clone=function(e,t){if(l(e))return l(t)?(t.position=e.position,t.tangentPlane=e.tangentPlane,t):new ga(e.position,e.tangentPlane)};ga.HALF_UNIT_SPHERE=Object.freeze(new te(.5,.5,.5));ga.NORTH_POLE=Object.freeze(new h(0,0,.5));ga.SOUTH_POLE=Object.freeze(new h(0,0,-.5));ga.NORTH_POLE_TANGENT_PLANE=Object.freeze(new Ra(ga.NORTH_POLE,ga.HALF_UNIT_SPHERE));ga.SOUTH_POLE_TANGENT_PLANE=Object.freeze(new Ra(ga.SOUTH_POLE,ga.HALF_UNIT_SPHERE));var al=ga;var O7e=new de,Dhe=new de;function M7e(e,t,n,i){let r=i.cartesianToCartographic(e,O7e).height,a=i.cartesianToCartographic(t,Dhe);a.height=r,i.cartographicToCartesian(a,t);let s=i.cartesianToCartographic(n,Dhe);s.height=r-100,i.cartographicToCartesian(s,n)}var Phe=new Je,B7e=new h,L7e=new h,N7e=new h,F7e=new h,k7e=new h,z7e=new h,xj=new h,Tp=new h,Cv=new h,U7e=new z,V7e=new z,j7e=new h,Rhe=new Le,G7e=new $,H7e=new $;function CX(e){let t=e.vertexFormat,n=e.geometry,i=e.shadowVolume,o=n.attributes.position.values,r=l(n.attributes.st)?n.attributes.st.values:void 0,a=o.length,s=e.wall,c=e.top||s,u=e.bottom||s;if(t.st||t.normal||t.tangent||t.bitangent||i){let f=e.boundingRectangle,d=e.rotationAxis,p=e.projectTo2d,g=e.ellipsoid,m=e.stRotation,A=e.perPositionHeight,y=U7e;y.x=f.x,y.y=f.y;let x=t.st?new Float32Array(2*(a/3)):void 0,b;t.normal&&(A&&c&&!s?b=n.attributes.normal.values:b=new Float32Array(a));let C=t.tangent?new Float32Array(a):void 0,E=t.bitangent?new Float32Array(a):void 0,S=i?new Float32Array(a):void 0,w=0,P=0,R=L7e,B=N7e,L=F7e,_=!0,T=G7e,v=H7e;if(m!==0){let N=Le.fromAxisAngle(d,m,Rhe);T=$.fromQuaternion(N,T),N=Le.fromAxisAngle(d,-m,Rhe),v=$.fromQuaternion(N,v)}else T=$.clone($.IDENTITY,T),v=$.clone($.IDENTITY,v);let I=0,O=0;c&&u&&(I=a/2,O=a/3,a/=2);for(let N=0;N<a;N+=3){let j=h.fromArray(o,N,j7e);if(t.st&&!l(r)){let k=$.multiplyByVector(T,j,B7e);k=g.scaleToGeodeticSurface(k,k);let U=p([k],V7e)[0];z.subtract(U,y,U);let F=D.clamp(U.x/f.width,0,1),H=D.clamp(U.y/f.height,0,1);u&&(x[w+O]=F,x[w+1+O]=H),c&&(x[w]=F,x[w+1]=H),w+=2}if(t.normal||t.tangent||t.bitangent||i){let k=P+1,U=P+2;if(s){if(N+3<a){let F=h.fromArray(o,N+3,k7e);if(_){let H=h.fromArray(o,N+a,z7e);A&&M7e(j,F,H,g),h.subtract(F,j,F),h.subtract(H,j,H),R=h.normalize(h.cross(H,F,R),R),_=!1}h.equalsEpsilon(F,j,D.EPSILON10)&&(_=!0)}(t.tangent||t.bitangent)&&(L=g.geodeticSurfaceNormal(j,L),t.tangent&&(B=h.normalize(h.cross(L,R,B),B)))}else R=g.geodeticSurfaceNormal(j,R),(t.tangent||t.bitangent)&&(A&&(xj=h.fromArray(b,P,xj),Tp=h.cross(h.UNIT_Z,xj,Tp),Tp=h.normalize($.multiplyByVector(v,Tp,Tp),Tp),t.bitangent&&(Cv=h.normalize(h.cross(xj,Tp,Cv),Cv))),B=h.cross(h.UNIT_Z,R,B),B=h.normalize($.multiplyByVector(v,B,B),B),t.bitangent&&(L=h.normalize(h.cross(R,B,L),L)));t.normal&&(e.wall?(b[P+I]=R.x,b[k+I]=R.y,b[U+I]=R.z):u&&(b[P+I]=-R.x,b[k+I]=-R.y,b[U+I]=-R.z),(c&&!A||s)&&(b[P]=R.x,b[k]=R.y,b[U]=R.z)),i&&(s&&(R=g.geodeticSurfaceNormal(j,R)),S[P+I]=-R.x,S[k+I]=-R.y,S[U+I]=-R.z),t.tangent&&(e.wall?(C[P+I]=B.x,C[k+I]=B.y,C[U+I]=B.z):u&&(C[P+I]=-B.x,C[k+I]=-B.y,C[U+I]=-B.z),c&&(A?(C[P]=Tp.x,C[k]=Tp.y,C[U]=Tp.z):(C[P]=B.x,C[k]=B.y,C[U]=B.z))),t.bitangent&&(u&&(E[P+I]=L.x,E[k+I]=L.y,E[U+I]=L.z),c&&(A?(E[P]=Cv.x,E[k]=Cv.y,E[U]=Cv.z):(E[P]=L.x,E[k]=L.y,E[U]=L.z))),P+=3}}t.st&&!l(r)&&(n.attributes.st=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:x})),t.normal&&(n.attributes.normal=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:b})),t.tangent&&(n.attributes.tangent=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:C})),t.bitangent&&(n.attributes.bitangent=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:E})),i&&(n.attributes.extrudeDirection=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:S}))}if(e.extrude&&l(e.offsetAttribute)){let f=o.length/3,d=new Uint8Array(f);if(e.offsetAttribute===ln.TOP)c&&u||s?d=d.fill(1,0,f/2):c&&(d=d.fill(1));else{let p=e.offsetAttribute===ln.NONE?0:1;d=d.fill(p)}n.attributes.applyOffset=new Me({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:d})}return n}var Ohe=[];function W7e(e,t,n,i,o,r,a,s,c,u){let f={walls:[]},d;if(a||s){let b=Yn.createGeometryFromPositions(e,t,n,i,r,c,u),C=b.attributes.position.values,E=b.indices,S,w;if(a&&s){let P=C.concat(C);S=P.length/3,w=Ue.createTypedArray(S,E.length*2),w.set(E);let R=E.length,B=S/2;for(d=0;d<R;d+=3){let L=w[d]+B,_=w[d+1]+B,T=w[d+2]+B;w[d+R]=T,w[d+1+R]=_,w[d+2+R]=L}if(b.attributes.position.values=P,r&&c.normal){let L=b.attributes.normal.values;b.attributes.normal.values=new Float32Array(P.length),b.attributes.normal.values.set(L)}if(c.st&&l(n)){let L=b.attributes.st.values;b.attributes.st.values=new Float32Array(S*2),b.attributes.st.values=L.concat(L)}b.indices=w}else if(s){for(S=C.length/3,w=Ue.createTypedArray(S,E.length),d=0;d<E.length;d+=3)w[d]=E[d+2],w[d+1]=E[d+1],w[d+2]=E[d];b.indices=w}f.topAndBottom=new Ot({geometry:b})}let p=o.outerRing,g=Ra.fromPoints(p,e),m=g.projectPointsOntoPlane(p,Ohe),A=ni.computeWindingOrder2D(m);A===Ya.CLOCKWISE&&(p=p.slice().reverse());let y=Yn.computeWallGeometry(p,n,e,i,r,u);f.walls.push(new Ot({geometry:y}));let x=o.holes;for(d=0;d<x.length;d++){let b=x[d];m=g.projectPointsOntoPlane(b,Ohe),A=ni.computeWindingOrder2D(m),A===Ya.COUNTER_CLOCKWISE&&(b=b.slice().reverse()),y=Yn.computeWallGeometry(b,n,e,i,r,u),f.walls.push(new Ot({geometry:y}))}return f}function Od(e){let t=e.polygonHierarchy,n=e.vertexFormat??Ne.DEFAULT,i=e.ellipsoid??te.default,o=e.granularity??D.RADIANS_PER_DEGREE,r=e.stRotation??0,a=e.textureCoordinates,s=e.perPositionHeight??!1,c=s&&l(e.extrudedHeight),u=e.height??0,f=e.extrudedHeight??u;if(!c){let d=Math.max(u,f);f=Math.min(u,f),u=d}this._vertexFormat=Ne.clone(n),this._ellipsoid=te.clone(i),this._granularity=o,this._stRotation=r,this._height=u,this._extrudedHeight=f,this._closeTop=e.closeTop??!0,this._closeBottom=e.closeBottom??!0,this._polygonHierarchy=t,this._perPositionHeight=s,this._perPositionHeightExtrude=c,this._shadowVolume=e.shadowVolume??!1,this._workerName="createPolygonGeometry",this._offsetAttribute=e.offsetAttribute,this._arcType=e.arcType??on.GEODESIC,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0,this._textureCoordinates=a,this.packedLength=Yn.computeHierarchyPackedLength(t,h)+te.packedLength+Ne.packedLength+(a?Yn.computeHierarchyPackedLength(a,z):1)+12}Od.fromPositions=function(e){e=e??G.EMPTY_OBJECT;let t={polygonHierarchy:{positions:e.positions},height:e.height,extrudedHeight:e.extrudedHeight,vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight,closeTop:e.closeTop,closeBottom:e.closeBottom,offsetAttribute:e.offsetAttribute,arcType:e.arcType,textureCoordinates:e.textureCoordinates};return new Od(t)};Od.pack=function(e,t,n){return n=n??0,n=Yn.packPolygonHierarchy(e._polygonHierarchy,t,n,h),te.pack(e._ellipsoid,t,n),n+=te.packedLength,Ne.pack(e._vertexFormat,t,n),n+=Ne.packedLength,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._granularity,t[n++]=e._stRotation,t[n++]=e._perPositionHeightExtrude?1:0,t[n++]=e._perPositionHeight?1:0,t[n++]=e._closeTop?1:0,t[n++]=e._closeBottom?1:0,t[n++]=e._shadowVolume?1:0,t[n++]=e._offsetAttribute??-1,t[n++]=e._arcType,l(e._textureCoordinates)?n=Yn.packPolygonHierarchy(e._textureCoordinates,t,n,z):t[n++]=-1,t[n++]=e.packedLength,t};var q7e=te.clone(te.UNIT_SPHERE),Y7e=new Ne,X7e={polygonHierarchy:{}};Od.unpack=function(e,t,n){t=t??0;let i=Yn.unpackPolygonHierarchy(e,t,h);t=i.startingIndex,delete i.startingIndex;let o=te.unpack(e,t,q7e);t+=te.packedLength;let r=Ne.unpack(e,t,Y7e);t+=Ne.packedLength;let a=e[t++],s=e[t++],c=e[t++],u=e[t++],f=e[t++]===1,d=e[t++]===1,p=e[t++]===1,g=e[t++]===1,m=e[t++]===1,A=e[t++],y=e[t++],x=e[t]===-1?void 0:Yn.unpackPolygonHierarchy(e,t,z);l(x)?(t=x.startingIndex,delete x.startingIndex):t++;let b=e[t++];return l(n)||(n=new Od(X7e)),n._polygonHierarchy=i,n._ellipsoid=te.clone(o,n._ellipsoid),n._vertexFormat=Ne.clone(r,n._vertexFormat),n._height=a,n._extrudedHeight=s,n._granularity=c,n._stRotation=u,n._perPositionHeightExtrude=f,n._perPositionHeight=d,n._closeTop=p,n._closeBottom=g,n._shadowVolume=m,n._offsetAttribute=A===-1?void 0:A,n._arcType=y,n._textureCoordinates=x,n.packedLength=b,n};var K7e=new z,Q7e=new z,$7e=new al;function Mhe(e,t,n,i,o,r){let a=e.longitude,s=a>=0?a:a+D.TWO_PI;o.westOverIdl=Math.min(o.westOverIdl,s),o.eastOverIdl=Math.max(o.eastOverIdl,s),r.west=Math.min(r.west,a),r.east=Math.max(r.east,a);let c=e.getLatitude(n),u=c;if(r.south=Math.min(r.south,c),r.north=Math.max(r.north,c),i!==on.RHUMB){let p=z.subtract(t.position,e.position,K7e),g=z.dot(t.position,p)/z.dot(p,p);if(g>0&&g<1){let m=z.add(t.position,z.multiplyByScalar(p,-g,p),Q7e),A=al.clone(t,$7e);A.position=m;let y=A.getLatitude(n);r.south=Math.min(r.south,y),r.north=Math.max(r.north,y),Math.abs(c)>Math.abs(y)&&(u=y)}}let f=t.x*e.y-e.x*t.y,d=Math.sign(f);d!==0&&(d*=z.angleBetween(t.position,e.position)),u>=0&&(o.northAngle+=d),u<=0&&(o.southAngle+=d)}var Bhe=new al,J7e=new al,Rd={northAngle:0,southAngle:0,westOverIdl:0,eastOverIdl:0};Od.computeRectangleFromPositions=function(e,t,n,i){if(l(i)||(i=new oe),e.length<3)return i;i.west=Number.POSITIVE_INFINITY,i.east=Number.NEGATIVE_INFINITY,i.south=Number.POSITIVE_INFINITY,i.north=Number.NEGATIVE_INFINITY,Rd.northAngle=0,Rd.southAngle=0,Rd.westOverIdl=Number.POSITIVE_INFINITY,Rd.eastOverIdl=Number.NEGATIVE_INFINITY;let o=e.length,r=al.fromCartesian(e[0],J7e);for(let a=1;a<o;a++){let s=al.fromCartesian(e[a],Bhe);Mhe(s,r,t,n,Rd,i),r=al.clone(s,r)}return Mhe(al.fromCartesian(e[0],Bhe),r,t,n,Rd,i),i.east-i.west>Rd.eastOverIdl-Rd.westOverIdl&&(i.west=Rd.westOverIdl,i.east=Rd.eastOverIdl,i.east>D.PI&&(i.east=i.east-D.TWO_PI),i.west>D.PI&&(i.west=i.west-D.TWO_PI)),D.equalsEpsilon(Math.abs(Rd.northAngle),D.TWO_PI,D.EPSILON10)&&(i.north=D.PI_OVER_TWO,i.east=D.PI,i.west=-D.PI),D.equalsEpsilon(Math.abs(Rd.southAngle),D.TWO_PI,D.EPSILON10)&&(i.south=-D.PI_OVER_TWO,i.east=D.PI,i.west=-D.PI),i};var Z7e=new al;function eWe(e,t,n){return e.height>=D.PI||e.width>=D.PI?al.fromCartesian(t[0],Z7e).tangentPlane:Ra.fromPoints(t,n)}var Lhe=new de;function tWe(e,t,n){return(i,o)=>{if(e.height>=D.PI||e.width>=D.PI){if(e.south<0&&e.north>0){l(o)||(o=[]);for(let a=0;a<i.length;++a){let s=n.cartesianToCartographic(i[a],Lhe);o[a]=new z(s.longitude/D.PI,s.latitude/D.PI_OVER_TWO)}return o.length=i.length,o}return al.fromCartesianArray(i,o)}return Ra.fromPoints(t,n).projectPointsOntoPlane(i,o)}}function nWe(e,t,n){if(e.height>=D.PI||e.width>=D.PI)return(o,r)=>{if(e.south<0&&e.north>0){let a=n.cartesianToCartographic(o,Lhe);return l(r)||(r=new z),r.x=a.longitude/D.PI,r.y=a.latitude/D.PI_OVER_TWO,r}return al.fromCartesian(o,r)};let i=Ra.fromPoints(t,n);return(o,r)=>i.projectPointsOntoPlane(o,r)}function iWe(e,t,n,i){return(o,r)=>!i&&(e.height>=D.PI_OVER_TWO||e.width>=2*D.PI_OVER_THREE)?Yn.splitPolygonsOnEquator(o,t,n,r):o}function oWe(e,t,n,i){if(t.height>=D.PI||t.width>=D.PI)return Je.fromRectangle(t,void 0,Phe);let o=e,r=Ra.fromPoints(o,n);return Yn.computeBoundingRectangle(r.plane.normal,r.projectPointOntoPlane.bind(r),o,i,Phe)}Od.createGeometry=function(e){let t=e._vertexFormat,n=e._ellipsoid,i=e._granularity,o=e._stRotation,r=e._polygonHierarchy,a=e._perPositionHeight,s=e._closeTop,c=e._closeBottom,u=e._arcType,f=e._textureCoordinates,d=l(f),p=r.positions;if(p.length<3)return;let g=e.rectangle,m=Yn.polygonsFromHierarchy(r,d,tWe(g,p,n),!a,n,iWe(g,n,u,a)),A=m.hierarchy,y=m.polygons,x=function(I){return I},b=d?Yn.polygonsFromHierarchy(f,!0,x,!1,n).polygons:void 0;if(A.length===0)return;let C=A[0].outerRing,E=oWe(C,g,n,o),S=[],w=e._height,P=e._extrudedHeight,R=e._perPositionHeightExtrude||!D.equalsEpsilon(w,P,0,D.EPSILON2),B={perPositionHeight:a,vertexFormat:t,geometry:void 0,rotationAxis:eWe(g,C,n).plane.normal,projectTo2d:nWe(g,C,n),boundingRectangle:E,ellipsoid:n,stRotation:o,textureCoordinates:void 0,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:u},L;if(R)for(B.extrude=!0,B.top=s,B.bottom=c,B.shadowVolume=e._shadowVolume,B.offsetAttribute=e._offsetAttribute,L=0;L<y.length;L++){let I=W7e(n,y[L],d?b[L]:void 0,i,A[L],a,s,c,t,u),O;s&&c?(O=I.topAndBottom,B.geometry=Yn.scaleToGeodeticHeightExtruded(O.geometry,w,P,n,a)):s?(O=I.topAndBottom,O.geometry.attributes.position.values=ni.scaleToGeodeticHeight(O.geometry.attributes.position.values,w,n,!a),B.geometry=O.geometry):c&&(O=I.topAndBottom,O.geometry.attributes.position.values=ni.scaleToGeodeticHeight(O.geometry.attributes.position.values,P,n,!0),B.geometry=O.geometry),(s||c)&&(B.wall=!1,O.geometry=CX(B),S.push(O));let N=I.walls;B.wall=!0;for(let j=0;j<N.length;j++){let k=N[j];B.geometry=Yn.scaleToGeodeticHeightExtruded(k.geometry,w,P,n,a),k.geometry=CX(B),S.push(k)}}else for(L=0;L<y.length;L++){let I=new Ot({geometry:Yn.createGeometryFromPositions(n,y[L],d?b[L]:void 0,i,a,t,u)});if(I.geometry.attributes.position.values=ni.scaleToGeodeticHeight(I.geometry.attributes.position.values,w,n,!a),B.geometry=I.geometry,I.geometry=CX(B),l(e._offsetAttribute)){let O=I.geometry.attributes.position.values.length,N=e._offsetAttribute===ln.NONE?0:1,j=new Uint8Array(O/3).fill(N);I.geometry.attributes.applyOffset=new Me({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:j})}S.push(I)}let _=kn.combineInstances(S)[0];_.attributes.position.values=new Float64Array(_.attributes.position.values),_.indices=Ue.createTypedArray(_.attributes.position.values.length/3,_.indices);let T=_.attributes,v=ce.fromVertices(T.position.values);return t.position||delete T.position,new At({attributes:T,indices:_.indices,primitiveType:_.primitiveType,boundingSphere:v,offsetAttribute:e._offsetAttribute})};Od.createShadowVolume=function(e,t,n){let i=e._granularity,o=e._ellipsoid,r=t(i,o),a=n(i,o);return new Od({polygonHierarchy:e._polygonHierarchy,ellipsoid:o,stRotation:e._stRotation,granularity:i,perPositionHeight:!1,extrudedHeight:r,height:a,vertexFormat:Ne.POSITION_ONLY,shadowVolume:!0,arcType:e._arcType})};function rWe(e){let t=-e._stRotation;if(t===0)return[0,0,0,1,1,0];let n=e._ellipsoid,i=e._polygonHierarchy.positions,o=e.rectangle;return At._textureCoordinateRotationPoints(i,t,n,o)}Object.defineProperties(Od.prototype,{rectangle:{get:function(){if(!l(this._rectangle)){let e=this._polygonHierarchy.positions;this._rectangle=Od.computeRectangleFromPositions(e,this._ellipsoid,this._arcType)}return this._rectangle}},textureCoordinateRotationPoints:{get:function(){return l(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=rWe(this)),this._textureCoordinateRotationPoints}}});var hg=Od;function xb(e){this._ellipsoid=e.ellipsoid??te.default,this._positions=Fhe(e.positions),this._cachedPositions=void 0,this._cachedRectangle=void 0}function Fhe(e){if(!l(e))return;let t=e.length,n=Array(t);for(let i=0;i<t;i++)n[i]=h.clone(e[i]);return n}function aWe(e,t){if(!l(e)&&!l(t))return!0;if(l(e)!==l(t)||e.length!==t.length)return!1;let n=e.length;for(let i=0;i<n;i++){let o=e[i],r=t[i];if(!h.equals(o,r))return!1}return!0}Object.defineProperties(xb.prototype,{length:{get:function(){return this._positions.length}},positions:{get:function(){return this._positions}},ellipsoid:{get:function(){return this._ellipsoid}}});xb.clone=function(e,t){return l(t)?(t._ellipsoid=e.ellipsoid,t._positions.length=0,t._positions.push(...e.positions),t):new xb({positions:e.positions,ellipsoid:e.ellipsoid})};xb.equals=function(e,t){return e.ellipsoid.equals(t.ellipsoid)&&e.positions===t.positions};xb.prototype.computeRectangle=function(e){if(aWe(this._positions,this._cachedPositions))return oe.clone(this._cachedRectangle,e);let t=hg.computeRectangleFromPositions(this.positions,this.ellipsoid,void 0,e);return this._cachedPositions=Fhe(this._positions),this._cachedRectangle=oe.clone(t),t};var sWe=new oe,Nhe=new h;xb.prototype.computeSphericalExtents=function(e){l(e)||(e=new oe);let t=this.computeRectangle(sWe),n=de.toCartesian(oe.southwest(t),this.ellipsoid,Nhe),i=Math.sqrt(n.x*n.x+n.y*n.y),o=D.fastApproximateAtan2(i,n.z),r=D.fastApproximateAtan2(n.x,n.y);return e.south=o,e.west=r,n=de.toCartesian(oe.northeast(t),this.ellipsoid,Nhe),i=Math.sqrt(n.x*n.x+n.y*n.y),o=D.fastApproximateAtan2(i,n.z),r=D.fastApproximateAtan2(n.x,n.y),e.north=o,e.east=r,e};var Tv=xb;var SM=`in vec2 v_textureCoordinates;
-
- uniform int u_polygonsLength;
- uniform int u_extentsLength;
- uniform highp sampler2D u_polygonTexture;
- uniform highp sampler2D u_extentsTexture;
-
- int getPolygonIndex(float dimension, vec2 coord) {
- vec2 uv = coord.xy * dimension;
- return int(floor(uv.y) * dimension + floor(uv.x));
- }
-
- vec2 getLookupUv(ivec2 dimensions, int i) {
- int pixY = i / dimensions.x;
- int pixX = i - (pixY * dimensions.x);
- float pixelWidth = 1.0 / float(dimensions.x);
- float pixelHeight = 1.0 / float(dimensions.y);
- float u = (float(pixX) + 0.5) * pixelWidth; // sample from center of pixel
- float v = (float(pixY) + 0.5) * pixelHeight;
- return vec2(u, v);
- }
-
- vec4 getExtents(int i) {
- return texture(u_extentsTexture, getLookupUv(textureSize(u_extentsTexture, 0), i));
- }
-
- ivec2 getPositionsLengthAndExtentsIndex(int i) {
- vec2 uv = getLookupUv(textureSize(u_polygonTexture, 0), i);
- vec4 value = texture(u_polygonTexture, uv);
- return ivec2(int(value.x), int(value.y));
- }
-
- vec2 getPolygonPosition(int i) {
- vec2 uv = getLookupUv(textureSize(u_polygonTexture, 0), i);
- return texture(u_polygonTexture, uv).xy;
- }
-
- vec2 getCoordinates(vec2 textureCoordinates, vec4 extents) {
- float latitude = mix(extents.x, extents.x + 1.0 / extents.z, textureCoordinates.y);
- float longitude = mix(extents.y, extents.y + 1.0 / extents.w, textureCoordinates.x);
- return vec2(latitude, longitude);
- }
-
- void main() {
- int lastPolygonIndex = 0;
- out_FragColor = vec4(1.0);
-
- // Get the relevant region of the texture
- float dimension = float(u_extentsLength);
- if (u_extentsLength > 2) {
- dimension = ceil(log2(float(u_extentsLength)));
- }
- int regionIndex = getPolygonIndex(dimension, v_textureCoordinates);
-
- if (regionIndex >= u_extentsLength) {
- return; // done (no polygons in this region)
- }
-
- for (int polygonIndex = 0; polygonIndex < u_polygonsLength; polygonIndex++) {
- ivec2 positionsLengthAndExtents = getPositionsLengthAndExtentsIndex(lastPolygonIndex);
- int positionsLength = positionsLengthAndExtents.x;
- int polygonExtentsIndex = positionsLengthAndExtents.y;
- lastPolygonIndex += 1;
-
- // Read the individual polygon extent (2 pixels: south/west, latRange/lonRange)
- vec2 extentsSouthWest = getPolygonPosition(lastPolygonIndex);
- vec2 extentsRange = getPolygonPosition(lastPolygonIndex + 1);
- vec4 polygonExtent = vec4(extentsSouthWest, extentsRange);
- lastPolygonIndex += 2;
-
- if (polygonExtentsIndex < regionIndex) {
- lastPolygonIndex += positionsLength;
- continue; // skip to next (TODO: could optimize further if we knew how many polygons to skip)
- } else if (polygonExtentsIndex > regionIndex) {
- break; // done (we know polygons are sorted by regionIndex)
- }
-
- // Only compute signed distance for the relevant part of the atlas
- float clipAmount = czm_infinity;
- vec4 extents = getExtents(polygonExtentsIndex);
- vec2 textureOffset = vec2(mod(float(polygonExtentsIndex), dimension), floor(float(polygonExtentsIndex) / dimension)) / dimension;
- vec2 p = getCoordinates((v_textureCoordinates - textureOffset) * dimension, extents); // current pixel position
-
- // Only consider polygons whos boundingbox includes current pixel (with a slight padding)
- float padding = 0.05; // 5% of polygon extents
- float polygonNorth = polygonExtent.x + polygonExtent.z;
- float polygonEast = polygonExtent.y + polygonExtent.w;
- float latPadding = padding * polygonExtent.z; // padding as fraction of latitude range
- float lonPadding = padding * polygonExtent.w; // padding as fraction of longitude range
- if (p.x < polygonExtent.x - latPadding || p.x > polygonNorth + latPadding ||
- p.y < polygonExtent.y - lonPadding || p.y > polygonEast + lonPadding) {
- lastPolygonIndex += positionsLength;
- continue; // skip to next
- }
-
- float s = 1.0;
-
- // Check each edge for absolute distance.
- // Cache the previous vertex to halve the texture reads per iteration.
- vec2 prev = getPolygonPosition(lastPolygonIndex + positionsLength - 1);
- for (int i = 0; i < positionsLength; i++) {
- vec2 a = getPolygonPosition(lastPolygonIndex + i);
- vec2 b = prev;
- prev = a;
-
- vec2 ab = b - a;
- vec2 pa = p - a;
- float t = dot(pa, ab) / dot(ab, ab);
- t = clamp(t, 0.0, 1.0);
-
- vec2 pq = pa - t * ab;
- float d = length(pq);
-
- // Inside / outside computation to determine sign
- bvec3 cond = bvec3(p.y >= a.y,
- p.y < b.y,
- ab.x * pa.y > ab.y * pa.x);
- if (all(cond) || all(not(cond))) s = -s;
- if (abs(d) < abs(clipAmount)) {
- clipAmount = d;
- }
- }
-
- // Normalize the range to [0,1]
- vec4 result = (s * vec4(clipAmount * length(extents.zw))) / 2.0 + 0.5;
- // In the case where we've iterated through multiple polygons, take the minimum
- out_FragColor = min(out_FragColor, result);
-
- lastPolygonIndex += positionsLength;
- }
- }`;function Na(e){e=e??G.EMPTY_OBJECT,this._polygons=[],this._totalPositions=0,this.debugShowDistanceTexture=e.debugShowDistanceTexture??!1,this.enabled=e.enabled??!0,this.inverse=e.inverse??!1,this.quality=e.quality??1,this.polygonAdded=new ye,this.polygonRemoved=new ye,this._owner=void 0,this._float32View=void 0,this._extentsFloat32View=void 0,this._extentsCount=0,this._polygonsTexture=void 0,this._extentsTexture=void 0,this._signedDistanceTexture=void 0,this._signedDistanceComputeCommand=void 0;let t=e.polygons;if(l(t)){let n=t.length;for(let i=0;i<n;++i)this._polygons.push(t[i])}}Object.defineProperties(Na.prototype,{length:{get:function(){return this._polygons.length}},totalPositions:{get:function(){return this._totalPositions}},extentsTexture:{get:function(){return this._extentsTexture}},extentsCount:{get:function(){return this._extentsCount}},pixelsNeededForExtents:{get:function(){return this.length}},pixelsNeededForPolygonPositions:{get:function(){return this.totalPositions+3*this.length}},clippingTexture:{get:function(){return this._signedDistanceTexture}},owner:{get:function(){return this._owner}},clippingPolygonsState:{get:function(){return this.inverse?-this.extentsCount:this.extentsCount}}});Na.prototype.add=function(e){let t=this._polygons.length;return this._polygons.push(e),this.polygonAdded.raiseEvent(e,t),e};Na.prototype.get=function(e){return this._polygons[e]};Na.prototype.contains=function(e){return this._polygons.some(t=>Tv.equals(t,e))};Na.prototype.remove=function(e){let t=this._polygons,n=t.findIndex(i=>Tv.equals(i,e));return n===-1?!1:(t.splice(n,1),this.polygonRemoved.raiseEvent(e,n),!0)};function cWe(e,t,n){let i=Math.max(e.height*t,0),o=Math.max(e.width*t,0),r=oe.clone(e,n);return r.south-=i,r.west-=o,r.north+=i,r.east+=o,r.south=Math.max(r.south,-Math.PI),r.west=Math.max(r.west,-Math.PI),r.north=Math.min(r.north,Math.PI),r.east=Math.min(r.east,Math.PI),r}function lWe(e,t){let i=[],o=e.length;for(let s=0;s<o;++s){let c=cWe(t[s],2.5),u=-1;for(let f=0;f<i.length;++f)if(l(oe.simpleIntersection(i[f].extent,c))){u=f;break}if(u===-1)i.push({extent:c,polygonIndices:[s]});else{let f=i[u];f.polygonIndices.push(s),oe.union(f.extent,c,f.extent);for(let d=0;d<i.length;++d)d!==u&&l(oe.simpleIntersection(i[d].extent,f.extent))&&(f.polygonIndices.push(...i[d].polygonIndices),oe.union(f.extent,i[d].extent,f.extent),i.splice(d,1),d<u&&u--,d=-1)}}let r=i.map(s=>s.extent),a=new Map;return i.forEach((s,c)=>s.polygonIndices.forEach(u=>a.set(u,c))),{extentsList:r,extentsIndexByPolygon:a}}Na.prototype.removeAll=function(){let e=this._polygons,t=e.length;for(let n=0;n<t;++n){let i=e[n];this.polygonRemoved.raiseEvent(i,n)}this._polygons=[]};function uWe(e){let t=e._float32View,n=e._extentsFloat32View,i=e._polygons,o=i.map(f=>f.computeSphericalExtents()),{extentsList:r,extentsIndexByPolygon:a}=lWe(i,o),s=Array.from(i.keys()).sort((f,d)=>a.get(f)-a.get(d)),c=0;for(let f of s){let d=i[f],p=d.length;t[c++]=p,t[c++]=a.get(f);let g=o[f];t[c++]=g.south,t[c++]=g.west,t[c++]=g.north-g.south,t[c++]=g.east-g.west;for(let m=0;m<p;++m){let A=d.positions[m],y=Math.hypot(A.x,A.y),x=D.fastApproximateAtan2(y,A.z),b=D.fastApproximateAtan2(A.x,A.y);t[c++]=x,t[c++]=b}}let u=0;for(let f of r){let d=1/(f.east-f.west),p=1/(f.north-f.south);n[u++]=f.south,n[u++]=f.west,n[u++]=p,n[u++]=d}e._extentsCount=r.length}var TX=new z;Na.prototype.update=function(e){let t=e.context;if(!Na.isSupported(e))throw new re("ClippingPolygonCollections are only supported for WebGL 2.");this.debugShowDistanceTexture&&l(this._signedDistanceTexture)&&(l(this.debugCommand)||(this.debugCommand=fWe(this._signedDistanceTexture,e.context)),e.commandList.push(this.debugCommand));let n=this._polygons.reduce((a,s)=>a+s.length,0);if(n===this.totalPositions||(this._totalPositions=n,this.length===0))return;l(this._signedDistanceComputeCommand)&&(this._signedDistanceComputeCommand.canceled=!0,this._signedDistanceComputeCommand=void 0);let i=this._polygonsTexture,o=this._extentsTexture,r=this._signedDistanceTexture;if(l(i)){let a=i.width*i.height;(a<this.pixelsNeededForPolygonPositions||this.pixelsNeededForPolygonPositions<.25*a)&&(i.destroy(),i=void 0,this._polygonsTexture=void 0)}if(!l(i)){let a=Na.getTextureResolution(i,this.pixelsNeededForPolygonPositions,TX);i=new It({context:t,width:a.x,height:a.y,pixelFormat:Xe.RG,pixelDatatype:je.FLOAT,sampler:jt.NEAREST,flipY:!1}),this._float32View=new Float32Array(a.x*a.y*2),this._polygonsTexture=i}if(l(o)){let a=o.width*o.height;(a<this.pixelsNeededForExtents||this.pixelsNeededForExtents<.25*a)&&(o.destroy(),o=void 0,this._extentsTexture=void 0)}if(!l(o)){let a=Na.getTextureResolution(o,this.pixelsNeededForExtents,TX);o=new It({context:t,width:a.x,height:a.y,pixelFormat:Xe.RGBA,pixelDatatype:je.FLOAT,sampler:jt.NEAREST,flipY:!1}),this._extentsFloat32View=new Float32Array(a.x*a.y*4),this._extentsTexture=o}if(uWe(this),o.copyFrom({source:{width:o.width,height:o.height,arrayBufferView:this._extentsFloat32View}}),i.copyFrom({source:{width:i.width,height:i.height,arrayBufferView:this._float32View}}),!l(r)){let a=Na.getClippingDistanceTextureResolution(this,TX);r=new It({context:t,width:a.x,height:a.y,pixelFormat:t.webgl2?Xe.RED:Xe.LUMINANCE,pixelDatatype:je.FLOAT,sampler:new jt({wrapS:un.CLAMP_TO_EDGE,wrapT:un.CLAMP_TO_EDGE,minificationFilter:Vt.LINEAR,magnificationFilter:ti.LINEAR}),flipY:!1}),this._signedDistanceTexture=r}this._signedDistanceComputeCommand=dWe(this)};function fWe(e,t){let i=t.createViewportQuadCommand(`uniform highp sampler2D billboard_texture;
- in vec2 v_textureCoordinates;
- float getSignedDistance(vec2 uv, highp sampler2D clippingDistance) {
- float signedDistance = texture(clippingDistance, uv).r;
- return (signedDistance - 0.5) * 2.0;
- }
- void main()
- {
- float dist = texture(billboard_texture, v_textureCoordinates).r;
- if (dist > 0.5) {
- out_FragColor = vec4(dist, 0.0, 0.0, 1.0);
- } else {
- out_FragColor = vec4(0.0, dist, 0.0, 1.0);
- }
- }
- `,{uniformMap:{billboard_texture:function(){return e}}});return i.pass=Ie.OVERLAY,i}Na.prototype.queueCommands=function(e){l(this._signedDistanceComputeCommand)&&e.commandList.push(this._signedDistanceComputeCommand)};function dWe(e){let t=e._polygonsTexture,n=e._extentsTexture;return new wl({fragmentShaderSource:SM,outputTexture:e._signedDistanceTexture,uniformMap:{u_polygonsLength:function(){return e.length},u_extentsLength:function(){return e.extentsCount},u_extentsTexture:function(){return n},u_polygonTexture:function(){return t}},persists:!1,owner:e,postExecute:()=>{e._signedDistanceComputeCommand=void 0}})}var khe=new oe,hWe=new oe,mWe=new oe;Na.prototype.computeIntersectionWithBoundingVolume=function(e,t){let n=this._polygons,i=n.length,o=qt.OUTSIDE;this.inverse&&(o=qt.INSIDE);let r=e.rectangle;if(!l(r)&&l(e.boundingVolume?.computeCorners)){let a=e.boundingVolume.computeCorners();r=oe.fromCartesianArray(a,t,khe)}l(r)||(r=oe.fromBoundingSphere(e.boundingSphere,t,khe));for(let a=0;a<i;++a){let c=n[a].computeRectangle(mWe),u=oe.simpleIntersection(r,c,hWe);if(l(u))return qt.INTERSECTING}return o};Na.setOwner=function(e,t,n){e!==t[n]&&(t[n]=t[n]&&t[n].destroy(),l(e)&&(e._owner=t,t[n]=e))};Na.isSupported=function(e){return e?.context.webgl2};Na.getTextureResolution=function(e,t,n){if(l(e))return n.x=e.width,n.y=e.height,n;let i=Rt.maximumTextureSize;return n.x=Math.min(t,i),n.y=Math.ceil(t/n.x),n.y*=2,n};Na.getClippingDistanceTextureResolution=function(e,t){let n=e.signedDistanceTexture;if(l(n))return t.x=n.width,t.y=n.height,t;let i=e.quality,o=Math.max(128,Math.ceil(4096*i));return t.x=Math.min(Rt.maximumTextureSize,o),t.y=Math.min(Rt.maximumTextureSize,o),t};Na.getClippingExtentsTextureResolution=function(e,t){let n=e.extentsTexture;return l(n)?(t.x=n.width,t.y=n.height,t):Na.getTextureResolution(n,e.pixelsNeededForExtents,t)};Na.prototype.isDestroyed=function(){return!1};Na.prototype.destroy=function(){return l(this._signedDistanceComputeCommand)&&(this._signedDistanceComputeCommand.canceled=!0),this._polygonsTexture=this._polygonsTexture&&this._polygonsTexture.destroy(),this._extentsTexture=this._extentsTexture&&this._extentsTexture.destroy(),this._signedDistanceTexture=this._signedDistanceTexture&&this._signedDistanceTexture.destroy(),fe(this)};var Qh=Na;var Ev={NONE:0,SCENE_LIGHT:1,SUNLIGHT:2};Ev.fromGlobeFlags=function(e){return e.enableLighting&&e.dynamicAtmosphereLighting?e.dynamicAtmosphereLightingFromSun?Ev.SUNLIGHT:Ev.SCENE_LIGHT:Ev.NONE};Object.freeze(Ev);var mg=Ev;function zhe(){this.lightIntensity=10,this.rayleighCoefficient=new h(55e-7,13e-6,284e-7),this.mieCoefficient=new h(21e-6,21e-6,21e-6),this.rayleighScaleHeight=1e4,this.mieScaleHeight=3200,this.mieAnisotropy=.9,this.hueShift=0,this.saturationShift=0,this.brightnessShift=0,this.dynamicLighting=mg.NONE}zhe.requiresColorCorrect=function(e){return!(D.equalsEpsilon(e.hueShift,0,D.EPSILON7)&&D.equalsEpsilon(e.saturationShift,0,D.EPSILON7)&&D.equalsEpsilon(e.brightnessShift,0,D.EPSILON7))};var bb=zhe;var $h=`uniform vec3 u_radiiAndDynamicAtmosphereColor;
-
- uniform float u_atmosphereLightIntensity;
- uniform float u_atmosphereRayleighScaleHeight;
- uniform float u_atmosphereMieScaleHeight;
- uniform float u_atmosphereMieAnisotropy;
- uniform vec3 u_atmosphereRayleighCoefficient;
- uniform vec3 u_atmosphereMieCoefficient;
-
- const float ATMOSPHERE_THICKNESS = 111e3; // The thickness of the atmosphere in meters.
- const int PRIMARY_STEPS_MAX = 16; // Maximum number of times the ray from the camera to the world position (primary ray) is sampled.
- const int LIGHT_STEPS_MAX = 4; // Maximum number of times the light is sampled from the light source's intersection with the atmosphere to a sample position on the primary ray.
-
- /**
- * This function computes the colors contributed by Rayliegh and Mie scattering on a given ray, as well as
- * the transmittance value for the ray.
- *
- * @param {czm_ray} primaryRay The ray from the camera to the position.
- * @param {float} primaryRayLength The length of the primary ray.
- * @param {vec3} lightDirection The direction of the light to calculate the scattering from.
- * @param {vec3} rayleighColor The variable the Rayleigh scattering will be written to.
- * @param {vec3} mieColor The variable the Mie scattering will be written to.
- * @param {float} opacity The variable the transmittance will be written to.
- * @glslFunction
- */
- void computeScattering(
- czm_ray primaryRay,
- float primaryRayLength,
- vec3 lightDirection,
- float atmosphereInnerRadius,
- out vec3 rayleighColor,
- out vec3 mieColor,
- out float opacity
- ) {
-
- // Initialize the default scattering amounts to 0.
- rayleighColor = vec3(0.0);
- mieColor = vec3(0.0);
- opacity = 0.0;
-
- float atmosphereOuterRadius = atmosphereInnerRadius + ATMOSPHERE_THICKNESS;
-
- vec3 origin = vec3(0.0);
-
- // Calculate intersection from the camera to the outer ring of the atmosphere.
- czm_raySegment primaryRayAtmosphereIntersect = czm_raySphereIntersectionInterval(primaryRay, origin, atmosphereOuterRadius);
-
- // Return empty colors if no intersection with the atmosphere geometry.
- if (primaryRayAtmosphereIntersect == czm_emptyRaySegment) {
- return;
- }
-
- // To deal with smaller values of PRIMARY_STEPS (e.g. 4)
- // we implement a split strategy: sky or horizon.
- // For performance reasons, instead of a if/else branch
- // a soft choice is implemented through a weight 0.0 <= w_stop_gt_lprl <= 1.0
- float x = 1e-7 * primaryRayAtmosphereIntersect.stop / length(primaryRayLength);
- // Value close to 0.0: close to the horizon
- // Value close to 1.0: above in the sky
- float w_stop_gt_lprl = 0.5 * (1.0 + czm_approximateTanh(x));
-
- // The ray should start from the first intersection with the outer atmopshere, or from the camera position, if it is inside the atmosphere.
- float start_0 = primaryRayAtmosphereIntersect.start;
- primaryRayAtmosphereIntersect.start = max(primaryRayAtmosphereIntersect.start, 0.0);
- // The ray should end at the exit from the atmosphere or at the distance to the vertex, whichever is smaller.
- primaryRayAtmosphereIntersect.stop = min(primaryRayAtmosphereIntersect.stop, length(primaryRayLength));
-
- // For the number of ray steps, distinguish inside or outside atmosphere (outer space)
- // (1) from outer space we have to use more ray steps to get a realistic rendering
- // (2) within atmosphere we need fewer steps for faster rendering
- float x_o_a = start_0 - ATMOSPHERE_THICKNESS; // ATMOSPHERE_THICKNESS used as an ad-hoc constant, no precise meaning here, only the order of magnitude matters
- float w_inside_atmosphere = 1.0 - 0.5 * (1.0 + czm_approximateTanh(x_o_a));
- int PRIMARY_STEPS = PRIMARY_STEPS_MAX - int(w_inside_atmosphere * 12.0); // Number of times the ray from the camera to the world position (primary ray) is sampled.
- int LIGHT_STEPS = LIGHT_STEPS_MAX - int(w_inside_atmosphere * 2.0); // Number of times the light is sampled from the light source's intersection with the atmosphere to a sample position on the primary ray.
-
- // Setup for sampling positions along the ray - starting from the intersection with the outer ring of the atmosphere.
- float rayPositionLength = primaryRayAtmosphereIntersect.start;
- // (1) Outside the atmosphere: constant rayStepLength
- // (2) Inside atmosphere: variable rayStepLength to compensate the rough rendering of the smaller number of ray steps
- float totalRayLength = primaryRayAtmosphereIntersect.stop - rayPositionLength;
- float rayStepLengthIncrease = w_inside_atmosphere * ((1.0 - w_stop_gt_lprl) * totalRayLength / (float(PRIMARY_STEPS * (PRIMARY_STEPS + 1)) / 2.0));
- float rayStepLength = max(1.0 - w_inside_atmosphere, w_stop_gt_lprl) * totalRayLength / max(7.0 * w_inside_atmosphere, float(PRIMARY_STEPS));
-
- vec3 rayleighAccumulation = vec3(0.0);
- vec3 mieAccumulation = vec3(0.0);
- vec2 opticalDepth = vec2(0.0);
- vec2 heightScale = vec2(u_atmosphereRayleighScaleHeight, u_atmosphereMieScaleHeight);
-
- // Sample positions on the primary ray.
- for (int i = 0; i < PRIMARY_STEPS_MAX; ++i) {
-
- // The loop should be: for (int i = 0; i < PRIMARY_STEPS; ++i) {...} but WebGL1 cannot
- // loop with non-constant condition, so it has to break early instead
- if (i >= PRIMARY_STEPS) {
- break;
- }
-
- // Calculate sample position along viewpoint ray.
- vec3 samplePosition = primaryRay.origin + primaryRay.direction * (rayPositionLength + rayStepLength);
-
- // Calculate height of sample position above ellipsoid.
- float sampleHeight = length(samplePosition) - atmosphereInnerRadius;
-
- // Calculate and accumulate density of particles at the sample position.
- vec2 sampleDensity = exp(-sampleHeight / heightScale) * rayStepLength;
- opticalDepth += sampleDensity;
-
- // Generate ray from the sample position segment to the light source, up to the outer ring of the atmosphere.
- czm_ray lightRay = czm_ray(samplePosition, lightDirection);
- czm_raySegment lightRayAtmosphereIntersect = czm_raySphereIntersectionInterval(lightRay, origin, atmosphereOuterRadius);
-
- float lightStepLength = lightRayAtmosphereIntersect.stop / float(LIGHT_STEPS);
- float lightPositionLength = 0.0;
-
- vec2 lightOpticalDepth = vec2(0.0);
-
- // Sample positions along the light ray, to accumulate incidence of light on the latest sample segment.
- for (int j = 0; j < LIGHT_STEPS_MAX; ++j) {
-
- // The loop should be: for (int j = 0; i < LIGHT_STEPS; ++j) {...} but WebGL1 cannot
- // loop with non-constant condition, so it has to break early instead
- if (j >= LIGHT_STEPS) {
- break;
- }
-
- // Calculate sample position along light ray.
- vec3 lightPosition = samplePosition + lightDirection * (lightPositionLength + lightStepLength * 0.5);
-
- // Calculate height of the light sample position above ellipsoid.
- float lightHeight = length(lightPosition) - atmosphereInnerRadius;
-
- // Calculate density of photons at the light sample position.
- lightOpticalDepth += exp(-lightHeight / heightScale) * lightStepLength;
-
- // Increment distance on light ray.
- lightPositionLength += lightStepLength;
- }
-
- // Compute attenuation via the primary ray and the light ray.
- vec3 attenuation = exp(-((u_atmosphereMieCoefficient * (opticalDepth.y + lightOpticalDepth.y)) + (u_atmosphereRayleighCoefficient * (opticalDepth.x + lightOpticalDepth.x))));
-
- // Accumulate the scattering.
- rayleighAccumulation += sampleDensity.x * attenuation;
- mieAccumulation += sampleDensity.y * attenuation;
-
- // Increment distance on primary ray.
- rayPositionLength += (rayStepLength += rayStepLengthIncrease);
- }
-
- // Compute the scattering amount.
- rayleighColor = u_atmosphereRayleighCoefficient * rayleighAccumulation;
- mieColor = u_atmosphereMieCoefficient * mieAccumulation;
-
- // Compute the transmittance i.e. how much light is passing through the atmosphere.
- opacity = length(exp(-((u_atmosphereMieCoefficient * opticalDepth.y) + (u_atmosphereRayleighCoefficient * opticalDepth.x))));
- }
-
- vec4 computeAtmosphereColor(
- vec3 positionWC,
- vec3 lightDirection,
- vec3 rayleighColor,
- vec3 mieColor,
- float opacity
- ) {
- // Setup the primary ray: from the camera position to the vertex position.
- vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC;
- vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);
-
- float cosAngle = dot(cameraToPositionWCDirection, lightDirection);
- float cosAngleSq = cosAngle * cosAngle;
-
- float G = u_atmosphereMieAnisotropy;
- float GSq = G * G;
-
- // The Rayleigh phase function.
- float rayleighPhase = 3.0 / (50.2654824574) * (1.0 + cosAngleSq);
- // The Mie phase function.
- float miePhase = 3.0 / (25.1327412287) * ((1.0 - GSq) * (cosAngleSq + 1.0)) / (pow(1.0 + GSq - 2.0 * cosAngle * G, 1.5) * (2.0 + GSq));
-
- // The final color is generated by combining the effects of the Rayleigh and Mie scattering.
- vec3 rayleigh = rayleighPhase * rayleighColor;
- vec3 mie = miePhase * mieColor;
-
- vec3 color = (rayleigh + mie) * u_atmosphereLightIntensity;
-
- return vec4(color, opacity);
- }
- `;var wM=`uniform samplerCube u_radianceMap;
-
- in vec2 v_textureCoordinates;
-
-
- const float twoSqrtPi = 2.0 * sqrt(czm_pi);
-
- // Coutesy of https://www.ppsloan.org/publications/StupidSH36.pdf
- float computeShBasis(int index, vec3 s) {
- if (index == 0) { // l = 0, m = 0
- return 1.0 / twoSqrtPi;
- }
-
- if (index == 1) { // l = 1, m = -1
- return -sqrt(3.0) * s.y / twoSqrtPi;
- }
-
- if (index == 2) { // l = 1, m = 0
- return sqrt(3.0) * s.z / twoSqrtPi;
- }
-
- if (index == 3) { // l = 1, m = 1
- return -sqrt(3.0) * s.x / twoSqrtPi;
- }
-
- if (index == 4) { // l = 2, m = -2
- return sqrt(15.0) * s.y * s.x / twoSqrtPi;
- }
-
- if (index == 5) { // l = 2, m = -1
- return -sqrt(15.0) * s.y * s.z / twoSqrtPi;
- }
-
- if (index == 6) { // l = 2, m = 0
- return sqrt(5.0) * (3.0 * s.z * s.z - 1.0) / 2.0 / twoSqrtPi;
- }
-
- if (index == 7) { // l = 2, m = 1
- return -sqrt(15.0) * s.x * s.z / twoSqrtPi;
- }
-
- if (index == 8) { // l = 2, m = 2
- return sqrt(15.0) * (s.x * s.x - s.y * s.y) / 2.0 / twoSqrtPi;
- }
-
- return 0.0;
- }
-
- float vdcRadicalInverse(int i)
- {
- float r;
- float base = 2.0;
- float value = 0.0;
- float invBase = 1.0 / base;
- float invBi = invBase;
- for (int x = 0; x < 100; x++)
- {
- if (i <= 0)
- {
- break;
- }
- r = mod(float(i), base);
- value += r * invBi;
- invBi *= invBase;
- i = int(float(i) * invBase);
- }
- return value;
- }
-
- vec2 hammersley2D(int i, int N)
- {
- return vec2(float(i) / float(N), vdcRadicalInverse(i));
- }
-
- // Sample count is relatively low for the sake of performance, but should still be enough to capture directionality needed for third-order harmonics
- const int samples = 256;
- const float solidAngle = 1.0 / float(samples);
-
- void main() {
- // Get the current coefficient based on the uv
- vec2 uv = v_textureCoordinates.xy * 3.0;
- int coefficientIndex = int(floor(uv.y) * 3.0 + floor(uv.x));
-
- for (int i = 0; i < samples; ++i) {
- vec2 xi = hammersley2D(i, samples);
- float phi = czm_twoPi * xi.x;
- float cosTheta = 1.0 - 2.0 * sqrt(1.0 - xi.y * xi.y);
- float sinTheta = sqrt(1.0 - cosTheta * cosTheta);
- vec3 direction = normalize(vec3(sinTheta * cos(phi), cosTheta, sinTheta * sin(phi)));
-
- // Generate the spherical harmonics basis from the direction
- float Ylm = computeShBasis(coefficientIndex, direction);
-
- vec3 lookupDirection = -direction.xyz;
- lookupDirection.z = -lookupDirection.z;
-
- vec4 color = czm_textureCube(u_radianceMap, lookupDirection, 0.0);
-
- // Use the relevant function for this coefficient
- out_FragColor += Ylm * color * solidAngle * sinTheta;
- }
-
- }
- `;var IM=`precision highp float;
-
- in vec2 v_textureCoordinates;
-
- uniform vec3 u_faceDirection; // Current cubemap face
- uniform vec3 u_positionWC;
- uniform mat4 u_enuToFixedFrame;
- uniform vec4 u_brightnessSaturationGammaIntensity;
- uniform vec4 u_groundColor; // alpha component represent albedo
-
- vec4 getCubeMapDirection(vec2 uv, vec3 faceDir) {
- vec2 scaledUV = uv * 2.0 - 1.0;
-
- if (faceDir.x != 0.0) {
- return vec4(faceDir.x, scaledUV.x * faceDir.x, -scaledUV.y, 0.0);
- } else if (faceDir.y != 0.0) {
- return vec4(scaledUV.x, -scaledUV.y * faceDir.y, faceDir.y, 0.0);
- } else {
- return vec4(scaledUV.x * faceDir.z, -faceDir.z, -scaledUV.y, 0.0);
- }
- }
-
- void main() {
- float height = length(u_positionWC);
- float atmosphereInnerRadius = u_radiiAndDynamicAtmosphereColor.y;
- float ellipsoidHeight = max(height - atmosphereInnerRadius, 0.0);
-
- // Scale the position to ensure the sky color is present, even when underground.
- vec3 positionWC = u_positionWC / height * (ellipsoidHeight + atmosphereInnerRadius);
-
- float atmosphereOuterRadius = u_radiiAndDynamicAtmosphereColor.x;
- float atmosphereHeight = atmosphereOuterRadius - atmosphereInnerRadius;
-
- vec3 direction = (u_enuToFixedFrame * getCubeMapDirection(v_textureCoordinates, u_faceDirection)).xyz;
- vec3 normalizedDirection = normalize(direction);
-
- czm_ray ray = czm_ray(positionWC, normalizedDirection);
- czm_raySegment intersection = czm_raySphereIntersectionInterval(ray, vec3(0.0), atmosphereInnerRadius);
- if (!czm_isEmpty(intersection)) {
- intersection = czm_rayEllipsoidIntersectionInterval(ray, vec3(0.0), czm_ellipsoidInverseRadii);
- }
-
- bool onEllipsoid = intersection.start >= 0.0;
- float rayLength = czm_branchFreeTernary(onEllipsoid, intersection.start, atmosphereOuterRadius);
-
- // Compute sky color for each position on a sphere at radius centered around the provided position's origin
- vec3 skyPositionWC = positionWC + normalizedDirection * rayLength;
-
- float lightEnum = u_radiiAndDynamicAtmosphereColor.z;
- vec3 lightDirectionWC = normalize(czm_getDynamicAtmosphereLightDirection(skyPositionWC, lightEnum));
- vec3 mieColor;
- vec3 rayleighColor;
- float opacity;
- czm_computeScattering(
- ray,
- rayLength,
- lightDirectionWC,
- atmosphereInnerRadius,
- rayleighColor,
- mieColor,
- opacity
- );
-
- vec4 atmopshereColor = czm_computeAtmosphereColor(ray, lightDirectionWC, rayleighColor, mieColor, opacity);
-
- #ifdef ATMOSPHERE_COLOR_CORRECT
- const bool ignoreBlackPixels = true;
- atmopshereColor.rgb = czm_applyHSBShift(atmopshereColor.rgb, czm_atmosphereHsbShift, ignoreBlackPixels);
- #endif
-
- vec3 lookupDirection = -normalizedDirection;
- // Flipping the X vector is a cheap way to get the inverse of czm_temeToPseudoFixed, since that's a rotation about Z.
- lookupDirection.x = -lookupDirection.x;
- lookupDirection = -normalize(czm_temeToPseudoFixed * lookupDirection);
- lookupDirection.x = -lookupDirection.x;
-
- // Values outside the atmopshere are rendered as black, when they should be treated as transparent
- float skyAlpha = clamp((1.0 - ellipsoidHeight / atmosphereHeight) * atmopshereColor.a, 0.0, 1.0);
- skyAlpha = czm_branchFreeTernary(length(atmopshereColor.rgb) <= czm_epsilon7, 0.0, skyAlpha); // Treat black as transparent
-
- // Blend starmap with atmopshere scattering
- float intensity = u_brightnessSaturationGammaIntensity.w;
- vec4 sceneSkyBoxColor = czm_textureCube(czm_environmentMap, lookupDirection);
- vec3 skyBackgroundColor = mix(czm_backgroundColor.rgb, sceneSkyBoxColor.rgb, sceneSkyBoxColor.a);
- vec4 combinedSkyColor = vec4(mix(skyBackgroundColor, atmopshereColor.rgb * intensity, skyAlpha), 1.0);
-
- // Compute ground color based on amount of reflected light, then blend it with ground atmosphere based on height
- vec3 up = normalize(positionWC);
- float occlusion = max(dot(lightDirectionWC, up), 0.05);
- vec4 groundColor = vec4(u_groundColor.rgb * u_groundColor.a * (vec3(intensity * occlusion) + atmopshereColor.rgb), 1.0);
- vec4 blendedGroundColor = mix(groundColor, atmopshereColor, clamp(ellipsoidHeight / atmosphereHeight, 0.0, 1.0));
-
- vec4 color = czm_branchFreeTernary(onEllipsoid, blendedGroundColor, combinedSkyColor);
-
- float brightness = u_brightnessSaturationGammaIntensity.x;
- float saturation = u_brightnessSaturationGammaIntensity.y;
- float gamma = u_brightnessSaturationGammaIntensity.z;
-
- #ifdef ENVIRONMENT_COLOR_CORRECT
- color.rgb = mix(vec3(0.0), color.rgb, brightness);
- color.rgb = czm_saturation(color.rgb, saturation);
- #endif
- color.rgb = pow(color.rgb, vec3(gamma)); // Normally this would be in the ifdef above, but there is a precision issue with the atmopshere scattering transmittance (alpha). Having this line is a workaround for that issue, even when gamma is 1.0.
- color.rgb = czm_gammaCorrect(color.rgb);
-
- out_FragColor = color;
- }
- `;var DM=`precision highp float;
-
- in vec3 v_textureCoordinates;
-
- uniform float u_roughness;
- uniform samplerCube u_radianceTexture;
- uniform vec3 u_faceDirection;
-
- float vdcRadicalInverse(int i)
- {
- float r;
- float base = 2.0;
- float value = 0.0;
- float invBase = 1.0 / base;
- float invBi = invBase;
- for (int x = 0; x < 100; x++)
- {
- if (i <= 0)
- {
- break;
- }
- r = mod(float(i), base);
- value += r * invBi;
- invBi *= invBase;
- i = int(float(i) * invBase);
- }
- return value;
- }
-
- vec2 hammersley2D(int i, int N)
- {
- return vec2(float(i) / float(N), vdcRadicalInverse(i));
- }
-
- vec3 importanceSampleGGX(vec2 xi, float alphaRoughness, vec3 N)
- {
- float alphaRoughnessSquared = alphaRoughness * alphaRoughness;
- float phi = czm_twoPi * xi.x;
- float cosTheta = sqrt((1.0 - xi.y) / (1.0 + (alphaRoughnessSquared - 1.0) * xi.y));
- float sinTheta = sqrt(1.0 - cosTheta * cosTheta);
- vec3 H = vec3(sinTheta * cos(phi), sinTheta * sin(phi), cosTheta);
- vec3 upVector = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);
- vec3 tangentX = normalize(cross(upVector, N));
- vec3 tangentY = cross(N, tangentX);
- return tangentX * H.x + tangentY * H.y + N * H.z;
- }
-
- // Sample count is relatively low for the sake of performance, but should still be enough to prevent artifacting in lower roughnesses
- const int samples = 128;
-
- void main() {
- vec3 normal = u_faceDirection;
- vec3 V = normalize(v_textureCoordinates);
- float roughness = u_roughness;
-
- vec4 color = vec4(0.0);
- float weight = 0.0;
- for (int i = 0; i < samples; ++i) {
- vec2 xi = hammersley2D(i, samples);
- vec3 H = importanceSampleGGX(xi, roughness, V);
- vec3 L = 2.0 * dot(V, H) * H - V; // reflected vector
-
- float NdotL = max(dot(V, L), 0.0);
- if (NdotL > 0.0) {
- color += vec4(czm_textureCube(u_radianceTexture, L).rgb, 1.0) * NdotL;
- weight += NdotL;
- }
- }
- out_FragColor = color / weight;
- }
- `;var PM=`in vec3 position;
- out vec3 v_textureCoordinates;
-
- uniform vec3 u_faceDirection;
-
- vec3 getCubeMapDirection(vec2 uv, vec3 faceDir) {
- vec2 scaledUV = uv;
-
- if (faceDir.x != 0.0) {
- return vec3(faceDir.x, scaledUV.y, scaledUV.x * faceDir.x);
- } else if (faceDir.y != 0.0) {
- return vec3(scaledUV.x, -faceDir.y, -scaledUV.y * faceDir.y);
- } else {
- return vec3(scaledUV.x * faceDir.z, scaledUV.y, -faceDir.z);
- }
- }
-
- void main()
- {
- v_textureCoordinates = getCubeMapDirection(position.xy, u_faceDirection);
- v_textureCoordinates.y = -v_textureCoordinates.y;
- v_textureCoordinates.z = -v_textureCoordinates.z;
- gl_Position = vec4(position, 1.0);
- }
- `;function mi(e){this._position=void 0,this._radianceMapDirty=!1,this._radianceCommandsDirty=!1,this._convolutionsCommandsDirty=!1,this._irradianceCommandDirty=!1,this._irradianceTextureDirty=!1,this._sphericalHarmonicCoefficientsDirty=!1,this._shouldRegenerateShaders=!1,this._shouldReset=!1,e=e??G.EMPTY_OBJECT;let t=Math.max(Math.floor(Math.min(e.mipmapLevels??7,Math.log2(Rt.maximumCubeMapSize))),0);this._mipmapLevels=t;let n=Math.max(t-1,0)*6;this._radianceMapComputeCommands=new Array(6),this._convolutionComputeCommands=new Array(n),this._irradianceComputeCommand=void 0,this._radianceMapFS=void 0,this._irradianceMapFS=void 0,this._convolveSP=void 0,this._va=void 0,this._radianceMapTextures=new Array(6),this._specularMapTextures=new Array(n),this._radianceCubeMap=void 0,this._irradianceMapTexture=void 0,this._sphericalHarmonicCoefficients=mi.DEFAULT_SPHERICAL_HARMONIC_COEFFICIENTS.slice(),this._lastTime=new Q;let i=Math.max(Math.pow(2,t-1),1);this._textureDimensions=new z(i,i),this._radiiAndDynamicAtmosphereColor=new h,this._sceneEnvironmentMap=void 0,this._backgroundColor=void 0,this._owner=void 0,this.enabled=e.enabled??!0,this.shouldUpdate=!0,this.maximumSecondsDifference=e.maximumSecondsDifference??3600,this.maximumPositionEpsilon=e.maximumPositionEpsilon??1e3,this.atmosphereScatteringIntensity=e.atmosphereScatteringIntensity??2,this.gamma=e.gamma??1,this.brightness=e.brightness??1,this.saturation=e.saturation??1,this.groundColor=e.groundColor??mi.AVERAGE_EARTH_GROUND_COLOR,this.groundAlbedo=e.groundAlbedo??.31}Object.defineProperties(mi.prototype,{owner:{get:function(){return this._owner}},shouldRegenerateShaders:{get:function(){return this._shouldRegenerateShaders}},position:{get:function(){return this._position},set:function(e){h.equalsEpsilon(e,this._position,0,this.maximumPositionEpsilon)||(this._position=h.clone(e,this._position),this._shouldReset=!0)}},radianceCubeMap:{get:function(){return this._radianceCubeMap}},maximumMipmapLevel:{get:function(){return this._mipmapLevels}},sphericalHarmonicCoefficients:{get:function(){return this._sphericalHarmonicCoefficients}}});mi._maximumComputeCommandCount=8;mi._activeComputeCommandCount=0;mi._nextFrameCommandQueue=[];mi._queueCommand=(e,t)=>{if(mi._activeComputeCommandCount>=mi._maximumComputeCommandCount){mi._nextFrameCommandQueue.push(e);return}t.commandList.push(e),mi._activeComputeCommandCount++};mi._updateCommandQueue=e=>{if(mi._maximumComputeCommandCount=Math.log2(Rt.maximumCubeMapSize),mi._nextFrameCommandQueue.length>0&&mi._activeComputeCommandCount<mi._maximumComputeCommandCount){let t=mi._nextFrameCommandQueue.shift();for(;l(t)&&mi._activeComputeCommandCount<mi._maximumComputeCommandCount;){if(t.owner.isDestroyed()||t.canceled){t=mi._nextFrameCommandQueue.shift();continue}e.commandList.push(t),mi._activeComputeCommandCount++,t=mi._nextFrameCommandQueue.shift()}l(t)&&mi._nextFrameCommandQueue.push(t)}};mi.setOwner=function(e,t,n){e!==t[n]&&(t[n]=t[n]&&t[n].destroy(),l(e)&&(e._owner=t,t[n]=e))};mi.prototype.reset=function(){let e=this._radianceMapComputeCommands.length;for(let t=0;t<e;++t)l(this._radianceMapComputeCommands[t])&&(this._radianceMapComputeCommands[t].canceled=!0),this._radianceMapComputeCommands[t]=void 0;e=this._convolutionComputeCommands.length;for(let t=0;t<e;++t)l(this._convolutionComputeCommands[t])&&(this._convolutionComputeCommands[t].canceled=!0),this._convolutionComputeCommands[t]=void 0;l(this._irradianceComputeCommand)&&(this._irradianceComputeCommand.canceled=!0,this._irradianceComputeCommand=void 0),this._radianceMapDirty=!0,this._radianceCommandsDirty=!0,this._convolutionsCommandsDirty=!1,this._irradianceCommandDirty=!1};var pWe=new h,gWe=new h;function _We(e,t){let n=e._position,i=t.atmosphere,o=t.mapProjection.ellipsoid,r=o.scaleToGeodeticSurface(n,gWe),a=1.025,s=pWe,c=l(r)?h.magnitude(r):o.maximumRadius;return s.x=c*a,s.y=c,s.z=i.dynamicLighting,!h.equalsEpsilon(e._radiiAndDynamicAtmosphereColor,s)||t.environmentMap!==e._sceneEnvironmentMap||t.backgroundColor!==e._backgroundColor?(h.clone(s,e._radiiAndDynamicAtmosphereColor),e._sceneEnvironmentMap=t.environmentMap,e._backgroundColor=t.backgroundColor,!0):!1}var Uhe=new h,AWe=new M,yWe=new se,xWe=new V;function bWe(e,t){let n=t.context,i=e._textureDimensions;if(l(e._radianceCubeMap)||(e._radianceCubeMap=new $r({context:n,width:i.x,height:i.y,pixelDatatype:je.UNSIGNED_BYTE,pixelFormat:Xe.RGBA})),e._radianceCommandsDirty){let o=e._radianceMapFS;l(o)||(o=new He({sources:[$h,IM]}),e._radianceMapFS=o),bb.requiresColorCorrect(t.atmosphere)&&o.defines.push("ATMOSPHERE_COLOR_CORRECT");let r=e._position,a=e._radiiAndDynamicAtmosphereColor,s=t.mapProjection.ellipsoid,c=pt.eastNorthUpToFixedFrame(r,s,AWe),u=yWe;u.x=e.brightness,u.y=e.saturation,u.z=e.gamma,u.w=e.atmosphereScatteringIntensity,(e.brightness!==1||e.saturation!==1||e.gamma!==1)&&o.defines.push("ENVIRONMENT_COLOR_CORRECT");let f=0;for(let d of $r.faceNames()){let p=e._radianceMapTextures[f];l(p)&&!p.isDestroyed()&&p.destroy(),p=new It({context:n,width:i.x,height:i.y,pixelDatatype:je.UNSIGNED_BYTE,pixelFormat:Xe.RGBA}),e._radianceMapTextures[f]=p;let g=f,m=new wl({fragmentShaderSource:o,outputTexture:p,uniformMap:{u_radiiAndDynamicAtmosphereColor:()=>a,u_enuToFixedFrame:()=>c,u_faceDirection:()=>$r.getDirection(d,Uhe),u_positionWC:()=>r,u_brightnessSaturationGammaIntensity:()=>u,u_groundColor:()=>e.groundColor.withAlpha(e.groundAlbedo,xWe)},owner:e});m.postExecute=()=>{if(e.isDestroyed()||m.canceled){mi._activeComputeCommandCount--;return}let A=e._radianceMapComputeCommands;A[g]=void 0;let y=new fa({context:n,colorTextures:[e._radianceMapTextures[g]]});y._bind(),e._radianceCubeMap[d].copyFromFramebuffer(),y._unBind(),y.destroy(),mi._activeComputeCommandCount--,A.some(l)||(e._convolutionsCommandsDirty=!0,e._shouldRegenerateShaders=!0)},e._radianceMapComputeCommands[f]=m,mi._queueCommand(m,t),f++}e._radianceCommandsDirty=!1}}function CWe(e,t){let n=e._radianceCubeMap;n.generateMipmap();let i=e._mipmapLevels,o=e._textureDimensions,r=o.x/2,a=o.y/2,s=t.context,c=0,u=()=>{let p=e._specularMapTextures.length;c>=p&&(e._irradianceCommandDirty=!0,i>1&&(n.sampler=new jt({minificationFilter:Vt.LINEAR_MIPMAP_LINEAR}),e._shouldRegenerateShaders=!0,e._va.destroy(),e._va=void 0,e._convolveSP.destroy(),e._convolveSP=void 0))},f=(p,g,m,A,y)=>()=>{if(e.isDestroyed()||p.canceled){mi._activeComputeCommandCount--;return}let x=e._convolutionComputeCommands;x[g]=void 0,n.copyFace(t,m,A,y),c++,mi._activeComputeCommandCount--,m.destroy(),e._specularMapTextures[g]=void 0,u()},d=0;for(let p=1;p<i;++p){for(let g of $r.faceNames()){l(e._specularMapTextures[d])&&e._specularMapTextures[d].destroy();let m=e._specularMapTextures[d]=new It({context:s,width:r,height:a,pixelDatatype:je.UNSIGNED_BYTE,pixelFormat:Xe.RGBA}),A=e._va;l(A)||(A=$r.createVertexArray(s,g),e._va=A);let y=e._convolveSP;l(y)||(y=Kt.fromCache({context:s,vertexShaderSource:PM,fragmentShaderSource:DM,attributeLocations:{positions:0}}),e._convolveSP=y);let x=new wl({shaderProgram:y,vertexArray:A,outputTexture:m,persists:!0,owner:e,uniformMap:{u_roughness:()=>p/(i-1),u_radianceTexture:()=>n??s.defaultTexture,u_faceDirection:()=>$r.getDirection(g,Uhe)}});x.postExecute=f(x,d,m,g,p),e._convolutionComputeCommands[d]=x,mi._queueCommand(x,t),++d}r/=2,a/=2}u()}var Vhe=new z(3,3);function TWe(e,t){let n=t.context,i=Vhe,o=e._irradianceMapTexture;l(o)&&!o.isDestroyed()&&o.destroy(),o=new It({context:n,width:i.x,height:i.y,pixelDatatype:je.FLOAT,pixelFormat:Xe.RGBA}),e._irradianceMapTexture=o;let r=e._irradianceMapFS;l(r)||(r=new He({sources:[wM]}),e._irradianceMapFS=r);let a=new wl({fragmentShaderSource:r,outputTexture:o,owner:e,uniformMap:{u_radianceMap:()=>e._radianceCubeMap??n.defaultTexture}});a.postExecute=()=>{if(e.isDestroyed()||a.canceled){mi._activeComputeCommandCount--;return}e._irradianceTextureDirty=!1,e._irradianceComputeCommand=void 0,e._sphericalHarmonicCoefficientsDirty=!0,e._irradianceMapFS=void 0,mi._activeComputeCommandCount--},e._irradianceComputeCommand=a,mi._queueCommand(a,t),e._irradianceTextureDirty=!0}function EWe(e,t){let n=t.context;if(!l(e._irradianceMapTexture))return;let i=new fa({context:n,colorTextures:[e._irradianceMapTexture],destroyAttachments:!1}),o=Vhe,r=n.readPixels({x:0,y:0,width:o.x,height:o.y,framebuffer:i});for(let a=0;a<9;++a)e._sphericalHarmonicCoefficients[a]=h.unpack(r,a*4),h.multiplyByScalar(e._sphericalHarmonicCoefficients[a],e.atmosphereScatteringIntensity,e._sphericalHarmonicCoefficients[a]);i.destroy(),e._irradianceMapTexture.destroy(),e._irradianceMapTexture=void 0,e._shouldRegenerateShaders=!0}mi.prototype.update=function(e){let t=e.mode;if(!(mi.isDynamicUpdateSupported(e)&&this._mipmapLevels>=1)||!this.enabled||!this.shouldUpdate||!l(this._position)||t===ie.MORPHING){this._shouldRegenerateShaders=!1;return}mi._updateCommandQueue(e);let i=e.atmosphere.dynamicLighting,o=_We(this,e)||i===mg.SUNLIGHT&&!Q.equalsEpsilon(e.time,this._lastTime,this.maximumSecondsDifference);if(this._shouldReset||o){this.reset(),this._shouldReset=!1,this._lastTime=Q.clone(e.time,this._lastTime);return}if(this._radianceMapDirty&&(bWe(this,e),this._radianceMapDirty=!1),this._convolutionsCommandsDirty&&(CWe(this,e),this._convolutionsCommandsDirty=!1),this._irradianceCommandDirty&&(TWe(this,e),this._irradianceCommandDirty=!1),this._irradianceTextureDirty){this._shouldRegenerateShaders=!1;return}if(this._sphericalHarmonicCoefficientsDirty){EWe(this,e),this._sphericalHarmonicCoefficientsDirty=!1;return}this._shouldRegenerateShaders=!1};mi.prototype.isDestroyed=function(){return!1};mi.prototype.destroy=function(){let e=this._radianceMapComputeCommands.length;for(let t=0;t<e;++t)this._radianceMapComputeCommands[t]=void 0;e=this._convolutionComputeCommands.length;for(let t=0;t<e;++t)this._convolutionComputeCommands[t]=void 0;this._irradianceMapComputeCommand=void 0,e=this._radianceMapTextures.length;for(let t=0;t<e;++t)this._radianceMapTextures[t]=this._radianceMapTextures[t]&&!this._radianceMapTextures[t].isDestroyed()&&this._radianceMapTextures[t].destroy();e=this._specularMapTextures.length;for(let t=0;t<e;++t)this._specularMapTextures[t]=this._specularMapTextures[t]&&!this._specularMapTextures[t].isDestroyed()&&this._specularMapTextures[t].destroy();return this._radianceCubeMap=this._radianceCubeMap&&this._radianceCubeMap.destroy(),this._irradianceMapTexture=this._irradianceMapTexture&&!this._irradianceMapTexture.isDestroyed()&&this._irradianceMapTexture.destroy(),l(this._va)&&this._va.destroy(),l(this._convolveSP)&&this._convolveSP.destroy(),fe(this)};mi.isDynamicUpdateSupported=function(e){let t=e.context;return t.halfFloatingPointTexture||t.colorBufferFloat};mi.AVERAGE_EARTH_GROUND_COLOR=Object.freeze(V.fromCssColorString("#717145"));mi.DEFAULT_SPHERICAL_HARMONIC_COEFFICIENTS=Object.freeze([Object.freeze(new h(.35449,.35449,.35449)),h.ZERO,h.ZERO,h.ZERO,h.ZERO,h.ZERO,h.ZERO,h.ZERO,h.ZERO]);var pg=mi;var vv={HIGHLIGHT:0,REPLACE:1,MIX:2};vv.getColorBlend=function(e,t){if(e===vv.HIGHLIGHT)return 0;if(e===vv.REPLACE)return 1;if(e===vv.MIX)return D.clamp(t,D.EPSILON4,1)};Object.freeze(vv);var sl=vv;var jhe={SURFACES_ONLY:0,SURFACES_AND_EDGES:1,EDGES_ONLY:2};Object.freeze(jhe);var Md=jhe;var Ghe={XTRANSLATE:"xTranslate",YTRANSLATE:"yTranslate",ZTRANSLATE:"zTranslate",XROTATE:"xRotate",YROTATE:"yRotate",ZROTATE:"zRotate",XSCALE:"xScale",YSCALE:"yScale",ZSCALE:"zScale",UNIFORMSCALE:"uniformScale"};Object.freeze(Ghe);var cl=Ghe;var Hhe={STEP:0,LINEAR:1,CUBICSPLINE:2};Object.freeze(Hhe);var Jh=Hhe;var Whe={};function RM(e){this._count=e.count,this._properties=We(e.properties,!0)}RM.prototype.hasProperty=function(e){return Un.hasProperty(e,this._properties,Whe)};RM.prototype.getPropertyIds=function(e){return Un.getPropertyIds(this._properties,Whe,e)};RM.prototype.getProperty=function(e,t){let n=this._properties[t];if(l(n))return We(n[e],!0)};RM.prototype.setProperty=function(e,t,n){let i=this._properties[t];l(i)||(i=new Array(this._count),this._properties[t]=i),i[e]=We(n,!0)};var gg=RM;function Rc(e){e=e??G.EMPTY_OBJECT,this._name=e.name,this._id=e.id,this._count=e.count,this._extras=e.extras,this._extensions=e.extensions,this._metadataTable=e.metadataTable,this._jsonMetadataTable=e.jsonMetadataTable,this._batchTableHierarchy=e.batchTableHierarchy,this._texture=e.texture}Object.defineProperties(Rc.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}},count:{get:function(){return this._count}},class:{get:function(){if(l(this._metadataTable))return this._metadataTable.class}},properties:{get:function(){if(l(this._metadataTable))return this._metadataTable.properties}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}},byteLength:{get:function(){let e=0;return l(this._metadataTable)&&(e+=this._metadataTable.byteLength),l(this._batchTableHierarchy)&&(e+=this._batchTableHierarchy.byteLength),e}},texture:{get:function(){return this._texture}}});Rc.prototype.hasProperty=function(e,t){return!!(l(this._metadataTable)&&this._metadataTable.hasProperty(t)||l(this._batchTableHierarchy)&&this._batchTableHierarchy.hasProperty(e,t)||l(this._jsonMetadataTable)&&this._jsonMetadataTable.hasProperty(t))};Rc.prototype.hasPropertyBySemantic=function(e,t){return l(this._metadataTable)?this._metadataTable.hasPropertyBySemantic(t):!1};Rc.prototype.propertyExists=function(e){return!!(l(this._metadataTable)&&this._metadataTable.hasProperty(e)||l(this._batchTableHierarchy)&&this._batchTableHierarchy.propertyExists(e)||l(this._jsonMetadataTable)&&this._jsonMetadataTable.hasProperty(e))};Rc.prototype.propertyExistsBySemantic=function(e){return l(this._metadataTable)?this._metadataTable.hasPropertyBySemantic(e):!1};var EX=[];Rc.prototype.getPropertyIds=function(e,t){if(t=l(t)?t:[],t.length=0,l(this._metadataTable)){let n=this._metadataTable.getPropertyIds(EX);Qn(t,n)}if(l(this._batchTableHierarchy)){let n=this._batchTableHierarchy.getPropertyIds(e,EX);Qn(t,n)}if(l(this._jsonMetadataTable)){let n=this._jsonMetadataTable.getPropertyIds(EX);Qn(t,n)}return t};Rc.prototype.getProperty=function(e,t){let n;if(l(this._metadataTable)&&(n=this._metadataTable.getProperty(e,t),l(n))||l(this._batchTableHierarchy)&&(n=this._batchTableHierarchy.getProperty(e,t),l(n))||l(this._jsonMetadataTable)&&(n=this._jsonMetadataTable.getProperty(e,t),l(n)))return n};Rc.prototype.setProperty=function(e,t,n){l(this._metadataTable)&&this._metadataTable.setProperty(e,t,n)||l(this._batchTableHierarchy)&&this._batchTableHierarchy.setProperty(e,t,n)||(l(this._jsonMetadataTable)||(this._jsonMetadataTable=new gg({count:this._count,properties:{}})),this._jsonMetadataTable.setProperty(e,t,n))};Rc.prototype.getPropertyBySemantic=function(e,t){if(l(this._metadataTable))return this._metadataTable.getPropertyBySemantic(e,t)};Rc.prototype.setPropertyBySemantic=function(e,t,n){return l(this._metadataTable)?this._metadataTable.setPropertyBySemantic(e,t,n):!1};Rc.prototype.getPropertyTypedArray=function(e){if(l(this._metadataTable))return this._metadataTable.getPropertyTypedArray(e)};Rc.prototype.getPropertyTypedArrayBySemantic=function(e){if(l(this._metadataTable))return this._metadataTable.getPropertyTypedArrayBySemantic(e)};Rc.prototype.isClass=function(e,t){let n=this._batchTableHierarchy;return l(n)?n.isClass(e,t):!1};Rc.prototype.isExactClass=function(e,t){return this.getExactClassName(e)===t};Rc.prototype.getExactClassName=function(e){let t=this._batchTableHierarchy;if(l(t))return t.getClassName(e)};Rc.prototype.destroy=function(){return this._texture=this._texture&&this._texture.destroy(),fe(this)};var Ql=Rc;function qhe(e){e=e??G.EMPTY_OBJECT;let t=e.property,n=e.classProperty,i=e.textures,o=l(t.channels)?t.channels:[0],r=t,a=Ru.createModelTextureReader({textureInfo:r,channels:vWe(o),texture:i[r.index]});this._min=t.min,this._max=t.max;let s=t.offset,c=t.scale,u=n.hasValueTransform||l(s)||l(c);s=s??n.offset,c=c??n.scale,s=n.unpackVectorAndMatrixTypes(s),c=n.unpackVectorAndMatrixTypes(c),this._offset=s,this._scale=c,this._hasValueTransform=u,this._textureReader=a,this._classProperty=n,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(qhe.prototype,{textureReader:{get:function(){return this._textureReader}},hasValueTransform:{get:function(){return this._hasValueTransform}},offset:{get:function(){return this._offset}},scale:{get:function(){return this._scale}},classProperty:{get:function(){return this._classProperty}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});function vWe(e){return e.map(function(t){return"rgba".charAt(t)}).join("")}var OM=qhe;function vX(e){e=e??G.EMPTY_OBJECT;let t=e.propertyTexture,n=e.class,i=e.textures,o=t.extensions,r=t.extras,a={};if(l(t.properties))for(let s in t.properties)t.properties.hasOwnProperty(s)&&(a[s]=new OM({property:t.properties[s],classProperty:n.properties[s],textures:i}));this._name=e.name,this._id=e.id,this._class=n,this._properties=a,this._extras=r,this._extensions=o}Object.defineProperties(vX.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}},class:{get:function(){return this._class}},properties:{get:function(){return this._properties}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});vX.prototype.getProperty=function(e){return this._properties[e]};var _g=vX;function Yhe(e){e=e??G.EMPTY_OBJECT;let t=e.property,n=e.classProperty;this._attribute=t.attribute,this._classProperty=n,this._min=t.min,this._max=t.max;let i=t.offset,o=t.scale,r=n.hasValueTransform||l(i)||l(o);i=i??n.offset,o=o??n.scale,i=n.unpackVectorAndMatrixTypes(i),o=n.unpackVectorAndMatrixTypes(o),this._offset=i,this._scale=o,this._hasValueTransform=r,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(Yhe.prototype,{attribute:{get:function(){return this._attribute}},hasValueTransform:{get:function(){return this._hasValueTransform}},offset:{get:function(){return this._offset}},scale:{get:function(){return this._scale}},classProperty:{get:function(){return this._classProperty}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});var MM=Yhe;function SX(e){e=e??G.EMPTY_OBJECT;let t=e.propertyAttribute,n=e.class,i={};if(l(t.properties))for(let o in t.properties)t.properties.hasOwnProperty(o)&&(i[o]=new MM({property:t.properties[o],classProperty:n.properties[o]}));this._name=e.name,this._id=e.id,this._class=n,this._properties=i,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(SX.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}},class:{get:function(){return this._class}},properties:{get:function(){return this._properties}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});SX.prototype.getProperty=function(e){return this._properties[e]};var Cb=SX;function Sv(e){e=e??G.EMPTY_OBJECT,this._schema=e.schema;let t=e.propertyTables;this._propertyTableCount=l(t)?t.length:0,this._propertyTables=t??[],this._propertyTextures=e.propertyTextures??[],this._propertyAttributes=e.propertyAttributes??[],this._statistics=e.statistics,this._extras=e.extras,this._extensions=e.extensions}Object.defineProperties(Sv.prototype,{schema:{get:function(){return this._schema}},statistics:{get:function(){return this._statistics}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}},propertyTableCount:{get:function(){return this._propertyTableCount}},propertyTables:{get:function(){return this._propertyTables}},propertyTextures:{get:function(){return this._propertyTextures}},propertyAttributes:{get:function(){return this._propertyAttributes}},propertyTablesByteLength:{get:function(){if(!l(this._propertyTables))return 0;let e=0,t=this._propertyTables.length;for(let n=0;n<t;n++)e+=this._propertyTables[n].byteLength;return e}}});Sv.prototype.getPropertyTable=function(e){return this._propertyTables[e]};Sv.prototype.getPropertyTexture=function(e){return this._propertyTextures[e]};Sv.prototype.getPropertyAttribute=function(e){return this._propertyAttributes[e]};Sv.prototype.destroy=function(){let e=this._propertyTables;for(let t=0;t<e.length;t++)e[t]=e[t]&&e[t].destroy();return fe(this)};var Ls=Sv;function SWe(e){e=e??G.EMPTY_OBJECT;let t=e.extension,n=e.schema,i=[];if(l(t.propertyTables))for(let a=0;a<t.propertyTables.length;a++){let s=t.propertyTables[a],c=n.classes[s.class],u=wWe(s,e.bufferViews,c,e.context),f=new wd({count:s.count,properties:s.properties,class:c,bufferViews:e.bufferViews});i.push(new Ql({id:a,name:s.name,count:s.count,metadataTable:f,extras:s.extras,extensions:s.extensions,texture:u}))}let o=[];if(l(t.propertyTextures))for(let a=0;a<t.propertyTextures.length;a++){let s=t.propertyTextures[a];o.push(new _g({id:a,name:s.name,propertyTexture:s,class:n.classes[s.class],textures:e.textures}))}let r=[];if(l(t.propertyAttributes))for(let a=0;a<t.propertyAttributes.length;a++){let s=t.propertyAttributes[a];r.push(new Cb({id:a,name:s.name,class:n.classes[s.class],propertyAttribute:s}))}return new Ls({schema:n,propertyTables:i,propertyTextures:o,propertyAttributes:r,statistics:t.statistics,extras:t.extras,extensions:t.extensions})}var BM=4;function wWe(e,t,n,i){let o=e.properties;if(!l(o))return;let r=e.count,a;try{a=IWe(o,t,n,r)}catch(f){console.warn(`Failed to create texture for property table "${e.name}": ${f.message}`);return}let s=a.length;if(s===0)return;if(r>Rt.maximumTextureSize||s>Rt.maximumTextureSize){_t("PropertyTableTextureExceedsMaximumSize",`Cannot create a texture for the property table "${e.name}" because it exceeds the maximum texture size of ${Rt.maximumTextureSize}.`);return}let c=PWe(a,r),u=new jt({wrapS:un.CLAMP_TO_EDGE,wrapT:un.CLAMP_TO_EDGE,minificationFilter:Vt.NEAREST,magnificationFilter:ti.NEAREST});return It.create({context:i,pixelFormat:Xe.RGBA,pixelDatatype:je.UNSIGNED_BYTE,sampler:u,flipY:!1,source:{width:r,height:s,arrayBufferView:c}})}function IWe(e,t,n,i){let o=[],r=n.properties;for(let[a,s]of Object.entries(r)){if(!s.isGpuCompatible(BM))continue;let c=e[a],u=l(c)?t[c.values]:DWe(s,i),f=u.length,d=s.cpuBytesPerElement(),p=f/d;if(p!==i)throw new re(`Property with ID: "${a}" has (${p}), which does not match number of features in the property table: (${i}).`);o.push({view:u,classProperty:s})}return o}function DWe(e,t){let n=e.noData,i=dt.getComponentCount(e.type),o=e.isArray?e.arrayLength:1;e.type===dt.ENUM&&(n=e.enumType.valuesByName[n]),i===1&&(n=[n]),o===1&&(n=[n]);let r=e.cpuBytesPerElement(),a=Dt.getSizeInBytes(e.valueType),s=new ArrayBuffer(r*t),c=new DataView(s),u=Dt.getDataViewAccessors(c,e.valueType);for(let f=0;f<t;f++)for(let d=0;d<o;d++)for(let p=0;p<i;p++){let g=d*i+p;u.set(r*f+g*a,n[d][p])}return new Uint8Array(s)}function PWe(e,t){let n=e.length,i=new Uint8Array(n*t*BM),o=new DataView(i.buffer,i.byteOffset,i.byteLength);for(let r=0;r<n;r++){let a=e[r],s=a.classProperty,c=r*t*BM,u=s.valueType,f=Dt.gpuComponentType(u);if(u!==f){OWe(a,o,c);continue}RWe(a,i,c)}return i}function RWe(e,t,n){let i=e.view,o=e.classProperty.cpuBytesPerElement(),r=i.length/o;for(let a=0;a<r;a++){let s=a*o,c=n+a*BM;t.set(i.subarray(s,s+o),c)}}function OWe(e,t,n){let i=e.classProperty,o=e.view,r=i.valueType,a=Dt.gpuComponentType(r),s=i.cpuBytesPerElement(),c=o.length/s,u=new DataView(o.buffer,o.byteOffset,o.byteLength),f=Dt.getDataViewAccessors(u,r),d=Dt.getDataViewAccessors(t,a),p=Dt.downcastFunction(r);for(let g=0;g<c;g++){let m=g*s,A=n+g*BM,y=f.get(m);d.set(A,p(y))}}var LM=SWe;function MWe(e){e=e??G.EMPTY_OBJECT;let t=e.extension,n=e.schema,i,o=[],r;if(l(t.featureTables))for(r=Object.keys(t.featureTables).sort(),i=0;i<r.length;i++){let s=r[i],c=t.featureTables[s],u=n.classes[c.class],f=new wd({count:c.count,properties:c.properties,class:u,bufferViews:e.bufferViews});o.push(new Ql({id:s,count:c.count,metadataTable:f,extras:c.extras,extensions:c.extensions}))}let a=[];if(l(t.featureTextures))for(r=Object.keys(t.featureTextures).sort(),i=0;i<r.length;i++){let s=r[i],c=t.featureTextures[s];a.push(new _g({id:s,propertyTexture:BWe(c),class:n.classes[c.class],textures:e.textures}))}return new Ls({schema:n,propertyTables:o,propertyTextures:a,statistics:t.statistics,extras:t.extras,extensions:t.extensions})}function BWe(e){let t={class:e.class,properties:{}},n=e.properties;for(let i in n)if(n.hasOwnProperty(i)){let o=n[i],r={channels:LWe(o.channels),extras:o.extras,extensions:o.extensions};t.properties[i]=wt(o.texture,r,!0)}return t}function LWe(e){let t=e.length,n=new Array(t);for(let i=0;i<t;i++)n[i]="rgba".indexOf(e[i]);return n}var NM=MWe;var wX=class extends qi{constructor(t){super(),t=t??G.EMPTY_OBJECT;let{gltf:n,extension:i,extensionLegacy:o,gltfResource:r,baseResource:a,supportedImageFormats:s,frameState:c,cacheKey:u,asynchronous:f=!0}=t;this._gltfResource=r,this._baseResource=a,this._gltf=n,this._extension=i,this._extensionLegacy=o,this._supportedImageFormats=s,this._frameState=c,this._cacheKey=u,this._asynchronous=f,this._bufferViewLoaders=[],this._bufferViewIds=[],this._textureLoaders=[],this._textureIds=[],this._schemaLoader=void 0,this._structuralMetadata=void 0,this._state=gt.UNLOADED,this._promise=void 0}get cacheKey(){return this._cacheKey}get structuralMetadata(){return this._structuralMetadata}load(){return l(this._promise)?this._promise:(this._state=gt.LOADING,this._promise=NWe(this),this._promise)}process(t){if(this._state===gt.READY)return!0;if(this._state!==gt.LOADED)return!1;let n=this._textureLoaders,i=n.length,o=!0;for(let c=0;c<i;++c){let f=n[c].process(t);o=o&&f}if(!o)return!1;let r=this._schemaLoader.schema,a={};for(let c=0;c<this._bufferViewIds.length;++c){let u=this._bufferViewIds[c],f=this._bufferViewLoaders[c];if(!f.isDestroyed()){let d=new Uint8Array(f.typedArray);a[u]=d}}let s={};for(let c=0;c<this._textureIds.length;++c){let u=this._textureIds[c],f=n[c];f.isDestroyed()||(s[u]=f.texture)}return l(this._extension)?this._structuralMetadata=LM({extension:this._extension,schema:r,bufferViews:a,textures:s,context:t.context}):this._structuralMetadata=NM({extension:this._extensionLegacy,schema:r,bufferViews:a,textures:s}),Xhe(this),this._state=gt.READY,!0}unload(){Xhe(this),XWe(this),l(this._schemaLoader)&&Ii.unload(this._schemaLoader),this._schemaLoader=void 0,l(this._structuralMetadata)&&this._structuralMetadata.destroy(),this._structuralMetadata=void 0}};async function NWe(e){try{let t=VWe(e),n=qWe(e),i=YWe(e);return await Promise.all([t,n,i]),e.isDestroyed()?void 0:(e._gltf=void 0,e._state=gt.LOADED,e)}catch(t){if(e.isDestroyed())return;throw e.unload(),e._state=gt.FAILED,e.getError("Failed to load structural metadata",t)}}function FWe(e,t){for(let n in e)if(e.hasOwnProperty(n)){let i=e[n],o=i.values,r=i.arrayOffsets,a=i.stringOffsets;l(o)&&(t[o]=!0),l(r)&&(t[r]=!0),l(a)&&(t[a]=!0)}}function kWe(e,t){for(let n in e)if(e.hasOwnProperty(n)){let i=e[n],o=i.bufferView,r=i.arrayOffsetBufferView,a=i.stringOffsetBufferView;l(o)&&(t[o]=!0),l(r)&&(t[r]=!0),l(a)&&(t[a]=!0)}}function zWe(e){let t=e.propertyTables,n={};if(l(t))for(let i=0;i<t.length;i++){let o=t[i];FWe(o.properties,n)}return n}function UWe(e){let t=e.featureTables,n={};if(l(t)){for(let i in t)if(t.hasOwnProperty(i)){let r=t[i].properties;l(r)&&kWe(r,n)}}return n}async function VWe(e){let t;l(e._extension)?t=zWe(e._extension):t=UWe(e._extensionLegacy);let n=[];for(let i in t)if(t.hasOwnProperty(i)){let o=Ii.getBufferViewLoader({gltf:e._gltf,bufferViewId:parseInt(i),gltfResource:e._gltfResource,baseResource:e._baseResource});e._bufferViewLoaders.push(o),e._bufferViewIds.push(i),n.push(o.load())}return Promise.all(n)}function jWe(e){let t={},n=e.propertyTextures;if(l(n))for(let i=0;i<n.length;i++){let r=n[i].properties;l(r)&&GWe(r,t)}return t}function GWe(e,t){for(let n in e)if(e.hasOwnProperty(n)){let i=e[n];t[i.index]=i}}function HWe(e){let t={},n=e.featureTextures;if(l(n)){for(let i in n)if(n.hasOwnProperty(i)){let r=n[i].properties;l(r)&&WWe(r,t)}}return t}function WWe(e,t){for(let n in e)if(e.hasOwnProperty(n)){let o=e[n].texture;t[o.index]=o}}function qWe(e){let t;l(e._extension)?t=jWe(e._extension):t=HWe(e._extensionLegacy);let n=e._gltf,i=e._gltfResource,o=e._baseResource,r=e._supportedImageFormats,a=e._frameState,s=e._asynchronous,c=[];for(let u in t)if(t.hasOwnProperty(u)){let f=Ii.getTextureLoader({gltf:n,textureInfo:t[u],gltfResource:i,baseResource:o,supportedImageFormats:r,frameState:a,asynchronous:s});e._textureLoaders.push(f),e._textureIds.push(u),c.push(f.load())}return Promise.all(c)}async function YWe(e){let t=e._extension??e._extensionLegacy,n;if(l(t.schemaUri)){let i=e._baseResource.getDerivedResource({url:t.schemaUri});n=Ii.getSchemaLoader({resource:i})}else n=Ii.getSchemaLoader({schema:t.schema});if(e._schemaLoader=n,await n.load(),!n.isDestroyed())return n.schema}function Xhe(e){let t=e._bufferViewLoaders,n=t.length;for(let i=0;i<n;++i)Ii.unload(t[i]);e._bufferViewLoaders.length=0,e._bufferViewIds.length=0}function XWe(e){let t=e._textureLoaders,n=t.length;for(let i=0;i<n;++i)Ii.unload(t[i]);e._textureLoaders.length=0,e._textureIds.length=0}var FM=wX;var Tb={TRANSLATION:"TRANSLATION",ROTATION:"ROTATION",SCALE:"SCALE",FEATURE_ID:"_FEATURE_ID"};Tb.fromGltfSemantic=function(e){let t=e,i=/^(\w+)_\d+$/.exec(e);switch(i!==null&&(t=i[1]),t){case"TRANSLATION":return Tb.TRANSLATION;case"ROTATION":return Tb.ROTATION;case"SCALE":return Tb.SCALE;case"_FEATURE_ID":return Tb.FEATURE_ID}};Object.freeze(Tb);var Er=Tb;var KWe=65534,QWe=255;function bj(e){e=e??G.EMPTY_OBJECT;let t=e.triangleIndices,n=e.outlineIndices,i=e.originalVertexCount;this._triangleIndices=t,this._originalVertexCount=i,this._edges=new $he(n,i),this._outlineCoordinatesTypedArray=void 0,this._extraVertices=[],$We(this)}Object.defineProperties(bj.prototype,{updatedTriangleIndices:{get:function(){return this._triangleIndices}},outlineCoordinates:{get:function(){return this._outlineCoordinatesTypedArray}}});function $We(e){let t=e._triangleIndices,n=e._edges,i=[],o=e._extraVertices,r=e._originalVertexCount,a={};for(let s=0;s<t.length;s+=3){let c=t[s],u=t[s+1],f=t[s+2],d=!1,p=d||n.hasEdge(c,u),g=d||n.hasEdge(u,f),m=d||n.hasEdge(f,c),A=Khe(i,c,u,f,p,g,m);for(;l(A);){let y=a[A];if(!l(y)){y=r+o.length;let x=A;for(;x>=r;)x=o[x-r];o.push(x),a[A]=y}y>KWe&&(t instanceof Uint16Array||t instanceof Uint8Array)?t=new Uint32Array(t):y>QWe&&t instanceof Uint8Array&&(t=new Uint16Array(t)),A===c?(c=y,t[s]=y):A===u?(u=y,t[s+1]=y):(f=y,t[s+2]=y),A=Khe(i,c,u,f,p,g,m)}}e._triangleIndices=t,e._outlineCoordinatesTypedArray=new Float32Array(i)}function Khe(e,t,n,i,o,r,a){let s=a?1:0,c=o?1:0,u=0,f=IX(e,t,s,c,u);if(f===0)return t;let d=0,p=o?1:0,g=r?1:0,m=IX(e,n,d,p,g);if(m===0)return n;let A=a?1:0,y=0,x=r?1:0,b=IX(e,i,A,y,x);if(b===0)return i;let C=f&m&b,E,S,w;if(C&1)E=0,S=1,w=2;else if(C&2)E=0,w=1,S=2;else if(C&4)S=0,E=1,w=2;else if(C&8)S=0,w=1,E=2;else if(C&16)w=0,E=1,S=2;else if(C&32)w=0,S=1,E=2;else{let L=DX(f),_=DX(m),T=DX(b);return L<_&&L<T?t:_<T?n:i}let P=t*3;e[P+E]=s,e[P+S]=c,e[P+w]=u;let R=n*3;e[R+E]=d,e[R+S]=p,e[R+w]=g;let B=i*3;e[B+E]=A,e[B+S]=y,e[B+w]=x}function IX(e,t,n,i,o){let r=t*3,a=e[r],s=e[r+1],c=e[r+2];return l(a)?(a===n&&s===i&&c===o)<<0|(a===n&&s===o&&c===i)<<1|(a===i&&s===n&&c===o)<<2|(a===i&&s===o&&c===n)<<3|(a===o&&s===n&&c===i)<<4|(a===o&&s===i&&c===n)<<5:63}function DX(e){return(e&1)+(e>>1&1)+(e>>2&1)+(e>>3&1)+(e>>4&1)+(e>>5&1)}bj.prototype.updateAttribute=function(e){let t=this._extraVertices,n=e.length,i=n/this._originalVertexCount,o=t.length,r=e.constructor,a=new r(e.length+o*i);a.set(e);for(let s=0;s<o;s++){let c=t[s]*i,u=n+s*i;for(let f=0;f<i;f++)a[u+f]=a[c+f]}return a};bj.createTexture=function(e){let t=e.cache.modelOutliningCache;if(l(t)||(t=e.cache.modelOutliningCache={}),l(t.outlineTexture))return t.outlineTexture;let n=Math.min(4096,Rt.maximumTextureSize),i=n,o=Qhe(i),r=[];for(;i>1;)i>>=1,r.push(Qhe(i));let a=new It({context:e,source:{arrayBufferView:o,mipLevels:r},width:n,height:1,pixelFormat:Xe.LUMINANCE,sampler:new jt({wrapS:un.CLAMP_TO_EDGE,wrapT:un.CLAMP_TO_EDGE,minificationFilter:Vt.LINEAR_MIPMAP_LINEAR,magnificationFilter:ti.LINEAR})});return t.outlineTexture=a,a};function Qhe(e){let t=new Uint8Array(e);return t[e-1]=192,e===8?t[e-1]=96:e===4?t[e-1]=48:e===2?t[e-1]=24:e===1&&(t[e-1]=12),t}function $he(e,t){this._originalVertexCount=t,this._edges=new Set;for(let n=0;n<e.length;n+=2){let i=e[n],o=e[n+1],r=Math.min(i,o),a=Math.max(i,o),s=r*this._originalVertexCount+a;this._edges.add(s)}}$he.prototype.hasEdge=function(e,t){let n=Math.min(e,t),i=Math.max(e,t),o=n*this._originalVertexCount+i;return this._edges.has(o)};var Eb=bj;function Jhe(e){this.attribute=e,this.loadBuffer=!1,this.loadTypedArray=!1}function JWe(e){this.indices=e,this.loadBuffer=!1,this.loadTypedArray=!1}function Cj(e){this.primitive=e,this.attributePlans=[],this.indicesPlan=void 0,this.needsOutlines=!1,this.outlineIndices=void 0,this.needsGaussianSplats=!1}Cj.prototype.postProcess=function(e){this.needsOutlines&&(ZWe(this),nqe(this,e)),this.needsGaussianSplats&&tqe(this,e)};function ZWe(e){let t=e.primitive,n=t.indices,i=t.attributes[0].count,o=new Eb({triangleIndices:n.typedArray,outlineIndices:e.outlineIndices,originalVertexCount:i});n.typedArray=o.updatedTriangleIndices,n.indexDatatype=Ue.fromTypedArray(n.typedArray);let r=eqe(o.outlineCoordinates),a=new Jhe(r);a.loadBuffer=!0,a.loadTypedArray=!1,e.attributePlans.push(a),t.outlineCoordinates=a.attribute;let s=e.attributePlans,c=e.attributePlans.length;for(let u=0;u<c;u++){let f=s[u].attribute;f.typedArray=o.updateAttribute(f.typedArray)}}function eqe(e){let t=new _n.Attribute;return t.name="_OUTLINE_COORDINATES",t.typedArray=e,t.componentDatatype=Y.FLOAT,t.type=Ft.VEC3,t.normalized=!1,t.count=e.length/3,t}function tqe(e,t){let n=e.attributePlans,i=n.length;for(let o=0;o<i;o++){let r=n[o];r.loadBuffer=!1,r.loadTypedArray=!0}}function nqe(e,t){iqe(e.attributePlans,t),l(e.indicesPlan)&&oqe(e.indicesPlan,t)}function iqe(e,t){let n=e.length;for(let i=0;i<n;i++){let o=e[i],r=o.attribute,a=r.typedArray;if(o.loadBuffer){let s=Ke.createVertexBuffer({typedArray:a,context:t,usage:Oe.STATIC_DRAW});s.vertexArrayDestroyable=!1,r.buffer=s}o.loadTypedArray||(r.typedArray=void 0)}}function oqe(e,t){let n=e.indices;if(e.loadBuffer){let i=Ke.createIndexBuffer({typedArray:n.typedArray,context:t,usage:Oe.STATIC_DRAW,indexDatatype:n.indexDatatype});n.buffer=i,i.vertexArrayDestroyable=!1}e.loadTypedArray||(n.typedArray=void 0)}Cj.AttributeLoadPlan=Jhe;Cj.IndicesLoadPlan=JWe;var vb=Cj;function rqe(e){e=e??G.EMPTY_OBJECT,this.webp=e.webp??!1,this.basis=e.basis??!1}var kM=rqe;function Zhe(e){this._position=e.position,this._adjustmentParams=e.adjustmentParams}Object.defineProperties(Zhe.prototype,{position:{get:function(){return this._position}},adjustmentParams:{get:function(){return this._adjustmentParams}}});var zM=Zhe;function eme(e){this._position=e.position,this._adjustmentParams=e.adjustmentParams,this._covarianceMatrix=e.covarianceMatrix}Object.defineProperties(eme.prototype,{position:{get:function(){return this._position}},adjustmentParams:{get:function(){return this._adjustmentParams}},covarianceMatrix:{get:function(){return this._covarianceMatrix}}});var UM=eme;function tme(e){this._groupFlags=e.groupFlags,this._rotationThetas=e.rotationThetas,this._params=e.params}Object.defineProperties(tme.prototype,{groupFlags:{get:function(){return this._groupFlags}},rotationThetas:{get:function(){return this._rotationThetas}},params:{get:function(){return this._params}}});var VM=tme;var nme={Direct:"Direct",Indirect:"Indirect"};Object.freeze(nme);var MA=nme;function ime(e){this._storageType=e.storageType,this._anchorPointsIndirect=e.anchorPointsIndirect,this._anchorPointsDirect=e.anchorPointsDirect,this._intraTileCorrelationGroups=e.intraTileCorrelationGroups,this._covarianceDirect=e.covarianceDirect}Object.defineProperties(ime.prototype,{storageType:{get:function(){return this._storageType}},anchorPointsIndirect:{get:function(){return this._anchorPointsIndirect}},anchorPointsDirect:{get:function(){return this._anchorPointsDirect}},intraTileCorrelationGroups:{get:function(){return this._intraTileCorrelationGroups}},covarianceDirect:{get:function(){return this._covarianceDirect}}});var wv=ime;function ome(e){this._A=e.A,this._alpha=e.alpha,this._beta=e.beta,this._T=e.T}Object.defineProperties(ome.prototype,{A:{get:function(){return this._A}},alpha:{get:function(){return this._alpha}},beta:{get:function(){return this._beta}},T:{get:function(){return this._T}}});var jM=ome;function Iv(){}function rme(e){return new $(e[0],e[1],e[3],e[1],e[2],e[4],e[3],e[4],e[5])}function aqe(e){let t=h.fromArray(e.position,0,new h),n=h.fromArray(e.adjustmentParams,0,new h);return new zM({position:t,adjustmentParams:n})}function sqe(e){let t=h.fromArray(e.position,0,new h),n=h.fromArray(e.adjustmentParams,0,new h),i=rme(e.covarianceMatrix);return new UM({position:t,adjustmentParams:n,covarianceMatrix:i})}function cqe(e){let t=e.groupFlags,n=h.fromArray(e.rotationThetas,0,new h),i=[];for(let r of e.params){let a=new jM({A:r.A,alpha:r.alpha,beta:r.beta,T:r.T});i.push(a)}return new VM({groupFlags:t,rotationThetas:n,params:i})}Iv.load=function(e){let t=e.storageType;if(t===MA.Direct)return Iv.loadDirect(e);if(t===MA.Indirect)return Iv.loadIndirect(e);throw new re(`Invalid storage type in NGA_gpm_local - expected 'Direct' or 'Indirect', but found ${t}`)};Iv.loadDirect=function(e){let t=[],n=e.anchorPointsDirect;for(let r of n){let a=aqe(r);t.push(a)}let i=rme(e.covarianceDirectUpperTriangle);return new wv({storageType:MA.Direct,anchorPointsDirect:t,covarianceDirect:i})};Iv.loadIndirect=function(e){let t=[],n=e.anchorPointsIndirect;for(let a of n){let s=sqe(a);t.push(s)}let i=e.intraTileCorrelationGroups,o=[];for(let a of i){let s=cqe(a);o.push(s)}return new wv({storageType:MA.Indirect,anchorPointsIndirect:t,intraTileCorrelationGroups:o})};var GM=Iv;function ame(e){this._traits=e.traits,this._noData=e.noData,this._offset=e.offset,this._scale=e.scale,this._index=e.index,this._texCoord=e.texCoord}Object.defineProperties(ame.prototype,{traits:{get:function(){return this._traits}},noData:{get:function(){return this._noData}},offset:{get:function(){return this._offset}},scale:{get:function(){return this._scale}},index:{get:function(){return this._index}},texCoord:{get:function(){return this._texCoord}}});var HM=ame;function sme(e){this._min=e.min,this._max=e.max,this._source=e.source}Object.defineProperties(sme.prototype,{min:{get:function(){return this._min}},max:{get:function(){return this._max}},source:{get:function(){return this._source}}});var WM=sme;function cme(e){this._ppeTextures=e}Object.defineProperties(cme.prototype,{ppeTextures:{get:function(){return this._ppeTextures}}});var qM=cme;function na(e){e=e??G.EMPTY_OBJECT;let t=e.gltf,n=e.extension,i=e.gltfResource,o=e.baseResource,r=e.supportedImageFormats,a=e.frameState,s=e.cacheKey,c=e.asynchronous??!0;this._gltfResource=i,this._baseResource=o,this._gltf=t,this._extension=n,this._supportedImageFormats=r,this._frameState=a,this._cacheKey=s,this._asynchronous=c,this._textureLoaders=[],this._textureIds=[],this._meshPrimitiveGpmLocal=void 0,this._structuralMetadata=void 0,this._state=gt.UNLOADED,this._promise=void 0}l(Object.create)&&(na.prototype=Object.create(qi.prototype),na.prototype.constructor=na);Object.defineProperties(na.prototype,{cacheKey:{get:function(){return this._cacheKey}},meshPrimitiveGpmLocal:{get:function(){return this._meshPrimitiveGpmLocal}},structuralMetadata:{get:function(){return this._structuralMetadata}}});na.prototype._loadResources=async function(){try{return await this._loadTextures(),this.isDestroyed()?void 0:(this._gltf=void 0,this._state=gt.LOADED,this)}catch(e){if(this.isDestroyed())return;throw this.unload(),this._state=gt.FAILED,this.getError("Failed to load GPM data",e)}};na.prototype.load=function(){return l(this._promise)?this._promise:(this._state=gt.LOADING,this._promise=this._loadResources(this),this._promise)};function lqe(e){let t={},n=e.ppeTextures;if(l(n))for(let i=0;i<n.length;i++){let o=n[i];t[o.index]=o}return t}na.prototype._loadTextures=function(){let e;l(this._extension)&&(e=lqe(this._extension));let t=this._gltf,n=this._gltfResource,i=this._baseResource,o=this._supportedImageFormats,r=this._frameState,a=this._asynchronous,s=[];for(let c in e)if(e.hasOwnProperty(c)){let u=Ii.getTextureLoader({gltf:t,textureInfo:e[c],gltfResource:n,baseResource:i,supportedImageFormats:o,frameState:r,asynchronous:a});this._textureLoaders.push(u),this._textureIds.push(c),s.push(u.load())}return Promise.all(s)};na.ppeTexturesMetadataSchemaCache=new Map;na._createPpeTextureClassJson=function(e,t){let n=e.traits,i=n.source,o=e.offset??0,r=(e.scale??1)*255;return{name:`PPE texture class ${t}`,properties:{[i]:{name:"PPE",type:"SCALAR",componentType:"UINT8",normalized:!0,offset:o,scale:r,min:n.min,max:n.max}}}};na._obtainPpeTexturesMetadataSchema=function(e){let n=na._collectPpeTexturePropertyIdentifiers(e).toString(),i=na.ppeTexturesMetadataSchemaCache.get(n);if(l(i))return i;let r={id:`PPE_TEXTURE_SCHEMA_${na.ppeTexturesMetadataSchemaCache.size}`,classes:{}},a=e.ppeTextures;for(let s=0;s<a.length;s++){let c=a[s],u=`ppeTexture_${s}`,f=na._createPpeTextureClassJson(c,s);r.classes[u]=f}return i=Xl.fromJson(r),na.ppeTexturesMetadataSchemaCache.set(n,i),i};na._collectPpeTexturePropertyIdentifiers=function(e){let t=[],n=e.ppeTextures;for(let i=0;i<n.length;i++){let o=n[i],r=na._createPpeTextureClassJson(o,i),a=JSON.stringify(r);t.push(a)}return t};na._convertToStructuralMetadata=function(e,t){let n=[],i=na._obtainPpeTexturesMetadataSchema(e),o=e.ppeTextures;for(let a=0;a<o.length;a++){let s=o[a],c=`ppeTexture_${a}`,f=s.traits.source,d=i.classes[c],p={class:c,properties:{[f]:{index:s.index,texCoord:s.texCoord}}};n.push(new _g({id:a,name:s.name,propertyTexture:p,class:d,textures:t}))}return new Ls({schema:i,propertyTables:[],propertyTextures:n,propertyAttributes:[]})};na.prototype.process=function(e){if(this._state===gt.READY)return!0;if(this._state!==gt.LOADED)return!1;let t=this._textureLoaders,n=t.length,i=!0;for(let u=0;u<n;++u){let d=t[u].process(e);i=i&&d}if(!i)return!1;let o={};for(let u=0;u<this._textureIds.length;++u){let f=this._textureIds[u],d=t[u];d.isDestroyed()||(o[f]=d.texture)}let r=[],a=this._extension;if(l(a.ppeTextures)){let u=a.ppeTextures;for(let f of u){let d=f.traits,p=new WM({min:d.min,max:d.max,source:d.source}),g=new HM({traits:p,noData:f.noData,offset:f.offset,scale:f.scale,index:f.index,texCoord:f.texCoord});r.push(g)}}let s=new qM(r);this._meshPrimitiveGpmLocal=s;let c=na._convertToStructuralMetadata(s,o);return this._structuralMetadata=c,this._state=gt.READY,!0};na.prototype._unloadTextures=function(){let e=this._textureLoaders,t=e.length;for(let n=0;n<t;++n)Ii.unload(e[n]);this._textureLoaders.length=0,this._textureIds.length=0};na.prototype.unload=function(){this._unloadTextures(),this._gltf=void 0,this._extension=void 0,this._structuralMetadata=void 0};var YM=na;function uqe(e){let n=(e.extensions??G.EMPTY_OBJECT).EXT_mesh_primitive_restart,i=e.primitives;if(!l(n))return i;let o=[];Qn(o,i);for(let r of n.primitiveGroups){let a=r.primitives[0];if(!l(a)||!i[a])return i;let s={...i[a],indices:r.indices};switch(s.mode){case ee.TRIANGLE_FAN:case ee.TRIANGLE_STRIP:case ee.LINE_STRIP:case ee.LINE_LOOP:break;default:return i}for(let c of r.primitives){let u=o[c];if(!l(u?.indices)||u.mode!==s.mode)return i;o[c]=void 0}o[a]=s}return o.filter(l)}var XM=uqe;var{Attribute:fqe,Indices:dqe,FeatureIdAttribute:ume,FeatureIdTexture:fme,FeatureIdImplicitRange:dme,MorphTarget:hqe,Primitive:mqe,Instances:pqe,Skin:gqe,Node:_qe,AnimatedPropertyType:Aqe,AnimationSampler:yqe,AnimationTarget:xqe,AnimationChannel:bqe,Animation:Cqe,ArticulationStage:Tqe,Articulation:Eqe,Asset:vqe,Scene:Sqe,Components:wqe,MetallicRoughness:Iqe,SpecularGlossiness:Dqe,Specular:Pqe,Anisotropy:PX,Clearcoat:RX,LineStyle:Rqe,Material:Oqe,Vector:Mqe,Polygon:Bqe}=_n,Zo={NOT_LOADED:0,LOADING:1,LOADED:2,PROCESSING:3,POST_PROCESSING:4,PROCESSED:5,READY:6,FAILED:7,UNLOADED:8},OX=class extends qi{constructor(t){super(),t=t??G.EMPTY_OBJECT;let{gltfResource:n,typedArray:i,releaseGltfJson:o=!1,asynchronous:r=!0,incrementallyLoadTextures:a=!0,upAxis:s=Li.Y,forwardAxis:c=Li.Z,loadAttributesAsTypedArray:u=!1,loadAttributesFor2D:f=!1,enablePick:d=!1,loadIndicesForWireframe:p=!1,loadPrimitiveOutline:g=!0,loadForClassification:m=!1,renameBatchIdSemantic:A=!1}=t,{baseResource:y=n.clone()}=t;this._gltfJson=t.gltfJson,this._gltfResource=n,this._baseResource=y,this._typedArray=i,this._releaseGltfJson=o,this._asynchronous=r,this._incrementallyLoadTextures=a,this._upAxis=s,this._forwardAxis=c,this._loadAttributesAsTypedArray=u,this._loadAttributesFor2D=f,this._enablePick=d,this._loadIndicesForWireframe=p,this._loadPrimitiveOutline=g,this._loadForClassification=m,this._renameBatchIdSemantic=A,this._sortedPropertyTableIds=void 0,this._sortedFeatureTextureIds=void 0,this._gltfJsonLoader=void 0,this._state=Zo.NOT_LOADED,this._textureState=Zo.NOT_LOADED,this._promise=void 0,this._processError=void 0,this._textureErrors=[],this._primitiveLoadPlans=[],this._loaderPromises=[],this._textureLoaders=[],this._texturesPromises=[],this._textureCallbacks=[],this._bufferViewLoaders=[],this._geometryLoaders=[],this._geometryCallbacks=[],this._structuralMetadataLoader=void 0,this._meshPrimitiveGpmLoader=void 0,this._loadResourcesPromise=void 0,this._resourcesLoaded=!1,this._texturesLoaded=!1,this._supportedImageFormats=void 0,this._postProcessBuffers=[],this._components=void 0}get cacheKey(){}get components(){return this._components}get gltfJson(){return l(this._gltfJsonLoader)?this._gltfJsonLoader.gltf:this._gltfJson}get incrementallyLoadTextures(){return this._incrementallyLoadTextures}get texturesLoaded(){return this._texturesLoaded}async load(){return l(this._promise)?this._promise:(this._promise=Lqe(this),this._promise)}_process(t){return this._state===Zo.READY?!0:(this._state===Zo.PROCESSING&&Fqe(this,t),this._resourcesLoaded&&this._state===Zo.POST_PROCESSING&&(kqe(this,t.context),this._state=Zo.PROCESSED),this._resourcesLoaded&&this._state===Zo.PROCESSED?(lme(this),this._typedArray=void 0,this._state=Zo.READY,!0):!1)}_processTextures(t){if(this._textureState===Zo.READY)return!0;if(this._textureState!==Zo.PROCESSING)return!1;let n=!0,i=this._textureLoaders;for(let o=0;o<i.length;++o){let r=i[o].process(t);r&&l(this._textureCallbacks[o])&&(this._textureCallbacks[o](),this._textureCallbacks[o]=void 0),n=n&&r}return n?(this._textureState=Zo.READY,this._texturesLoaded=!0,!0):!1}process(t){if(this._state===Zo.LOADED&&!l(this._loadResourcesPromise)&&(this._loadResourcesPromise=Nqe(this,t).then(()=>{this._resourcesLoaded=!0}).catch(r=>{this._processError=r})),l(this._processError)){this._state=Zo.FAILED;let r=this._processError;this._processError=void 0,Tj(this,r)}let n=this._textureErrors.pop();if(l(n)){let r=this.getError("Failed to load glTF texture",n);throw r.name="TextureError",r}if(this._state===Zo.FAILED)return!1;let i=!1;try{i=this._process(t)}catch(r){this._state=Zo.FAILED,Tj(this,r)}let o=!1;try{o=this._processTextures(t)}catch(r){this._textureState=Zo.FAILED,Tj(this,r)}return this._incrementallyLoadTextures?i:i&&o}isUnloaded(){return this._state===Zo.UNLOADED}unload(){l(this._gltfJsonLoader)&&!this._gltfJsonLoader.isDestroyed()&&Ii.unload(this._gltfJsonLoader),this._gltfJsonLoader=void 0,XYe(this),lme(this),KYe(this),QYe(this),$Ye(this),JYe(this),this._components=void 0,this._typedArray=void 0,this._state=Zo.UNLOADED}};async function Lqe(e){e._state=Zo.LOADING,e._textureState=Zo.LOADING;try{let t=Ii.getGltfJsonLoader({gltfResource:e._gltfResource,baseResource:e._baseResource,typedArray:e._typedArray,gltfJson:e._gltfJson});return e._gltfJsonLoader=t,await t.load(),e.isDestroyed()||e.isUnloaded()||t.isDestroyed()?void 0:(e._state=Zo.LOADED,e._textureState=Zo.LOADED,e)}catch(t){if(e.isDestroyed())return;e._state=Zo.FAILED,e._textureState=Zo.FAILED,Tj(e,t)}}async function Nqe(e,t){sn.supportsWebP.initialized||await sn.supportsWebP.initialize(),e._supportedImageFormats=new kM({webp:sn.supportsWebP(),basis:t.context.supportsBasis});let n=YYe(e,t);return e._state=Zo.PROCESSING,e._textureState=Zo.PROCESSING,l(e._gltfJsonLoader)&&e._releaseGltfJson&&(Ii.unload(e._gltfJsonLoader),e._gltfJsonLoader=void 0),n}function Tj(e,t){throw e.unload(),e.getError("Failed to load glTF",t)}function Fqe(e,t){let n=!0,i=e._geometryLoaders;for(let a=0;a<i.length;++a){let s=i[a].process(t);s&&l(e._geometryCallbacks[a])&&(e._geometryCallbacks[a](),e._geometryCallbacks[a]=void 0),n=n&&s}let o=e._structuralMetadataLoader;if(l(o)){let a=o.process(t);a&&(e._components.structuralMetadata=o.structuralMetadata),n=n&&a}let r=e._meshPrimitiveGpmLoader;if(l(r)){let a=r.process(t);a&&(l(e._components.structuralMetadata)&&_t("structural-metadata-gpm","The model defines both the 'EXT_structural_metadata' extension and the 'NGA_gpm_local' extension. The data from the 'EXT_structural_metadata' extension will be replaced with the data from the 'NGA_gpm_local' extension, and will no longer be available for styling and picking."),e._components.structuralMetadata=r.structuralMetadata),n=n&&a}n&&(e._state=Zo.POST_PROCESSING)}function kqe(e,t){let n=e._primitiveLoadPlans;for(let i=0;i<n.length;i++){let o=n[i];o.postProcess(t),(o.needsOutlines||o.needsGaussianSplats)&&zqe(e,o)}}function zqe(e,t){let n=e._postProcessBuffers,i=t.primitive,o=i.outlineCoordinates;l(o)&&n.push(o.buffer);let r=i.attributes;for(let s=0;s<r.length;s++){let c=r[s];l(c.buffer)&&n.push(c.buffer)}let a=i.indices;l(a)&&l(a.buffer)&&n.push(a.buffer)}function Uqe(e,t,n,i,o,r,a,s,c){let u=e.gltfJson,d=u.accessors[t].bufferView;return Ii.getVertexBufferLoader({gltf:u,gltfResource:e._gltfResource,baseResource:e._baseResource,frameState:c,bufferViewId:d,primitive:i,draco:o,spz:r,attributeSemantic:n,accessorId:t,asynchronous:e._asynchronous,loadBuffer:a,loadTypedArray:s})}function Vqe(e,t,n,i,o,r,a){return Ii.getIndexBufferLoader({gltf:e.gltfJson,accessorId:t,gltfResource:e._gltfResource,baseResource:e._baseResource,frameState:a,primitive:n,draco:i,asynchronous:e._asynchronous,loadBuffer:o,loadTypedArray:r})}function hme(e,t){let n=Ii.getBufferViewLoader({gltf:e.gltfJson,bufferViewId:t,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._bufferViewLoaders.push(n),n}function MX(e,t,n){let i=t.byteOffset,o=Pu(e,t),r=t.count,a=xf(t.type),s=t.componentType,c=Y.getSizeInBytes(s),u=c*a,f=r*a;if(o===u)return n=new Uint8Array(n),Y.createArrayBufferView(s,n.buffer,n.byteOffset+i,f);let d=Y.createTypedArray(s,f),p=new DataView(n.buffer),g=new Array(a),m=ug(t.componentType);i=n.byteOffset+i;for(let A=0;A<r;++A){m(p,i,a,c,g);for(let y=0;y<a;++y)d[A*a+y]=g[y];i+=o}return d}function jqe(e,t){let n=e.type;if(n===Ft.SCALAR)return t.fill(0);let i=Ft.getMathType(n);return t.fill(i.clone(i.ZERO))}function Gqe(e,t,n,i){let o=e.type,r=e.count;if(o===Ft.SCALAR)for(let a=0;a<r;a++)n[a]=t[a];else if(o===Ft.VEC4&&i)for(let a=0;a<r;a++)n[a]=Le.unpack(t,a*4);else{let a=Ft.getMathType(o),s=Ft.getNumberOfComponents(o);for(let c=0;c<r;c++)n[c]=a.unpack(t,c*s)}return n}async function Hqe(e,t,n,i,o){let{gltfJson:r}=e;if(await t.load(),e.isDestroyed())return;let a=MX(r,n,t.typedArray);i=i??!1,Gqe(n,a,o,i)}function LA(e,t,n){let i=new Array(t.count),o=t.bufferView;if(l(o)){let r=hme(e,o),a=Hqe(e,r,t,n,i);return e._loaderPromises.push(a),i}return jqe(t,i)}function BA(e,t){let n=Y.createTypedArray(t.componentType,t.count*Ft.getNumberOfComponents(t.type));if(!l(t.bufferView))return n;let i=hme(e,t.bufferView),{gltfJson:o}=e,r=i.load().then(()=>{if(e.isDestroyed())return;let a=MX(o,t,i.typedArray);n.set(a)});return e._loaderPromises.push(r),n}function Mu(e,t){if(l(t))return e===Number?t[0]:e.unpack(t)}function Wqe(e){return e===Number?0:new e}function qqe(e){switch(e){case Y.BYTE:return 127;case Y.UNSIGNED_BYTE:return 255;case Y.SHORT:return 32767;case Y.UNSIGNED_SHORT:return 65535;default:return 1}}var Yqe={VEC2:new z(-1,-1),VEC3:new h(-1,-1,-1),VEC4:new se(-1,-1,-1,-1)};function Xqe(e,t){let n=qqe(e.componentDatatype),i=Yqe[e.type],o=e.min;l(o)&&(o=t.divideByScalar(o,n,o),o=t.maximumByComponent(o,i,o));let r=e.max;l(r)&&(r=t.divideByScalar(r,n,r),r=t.maximumByComponent(r,i,r)),e.min=o,e.max=r}function Kqe(e,t,n){let i=e.decodeMatrix,o=Mu(n,e.decodedMin),r=Mu(n,e.decodedMax);l(o)&&l(r)&&(t.min=o,t.max=r);let a=new _n.Quantization;a.componentDatatype=t.componentDatatype,a.type=t.type,i.length===4?(a.quantizedVolumeOffset=i[2],a.quantizedVolumeStepSize=i[0]):i.length===9?(a.quantizedVolumeOffset=new z(i[6],i[7]),a.quantizedVolumeStepSize=new z(i[0],i[4])):i.length===16?(a.quantizedVolumeOffset=new h(i[12],i[13],i[14]),a.quantizedVolumeStepSize=new h(i[0],i[5],i[10])):i.length===25&&(a.quantizedVolumeOffset=new se(i[20],i[21],i[22],i[23]),a.quantizedVolumeStepSize=new se(i[0],i[6],i[12],i[18])),t.quantization=a}function Qqe(e,t,n,i,o){let r=e.accessors[t],a=Ft.getMathType(r.type),s=r.normalized??!1,c=new fqe;c.name=n,c.semantic=i,c.setIndex=o,c.constant=Wqe(a),c.componentDatatype=r.componentType,c.normalized=s,c.count=r.count,c.type=r.type,c.min=Mu(a,r.min),c.max=Mu(a,r.max),c.byteOffset=r.byteOffset,c.byteStride=Pu(e,r),Ci(r,"WEB3D_quantized_attributes")&&Kqe(r.extensions.WEB3D_quantized_attributes,c,a);let u=c.semantic===it.POSITION||c.semantic===it.NORMAL||c.semantic===it.TANGENT||c.semantic===it.TEXCOORD||c.semantic===it.FEATURE_ID||c.semantic===it.SCALE||c.semantic===it.ROTATION;return e.extensionsRequired?.includes("KHR_mesh_quantization")&&s&&u&&Xqe(c,a),c}function mme(e){let n=/^\w+_(\d+)$/.exec(e);if(n!==null)return parseInt(n[1])}var $qe={gltfSemantic:void 0,renamedSemantic:void 0,modelSemantic:void 0};function BX(e,t,n){let i=n;e._renameBatchIdSemantic&&(n==="_BATCHID"||n==="BATCHID")&&(i="_FEATURE_ID_0");let o=t.fromGltfSemantic(i),r=$qe;return r.gltfSemantic=n,r.renamedSemantic=i,r.modelSemantic=o,r}function Jqe(e){let t=e===it.POSITION,n=e===it.FEATURE_ID,i=e===it.TEXCOORD;return t||n||i}function Zqe(e,t,n,i){if(e.byteOffset=0,e.byteStride=void 0,e.quantization=t.quantization,n&&(e.buffer=t.buffer),i){let o=l(t.quantization)?t.quantization.componentDatatype:e.componentDatatype;e.typedArray=Y.createArrayBufferView(o,t.typedArray.buffer)}}function eYe(e,t,n,i){if(e.byteOffset=0,e.byteStride=void 0,n&&(e.buffer=t.buffer),i&&l(t.typedArray)&&(e.typedArray=Y.createArrayBufferView(e.componentDatatype,t.typedArray.buffer)),e.semantic===it.POSITION){let o=a=>{let s=1/0,c=-1/0,u=1/0,f=-1/0,d=1/0,p=-1/0;for(let g=0;g<a.length;g+=3){let m=a[g],A=a[g+1],y=a[g+2];s=Math.min(s,m),c=Math.max(c,m),u=Math.min(u,A),f=Math.max(f,A),d=Math.min(d,y),p=Math.max(p,y)}return[new h(s,u,d),new h(c,f,p)]},r=e.typedArray;[e.min,e.max]=o(r)}}function tYe(e,t,n,i,o,r){if(o&&(n.buffer=i.buffer),r){let a=i.typedArray;n.typedArray=MX(e,t,a),o||(n.byteOffset=0,n.byteStride=void 0)}}function pme(e,t,n,i,o,r,a,s,c){let u=e.gltfJson,f=u.accessors[t],d=f.bufferView,p=n.gltfSemantic,g=n.renamedSemantic,m=n.modelSemantic,A=l(m)?mme(g):void 0,x=Qqe(u,t,p,m,A);if(!l(o)&&!l(d)&&!l(r))return x;let b=Uqe(e,t,p,i,o,r,a,s,c),C=e._geometryLoaders.length;e._geometryLoaders.push(b);let E=b.load();return e._loaderPromises.push(E),e._geometryCallbacks[C]=()=>{l(o)&&l(o.attributes)&&l(o.attributes[p])?Zqe(x,b,a,s):l(r)?eYe(x,b,a,s):tYe(u,f,x,b,a,s)},x}function gme(e,t,n,i,o,r,a,s,c){let u=n.modelSemantic,f=u===it.POSITION,d=u===it.FEATURE_ID,p=f&&!a&&e._loadAttributesFor2D&&!c.scene3DOnly,g=f&&e._enablePick&&!c.context.webgl2,m=e._loadForClassification&&d,A=e._loadAttributesAsTypedArray,y=!A,x=A||p||g||m,E=pme(e,t,n,i,o,r,s?!1:y,s?!0:x,c),S=new vb.AttributeLoadPlan(E);return S.loadBuffer=y,S.loadTypedArray=x,S}function nYe(e,t,n,i,o){let r=e.gltfJson.accessors,a=l(n.ROTATION),s=l(n.TRANSLATION)&&l(r[n.TRANSLATION].min)&&l(r[n.TRANSLATION].max),c=BX(e,Er,i),u=c.modelSemantic,f=u===Er.TRANSLATION||u===Er.ROTATION||u===Er.SCALE,d=u===Er.TRANSLATION,p=e._loadAttributesAsTypedArray||a&&f||!o.context.instancedArrays,g=e._enablePick&&!o.context.webgl2,m=!p,A=e._loadAttributesFor2D&&!o.scene3DOnly;return pme(e,t,c,void 0,void 0,void 0,m,p||d&&(!s||A||g),o)}function iYe(e,t,n,i,o,r){let a=e.gltfJson.accessors[t],s=a.bufferView,c=n.extensions??G.EMPTY_OBJECT,u=c.KHR_draco_mesh_compression,f=l(c.EXT_mesh_primitive_edge_visibility);if(!l(u)&&!l(s))return;let d=new dqe;d.count=a.count;let p=e._loadAttributesAsTypedArray,g=(e._loadIndicesForWireframe||e._enablePick)&&!r.context.webgl2,m=e._loadForClassification&&i,y=!p,x=p||g||m||f,E=Vqe(e,t,n,u,o?!1:y,o?!0:x,r),S=e._geometryLoaders.length;e._geometryLoaders.push(E);let w=E.load();e._loaderPromises.push(w),e._geometryCallbacks[S]=()=>{d.indexDatatype=E.indexDatatype,d.buffer=E.buffer,d.typedArray=E.typedArray};let P=new vb.IndicesLoadPlan(d);return P.loadBuffer=y,P.loadTypedArray=x,P}function $l(e,t,n,i){let o=e.gltfJson,r=Ru.getImageIdFromTexture({gltf:o,textureId:t.index,supportedImageFormats:e._supportedImageFormats});if(!l(r))return;let a=Ii.getTextureLoader({gltf:o,textureInfo:t,gltfResource:e._gltfResource,baseResource:e._baseResource,supportedImageFormats:e._supportedImageFormats,frameState:n,asynchronous:e._asynchronous}),s=Ru.createModelTextureReader({textureInfo:t}),c=e._textureLoaders.length;e._textureLoaders.push(a);let u=a.load().catch(f=>{if(!e.isDestroyed()){if(!e._incrementallyLoadTextures)throw f;e._textureState=Zo.FAILED,e._textureErrors.push(f)}});return e._texturesPromises.push(u),e._textureCallbacks[c]=()=>{s.texture=a.texture,l(i)&&(s.texture.sampler=i)},s}function oYe(e,t,n){let{diffuseTexture:i,specularGlossinessTexture:o,diffuseFactor:r,specularFactor:a,glossinessFactor:s}=t,c=new Dqe;return l(i)&&(c.diffuseTexture=$l(e,i,n)),l(o)&&(c.specularGlossinessTexture=$l(e,o,n)),c.diffuseFactor=Mu(se,r),c.specularFactor=Mu(h,a),c.glossinessFactor=s,c}function rYe(e,t,n){let{baseColorTexture:i,metallicRoughnessTexture:o,baseColorFactor:r,metallicFactor:a,roughnessFactor:s}=t,c=new Iqe;return l(i)&&(c.baseColorTexture=$l(e,i,n)),l(o)&&(c.metallicRoughnessTexture=$l(e,o,n)),c.baseColorFactor=Mu(se,r),c.metallicFactor=a,c.roughnessFactor=s,c}function aYe(e,t,n){let{specularFactor:i,specularTexture:o,specularColorFactor:r,specularColorTexture:a}=t,s=new Pqe;return l(o)&&(s.specularTexture=$l(e,o,n)),l(a)&&(s.specularColorTexture=$l(e,a,n)),s.specularFactor=i,s.specularColorFactor=Mu(h,r),s}function sYe(e,t,n){let{anisotropyStrength:i=PX.DEFAULT_ANISOTROPY_STRENGTH,anisotropyRotation:o=PX.DEFAULT_ANISOTROPY_ROTATION,anisotropyTexture:r}=t,a=new PX;return l(r)&&(a.anisotropyTexture=$l(e,r,n)),a.anisotropyStrength=i,a.anisotropyRotation=o,a}function cYe(e,t,n){let{clearcoatFactor:i=RX.DEFAULT_CLEARCOAT_FACTOR,clearcoatTexture:o,clearcoatRoughnessFactor:r=RX.DEFAULT_CLEARCOAT_ROUGHNESS_FACTOR,clearcoatRoughnessTexture:a,clearcoatNormalTexture:s}=t,c=new RX;return l(o)&&(c.clearcoatTexture=$l(e,o,n)),l(a)&&(c.clearcoatRoughnessTexture=$l(e,a,n)),l(s)&&(c.clearcoatNormalTexture=$l(e,s,n)),c.clearcoatFactor=i,c.clearcoatRoughnessFactor=r,c}function lYe(e){if(!l(e))return;let t=new Rqe;if(l(e.width)){let n=e.width;n>0&&Math.floor(n)===n&&(t.width=n)}if(l(e.pattern)){let n=e.pattern;n>=0&&n<=65535&&Math.floor(n)===n&&(t.pattern=n)}if(!(!l(t.width)&&!l(t.pattern)))return t}function uYe(e,t,n){let i=new Oqe,o=t.extensions??G.EMPTY_OBJECT,r=o.KHR_materials_pbrSpecularGlossiness,a=o.KHR_materials_specular,s=o.KHR_materials_anisotropy,c=o.KHR_materials_clearcoat,u=t.pbrMetallicRoughness;i.unlit=l(o.KHR_materials_unlit),l(r)?i.specularGlossiness=oYe(e,r,n):(l(u)&&(i.metallicRoughness=rYe(e,u,n)),l(a)&&!i.unlit&&(i.specular=aYe(e,a,n)),l(s)&&!i.unlit&&(i.anisotropy=sYe(e,s,n)),l(c)&&!i.unlit&&(i.clearcoat=cYe(e,c,n))),l(t.emissiveTexture)&&(i.emissiveTexture=$l(e,t.emissiveTexture,n)),l(t.normalTexture)&&!e._loadForClassification&&(i.normalTexture=$l(e,t.normalTexture,n)),l(t.occlusionTexture)&&(i.occlusionTexture=$l(e,t.occlusionTexture,n)),i.emissiveFactor=Mu(h,t.emissiveFactor),i.alphaMode=t.alphaMode,i.alphaCutoff=t.alphaCutoff,i.doubleSided=t.doubleSided;let f=o.BENTLEY_materials_point_style;if(l(f)&&l(f.diameter)){let d=f.diameter;d>=1&&(i.pointDiameter=Math.floor(d))}return i.lineStyle=lYe(o.BENTLEY_materials_line_style),i}function _me(e,t){let n=new ume;return n.featureCount=e.featureCount,n.nullFeatureId=e.nullFeatureId,n.propertyTableId=e.propertyTable,n.setIndex=e.attribute,n.label=e.label,n.positionalLabel=t,n}function Ame(e,t,n,i){let o=new ume,r=e.featureIds;return o.featureCount=n,o.propertyTableId=t,o.setIndex=mme(r.attribute),o.positionalLabel=i,o}function yme(e,t){let n=new dme;return n.propertyTableId=e.propertyTable,n.featureCount=e.featureCount,n.nullFeatureId=e.nullFeatureId,n.label=e.label,n.positionalLabel=t,n.offset=0,n.repeat=1,n}function xme(e,t,n,i){let o=new dme,r=e.featureIds;o.propertyTableId=t,o.featureCount=n,o.offset=r.constant??0;let a=r.divisor??0;return o.repeat=a===0?void 0:a,o.positionalLabel=i,o}function fYe(e,t,n,i){let o=new fme;o.featureCount=t.featureCount,o.nullFeatureId=t.nullFeatureId,o.propertyTableId=t.propertyTable,o.label=t.label,o.positionalLabel=i;let r=t.texture;o.textureReader=$l(e,r,n,jt.NEAREST);let s=(l(r.channels)?r.channels:[0]).map(function(c){return"rgba".charAt(c)}).join("");return o.textureReader.channels=s,o}function dYe(e,t,n,i,o,r){let a=new fme,s=t.featureIds,c=s.texture;return a.featureCount=o,a.propertyTableId=n,a.textureReader=$l(e,c,i,jt.NEAREST),a.textureReader.channels=s.channels,a.positionalLabel=r,a}function hYe(e,t,n,i,o){let r=new hqe,a=void 0,s=void 0,c=void 0,u=!1;for(let f in t){if(!t.hasOwnProperty(f))continue;let d=t[f],p=BX(e,it,f),g=gme(e,d,p,a,s,c,u,n,o);r.attributes.push(g.attribute),i.attributePlans.push(g)}return r}function mYe(e){let i=e?.KHR_gaussian_splatting?.extensions?.KHR_gaussian_splatting_compression_spz_2;if(l(i))return i}function bme(e,t){if(!l(t))return;let n=e.gltfJson.materials;if(!l(n)||t<0||t>=n.length)return;let i=n[t];if(!l(i))return;let o=i.pbrMetallicRoughness??G.EMPTY_OBJECT,r=Mu(se,o.baseColorFactor);return l(r)?r:new se(1,1,1,1)}function pYe(e){switch(e){case Y.UNSIGNED_BYTE:return 255;case Y.UNSIGNED_SHORT:return 65535;case Y.UNSIGNED_INT:return 4294967295;default:throw new re("EXT_mesh_primitive_edge_visibility line strings indices must use unsigned scalar component types.")}}function gYe(e,t,n){if(!l(t)||t.length===0)return;let i=new Array(t.length);for(let o=0;o<t.length;o++){let r=t[o]??G.EMPTY_OBJECT,a=r.indices,s=e.gltfJson.accessors[a];if(!l(s))throw new re("Edge visibility line string accessor not found!");let c=LA(e,s),u=pYe(s.componentType),f=l(r.material)?r.material:n;i[o]={indices:c,restartIndex:u,componentType:s.componentType,materialColor:bme(e,f)}}return i}function _Ye(e,t){if(!l(t))return;let n={},i=t.visibility;if(l(i)){let o=e.gltfJson.accessors[i];if(!l(o))throw new re("Edge visibility accessor not found!");n.visibility=LA(e,o)}if(n.materialColor=bme(e,t.material),l(t.silhouetteNormals)){let o=e.gltfJson.accessors[t.silhouetteNormals];l(o)&&(n.silhouetteNormals=LA(e,o))}return l(t.lineStrings)&&(n.lineStrings=gYe(e,t.lineStrings,t.material)),n}function AYe(e,t,n,i){let o=new mqe,r=new vb(o);e._primitiveLoadPlans.push(r);let a=t.material;l(a)&&(o.material=uYe(e,e.gltfJson.materials[a],i));let s=t.extensions??G.EMPTY_OBJECT,c=s.EXT_mesh_polygon;l(c)&&(o.polygon=xYe(e,t,c));let u=s.CESIUM_mesh_vector;l(u)&&(o.vector=bYe(e,u));let f=!1,d=s.CESIUM_primitive_outline;e._loadPrimitiveOutline&&l(d)&&(f=!0,r.needsOutlines=!0,r.outlineIndices=yYe(e,d,r)),o.edgeVisibility=_Ye(e,s.EXT_mesh_primitive_edge_visibility);let p=mYe(s);l(p)&&(f=!0,r.needsGaussianSplats=!0);let g=e._loadForClassification,m=s.KHR_draco_mesh_compression,A=!1,y=t.attributes;if(l(y))for(let B in y){if(!y.hasOwnProperty(B))continue;let L=y[B],_=BX(e,it,B),T=_.modelSemantic;if(g&&!Jqe(T))continue;T===it.FEATURE_ID&&(A=!0);let v=gme(e,L,_,t,m,p,n,f,i);r.attributePlans.push(v),o.attributes.push(v.attribute)}let x=t.targets;if(l(x)&&!g)for(let B=0;B<x.length;++B)o.morphTargets.push(hYe(e,x[B],f,r,i));let b=t.indices;if(l(b)){let B=iYe(e,b,t,A,f,i);l(B)&&(r.indicesPlan=B,o.indices=B.indices)}let C=s.EXT_structural_metadata,E=s.EXT_mesh_features,S=s.EXT_feature_metadata,w=l(S),P=s.NGA_gpm_local;l(E)?CYe(e,o,E,i):w&&TYe(e,o,S,i),l(C)?EYe(o,C):w&&vYe(e,o,S),l(P)&&SYe(o,P);let R=t.mode;if(g&&R!==Re.TRIANGLES)throw new re("Only triangle meshes can be used for classification.");return o.primitiveType=R,o}function yYe(e,t){let n=t.indices,i=e.gltfJson.accessors[n];return LA(e,i,!1)}function xYe(e,t,n){let i=new Bqe,o=e.gltfJson.accessors;return i.count=n.count,t.mode===Re.LINE_LOOP?(i.loopIndices=BA(e,o[t.indices]),i.loopIndicesOffsets=BA(e,o[n.indicesOffsets]),i.triangleIndices=BA(e,o[n.triangleIndices]),i.triangleIndicesOffsets=BA(e,o[n.triangleIndicesOffsets])):t.mode===Re.TRIANGLES&&(i.loopIndices=BA(e,o[n.loopIndices]),i.loopIndicesOffsets=BA(e,o[n.loopIndicesOffsets]),i.triangleIndices=BA(e,o[t.indices]),i.triangleIndicesOffsets=BA(e,o[n.indicesOffsets])),i}function bYe(e,t){if(!l(t))return;let n=new Mqe;n.vector=t.vector,n.count=t.count;let i=e.gltfJson.accessors;function o(r,a){if(l(r))return LA(e,i[r])}return n.polygonAttributeOffsets=o(t.polygonAttributeOffsets,"polygonAttributeOffsets"),n.polygonHoleCounts=o(t.polygonHoleCounts,"polygonHoleCounts"),n.polygonHoleOffsets=o(t.polygonHoleOffsets,"polygonHoleOffsets"),n.polygonIndicesOffsets=o(t.polygonIndicesOffsets,"polygonIndicesOffsets"),n}function CYe(e,t,n,i){let o;l(n)&&l(n.featureIds)?o=n.featureIds:o=[];for(let r=0;r<o.length;r++){let a=o[r],s=`featureId_${r}`,c;l(a.texture)?c=fYe(e,a,i,s):l(a.attribute)?c=_me(a,s):c=yme(a,s),t.featureIds.push(c)}}function TYe(e,t,n,i){let{featureTables:o}=e.gltfJson.extensions.EXT_feature_metadata,r=0,a=n.featureIdAttributes;if(l(a))for(let c=0;c<a.length;++c){let u=a[c],f=u.featureTable,d=e._sortedPropertyTableIds.indexOf(f),p=o[f].count,g=`featureId_${r}`;r++;let m;l(u.featureIds.attribute)?m=Ame(u,d,p,g):m=xme(u,d,p,g),t.featureIds.push(m)}let s=n.featureIdTextures;if(l(s))for(let c=0;c<s.length;++c){let u=s[c],f=u.featureTable,d=e._sortedPropertyTableIds.indexOf(f),p=o[f].count,g=`featureId_${r}`;r++;let m=dYe(e,u,d,i,p,g);t.featureIds.push(m)}}function EYe(e,t){if(!l(t))return;let{propertyTextures:n,propertyAttributes:i}=t;l(n)&&(e.propertyTextureIds=n),l(i)&&(e.propertyAttributeIds=i)}function vYe(e,t,n){l(n.featureTextures)&&(t.propertyTextureIds=n.featureTextures.map(function(i){return e._sortedFeatureTextureIds.indexOf(i)}))}function SYe(e,t){let n=t.ppeTextures??[];for(let i=0;i<n.length;i++)e.propertyTextureIds.push(i)}function wYe(e,t,n){let i=t.EXT_mesh_gpu_instancing,o=new pqe,r=i.attributes;if(l(r))for(let u in r){if(!r.hasOwnProperty(u))continue;let f=r[u];o.attributes.push(nYe(e,f,r,u,n))}let a=i.extensions??G.EMPTY_OBJECT,s=t.EXT_instance_features,c=a.EXT_feature_metadata;return l(s)?IYe(o,s):l(c)&&DYe(e.gltfJson,o,c,e._sortedPropertyTableIds),o}function IYe(e,t){let n=t.featureIds;for(let i=0;i<n.length;i++){let o=n[i],r=`instanceFeatureId_${i}`,a;l(o.attribute)?a=_me(o,r):a=yme(o,r),e.featureIds.push(a)}}function DYe(e,t,n,i){let o=e.extensions.EXT_feature_metadata.featureTables,r=n.featureIdAttributes;if(l(r))for(let a=0;a<r.length;++a){let s=r[a],c=s.featureTable,u=i.indexOf(c),f=o[c].count,d=`instanceFeatureId_${a}`,p;l(s.featureIds.attribute)?p=Ame(s,u,f,d):p=xme(s,u,f,d),t.featureIds.push(p)}}function PYe(e,t,n){let i=new _qe;i.name=t.name,i.matrix=Mu(M,t.matrix),i.translation=Mu(h,t.translation),i.rotation=Mu(Le,t.rotation),i.scale=Mu(h,t.scale);let o=t.extensions??G.EMPTY_OBJECT,r=o.EXT_mesh_gpu_instancing,a=o.AGI_articulations,s=o.CESIUM_mesh_vector;if(l(r)){if(e._loadForClassification)throw new re("Models with the EXT_mesh_gpu_instancing extension cannot be used for classification.");i.instances=wYe(e,o,n)}l(a)&&(i.articulationName=a.articulationName),l(s)&&(i.meshVector=s);let c=t.mesh;if(l(c)){let u=e.gltfJson.meshes[c],f=XM(u);for(let g=0;g<f.length;++g)i.primitives.push(AYe(e,f[g],l(i.instances),n));let d=t.weights??u.weights,p=i.primitives[0].morphTargets;i.morphWeights=l(d)?d.slice():new Array(p.length).fill(0)}return i}function RYe(e,t){let n=e.gltfJson.nodes;if(!l(n))return[];let i=n.map(function(o,r){let a=PYe(e,o,t);return a.index=r,a});for(let o=0;o<i.length;++o){let r=n[o].children;if(l(r))for(let a=0;a<r.length;++a)i[o].children.push(i[r[a]])}return i}function OYe(e,t,n){let i=new gqe,o=t.joints;i.joints=o.map(a=>n[a]);let r=t.inverseBindMatrices;if(l(r)){let a=e.gltfJson.accessors[r];i.inverseBindMatrices=LA(e,a)}else i.inverseBindMatrices=new Array(o.length).fill(M.IDENTITY);return i}function MYe(e,t){let n=e.gltfJson.skins;if(e._loadForClassification||!l(n))return[];let i=n.map(function(r,a){let s=OYe(e,r,t);return s.index=a,s}),o=e.gltfJson.nodes;for(let r=0;r<t.length;++r){let a=o[r].skin;l(a)&&(t[r].skin=i[a])}return i}async function BYe(e,t,n,i){let o=new FM({gltf:e.gltfJson,extension:t,extensionLegacy:n,gltfResource:e._gltfResource,baseResource:e._baseResource,supportedImageFormats:e._supportedImageFormats,frameState:i,asynchronous:e._asynchronous});return e._structuralMetadataLoader=o,o.load()}async function LYe(e,t,n,i){let o=new YM({gltf:t,extension:n,gltfResource:e._gltfResource,baseResource:e._baseResource,supportedImageFormats:e._supportedImageFormats,frameState:i,asynchronous:e._asynchronous});return e._meshPrimitiveGpmLoader=o,o.load()}function NYe(e,t){let n=new yqe,i=e.gltfJson.accessors,o=i[t.input];n.input=LA(e,o);let r=t.interpolation;n.interpolation=Jh[r]??Jh.LINEAR;let a=i[t.output];return n.output=LA(e,a,!0),n}function FYe(e,t){let n=new xqe,i=e.node;if(!l(i))return;n.node=t[i];let o=e.path.toUpperCase();return n.path=Aqe[o],n}function kYe(e,t,n){let i=new bqe,o=e.sampler;return i.sampler=t[o],i.target=FYe(e.target,n),i}function zYe(e,t,n){let i=new Cqe;i.name=t.name;let o=t.samplers.map(function(a,s){let c=NYe(e,a);return c.index=s,c}),r=t.channels.map(function(a){return kYe(a,o,n)});return i.samplers=o,i.channels=r,i}function UYe(e,t){let n=e.gltfJson.animations;return e._loadForClassification||!l(n)?[]:n.map(function(o,r){let a=zYe(e,o,t);return a.index=r,a})}function VYe(e){let t=new Tqe;t.name=e.name;let n=e.type.toUpperCase();return t.type=cl[n],t.minimumValue=e.minimumValue,t.maximumValue=e.maximumValue,t.initialValue=e.initialValue,t}function jYe(e){let t=new Eqe;return t.name=e.name,t.stages=e.stages.map(VYe),t}function GYe(e){let n=(e.extensions??G.EMPTY_OBJECT).AGI_articulations?.articulations;return l(n)?n.map(jYe):[]}function HYe(e){let t;return l(e.scenes)&&l(e.scene)&&(t=e.scenes[e.scene].nodes),t=t??e.nodes,t=l(t)?t:[],t}function WYe(e,t){let n=new Sqe,i=HYe(e);return n.nodes=i.map(function(o){return t[o]}),n}var qYe=new h;function YYe(e,t){let n=e.gltfJson,i=n.extensions??G.EMPTY_OBJECT,o=i.EXT_structural_metadata,r=i.EXT_feature_metadata,a=i.CESIUM_RTC;if(l(r)){let b=r.featureTables,C=r.featureTextures,E=l(b)?b:[],S=l(C)?C:[];e._sortedPropertyTableIds=Object.keys(E).sort(),e._sortedFeatureTextureIds=Object.keys(S).sort()}let s=RYe(e,t),c=MYe(e,s),u=UYe(e,s),f=GYe(n),d=WYe(n,s),p=new wqe,g=new vqe,m=n.asset.copyright;if(l(m)){let b=m.split(";").map(function(C){return new yt(C.trim())});g.credits=b}if(p.asset=g,p.scene=d,p.nodes=s,p.skins=c,p.animations=u,p.articulations=f,p.upAxis=e._upAxis,p.forwardAxis=e._forwardAxis,l(a)){let b=h.fromArray(a.center,0,qYe);p.transform=M.fromTranslation(b,p.transform)}if(e._components=p,l(o)||l(r)){let b=BYe(e,o,r,t);e._loaderPromises.push(b)}let A=i.NGA_gpm_local;if(l(A)){let b=GM.load(A);e._components.extensions.NGA_gpm_local=b}let y=n.meshes;if(l(y))for(let b of y){let C=b.primitives;if(l(C))for(let E of C){let S=E.extensions;if(l(S)){let w=S.NGA_gpm_local;if(l(w)){let P=LYe(e,n,w,t);e._loaderPromises.push(P)}}}}let x=[];return Qn(x,e._loaderPromises),e._incrementallyLoadTextures||Qn(x,e._texturesPromises),Promise.all(x)}function XYe(e){let t=e._textureLoaders;for(let n=0;n<t.length;++n)t[n]=!t[n].isDestroyed()&&Ii.unload(t[n]);e._textureLoaders.length=0}function lme(e){let t=e._bufferViewLoaders;for(let n=0;n<t.length;++n)t[n]=!t[n].isDestroyed()&&Ii.unload(t[n]);e._bufferViewLoaders.length=0}function KYe(e){let t=e._geometryLoaders;for(let n=0;n<t.length;++n)t[n]=!t[n].isDestroyed()&&Ii.unload(t[n]);e._geometryLoaders.length=0}function QYe(e){let t=e._postProcessBuffers;for(let n=0;n<t.length;n++){let i=t[n];i.isDestroyed()||i.destroy()}t.length=0}function $Ye(e){l(e._structuralMetadataLoader)&&!e._structuralMetadataLoader.isDestroyed()&&(e._structuralMetadataLoader.destroy(),e._structuralMetadataLoader=void 0)}function JYe(e){l(e._meshPrimitiveGpmLoader)&&!e._meshPrimitiveGpmLoader.isDestroyed()&&(e._meshPrimitiveGpmLoader.destroy(),e._meshPrimitiveGpmLoader=void 0)}var bf=OX;var KM=`uniform sampler2D u_pointCloud_colorGBuffer;
- uniform sampler2D u_pointCloud_depthGBuffer;
- uniform vec2 u_distanceAndEdlStrength;
- in vec2 v_textureCoordinates;
-
- vec2 neighborContribution(float log2Depth, vec2 offset)
- {
- float dist = u_distanceAndEdlStrength.x;
- vec2 texCoordOrig = v_textureCoordinates + offset * dist;
- vec2 texCoord0 = v_textureCoordinates + offset * floor(dist);
- vec2 texCoord1 = v_textureCoordinates + offset * ceil(dist);
-
- float depthOrLogDepth0 = czm_unpackDepth(texture(u_pointCloud_depthGBuffer, texCoord0));
- float depthOrLogDepth1 = czm_unpackDepth(texture(u_pointCloud_depthGBuffer, texCoord1));
-
- // ignore depth values that are the clear depth
- if (depthOrLogDepth0 == 0.0 || depthOrLogDepth1 == 0.0) {
- return vec2(0.0);
- }
-
- // interpolate the two adjacent depth values
- float depthMix = mix(depthOrLogDepth0, depthOrLogDepth1, fract(dist));
- vec4 eyeCoordinate = czm_windowToEyeCoordinates(texCoordOrig, depthMix);
- return vec2(max(0.0, log2Depth - log2(-eyeCoordinate.z / eyeCoordinate.w)), 1.0);
- }
-
- void main()
- {
- float depthOrLogDepth = czm_unpackDepth(texture(u_pointCloud_depthGBuffer, v_textureCoordinates));
-
- vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, depthOrLogDepth);
- eyeCoordinate /= eyeCoordinate.w;
-
- float log2Depth = log2(-eyeCoordinate.z);
-
- if (depthOrLogDepth == 0.0) // 0.0 is the clear value for the gbuffer
- {
- discard;
- }
-
- vec4 color = texture(u_pointCloud_colorGBuffer, v_textureCoordinates);
-
- // sample from neighbors left, right, down, up
- vec2 texelSize = 1.0 / czm_viewport.zw;
-
- vec2 responseAndCount = vec2(0.0);
-
- responseAndCount += neighborContribution(log2Depth, vec2(-texelSize.x, 0.0));
- responseAndCount += neighborContribution(log2Depth, vec2(+texelSize.x, 0.0));
- responseAndCount += neighborContribution(log2Depth, vec2(0.0, -texelSize.y));
- responseAndCount += neighborContribution(log2Depth, vec2(0.0, +texelSize.y));
-
- float response = responseAndCount.x / responseAndCount.y;
- float strength = u_distanceAndEdlStrength.y;
- float shade = exp(-response * 300.0 * strength);
- color.rgb *= shade;
- out_FragColor = vec4(color);
-
- // Input and output depth are the same.
- gl_FragDepth = depthOrLogDepth;
- }
- `;function Dv(){this._framebuffer=new yi({colorAttachmentsLength:2,depth:!0,supportsDepthTexture:!0}),this._drawCommand=void 0,this._clearCommand=void 0,this._strength=1,this._radius=1}Object.defineProperties(Dv.prototype,{framebuffer:{get:function(){return this._framebuffer.framebuffer}},colorGBuffer:{get:function(){return this._framebuffer.getColorTexture(0)}},depthGBuffer:{get:function(){return this._framebuffer.getColorTexture(1)}}});function ZYe(e){e._framebuffer.destroy(),e._drawCommand=void 0,e._clearCommand=void 0}var LX=new z;function eXe(e,t){let n=new He({defines:["LOG_DEPTH_WRITE"],sources:[KM]}),i={u_pointCloud_colorGBuffer:function(){return e.colorGBuffer},u_pointCloud_depthGBuffer:function(){return e.depthGBuffer},u_distanceAndEdlStrength:function(){return LX.x=e._radius,LX.y=e._strength,LX}},o=Ve.fromCache({blending:Jt.ALPHA_BLEND,depthMask:!0,depthTest:{enabled:!0},stencilTest:Gt.setCesium3DTileBit(),stencilMask:Gt.CESIUM_3D_TILE_MASK});e._drawCommand=t.createViewportQuadCommand(n,{uniformMap:i,renderState:o,pass:Ie.CESIUM_3D_TILE,owner:e}),e._clearCommand=new ai({framebuffer:e.framebuffer,color:new V(0,0,0,0),depth:1,renderState:Ve.fromCache(),pass:Ie.CESIUM_3D_TILE,owner:e})}function tXe(e,t){let n=t.drawingBufferWidth,i=t.drawingBufferHeight;e._framebuffer.update(t,n,i),eXe(e,t)}function Cme(e){return e.drawBuffers&&e.fragmentDepth}Dv.isSupported=Cme;function nXe(e,t){let n=e.shaderCache.getDerivedShaderProgram(t,"EC");if(!l(n)){let i=t._attributeLocations,o=t.fragmentShaderSource.clone();o.sources.splice(0,0,`layout (location = 0) out vec4 out_FragData_0;
- layout (location = 1) out vec4 out_FragData_1;`),o.sources=o.sources.map(function(r){return r=He.replaceMain(r,"czm_point_cloud_post_process_main"),r=r.replaceAll(/out_FragColor/g,"out_FragData_0"),r}),o.sources.push(`void main()
- {
- czm_point_cloud_post_process_main();
- #ifdef LOG_DEPTH
- czm_writeLogDepth();
- out_FragData_1 = czm_packDepth(gl_FragDepth);
- #else
- out_FragData_1 = czm_packDepth(gl_FragCoord.z);
- #endif
- }`),n=e.shaderCache.createDerivedShaderProgram(t,"EC",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:o,attributeLocations:i})}return n}Dv.prototype.update=function(e,t,n,i){if(!Cme(e.context))return;this._strength=n.eyeDomeLightingStrength,this._radius=n.eyeDomeLightingRadius*e.pixelRatio,tXe(this,e.context);let o,r=e.commandList,a=r.length;for(o=t;o<a;++o){let u=r[o];if(u.primitiveType!==Re.POINTS||u.pass===Ie.TRANSLUCENT)continue;let f,d,p=u.derivedCommands.pointCloudProcessor;l(p)&&(f=p.command,d=p.originalShaderProgram),(!l(f)||u.dirty||d!==u.shaderProgram||f.framebuffer!==this.framebuffer)&&(f=tt.shallowClone(u,f),f.framebuffer=this.framebuffer,f.shaderProgram=nXe(e.context,u.shaderProgram),f.castShadows=!1,f.receiveShadows=!1,l(p)||(p={command:f,originalShaderProgram:u.shaderProgram},u.derivedCommands.pointCloudProcessor=p),p.originalShaderProgram=u.shaderProgram),r[o]=f}let s=this._clearCommand,c=this._drawCommand;c.boundingVolume=i,r.push(c),r.push(s)};Dv.prototype.isDestroyed=function(){return!1};Dv.prototype.destroy=function(){return ZYe(this),fe(this)};var Ag=Dv;function Tme(e){let t=e??{};this.attenuation=t.attenuation??!1,this.geometricErrorScale=t.geometricErrorScale??1,this.maximumAttenuation=t.maximumAttenuation,this.baseResolution=t.baseResolution,this.eyeDomeLighting=t.eyeDomeLighting??!0,this.eyeDomeLightingStrength=t.eyeDomeLightingStrength??1,this.eyeDomeLightingRadius=t.eyeDomeLightingRadius??1,this.backFaceCulling=t.backFaceCulling??!1,this.normalShading=t.normalShading??!0}Tme.isSupported=function(e){return Ag.isSupported(e.context)};var Ep=Tme;var Oc={},iXe=new se(0,0,0,1),ll=new se,oXe=new Je,NX=new z,FX=new z;Oc.worldToWindowCoordinates=function(e,t,n){return Oc.worldWithEyeOffsetToWindowCoordinates(e,t,h.ZERO,n)};var Eme=new se,vme=new h;function QM(e,t,n,i){let o=n.viewMatrix,r=M.multiplyByVector(o,se.fromElements(e.x,e.y,e.z,1,Eme),Eme),a=h.multiplyComponents(t,h.normalize(r,vme),vme);return r.x+=t.x+a.x,r.y+=t.y+a.y,r.z+=a.z,M.multiplyByVector(n.frustum.projectionMatrix,r,i)}var rXe=new de(Math.PI,D.PI_OVER_TWO),aXe=new h,sXe=new h;Oc.worldWithEyeOffsetToWindowCoordinates=function(e,t,n,i){let o=e.frameState,r=Oc.computeActualEllipsoidPosition(o,t,iXe);if(!l(r))return;let a=e.canvas,s=oXe;s.x=0,s.y=0,s.width=a.clientWidth,s.height=a.clientHeight;let c=e.camera,u=!1;if(o.mode===ie.SCENE2D){let f=e.mapProjection,d=rXe,p=f.project(d,aXe),g=h.clone(c.position,sXe),m=c.frustum.clone(),A=M.computeViewportTransformation(s,0,1,new M),y=c.frustum.projectionMatrix,x=c.positionWC.y,b=h.fromElements(D.sign(x)*p.x-x,0,-c.positionWC.x),C=pt.pointToGLWindowCoordinates(y,A,b);if(x===0||C.x<=0||C.x>=a.clientWidth)u=!0;else{if(C.x>a.clientWidth*.5){s.width=C.x,c.frustum.right=p.x-x,ll=QM(r,n,c,ll),Oc.clipToGLWindowCoordinates(s,ll,NX),s.x+=C.x,c.position.x=-c.position.x;let E=c.frustum.right;c.frustum.right=-c.frustum.left,c.frustum.left=-E,ll=QM(r,n,c,ll),Oc.clipToGLWindowCoordinates(s,ll,FX)}else{s.x+=C.x,s.width-=C.x,c.frustum.left=-p.x-x,ll=QM(r,n,c,ll),Oc.clipToGLWindowCoordinates(s,ll,NX),s.x=s.x-s.width,c.position.x=-c.position.x;let E=c.frustum.left;c.frustum.left=-c.frustum.right,c.frustum.right=-E,ll=QM(r,n,c,ll),Oc.clipToGLWindowCoordinates(s,ll,FX)}h.clone(g,c.position),c.frustum=m.clone(),i=z.clone(NX,i),(i.x<0||i.x>a.clientWidth)&&(i.x=FX.x)}}if(o.mode!==ie.SCENE2D||u){if(ll=QM(r,n,c,ll),ll.z<0&&!(c.frustum instanceof fn)&&!(c.frustum instanceof da))return;i=Oc.clipToGLWindowCoordinates(s,ll,i)}return i.y=a.clientHeight-i.y,i};Oc.worldToDrawingBufferCoordinates=function(e,t,n){if(n=Oc.worldToWindowCoordinates(e,t,n),!!l(n))return Oc.transformWindowToDrawingBuffer(e,n,n)};var yg=new h,cXe=new de;Oc.computeActualEllipsoidPosition=function(e,t,n){let i=e.mode;if(i===ie.SCENE3D)return h.clone(t,n);let o=e.mapProjection,r=o.ellipsoid.cartesianToCartographic(t,cXe);if(!l(r))return;if(o.project(r,yg),i===ie.COLUMBUS_VIEW)return h.fromElements(yg.z,yg.x,yg.y,n);if(i===ie.SCENE2D)return h.fromElements(0,yg.x,yg.y,n);let a=e.morphTime;return h.fromElements(D.lerp(yg.z,t.x,a),D.lerp(yg.x,t.y,a),D.lerp(yg.y,t.z,a),n)};var Sme=new h,wme=new h,Ime=new M;Oc.clipToGLWindowCoordinates=function(e,t,n){return h.divideByScalar(t,t.w,Sme),M.computeViewportTransformation(e,0,1,Ime),M.multiplyByPoint(Ime,Sme,wme),z.fromCartesian3(wme,n)};Oc.transformWindowToDrawingBuffer=function(e,t,n){let i=e.canvas,o=e.drawingBufferWidth/i.clientWidth,r=e.drawingBufferHeight/i.clientHeight;return z.fromElements(t.x*o,t.y*r,n)};var lXe=new se,Dme=new se;Oc.drawingBufferToWorldCoordinates=function(e,t,n,i){let r=e.context.uniformState,a=r.currentFrustum,s=a.x,c=a.y;if(e.frameState.useLogDepth){let g=n*r.log2FarDepthFromNearPlusOne,m=Math.pow(2,g)-1;n=c*(1-s/(m+s))/(c-s)}let u=e.view.passState.viewport,f=se.clone(se.UNIT_W,lXe);f.x=(t.x-u.x)/u.width*2-1,f.y=(t.y-u.y)/u.height*2-1,f.z=n*2-1,f.w=1;let d,p=e.camera.frustum;if(l(p.fovy)){d=M.multiplyByVector(r.inverseViewProjection,f,Dme);let g=1/d.w;h.multiplyByScalar(d,g,d)}else{let g=p.offCenterFrustum;l(g)&&(p=g),d=Dme,d.x=(f.x*(p.right-p.left)+p.left+p.right)*.5,d.y=(f.y*(p.top-p.bottom)+p.bottom+p.top)*.5,d.z=(f.z*(s-c)-s-c)*.5,d.w=1,d=M.multiplyByVector(r.inverseView,d,d)}return h.fromCartesian4(d,i)};var eo=Oc;var Pv={};Pv._deprecationWarning=Ms;var xg=Uint32Array.BYTES_PER_ELEMENT;Pv.parse=function(e,t){let n=t??0;t=n;let i=new Uint8Array(e),o=new DataView(e);t+=xg;let r=o.getUint32(t,!0);if(r!==1)throw new re(`Only Batched 3D Model version 1 is supported. Version ${r} is not.`);t+=xg;let a=o.getUint32(t,!0);t+=xg;let s=o.getUint32(t,!0);t+=xg;let c=o.getUint32(t,!0);t+=xg;let u=o.getUint32(t,!0);t+=xg;let f=o.getUint32(t,!0);t+=xg;let d;u>=570425344?(t-=xg*2,d=s,u=c,f=0,s=0,c=0,Pv._deprecationWarning("b3dm-legacy-header","This b3dm header is using the legacy format [batchLength] [batchTableByteLength]. The new format is [featureTableJsonByteLength] [featureTableBinaryByteLength] [batchTableJsonByteLength] [batchTableBinaryByteLength] from https://github.com/CesiumGS/3d-tiles/tree/main/specification/TileFormats/Batched3DModel.")):f>=570425344&&(t-=xg,d=u,u=s,f=c,s=0,c=0,Pv._deprecationWarning("b3dm-legacy-header","This b3dm header is using the legacy format [batchTableJsonByteLength] [batchTableBinaryByteLength] [batchLength]. The new format is [featureTableJsonByteLength] [featureTableBinaryByteLength] [batchTableJsonByteLength] [batchTableBinaryByteLength] from https://github.com/CesiumGS/3d-tiles/tree/main/specification/TileFormats/Batched3DModel."));let p;s===0?p={BATCH_LENGTH:d??0}:(p=Cr(i,t,s),t+=s);let g=new Uint8Array(e,t,c);t+=c;let m,A;u>0&&(m=Cr(i,t,u),t+=u,f>0&&(A=new Uint8Array(e,t,f),A=new Uint8Array(A),t+=f));let y=n+a-t;if(y===0)throw new re("glTF byte length must be greater than 0.");let x;return t%4===0?x=new Uint8Array(e,t,y):(Pv._deprecationWarning("b3dm-glb-unaligned","The embedded glb is not aligned to a 4-byte boundary."),x=new Uint8Array(i.subarray(t,t+y))),{batchLength:d,featureTableJson:p,featureTableBinary:g,batchTableJson:m,batchTableBinary:A,gltf:x}};var $M=Pv;function JM(e,t){this.json=e,this.buffer=t,this._cachedTypedArrays={},this.featuresLength=0}function Pme(e,t,n,i,o,r){let a=e._cachedTypedArrays,s=a[t];return l(s)||(s=Y.createArrayBufferView(n,e.buffer.buffer,e.buffer.byteOffset+r,o*i),a[t]=s),s}function uXe(e,t,n,i){let o=e._cachedTypedArrays,r=o[t];return l(r)||(r=Y.createTypedArray(n,i),o[t]=r),r}JM.prototype.getGlobalProperty=function(e,t,n){let i=this.json[e];if(l(i))return l(i.byteOffset)?(t=t??Y.UNSIGNED_INT,n=n??1,Pme(this,e,t,n,1,i.byteOffset)):i};JM.prototype.hasProperty=function(e){return l(this.json[e])};JM.prototype.getPropertyArray=function(e,t,n){let i=this.json[e];if(l(i))return l(i.byteOffset)?(l(i.componentType)&&(t=Y.fromName(i.componentType)),Pme(this,e,t,n,this.featuresLength,i.byteOffset)):uXe(this,e,t,i)};JM.prototype.getProperty=function(e,t,n,i,o){let r=this.json[e];if(!l(r))return;let a=this.getPropertyArray(e,t,n);if(n===1)return a[i];for(let s=0;s<n;++s)o[s]=a[n*i+s];return o};var Zh=JM;function ZM(e){let t=e.count,n=e.batchTable,i=e.binaryBody,o=e.parseAsPropertyAttributes??!1,r=e.customAttributeOutput,a=fXe(n),s;l(a.jsonProperties)&&(s=new gg({count:t,properties:a.jsonProperties}));let c;l(a.hierarchy)&&(c=new ob({extension:a.hierarchy,binaryBody:i}));let u=Kh.BATCH_TABLE_CLASS_NAME,f=a.binaryProperties,d,p,g;if(o){let y=hXe(t,u,f,i,r);g=y.transcodedSchema,p=[new Cb({propertyAttribute:y.propertyAttributeJson,class:y.transcodedClass})]}else{let y=dXe(t,u,f,i);g=y.transcodedSchema;let x=y.featureTableJson;d=new wd({count:x.count,properties:x.properties,class:y.transcodedClass,bufferViews:y.bufferViewsTypedArrays}),p=[]}let m=[];if(l(d)||l(s)||l(c)){let y=new Ql({id:0,name:"Batch Table",count:t,metadataTable:d,jsonMetadataTable:s,batchTableHierarchy:c});m.push(y)}let A={schema:g,propertyTables:m,propertyAttributes:p,extensions:a.extensions,extras:a.extras};return new Ls(A)}function fXe(e){let t=e.HIERARCHY,n=e.extras,i=e.extensions,o;l(t)?(ZM._deprecationWarning("batchTableHierarchyExtension","The batch table HIERARCHY property has been moved to an extension. Use extensions.3DTILES_batch_table_hierarchy instead."),o=t):l(i)&&(o=i["3DTILES_batch_table_hierarchy"]);let r,a={};for(let s in e){if(!e.hasOwnProperty(s)||s==="HIERARCHY"||s==="extensions"||s==="extras")continue;let c=e[s];Array.isArray(c)?(r=l(r)?r:{},r[s]=c):a[s]=c}return{binaryProperties:a,jsonProperties:r,hierarchy:o,extras:n,extensions:i}}function dXe(e,t,n,i){let o={},r={},a={},s=0;for(let d in n){if(!n.hasOwnProperty(d))continue;if(!l(i))throw new re(`Property ${d} requires a batch table binary.`);let p=n[d],g=vd(p);r[d]={bufferView:s},o[d]=Rme(p),a[s]=g.createArrayBufferView(i.buffer,i.byteOffset+p.byteOffset,e),s++}let c={classes:{}};c.classes[t]={properties:o};let u=Xl.fromJson(c);return{featureTableJson:{class:t,count:e,properties:r},bufferViewsTypedArrays:a,transcodedSchema:u,transcodedClass:u.classes[t]}}function hXe(e,t,n,i,o){let r={},a={},s=0;for(let d in n){if(!n.hasOwnProperty(d))continue;let p=n[d];if(!l(i)&&!l(p.typedArray))throw new re(`Property ${d} requires a batch table binary.`);let g=ht.sanitizeGlslIdentifier(d);(g===""||r.hasOwnProperty(g))&&(g=`property_${s}`,s++);let m=Rme(p);m.name=d,r[g]=m;let A=g.toUpperCase();A.startsWith("_")||(A=`_${A}`);let y=p.typedArray;l(y)||(y=vd(p).createArrayBufferView(i.buffer,i.byteOffset+p.byteOffset,e));let x=new _n.Attribute;x.name=A,x.count=e,x.type=p.type;let b=Y.fromTypedArray(y);(b===Y.INT||b===Y.UNSIGNED_INT||b===Y.DOUBLE)&&(ZM._oneTimeWarning("Cast pnts property to floats",`Point cloud property "${A}" will be cast to a float array because INT, UNSIGNED_INT, and DOUBLE are not valid WebGL vertex attribute types. Some precision may be lost.`),y=new Float32Array(y)),x.componentDatatype=Y.fromTypedArray(y),x.typedArray=y,o.push(x),a[g]={attribute:A}}let c={classes:{}};c.classes[t]={properties:r};let u=Xl.fromJson(c);return{class:t,propertyAttributeJson:{properties:a},transcodedSchema:u,transcodedClass:u.classes[t]}}function Rme(e){let t=mXe(e.componentType);return{type:e.type,componentType:t}}function mXe(e){switch(e){case"BYTE":return"INT8";case"UNSIGNED_BYTE":return"UINT8";case"SHORT":return"INT16";case"UNSIGNED_SHORT":return"UINT16";case"INT":return"INT32";case"UNSIGNED_INT":return"UINT32";case"FLOAT":return"FLOAT32";case"DOUBLE":return"FLOAT64"}}ZM._deprecationWarning=Ms;ZM._oneTimeWarning=_t;var bg=ZM;var Sb={UNLOADED:0,LOADING:1,PROCESSING:2,READY:3,FAILED:4},pXe=_n.FeatureIdAttribute,kX=class extends qi{constructor(t){super(),t=t??G.EMPTY_OBJECT;let n=t.b3dmResource,i=t.baseResource,o=t.arrayBuffer,r=t.byteOffset??0,a=t.releaseGltfJson??!1,s=t.asynchronous??!0,c=t.incrementallyLoadTextures??!0,u=t.upAxis??Li.Y,f=t.forwardAxis??Li.X,d=t.loadAttributesAsTypedArray??!1,p=t.loadAttributesFor2D??!1,g=t.enablePick??!1,m=t.loadIndicesForWireframe??!1,A=t.loadPrimitiveOutline??!0,y=t.loadForClassification??!1;i=l(i)?i:n.clone(),this._b3dmResource=n,this._baseResource=i,this._arrayBuffer=o,this._byteOffset=r,this._releaseGltfJson=a,this._asynchronous=s,this._incrementallyLoadTextures=c,this._upAxis=u,this._forwardAxis=f,this._loadAttributesAsTypedArray=d,this._loadAttributesFor2D=p,this._enablePick=g,this._loadIndicesForWireframe=m,this._loadPrimitiveOutline=A,this._loadForClassification=y,this._state=Sb.UNLOADED,this._promise=void 0,this._gltfLoader=void 0,this._batchLength=0,this._propertyTable=void 0,this._batchTable=void 0,this._components=void 0,this._transform=M.IDENTITY}get texturesLoaded(){return this._gltfLoader?.texturesLoaded}get cacheKey(){}get components(){return this._components}load(){if(l(this._promise))return this._promise;let t=$M.parse(this._arrayBuffer,this._byteOffset),n=t.batchLength,i=t.featureTableJson,o=t.featureTableBinary,r=t.batchTableJson,a=t.batchTableBinary,s=new Zh(i,o);n=s.getGlobalProperty("BATCH_LENGTH"),this._batchLength=n;let c=s.getGlobalProperty("RTC_CENTER",Y.FLOAT,3);l(c)&&(this._transform=M.fromTranslation(h.fromArray(c))),this._batchTable={json:r,binary:a};let u=new bf({typedArray:t.gltf,upAxis:this._upAxis,forwardAxis:this._forwardAxis,gltfResource:this._b3dmResource,baseResource:this._baseResource,releaseGltfJson:this._releaseGltfJson,incrementallyLoadTextures:this._incrementallyLoadTextures,loadAttributesAsTypedArray:this._loadAttributesAsTypedArray,loadAttributesFor2D:this._loadAttributesFor2D,enablePick:this._enablePick,loadIndicesForWireframe:this._loadIndicesForWireframe,loadPrimitiveOutline:this._loadPrimitiveOutline,loadForClassification:this._loadForClassification,renameBatchIdSemantic:!0});this._gltfLoader=u,this._state=Sb.LOADING;let f=this;return this._promise=u.load().then(function(){if(!f.isDestroyed())return f._state=Sb.PROCESSING,f}).catch(function(d){if(!f.isDestroyed())return gXe(f,d)}),this._promise}process(t){if(this._state===Sb.READY)return!0;if(this._state!==Sb.PROCESSING||!this._gltfLoader.process(t))return!1;let i=this._gltfLoader.components;return i.transform=M.multiplyTransformation(this._transform,i.transform,i.transform),_Xe(this,i),this._components=i,this._arrayBuffer=void 0,this._state=Sb.READY,!0}unload(){l(this._gltfLoader)&&!this._gltfLoader.isDestroyed()&&this._gltfLoader.unload(),this._components=void 0,this._arrayBuffer=void 0}};function gXe(e,t){return e.unload(),e._state=Sb.FAILED,t=e.getError("Failed to load b3dm",t),Promise.reject(t)}function _Xe(e,t){let n=e._batchTable,i=e._batchLength;if(i===0)return;let o;if(l(n.json))o=bg({count:i,batchTable:n.json,binaryBody:n.binary});else{let s=new Ql({name:Kh.BATCH_TABLE_CLASS_NAME,count:i});o=new Ls({schema:{},propertyTables:[s]})}let r=t.scene.nodes,a=r.length;for(let s=0;s<a;s++)Ome(r[s]);t.structuralMetadata=o}function Ome(e){let t=e.children.length;for(let i=0;i<t;i++)Ome(e.children[i]);let n=e.primitives.length;for(let i=0;i<n;i++){let o=e.primitives[i],r=ht.getAttributeBySemantic(o,it.FEATURE_ID);if(l(r)){r.setIndex=0;let a=new pXe;a.propertyTableId=0,a.setIndex=0,a.positionalLabel="featureId_0",o.featureIds.push(a)}}}var eB=kX;var zX=class extends qi{constructor(t){super(),t=t??G.EMPTY_OBJECT,this._geoJson=t.geoJson,this._components=void 0}get cacheKey(){}get components(){return this._components}load(){return Promise.resolve(this)}process(t){return l(this._components)||(this._components=PXe(this._geoJson,t),this._geoJson=void 0),!0}unload(){this._components=void 0}};function AXe(){this.lines=void 0,this.points=void 0,this.properties=void 0}function yXe(){this.features=[]}function UX(e){let t=e[0],n=e[1],i=e[2]??0;return new h(t,n,i)}function VX(e){let t=e.length,n=new Array(t);for(let o=0;o<t;o++)n[o]=UX(e[o]);return[n]}function xXe(e){let t=e.length,n=new Array(t);for(let i=0;i<t;i++)n[i]=VX(e[i])[0];return n}function Mme(e){let t=e.length,n=new Array(t);for(let i=0;i<t;i++)n[i]=VX(e[i])[0];return n}function bXe(e){let t=e.length,n=[];for(let i=0;i<t;i++){let o=Mme(e[i]);Qn(n,o)}return n}function CXe(e){return[UX(e)]}function TXe(e){let t=e.length,n=new Array(t);for(let i=0;i<t;i++)n[i]=UX(e[i]);return n}var EXe={LineString:VX,MultiLineString:xXe,MultiPolygon:bXe,Polygon:Mme,MultiPoint:TXe,Point:CXe},vXe={LineString:Re.LINES,MultiLineString:Re.LINES,MultiPolygon:Re.LINES,Polygon:Re.LINES,MultiPoint:Re.POINTS,Point:Re.POINTS};function Bme(e,t){if(!l(e.geometry))return;let n=e.geometry.type,i=EXe[n],o=vXe[n],r=e.geometry.coordinates;if(!l(i)||!l(r))return;let a=new AXe;o===Re.LINES?a.lines=i(r):o===Re.POINTS&&(a.points=i(r)),a.properties=e.properties,t.features.push(a)}function SXe(e,t){let n=e.features,i=n.length;for(let o=0;o<i;o++)Bme(n[o],t)}var wXe={FeatureCollection:SXe,Feature:Bme},Ej=new h;function IXe(e,t,n){let i=0,o=0,r=e.length;for(let B=0;B<r;B++){let L=e[B];if(l(L.lines)){let _=L.lines.length;for(let T=0;T<_;T++){let v=L.lines[T];i+=v.length,o+=(v.length-1)*2}}}let a=new Float32Array(i*3),s=new Float32Array(i),c=Ue.createTypedArray(i,o),u=Ue.fromTypedArray(c),f=new h(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),d=new h(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY),p=0,g=0;for(let B=0;B<r;B++){let L=e[B];if(!l(L.lines))continue;let _=L.lines.length;for(let T=0;T<_;T++){let v=L.lines[T],I=v.length;for(let O=0;O<I;O++){let N=v[O],j=h.fromDegrees(N.x,N.y,N.z,te.WGS84,Ej),k=M.multiplyByPoint(t,j,Ej);h.minimumByComponent(f,k,f),h.maximumByComponent(d,k,d),h.pack(k,a,p*3),s[p]=B,O<I-1&&(c[g*2]=p,c[g*2+1]=p+1,g++),p++}}}let m=Ke.createVertexBuffer({typedArray:a,context:n.context,usage:Oe.STATIC_DRAW});m.vertexArrayDestroyable=!1;let A=Ke.createVertexBuffer({typedArray:s,context:n.context,usage:Oe.STATIC_DRAW});A.vertexArrayDestroyable=!1;let y=Ke.createIndexBuffer({typedArray:c,context:n.context,usage:Oe.STATIC_DRAW,indexDatatype:u});y.vertexArrayDestroyable=!1;let x=new _n.Attribute;x.semantic=it.POSITION,x.componentDatatype=Y.FLOAT,x.type=Ft.VEC3,x.count=i,x.min=f,x.max=d,x.buffer=m;let b=new _n.Attribute;b.semantic=it.FEATURE_ID,b.setIndex=0,b.componentDatatype=Y.FLOAT,b.type=Ft.SCALAR,b.count=i,b.buffer=A;let C=[x,b],E=new _n.Material;E.unlit=!0;let S=new _n.Indices;S.indexDatatype=u,S.count=c.length,S.buffer=y;let w=new _n.FeatureIdAttribute;w.featureCount=r,w.propertyTableId=0,w.setIndex=0,w.positionalLabel="featureId_0";let P=[w],R=new _n.Primitive;return R.attributes=C,R.indices=S,R.featureIds=P,R.primitiveType=Re.LINES,R.material=E,R}function DXe(e,t,n){let i=0,o=e.length;for(let C=0;C<o;C++){let E=e[C];l(E.points)&&(i+=E.points.length)}let r=new Float32Array(i*3),a=new Float32Array(i),s=new h(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),c=new h(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY),u=0;for(let C=0;C<o;C++){let E=e[C];if(!l(E.points))continue;let S=E.points.length;for(let w=0;w<S;w++){let P=E.points[w],R=h.fromDegrees(P.x,P.y,P.z,te.WGS84,Ej),B=M.multiplyByPoint(t,R,Ej);h.minimumByComponent(s,B,s),h.maximumByComponent(c,B,c),h.pack(B,r,u*3),a[u]=C,u++}}let f=Ke.createVertexBuffer({typedArray:r,context:n.context,usage:Oe.STATIC_DRAW});f.vertexArrayDestroyable=!1;let d=Ke.createVertexBuffer({typedArray:a,context:n.context,usage:Oe.STATIC_DRAW});d.vertexArrayDestroyable=!1;let p=new _n.Attribute;p.semantic=it.POSITION,p.componentDatatype=Y.FLOAT,p.type=Ft.VEC3,p.count=i,p.min=s,p.max=c,p.buffer=f;let g=new _n.Attribute;g.semantic=it.FEATURE_ID,g.setIndex=0,g.componentDatatype=Y.FLOAT,g.type=Ft.SCALAR,g.count=i,g.buffer=d;let m=[p,g],A=new _n.Material;A.unlit=!0;let y=new _n.FeatureIdAttribute;y.featureCount=o,y.propertyTableId=0,y.setIndex=0,y.positionalLabel="featureId_0";let x=[y],b=new _n.Primitive;return b.attributes=m,b.featureIds=x,b.primitiveType=Re.POINTS,b.material=A,b}function PXe(e,t){let n=new yXe,i=wXe[e.type];l(i)&&i(e,n);let o=n.features,r=o.length;if(r===0)throw new re("GeoJSON must have at least one feature");let a={};for(let B=0;B<r;B++){let _=o[B].properties??G.EMPTY_OBJECT;for(let T in _)_.hasOwnProperty(T)&&(l(a[T])||(a[T]=new Array(r)))}for(let B=0;B<r;B++){let L=o[B];for(let _ in a)if(a.hasOwnProperty(_)){let T=L.properties[_]??"";a[_][B]=T}}let s=new gg({count:r,properties:a}),u=[new Ql({id:0,count:r,jsonMetadataTable:s})],f=Xl.fromJson({}),d=new Ls({schema:f,propertyTables:u}),p=new h(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),g=new h(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY),m=!1,A=!1;for(let B=0;B<r;B++){let L=o[B];if(l(L.lines)){m=!0;let _=L.lines.length;for(let T=0;T<_;T++){let v=L.lines[T],I=v.length;for(let O=0;O<I;O++)h.minimumByComponent(p,v[O],p),h.maximumByComponent(g,v[O],g)}}if(l(L.points)){A=!0;let _=L.points.length;for(let T=0;T<_;T++){let v=L.points[T];h.minimumByComponent(p,v,p),h.maximumByComponent(g,v,g)}}}let y=h.midpoint(p,g,new h),x=h.fromDegrees(y.x,y.y,y.z,te.WGS84,new h),b=pt.eastNorthUpToFixedFrame(x,te.WGS84,new M),C=M.inverseTransformation(b,new M),E=[];m&&E.push(IXe(o,C,t)),A&&E.push(DXe(o,C,t));let S=new _n.Node;S.index=0,S.primitives=E;let w=[S],P=new _n.Scene;P.nodes=w;let R=new _n.Components;return R.scene=P,R.nodes=w,R.transform=b,R.structuralMetadata=d,R}var tB=zX;var vj={};vj._deprecationWarning=Ms;var NA=Uint32Array.BYTES_PER_ELEMENT;vj.parse=function(e,t){let n=t??0;t=n;let i=new Uint8Array(e),o=new DataView(e);t+=NA;let r=o.getUint32(t,!0);if(r!==1)throw new re(`Only Instanced 3D Model version 1 is supported. Version ${r} is not.`);t+=NA;let a=o.getUint32(t,!0);t+=NA;let s=o.getUint32(t,!0);if(s===0)throw new re("featureTableJsonByteLength is zero, the feature table must be defined.");t+=NA;let c=o.getUint32(t,!0);t+=NA;let u=o.getUint32(t,!0);t+=NA;let f=o.getUint32(t,!0);t+=NA;let d=o.getUint32(t,!0);if(d!==1&&d!==0)throw new re(`Only glTF format 0 (uri) or 1 (embedded) are supported. Format ${d} is not.`);t+=NA;let p=Cr(i,t,s);t+=s;let g=new Uint8Array(e,t,c);t+=c;let m,A;u>0&&(m=Cr(i,t,u),t+=u,f>0&&(A=new Uint8Array(e,t,f),A=new Uint8Array(A),t+=f));let y=n+a-t;if(y===0)throw new re("glTF byte length must be greater than 0.");let x;return t%4===0?x=new Uint8Array(e,t,y):(vj._deprecationWarning("i3dm-glb-unaligned","The embedded glb is not aligned to a 4-byte boundary."),x=new Uint8Array(i.subarray(t,t+y))),{gltfFormat:d,featureTableJson:p,featureTableBinary:g,batchTableJson:m,batchTableBinary:A,gltf:x}};var nB=vj;var Cg={NOT_LOADED:0,LOADING:1,PROCESSING:2,POST_PROCESSING:3,READY:4,FAILED:5,UNLOADED:6},Sj=_n.Attribute,RXe=_n.FeatureIdAttribute,Nme=_n.Instances,jX=class extends qi{constructor(t){super(),t=t??G.EMPTY_OBJECT;let n=t.i3dmResource,i=t.arrayBuffer,o=t.baseResource,r=t.byteOffset??0,a=t.releaseGltfJson??!1,s=t.asynchronous??!0,c=t.incrementallyLoadTextures??!0,u=t.upAxis??Li.Y,f=t.forwardAxis??Li.X,d=t.loadAttributesAsTypedArray??!1,p=t.loadIndicesForWireframe??!1,g=t.loadPrimitiveOutline??!0,m=t.enablePick??!1;o=l(o)?o:n.clone(),this._i3dmResource=n,this._baseResource=o,this._arrayBuffer=i,this._byteOffset=r,this._releaseGltfJson=a,this._asynchronous=s,this._incrementallyLoadTextures=c,this._upAxis=u,this._forwardAxis=f,this._loadAttributesAsTypedArray=d,this._loadIndicesForWireframe=p,this._loadPrimitiveOutline=g,this._enablePick=m,this._state=Cg.NOT_LOADED,this._promise=void 0,this._gltfLoader=void 0,this._buffers=[],this._components=void 0,this._transform=M.IDENTITY,this._batchTable=void 0,this._featureTable=void 0,this._instancesLength=0}get texturesLoaded(){return this._gltfLoader?.texturesLoaded}get cacheKey(){}get components(){return this._components}load(){if(l(this._promise))return this._promise;let t=nB.parse(this._arrayBuffer,this._byteOffset),n=t.featureTableJson,i=t.featureTableBinary,o=t.batchTableJson,r=t.batchTableBinary,a=t.gltfFormat,s=new Zh(n,i);this._featureTable=s;let c=s.getGlobalProperty("INSTANCES_LENGTH");if(s.featuresLength=c,!l(c))throw new re("Feature table global property: INSTANCES_LENGTH must be defined");this._instancesLength=c;let u=s.getGlobalProperty("RTC_CENTER",Y.FLOAT,3);l(u)&&(this._transform=M.fromTranslation(h.fromArray(u))),this._batchTable={json:o,binary:r};let f={upAxis:this._upAxis,forwardAxis:this._forwardAxis,releaseGltfJson:this._releaseGltfJson,incrementallyLoadTextures:this._incrementallyLoadTextures,loadAttributesAsTypedArray:this._loadAttributesAsTypedArray,enablePick:this._enablePick,loadIndicesForWireframe:this._loadIndicesForWireframe,loadPrimitiveOutline:this._loadPrimitiveOutline};if(a===0){let p=wu(t.gltf);p=p.replace(/[\s\0]+$/,"");let g=this._baseResource.getDerivedResource({url:p});f.gltfResource=g,f.baseResource=g}else f.gltfResource=this._i3dmResource,f.typedArray=t.gltf;let d=new bf(f);return this._gltfLoader=d,this._state=Cg.LOADING,this._promise=d.load().then(()=>{if(!this.isDestroyed())return this._state=Cg.PROCESSING,this}).catch(p=>{if(!this.isDestroyed())throw OXe(this,p)}),this._promise}process(t){if(this._state===Cg.READY)return!0;let n=this._gltfLoader,i=!1;if(this._state===Cg.PROCESSING&&(i=n.process(t)),!i)return!1;let o=n.components;return o.transform=M.multiplyTransformation(this._transform,o.transform,o.transform),LXe(this,o,t),MXe(this,o),this._components=o,this._arrayBuffer=void 0,this._state=Cg.READY,!0}isUnloaded(){return this._state===Cg.UNLOADED}unload(){l(this._gltfLoader)&&!this._gltfLoader.isDestroyed()&&this._gltfLoader.unload(),UXe(this),this._components=void 0,this._arrayBuffer=void 0,this._state=Cg.UNLOADED}};function OXe(e,t){return e.unload(),e._state=Cg.FAILED,e.getError("Failed to load i3dm",t)}function MXe(e,t){let n=e._batchTable,i=e._instancesLength;if(i===0)return;let o;if(l(n.json))o=bg({count:i,batchTable:n.json,binaryBody:n.binary});else{let r=new Ql({name:Kh.BATCH_TABLE_CLASS_NAME,count:i});o=new Ls({schema:{},propertyTables:[r]})}t.structuralMetadata=o}var wj=new h,GX=new Array(4),BXe=new M;function LXe(e,t,n){let i,o=e._featureTable,r=e._instancesLength;if(r===0)return;let a=o.getGlobalProperty("RTC_CENTER",Y.FLOAT,3),s=o.getGlobalProperty("EAST_NORTH_UP"),c=o.hasProperty("NORMAL_UP")||o.hasProperty("NORMAL_UP_OCT32P")||s,u=o.hasProperty("SCALE")||o.hasProperty("SCALE_NON_UNIFORM"),f=FXe(o,r),d;c&&(d=new Float32Array(4*r));let p;u&&(p=new Float32Array(3*r));let g=new Float32Array(r),m=h.unpackArray(f),A=new h,y=new h,x=new h,b=new h,C=new $,E=new Le,S=new Array(4),w=new h,P=new Array(3),R=new M;if(!l(a)||h.equals(h.unpack(a),h.ZERO)){let k=ce.fromPoints(m);for(i=0;i<m.length;i++)h.subtract(m[i],k.center,wj),f[3*i+0]=wj.x,f[3*i+1]=wj.y,f[3*i+2]=wj.z;let U=M.fromTranslation(k.center,BXe);t.transform=M.multiplyTransformation(U,t.transform,t.transform)}for(i=0;i<r;i++){A=h.clone(m[i]),l(a)&&h.add(A,h.unpack(a),A),c&&(kXe(o,s,i,E,A,x,y,b,C,R),Le.pack(E,S,0),d[4*i+0]=S[0],d[4*i+1]=S[1],d[4*i+2]=S[2],d[4*i+3]=S[3]),u&&(zXe(o,i,w),h.pack(w,P,0),p[3*i+0]=P[0],p[3*i+1]=P[1],p[3*i+2]=P[2]);let k=o.getProperty("BATCH_ID",Y.UNSIGNED_SHORT,1,i);l(k)||(k=i),g[i]=k}let B=new Nme;B.transformInWorldSpace=!0;let L=e._buffers,_=new Sj;if(_.name="Instance Translation",_.semantic=Er.TRANSLATION,_.componentDatatype=Y.FLOAT,_.type=Ft.VEC3,_.count=r,_.typedArray=f,!c){let k=Ke.createVertexBuffer({context:n.context,typedArray:f,usage:Oe.STATIC_DRAW});k.vertexArrayDestroyable=!1,L.push(k),_.buffer=k}if(B.attributes.push(_),c){let k=new Sj;k.name="Instance Rotation",k.semantic=Er.ROTATION,k.componentDatatype=Y.FLOAT,k.type=Ft.VEC4,k.count=r,k.typedArray=d,B.attributes.push(k)}if(u){let k=new Sj;if(k.name="Instance Scale",k.semantic=Er.SCALE,k.componentDatatype=Y.FLOAT,k.type=Ft.VEC3,k.count=r,c)k.typedArray=p;else{let U=Ke.createVertexBuffer({context:n.context,typedArray:p,usage:Oe.STATIC_DRAW});U.vertexArrayDestroyable=!1,L.push(U),k.buffer=U}B.attributes.push(k)}let T=new Sj;T.name="Instance Feature ID",T.setIndex=0,T.semantic=Er.FEATURE_ID,T.componentDatatype=Y.FLOAT,T.type=Ft.SCALAR,T.count=r;let v=Ke.createVertexBuffer({context:n.context,typedArray:g,usage:Oe.STATIC_DRAW});v.vertexArrayDestroyable=!1,L.push(v),T.buffer=v,B.attributes.push(T);let I=new RXe;I.propertyTableId=0,I.setIndex=0,I.positionalLabel="instanceFeatureId_0",B.featureIds.push(I);let O=t.nodes,N=O.length,j=!1;for(i=0;i<N;i++){let k=O[i];k.primitives.length>0&&(k.instances=j?NXe(B):B,j=!0)}}function NXe(e){let t=new Nme;t.transformInWorldSpace=e.transformInWorldSpace;let n=e.attributes,i=n.length;for(let o=0;o<i;o++){let r=We(n[o],!1);t.attributes.push(r)}return t.featureIds=e.featureIds,t}function FXe(e,t){if(e.hasProperty("POSITION"))return e.getPropertyArray("POSITION",Y.FLOAT,3);if(e.hasProperty("POSITION_QUANTIZED")){let n=e.getPropertyArray("POSITION_QUANTIZED",Y.UNSIGNED_SHORT,3),i=e.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",Y.FLOAT,3);if(!l(i))throw new re("Global property: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");let o=e.getGlobalProperty("QUANTIZED_VOLUME_SCALE",Y.FLOAT,3);if(!l(o))throw new re("Global property: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");let r=new Float32Array(n.length);for(let a=0;a<n.length/3;a++)for(let s=0;s<3;s++){let c=3*a+s;r[c]=n[c]/65535*o[s]+i[s]}return r}else throw new re("Either POSITION or POSITION_QUANTIZED must be defined for each instance.")}var Lme=new Array(4);function kXe(e,t,n,i,o,r,a,s,c,u){let f=e.getProperty("NORMAL_UP",Y.FLOAT,3,n,GX),d=e.getProperty("NORMAL_RIGHT",Y.FLOAT,3,n,Lme),p=!1;if(l(f)){if(!l(d))throw new re("To define a custom orientation, both NORMAL_UP and NORMAL_RIGHT must be defined.");h.unpack(f,0,r),h.unpack(d,0,a),p=!0}else{let g=e.getProperty("NORMAL_UP_OCT32P",Y.UNSIGNED_SHORT,2,n,GX),m=e.getProperty("NORMAL_RIGHT_OCT32P",Y.UNSIGNED_SHORT,2,n,Lme);if(l(g)){if(!l(m))throw new re("To define a custom orientation with oct-encoded vectors, both NORMAL_UP_OCT32P and NORMAL_RIGHT_OCT32P must be defined.");nn.octDecodeInRange(g[0],g[1],65535,r),nn.octDecodeInRange(m[0],m[1],65535,a),p=!0}else t?(pt.eastNorthUpToFixedFrame(o,te.WGS84,u),M.getMatrix3(u,c)):$.clone($.IDENTITY,c)}p&&(h.cross(a,r,s),h.normalize(s,s),$.setColumn(c,0,a,c),$.setColumn(c,1,r,c),$.setColumn(c,2,s,c)),Le.fromRotationMatrix(c,i)}function zXe(e,t,n){n=h.fromElements(1,1,1,n);let i=e.getProperty("SCALE",Y.FLOAT,1,t);l(i)&&h.multiplyByScalar(n,i,n);let o=e.getProperty("SCALE_NON_UNIFORM",Y.FLOAT,3,t,GX);l(o)&&(n.x*=o[0],n.y*=o[1],n.z*=o[2])}function UXe(e){let t=e._buffers,n=t.length;for(let i=0;i<n;i++){let o=t[i];o.isDestroyed()||o.destroy()}t.length=0}var iB=jX;var Fme={STOPPED:0,ANIMATING:1};Object.freeze(Fme);var em=Fme;function Rv(){this.times=void 0,this.points=void 0,_e.throwInstantiationError()}Rv.getPointType=function(e){if(typeof e=="number")return Number;if(e instanceof h)return h;if(e instanceof Le)return Le};Rv.prototype.evaluate=_e.throwInstantiationError;Rv.prototype.findTimeInterval=function(e,t){let n=this.times,i=n.length;if(t=t??0,e>=n[t]){if(t+1<i&&e<n[t+1])return t;if(t+2<i&&e<n[t+2])return t+1}else if(t-1>=0&&e>=n[t-1])return t-1;let o;if(e>n[t])for(o=t;o<i-1&&!(e>=n[o]&&e<n[o+1]);++o);else for(o=t-1;o>=0&&!(e>=n[o]&&e<n[o+1]);--o);return o===i-1&&(o=i-2),o};Rv.prototype.wrapTime=function(e){let t=this.times,n=t[t.length-1],i=t[0],o=n-i,r;return e<i&&(r=Math.floor((i-e)/o)+1,e+=r*o),e>n&&(r=Math.floor((e-n)/o)+1,e-=r*o),e};Rv.prototype.clampTime=function(e){let t=this.times;return D.clamp(e,t[0],t[t.length-1])};var xo=Rv;function Ov(e){this._value=e,this._valueType=xo.getPointType(e)}Object.defineProperties(Ov.prototype,{value:{get:function(){return this._value}}});Ov.prototype.findTimeInterval=function(e){};Ov.prototype.wrapTime=function(e){return 0};Ov.prototype.clampTime=function(e){return 0};Ov.prototype.evaluate=function(e,t){let n=this._value,i=this._valueType;return i===Number?n:i.clone(n,t)};var oB=Ov;function Mv(e){e=e??G.EMPTY_OBJECT;let t=e.points,n=e.times;this._times=n,this._points=t,this._pointType=xo.getPointType(t[0]),this._lastTimeIndex=0}Object.defineProperties(Mv.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}});Mv.prototype.findTimeInterval=xo.prototype.findTimeInterval;Mv.prototype.wrapTime=xo.prototype.wrapTime;Mv.prototype.clampTime=xo.prototype.clampTime;Mv.prototype.evaluate=function(e,t){let n=this.points,i=this.times,o=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),r=(e-i[o])/(i[o+1]-i[o]);return this._pointType===Number?(1-r)*n[o]+r*n[o+1]:(l(t)||(t=new h),h.lerp(n[o],n[o+1],r,t))};var FA=Mv;var kme={};kme.solve=function(e,t,n,i){let o=new Array(n.length),r=new Array(i.length),a=new Array(i.length),s;for(s=0;s<r.length;s++)r[s]=new h,a[s]=new h;o[0]=n[0]/t[0],r[0]=h.multiplyByScalar(i[0],1/t[0],r[0]);let c;for(s=1;s<o.length;++s)c=1/(t[s]-o[s-1]*e[s-1]),o[s]=n[s]*c,r[s]=h.subtract(i[s],h.multiplyByScalar(r[s-1],e[s-1],r[s]),r[s]),r[s]=h.multiplyByScalar(r[s],c,r[s]);for(c=1/(t[s]-o[s-1]*e[s-1]),r[s]=h.subtract(i[s],h.multiplyByScalar(r[s-1],e[s-1],r[s]),r[s]),r[s]=h.multiplyByScalar(r[s],c,r[s]),a[a.length-1]=r[r.length-1],s=a.length-2;s>=0;--s)a[s]=h.subtract(r[s],h.multiplyByScalar(a[s+1],o[s],a[s]),a[s]);return a};var Bv=kme;var zme=[],Ume=[],Vme=[],jme=[];function VXe(e,t,n){let i=zme,o=Vme,r=Ume,a=jme;i.length=o.length=e.length-1,r.length=a.length=e.length;let s;i[0]=r[0]=1,o[0]=0;let c=a[0];for(l(c)||(c=a[0]=new h),h.clone(t,c),s=1;s<i.length-1;++s)i[s]=o[s]=1,r[s]=4,c=a[s],l(c)||(c=a[s]=new h),h.subtract(e[s+1],e[s-1],c),h.multiplyByScalar(c,3,c);return i[s]=0,o[s]=1,r[s]=4,c=a[s],l(c)||(c=a[s]=new h),h.subtract(e[s+1],e[s-1],c),h.multiplyByScalar(c,3,c),r[s+1]=1,c=a[s+1],l(c)||(c=a[s+1]=new h),h.clone(n,c),Bv.solve(i,r,o,a)}function jXe(e){let t=zme,n=Vme,i=Ume,o=jme;t.length=n.length=e.length-1,i.length=o.length=e.length;let r;t[0]=n[0]=1,i[0]=2;let a=o[0];for(l(a)||(a=o[0]=new h),h.subtract(e[1],e[0],a),h.multiplyByScalar(a,3,a),r=1;r<t.length;++r)t[r]=n[r]=1,i[r]=4,a=o[r],l(a)||(a=o[r]=new h),h.subtract(e[r+1],e[r-1],a),h.multiplyByScalar(a,3,a);return i[r]=2,a=o[r],l(a)||(a=o[r]=new h),h.subtract(e[r],e[r-1],a),h.multiplyByScalar(a,3,a),Bv.solve(t,i,n,o)}function Bu(e){e=e??G.EMPTY_OBJECT;let t=e.points,n=e.times,i=e.inTangents,o=e.outTangents;this._times=n,this._points=t,this._pointType=xo.getPointType(t[0]),this._inTangents=i,this._outTangents=o,this._lastTimeIndex=0}Object.defineProperties(Bu.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},inTangents:{get:function(){return this._inTangents}},outTangents:{get:function(){return this._outTangents}}});Bu.createC1=function(e){e=e??G.EMPTY_OBJECT;let t=e.times,n=e.points,i=e.tangents,o=i.slice(0,i.length-1),r=i.slice(1,i.length);return new Bu({times:t,points:n,inTangents:r,outTangents:o})};Bu.createNaturalCubic=function(e){e=e??G.EMPTY_OBJECT;let t=e.times,n=e.points;if(n.length<3)return new FA({points:n,times:t});let i=jXe(n),o=i.slice(0,i.length-1),r=i.slice(1,i.length);return new Bu({times:t,points:n,inTangents:r,outTangents:o})};Bu.createClampedCubic=function(e){e=e??G.EMPTY_OBJECT;let t=e.times,n=e.points,i=e.firstTangent,o=e.lastTangent,r=xo.getPointType(n[0]);if(n.length<3)return new FA({points:n,times:t});let a=VXe(n,i,o),s=a.slice(0,a.length-1),c=a.slice(1,a.length);return new Bu({times:t,points:n,inTangents:c,outTangents:s})};Bu.hermiteCoefficientMatrix=new M(2,-3,0,1,-2,3,0,0,1,-2,1,0,1,-1,0,0);Bu.prototype.findTimeInterval=xo.prototype.findTimeInterval;var GXe=new se,Lv=new h;Bu.prototype.wrapTime=xo.prototype.wrapTime;Bu.prototype.clampTime=xo.prototype.clampTime;Bu.prototype.evaluate=function(e,t){let n=this.points,i=this.times,o=this.inTangents,r=this.outTangents;this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex);let a=this._lastTimeIndex,s=i[a+1]-i[a],c=(e-i[a])/s,u=GXe;u.z=c,u.y=c*c,u.x=u.y*c,u.w=1;let f=M.multiplyByVector(Bu.hermiteCoefficientMatrix,u,u);f.z*=s,f.w*=s;let d=this._pointType;return d===Number?n[a]*f.x+n[a+1]*f.y+r[a]*f.z+o[a]*f.w:(l(t)||(t=new d),t=d.multiplyByScalar(n[a],f.x,t),d.multiplyByScalar(n[a+1],f.y,Lv),d.add(t,Lv,t),d.multiplyByScalar(r[a],f.z,Lv),d.add(t,Lv,t),d.multiplyByScalar(o[a],f.w,Lv),d.add(t,Lv,t))};var kA=Bu;function Nv(e){e=e??G.EMPTY_OBJECT;let t=e.points,n=e.times;this._times=n,this._points=t,this._pointType=xo.getPointType(t[0]),this._lastTimeIndex=0}Object.defineProperties(Nv.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}});Nv.prototype.findTimeInterval=xo.prototype.findTimeInterval;Nv.prototype.wrapTime=xo.prototype.wrapTime;Nv.prototype.clampTime=xo.prototype.clampTime;Nv.prototype.evaluate=function(e,t){let n=this.points;this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex);let i=this._lastTimeIndex,o=this._pointType;return o===Number?n[i]:(l(t)||(t=new o),o.clone(n[i],t))};var rB=Nv;function HXe(e){let t=e.points,n=e.times;return function(i,o){l(o)||(o=new Le);let r=e._lastTimeIndex=e.findTimeInterval(i,e._lastTimeIndex),a=(i-n[r])/(n[r+1]-n[r]),s=t[r],c=t[r+1];return Le.fastSlerp(s,c,a,o)}}function Fv(e){e=e??G.EMPTY_OBJECT;let t=e.points,n=e.times;this._times=n,this._points=t,this._evaluateFunction=HXe(this),this._lastTimeIndex=0}Object.defineProperties(Fv.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}});Fv.prototype.findTimeInterval=xo.prototype.findTimeInterval;Fv.prototype.wrapTime=xo.prototype.wrapTime;Fv.prototype.clampTime=xo.prototype.clampTime;Fv.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)};var aB=Fv;var kv=_n.AnimatedPropertyType;function HX(e){e=e??G.EMPTY_OBJECT;let t=e.channel,n=e.runtimeAnimation,i=e.runtimeNode;this._channel=t,this._runtimeAnimation=n,this._runtimeNode=i,this._splines=[],this._path=void 0,KXe(this)}Object.defineProperties(HX.prototype,{channel:{get:function(){return this._channel}},runtimeAnimation:{get:function(){return this._runtimeAnimation}},runtimeNode:{get:function(){return this._runtimeNode}},splines:{get:function(){return this._splines}}});function WXe(e,t){let n=[],i=[],o=[],r=t.length;for(let a=0;a<r;a+=3)i.push(t[a]),n.push(t[a+1]),o.push(t[a+2]);return i.splice(0,1),o.length=o.length-1,new kA({times:e,points:n,inTangents:i,outTangents:o})}function Gme(e,t,n,i){if(e.length===1&&t.length===1)return new oB(t[0]);switch(n){case Jh.STEP:return new rB({times:e,points:t});case Jh.CUBICSPLINE:return WXe(e,t);case Jh.LINEAR:return i===kv.ROTATION?new aB({times:e,points:t}):new FA({times:e,points:t})}}function qXe(e,t,n,i,o){let r=[];if(i===kv.WEIGHTS){let s=t.length/o,c,u;for(c=0;c<o;c++){let f=new Array(s),d=c;if(n===Jh.CUBICSPLINE)for(u=0;u<s;u+=3)f[u]=t[d],f[u+1]=t[d+o],f[u+2]=t[d+2*o],d+=o*3;else for(u=0;u<s;u++)f[u]=t[d],d+=o;r.push(Gme(e,f,n,i))}}else r.push(Gme(e,t,n,i));return r}var YXe=new h,XXe=new Le;function KXe(e){let t=e._channel,n=t.sampler,i=n.input,o=n.output,r=n.interpolation,s=t.target.path,c=e._runtimeNode,u=l(c.morphWeights)?c.morphWeights.length:1,f=qXe(i,o,r,s,u);e._splines=f,e._path=s}HX.prototype.animate=function(e){let t=this._splines,n=this._path,i=this._runtimeAnimation.model,o=this._runtimeNode;if(n===kv.WEIGHTS){let r=o.morphWeights,a=r.length;for(let s=0;s<a;s++){let c=t[s],u=i.clampAnimations?c.clampTime(e):c.wrapTime(e);r[s]=c.evaluate(u)}}else{if(o.userAnimated)return;{let r=t[0],a=i.clampAnimations?r.clampTime(e):r.wrapTime(e);n===kv.TRANSLATION||n===kv.SCALE?o[n]=r.evaluate(a,YXe):n===kv.ROTATION&&(o[n]=r.evaluate(a,XXe))}}};var sB=HX;function WX(e,t,n){this._animation=t,this._name=t.name,this._runtimeChannels=void 0,this._startTime=Q.clone(n.startTime),this._delay=n.delay??0,this._stopTime=Q.clone(n.stopTime),this.removeOnStop=n.removeOnStop??!1,this._multiplier=n.multiplier??1,this._reverse=n.reverse??!1,this._loop=n.loop??Ou.NONE,this._animationTime=n.animationTime,this._prevAnimationDelta=void 0,this.start=new ye,this.update=new ye,this.stop=new ye,this._state=em.STOPPED,this._computedStartTime=void 0,this._duration=void 0;let i=this;this._raiseStartEvent=function(){i.start.raiseEvent(e,i)},this._updateEventTime=0,this._raiseUpdateEvent=function(){i.update.raiseEvent(e,i,i._updateEventTime)},this._raiseStopEvent=function(){i.stop.raiseEvent(e,i)},this._model=e,this._localStartTime=void 0,this._localStopTime=void 0,QXe(this)}Object.defineProperties(WX.prototype,{animation:{get:function(){return this._animation}},name:{get:function(){return this._name}},runtimeChannels:{get:function(){return this._runtimeChannels}},model:{get:function(){return this._model}},localStartTime:{get:function(){return this._localStartTime}},localStopTime:{get:function(){return this._localStopTime}},startTime:{get:function(){return this._startTime}},delay:{get:function(){return this._delay}},stopTime:{get:function(){return this._stopTime}},multiplier:{get:function(){return this._multiplier}},reverse:{get:function(){return this._reverse}},loop:{get:function(){return this._loop}},animationTime:{get:function(){return this._animationTime}}});function QXe(e){let t=Number.MAX_VALUE,n=-Number.MAX_VALUE,i=e._model.sceneGraph,r=e._animation.channels,a=r.length,s=[];for(let c=0;c<a;c++){let u=r[c],f=u.target;if(!l(f))continue;let d=f.node.index,p=i._runtimeNodes[d],g=new sB({channel:u,runtimeAnimation:e,runtimeNode:p}),m=u.sampler.input;t=Math.min(t,m[0]),n=Math.max(n,m[m.length-1]),s.push(g)}e._runtimeChannels=s,e._localStartTime=t,e._localStopTime=n}WX.prototype.animate=function(e){let t=this._runtimeChannels,n=t.length;for(let i=0;i<n;i++)t[i].animate(e)};var cB=WX;function Tg(e){this.animationAdded=new ye,this.animationRemoved=new ye,this.animateWhilePaused=!1,this._model=e,this._runtimeAnimations=[],this._previousTime=void 0}Object.defineProperties(Tg.prototype,{length:{get:function(){return this._runtimeAnimations.length}},model:{get:function(){return this._model}}});function qX(e,t,n){let i=e._model,o=new cB(i,t,n);return e._runtimeAnimations.push(o),e.animationAdded.raiseEvent(i,o),o}Tg.prototype.add=function(e){e=e??G.EMPTY_OBJECT;let n=this._model.sceneGraph.components.animations,i=e.index;if(l(i))return qX(this,n[i],e);let o=n.length;for(let r=0;r<o;++r)if(n[r].name===e.name){i=r;break}return qX(this,n[i],e)};Tg.prototype.addAll=function(e){e=e??G.EMPTY_OBJECT;let n=this._model.sceneGraph.components.animations,i=[],o=n.length;for(let r=0;r<o;++r){let a=qX(this,n[r],e);i.push(a)}return i};Tg.prototype.remove=function(e){if(!l(e))return!1;let t=this._runtimeAnimations,n=t.indexOf(e);return n!==-1?(t.splice(n,1),this.animationRemoved.raiseEvent(this._model,e),!0):!1};Tg.prototype.removeAll=function(){let e=this._model,t=this._runtimeAnimations,n=t.length;this._runtimeAnimations.length=0;for(let i=0;i<n;++i)this.animationRemoved.raiseEvent(e,t[i])};Tg.prototype.contains=function(e){return l(e)?this._runtimeAnimations.indexOf(e)!==-1:!1};Tg.prototype.get=function(e){return this._runtimeAnimations[e]};var Ij=[];function $Xe(e,t,n){return function(){e.animationRemoved.raiseEvent(t,n)}}Tg.prototype.update=function(e){let t=this._runtimeAnimations,n=t.length;if(n===0)return this._previousTime=void 0,!1;if(!this.animateWhilePaused&&Q.equals(e.time,this._previousTime))return!1;this._previousTime=Q.clone(e.time,this._previousTime);let i=!1,o=e.time,r=this._model;for(let a=0;a<n;++a){let s=t[a];l(s._computedStartTime)||(s._computedStartTime=Q.addSeconds(s.startTime??o,s.delay,new Q)),l(s._duration)||(s._duration=s.localStopTime*(1/s.multiplier));let c=s._computedStartTime,u=s._duration,f=s.stopTime,d=Q.lessThanOrEquals(c,o),p=l(f)&&Q.greaterThan(o,f),g=0;if(u!==0){let y=Q.secondsDifference(p?f:o,c);g=l(s._animationTime)?s._animationTime(u,y):y/u}let m=s.loop===Ou.REPEAT||s.loop===Ou.MIRRORED_REPEAT,A=(d||m&&!l(s.startTime))&&(g<=1||m)&&!p;if(g===s._prevAnimationDelta){let y=s._state===em.STOPPED;if(A!==y)continue}if(s._prevAnimationDelta=g,A||s._state===em.ANIMATING){if(A&&s._state===em.STOPPED&&(s._state=em.ANIMATING,s.start.numberOfListeners>0&&e.afterRender.push(s._raiseStartEvent)),s.loop===Ou.REPEAT)g=g-Math.floor(g);else if(s.loop===Ou.MIRRORED_REPEAT){let x=Math.floor(g),b=g-x;g=x%2===1?1-b:b}s.reverse&&(g=1-g);let y=g*u*s.multiplier;y=D.clamp(y,s.localStartTime,s.localStopTime),s.animate(y),s.update.numberOfListeners>0&&(s._updateEventTime=y,e.afterRender.push(s._raiseUpdateEvent)),i=!0,A||(s._state=em.STOPPED,s.stop.numberOfListeners>0&&e.afterRender.push(s._raiseStopEvent),s.removeOnStop&&Ij.push(s))}}n=Ij.length;for(let a=0;a<n;++a){let s=Ij[a];t.splice(t.indexOf(s),1),e.afterRender.push($Xe(this,r,s))}return Ij.length=0,i};var lB=Tg;function wb(e){this._model=e.model,this._featureTable=e.featureTable,this._featureId=e.featureId,this._color=void 0}Object.defineProperties(wb.prototype,{show:{get:function(){return this._featureTable.getShow(this._featureId)},set:function(e){this._featureTable.setShow(this._featureId,e)}},color:{get:function(){return l(this._color)||(this._color=new V),this._featureTable.getColor(this._featureId,this._color)},set:function(e){this._featureTable.setColor(this._featureId,e)}},primitive:{get:function(){return this._model}},featureTable:{get:function(){return this._featureTable}},featureId:{get:function(){return this._featureId}}});wb.prototype.hasProperty=function(e){return this._featureTable.hasProperty(this._featureId,e)};wb.prototype.getProperty=function(e){return this._featureTable.getProperty(this._featureId,e)};wb.prototype.getPropertyInherited=function(e){return this._featureTable.hasPropertyBySemantic(this._featureId,e)?this._featureTable.getPropertyBySemantic(this._featureId,e):this._featureTable.getProperty(this._featureId,e)};wb.prototype.getPropertyIds=function(e){return this._featureTable.getPropertyIds(e)};wb.prototype.setProperty=function(e,t){return this._featureTable.setProperty(this._featureId,e,t)};var uB=wb;var zv={ALL_OPAQUE:0,ALL_TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2};zv.getStyleCommandsNeeded=function(e,t){return t===0?zv.ALL_OPAQUE:t===e?zv.ALL_TRANSLUCENT:zv.OPAQUE_AND_TRANSLUCENT};Object.freeze(zv);var tm=zv;var Eg={GLTF:"GLTF",TILE_GLTF:"TILE_GLTF",TILE_B3DM:"B3DM",TILE_I3DM:"I3DM",TILE_PNTS:"PNTS",TILE_GEOJSON:"TILE_GEOJSON"};Eg.is3DTiles=function(e){switch(e){case Eg.TILE_GLTF:case Eg.TILE_B3DM:case Eg.TILE_I3DM:case Eg.TILE_PNTS:case Eg.TILE_GEOJSON:return!0;case Eg.GLTF:return!1}};Object.freeze(Eg);var Br=Eg;function _a(e){let t=e.model,n=e.propertyTable;this._propertyTable=n,this._model=t,this._features=void 0,this._featuresLength=0,this._batchTexture=void 0,this._styleCommandsNeededDirty=!1,this._styleCommandsNeeded=tm.ALL_OPAQUE,JXe(this)}Object.defineProperties(_a.prototype,{batchTexture:{get:function(){return this._batchTexture}},featuresLength:{get:function(){return this._featuresLength}},batchTextureByteLength:{get:function(){return l(this._batchTexture)?this._batchTexture.byteLength:0}},styleCommandsNeededDirty:{get:function(){return this._styleCommandsNeededDirty}}});function JXe(e){let t=e._model,n=Br.is3DTiles(t.type),i=e._propertyTable.count;if(i===0)return;let o,r=new Array(i);if(n){let a=t.content;for(o=0;o<i;o++)r[o]=new Qa(a,o)}else for(o=0;o<i;o++)r[o]=new uB({model:t,featureId:o,featureTable:e});e._features=r,e._featuresLength=i,e._batchTexture=new Yl({featuresLength:i,owner:e,statistics:n?t.content.tileset.statistics:void 0})}_a.prototype.update=function(e){this._styleCommandsNeededDirty=!1,this._batchTexture.update(void 0,e);let t=tm.getStyleCommandsNeeded(this._featuresLength,this._batchTexture.translucentFeaturesLength);this._styleCommandsNeeded!==t&&(this._styleCommandsNeededDirty=!0,this._styleCommandsNeeded=t)};_a.prototype.setShow=function(e,t){this._batchTexture.setShow(e,t)};_a.prototype.setAllShow=function(e){this._batchTexture.setAllShow(e)};_a.prototype.getShow=function(e){return this._batchTexture.getShow(e)};_a.prototype.setColor=function(e,t){this._batchTexture.setColor(e,t)};_a.prototype.setAllColor=function(e){this._batchTexture.setAllColor(e)};_a.prototype.getColor=function(e,t){return this._batchTexture.getColor(e,t)};_a.prototype.getPickColor=function(e){return this._batchTexture.getPickColor(e)};_a.prototype.getFeature=function(e){return this._features[e]};_a.prototype.hasProperty=function(e,t){return this._propertyTable.hasProperty(e,t)};_a.prototype.hasPropertyBySemantic=function(e,t){return this._propertyTable.hasPropertyBySemantic(e,t)};_a.prototype.getProperty=function(e,t){return this._propertyTable.getProperty(e,t)};_a.prototype.getPropertyBySemantic=function(e,t){return this._propertyTable.getPropertyBySemantic(e,t)};_a.prototype.getPropertyIds=function(e){return this._propertyTable.getPropertyIds(e)};_a.prototype.setProperty=function(e,t,n){return this._propertyTable.setProperty(e,t,n)};_a.prototype.isClass=function(e,t){return this._propertyTable.isClass(e,t)};_a.prototype.isExactClass=function(e,t){return this._propertyTable.isExactClass(e,t)};_a.prototype.getExactClassName=function(e){return this._propertyTable.getExactClassName(e)};var ZXe=new V;_a.prototype.applyStyle=function(e){if(!l(e)){this.setAllColor(Yl.DEFAULT_COLOR_VALUE),this.setAllShow(Yl.DEFAULT_SHOW_VALUE);return}for(let t=0;t<this._featuresLength;t++){let n=this.getFeature(t),i=l(e.color)?e.color.evaluateColor(n,ZXe)??Yl.DEFAULT_COLOR_VALUE:Yl.DEFAULT_COLOR_VALUE,o=l(e.show)?e.show.evaluate(n)??Yl.DEFAULT_SHOW_VALUE:Yl.DEFAULT_SHOW_VALUE;this.setColor(t,i),this.setShow(t,o)}};_a.prototype.isDestroyed=function(){return!1};_a.prototype.destroy=function(e){this._batchTexture=this._batchTexture&&this._batchTexture.destroy(),fe(this)};var fB=_a;var Hme={name:"TilesetPipelineStage"};Hme.process=function(e,t,n){if(t.hasSkipLevelOfDetail(n)){e.shaderBuilder.addDefine("POLYGON_OFFSET",void 0,he.FRAGMENT);let r={u_polygonOffset:function(){return z.ZERO}};e.uniformMap=wt(r,e.uniformMap),e.hasSkipLevelOfDetail=!0}let i=e.renderStateOptions;i.stencilTest=Gt.setCesium3DTileBit(),i.stencilMask=Gt.CESIUM_3D_TILE_MASK};var dB=Hme;var hB=`// robust iterative solution without trig functions
- // https://github.com/0xfaded/ellipse_demo/issues/1
- // https://stackoverflow.com/questions/22959698/distance-from-given-point-to-given-ellipse
- //
- // This version uses only a single iteration for best performance. For fog
- // rendering, the difference is negligible.
- vec2 nearestPointOnEllipseFast(vec2 pos, vec2 radii) {
- vec2 p = abs(pos);
- vec2 inverseRadii = 1.0 / radii;
- vec2 evoluteScale = (radii.x * radii.x - radii.y * radii.y) * vec2(1.0, -1.0) * inverseRadii;
-
- // We describe the ellipse parametrically: v = radii * vec2(cos(t), sin(t))
- // but store the cos and sin of t in a vec2 for efficiency.
- // Initial guess: t = cos(pi/4)
- vec2 tTrigs = vec2(0.70710678118);
- vec2 v = radii * tTrigs;
-
- // Find the evolute of the ellipse (center of curvature) at v.
- vec2 evolute = evoluteScale * tTrigs * tTrigs * tTrigs;
- // Find the (approximate) intersection of p - evolute with the ellipsoid.
- vec2 q = normalize(p - evolute) * length(v - evolute);
- // Update the estimate of t.
- tTrigs = (q + evolute) * inverseRadii;
- tTrigs = normalize(clamp(tTrigs, 0.0, 1.0));
- v = radii * tTrigs;
-
- return v * sign(pos);
- }
-
- vec3 computeEllipsoidPositionWC(vec3 positionMC) {
- // Get the world-space position and project onto a meridian plane of
- // the ellipsoid
- vec3 positionWC = (czm_model * vec4(positionMC, 1.0)).xyz;
-
- vec2 positionEllipse = vec2(length(positionWC.xy), positionWC.z);
- vec2 nearestPoint = nearestPointOnEllipseFast(positionEllipse, czm_ellipsoidRadii.xz);
-
- // Reconstruct a 3D point in world space
- return vec3(nearestPoint.x * normalize(positionWC.xy), nearestPoint.y);
- }
-
- void applyFog(inout vec4 color, vec4 groundAtmosphereColor, vec3 lightDirection, float distanceToCamera) {
-
- vec3 fogColor = groundAtmosphereColor.rgb;
-
- // If there is dynamic lighting, apply that to the fog.
- const float NONE = 0.0;
- if (czm_atmosphereDynamicLighting != NONE) {
- float darken = clamp(dot(normalize(czm_viewerPositionWC), lightDirection), czm_fogMinimumBrightness, 1.0);
- fogColor *= darken;
- }
-
- // Tonemap if HDR rendering is disabled
- #ifndef HDR
- fogColor.rgb = czm_pbrNeutralTonemapping(fogColor.rgb);
- fogColor.rgb = czm_inverseGamma(fogColor.rgb);
- #endif
-
- vec3 withFog = czm_fog(distanceToCamera, color.rgb, fogColor, czm_fogVisualDensityScalar);
- color = vec4(withFog, color.a);
- }
-
- void atmosphereStage(inout vec4 color, in ProcessedAttributes attributes) {
- vec3 rayleighColor;
- vec3 mieColor;
- float opacity;
-
- vec3 positionWC;
- vec3 lightDirection;
-
- // When the camera is in space, compute the position per-fragment for
- // more accurate ground atmosphere. All other cases will use
- //
- // The if condition will be added in https://github.com/CesiumGS/cesium/issues/11717
- if (false) {
- positionWC = computeEllipsoidPositionWC(attributes.positionMC);
- lightDirection = czm_getDynamicAtmosphereLightDirection(positionWC, czm_atmosphereDynamicLighting);
-
- // The fog color is derived from the ground atmosphere color
- czm_computeGroundAtmosphereScattering(
- positionWC,
- lightDirection,
- rayleighColor,
- mieColor,
- opacity
- );
- } else {
- positionWC = attributes.positionWC;
- lightDirection = czm_getDynamicAtmosphereLightDirection(positionWC, czm_atmosphereDynamicLighting);
- rayleighColor = v_atmosphereRayleighColor;
- mieColor = v_atmosphereMieColor;
- opacity = v_atmosphereOpacity;
- }
-
- //color correct rayleigh and mie colors
- const bool ignoreBlackPixels = true;
- rayleighColor = czm_applyHSBShift(rayleighColor, czm_atmosphereHsbShift, ignoreBlackPixels);
- mieColor = czm_applyHSBShift(mieColor, czm_atmosphereHsbShift, ignoreBlackPixels);
-
- vec4 groundAtmosphereColor = czm_computeAtmosphereColor(positionWC, lightDirection, rayleighColor, mieColor, opacity);
-
- if (u_isInFog) {
- float distanceToCamera = length(attributes.positionEC);
- applyFog(color, groundAtmosphereColor, lightDirection, distanceToCamera);
- } else {
- // Ground atmosphere
- }
- }
- `;var mB=`void atmosphereStage(ProcessedAttributes attributes) {
- vec3 lightDirection = czm_getDynamicAtmosphereLightDirection(v_positionWC, czm_atmosphereDynamicLighting);
-
- czm_computeGroundAtmosphereScattering(
- // This assumes the geometry stage came before this.
- v_positionWC,
- lightDirection,
- v_atmosphereRayleighColor,
- v_atmosphereMieColor,
- v_atmosphereOpacity
- );
- }
- `;var Wme={name:"AtmospherePipelineStage"};Wme.process=function(e,t,n){let i=e.shaderBuilder;i.addDefine("HAS_ATMOSPHERE",void 0,he.BOTH),i.addDefine("COMPUTE_POSITION_WC_ATMOSPHERE",void 0,he.BOTH),i.addVarying("vec3","v_atmosphereRayleighColor"),i.addVarying("vec3","v_atmosphereMieColor"),i.addVarying("float","v_atmosphereOpacity"),i.addVertexLines([mB]),i.addFragmentLines([hB]),i.addUniform("bool","u_isInFog",he.FRAGMENT),e.uniformMap.u_isInFog=function(){let o=h.distance(n.camera.positionWC,t.boundingSphere.center);return D.fog(o,n.fog.density)>D.EPSILON3}};var pB=Wme;var gB=`#ifdef DIFFUSE_IBL
- vec3 sampleDiffuseEnvironment(vec3 cubeDir)
- {
- #ifdef CUSTOM_SPHERICAL_HARMONICS
- return czm_sphericalHarmonics(cubeDir, model_sphericalHarmonicCoefficients);
- #else
- return czm_sphericalHarmonics(cubeDir, czm_sphericalHarmonicCoefficients);
- #endif
- }
- #endif
-
- #ifdef SPECULAR_IBL
- vec3 sampleSpecularEnvironment(vec3 cubeDir, float roughness)
- {
- #ifdef CUSTOM_SPECULAR_IBL
- float lod = roughness * model_specularEnvironmentMapsMaximumLOD;
- return czm_textureCube(model_specularEnvironmentMaps, cubeDir, lod).rgb;
- #else
- float lod = roughness * czm_specularEnvironmentMapsMaximumLOD;
- return czm_textureCube(czm_specularEnvironmentMaps, cubeDir, lod).rgb;
- #endif
- }
- vec3 computeSpecularIBL(vec3 cubeDir, float NdotV, vec3 f0, float roughness)
- {
- // see https://bruop.github.io/ibl/ at Single Scattering Results
- // Roughness dependent fresnel, from Fdez-Aguera
- vec3 f90 = max(vec3(1.0 - roughness), f0);
- vec3 F = fresnelSchlick2(f0, f90, NdotV);
-
- vec2 brdfLut = texture(czm_brdfLut, vec2(NdotV, roughness)).rg;
- vec3 specularSample = sampleSpecularEnvironment(cubeDir, roughness);
-
- return specularSample * (F * brdfLut.x + brdfLut.y);
- }
- #endif
-
- #if defined(DIFFUSE_IBL) || defined(SPECULAR_IBL)
- /**
- * Compute the light contributions from environment maps and spherical harmonic coefficients.
- * See Fdez-Aguera, https://www.jcgt.org/published/0008/01/03/paper.pdf, for explanation
- * of the single- and multi-scattering terms.
- *
- * @param {vec3} viewDirectionEC Unit vector pointing from the fragment to the eye position.
- * @param {vec3} normalEC The surface normal in eye coordinates.
- * @param {czm_modelMaterial} The material properties.
- * @return {vec3} The computed HDR color.
- */
- vec3 textureIBL(vec3 viewDirectionEC, vec3 normalEC, czm_modelMaterial material) {
- vec3 f0 = material.specular;
- float roughness = material.roughness;
- float specularWeight = 1.0;
- #ifdef USE_SPECULAR
- specularWeight = material.specularWeight;
- #endif
- float NdotV = clamp(dot(normalEC, viewDirectionEC), 0.0, 1.0);
-
- // see https://bruop.github.io/ibl/ at Single Scattering Results
- // Roughness dependent fresnel, from Fdez-Aguera
- vec3 f90 = max(vec3(1.0 - roughness), f0);
- vec3 singleScatterFresnel = fresnelSchlick2(f0, f90, NdotV);
-
- vec2 brdfLut = texture(czm_brdfLut, vec2(NdotV, roughness)).rg;
- vec3 FssEss = specularWeight * (singleScatterFresnel * brdfLut.x + brdfLut.y);
-
- #ifdef DIFFUSE_IBL
- vec3 normalMC = normalize(model_iblReferenceFrameMatrix * normalEC);
- vec3 irradiance = sampleDiffuseEnvironment(normalMC);
-
- vec3 averageFresnel = f0 + (1.0 - f0) / 21.0;
- float Ems = specularWeight * (1.0 - brdfLut.x - brdfLut.y);
- vec3 FmsEms = FssEss * averageFresnel * Ems / (1.0 - averageFresnel * Ems);
- vec3 dielectricScattering = (1.0 - FssEss - FmsEms) * material.diffuse;
- vec3 diffuseContribution = irradiance * (FmsEms + dielectricScattering) * model_iblFactor.x;
- #else
- vec3 diffuseContribution = vec3(0.0);
- #endif
-
- #ifdef USE_ANISOTROPY
- // Bend normal to account for anisotropic distortion of specular reflection
- vec3 anisotropyDirection = material.anisotropicB;
- vec3 anisotropicTangent = cross(anisotropyDirection, viewDirectionEC);
- vec3 anisotropicNormal = cross(anisotropicTangent, anisotropyDirection);
- float bendFactor = 1.0 - material.anisotropyStrength * (1.0 - roughness);
- float bendFactorPow4 = bendFactor * bendFactor * bendFactor * bendFactor;
- vec3 bentNormal = normalize(mix(anisotropicNormal, normalEC, bendFactorPow4));
- vec3 reflectEC = reflect(-viewDirectionEC, bentNormal);
- #else
- vec3 reflectEC = reflect(-viewDirectionEC, normalEC);
- #endif
-
- #ifdef SPECULAR_IBL
- vec3 reflectMC = normalize(model_iblReferenceFrameMatrix * reflectEC);
- vec3 radiance = sampleSpecularEnvironment(reflectMC, roughness);
- vec3 specularContribution = radiance * FssEss * model_iblFactor.y;
- #else
- vec3 specularContribution = vec3(0.0);
- #endif
-
- return diffuseContribution + specularContribution;
- }
- #endif
- `;var qme={name:"ImageBasedLightingPipelineStage"},eKe=new z;qme.process=function(e,t,n){let i=t.imageBasedLighting,o=t.environmentMapManager,r=e.shaderBuilder,a;l(i.specularEnvironmentMaps)||(a=o.radianceCubeMap);let s=i.sphericalHarmonicCoefficients??o.sphericalHarmonicCoefficients;r.addDefine("USE_IBL_LIGHTING",void 0,he.FRAGMENT),r.addUniform("vec2","model_iblFactor",he.FRAGMENT),Gh.isSupported(n.context)&&((i.useSphericalHarmonics||i.useSpecularEnvironmentMaps||i.enabled)&&r.addUniform("mat3","model_iblReferenceFrameMatrix",he.FRAGMENT),l(a)&&r.addDefine("COMPUTE_POSITION_WC_ATMOSPHERE",void 0,he.BOTH),l(s)&&l(s[0])?(r.addDefine("DIFFUSE_IBL",void 0,he.FRAGMENT),r.addDefine("CUSTOM_SPHERICAL_HARMONICS",void 0,he.FRAGMENT),r.addUniform("vec3","model_sphericalHarmonicCoefficients[9]",he.FRAGMENT)):i.useDefaultSphericalHarmonics&&r.addDefine("DIFFUSE_IBL",void 0,he.FRAGMENT),l(i.specularEnvironmentCubeMap)&&i.specularEnvironmentCubeMap.ready||l(a)?(r.addDefine("SPECULAR_IBL",void 0,he.FRAGMENT),r.addDefine("CUSTOM_SPECULAR_IBL",void 0,he.FRAGMENT),r.addUniform("samplerCube","model_specularEnvironmentMaps",he.FRAGMENT),r.addUniform("float","model_specularEnvironmentMapsMaximumLOD",he.FRAGMENT)):t.useDefaultSpecularMaps&&r.addDefine("SPECULAR_IBL",void 0,he.FRAGMENT)),r.addFragmentLines(gB);let c={model_iblFactor:function(){return z.multiplyByScalar(i.imageBasedLightingFactor,o?.intensity||1,eKe)},model_iblReferenceFrameMatrix:function(){return t._iblReferenceFrameMatrix},model_sphericalHarmonicCoefficients:function(){return s},model_specularEnvironmentMaps:function(){return i.specularEnvironmentCubeMap.texture},model_specularEnvironmentMapsMaximumLOD:function(){return i.specularEnvironmentCubeMap.maximumMipmapLevel}};l(a)&&(c.model_specularEnvironmentMaps=function(){return a},c.model_specularEnvironmentMapsMaximumLOD=function(){return o.maximumMipmapLevel}),e.uniformMap=wt(c,e.uniformMap)};var _B=qme;var tKe=D.EPSILON16;function XX(e){e=e??G.EMPTY_OBJECT;let t=e.stage,n=e.runtimeArticulation;this._stage=t,this._runtimeArticulation=n,this._name=t.name,this._type=t.type,this._minimumValue=t.minimumValue,this._maximumValue=t.maximumValue,this._currentValue=t.initialValue}Object.defineProperties(XX.prototype,{stage:{get:function(){return this._stage}},runtimeArticulation:{get:function(){return this._runtimeArticulation}},name:{get:function(){return this._name}},type:{get:function(){return this._type}},minimumValue:{get:function(){return this._minimumValue}},maximumValue:{get:function(){return this._maximumValue}},currentValue:{get:function(){return this._currentValue},set:function(e){e=D.clamp(e,this.minimumValue,this.maximumValue),D.equalsEpsilon(this._currentValue,e,tKe)||(this._currentValue=e,this.runtimeArticulation._dirty=!0)}}});var nKe=new h,YX=new $;XX.prototype.applyStageToMatrix=function(e){let t=this.type,n=this.currentValue,i=nKe,o;switch(t){case cl.XROTATE:o=$.fromRotationX(D.toRadians(n),YX),e=M.multiplyByMatrix3(e,o,e);break;case cl.YROTATE:o=$.fromRotationY(D.toRadians(n),YX),e=M.multiplyByMatrix3(e,o,e);break;case cl.ZROTATE:o=$.fromRotationZ(D.toRadians(n),YX),e=M.multiplyByMatrix3(e,o,e);break;case cl.XTRANSLATE:i.x=n,i.y=0,i.z=0,e=M.multiplyByTranslation(e,i,e);break;case cl.YTRANSLATE:i.x=0,i.y=n,i.z=0,e=M.multiplyByTranslation(e,i,e);break;case cl.ZTRANSLATE:i.x=0,i.y=0,i.z=n,e=M.multiplyByTranslation(e,i,e);break;case cl.XSCALE:i.x=n,i.y=1,i.z=1,e=M.multiplyByScale(e,i,e);break;case cl.YSCALE:i.x=1,i.y=n,i.z=1,e=M.multiplyByScale(e,i,e);break;case cl.ZSCALE:i.x=1,i.y=1,i.z=n,e=M.multiplyByScale(e,i,e);break;case cl.UNIFORMSCALE:e=M.multiplyByUniformScale(e,n,e);break;default:break}return e};var AB=XX;function Dj(e){e=e??G.EMPTY_OBJECT;let t=e.articulation,n=e.sceneGraph;this._articulation=t,this._sceneGraph=n,this._name=t.name,this._runtimeStages=[],this._runtimeStagesByName={},this._runtimeNodes=[],this._dirty=!0,iKe(this)}Object.defineProperties(Dj.prototype,{articulation:{get:function(){return this._articulation}},sceneGraph:{get:function(){return this._sceneGraph}},name:{get:function(){return this._name}},runtimeStages:{get:function(){return this._runtimeStages}},runtimeNodes:{get:function(){return this._runtimeNodes}}});function iKe(e){let n=e.articulation.stages,i=n.length,o=e._runtimeStages,r=e._runtimeStagesByName;for(let a=0;a<i;a++){let s=n[a],c=new AB({stage:s,runtimeArticulation:e});o.push(c);let u=s.name;r[u]=c}}Dj.prototype.setArticulationStage=function(e,t){let n=this._runtimeStagesByName[e];l(n)&&(n.currentValue=t)};var oKe=new M,rKe=new M;Dj.prototype.apply=function(){if(!this._dirty)return;this._dirty=!1;let e=M.clone(M.IDENTITY,oKe),t,n=this._runtimeStages,i=n.length;for(t=0;t<i;t++)e=n[t].applyStageToMatrix(e);let o=this._runtimeNodes,r=o.length;for(t=0;t<r;t++){let a=o[t],s=M.multiplyTransformation(a.originalTransform,e,rKe);a.transform=s}};var yB=Dj;var xB=`void modelColorStage(inout czm_modelMaterial material)
- {
- material.diffuse = mix(material.diffuse, model_color.rgb, model_colorBlend);
- float highlight = ceil(model_colorBlend);
- material.diffuse *= mix(model_color.rgb, vec3(1.0), highlight);
- material.alpha *= model_color.a;
- }
- `;var Uv={name:"ModelColorPipelineStage",COLOR_UNIFORM_NAME:"model_color",COLOR_BLEND_UNIFORM_NAME:"model_colorBlend"};Uv.process=function(e,t,n){let i=e.shaderBuilder;i.addDefine("HAS_MODEL_COLOR",void 0,he.FRAGMENT),i.addFragmentLines(xB);let o={},r=t.color;r.alpha===0&&!t.hasSilhouette(n)&&(e.renderStateOptions.colorMask={red:!1,green:!1,blue:!1,alpha:!1}),r.alpha<1&&(e.alphaOptions.pass=Ie.TRANSLUCENT),i.addUniform("vec4",Uv.COLOR_UNIFORM_NAME,he.FRAGMENT),o[Uv.COLOR_UNIFORM_NAME]=function(){return t.color},i.addUniform("float",Uv.COLOR_BLEND_UNIFORM_NAME,he.FRAGMENT),o[Uv.COLOR_BLEND_UNIFORM_NAME]=function(){return sl.getColorBlend(t.colorBlendMode,t.colorBlendAmount)},e.uniformMap=wt(o,e.uniformMap)};var zA=Uv;var bB=`#ifdef USE_CLIPPING_PLANES_FLOAT_TEXTURE
- vec4 getClippingPlane(
- highp sampler2D packedClippingPlanes,
- int clippingPlaneNumber,
- mat4 transform
- ) {
- int pixY = clippingPlaneNumber / CLIPPING_PLANES_TEXTURE_WIDTH;
- int pixX = clippingPlaneNumber - (pixY * CLIPPING_PLANES_TEXTURE_WIDTH);
- float pixelWidth = 1.0 / float(CLIPPING_PLANES_TEXTURE_WIDTH);
- float pixelHeight = 1.0 / float(CLIPPING_PLANES_TEXTURE_HEIGHT);
- float u = (float(pixX) + 0.5) * pixelWidth; // sample from center of pixel
- float v = (float(pixY) + 0.5) * pixelHeight;
- vec4 plane = texture(packedClippingPlanes, vec2(u, v));
- return czm_transformPlane(plane, transform);
- }
- #else
- // Handle uint8 clipping texture instead
- vec4 getClippingPlane(
- highp sampler2D packedClippingPlanes,
- int clippingPlaneNumber,
- mat4 transform
- ) {
- int clippingPlaneStartIndex = clippingPlaneNumber * 2; // clipping planes are two pixels each
- int pixY = clippingPlaneStartIndex / CLIPPING_PLANES_TEXTURE_WIDTH;
- int pixX = clippingPlaneStartIndex - (pixY * CLIPPING_PLANES_TEXTURE_WIDTH);
- float pixelWidth = 1.0 / float(CLIPPING_PLANES_TEXTURE_WIDTH);
- float pixelHeight = 1.0 / float(CLIPPING_PLANES_TEXTURE_HEIGHT);
- float u = (float(pixX) + 0.5) * pixelWidth; // sample from center of pixel
- float v = (float(pixY) + 0.5) * pixelHeight;
- vec4 oct32 = texture(packedClippingPlanes, vec2(u, v)) * 255.0;
- vec2 oct = vec2(oct32.x * 256.0 + oct32.y, oct32.z * 256.0 + oct32.w);
- vec4 plane;
- plane.xyz = czm_octDecode(oct, 65535.0);
- plane.w = czm_unpackFloat(texture(packedClippingPlanes, vec2(u + pixelWidth, v)));
- return czm_transformPlane(plane, transform);
- }
- #endif
-
- float clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix) {
- vec4 position = czm_windowToEyeCoordinates(fragCoord);
- vec3 clipNormal = vec3(0.0);
- vec3 clipPosition = vec3(0.0);
- float pixelWidth = czm_metersPerPixel(position);
-
- #ifdef UNION_CLIPPING_REGIONS
- float clipAmount; // For union planes, we want to get the min distance. So we set the initial value to the first plane distance in the loop below.
- #else
- float clipAmount = 0.0;
- bool clipped = true;
- #endif
-
- for (int i = 0; i < CLIPPING_PLANES_LENGTH; ++i) {
- vec4 clippingPlane = getClippingPlane(clippingPlanes, i, clippingPlanesMatrix);
- clipNormal = clippingPlane.xyz;
- clipPosition = -clippingPlane.w * clipNormal;
- float amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth;
-
- #ifdef UNION_CLIPPING_REGIONS
- clipAmount = czm_branchFreeTernary(i == 0, amount, min(amount, clipAmount));
- if (amount <= 0.0) {
- discard;
- }
- #else
- clipAmount = max(amount, clipAmount);
- clipped = clipped && (amount <= 0.0);
- #endif
- }
-
- #ifndef UNION_CLIPPING_REGIONS
- if (clipped) {
- discard;
- }
- #endif
-
- return clipAmount;
- }
-
- void modelClippingPlanesStage(inout vec4 color)
- {
- float clipDistance = clip(gl_FragCoord, model_clippingPlanes, model_clippingPlanesMatrix);
- vec4 clippingPlanesEdgeColor = vec4(1.0);
- clippingPlanesEdgeColor.rgb = model_clippingPlanesEdgeStyle.rgb;
- float clippingPlanesEdgeWidth = model_clippingPlanesEdgeStyle.a;
-
- if (clipDistance > 0.0 && clipDistance < clippingPlanesEdgeWidth) {
- color = clippingPlanesEdgeColor;
- }
- }
- `;var Yme={name:"ModelClippingPlanesPipelineStage"},aKe=new z;Yme.process=function(e,t,n){let i=t.clippingPlanes,o=n.context,r=e.shaderBuilder;r.addDefine("HAS_CLIPPING_PLANES",void 0,he.FRAGMENT),r.addDefine("CLIPPING_PLANES_LENGTH",i.length,he.FRAGMENT),i.unionClippingRegions&&r.addDefine("UNION_CLIPPING_REGIONS",void 0,he.FRAGMENT),ma.useFloatTexture(o)&&r.addDefine("USE_CLIPPING_PLANES_FLOAT_TEXTURE",void 0,he.FRAGMENT);let a=ma.getTextureResolution(i,o,aKe);r.addDefine("CLIPPING_PLANES_TEXTURE_WIDTH",a.x,he.FRAGMENT),r.addDefine("CLIPPING_PLANES_TEXTURE_HEIGHT",a.y,he.FRAGMENT),r.addUniform("sampler2D","model_clippingPlanes",he.FRAGMENT),r.addUniform("vec4","model_clippingPlanesEdgeStyle",he.FRAGMENT),r.addUniform("mat4","model_clippingPlanesMatrix",he.FRAGMENT),r.addFragmentLines(bB);let s={model_clippingPlanes:function(){return i.texture},model_clippingPlanesEdgeStyle:function(){let c=V.clone(i.edgeColor);return c.alpha=i.edgeWidth,c},model_clippingPlanesMatrix:function(){return t._clippingPlanesMatrix}};e.uniformMap=wt(s,e.uniformMap)};var CB=Yme;var TB=`void modelClippingPolygonsStage(ProcessedAttributes attributes)
- {
- vec2 sphericalLatLong = czm_approximateSphericalCoordinates(v_positionWC);
- sphericalLatLong.y = czm_branchFreeTernary(sphericalLatLong.y < czm_pi, sphericalLatLong.y, sphericalLatLong.y - czm_twoPi);
-
- vec2 minDistance = vec2(czm_infinity);
- v_regionIndex = -1;
- v_clippingPosition = vec2(czm_infinity);
-
- for (int regionIndex = 0; regionIndex < CLIPPING_POLYGON_REGIONS_LENGTH; regionIndex++) {
- vec4 extents = czm_unpackClippingExtents(model_clippingExtents, regionIndex);
- vec2 rectUv = (sphericalLatLong.yx - extents.yx) * extents.wz;
-
- vec2 clamped = clamp(rectUv, vec2(0.0), vec2(1.0));
- vec2 distance = abs(rectUv - clamped) * extents.wz;
-
- if (minDistance.x > distance.x || minDistance.y > distance.y) {
- minDistance = distance;
- v_clippingPosition = rectUv;
- }
-
- float threshold = 0.01;
- if (rectUv.x > threshold && rectUv.y > threshold && rectUv.x < 1.0 - threshold && rectUv.y < 1.0 - threshold) {
- v_regionIndex = regionIndex;
- }
- }
- }
- `;var EB=`void modelClippingPolygonsStage()
- {
- vec2 clippingPosition = v_clippingPosition;
- int regionIndex = v_regionIndex;
- czm_clipPolygons(model_clippingDistance, CLIPPING_POLYGON_REGIONS_LENGTH, clippingPosition, regionIndex);
- }
- `;var Xme={name:"ModelClippingPolygonsPipelineStage"};Xme.process=function(e,t,n){let i=t.clippingPolygons,o=e.shaderBuilder;o.addDefine("ENABLE_CLIPPING_POLYGONS",void 0,he.BOTH),i.inverse&&o.addDefine("CLIPPING_INVERSE",void 0,he.FRAGMENT),o.addDefine("CLIPPING_POLYGON_REGIONS_LENGTH",i.extentsCount,he.BOTH),o.addUniform("sampler2D","model_clippingDistance",he.FRAGMENT),o.addUniform("sampler2D","model_clippingExtents",he.VERTEX),o.addVarying("vec2","v_clippingPosition"),o.addVarying("int","v_regionIndex","flat"),o.addVertexLines(TB),o.addFragmentLines(EB);let r={model_clippingDistance:function(){return i.clippingTexture??n.context.defaultTexture},model_clippingExtents:function(){return i.extentsTexture??n.context.defaultTexture}};e.uniformMap=wt(r,e.uniformMap)};var vB=Xme;function Kme(e,t){this._model=e,this._runtimeNode=t}Object.defineProperties(Kme.prototype,{name:{get:function(){return this._runtimeNode._name}},id:{get:function(){return this._runtimeNode._id}},show:{get:function(){return this._runtimeNode.show},set:function(e){this._runtimeNode.show=e}},matrix:{get:function(){return this._runtimeNode.transform},set:function(e){l(e)?(this._runtimeNode.transform=e,this._runtimeNode.userAnimated=!0,this._model._userAnimationDirty=!0):(this._runtimeNode.transform=this.originalMatrix,this._runtimeNode.userAnimated=!1)}},originalMatrix:{get:function(){return this._runtimeNode.originalTransform}}});var SB=Kme;var wB=`mat4 getInstancingTransform()
- {
- mat4 instancingTransform;
-
- #ifdef HAS_INSTANCE_MATRICES
- instancingTransform = mat4(
- a_instancingTransformRow0.x, a_instancingTransformRow1.x, a_instancingTransformRow2.x, 0.0, // Column 1
- a_instancingTransformRow0.y, a_instancingTransformRow1.y, a_instancingTransformRow2.y, 0.0, // Column 2
- a_instancingTransformRow0.z, a_instancingTransformRow1.z, a_instancingTransformRow2.z, 0.0, // Column 3
- a_instancingTransformRow0.w, a_instancingTransformRow1.w, a_instancingTransformRow2.w, 1.0 // Column 4
- );
- #else
- vec3 translation = vec3(0.0, 0.0, 0.0);
- vec3 scale = vec3(1.0, 1.0, 1.0);
-
- #ifdef HAS_INSTANCE_TRANSLATION
- translation = a_instanceTranslation;
- #endif
- #ifdef HAS_INSTANCE_SCALE
- scale = a_instanceScale;
- #endif
-
- instancingTransform = mat4(
- scale.x, 0.0, 0.0, 0.0,
- 0.0, scale.y, 0.0, 0.0,
- 0.0, 0.0, scale.z, 0.0,
- translation.x, translation.y, translation.z, 1.0
- );
- #endif
-
- return instancingTransform;
- }
-
- #ifdef USE_2D_INSTANCING
- mat4 getInstancingTransform2D()
- {
- mat4 instancingTransform2D;
-
- #ifdef HAS_INSTANCE_MATRICES
- instancingTransform2D = mat4(
- a_instancingTransform2DRow0.x, a_instancingTransform2DRow1.x, a_instancingTransform2DRow2.x, 0.0, // Column 1
- a_instancingTransform2DRow0.y, a_instancingTransform2DRow1.y, a_instancingTransform2DRow2.y, 0.0, // Column 2
- a_instancingTransform2DRow0.z, a_instancingTransform2DRow1.z, a_instancingTransform2DRow2.z, 0.0, // Column 3
- a_instancingTransform2DRow0.w, a_instancingTransform2DRow1.w, a_instancingTransform2DRow2.w, 1.0 // Column 4
- );
- #else
- vec3 translation2D = vec3(0.0, 0.0, 0.0);
- vec3 scale = vec3(1.0, 1.0, 1.0);
-
- #ifdef HAS_INSTANCE_TRANSLATION
- translation2D = a_instanceTranslation2D;
- #endif
- #ifdef HAS_INSTANCE_SCALE
- scale = a_instanceScale;
- #endif
-
- instancingTransform2D = mat4(
- scale.x, 0.0, 0.0, 0.0,
- 0.0, scale.y, 0.0, 0.0,
- 0.0, 0.0, scale.z, 0.0,
- translation2D.x, translation2D.y, translation2D.z, 1.0
- );
- #endif
-
- return instancingTransform2D;
- }
- #endif
- `;var IB=`void instancingStage(inout ProcessedAttributes attributes)
- {
- vec3 positionMC = attributes.positionMC;
-
- mat4 instancingTransform = getInstancingTransform();
-
- attributes.positionMC = (instancingTransform * vec4(positionMC, 1.0)).xyz;
-
- #ifdef HAS_NORMALS
- vec3 normalMC = attributes.normalMC;
- attributes.normalMC = (instancingTransform * vec4(normalMC, 0.0)).xyz;
- #endif
-
- #ifdef USE_2D_INSTANCING
- mat4 instancingTransform2D = getInstancingTransform2D();
- attributes.position2D = (instancingTransform2D * vec4(positionMC, 1.0)).xyz;
- #endif
- }
- `;var DB=`void legacyInstancingStage(
- inout ProcessedAttributes attributes,
- out mat4 instanceModelView,
- out mat3 instanceModelViewInverseTranspose)
- {
- vec3 positionMC = attributes.positionMC;
-
- mat4 instancingTransform = getInstancingTransform();
-
- mat4 instanceModel = instancingTransform * u_instance_nodeTransform;
- instanceModelView = u_instance_modifiedModelView;
- instanceModelViewInverseTranspose = mat3(u_instance_modifiedModelView * instanceModel);
-
- attributes.positionMC = (instanceModel * vec4(positionMC, 1.0)).xyz;
-
- #ifdef USE_2D_INSTANCING
- mat4 instancingTransform2D = getInstancingTransform2D();
- attributes.position2D = (instancingTransform2D * vec4(positionMC, 1.0)).xyz;
- #endif
- }
- `;var Pj=new M,sKe=new M,cKe=new M,$me={name:"InstancingPipelineStage",_getInstanceTransformsAsMatrices:npe,_transformsToTypedArray:QX};$me.process=function(e,t,n){let i=t.instances,o=i.attributes[0].count,r=e.shaderBuilder;r.addDefine("HAS_INSTANCING"),r.addVertexLines(wB);let a=e.model,s=a.sceneGraph,c=e.runtimeNode,u=n.mode!==ie.SCENE3D&&!n.scene3DOnly&&a._projectTo2D,f=a._enablePick&&!n.context.webgl2,d=[];TKe(e,n,i,d,u,f),SKe(e,n,i,d);let p={};if(i.transformInWorldSpace?(r.addDefine("USE_LEGACY_INSTANCING",void 0,he.VERTEX),r.addUniform("mat4","u_instance_modifiedModelView",he.VERTEX),r.addUniform("mat4","u_instance_nodeTransform",he.VERTEX),p.u_instance_modifiedModelView=function(){let g=M.multiplyTransformation(a.modelMatrix,s.components.transform,Pj);return u?M.multiplyTransformation(n.context.uniformState.view3D,g,Pj):(n.mode!==ie.SCENE3D&&(g=pt.basisTo2D(n.mapProjection,g,Pj)),M.multiplyTransformation(n.context.uniformState.view,g,Pj))},p.u_instance_nodeTransform=function(){return M.multiplyTransformation(s.axisCorrectionMatrix,c.computedTransform,sKe)},r.addVertexLines(DB)):r.addVertexLines(IB),u){r.addDefine("USE_2D_INSTANCING",void 0,he.VERTEX),r.addUniform("mat4","u_modelView2D",he.VERTEX);let g=n.context,m=M.fromTranslation(c.instancingReferencePoint2D,new M);p.u_modelView2D=function(){return M.multiplyTransformation(g.uniformState.view,m,cKe)}}e.uniformMap=wt(p,e.uniformMap),e.instanceCount=o,Qn(e.attributes,d)};var PB=new M,lKe=new h;function uKe(e,t,n,i,o){let r=M.multiplyTransformation(t,e,PB);return r=M.multiplyTransformation(r,n,PB),o=pt.basisTo2D(i.mapProjection,r,o),o}function fKe(e,t,n,i,o){let r=M.fromTranslation(e,PB),a=M.multiplyTransformation(t,r,PB);a=M.multiplyTransformation(a,n,PB);let s=M.getTranslation(a,lKe);return o=eo.computeActualEllipsoidPosition(i,s,o),o}function Jme(e,t,n){let i=e.model,o=i.sceneGraph;e.runtimeNode.node.instances.transformInWorldSpace?(t=M.multiplyTransformation(i.modelMatrix,o.components.transform,t),n=M.multiplyTransformation(o.axisCorrectionMatrix,e.runtimeNode.computedTransform,n)):(t=M.clone(o.computedModelMatrix,t),t=M.multiplyTransformation(t,e.runtimeNode.computedTransform,t),n=M.clone(M.IDENTITY,n))}var Zme=new M,epe=new M,dKe=new M,hKe=new h;function mKe(e,t,n,i){let o=Zme,r=epe;Jme(t,o,r);let s=t.runtimeNode.instancingReferencePoint2D,c=e.length;for(let u=0;u<c;u++){let f=e[u],d=uKe(f,o,r,n,dKe),p=M.getTranslation(d,hKe),g=h.subtract(p,s,p);i[u]=M.setTranslation(d,g,i[u])}return i}function pKe(e,t,n,i){let o=Zme,r=epe;Jme(t,o,r);let s=t.runtimeNode.instancingReferencePoint2D,c=e.length;for(let u=0;u<c;u++){let f=e[u],d=fKe(f,o,r,n,f);i[u]=h.subtract(d,s,i[u])}return i}var gKe=new h,_Ke=new h;function tpe(e,t){let n=e.runtimeNode,i=e.model.sceneGraph.computedModelMatrix,o=M.multiplyByPoint(i,n.instancingTranslationMin,gKe),r=eo.computeActualEllipsoidPosition(t,o,o),a=M.multiplyByPoint(i,n.instancingTranslationMax,_Ke),s=eo.computeActualEllipsoidPosition(t,a,a);n.instancingReferencePoint2D=h.lerp(r,s,.5,new h)}function QX(e){let n=e.length,i=new Float32Array(n*12);for(let o=0;o<n;o++){let r=e[o],a=12*o;i[a+0]=r[0],i[a+1]=r[4],i[a+2]=r[8],i[a+3]=r[12],i[a+4]=r[1],i[a+5]=r[5],i[a+6]=r[9],i[a+7]=r[13],i[a+8]=r[2],i[a+9]=r[6],i[a+10]=r[10],i[a+11]=r[14]}return i}function AKe(e){let n=e.length,i=new Float32Array(n*3);for(let o=0;o<n;o++){let r=e[o],a=3*o;i[a+0]=r[0],i[a+1]=r[4],i[a+2]=r[8]}return i}var yKe=new h,xKe=new Le,bKe=new h;function npe(e,t,n){let i=new Array(t),o=ht.getAttributeBySemantic(e,Er.TRANSLATION),r=ht.getAttributeBySemantic(e,Er.ROTATION),a=ht.getAttributeBySemantic(e,Er.SCALE),s=new h(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),c=new h(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),u=l(o),f=l(r),d=l(a),p=u?o.typedArray:new Float32Array(t*3),g=f?r.typedArray:new Float32Array(t*4);f&&r.normalized&&(g=nn.dequantize(g,r.componentDatatype,r.type,t));let m;d?m=a.typedArray:(m=new Float32Array(t*3),m.fill(1));for(let y=0;y<t;y++){let x=new h(p[y*3],p[y*3+1],p[y*3+2],yKe);h.maximumByComponent(s,x,s),h.minimumByComponent(c,x,c);let b=new Le(g[y*4],g[y*4+1],g[y*4+2],f?g[y*4+3]:1,xKe),C=new h(m[y*3],m[y*3+1],m[y*3+2],bKe),E=M.fromTranslationQuaternionRotationScale(x,b,C,new M);i[y]=E}let A=n.runtimeNode;return A.instancingTranslationMin=c,A.instancingTranslationMax=s,u&&(o.typedArray=void 0),f&&(r.typedArray=void 0),d&&(a.typedArray=void 0),i}function CKe(e,t,n){let i=new Array(t),o=e.typedArray,r=new h(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),a=new h(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);for(let c=0;c<t;c++){let u=new h(o[c*3],o[c*3+1],o[c*3+2]);i[c]=u,h.minimumByComponent(r,u,r),h.maximumByComponent(a,u,a)}let s=n.runtimeNode;return s.instancingTranslationMin=r,s.instancingTranslationMax=a,e.typedArray=void 0,i}function $X(e,t){let n=Ke.createVertexBuffer({context:t.context,typedArray:e,usage:Oe.STATIC_DRAW});return n.vertexArrayDestroyable=!1,n}function TKe(e,t,n,i,o,r){let a=ht.getAttributeBySemantic(n,Er.ROTATION);l(a)||r?EKe(e,n,i,t,o,r):vKe(e,n,i,t,o)}function EKe(e,t,n,i,o,r){let a=e.shaderBuilder,s=t.attributes[0].count,c=e.model,u=e.runtimeNode;a.addDefine("HAS_INSTANCE_MATRICES");let f="Transform",d,p=u.instancingTransformsBuffer;if(!l(p)){d=npe(t,s,e);let y=QX(d);p=$X(y,i),c._modelResources.push(p),r&&(u.transformsTypedArray=y),u.instancingTransformsBuffer=p}if(Qme(e,p,n,f),!o)return;let g=We(i);g.mode=ie.COLUMBUS_VIEW,tpe(e,g);let m=u.instancingTransformsBuffer2D;if(!l(m)){let y=mKe(d,e,g,d),x=QX(y);m=$X(x,i),c._modelResources.push(m),u.instancingTransformsBuffer2D=m}Qme(e,m,n,"Transform2D")}function vKe(e,t,n,i,o,r){let a=e.shaderBuilder,s=e.runtimeNode,c=ht.getAttributeBySemantic(t,Er.TRANSLATION),u=ht.getAttributeBySemantic(t,Er.SCALE);if(l(u)&&(a.addDefine("HAS_INSTANCE_SCALE"),KX(e,u.buffer,u.byteOffset,u.byteStride,n,"Scale")),!l(c))return;let f,d=c.typedArray;if(l(d)?f=CKe(c,c.count,e):l(s.instancingTranslationMin)||(s.instancingTranslationMin=c.min,s.instancingTranslationMax=c.max),a.addDefine("HAS_INSTANCE_TRANSLATION"),KX(e,c.buffer,c.byteOffset,c.byteStride,n,"Translation"),!o&&!r)return;let g=We(i);g.mode=ie.COLUMBUS_VIEW,tpe(e,g);let m=s.instancingTranslationBuffer2D;if(!l(m)){let b=pKe(f,e,g,f),C=AKe(b);r&&(s.transformsTypedArray=C),m=$X(C,i),e.model._modelResources.push(m),s.instancingTranslationBuffer2D=m}if(!o)return;KX(e,m,0,void 0,n,"Translation2D")}function Qme(e,t,n,i){let r=Y.getSizeInBytes(Y.FLOAT),a=r*12,s=[{index:e.attributeIndex++,vertexBuffer:t,componentsPerAttribute:4,componentDatatype:Y.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:a,instanceDivisor:1},{index:e.attributeIndex++,vertexBuffer:t,componentsPerAttribute:4,componentDatatype:Y.FLOAT,normalize:!1,offsetInBytes:r*4,strideInBytes:a,instanceDivisor:1},{index:e.attributeIndex++,vertexBuffer:t,componentsPerAttribute:4,componentDatatype:Y.FLOAT,normalize:!1,offsetInBytes:r*8,strideInBytes:a,instanceDivisor:1}],c=e.shaderBuilder;c.addAttribute("vec4",`a_instancing${i}Row0`),c.addAttribute("vec4",`a_instancing${i}Row1`),c.addAttribute("vec4",`a_instancing${i}Row2`),Qn(n,s)}function KX(e,t,n,i,o,r){o.push({index:e.attributeIndex++,vertexBuffer:t,componentsPerAttribute:3,componentDatatype:Y.FLOAT,normalize:!1,offsetInBytes:n,strideInBytes:i,instanceDivisor:1}),e.shaderBuilder.addAttribute("vec3",`a_instance${r}`)}function SKe(e,t,n,i){let o=n.attributes,r=e.shaderBuilder;for(let a=0;a<o.length;a++){let s=o[a];s.semantic===Er.FEATURE_ID&&(s.setIndex>=e.featureIdVertexAttributeSetIndex&&(e.featureIdVertexAttributeSetIndex=s.setIndex+1),i.push({index:e.attributeIndex++,vertexBuffer:s.buffer,componentsPerAttribute:Ft.getNumberOfComponents(s.type),componentDatatype:s.componentDatatype,normalize:!1,offsetInBytes:s.byteOffset,strideInBytes:s.byteStride,instanceDivisor:1}),r.addAttribute("float",`a_instanceFeatureId_${s.setIndex}`))}}var RB=$me;var JX={};JX.name="ModelMatrixUpdateStage";JX.update=function(e,t,n){let i=n.mode!==ie.SCENE3D;if(!(i&&t._model._projectTo2D)&&e._transformDirty){let o=i?t._computedModelMatrix2D:t._computedModelMatrix;ipe(e,t,o,e.transformToRoot),e._transformDirty=!1}};function wKe(e,t,n){e.modelMatrix=M.multiplyTransformation(t,n,e.modelMatrix),e.cullFace=ht.getCullFace(e.modelMatrix,e.primitiveType)}function ipe(e,t,n,i){let o;i=M.multiplyTransformation(i,e.transform,new M),e.updateComputedTransform();let r=e.runtimePrimitives.length;for(o=0;o<r;o++){let s=e.runtimePrimitives[o];wKe(s.drawCommand,n,i)}let a=e.children.length;for(o=0;o<a;o++){let s=t._runtimeNodes[e.children[o]];s._transformToRoot=M.clone(i,s._transformToRoot),ipe(s,t,n,i),s._transformDirty=!1}}var OB=JX;var ope={name:"NodeStatisticsPipelineStage",_countInstancingAttributes:rpe,_countGeneratedBuffers:ape};ope.process=function(e,t,n){let i=e.model.statistics,o=t.instances,r=e.runtimeNode;rpe(i,o),ape(i,r)};function rpe(e,t){if(!l(t))return;let n=t.attributes,i=n.length;for(let o=0;o<i;o++){let r=n[o];l(r.buffer)&&e.addBuffer(r.buffer,!1)}}function ape(e,t){l(t.instancingTransformsBuffer)&&e.addBuffer(t.instancingTransformsBuffer,!1),l(t.instancingTransformsBuffer2D)&&e.addBuffer(t.instancingTransformsBuffer2D,!1),l(t.instancingTranslationBuffer2D)&&e.addBuffer(t.instancingTranslationBuffer2D,!1)}var MB=ope;function Vv(e){e=e??G.EMPTY_OBJECT;let t=e.node,n=e.transform,i=e.transformToRoot,o=e.sceneGraph,r=e.children;this._node=t,this._name=t.name,this._id=t.index,this._sceneGraph=o,this._children=r,this._originalTransform=M.clone(n,this._originalTransform),this._transform=M.clone(n,this._transform),this._transformToRoot=M.clone(i,this._transformToRoot),this._computedTransform=new M,this._transformDirty=!1,this._transformParameters=void 0,this._morphWeights=[],this._runtimeSkin=void 0,this._computedJointMatrices=[],this.show=!0,this.userAnimated=!1,this.pipelineStages=[],this.runtimePrimitives=[],this.updateStages=[],this.instancingTranslationMin=void 0,this.instancingTranslationMax=void 0,this.instancingTransformsBuffer=void 0,this.instancingTransformsBuffer2D=void 0,this.instancingTranslationBuffer2D=void 0,this.instancingReferencePoint2D=void 0,IKe(this)}Object.defineProperties(Vv.prototype,{node:{get:function(){return this._node}},sceneGraph:{get:function(){return this._sceneGraph}},children:{get:function(){return this._children}},transform:{get:function(){return this._transform},set:function(e){this._transformDirty=!0,this._transform=M.clone(e,this._transform)}},transformToRoot:{get:function(){return this._transformToRoot}},computedTransform:{get:function(){return this._computedTransform}},originalTransform:{get:function(){return this._originalTransform}},translation:{get:function(){return l(this._transformParameters)?this._transformParameters.translation:void 0},set:function(e){let t=this._transformParameters,n=t.translation;h.equals(n,e)||(t.translation=h.clone(e,t.translation),ZX(this,t))}},rotation:{get:function(){return l(this._transformParameters)?this._transformParameters.rotation:void 0},set:function(e){let t=this._transformParameters,n=t.rotation;Le.equals(n,e)||(t.rotation=Le.clone(e,t.rotation),ZX(this,t))}},scale:{get:function(){return l(this._transformParameters)?this._transformParameters.scale:void 0},set:function(e){let t=this._transformParameters,n=t.scale;h.equals(n,e)||(t.scale=h.clone(e,t.scale),ZX(this,t))}},morphWeights:{get:function(){return this._morphWeights},set:function(e){let t=e.length;for(let n=0;n<t;n++)this._morphWeights[n]=e[n]}},runtimeSkin:{get:function(){return this._runtimeSkin}},computedJointMatrices:{get:function(){return this._computedJointMatrices}}});function IKe(e){let t=e.transform,n=e.transformToRoot,i=e._computedTransform;e._computedTransform=M.multiply(n,t,i);let o=e.node;l(o.matrix)||(e._transformParameters=new hA(o.translation,o.rotation,o.scale)),l(o.morphWeights)&&(e._morphWeights=o.morphWeights.slice());let r=o.articulationName;if(l(r)){let c=e.sceneGraph._runtimeArticulations[r];l(c)&&c.runtimeNodes.push(e)}}function ZX(e,t){e._transformDirty=!0,e._transform=M.fromTranslationRotationScale(t,e._transform)}Vv.prototype.getChild=function(e){return this.sceneGraph._runtimeNodes[this.children[e]]};Vv.prototype.configurePipeline=function(){let e=this.node,t=this.pipelineStages;t.length=0;let n=this.updateStages;n.length=0,l(e.instances)&&t.push(RB),t.push(MB),n.push(OB)};Vv.prototype.updateComputedTransform=function(){this._computedTransform=M.multiply(this._transformToRoot,this._transform,this._computedTransform)};Vv.prototype.updateJointMatrices=function(){let e=this._runtimeSkin;if(!l(e))return;e.updateJointMatrices();let t=this._computedJointMatrices,n=e.jointMatrices,i=n.length;for(let o=0;o<i;o++){l(t[o])||(t[o]=new M);let r=M.multiplyTransformation(this.transformToRoot,this.transform,t[o]),a=M.inverseTransformation(r,t[o]);t[o]=M.multiplyTransformation(a,n[o],t[o])}};var BB=Vv;var spe={name:"AlphaPipelineStage"};spe.process=function(e,t,n){let i=e.alphaOptions,o=e.model;i.pass=i.pass??o.opaquePass;let r=e.renderStateOptions;i.pass===Ie.TRANSLUCENT&&(r.cull.enabled=!1,r.depthMask=!1,r.blending=Jt.ALPHA_BLEND);let a=e.shaderBuilder,s=e.uniformMap;l(i.alphaCutoff)&&(a.addDefine("ALPHA_MODE_MASK",void 0,he.FRAGMENT),a.addUniform("float","u_alphaCutoff",he.FRAGMENT),s.u_alphaCutoff=function(){return i.alphaCutoff})};var LB=spe;var cpe={name:"BatchTexturePipelineStage"};cpe.process=function(e,t,n){let i=e.shaderBuilder,o={},r=e.model,a=r.featureTables[r.featureTableId],s=a.featuresLength;i.addUniform("int","model_featuresLength"),o.model_featuresLength=function(){return s};let c=a.batchTexture;i.addUniform("sampler2D","model_batchTexture"),o.model_batchTexture=function(){return c.batchTexture??c.defaultTexture},i.addUniform("vec4","model_textureStep"),o.model_textureStep=function(){return c.textureStep},c.textureDimensions.y>1&&(i.addDefine("MULTILINE_BATCH_TEXTURE"),i.addUniform("vec2","model_textureDimensions"),o.model_textureDimensions=function(){return c.textureDimensions}),e.uniformMap=wt(o,e.uniformMap)};var NB=cpe;var lpe={name:"ClassificationPipelineStage"};lpe.process=function(e,t,n){e.shaderBuilder.addDefine("HAS_CLASSIFICATION",void 0,he.BOTH);let o=e.runtimePrimitive;l(o.batchLengths)||DKe(t,o)};function DKe(e,t){let n=ht.getAttributeBySemantic(e,it.POSITION);if(!l(n))throw new re("Primitives must have a position attribute to be used for classification.");let i,o=e.indices,r=l(o);r&&(i=o.typedArray,o.typedArray=void 0);let a=r?o.count:n.count,s=ht.getAttributeBySemantic(e,it.FEATURE_ID,0);if(!l(s)){t.batchLengths=[a],t.batchOffsets=[0];return}let c=s.typedArray;s.typedArray=void 0;let u=[],f=[0],d=r?i[0]:0,p=c[d],g=0;for(let A=1;A<a;A++){let y=r?i[A]:A,x=c[y];if(x!==p){let b=A-g,C=A;u.push(b),f.push(C),g=C,p=x}}let m=a-g;u.push(m),t.batchLengths=u,t.batchOffsets=f}var FB=lpe;var kB=`void filterByPassType(inout vec3 positionMC, vec4 featureColor)
- {
- bool styleTranslucent = (featureColor.a != 1.0);
- // Only render translucent features in the translucent pass (if the style or the original command has translucency).
- if (czm_pass == czm_passTranslucent && !styleTranslucent && !model_commandTranslucent)
- {
- // If the model has a translucent silhouette, it needs to render during the silhouette color command,
- // (i.e. the command where model_silhouettePass = true), even if the model isn't translucent.
- #ifdef HAS_SILHOUETTE
- positionMC *= float(model_silhouettePass);
- #else
- positionMC *= 0.0;
- #endif
- }
- // If the current pass is not the translucent pass and the style is not translucent, don't render the feature.
- else if (czm_pass != czm_passTranslucent && styleTranslucent)
- {
- positionMC *= 0.0;
- }
- }
-
- void cpuStylingStage(inout vec3 positionMC, inout SelectedFeature feature)
- {
- float show = ceil(feature.color.a);
- positionMC *= show;
-
- #if defined(HAS_SELECTED_FEATURE_ID_ATTRIBUTE) && !defined(HAS_CLASSIFICATION)
- filterByPassType(positionMC, feature.color);
- #endif
- }
- `;var zB=`void filterByPassType(vec4 featureColor)
- {
- bool styleTranslucent = (featureColor.a != 1.0);
- // Only render translucent features in the translucent pass (if the style or the original command has translucency).
- if (czm_pass == czm_passTranslucent && !styleTranslucent && !model_commandTranslucent)
- {
- // If the model has a translucent silhouette, it needs to render during the silhouette color command,
- // (i.e. the command where model_silhouettePass = true), even if the model isn't translucent.
- #ifdef HAS_SILHOUETTE
- if(!model_silhouettePass) {
- discard;
- }
- #else
- discard;
- #endif
- }
- // If the current pass is not the translucent pass and the style is not translucent, don't render the feature.
- else if (czm_pass != czm_passTranslucent && styleTranslucent)
- {
- discard;
- }
- }
-
- void cpuStylingStage(inout czm_modelMaterial material, SelectedFeature feature)
- {
- vec4 featureColor = feature.color;
- if (featureColor.a == 0.0)
- {
- discard;
- }
-
- // If a feature ID vertex attribute is used, the pass type filter is applied in the vertex shader.
- // So, we only apply in in the fragment shader if the feature ID texture is used.
- #if defined(HAS_SELECTED_FEATURE_ID_TEXTURE) && !defined(HAS_CLASSIFICATION)
- filterByPassType(featureColor);
- #endif
-
- featureColor = czm_gammaCorrect(featureColor);
-
- // Classification models compute the diffuse differently.
- #ifdef HAS_CLASSIFICATION
- material.diffuse = featureColor.rgb * featureColor.a;
- #else
- float highlight = ceil(model_colorBlend);
- material.diffuse *= mix(featureColor.rgb, vec3(1.0), highlight);
- #endif
-
- material.alpha *= featureColor.a;
- }
- `;var upe={name:"CPUStylingPipelineStage"};upe.process=function(e,t,n){let i=e.model,o=e.shaderBuilder;o.addVertexLines(kB),o.addFragmentLines(zB),o.addDefine("USE_CPU_STYLING",void 0,he.BOTH),l(i.color)||(o.addUniform("float",zA.COLOR_BLEND_UNIFORM_NAME,he.FRAGMENT),e.uniformMap[zA.COLOR_BLEND_UNIFORM_NAME]=function(){return sl.getColorBlend(i.colorBlendMode,i.colorBlendAmount)}),o.addUniform("bool","model_commandTranslucent",he.BOTH),e.uniformMap.model_commandTranslucent=function(){return e.alphaOptions.pass===Ie.TRANSLUCENT}};var UB=upe;var eK={MODIFY_MATERIAL:"MODIFY_MATERIAL",REPLACE_MATERIAL:"REPLACE_MATERIAL"};eK.getDefineName=function(e){return`CUSTOM_SHADER_${e}`};Object.freeze(eK);var vg=eK;var VB=`void customShaderStage(
- inout czm_modelVertexOutput vsOutput,
- inout ProcessedAttributes attributes,
- FeatureIds featureIds,
- Metadata metadata,
- MetadataClass metadataClass,
- MetadataStatistics metadataStatistics
- ) {
- // VertexInput and initializeInputStruct() are dynamically generated in JS,
- // see CustomShaderPipelineStage.js
- VertexInput vsInput;
- initializeInputStruct(vsInput, attributes);
- vsInput.featureIds = featureIds;
- vsInput.metadata = metadata;
- vsInput.metadataClass = metadataClass;
- vsInput.metadataStatistics = metadataStatistics;
- vertexMain(vsInput, vsOutput);
- attributes.positionMC = vsOutput.positionMC;
- }
- `;var jB=`void customShaderStage(
- inout czm_modelMaterial material,
- ProcessedAttributes attributes,
- FeatureIds featureIds,
- Metadata metadata,
- MetadataClass metadataClass,
- MetadataStatistics metadataStatistics
- ) {
- // FragmentInput and initializeInputStruct() are dynamically generated in JS,
- // see CustomShaderPipelineStage.js
- FragmentInput fsInput;
- initializeInputStruct(fsInput, attributes);
- fsInput.featureIds = featureIds;
- fsInput.metadata = metadata;
- fsInput.metadataClass = metadataClass;
- fsInput.metadataStatistics = metadataStatistics;
- fragmentMain(fsInput, material);
- }
- `;var GB=`void featureIdStage(out FeatureIds featureIds, ProcessedAttributes attributes) {
- initializeFeatureIds(featureIds, attributes);
- initializeFeatureIdAliases(featureIds);
- }
- `;var HB=`void featureIdStage(out FeatureIds featureIds, ProcessedAttributes attributes)
- {
- initializeFeatureIds(featureIds, attributes);
- initializeFeatureIdAliases(featureIds);
- setFeatureIdVaryings();
- }
- `;var to={name:"FeatureIdPipelineStage",STRUCT_ID_FEATURE_IDS_VS:"FeatureIdsVS",STRUCT_ID_FEATURE_IDS_FS:"FeatureIdsFS",STRUCT_NAME_FEATURE_IDS:"FeatureIds",FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS:"initializeFeatureIdsVS",FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS:"initializeFeatureIdsFS",FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_VS:"initializeFeatureIdAliasesVS",FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_FS:"initializeFeatureIdAliasesFS",FUNCTION_SIGNATURE_INITIALIZE_FEATURE_IDS:"void initializeFeatureIds(out FeatureIds featureIds, ProcessedAttributes attributes)",FUNCTION_SIGNATURE_INITIALIZE_FEATURE_ID_ALIASES:"void initializeFeatureIdAliases(inout FeatureIds featureIds)",FUNCTION_ID_SET_FEATURE_ID_VARYINGS:"setFeatureIdVaryings",FUNCTION_SIGNATURE_SET_FEATURE_ID_VARYINGS:"void setFeatureIdVaryings()"};to.process=function(e,t,n){let i=e.shaderBuilder;PKe(i);let o=e.runtimeNode.node.instances;l(o)&&RKe(e,o,n),OKe(e,t,n),i.addVertexLines(HB),i.addFragmentLines(GB)};function PKe(e){e.addStruct(to.STRUCT_ID_FEATURE_IDS_VS,to.STRUCT_NAME_FEATURE_IDS,he.VERTEX),e.addStruct(to.STRUCT_ID_FEATURE_IDS_FS,to.STRUCT_NAME_FEATURE_IDS,he.FRAGMENT),e.addFunction(to.FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS,to.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_IDS,he.VERTEX),e.addFunction(to.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS,to.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_IDS,he.FRAGMENT),e.addFunction(to.FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_VS,to.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_ID_ALIASES,he.VERTEX),e.addFunction(to.FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_FS,to.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_ID_ALIASES,he.FRAGMENT),e.addFunction(to.FUNCTION_ID_SET_FEATURE_ID_VARYINGS,to.FUNCTION_SIGNATURE_SET_FEATURE_ID_VARYINGS,he.VERTEX)}function RKe(e,t,n){let i=t.featureIds,o=t.attributes[0].count;for(let r=0;r<i.length;r++){let a=i[r],s=a.positionalLabel;a instanceof _n.FeatureIdAttribute?MKe(e,a,s):fpe(e,a,s,o,1,n);let c=a.label;l(c)&&dpe(e,s,c,he.BOTH)}}function OKe(e,t,n){let i=t.featureIds,r=ht.getAttributeBySemantic(t,it.POSITION).count;for(let a=0;a<i.length;a++){let s=i[a],c=s.positionalLabel,u=he.BOTH;s instanceof _n.FeatureIdAttribute?BKe(e,s,c):s instanceof _n.FeatureIdImplicitRange?fpe(e,s,c,r,void 0,n):(LKe(e,s,c,a,n),u=he.FRAGMENT);let f=s.label;l(f)&&dpe(e,c,f,u)}}function MKe(e,t,n){let i=e.shaderBuilder;i.addStructField(to.STRUCT_ID_FEATURE_IDS_VS,"int",n),i.addStructField(to.STRUCT_ID_FEATURE_IDS_FS,"int",n);let o=t.setIndex,r=n.replace(/_\d+$/,"_"),a=`a_${r}${o}`,s=`v_${r}${o}`,c=`featureIds.${n} = int(czm_round(${a}));`,u=`featureIds.${n} = int(czm_round(${s}));`;i.addFunctionLines(to.FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS,[c]),i.addFunctionLines(to.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS,[u]),i.addVarying("float",s),i.addFunctionLines(to.FUNCTION_ID_SET_FEATURE_ID_VARYINGS,[`${s} = ${a};`])}function BKe(e,t,n){let i=e.shaderBuilder;i.addStructField(to.STRUCT_ID_FEATURE_IDS_VS,"int",n),i.addStructField(to.STRUCT_ID_FEATURE_IDS_FS,"int",n);let o=t.setIndex,r=n.replace(/_\d+$/,"_"),a=[`featureIds.${n} = int(czm_round(attributes.${r}${o}));`];i.addFunctionLines(to.FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS,a),i.addFunctionLines(to.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS,a)}function fpe(e,t,n,i,o,r){NKe(e,t,i,o,r);let a=e.shaderBuilder,s=`a_implicit_${n}`;a.addAttribute("float",s);let c=`v_implicit_${n}`;a.addVarying("float",c),a.addStructField(to.STRUCT_ID_FEATURE_IDS_VS,"int",n),a.addStructField(to.STRUCT_ID_FEATURE_IDS_FS,"int",n),a.addFunctionLines(to.FUNCTION_ID_SET_FEATURE_ID_VARYINGS,[`${c} = ${s};`]),a.addFunctionLines(to.FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS,[`featureIds.${n} = int(czm_round(${s}));`]),a.addFunctionLines(to.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS,[`featureIds.${n} = int(czm_round(${c}));`])}function LKe(e,t,n,i,o){let r=`u_featureIdTexture_${i}`,a=e.uniformMap,s=t.textureReader;a[r]=function(){return s.texture??o.context.defaultTexture};let c=s.channels,u=e.shaderBuilder;u.addStructField(to.STRUCT_ID_FEATURE_IDS_FS,"int",n),u.addUniform("sampler2D",r,he.FRAGMENT);let d=`v_texCoord_${s.texCoord}`,p=d,g=s.transform;if(l(g)&&!$.equals(g,$.IDENTITY)){let y=`${r}Transform`;u.addUniform("mat3",y,he.FRAGMENT),a[y]=function(){return g},p=`vec2(${y} * vec3(${d}, 1.0))`}let m=`texture(${r}, ${p}).${c}`,A=`featureIds.${n} = czm_unpackUint(${m});`;u.addFunctionLines(to.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS,[A])}function dpe(e,t,n,i){let o=e.shaderBuilder,r=he.includesVertexShader(i);r&&o.addStructField(to.STRUCT_ID_FEATURE_IDS_VS,"int",n),o.addStructField(to.STRUCT_ID_FEATURE_IDS_FS,"int",n);let a=[`featureIds.${n} = featureIds.${t};`];r&&o.addFunctionLines(to.FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_VS,a),o.addFunctionLines(to.FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_FS,a)}function NKe(e,t,n,i,o){let r=e.model,a,s;if(l(t.repeat)){let u=FKe(t,n);a=Ke.createVertexBuffer({context:o.context,typedArray:u,usage:Oe.STATIC_DRAW}),a.vertexArrayDestroyable=!1,r._pipelineResources.push(a),r.statistics.addBuffer(a,!1)}else s=[t.offset];let c={index:e.attributeIndex++,instanceDivisor:i,value:s,vertexBuffer:a,normalize:!1,componentsPerAttribute:1,componentDatatype:Y.FLOAT,strideInBytes:Y.getSizeInBytes(Y.FLOAT),offsetInBytes:0};e.attributes.push(c)}function FKe(e,t){let n=e.offset,i=e.repeat,o=new Float32Array(t);for(let r=0;r<t;r++)o[r]=n+Math.floor(r/i);return o}var UA=to;var WB=`void metadataStage(
- FeatureIds featureIds,
- out Metadata metadata,
- out MetadataClass metadataClass,
- out MetadataStatistics metadataStatistics,
- ProcessedAttributes attributes
- )
- {
- initializeMetadata(featureIds, metadata, metadataClass, metadataStatistics, attributes);
- }
- `;var qB=`void metadataStage(
- FeatureIds featureIds,
- out Metadata metadata,
- out MetadataClass metadataClass,
- out MetadataStatistics metadataStatistics,
- ProcessedAttributes attributes
- )
- {
- initializeMetadata(featureIds, metadata, metadataClass, metadataStatistics, attributes);
- setMetadataVaryings();
- }
- `;var Ti={name:"MetadataPipelineStage",STRUCT_ID_METADATA_VS:"MetadataVS",STRUCT_ID_METADATA_FS:"MetadataFS",STRUCT_NAME_METADATA:"Metadata",STRUCT_ID_METADATA_CLASS_VS:"MetadataClassVS",STRUCT_ID_METADATA_CLASS_FS:"MetadataClassFS",STRUCT_NAME_METADATA_CLASS:"MetadataClass",STRUCT_ID_METADATA_STATISTICS_VS:"MetadataStatisticsVS",STRUCT_ID_METADATA_STATISTICS_FS:"MetadataStatisticsFS",STRUCT_NAME_METADATA_STATISTICS:"MetadataStatistics",FUNCTION_ID_INITIALIZE_METADATA_VS:"initializeMetadataVS",FUNCTION_ID_INITIALIZE_METADATA_FS:"initializeMetadataFS",FUNCTION_SIGNATURE_INITIALIZE_METADATA:"void initializeMetadata(FeatureIds featureIds, out Metadata metadata, out MetadataClass metadataClass, out MetadataStatistics metadataStatistics, ProcessedAttributes attributes)",FUNCTION_ID_SET_METADATA_VARYINGS:"setMetadataVaryings",FUNCTION_SIGNATURE_SET_METADATA_VARYINGS:"void setMetadataVaryings()",METADATA_CLASS_FIELDS:[{specName:"noData",shaderName:"noData"},{specName:"default",shaderName:"defaultValue"},{specName:"min",shaderName:"minValue"},{specName:"max",shaderName:"maxValue"}],METADATA_STATISTICS_FIELDS:[{specName:"min",shaderName:"minValue"},{specName:"max",shaderName:"maxValue"},{specName:"mean",shaderName:"mean",type:"float"},{specName:"median",shaderName:"median"},{specName:"standardDeviation",shaderName:"standardDeviation",type:"float"},{specName:"variance",shaderName:"variance",type:"float"},{specName:"sum",shaderName:"sum"}]};Ti.process=function(e,t,n){let{shaderBuilder:i,model:o}=e,{structuralMetadata:r={},content:a}=o,s=a?.tileset.metadataExtension?.statistics,c=n.context.webgl2,u=nQe(o,t),f=kKe(r.propertyAttributes,t,s),d=UKe(r.propertyTextures,s),p=GKe(r.propertyTables,t,e,s,u),g=f.concat(d).concat(p);qKe(i,g),KKe(i),i.addVertexLines(qB),i.addFragmentLines(WB);for(let m=0;m<f.length;m++){let A=f[m];QKe(e,A)}for(let m=0;m<d.length;m++){let A=d[m];JKe(e,A,c)}for(let m=0;m<p.length;m++){let A=p[m];eQe(e,A,c)}};function kKe(e,t,n){return l(e)?e.flatMap(i=>zKe(i,t,n)):[]}function zKe(e,t,n){let{getAttributeByName:i,getAttributeInfo:o,sanitizeGlslIdentifier:r}=ht,a=e.class.id,s=n?.classes[a],c=Object.entries(e.properties),u=new Array(c.length);for(let f=0;f<c.length;f++){let[d,p]=c[f],g=i(t,p.attribute),{glslType:m,variableName:A}=o(g);u[f]={metadataVariable:r(d),property:p,classProperty:p.classProperty,type:p.classProperty.type,glslType:m,variableName:A,propertyStatistics:s?.properties[d],shaderDestination:he.BOTH}}return u}function UKe(e,t){return l(e)?e.flatMap(n=>VKe(n,t)):[]}function VKe(e,t){let{sanitizeGlslIdentifier:n}=ht,i=e.class.id,o=t?.classes[i],r=Object.entries(e.properties).filter(([s,c])=>{let u=c.textureReader.channels.length;return c.classProperty.isGpuCompatible(u)}),a=new Array(r.length);for(let s=0;s<r.length;s++){let[c,u]=r[s];a[s]={metadataVariable:n(c),property:u,classProperty:u.classProperty,type:u.classProperty.type,glslType:u.classProperty.getGlslType(),propertyStatistics:o?.properties[c],shaderDestination:he.FRAGMENT}}return a}var jKe=4;function GKe(e,t,n,i,o){if(!l(e))return[];let r=WKe(n,t);return e.filter(a=>l(a.class)&&r.has(String(a.id))).flatMap(a=>HKe(a,r,i,o))}function HKe(e,t,n,i){let{sanitizeGlslIdentifier:o}=ht,r=e.class,a=n?.classes[r.id],s=t.get(String(e.id))??{},c=s.shaderDestination??he.BOTH,u=e.properties,f=r.properties,d=[],p=0;for(let[g,m]of Object.entries(f)){if(!m.isGpuCompatible(jKe))continue;let A=u[g],y=he.intersection(rQe(g,i),c);if(y===he.NONE){p++;continue}d.push({metadataVariable:o(g),property:A,classProperty:m,type:m.type,glslType:m.getGlslType(),propertyStatistics:a?.properties[g],shaderDestination:y,propertyTable:e,featureIdVariableName:s.variableName,propertyInfoIndex:p}),p++}return d}function WKe(e,t){let n=new Map;function i(s,c){let u=s?.propertyTableId;if(!l(u))return;let f=String(u),d={variableName:s.positionalLabel,shaderDestination:c},p=n.get(f);l(p)&&console.warn(`Multiple feature ID sets reference the same property table ${u} in primitive. Only one will be used.`),n.set(f,d)}let o=t?.featureIds??[];for(let s=0;s<o.length;s++){let c=o[s],u=l(c?.textureReader);i(c,u?he.FRAGMENT:he.BOTH)}let a=e.runtimeNode?.node?.instances?.featureIds??[];for(let s=0;s<a.length;s++){let c=a[s];i(c,he.BOTH)}return n}function qKe(e,t){let n=new Set,i=new Set;for(let s=0;s<t.length;s++){let{type:c,glslType:u,propertyStatistics:f}=t[s];n.add(u),l(f)&&c!==dt.ENUM&&i.add(u)}let o=Ti.METADATA_CLASS_FIELDS;for(let s of n){let c=`${s}MetadataClass`;a(c,s,o)}let r=Ti.METADATA_STATISTICS_FIELDS;for(let s of i){let c=`${s}MetadataStatistics`;a(c,s,r)}function a(s,c,u){e.addStruct(s,s,he.BOTH);for(let f=0;f<u.length;f++){let{shaderName:d}=u[f],p=u[f].type==="float"?XKe(c):c;e.addStructField(s,p,d)}}}var YKe={int:"float",ivec2:"vec2",ivec3:"vec3",ivec4:"vec4"};function XKe(e){let t=YKe[e];return l(t)?t:e}function KKe(e){e.addStruct(Ti.STRUCT_ID_METADATA_VS,Ti.STRUCT_NAME_METADATA,he.VERTEX),e.addStruct(Ti.STRUCT_ID_METADATA_FS,Ti.STRUCT_NAME_METADATA,he.FRAGMENT),e.addStruct(Ti.STRUCT_ID_METADATA_CLASS_VS,Ti.STRUCT_NAME_METADATA_CLASS,he.VERTEX),e.addStruct(Ti.STRUCT_ID_METADATA_CLASS_FS,Ti.STRUCT_NAME_METADATA_CLASS,he.FRAGMENT),e.addStruct(Ti.STRUCT_ID_METADATA_STATISTICS_VS,Ti.STRUCT_NAME_METADATA_STATISTICS,he.VERTEX),e.addStruct(Ti.STRUCT_ID_METADATA_STATISTICS_FS,Ti.STRUCT_NAME_METADATA_STATISTICS,he.FRAGMENT),e.addFunction(Ti.FUNCTION_ID_INITIALIZE_METADATA_VS,Ti.FUNCTION_SIGNATURE_INITIALIZE_METADATA,he.VERTEX),e.addFunction(Ti.FUNCTION_ID_INITIALIZE_METADATA_FS,Ti.FUNCTION_SIGNATURE_INITIALIZE_METADATA,he.FRAGMENT),e.addFunction(Ti.FUNCTION_ID_SET_METADATA_VARYINGS,Ti.FUNCTION_SIGNATURE_SET_METADATA_VARYINGS,he.VERTEX)}function QKe(e,t){$Ke(e,t),tK(e.shaderBuilder,t),nK(e.shaderBuilder,t)}function $Ke(e,t){let{shaderBuilder:n}=e,{metadataVariable:i,property:o,glslType:r}=t,a=iK({valueExpression:`attributes.${t.variableName}`,renderResources:e,glslType:r,metadataVariable:i,shaderDestination:he.BOTH,property:o});n.addStructField(Ti.STRUCT_ID_METADATA_VS,r,i),n.addStructField(Ti.STRUCT_ID_METADATA_FS,r,i);let s=`metadata.${i} = ${a};`;n.addFunctionLines(Ti.FUNCTION_ID_INITIALIZE_METADATA_VS,[s]),n.addFunctionLines(Ti.FUNCTION_ID_INITIALIZE_METADATA_FS,[s])}function JKe(e,t,n){ZKe(e,t,n),tK(e.shaderBuilder,t),nK(e.shaderBuilder,t)}function ZKe(e,t,n){let{shaderBuilder:i,uniformMap:o}=e,{metadataVariable:r,glslType:a,property:s}=t,{texCoord:c,channels:u,index:f,texture:d,transform:p}=s.textureReader,g=`u_propertyTexture_${f}`,m=[];o.hasOwnProperty(g)||(i.addUniform("sampler2D",g,he.FRAGMENT),o[g]=()=>d),i.addStructField(Ti.STRUCT_ID_METADATA_FS,a,r);let A=`attributes.texCoord_${c}`,y=A;if(l(p)&&!$.equals(p,$.IDENTITY)){let w=`${g}Transform`;i.addUniform("mat3",w,he.FRAGMENT),o[w]=function(){return p},y=`vec2(${w} * vec3(${A}, 1.0))`}let x=`texture(${g}, ${y}).${u}`,b=s.classProperty,C;n?C=b.unpackTextureInShader(x,u,r,m):C=b.unpackTextureInShaderWebGL1(x);let E=iK({valueExpression:C,renderResources:e,glslType:a,metadataVariable:r,shaderDestination:he.FRAGMENT,property:s}),S=`metadata.${r} = ${E};`;m.push(S),i.addFunctionLines(Ti.FUNCTION_ID_INITIALIZE_METADATA_FS,m)}function tK(e,t){let n=t.classProperty,{metadataVariable:i,glslType:o,shaderDestination:r}=t,a=hpe(Ti.METADATA_CLASS_FIELDS,n,`metadataClass.${i}`,o),s=`${o}MetadataClass`;e.addStructField(Ti.STRUCT_ID_METADATA_CLASS_FS,s,i),e.addFunctionLines(Ti.FUNCTION_ID_INITIALIZE_METADATA_FS,a),he.includesVertexShader(r)&&(e.addStructField(Ti.STRUCT_ID_METADATA_CLASS_VS,s,i),e.addFunctionLines(Ti.FUNCTION_ID_INITIALIZE_METADATA_VS,a))}function nK(e,t){let{propertyStatistics:n}=t;if(!l(n))return;let{metadataVariable:i,type:o,glslType:r}=t;if(o===dt.ENUM)return;let a=Ti.METADATA_STATISTICS_FIELDS,s=`metadataStatistics.${i}`,c=hpe(a,n,s,r),u=`${r}MetadataStatistics`;e.addStructField(Ti.STRUCT_ID_METADATA_STATISTICS_FS,u,i),e.addFunctionLines(Ti.FUNCTION_ID_INITIALIZE_METADATA_FS,c),he.includesVertexShader(t.shaderDestination)&&(e.addStructField(Ti.STRUCT_ID_METADATA_STATISTICS_VS,u,i),e.addFunctionLines(Ti.FUNCTION_ID_INITIALIZE_METADATA_VS,c))}function eQe(e,t,n){tQe(e,t,n),tK(e.shaderBuilder,t),nK(e.shaderBuilder,t)}function tQe(e,t,n){let{shaderBuilder:i,uniformMap:o}=e,{metadataVariable:r,glslType:a,property:s,featureIdVariableName:c,propertyTable:u,propertyInfoIndex:f}=t;if(!n){_t("PropertyTableCustomShader","Property table support for custom shaders requires WebGL2.");return}if(!l(c)||!l(u.texture))return;let d=`u_propertyTableTexture_${u.id}`,p=[];o.hasOwnProperty(d)||(i.addUniform("sampler2D",d,he.BOTH),o[d]=()=>u.texture);let g=t.shaderDestination;he.includesVertexShader(g)&&i.addStructField(Ti.STRUCT_ID_METADATA_VS,a,r),he.includesFragmentShader(g)&&i.addStructField(Ti.STRUCT_ID_METADATA_FS,a,r);let A=`ivec2(${`featureIds.${c}`}, ${f})`,y=`texelFetch(${d}, ${A}, 0)`,x=t.classProperty,b=x.unpackTextureInShader(y,"rgba",r,p),C=iK({valueExpression:b,renderResources:e,glslType:a,metadataVariable:r,shaderDestination:g,property:s??x}),E=`metadata.${r} = ${C};`;p.push(E),he.includesVertexShader(g)&&i.addFunctionLines(Ti.FUNCTION_ID_INITIALIZE_METADATA_VS,p),he.includesFragmentShader(g)&&i.addFunctionLines(Ti.FUNCTION_ID_INITIALIZE_METADATA_FS,p)}function hpe(e,t,n,i){function o(r){let a=t[r.specName];if(l(a))return`${n}.${r.shaderName} = ${i}(${a});`}return l(t)?e.map(o).filter(l):[]}function iK(e){let{valueExpression:t,property:n}=e;if(!n.hasValueTransform)return t;let i=e.metadataVariable,o=`u_${i}_offset`,r=`u_${i}_scale`,{shaderBuilder:a,uniformMap:s}=e.renderResources,{glslType:c,shaderDestination:u}=e;a.addUniform(c,o,u),a.addUniform(c,r,u);let{offset:f,scale:d}=n;return s[o]=()=>f,s[r]=()=>d,`czm_valueTransform(${o}, ${r}, ${t})`}function nQe(e,t){let n=new Set,i=new Set;return iQe(e,n,i),oQe(e,t,n,i),{usedInVertex:n,usedInFragment:i}}function iQe(e,t,n){let i=e.customShader;if(!l(i))return;let o=i.usedVariablesFragment?.metadataSet??{};for(let a in o)o.hasOwnProperty(a)&&n.add(a);let r=i.usedVariablesVertex?.metadataSet??{};for(let a in r)r.hasOwnProperty(a)&&t.add(a)}function oQe(e,t,n,i){let o=e.style;if(!(l(o)&&t.primitiveType===Re.POINTS))return;let a=o.color?.getVariables?.()??[];for(let u of a)n.add(u),i.add(u);let s=o.show?.getVariables?.()??[];for(let u of s)n.add(u),i.add(u);let c=o.pointSize?.getVariables?.()??[];for(let u of c)n.add(u)}function rQe(e,t){let n=t.usedInFragment.has(e)?he.FRAGMENT:he.NONE,i=t.usedInVertex.has(e)?he.VERTEX:he.NONE;return he.union(n,i)}var Bd=Ti;var mpe={INHERIT:0,OPAQUE:1,TRANSLUCENT:2};Object.freeze(mpe);var VA=mpe;var Ns={name:"CustomShaderPipelineStage",STRUCT_ID_ATTRIBUTES_VS:"AttributesVS",STRUCT_ID_ATTRIBUTES_FS:"AttributesFS",STRUCT_NAME_ATTRIBUTES:"Attributes",STRUCT_ID_VERTEX_INPUT:"VertexInput",STRUCT_NAME_VERTEX_INPUT:"VertexInput",STRUCT_ID_FRAGMENT_INPUT:"FragmentInput",STRUCT_NAME_FRAGMENT_INPUT:"FragmentInput",FUNCTION_ID_INITIALIZE_INPUT_STRUCT_VS:"initializeInputStructVS",FUNCTION_SIGNATURE_INITIALIZE_INPUT_STRUCT_VS:"void initializeInputStruct(out VertexInput vsInput, ProcessedAttributes attributes)",FUNCTION_ID_INITIALIZE_INPUT_STRUCT_FS:"initializeInputStructFS",FUNCTION_SIGNATURE_INITIALIZE_INPUT_STRUCT_FS:"void initializeInputStruct(out FragmentInput fsInput, ProcessedAttributes attributes)",_oneTimeWarning:_t};Ns.process=function(e,t,n){let{shaderBuilder:i,model:o,alphaOptions:r}=e,{customShader:a}=o,{lightingModel:s,translucencyMode:c}=a;l(s)&&(e.lightingOptions.lightingModel=s),c===VA.TRANSLUCENT?r.pass=Ie.TRANSLUCENT:c===VA.OPAQUE&&(r.pass=void 0);let u=hQe(a,t,e);if(!u.customShaderEnabled)return;if(_Qe(i,a,u),u.shouldComputePositionWC&&i.addDefine("COMPUTE_POSITION_WC_CUSTOM_SHADER",void 0,he.BOTH),l(a.vertexShaderText)&&i.addDefine("HAS_CUSTOM_VERTEX_SHADER",void 0,he.VERTEX),l(a.fragmentShaderText)){i.addDefine("HAS_CUSTOM_FRAGMENT_SHADER",void 0,he.FRAGMENT);let p=vg.getDefineName(a.mode);i.addDefine(p,void 0,he.FRAGMENT)}let f=a.uniforms;for(let p in f)if(f.hasOwnProperty(p)){let g=f[p];i.addUniform(g.type,p)}let d=a.varyings;for(let p in d)if(d.hasOwnProperty(p)){let g=d[p];i.addVarying(g,p)}e.uniformMap=wt(e.uniformMap,a.uniformMap)};function aQe(e){let t={};for(let n=0;n<e.length;n++){let i=ht.getAttributeInfo(e[n]);t[i.variableName]=i}return t}var sQe={position:"vec3",normal:"vec3",tangent:"vec3",bitangent:"vec3",texCoord:"vec2",color:"vec4",joints:"ivec4",weights:"vec4"},cQe={position:"vec3(0.0)",normal:"vec3(0.0, 0.0, 1.0)",tangent:"vec3(1.0, 0.0, 0.0)",bitangent:"vec3(0.0, 1.0, 0.0)",texCoord:"vec2(0.0)",color:"vec4(1.0)",joints:"ivec4(0)",weights:"vec4(0.0)"};function ppe(e){let t=e.replace(/_[0-9]+$/,"");t=t.replace(/(MC|EC)$/,"");let n=sQe[t],i=cQe[t];if(l(n))return{attributeField:[n,e],value:i}}function lQe(e,t,n){if(!l(e.vertexShaderText))return{enabled:!1};let i=e.usedVariablesVertex;if(!Ape(i.metadataSet,n))return{enabled:!1};let o=i.attributeSet,r=gpe(t,o,!1),a=_pe(t,o,!1),s,c=[],u=[];for(let f in r){if(!r.hasOwnProperty(f))continue;let p=[r[f].glslType,f];c.push(p),s=`vsInput.attributes.${f} = attributes.${f};`,u.push(s)}for(let f=0;f<a.length;f++){let d=a[f],p=ppe(d);if(!l(p))return Ns._oneTimeWarning("CustomShaderPipelineStage.incompatiblePrimitiveVS",`Primitive is missing attribute ${d}, disabling custom vertex shader`),{enabled:!1};c.push(p.attributeField),s=`vsInput.attributes.${d} = ${p.value};`,u.push(s)}return{enabled:!0,attributeFields:c,initializationLines:u}}function uQe(e){let t=[],n=[],i=e.usedVariablesFragment.attributeSet;return i.hasOwnProperty("positionWC")&&(t.push(["vec3","positionWC"]),n.push("fsInput.attributes.positionWC = attributes.positionWC;")),i.hasOwnProperty("positionEC")&&(t.push(["vec3","positionEC"]),n.push("fsInput.attributes.positionEC = attributes.positionEC;")),{attributeFields:t,initializationLines:n}}function fQe(e,t,n){if(!l(e.fragmentShaderText))return{enabled:!1};let i=e.usedVariablesFragment;if(!Ape(i.metadataSet,n))return{enabled:!1};let o=i.attributeSet,r=gpe(t,o,!0),a=_pe(t,o,!0),s,c=[],u=[];for(let d in r){if(!r.hasOwnProperty(d))continue;let g=[r[d].glslType,d];c.push(g),s=`fsInput.attributes.${d} = attributes.${d};`,u.push(s)}for(let d=0;d<a.length;d++){let p=a[d],g=ppe(p);if(!l(g))return Ns._oneTimeWarning("CustomShaderPipelineStage.incompatiblePrimitiveFS",`Primitive is missing attribute ${p}, disabling custom fragment shader.`),{enabled:!1};c.push(g.attributeField),s=`fsInput.attributes.${p} = ${g.value};`,u.push(s)}let f=uQe(e);return{enabled:!0,attributeFields:c.concat(f.attributeFields),initializationLines:f.initializationLines.concat(u)}}var dQe={positionWC:!0,positionEC:!0};function gpe(e,t,n){let i={};for(let o in e){if(!e.hasOwnProperty(o))continue;let r=e[o],a=o;n&&o==="normalMC"?a="normalEC":n&&o==="tangentMC"&&(a="tangentEC",r.glslType="vec3"),t.hasOwnProperty(a)&&(i[a]=r)}return i}function _pe(e,t,n){let i=[];for(let o in t){if(!t.hasOwnProperty(o)||dQe.hasOwnProperty(o))continue;let r=o;n&&o==="normalEC"?r="normalMC":n&&o==="tangentEC"&&(r="tangentMC"),e.hasOwnProperty(r)||i.push(o)}return i}function hQe(e,t,n){let i=aQe(t.attributes),o=AQe(t,n.model.structuralMetadata),r=lQe(e,i,o),a=fQe(e,i,o),c=e.usedVariablesFragment.attributeSet.hasOwnProperty("positionWC")&&a.enabled;return{vertexLines:r,fragmentLines:a,customShaderEnabled:r.enabled||a.enabled,shouldComputePositionWC:c}}function mQe(e,t){let n=Ns.STRUCT_ID_ATTRIBUTES_VS;e.addStruct(n,Ns.STRUCT_NAME_ATTRIBUTES,he.VERTEX);let{attributeFields:i,initializationLines:o}=t;for(let a=0;a<i.length;a++){let[s,c]=i[a];e.addStructField(n,s,c)}n=Ns.STRUCT_ID_VERTEX_INPUT,e.addStruct(n,Ns.STRUCT_NAME_VERTEX_INPUT,he.VERTEX),e.addStructField(n,Ns.STRUCT_NAME_ATTRIBUTES,"attributes"),e.addStructField(n,UA.STRUCT_NAME_FEATURE_IDS,"featureIds"),e.addStructField(n,Bd.STRUCT_NAME_METADATA,"metadata"),e.addStructField(n,Bd.STRUCT_NAME_METADATA_CLASS,"metadataClass"),e.addStructField(n,Bd.STRUCT_NAME_METADATA_STATISTICS,"metadataStatistics");let r=Ns.FUNCTION_ID_INITIALIZE_INPUT_STRUCT_VS;e.addFunction(r,Ns.FUNCTION_SIGNATURE_INITIALIZE_INPUT_STRUCT_VS,he.VERTEX),e.addFunctionLines(r,o)}function pQe(e,t){let n=Ns.STRUCT_ID_ATTRIBUTES_FS;e.addStruct(n,Ns.STRUCT_NAME_ATTRIBUTES,he.FRAGMENT);let{attributeFields:i,initializationLines:o}=t;for(let a=0;a<i.length;a++){let[s,c]=i[a];e.addStructField(n,s,c)}n=Ns.STRUCT_ID_FRAGMENT_INPUT,e.addStruct(n,Ns.STRUCT_NAME_FRAGMENT_INPUT,he.FRAGMENT),e.addStructField(n,Ns.STRUCT_NAME_ATTRIBUTES,"attributes"),e.addStructField(n,UA.STRUCT_NAME_FEATURE_IDS,"featureIds"),e.addStructField(n,Bd.STRUCT_NAME_METADATA,"metadata"),e.addStructField(n,Bd.STRUCT_NAME_METADATA_CLASS,"metadataClass"),e.addStructField(n,Bd.STRUCT_NAME_METADATA_STATISTICS,"metadataStatistics");let r=Ns.FUNCTION_ID_INITIALIZE_INPUT_STRUCT_FS;e.addFunction(r,Ns.FUNCTION_SIGNATURE_INITIALIZE_INPUT_STRUCT_FS,he.FRAGMENT),e.addFunctionLines(r,o)}var gQe=[];function _Qe(e,t,n){let{vertexLines:i,fragmentLines:o}=n,r=gQe;i.enabled&&(mQe(e,i),r.length=0,r.push("#line 0",t.vertexShaderText,VB),e.addVertexLines(r)),o.enabled&&(pQe(e,o),r.length=0,r.push("#line 0",t.fragmentShaderText,jB),e.addFragmentLines(r))}function AQe(e,t){if(!l(t))return new Set;let n=e.propertyTextureIds,i=e.propertyAttributeIds,o=l(e.featureIds)?e.featureIds.map(s=>s.propertyTableId):[],r=new Set;function a(s,c){for(let u of s){let d=c[u].class.properties;Object.keys(d).forEach(p=>r.add(p))}}return a(n,t.propertyTextures),a(i,t.propertyAttributes),a(o,t.propertyTables),r}function Ape(e,t){for(let n in e)if(e.hasOwnProperty(n)&&!t.has(n))return Ns._oneTimeWarning("CustomShaderPipelineStage.checkMetadataCompatibility",`A custom shader uses metadata property "${n}" which is not present for all primitives in the tileset. Disabling the custom shader for these primitives.`),!1;return!0}var YB=Ns;var XB={name:"DequantizationPipelineStage",FUNCTION_ID_DEQUANTIZATION_STAGE_VS:"dequantizationStage",FUNCTION_SIGNATURE_DEQUANTIZATION_STAGE_VS:"void dequantizationStage(inout ProcessedAttributes attributes)"};XB.process=function(e,t,n){let i=e.shaderBuilder,o=e.model,r=l(o.classificationType);i.addDefine("USE_DEQUANTIZATION",void 0,he.VERTEX),i.addFunction(XB.FUNCTION_ID_DEQUANTIZATION_STAGE_VS,XB.FUNCTION_SIGNATURE_DEQUANTIZATION_STAGE_VS,he.VERTEX);let a=t.attributes;for(let s=0;s<a.length;s++){let c=a[s],u=c.quantization;if(!l(u))continue;let f=c.semantic===it.POSITION,d=c.semantic===it.TEXCOORD;if(r&&!f&&!d)continue;let p=ht.getAttributeInfo(c);xQe(i,p),yQe(e,p)}};function yQe(e,t){let n=e.shaderBuilder,i=e.uniformMap,o=t.variableName,r=t.attribute.quantization;if(r.octEncoded){let a=`model_normalizationRange_${o}`;n.addUniform("float",a,he.VERTEX),i[a]=function(){return r.normalizationRange}}else{let a=`model_quantizedVolumeOffset_${o}`,s=`model_quantizedVolumeStepSize_${o}`,c=t.glslType;n.addUniform(c,a,he.VERTEX),n.addUniform(c,s,he.VERTEX);let u=r.quantizedVolumeOffset,f=r.quantizedVolumeStepSize;/^color_\d+$/.test(o)&&(u=ype(u,0),f=ype(f,1)),i[a]=function(){return u},i[s]=function(){return f}}}function ype(e,t){return e instanceof se?e:new se(e.x,e.y,e.z,t)}function xQe(e,t){let n=t.variableName,i=t.attribute.quantization,o;i.octEncoded?o=bQe(n,i):o=CQe(n),e.addFunctionLines(XB.FUNCTION_ID_DEQUANTIZATION_STAGE_VS,[o])}function bQe(e,t){let n=`attributes.${e}`,i=`a_quantized_${e}`,o=`model_normalizationRange_${e}`,r=t.octEncodedZXY?".zxy":".xyz";return`${n} = czm_octDecode(${i}, ${o})${r};`}function CQe(e){let t=`attributes.${e}`,n=`a_quantized_${e}`,i=`model_quantizedVolumeOffset_${e}`,o=`model_quantizedVolumeStepSize_${e}`;return`${t} = ${i} + ${n} * ${o};`}var KB=XB;var QB=`void edgeDetectionStage(inout vec4 color, inout FeatureIds featureIds) {
- if (u_isEdgePass) {
- return;
- }
-
- vec2 screenCoord = gl_FragCoord.xy / czm_viewport.zw;
-
- vec4 edgeColor = texture(czm_edgeColorTexture, screenCoord);
- vec4 edgeId = texture(czm_edgeIdTexture, screenCoord);
-
- // Packed window-space depth from edge pass (0..1)
- float edgeDepthWin = czm_unpackDepth(texture(czm_edgeDepthTexture, screenCoord));
-
- // Near / far for current frustum
- float n = czm_currentFrustum.x;
- float f = czm_currentFrustum.y;
-
- // geometry depth in eye coordinate
- vec4 geomEC = czm_windowToEyeCoordinates(gl_FragCoord);
- float geomDepthLinear = -geomEC.z;
-
- // Convert edge depth to linear depth
- float z_ndc_edge = edgeDepthWin * 2.0 - 1.0;
- float edgeDepthLinear = (2.0 * n * f) / (f + n - z_ndc_edge * (f - n));
-
- float d = abs(edgeDepthLinear - geomDepthLinear);
-
- // Adaptive epsilon using linear depth fwidth for robustness
- float pixelStepLinear = fwidth(geomDepthLinear);
- float rel = geomDepthLinear * 0.0005;
- float eps = max(n * 1e-4, max(pixelStepLinear * 1.5, rel));
-
- // If Edge isn't behind any geometry and the pixel has edge data
- if (d < eps && edgeId.r > 0.0) {
- #ifdef HAS_EDGE_FEATURE_ID
- float edgeFeatureId = edgeId.g;
- float currentFeatureId = float(featureIds.featureId_0);
- #endif
- float globeDepth = czm_unpackDepth(texture(czm_globeDepthTexture, screenCoord));
- // Background / sky / globe: always show edge
- bool isBackground = geomDepthLinear > globeDepth;
- bool drawEdge = isBackground;
-
- #ifdef HAS_EDGE_FEATURE_ID
- bool hasEdgeFeature = edgeFeatureId > 0.0;
- bool hasCurrentFeature = currentFeatureId > 0.0;
- bool featuresMatch = edgeFeatureId == currentFeatureId;
-
- drawEdge = drawEdge || !hasEdgeFeature || !hasCurrentFeature || featuresMatch;
- #else
- drawEdge = true;
- #endif
-
- if (drawEdge) {
- color = edgeColor;
- }
- }
- }
- `;var xpe={name:"EdgeDetectionPipelineStage"};xpe.process=function(e){e.shaderBuilder.addFragmentLines([QB])};var $B=xpe;var JB=`// CESIUM_REDIRECTED_COLOR_OUTPUT flag is used to avoid color attachment conflicts
- // when shaders are processed by different rendering pipelines (e.g., OIT).
- // Only declare MRT outputs when not in a derived shader context.
- #if defined(HAS_EDGE_VISIBILITY_MRT) && !defined(CESIUM_REDIRECTED_COLOR_OUTPUT)
- layout(location = 1) out vec4 out_id; // edge id / metadata
- layout(location = 2) out vec4 out_edgeDepth; // packed depth
- #endif
-
- void edgeVisibilityStage(inout vec4 color, inout FeatureIds featureIds)
- {
- #ifdef HAS_EDGE_VISIBILITY
-
- if (!u_isEdgePass) {
- return;
- }
-
- float edgeTypeInt = v_edgeType * 255.0;
-
- if (edgeTypeInt < 0.5) {
- discard;
- }
-
- if (edgeTypeInt > 0.5 && edgeTypeInt < 1.5) { // silhouette candidate
- // Silhouette check done in vertex shader
- // v_shouldDiscard will be > 0.5 if this edge should be discarded
- if (v_shouldDiscard > 0.5) {
- discard;
- }
- }
-
- vec4 finalColor = color;
- #ifdef HAS_EDGE_COLOR_ATTRIBUTE
- if (v_edgeColor.a >= 0.0) {
- finalColor = v_edgeColor;
- }
- #endif
-
- #ifdef HAS_LINE_PATTERN
- // Pattern is 16-bit, each bit represents visibility at that position
- const float maskLength = 16.0;
-
- // Get the relative position within the dash from 0 to 1
- float dashPosition = fract(v_lineCoord / maskLength);
- // Figure out the mask index
- float maskIndex = floor(dashPosition * maskLength);
- // Test the bit mask
- float maskTest = floor(u_linePattern / pow(2.0, maskIndex));
-
- // If bit is 0 (gap), discard the fragment (use < 1.0 for better numerical stability)
- if (mod(maskTest, 2.0) < 1.0) {
- discard;
- }
- #endif
- color = finalColor;
-
- #if defined(HAS_EDGE_VISIBILITY_MRT) && !defined(CESIUM_REDIRECTED_COLOR_OUTPUT)
- // Write edge metadata
- out_id = vec4(0.0);
- out_id.r = edgeTypeInt; // Edge type (0-3)
- #ifdef HAS_EDGE_FEATURE_ID
- out_id.g = float(featureIds.featureId_0); // Feature ID if available
- #else
- out_id.g = 0.0;
- #endif
- // Pack depth into separate MRT attachment
- out_edgeDepth = czm_packDepth(gl_FragCoord.z);
- #endif
- #endif
- }`;var ZB=`#ifdef HAS_EDGE_VISIBILITY
- void edgeVisibilityStageVS() {
- if (!u_isEdgePass) {
- return;
- }
-
- v_edgeType = a_edgeType;
- v_faceNormalAView = czm_normal * a_faceNormalA;
- v_faceNormalBView = czm_normal * a_faceNormalB;
- v_edgeOffset = a_edgeOffset;
-
- // Silhouette detection: check both endpoints of the edge
- v_shouldDiscard = 0.0;
- float edgeTypeInt = a_edgeType * 255.0;
- if (edgeTypeInt > 0.5 && edgeTypeInt < 1.5) {
- vec3 normalA = normalize(v_faceNormalAView);
- vec3 normalB = normalize(v_faceNormalBView);
- const float perpTol = 2.5e-4;
-
- // Check at current vertex (first endpoint)
- vec4 currentPosEC = czm_modelView * vec4(v_positionMC, 1.0);
- vec3 toEye1 = normalize(-currentPosEC.xyz);
- float dotA1 = dot(normalA, toEye1);
- float dotB1 = dot(normalB, toEye1);
-
- // Check at other vertex (second endpoint)
- vec4 otherPosEC = czm_modelView * vec4(a_edgeOtherPos, 1.0);
- vec3 toEye2 = normalize(-otherPosEC.xyz);
- float dotA2 = dot(normalA, toEye2);
- float dotB2 = dot(normalB, toEye2);
-
- // Discard if EITHER endpoint is non-silhouette
- if (dotA1 * dotB1 > perpTol || dotA2 * dotB2 > perpTol) {
- v_shouldDiscard = 1.0;
- }
- }
-
- #ifdef HAS_EDGE_FEATURE_ID
- v_featureId_0 = a_edgeFeatureId;
- #endif
-
- #ifdef HAS_EDGE_COLOR_ATTRIBUTE
- v_edgeColor = a_edgeColor;
- #endif
-
- #ifdef HAS_LINE_PATTERN
- #ifdef HAS_EDGE_CUMULATIVE_DISTANCE
- v_lineCoord = a_edgeCumulativeDistance * u_pixelsPerWorld;
- #else
- vec4 currentClip = czm_modelViewProjection * vec4(v_positionMC, 1.0);
- vec2 currentScreen = ((currentClip.xy / currentClip.w) * 0.5 + 0.5) * czm_viewport.zw;
-
- vec4 otherClip = czm_modelViewProjection * vec4(a_edgeOtherPos, 1.0);
- vec2 otherScreen = ((otherClip.xy / otherClip.w) * 0.5 + 0.5) * czm_viewport.zw;
- vec2 windowDir = otherScreen - currentScreen;
-
- const float textureCoordinateBase = 8192.0;
- if (abs(windowDir.x) > abs(windowDir.y)) {
- v_lineCoord = textureCoordinateBase + currentScreen.x;
- } else {
- v_lineCoord = textureCoordinateBase + currentScreen.y;
- }
- #endif
- #endif
-
- // Expand vertex to form quad
- vec4 posClip = gl_Position;
-
- if (length(a_edgeOtherPos) > 0.0 && abs(a_edgeOffset) > 0.0) {
- vec4 currentClip = posClip;
- vec4 otherClip = czm_modelViewProjection * vec4(a_edgeOtherPos, 1.0);
-
- vec2 currentNDC = currentClip.xy / currentClip.w;
- vec2 otherNDC = otherClip.xy / otherClip.w;
-
- vec2 edgeDirNDC = otherNDC - currentNDC;
-
- // Ensure consistent edge direction
- if (edgeDirNDC.x < 0.0 || (abs(edgeDirNDC.x) < 0.001 && edgeDirNDC.y < 0.0)) {
- edgeDirNDC = -edgeDirNDC;
- }
-
- edgeDirNDC = normalize(edgeDirNDC);
- vec2 perpNDC = vec2(-edgeDirNDC.y, edgeDirNDC.x);
-
- // Convert line width from pixels to clip space
- float lineWidthPixels = u_lineWidth;
- vec2 viewportSize = czm_viewport.zw;
- vec2 clipPerPixel = (2.0 / viewportSize) * currentClip.w;
- vec2 offsetClip = perpNDC * lineWidthPixels * clipPerPixel * 0.5 * a_edgeOffset;
-
- posClip.xy += offsetClip;
- }
-
- gl_Position = posClip;
- }
- #endif
- `;var oK=class e{static readAttributeAsTypedArray(t){let n=e.readAttributeAsRawCompactTypedArray(t),i=t.normalized,o=t.quantization;if(!l(o)&&!i)return n;let r=t.type,a=t.count,s=n;return i&&(s=nn.dequantize(n,t.componentDatatype,r,a)),l(o)?e.dequantize(s,a,r,o):s}static readAttributeAsRawCompactTypedArray(t){let n=t.type,i=t.count,o=Ft.getNumberOfComponents(n),r=i*o,a=t.componentDatatype,s=t.quantization;l(s)&&(a=s.componentDatatype);let c=t.buffer,u=t.byteOffset,f=t.byteStride,d=Y.getSizeInBytes(a),p=o*d,g=!l(f)||f===p;if(l(t.typedArray))return t.typedArray;if(g){let S=Y.createTypedArray(a,r);return c.getBufferData(S,u),S}let A=new Uint8Array(c.sizeInBytes);c.getBufferData(A);let y=Y.createTypedArray(a,r),x=f??p,b=new DataView(A.buffer,A.byteOffset,A.byteLength),C=new Array(o),E=e.createComponentsReader(a);for(let S=0;S<i;++S){let w=u+S*x;E(b,w,o,C);for(let P=0;P<o;++P)y[S*o+P]=C[P]}return y}static dequantize(t,n,i,o){if(o.octEncoded){let s=e.octDecode(t,n,o.normalizationRange,void 0);return o.octEncodedZXY&&e.convertZxyToXyz(s,s),s}let r=o.quantizedVolumeStepSize,a=o.quantizedVolumeOffset;if(i===Ft.SCALAR)return e.dequantize1D(t,n,r,a,void 0);if(i===Ft.VEC2)return e.dequantize2D(t,n,r,a,void 0);if(i===Ft.VEC3)return e.dequantize3D(t,n,r,a,void 0);if(i===Ft.VEC4)return e.dequantize4D(t,n,r,a,void 0);throw new _e(`Element type for dequantization must be SCALAR, VEC2, VEC3, or VEC4, but is ${i}`)}static octDecode(t,n,i,o){l(o)||(o=new Float32Array(t.length));let r=new h;for(let a=0;a<n;a++)h.unpack(t,a*3,r),nn.octDecodeInRange(r.x,r.y,i,r),h.pack(r,o,a*3);return o}static convertZxyToXyz(t,n,i){l(i)||(i=new Float32Array(t.length));let o=0;for(let r=0;r<n;r++,o+=3){let a=t[o+0],s=t[o+1],c=t[o+2];i[o+0]=s,i[o+1]=c,i[o+2]=a}return i}static dequantize1D(t,n,i,o,r){l(r)||(r=new Float32Array(t.length));for(let a=0;a<n;a++){let c=t[a]*i+o;r[a]=c}return r}static dequantize2D(t,n,i,o,r){l(r)||(r=new Float32Array(t.length));let a=new z;for(let s=0;s<n;s++)z.unpack(t,s*2,a),z.multiplyComponents(a,i,a),z.add(a,o,a),z.pack(a,r,s*2);return r}static dequantize3D(t,n,i,o,r){l(r)||(r=new Float32Array(t.length));let a=new h;for(let s=0;s<n;s++)h.unpack(t,s*3,a),h.multiplyComponents(a,i,a),h.add(a,o,a),h.pack(a,r,s*3);return r}static dequantize4D(t,n,i,o,r){l(r)||(r=new Float32Array(t.length));let a=new se;for(let s=0;s<n;s++)se.unpack(t,s*4,a),se.multiplyComponents(a,i,a),se.add(a,o,a),se.pack(a,r,s*4);return r}static createComponentsReader(t){let n=e.createComponentReader(t),i=Y.getSizeInBytes(t);return function(o,r,a,s){let c=r;for(let u=0;u<a;++u)s[u]=n(o,c),c+=i}}static createComponentReader(t){switch(t){case Y.BYTE:return function(n,i){return n.getInt8(i)};case Y.UNSIGNED_BYTE:return function(n,i){return n.getUint8(i)};case Y.SHORT:return function(n,i){return n.getInt16(i,!0)};case Y.UNSIGNED_SHORT:return function(n,i){return n.getUint16(i,!0)};case Y.INT:return function(n,i){return n.getInt32(i,!0)};case Y.UNSIGNED_INT:return function(n,i){return n.getUint32(i,!0)};case Y.FLOAT:return function(n,i){return n.getFloat32(i,!0)};case Y.DOUBLE:return function(n,i){return n.getFloat64(i,!0)}}throw new _e(`The componentType must be a valid ComponentDatatype, but is ${t}`)}static transform3D(t,n,i){l(i)||(i=new Float32Array(t.length));let o=new h,r=t.length/3;for(let a=0;a<r;a++)h.unpack(t,a*3,o),M.multiplyByPoint(n,o,o),h.pack(o,i,a*3);return i}static readImplicitRangeAsTypedArray(t,n){let i=n.attributes[0]?.count??0,o=t.offset,r=t.repeat,a=new Float32Array(i);if(l(r))for(let s=0;s<i;s++)a[s]=o+Math.floor(s/r);else a.fill(o);return a}static readIndicesAsTypedArray(t){let n=t.typedArray;if(l(n))return n;let i=t.buffer,o=t.count,r=t.indexDatatype,a=e.createIndexTypedArray(r,o);return i.getBufferData(a),a}static readIndicesAsTriangleIndicesTypedArray(t,n){let i=e.readIndicesAsTypedArray(t);if(n===Re.TRIANGLES)return i;if(n===Re.TRIANGLE_STRIP)return e.convertTriangleStripToTriangleIndices(i);if(n===Re.TRIANGLE_FAN)return e.convertTriangleFanToTriangleIndices(i);throw new _e(`The primitiveType must be TRIANGLES (${Re.TRIANGLES}, TRIANGLE_STRIP (${Re.TRIANGLE_STRIP}, or TRIANGLE_FAN (${Re.TRIANGLE_FAN}, but is ${n}`)}static convertTriangleStripToTriangleIndices(t){let n=t.constructor((t.length-2)*3);for(let i=0;i<t.length-2;i++)i%2===1?(n[i*3+0]=t[i+0],n[i*3+1]=t[i+2],n[i*3+2]=t[i+1]):(n[i*3+0]=t[i+0],n[i*3+1]=t[i+1],n[i*3+2]=t[i+2]);return n}static convertTriangleFanToTriangleIndices(t){let n=t.constructor((t.length-2)*3);for(let i=0;i<t.length-2;i++)n[i*3+0]=t[i+0],n[i*3+1]=t[i+1],n[i*3+2]=t[i+2];return n}static createIndexTypedArray(t,n){switch(t){case Ue.UNSIGNED_BYTE:return new Uint8Array(n);case Ue.UNSIGNED_SHORT:return new Uint16Array(n);case Ue.UNSIGNED_INT:return new Uint32Array(n)}throw new _e(`The indexDatatype must be UNSIGNED_BYTE (${Ue.UNSIGNED_BYTE}, UNSIGNED_SHORT (${Ue.UNSIGNED_SHORT}, or UNSIGNED_INT (${Ue.UNSIGNED_INT}, but is ${t}`)}static forEachPrimitive(t,n,i){let o=n?.mapProjection,r=n?.instanceFeatureIdLabel,a=t.sceneGraph;if(!l(a))return;let s={nodeComputedTransform:new M,modelMatrix:new M,computedModelMatrix:new M},c=a._runtimeNodes,u=c.length;for(let f=0;f<u;f++){let d=c[f],p=e.computeNodeTransforms(d,a,t,s),g=p.computedModelMatrix;l(o)&&(g=pt.basisTo2D(o,g,g));let m=e.computeInstanceTransforms(d,g,p.nodeComputedTransform,p.modelMatrix),A=l(r)?e.computeInstanceFeatureIds(d,r):void 0,y=[];for(let b=0;b<m.length;b++)y.push({transform:m[b],featureId:l(A)?A[b]:void 0});let x=d.runtimePrimitives.length;for(let b=0;b<x;b++){let C=d.runtimePrimitives[b];i(C,C.primitive,y,g)}}}static computeNodeTransforms(t,n,i,o){let r=t.node,a=M.clone(t.computedTransform,o.nodeComputedTransform),s=M.clone(n.computedModelMatrix,o.modelMatrix),c=r.instances;l(c)&&c.transformInWorldSpace&&(s=M.multiplyTransformation(i.modelMatrix,n.components.transform,s),a=M.multiplyTransformation(n.axisCorrectionMatrix,t.computedTransform,a));let u=M.multiplyTransformation(s,a,o.computedModelMatrix);return o.computedModelMatrix=u,o.nodeComputedTransform=a,o.modelMatrix=s,o}static computeInstanceTransforms(t,n,i,o){let r=[],s=t.node.instances;if(l(s)){let c=s.attributes[0].count,u=s.attributes[0].componentDatatype,f=12,d=t.transformsTypedArray;if(!l(d)){let p=t.instancingTransformsBuffer;l(p)&&(d=Y.createTypedArray(u,c*f),p.getBufferData(d))}l(d)?e.computeInstanceTransformsFromTypedArray(d,c,r):e.computeInstanceTransformsFromAttributes(s,c,r);for(let p=0;p<r.length;p++){let g=r[p];s.transformInWorldSpace?(M.multiplyTransformation(g,i,g),M.multiplyTransformation(o,g,g)):M.multiplyTransformation(n,g,g)}}return r.length===0&&r.push(n),r}static computeInstanceFeatureIds(t,n){let o=t.node.instances;if(!l(o))return;let r=ht.getFeatureIdsByLabel(o.featureIds,n);if(!l(r))return;let a;if("setIndex"in r){let c=ht.getAttributeBySemantic(o,it.FEATURE_ID,r.setIndex);l(c)&&(a=e.readAttributeAsTypedArray(c))}if("offset"in r&&(a=e.readImplicitRangeAsTypedArray(r,o)),!l(a))return;let s=new Array(a.length);for(let c=0;c<a.length;c++)s[c]=a[c];return s}static computeInstanceTransformsFromTypedArray(t,n,i){for(let r=0;r<n;r++){let a=r*12,s=new M(t[a],t[a+1],t[a+2],t[a+3],t[a+4],t[a+5],t[a+6],t[a+7],t[a+8],t[a+9],t[a+10],t[a+11],0,0,0,1);i.push(s)}}static computeInstanceTransformsFromAttributes(t,n,i){let o=ht.getAttributeBySemantic(t,Er.TRANSLATION),r=ht.getAttributeBySemantic(t,Er.ROTATION),a=ht.getAttributeBySemantic(t,Er.SCALE),s=l(o),c=l(r),u=l(a);if(!s&&!c&&!u)return;let f,d,p;s&&(f=e.readAttributeAsRawCompactTypedArray(o)),c&&(d=e.readAttributeAsRawCompactTypedArray(r)),u&&(p=e.readAttributeAsRawCompactTypedArray(a));for(let g=0;g<n;g++){let m=s?new h(f[g*3],f[g*3+1],f[g*3+2]):h.ZERO,A=c?new Le(d[g*4],d[g*4+1],d[g*4+2],d[g*4+3]):Le.IDENTITY,y=u?new h(p[g*3],p[g*3+1],p[g*3+2]):h.ONE,x=M.fromTranslationQuaternionRotationScale(m,A,y,new M);i.push(x)}}},hs=oK;var jv=Object.freeze({HIDDEN:0,SILHOUETTE:1,HARD:2,REPEATED_HARD:3}),bpe={name:"EdgeVisibilityPipelineStage"};bpe.process=function(e,t,n){if(!l(t.edgeVisibility))return;n.edgeVisibilityRequested=!0;let i=e.shaderBuilder;i.addDefine("HAS_EDGE_VISIBILITY",void 0,he.BOTH),i.addDefine("HAS_EDGE_VISIBILITY_MRT",void 0,he.FRAGMENT),i.addFragmentLines(JB),i.addVertexLines(ZB),i.addUniform("bool","u_isEdgePass",he.BOTH);let o=t.material,r=l(o)?o.lineStyle:void 0;(!l(r)||!l(r.width))&&i.addUniform("float","u_lineWidth",he.VERTEX);let a=i.addAttribute("float","a_edgeType");i.addVarying("float","v_edgeType","flat");let s=i.addAttribute("float","a_edgeFeatureId"),c=i.addAttribute("vec3","a_faceNormalA"),u=i.addAttribute("vec3","a_faceNormalB");i.addVarying("vec3","v_faceNormalAView","flat"),i.addVarying("vec3","v_faceNormalBView","flat"),i.addVarying("float","v_shouldDiscard","flat");let f=i.addAttribute("vec3","a_edgeOtherPos"),d=i.addAttribute("float","a_edgeOffset");i.addVarying("float","v_edgeOffset");let p=EQe(t);if(!l(p)||!l(p.edgeIndices)||p.edgeIndices.length===0)return;let g=e.runtimePrimitive.primitive,m=vQe(g),y=p.edgeData.some(function(R){return l(R.color)})||l(m),x;y&&(x=i.addAttribute("vec4","a_edgeColor"),i.addVarying("vec4","v_edgeColor","flat"),i.addDefine("HAS_EDGE_COLOR_ATTRIBUTE",void 0,he.BOTH));let b,C,E=ht.getAttributeBySemantic(t,"BENTLEY_materials_line_style:CUMULATIVE_DISTANCE");l(E)&&(b=E,C=i.addAttribute("float","a_edgeCumulativeDistance"),i.addDefine("HAS_EDGE_CUMULATIVE_DISTANCE",void 0,he.VERTEX));let S=TQe(p.edgeIndices,p.edgeData,t.edgeVisibility),w=SQe(p.edgeIndices,p.edgeData,e,n.context,a,c,u,s,x,f,d,m,t.edgeVisibility,S,b,C);if(!l(w))return;w.hasEdgeFeatureIds&&i.addDefine("HAS_EDGE_FEATURE_ID",void 0,he.BOTH),e.uniformMap.u_isEdgePass=function(){return!1},l(e.uniformMap.u_lineWidth)||(e.uniformMap.u_lineWidth=function(){return 1}),l(b)&&(l(e.uniformMap.u_pixelsPerWorld)||(e.uniformMap.u_pixelsPerWorld=function(){return 1}));let P=l(r)&&l(r.width)?r.width*n.pixelRatio:void 0;e.edgeGeometry={vertexArray:w.vertexArray,indexCount:w.indexCount,primitiveType:Re.TRIANGLES,pass:Ie.CESIUM_3D_TILE_EDGES,lineWidth:P}};function TQe(e,t,n){let i=e.length/2,o=new Float32Array(i*6),r=n.silhouetteNormals;if(!l(r))return o;let a=new Float32Array(r.length*3),s=new h;for(let c=0;c<r.length;c++){let u=r[c];s.x=2*((u.x+128)/255)-1,s.y=2*((u.y+128)/255)-1,s.z=2*((u.z+128)/255)-1,h.magnitudeSquared(s)>0?h.normalize(s,s):(s.x=0,s.y=0,s.z=1),a[c*3]=s.x,a[c*3+1]=s.y,a[c*3+2]=s.z}for(let c=0;c<i;c++){let{edgeType:u,silhouetteEdgeIndex:f}=t[c];if(u!==jv.SILHOUETTE||f<0)continue;let d=f*2;if((d+1)*3+2>=a.length)continue;let p=d*3,g=(d+1)*3,m=c*6;o[m]=a[p],o[m+1]=a[p+1],o[m+2]=a[p+2],o[m+3]=a[g],o[m+4]=a[g+1],o[m+5]=a[g+2]}return o}function EQe(e){let t=e.edgeVisibility;if(!l(t))return[];let n=t.visibility,i=e.indices,o=t.lineStrings,r=e.attributes,a=l(r)&&r.length>0?r[0].count:0,s=l(n)&&l(i)&&l(i.typedArray)&&i.typedArray.length>0,c=l(o)&&o.length>0;if(!s&&!c)return[];let u=s?i.typedArray:void 0,f=[],d=[],p=new Set,g=0,m=t.materialColor;if(s){let A=0,y=u.length,x=n;for(let b=0;b+2<y;b+=3){let C=u[b],E=u[b+1],S=u[b+2];for(let w=0;w<3;w++){let P,R;w===0?(P=C,R=E):w===1?(P=E,R=S):(P=S,R=C);let B=Math.floor(A/4),L=A%4*2;if(A++,B>=x.length)break;let T=x[B]>>L&3;if(T===jv.HIDDEN)continue;let v=Math.min(P,R),I=Math.max(P,R),O=`${v},${I}`;if(p.has(O))continue;p.add(O),f.push(P,R);let N=-1;T===jv.SILHOUETTE&&(N=g,g++),d.push({edgeType:T===jv.REPEATED_HARD?jv.HARD:T,silhouetteEdgeIndex:N,color:m})}}}if(c)for(let A=0;A<o.length;A++){let y=o[A];if(!l(y)||!l(y.indices))continue;let x=y.indices;if(!l(x)||x.length<2)continue;let b=y.restartIndex,C=l(y.materialColor)?y.materialColor:m,E;for(let S=0;S<x.length;S++){let w=x[S];if(l(b)&&w===b){E=void 0;continue}if(!l(E)){E=w;continue}let P=E,R=w;if(E=w,P===R||a>0&&(P<0||P>=a||R<0||R>=a))continue;let B=Math.min(P,R),L=Math.max(P,R),_=`${B},${L}`;p.has(_)||(p.add(_),f.push(P,R),d.push({edgeType:jv.HARD,silhouetteEdgeIndex:-1,color:l(C)?C:void 0}))}}return{edgeIndices:f,edgeData:d,silhouetteEdgeCount:g}}function vQe(e){if(!l(e))return;let t=ht.getAttributeBySemantic(e,it.COLOR);if(!l(t))return;let n=Ft.getNumberOfComponents(t.type);if(n!==3&&n!==4)return;let i=t.typedArray;if(l(i)||(i=hs.readAttributeAsTypedArray(t)),!l(i))return;let o=t.count;if(!l(o)||o===0||i.length<o*n)return;let r=i instanceof Float32Array||i instanceof Float64Array,a=i instanceof Uint8Array,s=i instanceof Uint16Array;if(!r&&!a&&!s)return;let c=new Float32Array(o*4),u=function(f){let d;return r?d=f:a?d=f/255:s&&(d=f/65535),Math.min(Math.max(d,0),1)};for(let f=0;f<o;f++){let d=f*n,p=f*4;c[p]=u(i[d]),c[p+1]=u(i[d+1]),c[p+2]=u(i[d+2]),n===4?c[p+3]=u(i[d+3]):c[p+3]=1}return{colors:c,count:o}}function SQe(e,t,n,i,o,r,a,s,c,u,f,d,p,g,m,A){if(!l(e)||e.length===0)return;let y=t.length,b=y*4,C=0,E=ht.getAttributeBySemantic(n.runtimePrimitive.primitive,it.POSITION),S=l(E.typedArray)?E.typedArray:hs.readAttributeAsTypedArray(E),w=new Float32Array(b*3),P=new Float32Array(b),R=new Float32Array(b*3),B=new Float32Array(b*3),L=new Float32Array(b*3),_=new Float32Array(b),T=l(m),v=T?new Float32Array(b):void 0,I;T&&(I=l(m.typedArray)?m.typedArray:hs.readAttributeAsTypedArray(m));let O=l(c),N=O?new Float32Array(b*4):void 0,j=l(d)?d.colors:void 0,k=l(d)?d.count:0;function U(et){if(!O)return;let Pe=et*4;N[Pe]=0,N[Pe+1]=0,N[Pe+2]=0,N[Pe+3]=-1}function F(et,Pe){if(!O)return;let Ye=et*4,ut=l(Pe.x)?Pe.x:Pe[0],Tt=l(Pe.y)?Pe.y:Pe[1],tn=l(Pe.z)?Pe.z:Pe[2],Ht=l(Pe.w)?Pe.w:l(Pe[3])?Pe[3]:1;N[Ye]=ut,N[Ye+1]=Tt,N[Ye+2]=tn,N[Ye+3]=Ht}function H(et,Pe){if(!O)return;if(Pe>=k){U(et);return}let Ye=Pe*4,ut=et*4;N[ut]=j[Ye],N[ut+1]=j[Ye+1],N[ut+2]=j[Ye+2],N[ut+3]=j[Ye+3]}for(let et=0;et<y;et++){let Pe=e[et*2],Ye=e[et*2+1],Tt=t[et].edgeType/255,tn=S[Pe*3],Ht=S[Pe*3+1],xt=S[Pe*3+2],Pt=S[Ye*3],bn=S[Ye*3+1],at=S[Ye*3+2],st=et*4;w[st*3]=tn,w[st*3+1]=Ht,w[st*3+2]=xt,L[st*3]=Pt,L[st*3+1]=bn,L[st*3+2]=at,_[st]=-1,P[st]=Tt,w[(st+1)*3]=tn,w[(st+1)*3+1]=Ht,w[(st+1)*3+2]=xt,L[(st+1)*3]=Pt,L[(st+1)*3+1]=bn,L[(st+1)*3+2]=at,_[st+1]=1,P[st+1]=Tt,w[(st+2)*3]=Pt,w[(st+2)*3+1]=bn,w[(st+2)*3+2]=at,L[(st+2)*3]=tn,L[(st+2)*3+1]=Ht,L[(st+2)*3+2]=xt,_[st+2]=1,P[st+2]=Tt,w[(st+3)*3]=Pt,w[(st+3)*3+1]=bn,w[(st+3)*3+2]=at,L[(st+3)*3]=tn,L[(st+3)*3+1]=Ht,L[(st+3)*3+2]=xt,_[st+3]=-1,P[st+3]=Tt;let Ln=t[et].color;if(l(Ln))for(let cn=0;cn<4;cn++)F(st+cn,Ln);else if(l(j))for(let cn=0;cn<4;cn++)H(st+cn,Pe);else for(let cn=0;cn<4;cn++)U(st+cn);if(T){let cn=I[Pe],Jn=I[Ye];v[st]=cn,v[st+1]=cn,v[st+2]=Jn,v[st+3]=Jn}let Nn=et*6,uo=g[Nn],Yo=g[Nn+1],oo=g[Nn+2],ro=g[Nn+3],Xn=g[Nn+4],Kn=g[Nn+5];for(let cn=0;cn<4;cn++)R[(st+cn)*3]=uo,R[(st+cn)*3+1]=Yo,R[(st+cn)*3+2]=oo,B[(st+cn)*3]=ro,B[(st+cn)*3+1]=Xn,B[(st+cn)*3+2]=Kn}let q=Ke.createVertexBuffer({context:i,typedArray:w,usage:Oe.STATIC_DRAW}),J=Ke.createVertexBuffer({context:i,typedArray:P,usage:Oe.STATIC_DRAW}),W=Ke.createVertexBuffer({context:i,typedArray:R,usage:Oe.STATIC_DRAW}),Z=Ke.createVertexBuffer({context:i,typedArray:B,usage:Oe.STATIC_DRAW}),K=Ke.createVertexBuffer({context:i,typedArray:L,usage:Oe.STATIC_DRAW}),le=Ke.createVertexBuffer({context:i,typedArray:_,usage:Oe.STATIC_DRAW}),me=O?Ke.createVertexBuffer({context:i,typedArray:N,usage:Oe.STATIC_DRAW}):void 0,ae=T?Ke.createVertexBuffer({context:i,typedArray:v,usage:Oe.STATIC_DRAW}):void 0,ge=y*2*3,we=b>65534,Ee=we?new Uint32Array(ge):new Uint16Array(ge);for(let et=0;et<y;et++){let Pe=et*4,Ye=et*6;Ee[Ye]=Pe,Ee[Ye+1]=Pe+1,Ee[Ye+2]=Pe+2,Ee[Ye+3]=Pe,Ee[Ye+4]=Pe+2,Ee[Ye+5]=Pe+3}let Be=Ke.createIndexBuffer({context:i,typedArray:Ee,usage:Oe.STATIC_DRAW,indexDatatype:we?Ue.UNSIGNED_INT:Ue.UNSIGNED_SHORT}),ke=[{index:C,vertexBuffer:q,componentsPerAttribute:3,componentDatatype:Y.FLOAT,normalize:!1},{index:o,vertexBuffer:J,componentsPerAttribute:1,componentDatatype:Y.FLOAT,normalize:!1},{index:r,vertexBuffer:W,componentsPerAttribute:3,componentDatatype:Y.FLOAT,normalize:!1},{index:a,vertexBuffer:Z,componentsPerAttribute:3,componentDatatype:Y.FLOAT,normalize:!1},{index:u,vertexBuffer:K,componentsPerAttribute:3,componentDatatype:Y.FLOAT,normalize:!1},{index:f,vertexBuffer:le,componentsPerAttribute:1,componentDatatype:Y.FLOAT,normalize:!1}];O&&ke.push({index:c,vertexBuffer:me,componentsPerAttribute:4,componentDatatype:Y.FLOAT,normalize:!1}),T&&ke.push({index:A,vertexBuffer:ae,componentsPerAttribute:1,componentDatatype:Y.FLOAT,normalize:!1});let Ge=n.runtimePrimitive.primitive;if(l(Ge.featureIds)&&Ge.featureIds.length>0){let et=Ge.featureIds[0];if(l(et.setIndex)){let Pe=Ge.attributes.find(Ye=>Ye.semantic===it.FEATURE_ID&&Ye.setIndex===et.setIndex);if(l(Pe)){let Ye=l(Pe.typedArray)?Pe.typedArray:hs.readAttributeAsTypedArray(Pe),ut=new Float32Array(b);for(let tn=0;tn<y;tn++){let Ht=e[tn*2],xt=Ht<Ye.length?Ye[Ht]:0;for(let Pt=0;Pt<4;Pt++)ut[tn*4+Pt]=xt}let Tt=Ke.createVertexBuffer({context:i,typedArray:ut,usage:Oe.STATIC_DRAW});ke.push({index:s,vertexBuffer:Tt,componentsPerAttribute:1,componentDatatype:Y.FLOAT,normalize:!1})}}}return{vertexArray:new Fn({context:i,attributes:ke,indexBuffer:Be}),indexCount:ge,hasEdgeFeatureIds:l(Ge.featureIds)&&Ge.featureIds.length>0}}var eL=bpe;var tL=`void geometryStage(out ProcessedAttributes attributes)
- {
- attributes.positionMC = v_positionMC;
- attributes.positionEC = v_positionEC;
-
- #if defined(COMPUTE_POSITION_WC_CUSTOM_SHADER) || defined(COMPUTE_POSITION_WC_STYLE) || defined(COMPUTE_POSITION_WC_ATMOSPHERE)
- attributes.positionWC = v_positionWC;
- #endif
-
- #ifdef HAS_NORMALS
- // renormalize after interpolation
- attributes.normalEC = normalize(v_normalEC);
- #endif
-
- #ifdef HAS_TANGENTS
- attributes.tangentEC = normalize(v_tangentEC);
- #endif
-
- #ifdef HAS_BITANGENTS
- attributes.bitangentEC = normalize(v_bitangentEC);
- #endif
-
- // Everything else is dynamically generated in GeometryPipelineStage
- setDynamicVaryings(attributes);
- }
- `;var nL=`vec4 geometryStage(inout ProcessedAttributes attributes, mat4 modelView, mat3 normal)
- {
- vec4 computedPosition;
-
- // Compute positions in different coordinate systems
- vec3 positionMC = attributes.positionMC;
- v_positionMC = positionMC;
- v_positionEC = (modelView * vec4(positionMC, 1.0)).xyz;
-
- #if defined(USE_2D_POSITIONS) || defined(USE_2D_INSTANCING)
- vec3 position2D = attributes.position2D;
- vec3 positionEC = (u_modelView2D * vec4(position2D, 1.0)).xyz;
- computedPosition = czm_projection * vec4(positionEC, 1.0);
- #else
- computedPosition = czm_projection * vec4(v_positionEC, 1.0);
- #endif
-
- // Sometimes the custom shader and/or style needs this
- #if defined(COMPUTE_POSITION_WC_CUSTOM_SHADER) || defined(COMPUTE_POSITION_WC_STYLE) || defined(COMPUTE_POSITION_WC_ATMOSPHERE) || defined(ENABLE_CLIPPING_POLYGONS)
- // Note that this is a 32-bit position which may result in jitter on small
- // scales.
- v_positionWC = (czm_model * vec4(positionMC, 1.0)).xyz;
- #endif
-
- #ifdef HAS_NORMALS
- v_normalEC = normalize(normal * attributes.normalMC);
- #endif
-
- #ifdef HAS_TANGENTS
- v_tangentEC = normalize(normal * attributes.tangentMC);
- #endif
-
- #ifdef HAS_BITANGENTS
- v_bitangentEC = normalize(normal * attributes.bitangentMC);
- #endif
-
- // All other varyings need to be dynamically generated in
- // GeometryPipelineStage
- setDynamicVaryings(attributes);
-
- return computedPosition;
- }
- `;var Gv=`vec2 computeSt(float featureId)
- {
- float stepX = model_textureStep.x;
- float centerX = model_textureStep.y;
-
- #ifdef MULTILINE_BATCH_TEXTURE
- float stepY = model_textureStep.z;
- float centerY = model_textureStep.w;
-
- float xId = mod(featureId, model_textureDimensions.x);
- float yId = floor(featureId / model_textureDimensions.x);
-
- return vec2(centerX + (xId * stepX), centerY + (yId * stepY));
- #else
- return vec2(centerX + (featureId * stepX), 0.5);
- #endif
- }
-
- void selectedFeatureIdStage(out SelectedFeature feature, FeatureIds featureIds)
- {
- int featureId = featureIds.SELECTED_FEATURE_ID;
-
-
- if (featureId < model_featuresLength)
- {
- vec2 featureSt = computeSt(float(featureId));
-
- feature.id = featureId;
- feature.st = featureSt;
- feature.color = texture(model_batchTexture, featureSt);
- }
- // Floating point comparisons can be unreliable in GLSL, so we
- // increment the feature ID to make sure it's always greater
- // then the model_featuresLength - a condition we check for in the
- // pick ID, to avoid sampling the pick texture if the feature ID is
- // greater than the number of features.
- else
- {
- feature.id = model_featuresLength + 1;
- feature.st = vec2(0.0);
- feature.color = vec4(1.0);
- }
-
- #ifdef HAS_NULL_FEATURE_ID
- if (featureId == model_nullFeatureId) {
- feature.id = featureId;
- feature.st = vec2(0.0);
- feature.color = vec4(1.0);
- }
- #endif
- }
- `;var iL={name:"SelectedFeatureIdPipelineStage",STRUCT_ID_SELECTED_FEATURE:"SelectedFeature",STRUCT_NAME_SELECTED_FEATURE:"SelectedFeature"};iL.process=function(e,t,n){let i=e.shaderBuilder;e.hasPropertyTable=!0;let o=e.model,r=e.runtimeNode.node,a=wQe(o,r,t),s=a.shaderDestination;i.addDefine("HAS_SELECTED_FEATURE_ID",void 0,s),i.addDefine("SELECTED_FEATURE_ID",a.variableName,s),i.addDefine(a.featureIdDefine,void 0,s),IQe(i);let c=a.featureIds.nullFeatureId,u=e.uniformMap;l(c)&&(i.addDefine("HAS_NULL_FEATURE_ID",void 0,s),i.addUniform("int","model_nullFeatureId",s),u.model_nullFeatureId=function(){return c}),a.shaderDestination===he.BOTH&&i.addVertexLines(Gv),i.addFragmentLines(Gv)};function Cpe(e){return e instanceof _n.FeatureIdTexture?"HAS_SELECTED_FEATURE_ID_TEXTURE":"HAS_SELECTED_FEATURE_ID_ATTRIBUTE"}function Tpe(e){return e instanceof _n.FeatureIdTexture?he.FRAGMENT:he.BOTH}function wQe(e,t,n){let i,o;return l(t.instances)&&(o=ht.getFeatureIdsByLabel(t.instances.featureIds,e.instanceFeatureIdLabel),l(o))?(i=o.label??o.positionalLabel,{featureIds:o,variableName:i,shaderDestination:Tpe(o),featureIdDefine:Cpe(o)}):(o=ht.getFeatureIdsByLabel(n.featureIds,e.featureIdLabel),i=o.label??o.positionalLabel,{featureIds:o,variableName:i,shaderDestination:Tpe(o),featureIdDefine:Cpe(o)})}function IQe(e){e.addStructField(iL.STRUCT_ID_SELECTED_FEATURE,"int","id"),e.addStructField(iL.STRUCT_ID_SELECTED_FEATURE,"vec2","st"),e.addStructField(iL.STRUCT_ID_SELECTED_FEATURE,"vec4","color")}var jA=iL;var Fs={name:"GeometryPipelineStage",STRUCT_ID_PROCESSED_ATTRIBUTES_VS:"ProcessedAttributesVS",STRUCT_ID_PROCESSED_ATTRIBUTES_FS:"ProcessedAttributesFS",STRUCT_NAME_PROCESSED_ATTRIBUTES:"ProcessedAttributes",FUNCTION_ID_INITIALIZE_ATTRIBUTES:"initializeAttributes",FUNCTION_SIGNATURE_INITIALIZE_ATTRIBUTES:"void initializeAttributes(out ProcessedAttributes attributes)",FUNCTION_ID_SET_DYNAMIC_VARYINGS_VS:"setDynamicVaryingsVS",FUNCTION_ID_SET_DYNAMIC_VARYINGS_FS:"setDynamicVaryingsFS",FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS:"void setDynamicVaryings(inout ProcessedAttributes attributes)"};Fs.process=function(e,t,n){let{shaderBuilder:i,model:o}=e;i.addStruct(Fs.STRUCT_ID_PROCESSED_ATTRIBUTES_VS,"ProcessedAttributes",he.VERTEX),i.addStruct(Fs.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,"ProcessedAttributes",he.FRAGMENT),i.addStruct(jA.STRUCT_ID_SELECTED_FEATURE,jA.STRUCT_NAME_SELECTED_FEATURE,he.BOTH),i.addFunction(Fs.FUNCTION_ID_INITIALIZE_ATTRIBUTES,Fs.FUNCTION_SIGNATURE_INITIALIZE_ATTRIBUTES,he.VERTEX),i.addVarying("vec3","v_positionWC"),i.addVarying("vec3","v_positionEC"),i.addStructField(Fs.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,"vec3","positionWC"),i.addStructField(Fs.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,"vec3","positionEC"),i.addFunction(Fs.FUNCTION_ID_SET_DYNAMIC_VARYINGS_VS,Fs.FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS,he.VERTEX),i.addFunction(Fs.FUNCTION_ID_SET_DYNAMIC_VARYINGS_FS,Fs.FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS,he.FRAGMENT),o.type===Br.TILE_PNTS&&i.addDefine("HAS_SRGB_COLOR",void 0,he.FRAGMENT);let r=n.mode!==ie.SCENE3D&&!n.scene3DOnly&&o._projectTo2D,a=l(e.runtimeNode.node.instances),s=r&&!a,c=t.attributes.length;for(let u=0;u<c;u++){let f=t.attributes[u],d=Ft.getAttributeLocationCount(f.type),p=f.semantic===it.POSITION,g;d>1?(g=e.attributeIndex,e.attributeIndex+=d):p&&!s?g=0:g=e.attributeIndex++;let m=!p&&t.primitiveType===Re.POINTS&&n.context.webgl2?"flat":void 0;DQe(e,f,g,d,r,a,m)}kQe(i,t.attributes),t.primitiveType===Re.POINTS&&i.addDefine("PRIMITIVE_TYPE_POINTS"),i.addVertexLines(nL),i.addFragmentLines(tL)};function DQe(e,t,n,i,o,r,a){let s=e.shaderBuilder,c=ht.getAttributeInfo(t),u=o&&!r;i>1?OQe(e,t,n,i):RQe(e,t,n,u),BQe(s,c,u),MQe(s,c,a),l(t.semantic)&&PQe(s,t),LQe(s,c,o),NQe(s,c,u),FQe(s,c)}function PQe(e,t){let{semantic:n,setIndex:i}=t;switch(n){case it.NORMAL:e.addDefine("HAS_NORMALS");break;case it.TANGENT:e.addDefine("HAS_TANGENTS");break;case it.FEATURE_ID:e.addDefine(`HAS${n}_${i}`);break;case it.TEXCOORD:case it.COLOR:e.addDefine(`HAS_${n}_${i}`)}}function RQe(e,t,n,i){let{quantization:o,semantic:r,setIndex:a}=t,{type:s,componentDatatype:c}=l(o)?o:t;r===it.FEATURE_ID&&a>=e.featureIdVertexAttributeSetIndex&&(e.featureIdVertexAttributeSetIndex=a+1);let u=r===it.POSITION,f=u?0:n,d=Ft.getNumberOfComponents(s),p={index:f,value:l(t.buffer)?void 0:t.constant,vertexBuffer:t.buffer,count:t.count,componentsPerAttribute:d,componentDatatype:c,offsetInBytes:t.byteOffset,strideInBytes:t.byteStride,normalize:t.normalized};if(e.attributes.push(p),!u||!i)return;let g=e.runtimePrimitive.positionBuffer2D,m={index:n,vertexBuffer:g,count:t.count,componentsPerAttribute:d,componentDatatype:Y.FLOAT,offsetInBytes:0,strideInBytes:void 0,normalize:t.normalized};e.attributes.push(m)}function OQe(e,t,n,i){let{quantization:o,normalized:r}=t,{type:a,componentDatatype:s}=l(o)?o:t,u=Ft.getNumberOfComponents(a)/i,f=Y.getSizeInBytes(s),d=u*f,p=t.byteStride;for(let g=0;g<i;g++){let m=t.byteOffset+g*d,A={index:n+g,vertexBuffer:t.buffer,componentsPerAttribute:u,componentDatatype:s,offsetInBytes:m,strideInBytes:p,normalize:r};e.attributes.push(A)}}function MQe(e,t,n){let i=t.variableName,o=`v_${i}`,r;i==="normalMC"?(o="v_normalEC",r=t.glslType):i==="tangentMC"?(r="vec3",o="v_tangentEC"):r=t.glslType,e.addVarying(r,o,n)}function BQe(e,t,n){let i=t.attribute.semantic,o=t.variableName,r,a;t.isQuantized?(r=`a_quantized_${o}`,a=t.quantizedGlslType):(r=`a_${o}`,a=t.glslType);let s=i===it.POSITION;s?e.setPositionAttribute(a,r):e.addAttribute(a,r),s&&n&&e.addAttribute("vec3","a_position2D")}function LQe(e,t,n){let i=Fs.STRUCT_ID_PROCESSED_ATTRIBUTES_VS,o=Fs.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,{variableName:r,glslType:a}=t;r==="tangentMC"?(e.addStructField(i,"vec3","tangentMC"),e.addStructField(i,"float","tangentSignMC"),e.addStructField(o,"vec3","tangentEC")):r==="normalMC"?(e.addStructField(i,"vec3","normalMC"),e.addStructField(o,"vec3","normalEC")):(e.addStructField(i,a,r),e.addStructField(o,a,r)),r==="positionMC"&&n&&e.addStructField(i,"vec3","position2D")}function NQe(e,t,n){let i=Fs.FUNCTION_ID_INITIALIZE_ATTRIBUTES,o=t.variableName;if(o==="positionMC"&&n&&e.addFunctionLines(i,["attributes.position2D = a_position2D;"]),t.isQuantized)return;let a=[];o==="tangentMC"?(a.push("attributes.tangentMC = a_tangentMC.xyz;"),a.push("attributes.tangentSignMC = a_tangentMC.w;")):a.push(`attributes.${o} = a_${o};`),e.addFunctionLines(i,a)}function FQe(e,t){let{semantic:n,setIndex:i}=t.attribute;if(l(n)&&!l(i))return;let o=Fs.FUNCTION_ID_SET_DYNAMIC_VARYINGS_VS,r=t.variableName,a=`v_${r} = attributes.${r};`;e.addFunctionLines(o,[a]),o=Fs.FUNCTION_ID_SET_DYNAMIC_VARYINGS_FS,a=`attributes.${r} = v_${r};`,e.addFunctionLines(o,[a])}function kQe(e,t){let n=!1,i=!1;for(let o=0;o<t.length;o++){let r=t[o];r.semantic===it.NORMAL?n=!0:r.semantic===it.TANGENT&&(i=!0)}!n||!i||(e.addDefine("HAS_BITANGENTS"),e.addVarying("vec3","v_bitangentEC"),e.addStructField(Fs.STRUCT_ID_PROCESSED_ATTRIBUTES_VS,"vec3","bitangentMC"),e.addStructField(Fs.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,"vec3","bitangentEC"))}var oL=Fs;var rK=new de,aK=new de,Epe=new h,vpe=new h,sK=class{constructor(t){lt(this,"_rectangleSouthwestInMeters");lt(this,"_rectangleNortheastInMeters");if(t=t??G.EMPTY_OBJECT,this._ellipsoid=t.ellipsoid??te.default,this._numberOfLevelZeroTilesX=t.numberOfLevelZeroTilesX??1,this._numberOfLevelZeroTilesY=t.numberOfLevelZeroTilesY??1,this._projection=new li(this._ellipsoid),l(t.rectangleSouthwestInMeters)&&l(t.rectangleNortheastInMeters))this._rectangleSouthwestInMeters=t.rectangleSouthwestInMeters,this._rectangleNortheastInMeters=t.rectangleNortheastInMeters;else{let o=this._ellipsoid.maximumRadius*Math.PI;this._rectangleSouthwestInMeters=new z(-o,-o),this._rectangleNortheastInMeters=new z(o,o)}let{x:n,y:i}=this._rectangleSouthwestInMeters;h.fromElements(n,i,0,Epe),this._projection.unproject(Epe,rK),{x:n,y:i}=this._rectangleNortheastInMeters,h.fromElements(n,i,0,vpe),this._projection.unproject(vpe,aK),this._rectangle=new oe(rK.longitude,rK.latitude,aK.longitude,aK.latitude)}get ellipsoid(){return this._ellipsoid}get rectangle(){return this._rectangle}get projection(){return this._projection}getNumberOfXTilesAtLevel(t){return this._numberOfLevelZeroTilesX<<t}getNumberOfYTilesAtLevel(t){return this._numberOfLevelZeroTilesY<<t}rectangleToNativeRectangle(t,n){let i=this._projection,o=i.project(oe.southwest(t)),r=i.project(oe.northeast(t));return l(n)?(n.west=o.x,n.south=o.y,n.east=r.x,n.north=r.y,n):new oe(o.x,o.y,r.x,r.y)}tileXYToNativeRectangle(t,n,i,o){let r=this.getNumberOfXTilesAtLevel(i),a=this.getNumberOfYTilesAtLevel(i),s=(this._rectangleNortheastInMeters.x-this._rectangleSouthwestInMeters.x)/r,c=this._rectangleSouthwestInMeters.x+t*s,u=this._rectangleSouthwestInMeters.x+(t+1)*s,f=(this._rectangleNortheastInMeters.y-this._rectangleSouthwestInMeters.y)/a,d=this._rectangleNortheastInMeters.y-n*f,p=this._rectangleNortheastInMeters.y-(n+1)*f;return l(o)?(o.west=c,o.south=p,o.east=u,o.north=d,o):new oe(c,p,u,d)}tileXYToRectangle(t,n,i,o){let r=this.tileXYToNativeRectangle(t,n,i,o),a=this._projection,s=a.unproject(new h(r.west,r.south)),c=a.unproject(new h(r.east,r.north));return r.west=s.longitude,r.south=s.latitude,r.east=c.longitude,r.north=c.latitude,r}positionToTileXY(t,n,i){let o=this._rectangle;if(!oe.contains(o,t))return;let r=this.getNumberOfXTilesAtLevel(n),a=this.getNumberOfYTilesAtLevel(n),c=(this._rectangleNortheastInMeters.x-this._rectangleSouthwestInMeters.x)/r,f=(this._rectangleNortheastInMeters.y-this._rectangleSouthwestInMeters.y)/a,p=this._projection.project(t),g=p.x-this._rectangleSouthwestInMeters.x,m=this._rectangleNortheastInMeters.y-p.y,A=g/c|0;A>=r&&(A=r-1);let y=m/f|0;return y>=a&&(y=a-1),l(i)?(i.x=A,i.y=y,i):new z(A,y)}},vr=sK;var cK,Spe="AAPTauP-rqeCeHTtrSMga9XbPxQ..ZMIZzf1tcwicoJi5E5T2mG0EO3qlIRkQNe5S-uA95RJKU0YkrwOT0AF-lSIyXXBFakDJIPaxsZ5vpnzlaW3kCYG2Tk53bY6OntMqn1EBYtDPyqz38iM4NU_bbDN3DuxUdkxYDWnxJXxxWe3bEeUANbvhKK76PU7N0wjZgtEYHYocspYXSHxbCEYo_eXrHDkrWpgkzcmQ3WpQqf2XprJ39pbqVSZbxskDh3zBm92XxUaiSmdf7rC1w3VoAT1_UarLJfAQ",Hv={};Hv.defaultAccessToken=Spe;Hv.defaultWorldImageryServer=new De({url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/World_Imagery/MapServer"});Hv.defaultWorldHillshadeServer=new De({url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"});Hv.defaultWorldOceanServer=new De({url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer"});Hv.getDefaultTokenCredit=function(e){if(e===Spe){if(!l(cK)){let t='<b> This application is using a default ArcGIS access token. Please assign <i>Cesium.ArcGisMapService.defaultAccessToken</i> with an API key from your ArcGIS Developer account before using the ArcGIS tile services. You can sign up for a free ArcGIS Developer account at <a href="https://developers.arcgis.com/">https://developers.arcgis.com/</a>.</b>';cK=new yt(t,!0)}return cK}};var Cf=Hv;function lK(e){e=e??G.EMPTY_OBJECT,this._pixelsToCheck=e.pixelsToCheck,this._missingImagePixels=void 0,this._missingImageByteLength=void 0,this._isReady=!1;let t=De.createIfNeeded(e.missingImageUrl),n=this;function i(r){l(r.blob)&&(n._missingImageByteLength=r.blob.size);let a=vh(r);if(e.disableCheckIfAllPixelsAreTransparent){let s=!0,c=r.width,u=e.pixelsToCheck;for(let f=0,d=u.length;s&&f<d;++f){let p=u[f],g=p.x*4+p.y*c;a[g+3]>0&&(s=!1)}s&&(a=void 0)}n._missingImagePixels=a,n._isReady=!0}function o(){n._missingImagePixels=void 0,n._isReady=!0}t.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}).then(i).catch(o)}lK.prototype.isReady=function(){return this._isReady};lK.prototype.shouldDiscardImage=function(e){let t=this._pixelsToCheck,n=this._missingImagePixels;if(!l(n)||l(e.blob)&&e.blob.size!==this._missingImageByteLength)return!1;let i=vh(e),o=e.width;for(let r=0,a=t.length;r<a;++r){let s=t[r],c=s.x*4+s.y*o;for(let u=0;u<4;++u){let f=c+u;if(i[f]!==n[f])return!1}}return!0};var rL=lK;function uK(){this.name=void 0,this.description=void 0,this.position=void 0,this.data=void 0,this.imageryLayer=void 0}uK.prototype.configureNameFromProperties=function(e){let t=10,n;for(let i in e)if(e.hasOwnProperty(i)&&e[i]){let o=i.toLowerCase();t>1&&o==="name"?(t=1,n=i):t>2&&o==="title"?(t=2,n=i):t>3&&/name/i.test(i)?(t=3,n=i):t>4&&/title/i.test(i)&&(t=4,n=i)}l(n)&&(this.name=e[n])};uK.prototype.configureDescriptionFromProperties=function(e){function t(n){let i='<table class="cesium-infoBox-defaultTable">';for(let o in n)if(n.hasOwnProperty(o)){let r=n[o];l(r)&&(typeof r=="object"?i+=`<tr><td>${o}</td><td>${t(r)}</td></tr>`:i+=`<tr><td>${o}</td><td>${r}</td></tr>`)}return i+="</table>",i}this.description=t(e)};var nm=uK;function Wv(){_e.throwInstantiationError()}Object.defineProperties(Wv.prototype,{rectangle:{get:_e.throwInstantiationError},tileWidth:{get:_e.throwInstantiationError},tileHeight:{get:_e.throwInstantiationError},maximumLevel:{get:_e.throwInstantiationError},minimumLevel:{get:_e.throwInstantiationError},tilingScheme:{get:_e.throwInstantiationError},tileDiscardPolicy:{get:_e.throwInstantiationError},errorEvent:{get:_e.throwInstantiationError},credit:{get:_e.throwInstantiationError},proxy:{get:_e.throwInstantiationError},hasAlphaChannel:{get:_e.throwInstantiationError}});Wv.prototype.getTileCredits=function(e,t,n){_e.throwInstantiationError()};Wv.prototype.requestImage=function(e,t,n,i){_e.throwInstantiationError()};Wv.prototype.pickFeatures=function(e,t,n,i,o){_e.throwInstantiationError()};var zQe=/\.ktx2$/i;Wv.loadImage=function(e,t){let n=De.createIfNeeded(t);return zQe.test(n.url)?Cu(n):l(e)&&l(e.tileDiscardPolicy)?n.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}):n.fetchImage({preferImageBitmap:!0,flipY:!0})};var Tf=Wv;var wpe={SATELLITE:1,OCEANS:2,HILLSHADE:3};Object.freeze(wpe);var im=wpe;function Ipe(e){this.useTiles=e.usePreCachedTilesIfAvailable??!0;let t=e.ellipsoid;this.tilingScheme=e.tilingScheme??new Wi({ellipsoid:t}),this.rectangle=e.rectangle??this.tilingScheme.rectangle,this.ellipsoid=t;let n=e.credit;typeof n=="string"&&(n=new yt(n)),this.credit=n,this.tileCredits=void 0,this.tileDiscardPolicy=e.tileDiscardPolicy,this.tileWidth=e.tileWidth??256,this.tileHeight=e.tileHeight??256,this.maximumLevel=e.maximumLevel}Ipe.prototype.build=function(e){e._useTiles=this.useTiles,e._tilingScheme=this.tilingScheme,e._rectangle=this.rectangle,e._credit=this.credit,e._tileCredits=this.tileCredits,e._tileDiscardPolicy=this.tileDiscardPolicy,e._tileWidth=this.tileWidth,e._tileHeight=this.tileHeight,e._maximumLevel=this.maximumLevel,this.useTiles&&!l(this.tileDiscardPolicy)&&(e._tileDiscardPolicy=new rL({missingImageUrl:Dpe(e,0,0,this.maximumLevel).url,pixelsToCheck:[new z(0,0),new z(200,20),new z(20,200),new z(80,110),new z(160,130)],disableCheckIfAllPixelsAreTransparent:!0}))};function UQe(e,t){let n=e.tileInfo;if(!l(n))t.useTiles=!1;else{if(t.tileWidth=n.rows,t.tileHeight=n.cols,n.spatialReference.wkid===102100||n.spatialReference.wkid===102113)t.tilingScheme=new vr({ellipsoid:t.ellipsoid});else if(e.tileInfo.spatialReference.wkid===4326)t.tilingScheme=new Wi({ellipsoid:t.ellipsoid});else{let i=`Tile spatial reference WKID ${e.tileInfo.spatialReference.wkid} is not supported.`;throw new re(i)}if(t.maximumLevel=e.tileInfo.lods.length-1,l(e.fullExtent)){if(l(e.fullExtent.spatialReference)&&l(e.fullExtent.spatialReference.wkid))if(e.fullExtent.spatialReference.wkid===102100||e.fullExtent.spatialReference.wkid===102113){let i=new li,o=e.fullExtent,r=i.unproject(new h(Math.max(o.xmin,-t.tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.max(o.ymin,-t.tilingScheme.ellipsoid.maximumRadius*Math.PI),0)),a=i.unproject(new h(Math.min(o.xmax,t.tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.min(o.ymax,t.tilingScheme.ellipsoid.maximumRadius*Math.PI),0));t.rectangle=new oe(r.longitude,r.latitude,a.longitude,a.latitude)}else if(e.fullExtent.spatialReference.wkid===4326)t.rectangle=oe.fromDegrees(e.fullExtent.xmin,e.fullExtent.ymin,e.fullExtent.xmax,e.fullExtent.ymax);else{let i=`fullExtent.spatialReference WKID ${e.fullExtent.spatialReference.wkid} is not supported.`;throw new re(i)}}else t.rectangle=t.tilingScheme.rectangle;t.useTiles=!0}l(e.copyrightText)&&e.copyrightText.length>0&&(l(t.credit)?t.tileCredits=[new yt(e.copyrightText)]:t.credit=new yt(e.copyrightText))}function VQe(e,t){let n=`An error occurred while accessing ${e.url}`;throw l(t)&&l(t.message)&&(n+=`: ${t.message}`),new re(n)}async function jQe(e,t){let n=e.getDerivedResource({queryParameters:{f:"json"}});try{let i=await n.fetchJson();UQe(i,t)}catch(i){VQe(e,i)}}function vp(e){e=e??G.EMPTY_OBJECT,this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._tileDiscardPolicy=e.tileDiscardPolicy,this._tileWidth=e.tileWidth??256,this._tileHeight=e.tileHeight??256,this._maximumLevel=e.maximumLevel,this._tilingScheme=e.tilingScheme??new Wi({ellipsoid:e.ellipsoid}),this._useTiles=e.usePreCachedTilesIfAvailable??!0,this._rectangle=e.rectangle??this._tilingScheme.rectangle,this._layers=e.layers,this._credit=e.credit,this._tileCredits=void 0;let t=e.credit;typeof t=="string"&&(t=new yt(t)),this.enablePickFeatures=e.enablePickFeatures??!0,this._errorEvent=new ye}vp.fromBasemapType=async function(e,t){t=t??G.EMPTY_OBJECT;let n,i,o;switch(e){case im.SATELLITE:{n=t.token??Cf.defaultAccessToken,i=De.createIfNeeded(Cf.defaultWorldImageryServer),i.appendForwardSlash();let r=Cf.getDefaultTokenCredit(n);l(r)&&(o=yt.clone(r))}break;case im.OCEANS:{n=t.token??Cf.defaultAccessToken,i=De.createIfNeeded(Cf.defaultWorldOceanServer),i.appendForwardSlash();let r=Cf.getDefaultTokenCredit(n);l(r)&&(o=yt.clone(r))}break;case im.HILLSHADE:{n=t.token??Cf.defaultAccessToken,i=De.createIfNeeded(Cf.defaultWorldHillshadeServer),i.appendForwardSlash();let r=Cf.getDefaultTokenCredit(n);l(r)&&(o=yt.clone(r))}break;default:}return vp.fromUrl(i,{...t,token:n,credit:o,usePreCachedTilesIfAvailable:!0})};function Dpe(e,t,n,i,o){let r;if(e._useTiles)r=e._resource.getDerivedResource({url:`tile/${i}/${n}/${t}`,request:o});else{let a=e._tilingScheme.tileXYToNativeRectangle(t,n,i),c={bbox:`${a.west},${a.south},${a.east},${a.north}`,size:`${e._tileWidth},${e._tileHeight}`,format:"png32",transparent:!0,f:"image"};e._tilingScheme.projection instanceof ji?(c.bboxSR=4326,c.imageSR=4326):(c.bboxSR=3857,c.imageSR=3857),e.layers&&(c.layers=`show:${e.layers}`),r=e._resource.getDerivedResource({url:"export",request:o,queryParameters:c})}return r}Object.defineProperties(vp.prototype,{url:{get:function(){return this._resource._url}},token:{get:function(){return this._resource.queryParameters.token}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},usingPrecachedTiles:{get:function(){return this._useTiles}},hasAlphaChannel:{get:function(){return!0}},layers:{get:function(){return this._layers}}});vp.fromUrl=async function(e,t){t=t??G.EMPTY_OBJECT;let n=De.createIfNeeded(e);n.appendForwardSlash(),l(t.token)&&n.setQueryParameters({token:t.token});let i=new vp(t);i._resource=n;let o=new Ipe(t);return(t.usePreCachedTilesIfAvailable??!0)&&await jQe(n,o),o.build(i),i};vp.prototype.getTileCredits=function(e,t,n){return this._tileCredits};vp.prototype.requestImage=function(e,t,n,i){return Tf.loadImage(this,Dpe(this,e,t,n,i))};vp.prototype.pickFeatures=function(e,t,n,i,o){if(!this.enablePickFeatures)return;let r=this._tilingScheme.tileXYToNativeRectangle(e,t,n),a,s,c;if(this._tilingScheme.projection instanceof ji)a=D.toDegrees(i),s=D.toDegrees(o),c="4326";else{let p=this._tilingScheme.projection.project(new de(i,o,0));a=p.x,s=p.y,c="3857"}let u="visible";l(this._layers)&&(u+=`:${this._layers}`);let f={f:"json",tolerance:2,geometryType:"esriGeometryPoint",geometry:`${a},${s}`,mapExtent:`${r.west},${r.south},${r.east},${r.north}`,imageDisplay:`${this._tileWidth},${this._tileHeight},96`,sr:c,layers:u};return this._resource.getDerivedResource({url:"identify",queryParameters:f}).fetchJson().then(function(p){let g=[],m=p.results;if(!l(m))return g;for(let A=0;A<m.length;++A){let y=m[A],x=new nm;if(x.data=y,x.name=y.value,x.properties=y.attributes,x.configureDescriptionFromProperties(y.attributes),y.geometryType==="esriGeometryPoint"&&y.geometry){let b=y.geometry.spatialReference&&y.geometry.spatialReference.wkid?y.geometry.spatialReference.wkid:4326;if(b===4326||b===4283)x.position=de.fromDegrees(y.geometry.x,y.geometry.y,y.geometry.z);else if(b===102100||b===900913||b===3857){let C=new li;x.position=C.unproject(new h(y.geometry.x,y.geometry.y,y.geometry.z))}}g.push(x)}return g})};vp._metadataCache={};var Sg=vp;function GQe(e){let t,n=e.name,i=e.message;l(n)&&l(i)?t=`${n}: ${i}`:t=e.toString();let o=e.stack;return l(o)&&(t+=`
- ${o}`),t}var Sp=GQe;function Rj(e,t,n,i,o,r,a){this.provider=e,this.message=t,this.x=n,this.y=i,this.level=o,this.timesRetried=r??0,this.retry=!1,this.error=a}Rj.reportError=function(e,t,n,i,o,r,a,s){let c=e;return l(e)?(c.provider=t,c.message=i,c.x=o,c.y=r,c.level=a,c.retry=!1,c.error=s,++c.timesRetried):c=new Rj(t,i,o,r,a,0,s),l(n)&&n.numberOfListeners>0?n.raiseEvent(c):l(t)&&console.log(`An error occurred in "${t.constructor.name}": ${Sp(i)}`),c};Rj.reportSuccess=function(e){l(e)&&(e.timesRetried=-1)};var Go=Rj;var Ppe={AERIAL:"Aerial",AERIAL_WITH_LABELS:"AerialWithLabels",AERIAL_WITH_LABELS_ON_DEMAND:"AerialWithLabelsOnDemand",ROAD:"Road",ROAD_ON_DEMAND:"RoadOnDemand",CANVAS_DARK:"CanvasDark",CANVAS_LIGHT:"CanvasLight",CANVAS_GRAY:"CanvasGray",ORDNANCE_SURVEY:"OrdnanceSurvey",COLLINS_BART:"CollinsBart"};Object.freeze(Ppe);var qv=Ppe;function aL(e){}aL.prototype.isReady=function(){return!0};aL.prototype.shouldDiscardImage=function(e){return aL.EMPTY_IMAGE===e};var Oj;Object.defineProperties(aL,{EMPTY_IMAGE:{get:function(){return l(Oj)||(Oj=new Image,Oj.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="),Oj}}});var Yv=aL;function Rpe(e){this.tileWidth=void 0,this.tileHeight=void 0,this.maximumLevel=void 0,this.imageUrlSubdomains=void 0,this.imageUrlTemplate=void 0,this.attributionList=void 0}Rpe.prototype.build=function(e){e._tileWidth=this.tileWidth,e._tileHeight=this.tileHeight,e._maximumLevel=this.maximumLevel,e._imageUrlSubdomains=this.imageUrlSubdomains,e._imageUrlTemplate=this.imageUrlTemplate;let t=e._attributionList=this.attributionList;t||(t=[]),e._attributionList=t;for(let n=0,i=t.length;n<i;++n){let o=t[n];if(o.credit instanceof yt)break;o.credit=new yt(o.attribution);let r=o.coverageAreas;for(let a=0,s=o.coverageAreas.length;a<s;++a){let c=r[a],u=c.bbox;c.bbox=new oe(D.toRadians(u[1]),D.toRadians(u[0]),D.toRadians(u[3]),D.toRadians(u[2]))}}};function HQe(e,t){if(e.resourceSets.length!==1)throw new re("metadata does not specify one resource in resourceSets");let n=e.resourceSets[0].resources[0];t.tileWidth=n.imageWidth,t.tileHeight=n.imageHeight,t.maximumLevel=n.zoomMax-1,t.imageUrlSubdomains=n.imageUrlSubdomains,t.imageUrlTemplate=n.imageUrl;let i=n.imageryProviders;l(n.imageryProviders)&&(i=n.imageryProviders.filter(o=>o.coverageAreas?.some(r=>l(r.bbox)))),t.attributionList=i}function WQe(e,t,n){let i=`An error occurred while accessing ${e.url}`;throw l(t)&&l(t.message)&&(i+=`: ${t.message}`),Go.reportError(void 0,n,l(n)?n._errorEvent:void 0,i,void 0,void 0,void 0,t),new re(i)}async function qQe(e,t,n){let i=e.url,o=ms._metadataCache[i];l(o)||(o=e.fetchJson(),ms._metadataCache[i]=o);try{let r=await o;return HQe(r,t)}catch(r){WQe(e,r,n)}}function ms(e){e=e??G.EMPTY_OBJECT,this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=1,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._mapStyle=e.mapStyle??qv.AERIAL,this._mapLayer=e.mapLayer,this._culture=e.culture??"",this._key=e.key,this._tileDiscardPolicy=e.tileDiscardPolicy,l(this._tileDiscardPolicy)||(this._tileDiscardPolicy=new Yv),this._proxy=e.proxy,this._credit=new yt(`<a href="https://www.microsoft.com/en-us/maps/bing-maps/product"><img src="${ms.logoUrl}" title="Bing Imagery"/></a>`),this._tilingScheme=new vr({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,ellipsoid:e.ellipsoid}),this._tileWidth=void 0,this._tileHeight=void 0,this._maximumLevel=void 0,this._imageUrlTemplate=void 0,this._imageUrlSubdomains=void 0,this._attributionList=void 0,this._errorEvent=new ye}Object.defineProperties(ms.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},key:{get:function(){return this._key}},mapStyle:{get:function(){return this._mapStyle}},mapLayer:{get:function(){return this._mapLayer}},culture:{get:function(){return this._culture}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return l(this.mapLayer)}}});ms.fromUrl=async function(e,t){t=t??G.EMPTY_OBJECT;let n=t.tileProtocol;l(n)?n.length>0&&n[n.length-1]===":"&&(n=n.substr(0,n.length-1)):n=document.location.protocol==="http:"?"http":"https";let i=t.mapStyle??qv.AERIAL,o=De.createIfNeeded(e);o.appendForwardSlash();let r={incl:"ImageryProviders",key:t.key,uriScheme:n};l(t.mapLayer)&&(r.mapLayer=t.mapLayer),l(t.culture)&&(r.culture=t.culture);let a=o.getDerivedResource({url:`REST/v1/Imagery/Metadata/${i}`,queryParameters:r}),s=new ms(t);s._resource=o;let c=new Rpe(t);return await qQe(a,c),c.build(s),s};var YQe=new oe;ms.prototype.getTileCredits=function(e,t,n){let i=this._tilingScheme.tileXYToRectangle(e,t,n,YQe);return QQe(this._attributionList,n,i)};ms.prototype.requestImage=function(e,t,n,i){let o=Tf.loadImage(this,XQe(this,e,t,n,i));if(l(o))return o.catch(function(r){return l(r.blob)&&r.blob.size===0?Yv.EMPTY_IMAGE:Promise.reject(r)})};ms.prototype.pickFeatures=function(e,t,n,i,o){};ms.tileXYToQuadKey=function(e,t,n){let i="";for(let o=n;o>=0;--o){let r=1<<o,a=0;(e&r)!==0&&(a|=1),(t&r)!==0&&(a|=2),i+=a}return i};ms.quadKeyToTileXY=function(e){let t=0,n=0,i=e.length-1;for(let o=i;o>=0;--o){let r=1<<o,a=+e[i-o];(a&1)!==0&&(t|=r),(a&2)!==0&&(n|=r)}return{x:t,y:n,level:i}};ms._logoUrl=void 0;Object.defineProperties(ms,{logoUrl:{get:function(){return l(ms._logoUrl)||(ms._logoUrl=Xt("Assets/Images/bing_maps_credit.png")),ms._logoUrl},set:function(e){ms._logoUrl=e}}});function XQe(e,t,n,i,o){let r=e._imageUrlTemplate,a=e._imageUrlSubdomains,s=(t+n+i)%a.length;return e._resource.getDerivedResource({url:r,request:o,templateValues:{quadkey:ms.tileXYToQuadKey(t,n,i),subdomain:a[s],culture:e._culture},queryParameters:{n:"z"}})}var KQe=new oe;function QQe(e,t,n){++t;let i=[];for(let o=0,r=e.length;o<r;++o){let a=e[o],s=a.coverageAreas,c=!1;for(let u=0,f=a.coverageAreas.length;!c&&u<f;++u){let d=s[u];if(t>=d.zoomMin&&t<=d.zoomMax){let p=oe.intersection(n,d.bbox,KQe);l(p)&&(c=!0)}}c&&i.push(a.credit)}return i}ms._metadataCache={};var sL=ms;var Ope=/{[^}]+}/g,Mpe={x:e$e,y:n$e,z:r$e,s:a$e,reverseX:t$e,reverseY:i$e,reverseZ:o$e,westDegrees:s$e,southDegrees:c$e,eastDegrees:l$e,northDegrees:u$e,westProjected:f$e,southProjected:d$e,eastProjected:h$e,northProjected:m$e,width:p$e,height:g$e},$Qe=wt(Mpe,{i:_$e,j:A$e,reverseI:y$e,reverseJ:x$e,longitudeDegrees:C$e,latitudeDegrees:T$e,longitudeProjected:E$e,latitudeProjected:v$e,format:w$e});function cL(e){e=e??G.EMPTY_OBJECT,this._errorEvent=new ye;let t=De.createIfNeeded(e.url),n=De.createIfNeeded(e.pickFeaturesUrl);this._resource=t,this._urlSchemeZeroPadding=e.urlSchemeZeroPadding,this._getFeatureInfoFormats=e.getFeatureInfoFormats,this._pickFeaturesResource=n;let i=e.subdomains;Array.isArray(i)?i=i.slice():l(i)&&i.length>0?i=i.split(""):i=["a","b","c"],this._subdomains=i,this._tileWidth=e.tileWidth??256,this._tileHeight=e.tileHeight??256,this._minimumLevel=e.minimumLevel??0,this._maximumLevel=e.maximumLevel,this._tilingScheme=e.tilingScheme??new vr({ellipsoid:e.ellipsoid}),this._rectangle=e.rectangle??this._tilingScheme.rectangle,this._rectangle=oe.intersection(this._rectangle,this._tilingScheme.rectangle),this._tileDiscardPolicy=e.tileDiscardPolicy;let o=e.credit;typeof o=="string"&&(o=new yt(o)),this._credit=o,this._hasAlphaChannel=e.hasAlphaChannel??!0;let r=e.customTags,a=wt(Mpe,r),s=wt($Qe,r);this._tags=a,this._pickFeaturesTags=s,this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this.enablePickFeatures=e.enablePickFeatures??!0}Object.defineProperties(cL.prototype,{url:{get:function(){return this._resource.url}},urlSchemeZeroPadding:{get:function(){return this._urlSchemeZeroPadding}},pickFeaturesUrl:{get:function(){return this._pickFeaturesResource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return this._minimumLevel}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return this._hasAlphaChannel}}});cL.prototype.getTileCredits=function(e,t,n){};cL.prototype.requestImage=function(e,t,n,i){return Tf.loadImage(this,JQe(this,e,t,n,i))};cL.prototype.pickFeatures=function(e,t,n,i,o){if(!this.enablePickFeatures||!l(this._pickFeaturesResource)||this._getFeatureInfoFormats.length===0)return;let r=0,a=this;function s(u,f){return u.callback(f)}function c(){if(r>=a._getFeatureInfoFormats.length)return Promise.resolve([]);let u=a._getFeatureInfoFormats[r],f=ZQe(a,e,t,n,i,o,u.format);return++r,u.type==="json"?f.fetchJson().then(u.callback).catch(c):u.type==="xml"?f.fetchXML().then(u.callback).catch(c):u.type==="text"||u.type==="html"?f.fetchText().then(u.callback).catch(c):f.fetch({responseType:u.format}).then(s.bind(void 0,u)).catch(c)}return c()};var Mj=!1,Ef=new oe,Bj=!1,lL=new oe;function JQe(e,t,n,i,o){Mj=!1,Bj=!1;let r=e._resource,a=r.getUrlComponent(!0),s=e._tags,c={},u=a.match(Ope);return l(u)&&u.forEach(function(f){let d=f.substring(1,f.length-1);l(s[d])&&(c[d]=s[d](e,t,n,i))}),r.getDerivedResource({request:o,templateValues:c})}var fK=!1,Kv=new z,dK=!1;function ZQe(e,t,n,i,o,r,a){Mj=!1,Bj=!1,fK=!1,dK=!1;let s=e._pickFeaturesResource,c=s.getUrlComponent(!0),u=e._pickFeaturesTags,f={},d=c.match(Ope);return l(d)&&d.forEach(function(p){let g=p.substring(1,p.length-1);l(u[g])&&(f[g]=u[g](e,t,n,i,o,r,a))}),s.getDerivedResource({templateValues:f})}function Qv(e,t,n){if(e&&e.urlSchemeZeroPadding&&e.urlSchemeZeroPadding.hasOwnProperty(t)){let i=e.urlSchemeZeroPadding[t];if(typeof i=="string"){let o=i.length;o>1&&(n=n.length>=o?n:new Array(o-n.toString().length+1).join("0")+n)}}return n}function e$e(e,t,n,i){return Qv(e,"{x}",t)}function t$e(e,t,n,i){let o=e.tilingScheme.getNumberOfXTilesAtLevel(i)-t-1;return Qv(e,"{reverseX}",o)}function n$e(e,t,n,i){return Qv(e,"{y}",n)}function i$e(e,t,n,i){let o=e.tilingScheme.getNumberOfYTilesAtLevel(i)-n-1;return Qv(e,"{reverseY}",o)}function o$e(e,t,n,i){let o=e.maximumLevel,r=l(o)&&i<o?o-i-1:i;return Qv(e,"{reverseZ}",r)}function r$e(e,t,n,i){return Qv(e,"{z}",i)}function a$e(e,t,n,i){let o=(t+n+i)%e._subdomains.length;return e._subdomains[o]}function Lj(e,t,n,i){Mj||(e.tilingScheme.tileXYToRectangle(t,n,i,Ef),Ef.west=D.toDegrees(Ef.west),Ef.south=D.toDegrees(Ef.south),Ef.east=D.toDegrees(Ef.east),Ef.north=D.toDegrees(Ef.north),Mj=!0)}function s$e(e,t,n,i){return Lj(e,t,n,i),Ef.west}function c$e(e,t,n,i){return Lj(e,t,n,i),Ef.south}function l$e(e,t,n,i){return Lj(e,t,n,i),Ef.east}function u$e(e,t,n,i){return Lj(e,t,n,i),Ef.north}function Nj(e,t,n,i){Bj||(e.tilingScheme.tileXYToNativeRectangle(t,n,i,lL),Bj=!0)}function f$e(e,t,n,i){return Nj(e,t,n,i),lL.west}function d$e(e,t,n,i){return Nj(e,t,n,i),lL.south}function h$e(e,t,n,i){return Nj(e,t,n,i),lL.east}function m$e(e,t,n,i){return Nj(e,t,n,i),lL.north}function p$e(e,t,n,i){return e.tileWidth}function g$e(e,t,n,i){return e.tileHeight}function _$e(e,t,n,i,o,r,a){return Fj(e,t,n,i,o,r),Kv.x}function A$e(e,t,n,i,o,r,a){return Fj(e,t,n,i,o,r),Kv.y}function y$e(e,t,n,i,o,r,a){return Fj(e,t,n,i,o,r),e.tileWidth-Kv.x-1}function x$e(e,t,n,i,o,r,a){return Fj(e,t,n,i,o,r),e.tileHeight-Kv.y-1}var b$e=new oe,Xv=new h;function Fj(e,t,n,i,o,r,a){if(fK)return;hK(e,t,n,i,o,r);let s=Xv,c=e.tilingScheme.tileXYToNativeRectangle(t,n,i,b$e);Kv.x=e.tileWidth*(s.x-c.west)/c.width|0,Kv.y=e.tileHeight*(c.north-s.y)/c.height|0,fK=!0}function C$e(e,t,n,i,o,r,a){return D.toDegrees(o)}function T$e(e,t,n,i,o,r,a){return D.toDegrees(r)}function E$e(e,t,n,i,o,r,a){return hK(e,t,n,i,o,r),Xv.x}function v$e(e,t,n,i,o,r,a){return hK(e,t,n,i,o,r),Xv.y}var S$e=new de;function hK(e,t,n,i,o,r,a){if(!dK){if(e.tilingScheme.projection instanceof ji)Xv.x=D.toDegrees(o),Xv.y=D.toDegrees(r);else{let s=S$e;s.longitude=o,s.latitude=r,e.tilingScheme.projection.project(s,Xv)}dK=!0}}function w$e(e,t,n,i,o,r,a){return a}var Aa=cL;function Ld(e){Aa.call(this,e)}Ld._requestMetadata=async function(e,t,n,i){try{let o=await n.fetchXML();return Ld._metadataSuccess(o,e,t,n,i)}catch(o){if(o instanceof ip)return Ld._metadataFailure(e,t);throw o}};Ld.fromUrl=async function(e,t){let n=De.createIfNeeded(e);n.appendForwardSlash();let i=n,o=n.getDerivedResource({url:"tilemapresource.xml"});t=t??G.EMPTY_OBJECT;let r=await Ld._requestMetadata(t,i,o);return new Ld(r)};l(Object.create)&&(Ld.prototype=Object.create(Aa.prototype),Ld.prototype.constructor=Ld);function Bpe(e,t){return e.west<t.rectangle.west&&(e.west=t.rectangle.west),e.east>t.rectangle.east&&(e.east=t.rectangle.east),e.south<t.rectangle.south&&(e.south=t.rectangle.south),e.north>t.rectangle.north&&(e.north=t.rectangle.north),e}function Lpe(e,t,n){let i=e.positionToTileXY(oe.southwest(t),n),o=e.positionToTileXY(oe.northeast(t),n);return(Math.abs(o.x-i.x)+1)*(Math.abs(o.y-i.y)+1)>4?0:n}Ld._metadataSuccess=function(e,t,n,i,o){let r=/tileformat/i,a=/tileset/i,s=/tilesets/i,c=/boundingbox/i,u,f,d,p=[],g=e.childNodes[0].childNodes;for(let R=0;R<g.length;R++)if(r.test(g.item(R).nodeName))u=g.item(R);else if(s.test(g.item(R).nodeName)){d=g.item(R);let B=g.item(R).childNodes;for(let L=0;L<B.length;L++)a.test(B.item(L).nodeName)&&p.push(B.item(L))}else c.test(g.item(R).nodeName)&&(f=g.item(R));let m;if(!l(d)||!l(f))throw m=`Unable to find expected tilesets or bbox attributes in ${i.url}.`,l(o)&&Go.reportError(void 0,o,o.errorEvent,m),new re(m);let A=t.fileExtension??u.getAttribute("extension"),y=t.tileWidth??parseInt(u.getAttribute("width"),10),x=t.tileHeight??parseInt(u.getAttribute("height"),10),b=t.minimumLevel??parseInt(p[0].getAttribute("order"),10),C=t.maximumLevel??parseInt(p[p.length-1].getAttribute("order"),10),E=d.getAttribute("profile"),S=t.tilingScheme;if(!l(S))if(E==="geodetic"||E==="global-geodetic")S=new Wi({ellipsoid:t.ellipsoid});else if(E==="mercator"||E==="global-mercator")S=new vr({ellipsoid:t.ellipsoid});else throw m=`${i.url} specifies an unsupported profile attribute, ${E}.`,l(o)&&Go.reportError(void 0,o,o.errorEvent,m),new re(m);let w=oe.clone(t.rectangle);if(!l(w)){let R,B,L,_;t.flipXY??!1?(L=new z(parseFloat(f.getAttribute("miny")),parseFloat(f.getAttribute("minx"))),_=new z(parseFloat(f.getAttribute("maxy")),parseFloat(f.getAttribute("maxx")))):(L=new z(parseFloat(f.getAttribute("minx")),parseFloat(f.getAttribute("miny"))),_=new z(parseFloat(f.getAttribute("maxx")),parseFloat(f.getAttribute("maxy"))));let v=E==="geodetic"||E==="mercator";if(S.projection instanceof ji||v)R=de.fromDegrees(L.x,L.y),B=de.fromDegrees(_.x,_.y);else{let I=S.projection;R=I.unproject(L),B=I.unproject(_)}w=new oe(R.longitude,R.latitude,B.longitude,B.latitude)}return w=Bpe(w,S),b=Lpe(S,w,b),{url:n.getDerivedResource({url:`{z}/{x}/{reverseY}.${A}`}),tilingScheme:S,rectangle:w,tileWidth:y,tileHeight:x,minimumLevel:b,maximumLevel:C,tileDiscardPolicy:t.tileDiscardPolicy,credit:t.credit}};Ld._metadataFailure=function(e,t){let n=e.fileExtension??"png",i=e.tileWidth??256,o=e.tileHeight??256,r=e.maximumLevel,a=l(e.tilingScheme)?e.tilingScheme:new vr({ellipsoid:e.ellipsoid}),s=e.rectangle??a.rectangle;s=Bpe(s,a);let c=Lpe(a,s,e.minimumLevel);return{url:t.getDerivedResource({url:`{z}/{x}/{reverseY}.${n}`}),tilingScheme:a,rectangle:s,tileWidth:i,tileHeight:o,minimumLevel:c,maximumLevel:r,tileDiscardPolicy:e.tileDiscardPolicy,credit:e.credit}};var GA=Ld;function Npe(e){this.channel=e.channel,this.ellipsoid=e.ellipsoid,this.tilingScheme=void 0,this.version=void 0}Npe.prototype.build=function(e){e._channel=this.channel,e._version=this.version,e._tilingScheme=this.tilingScheme};function I$e(e,t){let n;try{n=JSON.parse(e)}catch{n=JSON.parse(e.replace(/([\[\{,])[\n\r ]*([A-Za-z0-9]+)[\n\r ]*:/g,'$1"$2":'))}let i;for(let o=0;o<n.layers.length;o++)if(n.layers[o].id===t.channel){i=n.layers[o];break}if(!l(i)){let o=`Could not find layer with channel (id) of ${t.channel}.`;throw new re(o)}if(!l(i.version)){let o=`Could not find a version in channel (id) ${t.channel}.`;throw new re(o)}if(t.version=i.version,l(n.projection)&&n.projection==="flat")t.tilingScheme=new Wi({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new oe(-Math.PI,-Math.PI,Math.PI,Math.PI),ellipsoid:t.ellipsoid});else if(!l(n.projection)||n.projection==="mercator")t.tilingScheme=new vr({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,ellipsoid:t.ellipsoid});else{let o=`Unsupported projection ${n.projection}.`;throw new re(o)}return!0}function D$e(e,t,n){let i=`An error occurred while accessing ${t.url}.`;throw l(e)&&l(e.message)&&(i+=`: ${e.message}`),Go.reportError(void 0,n,l(n)?n._errorEvent:void 0,i),new re(i)}async function P$e(e,t,n){try{let i=await e.fetchText();I$e(i,t)}catch(i){D$e(i,e,n)}}function Lu(e){e=e??{},this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=1.9,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._tileDiscardPolicy=e.tileDiscardPolicy,this._channel=e.channel,this._requestType="ImageryMaps",this._credit=new yt(`<a href="http://www.google.com/enterprise/mapsearth/products/earthenterprise.html"><img src="${Lu.logoUrl}" title="Google Imagery"/></a>`),this._tilingScheme=void 0,this._version=void 0,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=e.maximumLevel,this._errorEvent=new ye}Object.defineProperties(Lu.prototype,{url:{get:function(){return this._url}},path:{get:function(){return this._path}},proxy:{get:function(){return this._resource.proxy}},channel:{get:function(){return this._channel}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},version:{get:function(){return this._version}},requestType:{get:function(){return this._requestType}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}}});Lu.fromUrl=async function(e,t,n){n=n??{};let i=n.path??"/default_map",o=De.createIfNeeded(e).getDerivedResource({url:i[0]==="/"?i.substring(1):i});o.appendForwardSlash();let r=o.getDerivedResource({url:"query",queryParameters:{request:"Json",vars:"geeServerDefs",is2d:"t"}}),a=new Npe(n);a.channel=t,await P$e(r,a);let s=new Lu(n);return a.build(s),s._resource=o,s._url=e,s._path=i,s};Lu.prototype.getTileCredits=function(e,t,n){};Lu.prototype.requestImage=function(e,t,n,i){let o=this._resource.getDerivedResource({url:"query",request:i,queryParameters:{request:this._requestType,channel:this._channel,version:this._version,x:e,y:t,z:n+1}});return Tf.loadImage(this,o)};Lu.prototype.pickFeatures=function(e,t,n,i,o){};Lu._logoUrl=void 0;Object.defineProperties(Lu,{logoUrl:{get:function(){return l(Lu._logoUrl)||(Lu._logoUrl=Xt("Assets/Images/google_earth_credit.png")),Lu._logoUrl},set:function(e){Lu._logoUrl=e}}});var uL=Lu;var R$e=/\/$/,Fpe=new yt('© <a href="https://www.mapbox.com/about/maps/">Mapbox</a> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/">Improve this map</a></strong>');function $v(e){e=e??G.EMPTY_OBJECT;let t=e.mapId,n=e.accessToken;this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0;let i=De.createIfNeeded(e.url??"https://{s}.tiles.mapbox.com/v4/");this._mapId=t,this._accessToken=n;let o=e.format??"png";/\./.test(o)||(o=`.${o}`),this._format=o;let r=i.getUrlComponent();R$e.test(r)||(r+="/"),r+=`${t}/{z}/{x}/{y}${this._format}`,i.url=r,i.setQueryParameters({access_token:n});let a;l(e.credit)?(a=e.credit,typeof a=="string"&&(a=new yt(a))):a=Fpe,this._resource=i,this._imageryProvider=new Aa({url:i,credit:a,ellipsoid:e.ellipsoid,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,rectangle:e.rectangle})}Object.defineProperties($v.prototype,{url:{get:function(){return this._imageryProvider.url}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._imageryProvider.errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},proxy:{get:function(){return this._imageryProvider.proxy}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}}});$v.prototype.getTileCredits=function(e,t,n){};$v.prototype.requestImage=function(e,t,n,i){return this._imageryProvider.requestImage(e,t,n,i)};$v.prototype.pickFeatures=function(e,t,n,i,o){return this._imageryProvider.pickFeatures(e,t,n,i,o)};$v._defaultCredit=Fpe;var fL=$v;function Ib(e){e=e??G.EMPTY_OBJECT,this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0;let t=e.rectangle??oe.MAX_VALUE,n=new Wi({rectangle:t,numberOfLevelZeroTilesX:1,numberOfLevelZeroTilesY:1,ellipsoid:e.ellipsoid});this._tilingScheme=n,this._image=void 0,this._texture=void 0,this._hasError=!1,this._errorEvent=new ye;let i=e.credit;typeof i=="string"&&(i=new yt(i)),this._credit=i;let o=De.createIfNeeded(e.url);this._resource=o,this._tileWidth=e.tileWidth,this._tileHeight=e.tileHeight}Object.defineProperties(Ib.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return 0}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}}});function O$e(e,t,n,i){let o=`Failed to load image ${e.url}`;l(t)&&l(t.message)&&(o+=`: ${t.message}`);let r=Go.reportError(i,n,l(n)?n._errorEvent:void 0,o,0,0,0,t);if(r.retry)return mK(e,n,r);throw l(n)&&(n._hasError=!0),new re(o)}async function mK(e,t,n){try{return await Tf.loadImage(null,e)}catch(i){return O$e(e,i,t,n)}}Ib.fromUrl=async function(e,t){let n=De.createIfNeeded(e),i=await mK(n);t=t??G.EMPTY_OBJECT;let o=new Ib({...t,url:e,tileWidth:i.width,tileHeight:i.height});return o._image=i,o};Ib.prototype.getTileCredits=function(e,t,n){};Ib.prototype.requestImage=async function(e,t,n,i){if(!this._hasError&&!l(this._image)){let o=await mK(this._resource,this);return this._image=o,Go.reportSuccess(this._errorEvent),o}return this._image};Ib.prototype.pickFeatures=function(e,t,n,i,o){};var dL=Ib;function M$e(e,t,n){this.type=e,l(t)||(e==="json"?t="application/json":e==="xml"?t="text/xml":e==="html"?t="text/html":e==="text"&&(t="text/plain")),this.format=t,l(n)||(e==="json"?n=B$e:e==="xml"?n=k$e:(e==="html"||e==="text")&&(n=kpe)),this.callback=n}function B$e(e){let t=[],n=e.features;for(let i=0;i<n.length;++i){let o=n[i],r=new nm;if(r.data=o,r.properties=o.properties,r.configureNameFromProperties(o.properties),r.configureDescriptionFromProperties(o.properties),l(o.geometry)&&o.geometry.type==="Point"){let a=o.geometry.coordinates[0],s=o.geometry.coordinates[1];r.position=de.fromDegrees(a,s)}t.push(r)}return t}var pK="http://www.mapinfo.com/mxp",L$e="http://www.esri.com/wms",N$e="http://www.opengis.net/wfs",F$e="http://www.opengis.net/gml";function k$e(e){let t=e.documentElement;if(t.localName==="MultiFeatureCollection"&&t.namespaceURI===pK)return z$e(e);if(t.localName==="FeatureInfoResponse"&&t.namespaceURI===L$e)return U$e(e);if(t.localName==="FeatureCollection"&&t.namespaceURI===N$e)return V$e(e);if(t.localName==="ServiceExceptionReport")throw new re(new XMLSerializer().serializeToString(t));return t.localName==="msGMLOutput"?j$e(e):G$e(e)}function z$e(e){let t=[],i=e.documentElement.getElementsByTagNameNS(pK,"Feature");for(let o=0;o<i.length;++o){let r=i[o],a={},s=r.getElementsByTagNameNS(pK,"Val");for(let u=0;u<s.length;++u){let f=s[u];if(f.hasAttribute("ref")){let d=f.getAttribute("ref"),p=f.textContent.trim();a[d]=p}}let c=new nm;c.data=r,c.properties=a,c.configureNameFromProperties(a),c.configureDescriptionFromProperties(a),t.push(c)}return t}function U$e(e){let t=e.documentElement,n=[],i,o=t.getElementsByTagNameNS("*","FIELDS");if(o.length>0)for(let r=0;r<o.length;++r){let a=o[r];i={};let s=a.attributes;for(let c=0;c<s.length;++c){let u=s[c];i[u.name]=u.value}n.push(kj(a,i))}else{let r=t.getElementsByTagNameNS("*","FeatureInfo");for(let a=0;a<r.length;++a){let s=r[a];i={};let c=s.childNodes;for(let u=0;u<c.length;++u){let f=c[u];f.nodeType===Node.ELEMENT_NODE&&(i[f.localName]=f.textContent)}n.push(kj(s,i))}}return n}function V$e(e){let t=[],i=e.documentElement.getElementsByTagNameNS(F$e,"featureMember");for(let o=0;o<i.length;++o){let r=i[o],a={};gK(r,a),t.push(kj(r,a))}return t}function j$e(e){let t=[],n,i=e.documentElement.childNodes;for(let r=0;r<i.length;r++)if(i[r].nodeType===Node.ELEMENT_NODE){n=i[r];break}if(!l(n))throw new re("Unable to find first child of the feature info xml document");let o=n.childNodes;for(let r=0;r<o.length;++r){let a=o[r];if(a.nodeType===Node.ELEMENT_NODE){let s={};gK(a,s),t.push(kj(a,s))}}return t}function gK(e,t){let n=!0;for(let i=0;i<e.childNodes.length;++i){let o=e.childNodes[i];o.nodeType===Node.ELEMENT_NODE&&(n=!1),!(o.localName==="Point"||o.localName==="LineString"||o.localName==="Polygon"||o.localName==="boundedBy")&&o.hasChildNodes()&&gK(o,t)&&(t[o.localName]=o.textContent)}return n}function kj(e,t){let n=new nm;return n.data=e,n.properties=t,n.configureNameFromProperties(t),n.configureDescriptionFromProperties(t),n}function G$e(e){let t=new XMLSerializer().serializeToString(e),n=document.createElement("div"),i=document.createElement("pre");i.textContent=t,n.appendChild(i);let o=new nm;return o.data=e,o.description=n.innerHTML,[o]}var H$e=/<body>\s*<\/body>/im,W$e=/<ServiceExceptionReport([\s\S]*)<\/ServiceExceptionReport>/im,q$e=/<title>([\s\S]*)<\/title>/im;function kpe(e){if(H$e.test(e)||W$e.test(e))return;let t,n=q$e.exec(e);n&&n.length>1&&(t=n[1]);let i=new nm;return i.name=t,i.description=e,i.data=e,[i]}var om=M$e;function hL(e){e=e??G.EMPTY_OBJECT,this._tileCache={},this._tilesRequestedForInterval=[];let t=this._clock=e.clock;this._times=e.times,this._requestImageFunction=e.requestImageFunction,this._reloadFunction=e.reloadFunction,this._currentIntervalIndex=-1,t.onTick.addEventListener(this._clockOnTick,this),this._clockOnTick(t)}Object.defineProperties(hL.prototype,{clock:{get:function(){return this._clock},set:function(e){this._clock!==e&&(this._clock=e,this._clockOnTick(e),this._reloadFunction())}},times:{get:function(){return this._times},set:function(e){this._times!==e&&(this._times=e,this._clockOnTick(this._clock),this._reloadFunction())}},currentInterval:{get:function(){return this._times.get(this._currentIntervalIndex)}}});hL.prototype.getFromCache=function(e,t,n,i){let o=zpe(e,t,n),r,a=this._tileCache[this._currentIntervalIndex];if(l(a)&&l(a[o])){let s=a[o];r=s.promise.catch(function(c){throw i.state=s.request.state,c}),delete a[o]}return r};hL.prototype.checkApproachingInterval=function(e,t,n,i){let o=zpe(e,t,n),r=this._tilesRequestedForInterval,a=Upe(this),s={key:o,priorityFunction:i.priorityFunction};(!l(a)||!Vpe(this,s,a))&&r.push(s),r.length>=512&&r.splice(0,256)};hL.prototype._clockOnTick=function(e){let t=e.currentTime,i=this._times.indexOf(t),o=this._currentIntervalIndex;if(i!==o){let a=this._tileCache[o];for(let s in a)a.hasOwnProperty(s)&&a[s].request.cancel();delete this._tileCache[o],this._tilesRequestedForInterval=[],this._currentIntervalIndex=i,this._reloadFunction();return}let r=Upe(this);if(l(r)){let a=this._tilesRequestedForInterval,s=!0;for(;s&&a.length!==0;){let c=a.pop();s=Vpe(this,c,r),s||a.push(c)}}};function zpe(e,t,n){return`${e}-${t}-${n}`}function Y$e(e){let t=e.split("-");if(t.length===3)return{x:Number(t[0]),y:Number(t[1]),level:Number(t[2])}}function Upe(e){let t=e._times;if(!l(t))return;let n=e._clock,i=n.currentTime,o=n.canAnimate&&n.shouldAnimate,r=n.multiplier;if(!o&&r!==0)return;let a,s=t.indexOf(i);if(s<0)return;let c=t.get(s);return r>0?(a=Q.secondsDifference(c.stop,i),++s):(a=Q.secondsDifference(c.start,i),--s),a/=r,s>=0&&a<=5?t.get(s):void 0}function Vpe(e,t,n){let i=e._times.indexOf(n.start),o=e._tileCache,r=o[i];l(r)||(r=o[i]={});let a=t.key;if(l(r[a]))return!0;let s=Y$e(a),c=new _r({throttle:!1,throttleByServer:!0,type:qa.IMAGERY,priorityFunction:t.priorityFunction}),u=e._requestImageFunction(s.x,s.y,s.level,c,n);return l(u)?(r[a]={promise:u,request:c},!0):!1}var Db=hL;var X$e=[3034,3035,3042,3043,3044],K$e=[4471,4559];function rm(e){if(e=e??G.EMPTY_OBJECT,l(e.times)&&!l(e.clock))throw new _e("options.times was specified, so options.clock is required.");this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._getFeatureInfoUrl=e.getFeatureInfoUrl??e.url;let t=De.createIfNeeded(e.url),n=De.createIfNeeded(this._getFeatureInfoUrl);t.setQueryParameters(rm.DefaultParameters,!0),n.setQueryParameters(rm.GetFeatureInfoDefaultParameters,!0),l(e.parameters)&&t.setQueryParameters(jpe(e.parameters)),l(e.getFeatureInfoParameters)&&n.setQueryParameters(jpe(e.getFeatureInfoParameters));let i=this;this._reload=void 0,l(e.times)&&(this._timeDynamicImagery=new Db({clock:e.clock,times:e.times,requestImageFunction:function(a,s,c,u,f){return Gpe(i,a,s,c,u,f)},reloadFunction:function(){l(i._reload)&&i._reload()}}));let o={};if(o.layers=e.layers,o.bbox="{westProjected},{southProjected},{eastProjected},{northProjected}",o.width="{width}",o.height="{height}",parseFloat(t.queryParameters.version)>=1.3){o.crs=e.crs??(e.tilingScheme&&e.tilingScheme.projection instanceof li?"EPSG:3857":"CRS:84");let a=o.crs.split(":");if(a[0]==="EPSG"&&a.length===2){let s=Number(a[1]);(s>=4e3&&s<5e3&&!K$e.includes(s)||X$e.includes(s))&&(o.bbox="{southProjected},{westProjected},{northProjected},{eastProjected}")}}else o.srs=e.srs??(e.tilingScheme&&e.tilingScheme.projection instanceof li?"EPSG:3857":"EPSG:4326");t.setQueryParameters(o,!0),n.setQueryParameters(o,!0);let r={query_layers:e.layers,info_format:"{format}"};parseFloat(n.queryParameters.version)>=1.3?(r.i="{i}",r.j="{j}"):(r.x="{i}",r.y="{j}"),n.setQueryParameters(r,!0),this._resource=t,this._pickFeaturesResource=n,this._layers=e.layers,this._tileProvider=new Aa({url:t,pickFeaturesUrl:n,tilingScheme:e.tilingScheme??new Wi({ellipsoid:e.ellipsoid}),rectangle:e.rectangle,tileWidth:e.tileWidth,tileHeight:e.tileHeight,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,subdomains:e.subdomains,tileDiscardPolicy:e.tileDiscardPolicy,credit:e.credit,getFeatureInfoFormats:e.getFeatureInfoFormats??rm.DefaultGetFeatureInfoFormats,enablePickFeatures:e.enablePickFeatures})}function Gpe(e,t,n,i,o,r){let a=l(r)?r.data:void 0,s=e._tileProvider;return l(a)&&s._resource.setQueryParameters(a),s.requestImage(t,n,i,o)}function Q$e(e,t,n,i,o,r,a){let s=l(a)?a.data:void 0,c=e._tileProvider;return l(s)&&c._pickFeaturesResource.setQueryParameters(s),c.pickFeatures(t,n,i,o,r)}Object.defineProperties(rm.prototype,{url:{get:function(){return this._resource._url}},proxy:{get:function(){return this._resource.proxy}},layers:{get:function(){return this._layers}},tileWidth:{get:function(){return this._tileProvider.tileWidth}},tileHeight:{get:function(){return this._tileProvider.tileHeight}},maximumLevel:{get:function(){return this._tileProvider.maximumLevel}},minimumLevel:{get:function(){return this._tileProvider.minimumLevel}},tilingScheme:{get:function(){return this._tileProvider.tilingScheme}},rectangle:{get:function(){return this._tileProvider.rectangle}},tileDiscardPolicy:{get:function(){return this._tileProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._tileProvider.errorEvent}},credit:{get:function(){return this._tileProvider.credit}},hasAlphaChannel:{get:function(){return this._tileProvider.hasAlphaChannel}},enablePickFeatures:{get:function(){return this._tileProvider.enablePickFeatures},set:function(e){this._tileProvider.enablePickFeatures=e}},clock:{get:function(){return this._timeDynamicImagery.clock},set:function(e){this._timeDynamicImagery.clock=e}},times:{get:function(){return this._timeDynamicImagery.times},set:function(e){this._timeDynamicImagery.times=e}},getFeatureInfoUrl:{get:function(){return this._getFeatureInfoUrl}}});rm.prototype.getTileCredits=function(e,t,n){return this._tileProvider.getTileCredits(e,t,n)};rm.prototype.requestImage=function(e,t,n,i){let o,r=this._timeDynamicImagery,a;return l(r)&&(a=r.currentInterval,o=r.getFromCache(e,t,n,i)),l(o)||(o=Gpe(this,e,t,n,i,a)),l(o)&&l(r)&&r.checkApproachingInterval(e,t,n,i),o};rm.prototype.pickFeatures=function(e,t,n,i,o){let r=this._timeDynamicImagery,a=l(r)?r.currentInterval:void 0;return Q$e(this,e,t,n,i,o,a)};rm.DefaultParameters=Object.freeze({service:"WMS",version:"1.1.1",request:"GetMap",styles:"",format:"image/jpeg"});rm.GetFeatureInfoDefaultParameters=Object.freeze({service:"WMS",version:"1.1.1",request:"GetFeatureInfo"});rm.DefaultGetFeatureInfoFormats=Object.freeze([Object.freeze(new om("json","application/json")),Object.freeze(new om("xml","text/xml")),Object.freeze(new om("text","text/html"))]);function jpe(e){let t={};for(let n in e)e.hasOwnProperty(n)&&(t[n.toLowerCase()]=e[n]);return t}var mL=rm;function vf(e){e=e??G.EMPTY_OBJECT,this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._getFeatureInfoUrl=e.getFeatureInfoUrl??e.url;let t=De.createIfNeeded(e.url),n=De.createIfNeeded(this._getFeatureInfoUrl),i=e.style,o=e.tileMatrixSetID,r=t.url,a=e.format??"image/jpeg",s=r.match(/{/g);if(!l(s)||s.length===1&&/{s}/.test(r)?(t.setQueryParameters(vf.DefaultParameters,!0),this._useKvp=!0):(t.setTemplateValues(vf.DefaultParameters,!0),this._useKvp=!1),this._useKvp){n.setQueryParameters(vf.GetFeatureInfoDefaultParameters,!0),l(e.getFeatureInfoParameters)&&n.setQueryParameters(Hpe(e.getFeatureInfoParameters));let f={infoformat:"{format}",i:"{i}",j:"{j}"};n.setQueryParameters(f,!0)}else n.setTemplateValues(vf.GetFeatureInfoDefaultParameters,!0),l(e.getFeatureInfoParameters)&&n.setTemplateValues(Hpe(e.getFeatureInfoParameters));this._resource=t,this._tileMatrixLabels=e.tileMatrixLabels,this._format=a,this._dimensions=e.dimensions,this._tilematrixset=o;let c={};c.tilematrix="{TileMatrix}",c.layer=e.layer,c.style=i,c.tilerow="{TileRow}",c.tilecol="{TileCol}",c.tilematrixset=o,this._useKvp?(t.setQueryParameters(c,!0),t.setQueryParameters({format:a},!0),n.setQueryParameters({format:a},!0),n.setQueryParameters(c,!0)):(c.Style=i,t.setTemplateValues(c),t.setTemplateValues({format:a}),n.setTemplateValues(c));let u=this;this._reload=void 0,l(e.times)&&(this._timeDynamicImagery=new Db({clock:e.clock,times:e.times,requestImageFunction:function(f,d,p,g,m){return Wpe(u,f,d,p,g,m)},reloadFunction:function(){l(u._reload)&&u._reload()}})),this._errorEvent=new ye,this._tileProvider=new Aa({url:t,pickFeaturesUrl:n,tilingScheme:e.tilingScheme??new vr({ellipsoid:e.ellipsoid}),rectangle:e.rectangle,tileWidth:e.tileWidth,tileHeight:e.tileHeight,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,subdomains:e.subdomains,tileDiscardPolicy:e.tileDiscardPolicy,credit:e.credit,getFeatureInfoFormats:e.getFeatureInfoFormats??vf.DefaultGetFeatureInfoFormats,enablePickFeatures:e.enablePickFeatures??(this._useKvp||l(e.getFeatureInfoUrl)),customTags:J$e(this)})}function Wpe(e,t,n,i,o,r){let a=e._tileProvider;return qpe(e,a._resource,r),a.requestImage(t,n,i,o)}function $$e(e,t,n,i,o,r,a){let s=e._tileProvider;return qpe(e,s._pickFeaturesResource,a),s.pickFeatures(t,n,i,o,r)}Object.defineProperties(vf.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileProvider.tileWidth}},tileHeight:{get:function(){return this._tileProvider.tileHeight}},maximumLevel:{get:function(){return this._tileProvider.maximumLevel}},minimumLevel:{get:function(){return this._tileProvider.minimumLevel}},tilingScheme:{get:function(){return this._tileProvider.tilingScheme}},rectangle:{get:function(){return this._tileProvider.rectangle}},tileDiscardPolicy:{get:function(){return this._tileProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._tileProvider.errorEvent}},format:{get:function(){return this._format}},credit:{get:function(){return this._tileProvider.credit}},hasAlphaChannel:{get:function(){return!0}},enablePickFeatures:{get:function(){return this._tileProvider.enablePickFeatures},set:function(e){this._tileProvider.enablePickFeatures=e}},clock:{get:function(){return this._timeDynamicImagery.clock},set:function(e){this._timeDynamicImagery.clock=e}},times:{get:function(){return this._timeDynamicImagery.times},set:function(e){this._timeDynamicImagery.times=e}},dimensions:{get:function(){return this._dimensions},set:function(e){this._dimensions!==e&&(this._dimensions=e,l(this._reload)&&this._reload())}},getFeatureInfoUrl:{get:function(){return this._getFeatureInfoUrl}}});vf.prototype.getTileCredits=function(e,t,n){return this._tileProvider.getTileCredits(e,t,n)};vf.prototype.requestImage=function(e,t,n,i){let o,r=this._timeDynamicImagery,a;return l(r)&&(a=r.currentInterval,o=r.getFromCache(e,t,n,i)),l(o)||(o=Wpe(this,e,t,n,i,a)),l(o)&&l(r)&&r.checkApproachingInterval(e,t,n,i),o};vf.prototype.pickFeatures=function(e,t,n,i,o){let r=this._timeDynamicImagery,a=l(r)?r.currentInterval:void 0;return $$e(this,e,t,n,i,o,a)};vf.DefaultParameters=Object.freeze({service:"WMTS",version:"1.0.0",request:"GetTile"});vf.GetFeatureInfoDefaultParameters=Object.freeze({service:"WMTS",version:"1.0.0",request:"GetFeatureInfo"});vf.DefaultGetFeatureInfoFormats=Object.freeze([Object.freeze(new om("json","application/json")),Object.freeze(new om("xml","text/xml")),Object.freeze(new om("text","text/html"))]);function qpe(e,t,n){let i=e._dimensions,o=l(n)?n.data:void 0;if(!e._useKvp)l(i)&&t.setTemplateValues(i),l(o)&&t.setTemplateValues(o);else{let r={};l(i)&&(r=wt(r,i)),l(o)&&(r=wt(r,o)),t.setQueryParameters(r)}}function J$e(e){function t(n){let i=e._tileMatrixLabels;return l(i)?i[n]:n.toString()}return{TileMatrix:function(n,i,o,r){return t(r)},tilematrix:function(n,i,o,r){return t(r)},TileRow:function(n,i,o){return o.toString()},tilerow:function(n,i,o){return o.toString()},TileCol:function(n,i,o){return i.toString()},tilecol:function(n,i,o){return i.toString()},TileMatrixSet:function(n){return e._tilematrixset},tilematrixset:function(n){return e._tilematrixset}}}function Hpe(e){let t={};for(let n in e)e.hasOwnProperty(n)&&(t[n.toLowerCase()]=e[n]);return t}var pL=vf;var Jv={};Jv.defaultApiKey=void 0;Jv.mapTilesApiEndpoint=new De({url:"https://tile.googleapis.com/"});Jv.defaultStreetViewStaticApiKey=void 0;Jv.streetViewStaticApiEndpoint=new De({url:"https://maps.googleapis.com/maps/api/streetview"});Jv.getDefaultCredit=function(){return new yt('<img alt="Google" src="https://assets.ion.cesium.com/google-credit.png" style="vertical-align:-6px">',!0)};var ps=Jv;var Ype=/\/$/;function wg(e){e=e??G.EMPTY_OBJECT,this._maximumLevel=e.maximumLevel??22,this._minimumLevel=e.minimumLevel??0,this._session=e.session,this._key=e.key,this._tileWidth=e.tileWidth,this._tileHeight=e.tileHeight;let t=e.url instanceof ha?e.url:De.createIfNeeded(e.url??ps.mapTilesApiEndpoint),n=t.getUrlComponent();Ype.test(n)||(n+="/");let i=`${n}v1/2dtiles/{z}/{x}/{y}`;this._viewportUrl=`${n}tile/v1/viewport`,t.url=i,t.setQueryParameters({session:encodeURIComponent(e.session),key:encodeURIComponent(e.key)}),this._resource=t.clone();let o;l(e.credit)&&(o=e.credit,typeof o=="string"&&(o=new yt(o)));let r=new Aa({url:t,credit:o,tileWidth:e.tileWidth,tileHeight:e.tileHeight,ellipsoid:e.ellipsoid,rectangle:e.rectangle,maximumLevel:this._maximumLevel,minimumLevel:this._minimumLevel});r._resource=t,this._imageryProvider=r,this._tileCredits=t.credits,this._attributionsByLevel=void 0}Object.defineProperties(wg.prototype,{url:{get:function(){return this._imageryProvider.url}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._imageryProvider.errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},proxy:{get:function(){return this._imageryProvider.proxy}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}}});wg.fromIonAssetId=async function(e){e=e??{},e.mapType=e.mapType??"satellite",e.language=e.language??"en_US",e.region=e.region??"US";let t=e.overlayLayerType,n=Xpe(e),i=ha._createEndpointResource(e.assetId,{queryParameters:{options:JSON.stringify(n)}}),o={language:e.language,region:e.region,ellipsoid:e.ellipsoid,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,rectangle:e.rectangle,credit:e.credit},r=await i.fetchJson(),a=r.options.url;return delete r.options.url,r.options={...r.options,...o},_K(a,r,i)};wg.fromUrl=async function(e){e=e??{},e.mapType=e.mapType??"satellite",e.language=e.language??"en_US",e.region=e.region??"US",e.url=e.url??ps.mapTilesApiEndpoint,e.key=e.key??ps.defaultApiKey;let t=e.overlayLayerType,n=await eJe(e);return new wg({...n,...e,credit:e.credit??ps.getDefaultCredit()})};wg.prototype.getTileCredits=function(e,t,n){if(!l(this._attributionsByLevel)||!l(this._tileCredits))return;let o=this._attributionsByLevel.get(n);return l(this._tileCredits)?this._tileCredits.concat(o):o};wg.prototype.requestImage=function(e,t,n,i){let o=this._imageryProvider.requestImage(e,t,n,i);if(l(o))return l(this._attributionsByLevel)?o:Promise.all([o,this.getViewportCredits()]).then(r=>r[0])};wg.prototype.pickFeatures=function(e,t,n,i,o){};wg.prototype.getViewportCredits=async function(){let e=this._maximumLevel,t=[];for(let o=0;o<e+1;o++)t.push(Z$e(this._resource,this._viewportUrl,o));let n=await Promise.all(t),i=new Map;for(let o=0;o<e+1;o++){let r=[],a=n[o];if(a){let s=new yt(a);r.push(s)}i.set(o,r)}return this._attributionsByLevel=i,i};async function Z$e(e,t,n){return(await e.getDerivedResource({url:t,queryParameters:{zoom:n,north:90,south:-90,east:180,west:-180},data:JSON.stringify(G.EMPTY_OBJECT)}).fetchJson()).copyright}function Xpe(e){let{mapType:t,overlayLayerType:n,styles:i}=e,o={mapType:t,overlay:!1};return t==="terrain"&&!l(n)&&(o.layerTypes=["layerRoadmap"]),l(n)&&(o.mapType="satellite",o.overlay=!0,o.layerTypes=[n]),l(i)&&(o.styles=i),o}async function eJe(e){let{language:t,region:n,key:i,url:o}=e,r=Xpe(e),a=o.url??o;Ype.test(a)||(a+="/");let s=await De.post({url:`${a}v1/createSession`,queryParameters:{key:i},data:JSON.stringify({...r,language:t,region:n})});return JSON.parse(s)}var gL=wg;var tJe=/\/$/;function Zv(e){e=e??{};let t=e.tilesetId??"microsoft.imagery";this._maximumLevel=e.maximumLevel??22,this._minimumLevel=e.minimumLevel??0,this._subscriptionKey=e.subscriptionKey??e["subscription-key"],this._tilesetId=e.tilesetId;let n=e.url instanceof ha?e.url:De.createIfNeeded(e.url??"https://atlas.microsoft.com/"),i=n.getUrlComponent();tJe.test(i)||(i+="/");let o=`${i}map/tile`;this._viewportUrl=`${i}map/attribution`,n.url=o,n.setQueryParameters({"api-version":"2024-04-01",tilesetId:t,"subscription-key":this._subscriptionKey,zoom:"{z}",x:"{x}",y:"{y}"}),this._resource=n;let r;l(e.credit)&&(r=e.credit,typeof r=="string"&&(r=new yt(r)));let a=new Aa({...e,maximumLevel:this._maximumLevel,minimumLevel:this._minimumLevel,url:n,credit:r});a._resource=n,this._imageryProvider=a,this._tileCredits=n.credits,this._attributionsByLevel=void 0}Object.defineProperties(Zv.prototype,{url:{get:function(){return this._imageryProvider.url}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._imageryProvider.errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},proxy:{get:function(){return this._imageryProvider.proxy}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}}});Zv.prototype.getTileCredits=function(e,t,n){if(!l(this._attributionsByLevel)||!l(this._tileCredits))return;let o=this._attributionsByLevel.get(n);return l(this._tileCredits)?this._tileCredits.concat(o):o};Zv.prototype.requestImage=function(e,t,n,i){let o=this._imageryProvider.requestImage(e,t,n,i);if(l(o))return l(this._attributionsByLevel)?o:Promise.all([o,this.getViewportCredits()]).then(r=>r[0])};Zv.prototype.pickFeatures=function(e,t,n,i,o){};Zv.prototype.getViewportCredits=async function(){let e=this._maximumLevel,t=[];for(let o=0;o<e+1;o++)t.push(nJe(this._resource,this._viewportUrl,this._subscriptionKey,this._tilesetId,o));let n=await Promise.all(t),i=new Map;for(let o=0;o<e+1;o++){let r=[],a=n[o].join(",");if(a){let s=new yt(a);r.push(s)}i.set(o,r)}return this._attributionsByLevel=i,i};async function nJe(e,t,n,i,o){return(await e.getDerivedResource({url:t,queryParameters:{zoom:o,bounds:"-180,-90,180,90"},data:JSON.stringify(G.EMPTY_OBJECT)}).fetchJson()).copyrights}var _L=Zv;var iJe=async(e,t,n)=>GA.fromUrl(new ha(t,n)),oJe=async(e,{options:t})=>Sg.fromUrl(e,t),rJe=async(e,{options:t})=>sL.fromUrl(e,t),aJe=async(e,{options:t})=>{let n=t.channel;return delete t.channel,uL.fromUrl(e,n,t)},sJe=async(e,{options:t})=>new fL({url:e,...t}),cJe=async(e,{options:t})=>dL.fromUrl(e,t),lJe=async(e,{options:t})=>GA.fromUrl(e,t),uJe=async(e,{options:t})=>new Aa({url:e,...t}),fJe=async(e,{options:t})=>new mL({url:e,...t}),dJe=async(e,{options:t})=>new pL({url:e,...t}),_K=async(e,t,n)=>{delete t.externalType,t.url=e;let i=new ha(t,n),o=(r,a)=>{delete a.externalType,a.url=e;let{options:s}=a;r.setQueryParameters({session:s.session,key:s.key})};return i.refreshCallback=o,new gL({...t.options,url:i})},hJe=async(e,t,n)=>{delete t.externalType,t.url=e;let i=new ha(t,n),o=(r,a)=>{delete a.externalType,a.url=e;let{options:s}=a;r.setQueryParameters({"subscription-key":s["subscription-key"]})};return i.refreshCallback=o,new _L({...t.options,url:i})},mJe={ARCGIS_MAPSERVER:oJe,BING:rJe,GOOGLE_EARTH:aJe,MAPBOX:sJe,SINGLE_TILE:cJe,TMS:lJe,URL_TEMPLATE:uJe,WMS:fJe,WMTS:dJe,GOOGLE_2D_MAPS:_K,AZURE_MAPS:hJe,defaultFactoryCallback:iJe},eS=Object.freeze(mJe);function wp(e){e=e??G.EMPTY_OBJECT,this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._tileCredits=void 0,this._errorEvent=new ye}Object.defineProperties(wp.prototype,{rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}},proxy:{get:function(){}}});wp.fromAssetId=async function(e,t){t=t??G.EMPTY_OBJECT;let n=ha._createEndpointResource(e,t),i=e.toString()+t.accessToken+t.server,o=wp._endpointCache[i];l(o)||(o=n.fetchJson(),wp._endpointCache[i]=o);let r=await o;if(r.type!=="IMAGERY")throw new re(`Cesium ion asset ${e} is not an imagery asset.`);let a=r.externalType,s=eS.defaultFactoryCallback;r=We(r,!0),r.options=r.options??{};let c=r.options?.url;if(delete t.url,l(a)&&(s=eS[a],!l(s)))throw new re(`Unrecognized Cesium ion imagery type: ${a}`);let u=await s(c,r,n),f=new wp(t);return u.errorEvent.addEventListener(function(d){d.provider=f,f._errorEvent.raiseEvent(d)}),f._tileCredits=ha.getCreditsFromEndpoint(r,n),f._imageryProvider=u,f};wp.prototype.getTileCredits=function(e,t,n){let i=this._imageryProvider.getTileCredits(e,t,n);return l(i)?this._tileCredits.concat(i):this._tileCredits};wp.prototype.requestImage=function(e,t,n,i){return this._imageryProvider.requestImage(e,t,n,i)};wp.prototype.pickFeatures=function(e,t,n,i,o){return this._imageryProvider.pickFeatures(e,t,n,i,o)};wp._endpointCache={};var Jl=wp;var Kpe={AERIAL:2,AERIAL_WITH_LABELS:3,ROAD:4};Object.freeze(Kpe);var Ig=Kpe;function pJe(e){e=e??G.EMPTY_OBJECT;let t=e.style??Ig.AERIAL;return Jl.fromAssetId(t)}var Dg=pJe;function Fa(){_e.throwInstantiationError()}Object.defineProperties(Fa.prototype,{errorEvent:{get:_e.throwInstantiationError},credit:{get:_e.throwInstantiationError},tilingScheme:{get:_e.throwInstantiationError},hasWaterMask:{get:_e.throwInstantiationError},hasVertexNormals:{get:_e.throwInstantiationError},availability:{get:_e.throwInstantiationError}});var Qpe=[];Fa.getRegularGridIndices=function(e,t){let n=Qpe[e];l(n)||(Qpe[e]=n=[]);let i=n[t];return l(i)||(e*t<D.SIXTY_FOUR_KILOBYTES?i=n[t]=new Uint16Array((e-1)*(t-1)*6):i=n[t]=new Uint32Array((e-1)*(t-1)*6),e0e(e,t,i,0)),i};var $pe=[];Fa.getRegularGridIndicesAndEdgeIndices=function(e,t){let n=$pe[e];l(n)||($pe[e]=n=[]);let i=n[t];if(!l(i)){let o=Fa.getRegularGridIndices(e,t),r=Zpe(e,t),a=r.westIndicesSouthToNorth,s=r.southIndicesEastToWest,c=r.eastIndicesNorthToSouth,u=r.northIndicesWestToEast;i=n[t]={indices:o,westIndicesSouthToNorth:a,southIndicesEastToWest:s,eastIndicesNorthToSouth:c,northIndicesWestToEast:u}}return i};var Jpe=[];Fa.getRegularGridAndSkirtIndicesAndEdgeIndices=function(e,t){let n=Jpe[e];l(n)||(Jpe[e]=n=[]);let i=n[t];if(!l(i)){let o=e*t,r=(e-1)*(t-1)*6,a=e*2+t*2,s=Math.max(0,a-4)*6,c=o+a,u=r+s,f=Zpe(e,t),d=f.westIndicesSouthToNorth,p=f.southIndicesEastToWest,g=f.eastIndicesNorthToSouth,m=f.northIndicesWestToEast,A=Ue.createTypedArray(c,u);e0e(e,t,A,0),Fa.addSkirtIndices(d,p,g,m,o,A,r),i=n[t]={indices:A,westIndicesSouthToNorth:d,southIndicesEastToWest:p,eastIndicesNorthToSouth:g,northIndicesWestToEast:m,indexCountWithoutSkirts:r}}return i};Fa.getSkirtVertexCount=function(e,t,n,i){return e.length+t.length+n.length+i.length};Fa.getSkirtIndexCount=function(e){return(e-4)*2*3};Fa.getSkirtIndexCountWithFilledCorners=function(e){return((e-4)*2+4)*3};Fa.addSkirtIndices=function(e,t,n,i,o,r,a){let s=o;a=zj(e,s,r,a),s+=e.length,a=zj(t,s,r,a),s+=t.length,a=zj(n,s,r,a),s+=n.length,zj(i,s,r,a)};Fa.addSkirtIndicesWithFilledCorners=function(e,t,n,i,o,r,a){Fa.addSkirtIndices(e,t,n,i,o,r,a);let s=Fa.getSkirtVertexCount(e,t,n,i),c=Fa.getSkirtIndexCount(s),u=a+c,f=e[0],d=i[0],p=n[0],g=t[0],m=o,A=m+e.length-1,y=A+1,x=y+t.length-1,b=x+1,C=b+n.length-1,E=C+1,S=E+i.length-1;r[u+0]=f,r[u+1]=m,r[u+2]=x,r[u+3]=g,r[u+4]=y,r[u+5]=C,r[u+6]=p,r[u+7]=b,r[u+8]=S,r[u+9]=d,r[u+10]=E,r[u+11]=A};function Zpe(e,t){let n=new Array(t),i=new Array(e),o=new Array(t),r=new Array(e),a;for(a=0;a<e;++a)r[a]=a,i[a]=e*t-1-a;for(a=0;a<t;++a)o[a]=(a+1)*e-1,n[a]=(t-a-1)*e;return{westIndicesSouthToNorth:n,southIndicesEastToWest:i,eastIndicesNorthToSouth:o,northIndicesWestToEast:r}}function e0e(e,t,n,i){let o=0;for(let r=0;r<t-1;++r){for(let a=0;a<e-1;++a){let s=o,c=s+e,u=c+1,f=s+1;n[i++]=s,n[i++]=c,n[i++]=f,n[i++]=f,n[i++]=c,n[i++]=u,++o}++o}}function zj(e,t,n,i){let o=e[0],r=e.length;for(let a=1;a<r;++a){let s=e[a];n[i++]=o,n[i++]=s,n[i++]=t,n[i++]=t,n[i++]=s,n[i++]=t+1,o=s,++t}return i}Fa.heightmapTerrainQuality=.25;Fa.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(e,t,n){return e.maximumRadius*2*Math.PI*Fa.heightmapTerrainQuality/(t*n)};Fa.prototype.requestTileGeometry=_e.throwInstantiationError;Fa.prototype.getLevelMaximumGeometricError=_e.throwInstantiationError;Fa.prototype.getTileDataAvailable=_e.throwInstantiationError;Fa.prototype.loadTileDataAvailability=_e.throwInstantiationError;var Uo=Fa;var AL=`uniform sampler2D u_texture;
-
- in vec2 v_textureCoordinates;
-
- void main()
- {
- out_FragColor = texture(u_texture, v_textureCoordinates);
- }
- `;var yL=`in vec4 position;
- in float webMercatorT;
-
- uniform vec2 u_textureDimensions;
-
- out vec2 v_textureCoordinates;
-
- void main()
- {
- v_textureCoordinates = vec2(position.x, webMercatorT);
- gl_Position = czm_viewportOrthographic * (position * vec4(u_textureDimensions, 1.0, 1.0));
- }
- `;var t0e={UNLOADED:0,TRANSITIONING:1,RECEIVED:2,TEXTURE_LOADED:3,READY:4,FAILED:5,INVALID:6,PLACEHOLDER:7};Object.freeze(t0e);var Vn=t0e;function tS(e,t,n,i,o){if(this.imageryLayer=e,this.x=t,this.y=n,this.level=i,this.request=void 0,i!==0){let r=t/2|0,a=n/2|0,s=i-1;this.parent=e.getImageryFromCache(r,a,s)}this.state=Vn.UNLOADED,this.imageUrl=void 0,this.image=void 0,this.texture=void 0,this.textureWebMercator=void 0,this.credits=void 0,this.referenceCount=0,!l(o)&&e.ready&&(o=e.imageryProvider.tilingScheme.tileXYToRectangle(t,n,i)),this.rectangle=o}tS.createPlaceholder=function(e){let t=new tS(e,0,0,0);return t.addReference(),t.state=Vn.PLACEHOLDER,t};tS.prototype.addReference=function(){++this.referenceCount};tS.prototype.releaseReference=function(){return--this.referenceCount,this.referenceCount===0?(this.imageryLayer.removeImageryFromCache(this),l(this.parent)&&this.parent.releaseReference(),l(this.image)&&l(this.image.destroy)&&this.image.destroy(),l(this.texture)&&this.texture.destroy(),l(this.textureWebMercator)&&this.texture!==this.textureWebMercator&&this.textureWebMercator.destroy(),fe(this),0):this.referenceCount};tS.prototype.processStateMachine=function(e,t,n){this.state===Vn.UNLOADED&&!n&&(this.state=Vn.TRANSITIONING,this.imageryLayer._requestImagery(this)),this.state===Vn.RECEIVED&&(this.state=Vn.TRANSITIONING,this.imageryLayer._createTexture(e.context,this));let i=this.state===Vn.READY&&t&&!this.texture;(this.state===Vn.TEXTURE_LOADED||i)&&(this.state=Vn.TRANSITIONING,this.imageryLayer._reprojectTexture(e,this,t))};var nS=tS;function AK(e,t,n){this.readyImagery=void 0,this.loadingImagery=e,this.textureCoordinateRectangle=t,this.textureTranslationAndScale=void 0,this.useWebMercatorT=n}AK.prototype.freeResources=function(){l(this.readyImagery)&&this.readyImagery.releaseReference(),l(this.loadingImagery)&&this.loadingImagery.releaseReference()};AK.prototype.processStateMachine=function(e,t,n){let i=this.loadingImagery,o=i.imageryLayer;if(i.processStateMachine(t,!this.useWebMercatorT,n),i.state===Vn.READY)return l(this.readyImagery)&&this.readyImagery.releaseReference(),this.readyImagery=this.loadingImagery,this.loadingImagery=void 0,this.textureTranslationAndScale=o._calculateTextureTranslationAndScale(e,this),!0;let r=i.parent,a;for(;l(r)&&(r.state!==Vn.READY||!this.useWebMercatorT&&!l(r.texture));)r.state!==Vn.FAILED&&r.state!==Vn.INVALID&&(a=a||r),r=r.parent;return this.readyImagery!==r&&(l(this.readyImagery)&&this.readyImagery.releaseReference(),this.readyImagery=r,l(r)&&(r.addReference(),this.textureTranslationAndScale=o._calculateTextureTranslationAndScale(e,this))),i.state===Vn.FAILED||i.state===Vn.INVALID?l(a)?(a.processStateMachine(t,!this.useWebMercatorT,n),!1):!0:!1};var iS=AK;function Ni(e,t){this._imageryProvider=e,this._readyEvent=new ye,this._errorEvent=new ye,t=t??G.EMPTY_OBJECT,e=e??G.EMPTY_OBJECT,this.alpha=t.alpha??e._defaultAlpha??1,this.nightAlpha=t.nightAlpha??e._defaultNightAlpha??1,this.dayAlpha=t.dayAlpha??e._defaultDayAlpha??1,this.brightness=t.brightness??e._defaultBrightness??Ni.DEFAULT_BRIGHTNESS,this.contrast=t.contrast??e._defaultContrast??Ni.DEFAULT_CONTRAST,this.hue=t.hue??e._defaultHue??Ni.DEFAULT_HUE,this.saturation=t.saturation??e._defaultSaturation??Ni.DEFAULT_SATURATION,this.gamma=t.gamma??e._defaultGamma??Ni.DEFAULT_GAMMA,this.splitDirection=t.splitDirection??Ni.DEFAULT_SPLIT,this.minificationFilter=t.minificationFilter??e._defaultMinificationFilter??Ni.DEFAULT_MINIFICATION_FILTER,this.magnificationFilter=t.magnificationFilter??e._defaultMagnificationFilter??Ni.DEFAULT_MAGNIFICATION_FILTER,this.show=t.show??!0,this._minimumTerrainLevel=t.minimumTerrainLevel,this._maximumTerrainLevel=t.maximumTerrainLevel,this._rectangle=t.rectangle??oe.MAX_VALUE,this._maximumAnisotropy=t.maximumAnisotropy,this._imageryCache={},this._skeletonPlaceholder=new iS(nS.createPlaceholder(this)),this._show=!0,this._layerIndex=-1,this._isBaseLayer=!1,this._requestImageError=void 0,this._reprojectComputeCommands=[],this.cutoutRectangle=t.cutoutRectangle,this.colorToAlpha=t.colorToAlpha,this.colorToAlphaThreshold=t.colorToAlphaThreshold??Ni.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD}Object.defineProperties(Ni.prototype,{imageryProvider:{get:function(){return this._imageryProvider}},ready:{get:function(){return l(this._imageryProvider)}},errorEvent:{get:function(){return this._errorEvent}},readyEvent:{get:function(){return this._readyEvent}},rectangle:{get:function(){return this._rectangle}}});Ni.DEFAULT_BRIGHTNESS=1;Ni.DEFAULT_CONTRAST=1;Ni.DEFAULT_HUE=0;Ni.DEFAULT_SATURATION=1;Ni.DEFAULT_GAMMA=1;Ni.DEFAULT_SPLIT=Or.NONE;Ni.DEFAULT_MINIFICATION_FILTER=Vt.LINEAR;Ni.DEFAULT_MAGNIFICATION_FILTER=ti.LINEAR;Ni.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD=.004;Ni.fromProviderAsync=function(e,t){let n=new Ni(void 0,t);return xJe(n,Promise.resolve(e)),n};Ni.fromWorldImagery=function(e){return e=e??G.EMPTY_OBJECT,Ni.fromProviderAsync(Dg({style:e.style}),e)};Ni.prototype.isBaseLayer=function(){return this._isBaseLayer};Ni.prototype.isDestroyed=function(){return!1};Ni.prototype.destroy=function(){return fe(this)};var o0e=new oe,n0e=new oe,yK=new oe,r0e=new oe;Ni.prototype.getImageryRectangle=function(){let e=this._imageryProvider,t=this._rectangle;return oe.intersection(e.rectangle,t)};Ni.prototype._createTileImagerySkeletons=function(e,t,n){let i=e.data;if(!l(t)||l(this._minimumTerrainLevel)&&e.level<this._minimumTerrainLevel||l(this._maximumTerrainLevel)&&e.level>this._maximumTerrainLevel)return!1;l(n)||(n=i.imagery.length);let o=this._imageryProvider;if(!this.ready)return this._skeletonPlaceholder.loadingImagery.addReference(),i.imagery.splice(n,0,this._skeletonPlaceholder),!0;let r=o.tilingScheme.projection instanceof li&&e.rectangle.north<li.MaximumLatitude&&e.rectangle.south>-li.MaximumLatitude,a=oe.intersection(o.rectangle,this._rectangle,o0e),s=oe.intersection(e.rectangle,a,n0e);if(!l(s)){if(!this.isBaseLayer())return!1;let v=a,I=e.rectangle;s=n0e,I.south>=v.north?s.north=s.south=v.north:I.north<=v.south?s.north=s.south=v.south:(s.south=Math.max(I.south,v.south),s.north=Math.min(I.north,v.north)),I.west>=v.east?s.west=s.east=v.east:I.east<=v.west?s.west=s.east=v.west:(s.west=Math.max(I.west,v.west),s.east=Math.min(I.east,v.east))}let c=0;s.south>0?c=s.south:s.north<0&&(c=s.north);let f=1*t.getLevelMaximumGeometricError(e.level),d=AJe(this,f,c);d=Math.max(0,d);let p=o.maximumLevel;if(d>p&&(d=p),l(o.minimumLevel)){let v=o.minimumLevel;d<v&&(d=v)}let g=o.tilingScheme,m=g.positionToTileXY(oe.northwest(s),d),A=g.positionToTileXY(oe.southeast(s),d),y=e.rectangle.width/512,x=e.rectangle.height/512,b=g.tileXYToRectangle(m.x,m.y,d);Math.abs(b.south-e.rectangle.north)<x&&m.y<A.y&&++m.y,Math.abs(b.east-e.rectangle.west)<y&&m.x<A.x&&++m.x;let C=g.tileXYToRectangle(A.x,A.y,d);Math.abs(C.north-e.rectangle.south)<x&&A.y>m.y&&--A.y,Math.abs(C.west-e.rectangle.east)<y&&A.x>m.x&&--A.x;let E=oe.clone(e.rectangle,r0e),S=g.tileXYToRectangle(m.x,m.y,d),w=oe.intersection(S,a,yK),P;r?(g.rectangleToNativeRectangle(E,E),g.rectangleToNativeRectangle(S,S),g.rectangleToNativeRectangle(w,w),g.rectangleToNativeRectangle(a,a),P=g.tileXYToNativeRectangle.bind(g),y=E.width/512,x=E.height/512):P=g.tileXYToRectangle.bind(g);let R,B=0,L=1,_;!this.isBaseLayer()&&Math.abs(w.west-E.west)>=y&&(B=Math.min(1,(w.west-E.west)/E.width)),!this.isBaseLayer()&&Math.abs(w.north-E.north)>=x&&(L=Math.max(0,(w.north-E.south)/E.height));let T=L;for(let v=m.x;v<=A.x;v++)if(R=B,S=P(v,m.y,d),w=oe.simpleIntersection(S,a,yK),!!l(w)){B=Math.min(1,(w.east-E.west)/E.width),v===A.x&&(this.isBaseLayer()||Math.abs(w.east-E.east)<y)&&(B=1),L=T;for(let I=m.y;I<=A.y;I++){if(_=L,S=P(v,I,d),w=oe.simpleIntersection(S,a,yK),!l(w))continue;L=Math.max(0,(w.south-E.south)/E.height),I===A.y&&(this.isBaseLayer()||Math.abs(w.south-E.south)<x)&&(L=0);let O=new se(R,L,B,_),N=this.getImageryFromCache(v,I,d);i.imagery.splice(n,0,new iS(N,O,r)),++n}}return!0};Ni.prototype._calculateTextureTranslationAndScale=function(e,t){let n=t.readyImagery.rectangle,i=e.rectangle;if(t.useWebMercatorT){let c=t.readyImagery.imageryLayer.imageryProvider.tilingScheme;n=c.rectangleToNativeRectangle(n,o0e),i=c.rectangleToNativeRectangle(i,r0e)}let o=i.width,r=i.height,a=o/n.width,s=r/n.height;return new se(a*(i.west-n.west)/o,s*(i.south-n.south)/r,a,s)};Ni.prototype._requestImagery=function(e){let t=this._imageryProvider,n=this;function i(a){if(!l(a))return o();e.image=a,e.state=Vn.RECEIVED,e.request=void 0,Go.reportSuccess(n._requestImageError)}function o(a){if(e.request.state===di.CANCELLED){e.state=Vn.UNLOADED,e.request=void 0;return}e.state=Vn.FAILED,e.request=void 0;let s=`Failed to obtain image tile X: ${e.x} Y: ${e.y} Level: ${e.level}.`;n._requestImageError=Go.reportError(n._requestImageError,t,t.errorEvent,s,e.x,e.y,e.level,a),n._requestImageError.retry&&r()}function r(){let a=new _r({throttle:!1,throttleByServer:!0,type:qa.IMAGERY});e.request=a,e.state=Vn.TRANSITIONING;let s=t.requestImage(e.x,e.y,e.level,a);if(!l(s)){e.state=Vn.UNLOADED,e.request=void 0;return}l(t.getTileCredits)&&(e.credits=t.getTileCredits(e.x,e.y,e.level)),s.then(function(c){i(c)}).catch(function(c){o(c)})}r()};Ni.prototype._createTextureWebGL=function(e,t){let n=new jt({minificationFilter:this.minificationFilter,magnificationFilter:this.magnificationFilter}),i=t.image;return l(i.internalFormat)?new It({context:e,pixelFormat:i.internalFormat,width:i.width,height:i.height,source:{arrayBufferView:i.bufferView},sampler:n}):new It({context:e,source:i,pixelFormat:this._imageryProvider.hasAlphaChannel?Xe.RGBA:Xe.RGB,sampler:n})};Ni.prototype._createTexture=function(e,t){let n=this._imageryProvider,i=t.image;if(l(n.tileDiscardPolicy)){let r=n.tileDiscardPolicy;if(l(r)){if(!r.isReady()){t.state=Vn.RECEIVED;return}if(r.shouldDiscardImage(i)){t.state=Vn.INVALID;return}}}let o=this._createTextureWebGL(e,t);n.tilingScheme.projection instanceof li?t.textureWebMercator=o:t.texture=o,t.image=void 0,t.state=Vn.TEXTURE_LOADED};function i0e(e,t,n){return`${e}:${t}:${n}`}Ni.prototype._finalizeReprojectTexture=function(e,t){let n=this.minificationFilter,i=this.magnificationFilter;if(n===Vt.LINEAR&&i===ti.LINEAR&&!Xe.isCompressedFormat(t.pixelFormat)&&D.isPowerOfTwo(t.width)&&D.isPowerOfTwo(t.height)){n=Vt.LINEAR_MIPMAP_LINEAR;let r=Rt.maximumTextureFilterAnisotropy,a=Math.min(r,this._maximumAnisotropy??r),s=i0e(n,i,a),c=e.cache.imageryLayerMipmapSamplers;l(c)||(c={},e.cache.imageryLayerMipmapSamplers=c);let u=c[s];l(u)||(u=c[s]=new jt({wrapS:un.CLAMP_TO_EDGE,wrapT:un.CLAMP_TO_EDGE,minificationFilter:n,magnificationFilter:i,maximumAnisotropy:a})),t.generateMipmap(_d.NICEST),t.sampler=u}else{let r=i0e(n,i,0),a=e.cache.imageryLayerNonMipmapSamplers;l(a)||(a={},e.cache.imageryLayerNonMipmapSamplers=a);let s=a[r];l(s)||(s=a[r]=new jt({wrapS:un.CLAMP_TO_EDGE,wrapT:un.CLAMP_TO_EDGE,minificationFilter:n,magnificationFilter:i})),t.sampler=s}};Ni.prototype._reprojectTexture=function(e,t,n){let i=t.textureWebMercator||t.texture,o=t.rectangle,r=e.context;if(n=n??!0,n&&!(this._imageryProvider.tilingScheme.projection instanceof ji)&&o.width/i.width>1e-5){let a=this;t.addReference();let s=new wl({persists:!0,owner:this,preExecute:function(c){_Je(c,r,i,t.rectangle)},postExecute:function(c){t.texture=c,a._finalizeReprojectTexture(r,c),t.state=Vn.READY,t.releaseReference()},canceled:function(){t.state=Vn.TEXTURE_LOADED,t.releaseReference()}});this._reprojectComputeCommands.push(s)}else n&&(t.texture=i),this._finalizeReprojectTexture(r,i),t.state=Vn.READY};Ni.prototype.queueReprojectionCommands=function(e){let t=this._reprojectComputeCommands,n=t.length;for(let i=0;i<n;++i)e.commandList.push(t[i]);t.length=0};Ni.prototype.cancelReprojections=function(){this._reprojectComputeCommands.forEach(function(e){l(e.canceled)&&e.canceled()}),this._reprojectComputeCommands.length=0};Ni.prototype.getImageryFromCache=function(e,t,n,i){let o=a0e(e,t,n),r=this._imageryCache[o];return l(r)||(r=new nS(this,e,t,n,i),this._imageryCache[o]=r),r.addReference(),r};Ni.prototype.removeImageryFromCache=function(e){let t=a0e(e.x,e.y,e.level);delete this._imageryCache[t]};function a0e(e,t,n){return JSON.stringify([e,t,n])}var Uj={u_textureDimensions:function(){return this.textureDimensions},u_texture:function(){return this.texture},textureDimensions:new z,texture:void 0},gJe=sn.supportsTypedArrays()?new Float32Array(128):void 0;function _Je(e,t,n,i){let o=t.cache.imageryLayer_reproject;if(!l(o)){o=t.cache.imageryLayer_reproject={vertexArray:void 0,shaderProgram:void 0,sampler:void 0,destroy:function(){l(this.framebuffer)&&this.framebuffer.destroy(),l(this.vertexArray)&&this.vertexArray.destroy(),l(this.shaderProgram)&&this.shaderProgram.destroy()}};let y=new Float32Array(256),x=0;for(let w=0;w<64;++w){let P=w/63;y[x++]=0,y[x++]=P,y[x++]=1,y[x++]=P}let b={position:0,webMercatorT:1},C=Uo.getRegularGridIndices(2,64),E=Ke.createIndexBuffer({context:t,typedArray:C,usage:Oe.STATIC_DRAW,indexDatatype:Ue.UNSIGNED_SHORT});o.vertexArray=new Fn({context:t,attributes:[{index:b.position,vertexBuffer:Ke.createVertexBuffer({context:t,typedArray:y,usage:Oe.STATIC_DRAW}),componentsPerAttribute:2},{index:b.webMercatorT,vertexBuffer:Ke.createVertexBuffer({context:t,sizeInBytes:512,usage:Oe.STREAM_DRAW}),componentsPerAttribute:1}],indexBuffer:E});let S=new He({sources:[yL]});o.shaderProgram=Kt.fromCache({context:t,vertexShaderSource:S,fragmentShaderSource:AL,attributeLocations:b}),o.sampler=new jt({wrapS:un.CLAMP_TO_EDGE,wrapT:un.CLAMP_TO_EDGE,minificationFilter:Vt.LINEAR,magnificationFilter:ti.LINEAR})}n.sampler=o.sampler;let r=n.width,a=n.height;Uj.textureDimensions.x=r,Uj.textureDimensions.y=a,Uj.texture=n;let s=Math.sin(i.south),c=.5*Math.log((1+s)/(1-s));s=Math.sin(i.north);let f=1/(.5*Math.log((1+s)/(1-s))-c),d=new It({context:t,width:r,height:a,pixelFormat:n.pixelFormat,pixelDatatype:n.pixelDatatype,preMultiplyAlpha:n.preMultiplyAlpha});D.isPowerOfTwo(r)&&D.isPowerOfTwo(a)&&d.generateMipmap(_d.NICEST);let p=i.south,g=i.north,m=gJe,A=0;for(let y=0;y<64;++y){let x=y/63,b=D.lerp(p,g,x);s=Math.sin(b);let E=(.5*Math.log((1+s)/(1-s))-c)*f;m[A++]=E,m[A++]=E}o.vertexArray.getAttribute(1).vertexBuffer.copyFromArrayView(m),e.shaderProgram=o.shaderProgram,e.outputTexture=d,e.uniformMap=Uj,e.vertexArray=o.vertexArray}function AJe(e,t,n){let i=e._imageryProvider,o=i.tilingScheme,r=o.ellipsoid,a=e._imageryProvider.tilingScheme.projection instanceof ji?1:Math.cos(n),s=o.rectangle,u=r.maximumRadius*s.width*a/(i.tileWidth*o.getNumberOfXTilesAtLevel(0))/t,f=Math.log(u)/Math.log(2);return Math.round(f)|0}function yJe(e,t){e.numberOfListeners>0?e.raiseEvent(t):console.error(t)}async function xJe(e,t){let n;try{if(n=await Promise.resolve(t),e.isDestroyed())return;e._imageryProvider=n,e._readyEvent.raiseEvent(n)}catch(i){yJe(e._errorEvent,i)}}var ya=Ni;var xK=class{constructor(){this.alpha=!1,this.brightness=!1,this.contrast=!1,this.hue=!1,this.saturation=!1,this.gamma=!1,this.colorToAlpha=!1}},xL=xK;var bK=class{constructor(t,n,i,o){this._minX=t??0,this._minY=n??0,this._maxX=i??0,this._maxY=o??0}get minX(){return this._minX}set minX(t){this._minX=t}get minY(){return this._minY}set minY(t){this._minY=t}get maxX(){return this._maxX}set maxX(t){this._maxX=t}get maxY(){return this._maxY}set maxY(t){this._maxY=t}contains(t,n){return t>=this.minX&&t<this.maxX&&n>=this.minY&&n<this.maxY}containsExclusive(t,n){return t>this.minX&&t<this.maxX&&n>this.minY&&n<this.maxY}containsInclusive(t,n){return t>=this.minX&&t<=this.maxX&&n>=this.minY&&n<=this.maxY}},oS=bK;var bJe=new oe,s0e=new oe,CJe=new oe,TJe=new oe,EJe=new oe,vJe=new oe,CK=class e{constructor(t,n,i,o,r){this._x=t,this._y=n,this._level=i,this._textureCoordinateRectangle=o,this._imagery=r}get x(){return this._x}get y(){return this._y}get level(){return this._level}get textureCoordinateRectangle(){return this._textureCoordinateRectangle}get imagery(){return this._imagery}static createImageryCoverages(t,n,i){if(!n.show)return[];let o=n.imageryProvider,r=e._clampImageryLevel(o,i),a=oe.intersection(o.rectangle,n.rectangle,bJe),s=o.tilingScheme,c=e._computeImageryRange(t,a,s,r),u=TJe;s.rectangleToNativeRectangle(t,u);let f=EJe;s.rectangleToNativeRectangle(a,f);let d=(g,m,A)=>{let y=s.tileXYToRectangle(g,m,A),x=oe.intersection(y,a,CJe);if(!l(x))return;let b=vJe;return s.rectangleToNativeRectangle(x,b),b};return e._computeImageryCoverages(n,c,r,u,d)}static _clampImageryLevel(t,n){let i=t.minimumLevel??0,o=t.maximumLevel??Number.POSITIVE_INFINITY,r=Math.min(o-1,Math.max(i,n));return Math.floor(r)}static _computeImageryRange(t,n,i,o){let r=e._computeOverlappedRectangle(t,n),a=i.positionToTileXY(oe.northwest(r),o),s=i.positionToTileXY(oe.southeast(r),o),c=new oS;c.minX=a.x,c.minY=a.y,c.maxX=s.x,c.maxY=s.y;let u=t.width/512,f=t.height/512,d=i.tileXYToRectangle(c.minX,c.minY,o);Math.abs(d.south-t.north)<f&&c.minY<c.maxY&&++c.minY,Math.abs(d.east-t.west)<u&&c.minX<c.maxX&&++c.minX;let m=i.tileXYToRectangle(c.maxX,c.maxY,o);return Math.abs(m.north-t.south)<f&&c.maxY>c.minY&&--c.maxY,Math.abs(m.west-t.east)<u&&c.maxX>c.minX&&--c.maxX,c}static _clampRectangle(t,n,i){return l(i)||(i=new oe),t.south>=n.north?i.north=i.south=n.north:t.north<=n.south?i.north=i.south=n.south:(i.south=Math.max(t.south,n.south),i.north=Math.min(t.north,n.north)),t.west>=n.east?i.west=i.east=n.east:t.east<=n.west?i.west=i.east=n.west:(i.west=Math.max(t.west,n.west),i.east=Math.min(t.east,n.east)),i}static _computeOverlappedRectangle(t,n){let i=oe.intersection(t,n,s0e);return l(i)?i:e._clampRectangle(t,n,s0e)}static _computeImageryCoverages(t,n,i,o,r){let a=[];for(let s=n.minX;s<=n.maxX;s++){let c=r(s,n.maxY,i);if(l(c))for(let u=n.minY;u<=n.maxY;u++){let f=r(s,u,i);if(!l(f))continue;let d=e._localizeToCartesianRectangle(f,o,void 0),p=t.getImageryFromCache(s,u,i),g=new e(s,u,i,d,p);a.push(g)}}return a}static _localizeToCartesianRectangle(t,n,i){l(i)||(i=new oS);let o=1/n.width,r=1/n.height;return i.minX=(t.west-n.west)*o,i.minY=(t.south-n.south)*r,i.maxX=(t.east-n.west)*o,i.maxY=(t.north-n.south)*r,i}},rS=CK;var TK=class e{static createTextureCoordinatesForMappedPositions(t,n){let i=t.cartographicPositions,o=t.cartographicBoundingRectangle,r=t.numPositions;return e._createTextureCoordinates(i,r,o,n)}static _createTextureCoordinates(t,n,i,o){let r=new Je;Je.fromRectangle(i,o,r);let a=e.createProjectedPositions(t,o),s=e.computeTexCoords(a,r);return e.createTypedArrayFromCartesians2(n,s)}static createTextureCoordinatesAttributeForMappedPositions(t,n){let i=e.createTextureCoordinatesForMappedPositions(t,n);return e.createTexCoordAttribute(i)}static createCartographicPositions(t,n,i){let o=hs.readAttributeAsTypedArray(t),r=t.type,a=Ft.getNumberOfComponents(r),s=e.createIterableCartesian3FromTypedArray(o,a),c=e.transformCartesians3(s,n);return e.transformToCartographic(c,i)}static createIterableCartesian3FromTypedArray(t,n){let i=new h,o=t.length/n;return{[Symbol.iterator]:function*(){for(let a=0;a<o;a++)i.x=t[a*n+0],i.y=t[a*n+1],i.z=t[a*n+2],yield i}}}static map(t,n){return{[Symbol.iterator]:function*(){for(let o of t)yield n(o)}}}static computeCartographicBoundingRectangle(t,n){l(n)||(n=new oe);let i=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY;for(let s of t)i=Math.max(i,s.latitude),o=Math.min(o,s.latitude),r=Math.max(r,s.longitude),a=Math.min(a,s.longitude);return n.north=i,n.south=o,n.east=r,n.west=a,n}static transformCartesians3(t,n){let i=new h;return e.map(t,r=>(M.multiplyByPoint(n,r,i),i))}static transformToCartographic(t,n){let i=new de;return e.map(t,r=>(n.cartesianToCartographic(r,i),i))}static createProjectedPositions(t,n){let i=new h;return e.map(t,r=>(n.project(r,i),i))}static computeTexCoords(t,n){let i=new z,o=1/n.width,r=1/n.height;return e.map(t,s=>{let c=(s.x-n.x)*o,u=(s.y-n.y)*r,f=Math.min(Math.max(c,0),1),d=Math.min(Math.max(u,0),1);return i.x=f,i.y=d,i})}static createTypedArrayFromCartesians2(t,n){let i=new Float32Array(t*2),o=0;for(let r of n)i[o*2+0]=r.x,i[o*2+1]=r.y,o++;return i}static createTexCoordAttribute(t){return{name:"Imagery Texture Coordinates",semantic:it.TEXCOORD,setIndex:0,componentDatatype:Y.FLOAT,type:Ft.VEC2,normalized:!1,count:t.length/2,min:void 0,max:void 0,constant:new z(0,0),quantization:void 0,typedArray:t,byteOffset:0,byteStride:void 0}}},Pb=TK;var EK=class{constructor(t,n,i,o){this._cartographicPositions=t,this._numPositions=n,this._cartographicBoundingRectangle=i,this._ellipsoid=o}get cartographicPositions(){return this._cartographicPositions}get numPositions(){return this._numPositions}get cartographicBoundingRectangle(){return this._cartographicBoundingRectangle}get ellipsoid(){return this._ellipsoid}},bL=EK;var vK=class e{constructor(t,n,i){this._model=t,this._runtimeNode=n,this._runtimePrimitive=i,this._mappedPositionsPerEllipsoid=void 0,this._mappedPositionsModelMatrix=new M,this._lastImageryLayersModificationCounter=0,this._imageryTexCoordAttributesPerProjection=void 0,this._currentImageryLayers=void 0,this._coveragesPerLayer=void 0,this._allImageriesReady=!1}coveragesForImageryLayer(t){let o=this._model.imageryLayers.indexOf(t);if(o===-1)throw new _e("Imagery layer is not part of the model");let r=this._coveragesPerLayer;if(!l(r))throw new _e("The coveragesPerLayer have not been computed yet");return r[o]}update(t){let n=this._model,r=n.content.tileset.imageryLayersModificationCounter;this._lastImageryLayersModificationCounter!==r&&(delete this._mappedPositionsPerEllipsoid,this._lastImageryLayersModificationCounter=r),this._mappedPositionsNeedUpdate&&(n.resetDrawCommands(),this._mappedPositionsPerEllipsoid=this._computeMappedPositionsPerEllipsoid(),this._deleteCoveragesPerLayer(),this._destroyImageryTexCoordAttributes()),l(this._imageryTexCoordAttributesPerProjection)||(this._imageryTexCoordAttributesPerProjection=this._computeImageryTexCoordsAttributesPerProjection(),this._uploadImageryTexCoordAttributes(t.context)),l(this._coveragesPerLayer)||(this._computeCoveragesPerLayer(),this._allImageriesReady=!1),this._allImageriesReady||this._updateImageries(t)}_deleteCoveragesPerLayer(){let t=this._coveragesPerLayer;if(!l(t))return;let n=this._currentImageryLayers,i=t.length;for(let o=0;o<i;o++){let r=n[o],a=t[o];this._deleteCoverages(r,a)}delete this._currentImageryLayers,delete this._coveragesPerLayer}_deleteCoverages(t,n){if(t.isDestroyed())return;let i=n.length;for(let o=0;o<i;o++)n[o].imagery.releaseReference()}_uploadImageryTexCoordAttributes(t){let n=this._imageryTexCoordAttributesPerProjection;if(!l(n))return;let i=n.length;for(let o=0;o<i;o++){let r=n[o],a=Ke.createVertexBuffer({context:t,typedArray:r.typedArray,usage:Oe.STATIC_DRAW});a.vertexArrayDestroyable=!1,r.buffer=a}}_destroyImageryTexCoordAttributes(){let t=this._imageryTexCoordAttributesPerProjection;if(!l(t))return;let n=t.length;for(let i=0;i<n;i++){let o=t[i];l(o)&&(l(o.buffer)&&(o.buffer.isDestroyed()||o.buffer.destroy()),t[i]=void 0)}delete this._imageryTexCoordAttributesPerProjection}get _mappedPositionsNeedUpdate(){if(!l(this._mappedPositionsPerEllipsoid))return!0;let t=this._model,n=this._mappedPositionsModelMatrix;return!M.equals(t.modelMatrix,n)}_computeMappedPositionsPerEllipsoid(){let t=this._model,n=this._runtimeNode,i=this._runtimePrimitive,o=e._obtainPrimitivePositionAttribute(i.primitive),r=o.count,a=e._computePrimitivePositionTransform(t,n,void 0),s=[],c=e._computeUniqueEllipsoids(t.imageryLayers),u=c.length;for(let f=0;f<u;f++){let d=c[f],p=Pb.createCartographicPositions(o,a,d),g=Pb.computeCartographicBoundingRectangle(p),m=new bL(p,r,g,d);s.push(m)}return M.clone(t.modelMatrix,this._mappedPositionsModelMatrix),s}static _computeUniqueEllipsoids(t){let n=new Set,i=t.length;for(let o=0;o<i;o++){let r=t.get(o),a=e._getEllipsoid(r);n.add(a)}return[...n]}_computeImageryTexCoordsAttributesPerProjection(){let n=this._model.imageryLayers,i=e._extractProjections(n),o=[...new Set(i)];return this._createImageryTexCoordAttributes(o)}static _extractProjections(t){let n=[],i=t.length;for(let o=0;o<i;o++){let r=t.get(o),a=e._getProjection(r);n.push(a)}return n}static _getProjection(t){return t.imageryProvider.tilingScheme.projection}_createImageryTexCoordAttributes(t){let n=[],i=t.length;for(let o=0;o<i;o++){let r=t[o],a=r.ellipsoid,s=this.mappedPositionsForEllipsoid(a),c=Pb.createTextureCoordinatesAttributeForMappedPositions(s,r);n.push(c)}return n}_computeCoveragesPerLayer(){let t=[],n=[],o=this._model.imageryLayers,r=o.length;for(let a=0;a<r;a++){let s=o.get(a),c=this._computeCoverage(s);t.push(c),n.push(s)}this._coveragesPerLayer=t,this._currentImageryLayers=n}_computeCoverage(t){let i=this.mappedPositionsForImageryLayer(t).cartographicBoundingRectangle,o=this._computeImageryLevel(t,i);return rS.createImageryCoverages(i,t,o)}_computeImageryLevel(t,n){let i=t.imageryProvider,r=i.tilingScheme.rectangle,a=1,s=n.width,c=r.width;n.height>n.width&&(s=n.height,c=r.height);let u=Math.log2(a*c/s);return rS._clampImageryLevel(i,u)}_updateImageries(t){let n=this._model,i=this._coveragesPerLayer,o=i.length,r=!0;for(let a=0;a<o;a++){let s=i[a],c=s.length;for(let u=0;u<c;u++){let d=s[u].imagery;d.state===Vn.READY||d.state===Vn.FAILED||d.state===Vn.INVALID||(r=!1,d.processStateMachine(t,!1,!1))}}r&&n.resetDrawCommands(),this._allImageriesReady=r}mappedPositionsForImageryLayer(t){let n=e._getEllipsoid(t);return this.mappedPositionsForEllipsoid(n)}mappedPositionsForEllipsoid(t){let n=this._mappedPositionsPerEllipsoid;if(!l(n))throw new _e("The mappedPositions have not been computed yet");let i=n.length;for(let o=0;o<i;o++){let r=n[o];if(r.ellipsoid===t)return r}throw new _e(`Could not find mapped positions for ellipsoid ${t}`)}imageryTexCoordAttributesPerProjection(){let t=this._imageryTexCoordAttributesPerProjection;if(!l(t))throw new _e("The imagery texture coordinate attributes have not been computed yet");return this._imageryTexCoordAttributesPerProjection}get ready(){let t=this._coveragesPerLayer;return l(t)?this._allImageriesReady:!1}isDestroyed(){return!1}destroy(){if(!this.isDestroyed())return this._deleteCoveragesPerLayer(),this._destroyImageryTexCoordAttributes(),fe(this)}static _computePrimitivePositionTransform(t,n,i){l(i)||(i=new M);let o=t.sceneGraph;return M.clone(M.IDENTITY,i),M.multiply(i,t.modelMatrix,i),M.multiply(i,o.components.transform,i),M.multiply(i,o.axisCorrectionMatrix,i),M.multiply(i,n.computedTransform,i),i}static _obtainPrimitivePositionAttribute(t){let n=ht.getAttributeBySemantic(t,"POSITION");if(!l(n))throw new _e("The primitive does not have a POSITION attribute");return n}static _getEllipsoid(t){return t.imageryProvider.tilingScheme.projection.ellipsoid}},Rb=vK;var SK=class{constructor(t,n,i,o,r){this.imageryLayer=t,this.texture=n,this.textureTranslationAndScale=i,this.textureCoordinateRectangle=o,this.imageryTexCoordAttributeSetIndex=r}},CL=SK;var SJe=!1,wJe=new oe,IJe=new oe,wK=class e{static process(t,n,i){let o=t.model,r=n.modelPrimitiveImagery;if(!l(r)||!r.ready)return;let a=o.imageryLayers,s=Rb._extractProjections(a),c=[...new Set(s)],u=e._computeIndexMapping(s,c),f=e._createImageryInputs(a,r,u);if(f.length===0)return;f.length>10&&(_t("imagery-texture-units",`Warning: Draped imagery requires ${f.length} texture units, truncating`),f.length=10),e._addImageryTexCoordAttributesToRenderResources(r,t);let d=[];for(let p=0;p<a.length;p++)d.push(a.get(p));e._processImageryInputs(d,t,f,c.length)}static _addImageryTexCoordAttributesToRenderResources(t,n){let i=t.imageryTexCoordAttributesPerProjection();for(let o of i)e._addImageryTexCoordAttributeToRenderResources(o,n)}static _addImageryTexCoordAttributeToRenderResources(t,n){let i=Ft.getNumberOfComponents(t.type),o={index:n.attributeIndex++,value:l(t.buffer)?void 0:t.constant,vertexBuffer:t.buffer,count:t.count,componentsPerAttribute:i,componentDatatype:t.componentDatatype,offsetInBytes:t.byteOffset,strideInBytes:t.byteStride,normalize:t.normalized};n.attributes.push(o)}static _processImageryInputs(t,n,i,o){let r=n.shaderBuilder,a=e._computeImageryFlags(t),s=i.length;r.addDefine("HAS_IMAGERY"),r.addDefine(`IMAGERY_TEXTURE_UNITS ${s}`),e._addAttributes(r,o),e._defineUniforms(r,a),e._buildSampleAndBlendFunction(r,a),e._createMainImageryShader(r,i,a);let c=n.uniformMap,u=e._createImageryUniforms(i);e._setImageryUniforms(c,u)}static _addAttributes(t,n){for(let r=0;r<n;r++)t.addAttribute("vec2",`a_imagery_texCoord_${r}`),t.addVarying("vec2",`v_imagery_texCoord_${r}`);let i="initializeImageryAttributes",o=`void ${i}()`;t.addFunction(i,o,he.VERTEX);for(let r=0;r<n;r++)t.addFunctionLines(i,[`v_imagery_texCoord_${r} = a_imagery_texCoord_${r};`])}static _computeImageryFlags(t){let n=new xL;for(let i=0;i<t.length;i++){let o=t[i];n.alpha|=o.alpha!==1,n.brightness|=o.brightness!==ya.DEFAULT_BRIGHTNESS,n.contrast|=o.contrast!==ya.DEFAULT_CONTRAST,n.hue|=o.hue!==ya.DEFAULT_HUE,n.saturation|=o.saturation!==ya.DEFAULT_SATURATION,n.gamma|=o.gamma!==ya.DEFAULT_GAMMA;let r=l(o.colorToAlpha)&&o.colorToAlphaThreshold>0;n.colorToAlpha|=r}return n}static _defineUniforms(t,n){t.addUniform("sampler2D","u_imageryTextures[IMAGERY_TEXTURE_UNITS]",he.FRAGMENT),t.addUniform("vec4","u_imageryTextureCoordinateRectangle[IMAGERY_TEXTURE_UNITS]",he.FRAGMENT),t.addUniform("vec4","u_imageryTextureTranslationAndScale[IMAGERY_TEXTURE_UNITS]",he.FRAGMENT),n.alpha&&t.addUniform("float","u_imageryTextureAlpha[IMAGERY_TEXTURE_UNITS]",he.FRAGMENT),n.brightness&&t.addUniform("float","u_imageryTextureBrightness[IMAGERY_TEXTURE_UNITS]",he.FRAGMENT),n.contrast&&t.addUniform("float","u_imageryTextureContrast[IMAGERY_TEXTURE_UNITS]",he.FRAGMENT),n.hue&&t.addUniform("float","u_imageryTextureHue[IMAGERY_TEXTURE_UNITS]",he.FRAGMENT),n.saturation&&t.addUniform("float","u_imageryTextureSaturation[IMAGERY_TEXTURE_UNITS]",he.FRAGMENT),n.gamma&&t.addUniform("float","u_imageryTextureOneOverGamma[IMAGERY_TEXTURE_UNITS]",he.FRAGMENT),n.colorToAlpha&&t.addUniform("vec4","u_imageryTextureColorToAlpha[IMAGERY_TEXTURE_UNITS]",he.FRAGMENT)}static _createSampleAndBlendFunctionSignature(t){let n="sampleAndBlend",i=[];i.push("vec4 previousColor"),i.push("sampler2D textureToSample"),i.push("vec2 textureCoordinates"),i.push("vec4 textureCoordinateRectangle"),i.push("vec4 textureCoordinateTranslationAndScale"),t.alpha&&i.push("float textureAlpha"),t.brightness&&i.push("float textureBrightness"),t.contrast&&i.push("float textureContrast"),t.hue&&i.push("float textureHue"),t.saturation&&i.push("float textureSaturation"),t.gamma&&i.push("float textureOneOverGamma"),t.colorToAlpha&&i.push("vec4 colorToAlpha");let o=i.join(", ");return`vec4 ${n}(${o})`}static _buildSampleAndBlendFunction(t,n){let i="sampleAndBlend",o=e._createSampleAndBlendFunctionSignature(n);t.addFunction(i,o,he.FRAGMENT),t.addFunctionLines(i,["float effectiveAlpha = 1.0;"]),n.alpha&&t.addFunctionLines(i,["effectiveAlpha = textureAlpha;"]),t.addFunctionLines(i,["if (textureCoordinates.x < textureCoordinateRectangle.x) effectiveAlpha = 0.0;","if (textureCoordinates.x > textureCoordinateRectangle.z) effectiveAlpha = 0.0;","if (textureCoordinates.y < textureCoordinateRectangle.y) effectiveAlpha = 0.0;","if (textureCoordinates.y > textureCoordinateRectangle.w) effectiveAlpha = 0.0;","vec2 translation = textureCoordinateTranslationAndScale.xy;","vec2 scale = textureCoordinateTranslationAndScale.zw;","vec2 effectiveTextureCoordinates = textureCoordinates * scale + translation;","vec4 value = texture(textureToSample, effectiveTextureCoordinates);","value = czm_srgbToLinear(value);","vec3 color = value.rgb;","float alpha = value.a;"]),n.colorToAlpha&&t.addFunctionLines(i,["vec3 colorDiff = abs(color.rgb - colorToAlpha.rgb);","colorDiff.r = czm_maximumComponent(colorDiff);","alpha = czm_branchFreeTernary(colorDiff.r < colorToAlpha.a, 0.0, alpha);"]),n.gamma?t.addFunctionLines(i,["color = pow(color, vec3(textureOneOverGamma));"]):t.addFunctionLines(i,["vec4 tempColor = czm_gammaCorrect(vec4(color, alpha));","color = tempColor.rgb;","alpha = tempColor.a;"]),n.brightness&&t.addFunctionLines(i,["color = mix(vec3(0.0), color, textureBrightness);"]),n.contrast&&t.addFunctionLines(i,["color = mix(vec3(0.5), color, textureContrast);"]),n.hue&&t.addFunctionLines(i,["color = czm_hue(color, textureHue);"]),n.saturation&&t.addFunctionLines(i,["color = czm_saturation(color, textureSaturation);"]),t.addFunctionLines(i,["float sourceAlpha = alpha * effectiveAlpha;","float outAlpha = mix(previousColor.a, 1.0, sourceAlpha);","outAlpha += sign(outAlpha) - 1.0;","vec3 outColor = mix(previousColor.rgb * previousColor.a, color, sourceAlpha) / outAlpha;","vec4 result = vec4(outColor, max(outAlpha, 0.0));"]),SJe&&t.addFunctionLines(i,["if (abs(textureCoordinates.x - textureCoordinateRectangle.x) < (1.0/256.0) || "," abs(textureCoordinates.x - textureCoordinateRectangle.z) < (1.0/256.0) || "," abs(textureCoordinates.y - textureCoordinateRectangle.y) < (1.0/256.0) || "," abs(textureCoordinates.y - textureCoordinateRectangle.w) < (1.0/256.0))","{"," result = vec4(1.0, 0.0, 0.0, effectiveAlpha);","}"]),t.addFunctionLines(i,["return result;"])}static _createSampleAndBlendCallArguments(t,n,i){let o=`v_imagery_texCoord_${n}`,r=[];return r.push("blendedBaseColor"),r.push(`u_imageryTextures[${i}]`),r.push(`${o}`),r.push(`u_imageryTextureCoordinateRectangle[${i}]`),r.push(`u_imageryTextureTranslationAndScale[${i}]`),t.alpha&&r.push(`u_imageryTextureAlpha[${i}]`),t.brightness&&r.push(`u_imageryTextureBrightness[${i}]`),t.contrast&&r.push(`u_imageryTextureContrast[${i}]`),t.hue&&r.push(`u_imageryTextureHue[${i}]`),t.saturation&&r.push(`u_imageryTextureSaturation[${i}]`),t.gamma&&r.push(`u_imageryTextureOneOverGamma[${i}]`),t.colorToAlpha&&r.push(`u_imageryTextureColorToAlpha[${i}]`),r.join(", ")}static _createMainImageryShader(t,n,i){let o="blendBaseColorWithImagery";t.addFunction(o,"vec4 blendBaseColorWithImagery(vec4 baseColorWithAlpha)",he.FRAGMENT),t.addFunctionLines(o,["vec4 blendedBaseColor = baseColorWithAlpha;"]);for(let r=0;r<n.length;r++){let s=n[r].imageryTexCoordAttributeSetIndex,c=e._createSampleAndBlendCallArguments(i,s,r);t.addFunctionLines(o,[`blendedBaseColor = sampleAndBlend(${c});`])}t.addFunctionLines(o,["return blendedBaseColor;"])}static _createImageryUniforms(t){let n=t.length,i={};i.imageryTextures=Array(n),i.imageryTextureCoordinateRectangle=Array(n),i.imageryTextureTranslationAndScale=Array(n),i.imageryTextureAlpha=Array(n),i.imageryTextureBrightness=Array(n),i.imageryTextureContrast=Array(n),i.imageryTextureHue=Array(n),i.imageryTextureSaturation=Array(n),i.imageryTextureOneOverGamma=Array(n),i.imageryTextureColorToAlpha=Array(n);for(let o=0;o<n;o++){let r=t[o],a=r.imageryLayer,s=r.texture,c=r.textureCoordinateRectangle,u=r.textureTranslationAndScale;i.imageryTextures[o]=s,i.imageryTextureTranslationAndScale[o]=u,i.imageryTextureCoordinateRectangle[o]=c,i.imageryTextureAlpha[o]=a.alpha,i.imageryTextureBrightness[o]=a.brightness,i.imageryTextureContrast[o]=a.contrast,i.imageryTextureHue[o]=a.hue,i.imageryTextureSaturation[o]=a.saturation,i.imageryTextureOneOverGamma[o]=1/a.gamma;let f=i.imageryTextureColorToAlpha[o];if(l(f)||(f=new se,i.imageryTextureColorToAlpha[o]=f),l(a.colorToAlpha)&&a.colorToAlphaThreshold>0){let p=a.colorToAlpha;f.x=p.red,f.y=p.green,f.z=p.blue,f.w=a.colorToAlphaThreshold}else f.w=-1}return i}static _setImageryUniforms(t,n){for(let i in n)if(n.hasOwnProperty(i)){let o=`u_${i}`;t[o]=function(){return n[i]}}}static _createImageryInputs(t,n,i){let o=[];for(let r=0;r<t.length;r++){let a=t.get(r);if(!a.show)continue;let s=i[r],u=n.mappedPositionsForImageryLayer(a).cartographicBoundingRectangle,f=n.coveragesForImageryLayer(a);for(let d=0;d<f.length;d++){let p=f[d],g=e._createImageryInput(a,p,u,s);l(g)&&o.push(g)}}return o}static _createImageryInput(t,n,i,o){let r=n.imagery;if(r.state===Vn.FAILED||r.state===Vn.INVALID)return;let a=r.textureWebMercator;if(!l(a)&&(a=r.texture,!l(a))){r.state===Vn.READY&&console.log(`Imagery at ${n.x}, ${n.y} (level ${n.level}) does not have any texture - state ${r.state}`);return}let s=e._computeTextureTranslationAndScale(t,i,r.rectangle),c=n.textureCoordinateRectangle,u=new se(c.minX,c.minY,c.maxX,c.maxY);return new CL(t,a,s,u,o)}static _computeTextureTranslationAndScale(t,n,i){let o=t.imageryProvider.tilingScheme,r=o.rectangleToNativeRectangle(n,wJe),a=o.rectangleToNativeRectangle(i,IJe);return e._computeTextureTranslationAndScaleFromNative(r,a)}static _computeTextureTranslationAndScaleFromNative(t,n){let i=1/n.width,o=1/n.height,r=t.west-n.west,a=t.south-n.south,s=r*i,c=a*o,u=t.width*i,f=t.height*o;return new se(s,c,u,f)}static _computeIndexMapping(t,n){let i=[],o=t.length;for(let r=0;r<o;r++){let a=t[r],s=n.indexOf(a);i.push(s)}return i}},TL=wK;var EL=`#ifdef USE_IBL_LIGHTING
- vec3 computeIBL(vec3 position, vec3 normal, vec3 lightDirection, vec3 lightColorHdr, czm_modelMaterial material)
- {
- #if defined(DIFFUSE_IBL) || defined(SPECULAR_IBL)
- // Environment maps were provided, use them for IBL
- vec3 viewDirection = -normalize(position);
- vec3 iblColor = textureIBL(viewDirection, normal, material);
- return iblColor;
- #endif
-
- return vec3(0.0);
- }
- #endif
-
- #ifdef USE_CLEARCOAT
- vec3 addClearcoatReflection(vec3 baseLayerColor, vec3 position, vec3 lightDirection, vec3 lightColorHdr, czm_modelMaterial material)
- {
- vec3 viewDirection = -normalize(position);
- vec3 halfwayDirection = normalize(viewDirection + lightDirection);
- vec3 normal = material.clearcoatNormal;
- float NdotL = clamp(dot(normal, lightDirection), 0.001, 1.0);
-
- // clearcoatF0 = vec3(pow((ior - 1.0) / (ior + 1.0), 2.0)), but without KHR_materials_ior, ior is a constant 1.5.
- vec3 f0 = vec3(0.04);
- vec3 f90 = vec3(1.0);
- // Note: clearcoat Fresnel computed with dot(n, v) instead of dot(v, h).
- // This is to make it energy conserving with a simple layering function.
- float NdotV = clamp(dot(normal, viewDirection), 0.0, 1.0);
- vec3 F = fresnelSchlick2(f0, f90, NdotV);
-
- // compute specular reflection from direct lighting
- float roughness = material.clearcoatRoughness;
- float alphaRoughness = roughness * roughness;
- float directStrength = computeDirectSpecularStrength(normal, lightDirection, viewDirection, halfwayDirection, alphaRoughness);
- vec3 directReflection = F * directStrength * NdotL;
- vec3 color = lightColorHdr * directReflection;
-
- #ifdef SPECULAR_IBL
- // Find the direction in which to sample the environment map
- vec3 reflectMC = normalize(model_iblReferenceFrameMatrix * reflect(-viewDirection, normal));
- vec3 iblColor = computeSpecularIBL(reflectMC, NdotV, f0, roughness);
- color += iblColor * material.occlusion;
- #endif
-
- float clearcoatFactor = material.clearcoatFactor;
- vec3 clearcoatColor = color * clearcoatFactor;
-
- // Dim base layer based on transmission loss through clearcoat
- return baseLayerColor * (1.0 - clearcoatFactor * F) + clearcoatColor;
- }
- #endif
-
- #if defined(LIGHTING_PBR) && defined(HAS_NORMALS)
- vec3 computePbrLighting(in czm_modelMaterial material, in vec3 position)
- {
- #ifdef USE_CUSTOM_LIGHT_COLOR
- vec3 lightColorHdr = model_lightColorHdr;
- #else
- vec3 lightColorHdr = czm_lightColorHdr;
- #endif
-
- vec3 viewDirection = -normalize(position);
- vec3 normal = material.normalEC;
- vec3 lightDirection = normalize(czm_lightDirectionEC);
-
- vec3 directLighting = czm_pbrLighting(viewDirection, normal, lightDirection, material);
- vec3 directColor = lightColorHdr * directLighting;
-
- // Accumulate colors from base layer
- vec3 color = directColor + material.emissive;
- #ifdef USE_IBL_LIGHTING
- color += computeIBL(position, normal, lightDirection, lightColorHdr, material);
- #endif
-
- #ifdef USE_CLEARCOAT
- color = addClearcoatReflection(color, position, lightDirection, lightColorHdr, material);
- #endif
-
- return color;
- }
- #endif
-
- /**
- * Compute the material color under the current lighting conditions.
- * All other material properties are passed through so further stages
- * have access to them.
- *
- * @param {czm_modelMaterial} material The material properties from {@MaterialStageFS}
- * @param {ProcessedAttributes} attributes
- */
- void lightingStage(inout czm_modelMaterial material, ProcessedAttributes attributes)
- {
- #ifdef LIGHTING_PBR
- #ifdef HAS_NORMALS
- vec3 color = computePbrLighting(material, attributes.positionEC);
- #else
- vec3 color = material.diffuse * material.occlusion + material.emissive;
- #endif
- // In HDR mode, the frame buffer is in linear color space. The
- // post-processing stages (see PostProcessStageCollection) will handle
- // tonemapping. However, if HDR is not enabled, we must tonemap else large
- // values may be clamped to 1.0
- #ifndef HDR
- color = czm_pbrNeutralTonemapping(color);
- #endif
- #else // unlit
- vec3 color = material.diffuse;
- #endif
-
- #ifdef HAS_POINT_CLOUD_COLOR_STYLE
- // The colors resulting from point cloud styles are adjusted differently.
- color = czm_gammaCorrect(color);
- #elif !defined(HDR)
- // If HDR is not enabled, the frame buffer stores sRGB colors rather than
- // linear colors so the linear value must be converted.
- color = czm_linearToSrgb(color);
- #endif
-
- material.diffuse = color;
- }
- `;var c0e={UNLIT:0,PBR:1};Object.freeze(c0e);var Ip=c0e;var l0e={name:"LightingPipelineStage"};l0e.process=function(e,t){let{model:n,lightingOptions:i,shaderBuilder:o}=e;if(l(n.lightColor)){o.addDefine("USE_CUSTOM_LIGHT_COLOR",void 0,he.FRAGMENT),o.addUniform("vec3","model_lightColorHdr",he.FRAGMENT);let a=e.uniformMap;a.model_lightColorHdr=function(){return n.lightColor}}let{lightingModel:r}=i;r===Ip.PBR?o.addDefine("LIGHTING_PBR",void 0,he.FRAGMENT):o.addDefine("LIGHTING_UNLIT",void 0,he.FRAGMENT),o.addFragmentLines(EL)};var vL=l0e;var SL=`// If the style color is white, it implies the feature has not been styled.
- bool isDefaultStyleColor(vec3 color)
- {
- return all(greaterThan(color, vec3(1.0 - czm_epsilon3)));
- }
-
- vec3 blend(vec3 sourceColor, vec3 styleColor, float styleColorBlend)
- {
- vec3 blendColor = mix(sourceColor, styleColor, styleColorBlend);
- vec3 color = isDefaultStyleColor(styleColor.rgb) ? sourceColor : blendColor;
- return color;
- }
-
- #ifdef HAS_NORMAL_TEXTURE
- vec2 getNormalTexCoords()
- {
- vec2 texCoord = TEXCOORD_NORMAL;
- #ifdef HAS_NORMAL_TEXTURE_TRANSFORM
- texCoord = czm_computeTextureTransform(texCoord, u_normalTextureTransform);
- #endif
- return texCoord;
- }
- #endif
-
- #if defined(HAS_NORMAL_TEXTURE) || defined(HAS_CLEARCOAT_NORMAL_TEXTURE)
- vec3 computeTangent(in vec3 position, in vec2 normalTexCoords)
- {
- vec2 tex_dx = dFdx(normalTexCoords);
- vec2 tex_dy = dFdy(normalTexCoords);
- float determinant = tex_dx.x * tex_dy.y - tex_dy.x * tex_dx.y;
- vec3 tangent = tex_dy.t * dFdx(position) - tex_dx.t * dFdy(position);
- return tangent / determinant;
- }
- #endif
-
- #ifdef USE_ANISOTROPY
- struct NormalInfo {
- vec3 tangent;
- vec3 bitangent;
- vec3 normal;
- vec3 geometryNormal;
- };
-
- NormalInfo getNormalInfo(ProcessedAttributes attributes)
- {
- vec3 geometryNormal = attributes.normalEC;
- #ifdef HAS_NORMAL_TEXTURE
- vec2 normalTexCoords = getNormalTexCoords();
- #endif
-
- #ifdef HAS_BITANGENTS
- vec3 tangent = attributes.tangentEC;
- vec3 bitangent = attributes.bitangentEC;
- #else // Assume HAS_NORMAL_TEXTURE
- vec3 tangent = computeTangent(attributes.positionEC, normalTexCoords);
- tangent = normalize(tangent - geometryNormal * dot(geometryNormal, tangent));
- vec3 bitangent = normalize(cross(geometryNormal, tangent));
- #endif
-
- #ifdef HAS_NORMAL_TEXTURE
- mat3 tbn = mat3(tangent, bitangent, geometryNormal);
-
- vec3 normalSample;
- #if defined(HAS_NORMAL_CONSTANT_LOD) && defined(HAS_CONSTANT_LOD)
- #ifdef HAS_NORMAL_TEXTURE_TRANSFORM
- normalSample = constantLodTextureLookup(u_normalTexture, u_normalTextureConstantLodParams, u_normalTextureTransform).rgb;
- #else
- normalSample = constantLodTextureLookup(u_normalTexture, u_normalTextureConstantLodParams).rgb;
- #endif
- #else
- normalSample = texture(u_normalTexture, normalTexCoords).rgb;
- #endif
-
- normalSample = 2.0 * normalSample - 1.0;
- #ifdef HAS_NORMAL_TEXTURE_SCALE
- normalSample.xy *= u_normalTextureScale;
- #endif
- vec3 normal = normalize(tbn * normalSample);
- #else
- vec3 normal = geometryNormal;
- #endif
-
- #ifdef HAS_DOUBLE_SIDED_MATERIAL
- if (czm_backFacing()) {
- tangent *= -1.0;
- bitangent *= -1.0;
- normal *= -1.0;
- geometryNormal *= -1.0;
- }
- #endif
-
- NormalInfo normalInfo;
- normalInfo.tangent = tangent;
- normalInfo.bitangent = bitangent;
- normalInfo.normal = normal;
- normalInfo.geometryNormal = geometryNormal;
-
- return normalInfo;
- }
- #endif
-
- #if defined(HAS_NORMAL_TEXTURE) && !defined(HAS_WIREFRAME)
- vec3 getNormalFromTexture(ProcessedAttributes attributes, vec3 geometryNormal)
- {
- vec2 normalTexCoords = getNormalTexCoords();
-
- // If HAS_BITANGENTS is set, then HAS_TANGENTS is also set
- #ifdef HAS_BITANGENTS
- vec3 t = attributes.tangentEC;
- vec3 b = attributes.bitangentEC;
- #else
- vec3 t = computeTangent(attributes.positionEC, normalTexCoords);
- t = normalize(t - geometryNormal * dot(geometryNormal, t));
- vec3 b = normalize(cross(geometryNormal, t));
- #endif
-
- mat3 tbn = mat3(t, b, geometryNormal);
-
- vec3 normalSample;
- #if defined(HAS_NORMAL_CONSTANT_LOD) && defined(HAS_CONSTANT_LOD)
- #ifdef HAS_NORMAL_TEXTURE_TRANSFORM
- normalSample = constantLodTextureLookup(u_normalTexture, u_normalTextureConstantLodParams, u_normalTextureTransform).rgb;
- #else
- normalSample = constantLodTextureLookup(u_normalTexture, u_normalTextureConstantLodParams).rgb;
- #endif
- #else
- normalSample = texture(u_normalTexture, normalTexCoords).rgb;
- #endif
-
- normalSample = 2.0 * normalSample - 1.0;
- #ifdef HAS_NORMAL_TEXTURE_SCALE
- normalSample.xy *= u_normalTextureScale;
- #endif
- return normalize(tbn * normalSample);
- }
- #endif
-
- #ifdef HAS_CLEARCOAT_NORMAL_TEXTURE
- vec3 getClearcoatNormalFromTexture(ProcessedAttributes attributes, vec3 geometryNormal)
- {
- vec2 normalTexCoords = TEXCOORD_CLEARCOAT_NORMAL;
- #ifdef HAS_CLEARCOAT_NORMAL_TEXTURE_TRANSFORM
- normalTexCoords = vec2(u_clearcoatNormalTextureTransform * vec3(normalTexCoords, 1.0));
- #endif
-
- // If HAS_BITANGENTS is set, then HAS_TANGENTS is also set
- #ifdef HAS_BITANGENTS
- vec3 t = attributes.tangentEC;
- vec3 b = attributes.bitangentEC;
- #else
- vec3 t = computeTangent(attributes.positionEC, normalTexCoords);
- t = normalize(t - geometryNormal * dot(geometryNormal, t));
- vec3 b = normalize(cross(geometryNormal, t));
- #endif
-
- mat3 tbn = mat3(t, b, geometryNormal);
- vec3 normalSample = texture(u_clearcoatNormalTexture, normalTexCoords).rgb;
- normalSample = 2.0 * normalSample - 1.0;
- #ifdef HAS_CLEARCOAT_NORMAL_TEXTURE_SCALE
- normalSample.xy *= u_clearcoatNormalTextureScale;
- #endif
- return normalize(tbn * normalSample);
- }
- #endif
-
- #ifdef HAS_NORMALS
- vec3 computeNormal(ProcessedAttributes attributes)
- {
- // Geometry normal. This is already normalized
- vec3 normal = attributes.normalEC;
-
- #if defined(HAS_NORMAL_TEXTURE) && !defined(HAS_WIREFRAME)
- normal = getNormalFromTexture(attributes, normal);
- #endif
-
- #ifdef HAS_DOUBLE_SIDED_MATERIAL
- if (czm_backFacing()) {
- normal = -normal;
- }
- #endif
-
- return normal;
- }
- #endif
-
- #ifdef HAS_BASE_COLOR_TEXTURE
- vec4 getBaseColorFromTexture()
- {
- vec2 baseColorTexCoords = TEXCOORD_BASE_COLOR;
- #ifdef HAS_BASE_COLOR_TEXTURE_TRANSFORM
- baseColorTexCoords = czm_computeTextureTransform(baseColorTexCoords, u_baseColorTextureTransform);
- #endif
-
- vec4 baseColorWithAlpha;
- #if defined(HAS_BASE_COLOR_CONSTANT_LOD) && defined(HAS_CONSTANT_LOD)
- #ifdef HAS_BASE_COLOR_TEXTURE_TRANSFORM
- baseColorWithAlpha = czm_srgbToLinear(constantLodTextureLookup(u_baseColorTexture, u_baseColorTextureConstantLodParams, u_baseColorTextureTransform));
- #else
- baseColorWithAlpha = czm_srgbToLinear(constantLodTextureLookup(u_baseColorTexture, u_baseColorTextureConstantLodParams));
- #endif
- #else
- baseColorWithAlpha = czm_srgbToLinear(texture(u_baseColorTexture, baseColorTexCoords));
- #endif
-
- #ifdef HAS_BASE_COLOR_FACTOR
- baseColorWithAlpha *= u_baseColorFactor;
- #endif
-
- return baseColorWithAlpha;
- }
- #endif
-
- #ifdef HAS_EMISSIVE_TEXTURE
- vec3 getEmissiveFromTexture()
- {
- vec2 emissiveTexCoords = TEXCOORD_EMISSIVE;
- #ifdef HAS_EMISSIVE_TEXTURE_TRANSFORM
- emissiveTexCoords = czm_computeTextureTransform(emissiveTexCoords, u_emissiveTextureTransform);
- #endif
-
- vec3 emissive = czm_srgbToLinear(texture(u_emissiveTexture, emissiveTexCoords).rgb);
- #ifdef HAS_EMISSIVE_FACTOR
- emissive *= u_emissiveFactor;
- #endif
-
- return emissive;
- }
- #endif
-
- #if defined(LIGHTING_PBR) && defined(USE_SPECULAR_GLOSSINESS)
- void setSpecularGlossiness(inout czm_modelMaterial material)
- {
- #ifdef HAS_SPECULAR_GLOSSINESS_TEXTURE
- vec2 specularGlossinessTexCoords = TEXCOORD_SPECULAR_GLOSSINESS;
- #ifdef HAS_SPECULAR_GLOSSINESS_TEXTURE_TRANSFORM
- specularGlossinessTexCoords = czm_computeTextureTransform(specularGlossinessTexCoords, u_specularGlossinessTextureTransform);
- #endif
-
- vec4 specularGlossiness = czm_srgbToLinear(texture(u_specularGlossinessTexture, specularGlossinessTexCoords));
- vec3 specular = specularGlossiness.rgb;
- float glossiness = specularGlossiness.a;
- #ifdef HAS_LEGACY_SPECULAR_FACTOR
- specular *= u_legacySpecularFactor;
- #endif
-
- #ifdef HAS_GLOSSINESS_FACTOR
- glossiness *= u_glossinessFactor;
- #endif
- #else
- #ifdef HAS_LEGACY_SPECULAR_FACTOR
- vec3 specular = clamp(u_legacySpecularFactor, vec3(0.0), vec3(1.0));
- #else
- vec3 specular = vec3(1.0);
- #endif
-
- #ifdef HAS_GLOSSINESS_FACTOR
- float glossiness = clamp(u_glossinessFactor, 0.0, 1.0);
- #else
- float glossiness = 1.0;
- #endif
- #endif
-
- #ifdef HAS_DIFFUSE_TEXTURE
- vec2 diffuseTexCoords = TEXCOORD_DIFFUSE;
- #ifdef HAS_DIFFUSE_TEXTURE_TRANSFORM
- diffuseTexCoords = czm_computeTextureTransform(diffuseTexCoords, u_diffuseTextureTransform);
- #endif
-
- vec4 diffuse = czm_srgbToLinear(texture(u_diffuseTexture, diffuseTexCoords));
- #ifdef HAS_DIFFUSE_FACTOR
- diffuse *= u_diffuseFactor;
- #endif
- #elif defined(HAS_DIFFUSE_FACTOR)
- vec4 diffuse = clamp(u_diffuseFactor, vec4(0.0), vec4(1.0));
- #else
- vec4 diffuse = vec4(1.0);
- #endif
-
- material.diffuse = diffuse.rgb * (1.0 - czm_maximumComponent(specular));
- // the specular glossiness extension's alpha overrides anything set
- // by the base material.
- material.alpha = diffuse.a;
-
- material.specular = specular;
-
- // glossiness is the opposite of roughness, but easier for artists to use.
- material.roughness = 1.0 - glossiness;
- }
- #elif defined(LIGHTING_PBR)
- float setMetallicRoughness(inout czm_modelMaterial material)
- {
- #ifdef HAS_METALLIC_ROUGHNESS_TEXTURE
- vec2 metallicRoughnessTexCoords = TEXCOORD_METALLIC_ROUGHNESS;
- #ifdef HAS_METALLIC_ROUGHNESS_TEXTURE_TRANSFORM
- metallicRoughnessTexCoords = czm_computeTextureTransform(metallicRoughnessTexCoords, u_metallicRoughnessTextureTransform);
- #endif
-
- vec3 metallicRoughness = texture(u_metallicRoughnessTexture, metallicRoughnessTexCoords).rgb;
- float metalness = clamp(metallicRoughness.b, 0.0, 1.0);
- float roughness = clamp(metallicRoughness.g, 0.0, 1.0);
- #ifdef HAS_METALLIC_FACTOR
- metalness = clamp(metalness * u_metallicFactor, 0.0, 1.0);
- #endif
-
- #ifdef HAS_ROUGHNESS_FACTOR
- roughness = clamp(roughness * u_roughnessFactor, 0.0, 1.0);
- #endif
- #else
- #ifdef HAS_METALLIC_FACTOR
- float metalness = clamp(u_metallicFactor, 0.0, 1.0);
- #else
- float metalness = 1.0;
- #endif
-
- #ifdef HAS_ROUGHNESS_FACTOR
- float roughness = clamp(u_roughnessFactor, 0.0, 1.0);
- #else
- float roughness = 1.0;
- #endif
- #endif
-
- // dielectrics use f0 = 0.04, metals use albedo as f0
- const vec3 REFLECTANCE_DIELECTRIC = vec3(0.04);
- vec3 f0 = mix(REFLECTANCE_DIELECTRIC, material.baseColor.rgb, metalness);
-
- material.specular = f0;
-
- // diffuse only applies to dielectrics.
- material.diffuse = mix(material.baseColor.rgb, vec3(0.0), metalness);
-
- // This is perceptual roughness. The square of this value is used for direct lighting
- material.roughness = roughness;
-
- return metalness;
- }
- #ifdef USE_SPECULAR
- void setSpecular(inout czm_modelMaterial material, in float metalness)
- {
- #ifdef HAS_SPECULAR_TEXTURE
- vec2 specularTexCoords = TEXCOORD_SPECULAR;
- #ifdef HAS_SPECULAR_TEXTURE_TRANSFORM
- specularTexCoords = czm_computeTextureTransform(specularTexCoords, u_specularTextureTransform);
- #endif
- float specularWeight = texture(u_specularTexture, specularTexCoords).a;
- #ifdef HAS_SPECULAR_FACTOR
- specularWeight *= u_specularFactor;
- #endif
- #else
- #ifdef HAS_SPECULAR_FACTOR
- float specularWeight = u_specularFactor;
- #else
- float specularWeight = 1.0;
- #endif
- #endif
-
- #ifdef HAS_SPECULAR_COLOR_TEXTURE
- vec2 specularColorTexCoords = TEXCOORD_SPECULAR_COLOR;
- #ifdef HAS_SPECULAR_COLOR_TEXTURE_TRANSFORM
- specularColorTexCoords = czm_computeTextureTransform(specularColorTexCoords, u_specularColorTextureTransform);
- #endif
- vec3 specularColorSample = texture(u_specularColorTexture, specularColorTexCoords).rgb;
- vec3 specularColorFactor = czm_srgbToLinear(specularColorSample);
- #ifdef HAS_SPECULAR_COLOR_FACTOR
- specularColorFactor *= u_specularColorFactor;
- #endif
- #else
- #ifdef HAS_SPECULAR_COLOR_FACTOR
- vec3 specularColorFactor = u_specularColorFactor;
- #else
- vec3 specularColorFactor = vec3(1.0);
- #endif
- #endif
- material.specularWeight = specularWeight;
- vec3 f0 = material.specular;
- vec3 dielectricSpecularF0 = min(f0 * specularColorFactor, vec3(1.0));
- material.specular = mix(dielectricSpecularF0, material.baseColor.rgb, metalness);
- }
- #endif
- #ifdef USE_ANISOTROPY
- void setAnisotropy(inout czm_modelMaterial material, in NormalInfo normalInfo)
- {
- mat2 rotation = mat2(u_anisotropy.xy, -u_anisotropy.y, u_anisotropy.x);
- float anisotropyStrength = u_anisotropy.z;
-
- vec2 direction = vec2(1.0, 0.0);
- #ifdef HAS_ANISOTROPY_TEXTURE
- vec2 anisotropyTexCoords = TEXCOORD_ANISOTROPY;
- #ifdef HAS_ANISOTROPY_TEXTURE_TRANSFORM
- anisotropyTexCoords = czm_computeTextureTransform(anisotropyTexCoords, u_anisotropyTextureTransform);
- #endif
- vec3 anisotropySample = texture(u_anisotropyTexture, anisotropyTexCoords).rgb;
- direction = anisotropySample.rg * 2.0 - vec2(1.0);
- anisotropyStrength *= anisotropySample.b;
- #endif
-
- direction = rotation * direction;
- mat3 tbn = mat3(normalInfo.tangent, normalInfo.bitangent, normalInfo.normal);
- vec3 anisotropicT = tbn * normalize(vec3(direction, 0.0));
- vec3 anisotropicB = cross(normalInfo.geometryNormal, anisotropicT);
-
- material.anisotropicT = anisotropicT;
- material.anisotropicB = anisotropicB;
- material.anisotropyStrength = anisotropyStrength;
- }
- #endif
- #ifdef USE_CLEARCOAT
- void setClearcoat(inout czm_modelMaterial material, in ProcessedAttributes attributes)
- {
- #ifdef HAS_CLEARCOAT_TEXTURE
- vec2 clearcoatTexCoords = TEXCOORD_CLEARCOAT;
- #ifdef HAS_CLEARCOAT_TEXTURE_TRANSFORM
- clearcoatTexCoords = czm_computeTextureTransform(clearcoatTexCoords, u_clearcoatTextureTransform);
- #endif
- float clearcoatFactor = texture(u_clearcoatTexture, clearcoatTexCoords).r;
- #ifdef HAS_CLEARCOAT_FACTOR
- clearcoatFactor *= u_clearcoatFactor;
- #endif
- #else
- #ifdef HAS_CLEARCOAT_FACTOR
- float clearcoatFactor = u_clearcoatFactor;
- #else
- // PERFORMANCE_IDEA: this case should turn the whole extension off
- float clearcoatFactor = 0.0;
- #endif
- #endif
-
- #ifdef HAS_CLEARCOAT_ROUGHNESS_TEXTURE
- vec2 clearcoatRoughnessTexCoords = TEXCOORD_CLEARCOAT_ROUGHNESS;
- #ifdef HAS_CLEARCOAT_ROUGHNESS_TEXTURE_TRANSFORM
- clearcoatRoughnessTexCoords = czm_computeTextureTransform(clearcoatRoughnessTexCoords, u_clearcoatRoughnessTextureTransform);
- #endif
- float clearcoatRoughness = texture(u_clearcoatRoughnessTexture, clearcoatRoughnessTexCoords).g;
- #ifdef HAS_CLEARCOAT_ROUGHNESS_FACTOR
- clearcoatRoughness *= u_clearcoatRoughnessFactor;
- #endif
- #else
- #ifdef HAS_CLEARCOAT_ROUGHNESS_FACTOR
- float clearcoatRoughness = u_clearcoatRoughnessFactor;
- #else
- float clearcoatRoughness = 0.0;
- #endif
- #endif
-
- material.clearcoatFactor = clearcoatFactor;
- // This is perceptual roughness. The square of this value is used for direct lighting
- material.clearcoatRoughness = clearcoatRoughness;
- #ifdef HAS_CLEARCOAT_NORMAL_TEXTURE
- material.clearcoatNormal = getClearcoatNormalFromTexture(attributes, attributes.normalEC);
- #else
- material.clearcoatNormal = attributes.normalEC;
- #endif
- }
- #endif
- #endif
-
- void materialStage(inout czm_modelMaterial material, ProcessedAttributes attributes, SelectedFeature feature)
- {
- #ifdef USE_ANISOTROPY
- NormalInfo normalInfo = getNormalInfo(attributes);
- material.normalEC = normalInfo.normal;
- #elif defined(HAS_NORMALS)
- material.normalEC = computeNormal(attributes);
- #endif
-
- vec4 baseColorWithAlpha = vec4(1.0);
- // Regardless of whether we use PBR, set a base color
- #ifdef HAS_BASE_COLOR_TEXTURE
- baseColorWithAlpha = getBaseColorFromTexture();
- #elif defined(HAS_BASE_COLOR_FACTOR)
- baseColorWithAlpha = u_baseColorFactor;
- #endif
-
- #ifdef HAS_IMAGERY
- baseColorWithAlpha = blendBaseColorWithImagery(baseColorWithAlpha);
- #endif // HAS_IMAGERY
-
- #ifdef HAS_POINT_CLOUD_COLOR_STYLE
- baseColorWithAlpha = v_pointCloudColor;
- #elif defined(HAS_COLOR_0)
- vec4 color = attributes.color_0;
- // .pnts files store colors in the sRGB color space
- #ifdef HAS_SRGB_COLOR
- color = czm_srgbToLinear(color);
- #endif
- baseColorWithAlpha *= color;
- #endif
-
- #ifdef USE_CPU_STYLING
- baseColorWithAlpha.rgb = blend(baseColorWithAlpha.rgb, feature.color.rgb, model_colorBlend);
- #endif
- material.baseColor = baseColorWithAlpha;
- material.diffuse = baseColorWithAlpha.rgb;
- material.alpha = baseColorWithAlpha.a;
-
- #ifdef HAS_OCCLUSION_TEXTURE
- vec2 occlusionTexCoords = TEXCOORD_OCCLUSION;
- #ifdef HAS_OCCLUSION_TEXTURE_TRANSFORM
- occlusionTexCoords = czm_computeTextureTransform(occlusionTexCoords, u_occlusionTextureTransform);
- #endif
- material.occlusion = texture(u_occlusionTexture, occlusionTexCoords).r;
- #endif
-
- #ifdef HAS_EMISSIVE_TEXTURE
- material.emissive = getEmissiveFromTexture();
- #elif defined(HAS_EMISSIVE_FACTOR)
- material.emissive = u_emissiveFactor;
- #endif
-
- #if defined(LIGHTING_PBR) && defined(USE_SPECULAR_GLOSSINESS)
- setSpecularGlossiness(material);
- #elif defined(LIGHTING_PBR)
- float metalness = setMetallicRoughness(material);
- #ifdef USE_SPECULAR
- setSpecular(material, metalness);
- #endif
- #ifdef USE_ANISOTROPY
- setAnisotropy(material, normalInfo);
- #endif
- #ifdef USE_CLEARCOAT
- setClearcoat(material, attributes);
- #endif
- #endif
- }
- `;var wL=`#ifdef HAS_CONSTANT_LOD
- // Extract model scale to compensate for minimumPixelSize scaling
- float modelScaleX = length(czm_model[0].xyz);
- float modelScaleY = length(czm_model[1].xyz);
- float modelScaleZ = length(czm_model[2].xyz);
- float modelScale = (modelScaleX + modelScaleY + modelScaleZ) / 3.0;
-
- // Transform model position through ENU but as direction only (w=0) to avoid position-dependent rotation
- vec3 enuDir = (u_constantLodWorldToEnu * czm_model * vec4(v_positionMC, 0.0)).xyz;
- v_constantLodUvCustom.xy = (enuDir.yx + u_constantLodOffset) / modelScale;
- v_constantLodUvCustom.z = u_constantLodDistance / modelScale;
- #endif`;var IL=`#ifdef HAS_CONSTANT_LOD
-
- vec4 constantLodTextureLookup(sampler2D textureSampler, vec3 constantLodParams) {
- bool atMaxClamp = v_constantLodUvCustom.z >= constantLodParams.y;
- bool atMinClamp = v_constantLodUvCustom.z <= constantLodParams.x;
- bool atClampBoundary = atMaxClamp || atMinClamp;
-
- float effectiveDistance = atMaxClamp ? constantLodParams.y :
- (atMinClamp ? constantLodParams.x : v_constantLodUvCustom.z);
-
- float logDepth = log2(effectiveDistance);
- logDepth = clamp(logDepth, -10.0, 20.0);
-
- float f = fract(logDepth);
- float p = floor(logDepth);
-
- if (atClampBoundary) {
- float clampedP = ceil(logDepth);
- vec2 tc = v_constantLodUvCustom.xy / pow(2.0, clampedP) * constantLodParams.z;
- return texture(textureSampler, tc);
- }
-
- vec2 tc1 = v_constantLodUvCustom.xy / pow(2.0, p) * constantLodParams.z;
- vec2 tc2 = v_constantLodUvCustom.xy / pow(2.0, p + 1.0) * constantLodParams.z;
- return mix(texture(textureSampler, tc1), texture(textureSampler, tc2), f);
- }
-
- vec4 constantLodTextureLookup(sampler2D textureSampler, vec3 constantLodParams, mat3 textureTransform) {
- bool atMaxClamp = v_constantLodUvCustom.z >= constantLodParams.y;
- bool atMinClamp = v_constantLodUvCustom.z <= constantLodParams.x;
- bool atClampBoundary = atMaxClamp || atMinClamp;
-
- float effectiveDistance = atMaxClamp ? constantLodParams.y :
- (atMinClamp ? constantLodParams.x : v_constantLodUvCustom.z);
-
- float logDepth = log2(effectiveDistance);
- logDepth = clamp(logDepth, -10.0, 20.0);
-
- float f = fract(logDepth);
- float p = floor(logDepth);
-
- if (atClampBoundary) {
- float clampedP = ceil(logDepth);
- vec2 tc = v_constantLodUvCustom.xy / pow(2.0, clampedP) * constantLodParams.z;
- // Apply texture transform to the final texture coordinates
- tc = czm_computeTextureTransform(tc, textureTransform);
- return texture(textureSampler, tc);
- }
-
- vec2 tc1 = v_constantLodUvCustom.xy / pow(2.0, p) * constantLodParams.z;
- vec2 tc2 = v_constantLodUvCustom.xy / pow(2.0, p + 1.0) * constantLodParams.z;
-
- // Apply texture transform to both LOD texture coordinates before mixing
- tc1 = czm_computeTextureTransform(tc1, textureTransform);
- tc2 = czm_computeTextureTransform(tc2, textureTransform);
-
- return mix(texture(textureSampler, tc1), texture(textureSampler, tc2), f);
- }
-
- #endif
- `;var{Material:DJe,MetallicRoughness:IK,SpecularGlossiness:DK,Specular:u0e,Clearcoat:f0e}=_n,d0e={name:"MaterialPipelineStage",_processTexture:Nu,_processTextureTransform:h0e};d0e.process=function(e,t,n){let i=t.material,{model:o,uniformMap:r,shaderBuilder:a}=e;l(r.u_constantLodDistance)||(r.u_constantLodDistance=function(){let x=o.boundingSphere,b=n.camera;if(l(x)&&l(b)){let C=h.distance(b.positionWC,x.center);return Math.max(C,.1)}return 1});let s=l(o.classificationType),c=s,{defaultTexture:u,defaultNormalTexture:f,defaultEmissiveTexture:d}=n.context;MJe(i,r,a,u,f,d,c,e),l(i.specularGlossiness)?BJe(i.specularGlossiness,r,a,u,c,e):(l(i.specular)&&ht.supportedExtensions.KHR_materials_specular&&LJe(i.specular,r,a,u,c),l(i.anisotropy)&&ht.supportedExtensions.KHR_materials_anisotropy&&FJe(i.anisotropy,r,a,u,c),l(i.clearcoat)&&ht.supportedExtensions.KHR_materials_clearcoat&&kJe(i.clearcoat,r,a,u,c),zJe(i.metallicRoughness,r,a,u,c,e));let p=ht.getAttributeBySemantic(t,it.NORMAL),g=l(o.pointCloudShading)&&!o.pointCloudShading.normalShading,m=e.lightingOptions;i.unlit||!p||s||g?m.lightingModel=Ip.UNLIT:m.lightingModel=Ip.PBR;let A=o.backFaceCulling&&!i.doubleSided;e.renderStateOptions.cull.enabled=A;let y=e.alphaOptions;i.alphaMode===Cp.BLEND?y.pass=Ie.TRANSLUCENT:i.alphaMode===Cp.MASK&&(y.alphaCutoff=i.alphaCutoff),l(i.pointDiameter)&&(a.addDefine("HAS_POINT_DIAMETER",void 0,he.BOTH),a.addUniform("float","u_pointDiameter",he.VERTEX),r.u_pointDiameter=function(){return i.pointDiameter*n.pixelRatio}),l(i.lineStyle)&&RJe(i.lineStyle,t,n,r,a),a.addFragmentLines(SL),i.doubleSided&&a.addDefine("HAS_DOUBLE_SIDED_MATERIAL",void 0,he.BOTH)};function PJe(e,t,n,i,o,r){let a=n.constantLod;if(!l(a)||!l(r))return;let s=`HAS_${o}_CONSTANT_LOD`;if(e.addDefine(s,void 0,he.BOTH),!l(t.u_constantLodOffset)){e.addDefine("HAS_CONSTANT_LOD",void 0,he.BOTH),e.addVarying("vec3","v_constantLodUvCustom"),e.addUniform("vec2","u_constantLodOffset",he.VERTEX),e.addUniform("float","u_constantLodDistance",he.VERTEX),e.addUniform("mat4","u_constantLodWorldToEnu",he.VERTEX),e.addFragmentLines(IL);let u=wL.split(`
- `).filter(f=>!f.trim().startsWith("//")||f.includes("#"));e.addFunctionLines("setDynamicVaryingsVS",u)}let c=`${i}ConstantLodParams`;if(e.addUniform("vec3",c,he.FRAGMENT),t[c]=function(){return new h(a.minClampDistance,a.maxClampDistance,a.repetitions)},!l(t.u_constantLodOffset)){t.u_constantLodOffset=function(){return a.offset};let u=M.clone(M.IDENTITY),f=!1;t.u_constantLodWorldToEnu=function(){if(!f){let d=r.model.boundingSphere;if(l(d)){let p=d.center,g=pt.eastNorthUpToFixedFrame(p);M.inverse(g,u),f=!0}}return f?u:M.IDENTITY}}}function RJe(e,t,n,i,o){let{width:r,pattern:a}=e;l(r)&&(o.addUniform("float","u_lineWidth",he.VERTEX),i.u_lineWidth=function(){return r*n.pixelRatio}),l(a)&&(o.addDefine("HAS_LINE_PATTERN",void 0,he.BOTH),o.addUniform("float","u_linePattern",he.FRAGMENT),o.addVarying("float","v_lineCoord"),i.u_linePattern=function(){return a});let s=ht.getAttributeBySemantic(t,it.CUMULATIVE_DISTANCE);if(l(a)&&l(s)&&(t.primitiveType===Re.LINES||t.primitiveType===Re.TRIANGLE_STRIP)){o.addDefine("HAS_LINE_CUMULATIVE_DISTANCE",void 0,he.VERTEX),s.normalized&&o.addDefine("LINE_CUM_DIST_NORMALIZED",void 0,he.VERTEX),o.addUniform("float","u_cumulativeDistanceMax",he.VERTEX),o.addUniform("float","u_pixelsPerWorld",he.VERTEX);let c=l(s.max)?s.max:1;i.u_cumulativeDistanceMax=function(){return c},i.u_pixelsPerWorld=function(){let f=n.camera.frustum,d=1,p;return l(f.right)&&l(f.left)?p=f.right-f.left:l(f.width)&&(p=f.width),l(p)&&p>0&&(d=n.context.drawingBufferWidth/p),d};let u=ht.getAttributeInfo(s).variableName;o.addVertexLines(`
- #ifdef HAS_LINE_CUMULATIVE_DISTANCE
- void lineStyleStageVS(in ProcessedAttributes attributes)
- {
- float cumDist = attributes.${u};
- #ifdef LINE_CUM_DIST_NORMALIZED
- cumDist *= u_cumulativeDistanceMax;
- #endif
- const float textureCoordinateBase = 8192.0;
- v_lineCoord = textureCoordinateBase + cumDist * u_pixelsPerWorld;
- }
- #endif
- `)}else l(a)&&o.addVertexLines(`
- #ifdef HAS_LINE_PATTERN
- void lineStyleStageVS(in ProcessedAttributes attributes)
- {
- vec4 posClip = gl_Position;
- vec2 screenPos = ((posClip.xy / posClip.w) * 0.5 + 0.5) * czm_viewport.zw;
-
- const float textureCoordinateBase = 8192.0;
- if (czm_viewport.z > czm_viewport.w) {
- v_lineCoord = textureCoordinateBase + screenPos.x;
- } else {
- v_lineCoord = textureCoordinateBase + screenPos.y;
- }
- }
- #endif
- `)}function h0e(e,t,n,i,o){let r=`HAS_${o}_TEXTURE_TRANSFORM`;e.addDefine(r,void 0,he.FRAGMENT);let a=`${i}Transform`;e.addUniform("mat3",a,he.FRAGMENT),t[a]=function(){return n.transform}}function OJe(e,t,n,i,o){let r=`HAS_${o}_TEXTURE_SCALE`;e.addDefine(r,void 0,he.FRAGMENT);let a=`${i}Scale`;e.addUniform("float",a,he.FRAGMENT),t[a]=function(){return n.scale}}function Nu(e,t,n,i,o,r,a){e.addUniform("sampler2D",i,he.FRAGMENT),t[i]=function(){return n.texture??r};let s=`HAS_${o}_TEXTURE`;e.addDefine(s,void 0,he.FRAGMENT);let u=`v_texCoord_${n.texCoord}`,f=`TEXCOORD_${o}`;e.addDefine(f,u,he.FRAGMENT);let d=n.transform;l(d)&&!$.equals(d,$.IDENTITY)&&h0e(e,t,n,i,o);let{scale:p}=n;l(p)&&p!==1&&OJe(e,t,n,i,o),PJe(e,t,n,i,o,a)}function MJe(e,t,n,i,o,r,a,s){let{emissiveFactor:c,emissiveTexture:u,normalTexture:f,occlusionTexture:d}=e;l(c)&&!h.equals(c,DJe.DEFAULT_EMISSIVE_FACTOR)&&(n.addUniform("vec3","u_emissiveFactor",he.FRAGMENT),t.u_emissiveFactor=function(){return e.emissiveFactor},n.addDefine("HAS_EMISSIVE_FACTOR",void 0,he.FRAGMENT),l(u)&&!a&&Nu(n,t,u,"u_emissiveTexture","EMISSIVE",r));let p;if(l(e.metallicRoughness)&&l(e.metallicRoughness.baseColorTexture)&&l(e.metallicRoughness.baseColorTexture.constantLod)?p=e.metallicRoughness.baseColorTexture.constantLod:l(e.specularGlossiness)&&l(e.specularGlossiness.diffuseTexture)&&l(e.specularGlossiness.diffuseTexture.constantLod)&&(p=e.specularGlossiness.diffuseTexture.constantLod),l(f)&&!a){let g=f;l(f.constantLod)&&l(p)&&(g=Object.create(Object.getPrototypeOf(f)),Object.assign(g,f),g.constantLod=p),Nu(n,t,g,"u_normalTexture","NORMAL",o,s)}l(d)&&!a&&Nu(n,t,d,"u_occlusionTexture","OCCLUSION",i)}function BJe(e,t,n,i,o,r){let{diffuseTexture:a,diffuseFactor:s,specularGlossinessTexture:c,specularFactor:u,glossinessFactor:f}=e;n.addDefine("USE_SPECULAR_GLOSSINESS",void 0,he.FRAGMENT),l(a)&&!o&&Nu(n,t,a,"u_diffuseTexture","DIFFUSE",i,r),l(s)&&!se.equals(s,DK.DEFAULT_DIFFUSE_FACTOR)&&(n.addUniform("vec4","u_diffuseFactor",he.FRAGMENT),t.u_diffuseFactor=function(){return e.diffuseFactor},n.addDefine("HAS_DIFFUSE_FACTOR",void 0,he.FRAGMENT)),l(c)&&!o&&Nu(n,t,c,"u_specularGlossinessTexture","SPECULAR_GLOSSINESS",i),l(u)&&!h.equals(u,DK.DEFAULT_SPECULAR_FACTOR)&&(n.addUniform("vec3","u_legacySpecularFactor",he.FRAGMENT),t.u_legacySpecularFactor=function(){return e.specularFactor},n.addDefine("HAS_LEGACY_SPECULAR_FACTOR",void 0,he.FRAGMENT)),l(f)&&f!==DK.DEFAULT_GLOSSINESS_FACTOR&&(n.addUniform("float","u_glossinessFactor",he.FRAGMENT),t.u_glossinessFactor=function(){return e.glossinessFactor},n.addDefine("HAS_GLOSSINESS_FACTOR",void 0,he.FRAGMENT))}function LJe(e,t,n,i,o){let{specularTexture:r,specularFactor:a,specularColorTexture:s,specularColorFactor:c}=e;n.addDefine("USE_SPECULAR",void 0,he.FRAGMENT),l(r)&&!o&&Nu(n,t,r,"u_specularTexture","SPECULAR",i),l(a)&&a!==u0e.DEFAULT_SPECULAR_FACTOR&&(n.addUniform("float","u_specularFactor",he.FRAGMENT),t.u_specularFactor=function(){return e.specularFactor},n.addDefine("HAS_SPECULAR_FACTOR",void 0,he.FRAGMENT)),l(s)&&!o&&Nu(n,t,s,"u_specularColorTexture","SPECULAR_COLOR",i),l(c)&&!h.equals(c,u0e.DEFAULT_SPECULAR_COLOR_FACTOR)&&(n.addUniform("vec3","u_specularColorFactor",he.FRAGMENT),t.u_specularColorFactor=function(){return e.specularColorFactor},n.addDefine("HAS_SPECULAR_COLOR_FACTOR",void 0,he.FRAGMENT))}var NJe=new h;function FJe(e,t,n,i,o){let{anisotropyStrength:r,anisotropyRotation:a,anisotropyTexture:s}=e;n.addDefine("USE_ANISOTROPY",void 0,he.FRAGMENT),l(s)&&!o&&Nu(n,t,s,"u_anisotropyTexture","ANISOTROPY",i);let c=Math.cos(a),u=Math.sin(a);n.addUniform("vec3","u_anisotropy",he.FRAGMENT),t.u_anisotropy=function(){return h.fromElements(c,u,r,NJe)}}function kJe(e,t,n,i,o){let{clearcoatFactor:r,clearcoatTexture:a,clearcoatRoughnessFactor:s,clearcoatRoughnessTexture:c,clearcoatNormalTexture:u}=e;n.addDefine("USE_CLEARCOAT",void 0,he.FRAGMENT),l(r)&&r!==f0e.DEFAULT_CLEARCOAT_FACTOR&&(n.addUniform("float","u_clearcoatFactor",he.FRAGMENT),t.u_clearcoatFactor=function(){return e.clearcoatFactor},n.addDefine("HAS_CLEARCOAT_FACTOR",void 0,he.FRAGMENT)),l(a)&&!o&&Nu(n,t,a,"u_clearcoatTexture","CLEARCOAT",i),l(s)&&r!==f0e.DEFAULT_CLEARCOAT_ROUGHNESS_FACTOR&&(n.addUniform("float","u_clearcoatRoughnessFactor",he.FRAGMENT),t.u_clearcoatRoughnessFactor=function(){return e.clearcoatRoughnessFactor},n.addDefine("HAS_CLEARCOAT_ROUGHNESS_FACTOR",void 0,he.FRAGMENT)),l(c)&&!o&&Nu(n,t,c,"u_clearcoatRoughnessTexture","CLEARCOAT_ROUGHNESS",i),l(u)&&!o&&Nu(n,t,u,"u_clearcoatNormalTexture","CLEARCOAT_NORMAL",i)}function zJe(e,t,n,i,o,r){n.addDefine("USE_METALLIC_ROUGHNESS",void 0,he.FRAGMENT);let a=e.baseColorTexture;l(a)&&!o&&Nu(n,t,a,"u_baseColorTexture","BASE_COLOR",i,r);let s=e.baseColorFactor;l(s)&&!se.equals(s,IK.DEFAULT_BASE_COLOR_FACTOR)&&(n.addUniform("vec4","u_baseColorFactor",he.FRAGMENT),t.u_baseColorFactor=function(){return e.baseColorFactor},n.addDefine("HAS_BASE_COLOR_FACTOR",void 0,he.FRAGMENT));let c=e.metallicRoughnessTexture;l(c)&&!o&&Nu(n,t,c,"u_metallicRoughnessTexture","METALLIC_ROUGHNESS",i);let u=e.metallicFactor;l(u)&&u!==IK.DEFAULT_METALLIC_FACTOR&&(n.addUniform("float","u_metallicFactor",he.FRAGMENT),t.u_metallicFactor=function(){return e.metallicFactor},n.addDefine("HAS_METALLIC_FACTOR",void 0,he.FRAGMENT));let f=e.roughnessFactor;l(f)&&f!==IK.DEFAULT_ROUGHNESS_FACTOR&&(n.addUniform("float","u_roughnessFactor",he.FRAGMENT),t.u_roughnessFactor=function(){return e.roughnessFactor},n.addDefine("HAS_ROUGHNESS_FACTOR",void 0,he.FRAGMENT))}var DL=d0e;var Zl={name:"MetadataPickingPipelineStage",METADATA_PICKING_ENABLED:"METADATA_PICKING_ENABLED",METADATA_PICKING_VALUE_TYPE:"METADATA_PICKING_VALUE_TYPE",METADATA_PICKING_VALUE_STRING:"METADATA_PICKING_VALUE_STRING",METADATA_PICKING_VALUE_COMPONENT_X:"METADATA_PICKING_VALUE_COMPONENT_X",METADATA_PICKING_VALUE_COMPONENT_Y:"METADATA_PICKING_VALUE_COMPONENT_Y",METADATA_PICKING_VALUE_COMPONENT_Z:"METADATA_PICKING_VALUE_COMPONENT_Z",METADATA_PICKING_VALUE_COMPONENT_W:"METADATA_PICKING_VALUE_COMPONENT_W"};Zl.process=function(e,t,n){let i=e.shaderBuilder;i.addDefine(Zl.METADATA_PICKING_VALUE_TYPE,"float",he.FRAGMENT),i.addDefine(Zl.METADATA_PICKING_VALUE_STRING,"0.0",he.FRAGMENT),i.addDefine(Zl.METADATA_PICKING_VALUE_COMPONENT_X,"0.0",he.FRAGMENT),i.addDefine(Zl.METADATA_PICKING_VALUE_COMPONENT_Y,"0.0",he.FRAGMENT),i.addDefine(Zl.METADATA_PICKING_VALUE_COMPONENT_Z,"0.0",he.FRAGMENT),i.addDefine(Zl.METADATA_PICKING_VALUE_COMPONENT_W,"0.0",he.FRAGMENT),i.addFunction("metadataPickingStage","void metadataPickingStage(Metadata metadata, MetadataClass metadataClass, inout vec4 metadataValues)",he.FRAGMENT),i.addFunctionLines("metadataPickingStage",[`${Zl.METADATA_PICKING_VALUE_TYPE} value = ${Zl.METADATA_PICKING_VALUE_TYPE}(${Zl.METADATA_PICKING_VALUE_STRING});`,`metadataValues.x = ${Zl.METADATA_PICKING_VALUE_COMPONENT_X};`,`metadataValues.y = ${Zl.METADATA_PICKING_VALUE_COMPONENT_Y};`,`metadataValues.z = ${Zl.METADATA_PICKING_VALUE_COMPONENT_Z};`,`metadataValues.w = ${Zl.METADATA_PICKING_VALUE_COMPONENT_W};`],he.FRAGMENT)};var Sf=Zl;var PL=`void morphTargetsStage(inout ProcessedAttributes attributes)
- {
- vec3 positionMC = attributes.positionMC;
- attributes.positionMC = getMorphedPosition(positionMC);
-
- #ifdef HAS_NORMALS
- vec3 normalMC = attributes.normalMC;
- attributes.normalMC = getMorphedNormal(normalMC);
- #endif
-
- #ifdef HAS_TANGENTS
- vec3 tangentMC = attributes.tangentMC;
- attributes.tangentMC = getMorphedTangent(tangentMC);
- #endif
- }`;var Mc={name:"MorphTargetsPipelineStage",FUNCTION_ID_GET_MORPHED_POSITION:"getMorphedPosition",FUNCTION_SIGNATURE_GET_MORPHED_POSITION:"vec3 getMorphedPosition(in vec3 position)",FUNCTION_ID_GET_MORPHED_NORMAL:"getMorphedNormal",FUNCTION_SIGNATURE_GET_MORPHED_NORMAL:"vec3 getMorphedNormal(in vec3 normal)",FUNCTION_ID_GET_MORPHED_TANGENT:"getMorphedTangent",FUNCTION_SIGNATURE_GET_MORPHED_TANGENT:"vec3 getMorphedTangent(in vec3 tangent)"};Mc.process=function(e,t){let n=e.shaderBuilder;n.addDefine("HAS_MORPH_TARGETS",void 0,he.VERTEX),WJe(n);let i=t.morphTargets.length;for(let s=0;s<i;s++){let c=t.morphTargets[s].attributes,u=c.length;for(let f=0;f<u;f++){let d=c[f],p=d.semantic;p!==it.POSITION&&p!==it.NORMAL&&p!==it.TANGENT||(VJe(e,d,e.attributeIndex,s),e.attributeIndex++)}}qJe(n);let r=e.runtimeNode.morphWeights.length;n.addUniform("float",`u_morphWeights[${r}]`,he.VERTEX),n.addVertexLines(PL);let a={u_morphWeights:function(){return e.runtimeNode.morphWeights}};e.uniformMap=wt(a,e.uniformMap)};var UJe={attributeString:void 0,functionId:void 0};function VJe(e,t,n,i){let o=e.shaderBuilder;jJe(e,t,n);let r=GJe(t,UJe);HJe(o,r,i)}function jJe(e,t,n){let i={index:n,value:l(t.buffer)?void 0:t.constant,vertexBuffer:t.buffer,componentsPerAttribute:Ft.getNumberOfComponents(t.type),componentDatatype:t.componentDatatype,offsetInBytes:t.byteOffset,strideInBytes:t.byteStride,normalize:t.normalized};e.attributes.push(i)}function GJe(e,t){switch(e.semantic){case it.POSITION:t.attributeString="Position",t.functionId=Mc.FUNCTION_ID_GET_MORPHED_POSITION;break;case it.NORMAL:t.attributeString="Normal",t.functionId=Mc.FUNCTION_ID_GET_MORPHED_NORMAL;break;case it.TANGENT:t.attributeString="Tangent",t.functionId=Mc.FUNCTION_ID_GET_MORPHED_TANGENT;break;default:break}return t}function HJe(e,t,n){let i=t.attributeString,o=`a_target${i}_${n}`,r=`morphed${i} += u_morphWeights[${n}] * a_target${i}_${n};`;e.addAttribute("vec3",o),e.addFunctionLines(t.functionId,[r])}function WJe(e){e.addFunction(Mc.FUNCTION_ID_GET_MORPHED_POSITION,Mc.FUNCTION_SIGNATURE_GET_MORPHED_POSITION,he.VERTEX),e.addFunctionLines(Mc.FUNCTION_ID_GET_MORPHED_POSITION,["vec3 morphedPosition = position;"]),e.addFunction(Mc.FUNCTION_ID_GET_MORPHED_NORMAL,Mc.FUNCTION_SIGNATURE_GET_MORPHED_NORMAL,he.VERTEX),e.addFunctionLines(Mc.FUNCTION_ID_GET_MORPHED_NORMAL,["vec3 morphedNormal = normal;"]),e.addFunction(Mc.FUNCTION_ID_GET_MORPHED_TANGENT,Mc.FUNCTION_SIGNATURE_GET_MORPHED_TANGENT,he.VERTEX),e.addFunctionLines(Mc.FUNCTION_ID_GET_MORPHED_TANGENT,["vec3 morphedTangent = tangent;"])}function qJe(e){e.addFunctionLines(Mc.FUNCTION_ID_GET_MORPHED_POSITION,["return morphedPosition;"]),e.addFunctionLines(Mc.FUNCTION_ID_GET_MORPHED_NORMAL,["return morphedNormal;"]),e.addFunctionLines(Mc.FUNCTION_ID_GET_MORPHED_TANGENT,["return morphedTangent;"])}var RL=Mc;var m0e={name:"PickingPipelineStage"};m0e.process=function(e,t,n){let i=n.context,o=e.runtimeNode,r=e.shaderBuilder,a=e.model,s=o.node.instances;if(e.hasPropertyTable)YJe(e,t,s,i);else if(l(s))XJe(e,i);else{let c=p0e(e),u=i.createPickId(c);a._pipelineResources.push(u),a._pickIds.push(u),r.addUniform("vec4","czm_pickColor",he.FRAGMENT);let f=e.uniformMap;f.czm_pickColor=function(){return u.color},e.pickId="czm_pickColor"}};function p0e(e,t){let n=e.model;if(l(n.pickObject))return n.pickObject;let i={model:n,node:e.runtimeNode,primitive:e.runtimePrimitive},o;if(Br.is3DTiles(n.type)){let r=n.content;o={content:r,primitive:r.tileset,detail:i}}else o={primitive:n,detail:i};return o.id=n.id,l(t)&&(o.instanceId=t),o}function YJe(e,t,n){let i=e.model,o,r,a=i.featureIdLabel,s=i.instanceFeatureIdLabel;l(i.featureTableId)?o=i.featureTableId:l(n)?(r=ht.getFeatureIdsByLabel(n.featureIds,s),o=r.propertyTableId):(r=ht.getFeatureIdsByLabel(t.featureIds,a),o=r.propertyTableId);let c=i.featureTables[o];e.shaderBuilder.addUniform("sampler2D","model_pickTexture",he.FRAGMENT);let f=c.batchTexture;e.uniformMap.model_pickTexture=function(){return f.pickTexture??f.defaultTexture},e.pickId="((selectedFeature.id < int(model_featuresLength)) ? texture(model_pickTexture, selectedFeature.st) : vec4(0.0))"}function XJe(e,t){let n=e.instanceCount,i=new Array(n),o=new Uint8Array(n*4),r=e.model,a=r._pipelineResources;for(let d=0;d<n;d++){let p=p0e(e,d),g=t.createPickId(p);a.push(g),i[d]=g;let m=g.color;o[d*4+0]=V.floatToByte(m.red),o[d*4+1]=V.floatToByte(m.green),o[d*4+2]=V.floatToByte(m.blue),o[d*4+3]=V.floatToByte(m.alpha)}r._pickIds=i;let s=Ke.createVertexBuffer({context:t,typedArray:o,usage:Oe.STATIC_DRAW});s.vertexArrayDestroyable=!1,r.statistics.addBuffer(s,!1),a.push(s);let u={index:e.attributeIndex++,vertexBuffer:s,componentsPerAttribute:4,componentDatatype:Y.UNSIGNED_BYTE,normalize:!0,offsetInBytes:0,strideInBytes:0,instanceDivisor:1};e.attributes.push(u);let f=e.shaderBuilder;f.addDefine("USE_PICKING",void 0,he.BOTH),f.addAttribute("vec4","a_pickColor"),f.addVarying("vec4","v_pickColor"),e.pickId="v_pickColor"}var OL=m0e;var g0e={ADD:0,REPLACE:1};Object.freeze(g0e);var ar=g0e;var ML=`float getPointSizeFromAttenuation(vec3 positionEC) {
- // Variables are packed into a single vector to minimize gl.uniformXXX() calls
- float pointSize = model_pointCloudParameters.x;
- float geometricError = model_pointCloudParameters.y;
- float depthMultiplier = model_pointCloudParameters.z;
-
- float depth = -positionEC.z;
- return min((geometricError / depth) * depthMultiplier, pointSize);
- }
-
- #ifdef HAS_POINT_CLOUD_SHOW_STYLE
- float pointCloudShowStylingStage(in ProcessedAttributes attributes, in Metadata metadata) {
- float tiles3d_tileset_time = model_pointCloudParameters.w;
- return float(getShowFromStyle(attributes, metadata, tiles3d_tileset_time));
- }
- #endif
-
- #ifdef HAS_POINT_CLOUD_COLOR_STYLE
- vec4 pointCloudColorStylingStage(in ProcessedAttributes attributes, in Metadata metadata) {
- float tiles3d_tileset_time = model_pointCloudParameters.w;
- return getColorFromStyle(attributes, metadata, tiles3d_tileset_time);
- }
- #endif
-
- #ifdef HAS_POINT_CLOUD_POINT_SIZE_STYLE
- float pointCloudPointSizeStylingStage(in ProcessedAttributes attributes, in Metadata metadata) {
- float tiles3d_tileset_time = model_pointCloudParameters.w;
- return float(getPointSizeFromStyle(attributes, metadata, tiles3d_tileset_time));
- }
- #elif defined(HAS_POINT_CLOUD_ATTENUATION)
- float pointCloudPointSizeStylingStage(in ProcessedAttributes attributes, in Metadata metadata) {
- return getPointSizeFromAttenuation(v_positionEC);
- }
- #endif
-
- #ifdef HAS_POINT_CLOUD_BACK_FACE_CULLING
- float pointCloudBackFaceCullingStage() {
- #if defined(HAS_NORMALS) && !defined(HAS_DOUBLE_SIDED_MATERIAL)
- // This needs to be computed in eye coordinates so we can't use attributes.normalMC
- return step(-v_normalEC.z, 0.0);
- #else
- return 1.0;
- #endif
- }
- #endif
- `;var KJe=new se,A0e={name:"PointCloudStylingPipelineStage"};A0e.process=function(e,t,n){let i=e.shaderBuilder,o=e.model,r=o.style,a=o.structuralMetadata,s=l(a)?a.propertyAttributes:void 0,c=l(o.featureTableId)&&o.featureTables[o.featureTableId].featuresLength>0,u=!l(s)&&c;if(l(r)&&!u){let A=ZJe(s),y=eZe(r,A);tZe(i,y);let b=nZe(y).indexOf("normalMC")>=0,C=ht.getAttributeBySemantic(t,it.NORMAL);if(b&&!C)throw new re("Style references the NORMAL semantic but the point cloud does not have normals");i.addDefine("COMPUTE_POSITION_WC_STYLE",void 0,he.VERTEX),y.styleTranslucent&&(e.alphaOptions.pass=Ie.TRANSLUCENT)}let f=o.pointCloudShading;f.attenuation&&i.addDefine("HAS_POINT_CLOUD_ATTENUATION",void 0,he.VERTEX),f.backFaceCulling&&i.addDefine("HAS_POINT_CLOUD_BACK_FACE_CULLING",void 0,he.VERTEX);let d,p,g;Br.is3DTiles(o.type)&&(p=!0,d=o.content,g=d.tile.refine===ar.ADD),i.addUniform("vec4","model_pointCloudParameters",he.VERTEX),i.addVertexLines(ML);let m=e.uniformMap;m.model_pointCloudParameters=function(){let A=KJe,y=1;p&&(y=g?5:d.tileset.memoryAdjustedScreenSpaceError),A.x=f.maximumAttenuation??y,A.x*=n.pixelRatio;let x=QJe(e,t,f,d);A.y=x*f.geometricErrorScale;let b=n.context,C=n.camera.frustum,E;return n.mode===ie.SCENE2D||C instanceof fn?E=Number.POSITIVE_INFINITY:E=b.drawingBufferHeight/n.camera.frustum.sseDenominator,A.z=E,p&&(A.w=d.tileset.timeSinceLoad),A}};var _0e=new h;function QJe(e,t,n,i){if(l(i)){let f=i.tile.geometricError;if(f>0)return f}if(l(n.baseResolution))return n.baseResolution;let o=ht.getAttributeBySemantic(t,it.POSITION),r=o.count,a=e.runtimeNode.transform,s=h.subtract(o.max,o.min,_0e);s=M.multiplyByPointAsVector(a,s,_0e);let c=s.x*s.y*s.z;return D.cbrt(c/r)}var $Je={colorStyleFunction:void 0,showStyleFunction:void 0,pointSizeStyleFunction:void 0,styleTranslucent:!1},JJe={POSITION:"attributes.positionMC",POSITION_ABSOLUTE:"v_positionWC",COLOR:"attributes.color_0",NORMAL:"attributes.normalMC"};function ZJe(e){let t=We(JJe);if(!l(e))return t;for(let n=0;n<e.length;n++){let o=e[n].properties;for(let r in o)o.hasOwnProperty(r)&&(t[r]=`metadata.${r}`)}return t}var PK="ProcessedAttributes attributes, Metadata metadata, float tiles3d_tileset_time";function eZe(e,t){let n=$Je,i={translucent:!1};return n.colorStyleFunction=e.getColorShaderFunction(`getColorFromStyle(${PK})`,t,i),n.showStyleFunction=e.getShowShaderFunction(`getShowFromStyle(${PK})`,t,i),n.pointSizeStyleFunction=e.getPointSizeShaderFunction(`getPointSizeFromStyle(${PK})`,t,i),n.styleTranslucent=l(n.colorStyleFunction)&&i.translucent,n}function tZe(e,t){let n=t.colorStyleFunction;l(n)&&(e.addDefine("HAS_POINT_CLOUD_COLOR_STYLE",void 0,he.BOTH),e.addVertexLines(n),e.addVarying("vec4","v_pointCloudColor"));let i=t.showStyleFunction;l(i)&&(e.addDefine("HAS_POINT_CLOUD_SHOW_STYLE",void 0,he.BOTH),e.addVertexLines(i),e.addVarying("float","v_pointCloudShow"));let o=t.pointSizeStyleFunction;l(o)&&(e.addDefine("HAS_POINT_CLOUD_POINT_SIZE_STYLE",void 0,he.VERTEX),e.addVertexLines(o))}function RK(e,t){let n=/attributes\.(\w+)/g,i=n.exec(e);for(;i!==null;){let o=i[1];t.indexOf(o)===-1&&t.push(o),i=n.exec(e)}}function nZe(e){let t=e.colorStyleFunction,n=e.showStyleFunction,i=e.pointSizeStyleFunction,o=[];return l(t)&&RK(t,o),l(n)&&RK(n,o),l(i)&&RK(i,o),o}var BL=A0e;var LL=`void primitiveOutlineStage() {
- v_outlineCoordinates = a_outlineCoordinates;
- }
- `;var NL=`void primitiveOutlineStage(inout czm_modelMaterial material) {
- if (!model_showOutline) {
- return;
- }
-
- float outlineX =
- texture(model_outlineTexture, vec2(v_outlineCoordinates.x, 0.5)).r;
- float outlineY =
- texture(model_outlineTexture, vec2(v_outlineCoordinates.y, 0.5)).r;
- float outlineZ =
- texture(model_outlineTexture, vec2(v_outlineCoordinates.z, 0.5)).r;
- float outlineness = max(outlineX, max(outlineY, outlineZ));
-
- material.diffuse = mix(material.diffuse, model_outlineColor.rgb, model_outlineColor.a * outlineness);
- }
- `;var y0e={name:"PrimitiveOutlinePipelineStage"};y0e.process=function(e,t,n){let i=e.shaderBuilder,o=e.uniformMap;i.addDefine("HAS_PRIMITIVE_OUTLINE",void 0,he.BOTH),i.addAttribute("vec3","a_outlineCoordinates"),i.addVarying("vec3","v_outlineCoordinates");let r=t.outlineCoordinates,a={index:e.attributeIndex++,vertexBuffer:r.buffer,componentsPerAttribute:Ft.getNumberOfComponents(r.type),componentDatatype:r.componentDatatype,offsetInBytes:r.byteOffset,strideInBytes:r.byteStride,normalize:r.normalized};e.attributes.push(a),i.addUniform("sampler2D","model_outlineTexture",he.FRAGMENT);let s=Eb.createTexture(n.context);o.model_outlineTexture=function(){return s};let c=e.model;i.addUniform("vec4","model_outlineColor",he.FRAGMENT),o.model_outlineColor=function(){return c.outlineColor},i.addUniform("bool","model_showOutline",he.FRAGMENT),o.model_showOutline=function(){return c.showOutline},i.addVertexLines(LL),i.addFragmentLines(NL)};var FL=y0e;var x0e={name:"PrimitiveStatisticsPipelineStage",_countGeometry:b0e,_count2DPositions:C0e,_countMorphTargetAttributes:T0e,_countMaterialTextures:E0e,_countFeatureIdTextures:v0e,_countBinaryMetadata:S0e};x0e.process=function(e,t,n){let i=e.model,o=i.statistics;b0e(o,t),C0e(o,e.runtimePrimitive),T0e(o,t),E0e(o,t.material),v0e(o,t.featureIds),S0e(o,i)};function b0e(e,t){let n=l(t.indices)?t.indices.count:ht.getAttributeBySemantic(t,"POSITION").count,i=t.primitiveType;i===Re.POINTS?e.pointsLength+=n:Re.isTriangles(i)&&(e.trianglesLength+=iZe(i,n));let o=t.attributes,r=o.length;for(let c=0;c<r;c++){let u=o[c];if(l(u.buffer)){let f=l(u.typedArray);e.addBuffer(u.buffer,f)}}let a=t.outlineCoordinates;l(a)&&l(a.buffer)&&e.addBuffer(a.buffer,!1);let s=t.indices;if(l(s)&&l(s.buffer)){let c=l(s.typedArray);e.addBuffer(s.buffer,c)}}function iZe(e,t){switch(e){case Re.TRIANGLES:return t/3;case Re.TRIANGLE_STRIP:case Re.TRIANGLE_FAN:return Math.max(t-2,0);default:return 0}}function C0e(e,t){let n=t.positionBuffer2D;l(n)&&e.addBuffer(n,!0)}function T0e(e,t){let n=t.morphTargets;if(!l(n))return;let i=!1,o=n.length;for(let r=0;r<o;r++){let a=n[r].attributes,s=a.length;for(let c=0;c<s;c++){let u=a[c];l(u.buffer)&&e.addBuffer(u.buffer,i)}}}function E0e(e,t){let n=oZe(t),i=n.length;for(let o=0;o<i;o++){let r=n[o];l(r)&&l(r.texture)&&e.addTexture(r.texture)}}function oZe(e){let t=e.metallicRoughness,n=[e.emissiveTexture,e.normalTexture,e.occlusionTexture,t.baseColorTexture,t.metallicRoughnessTexture],i=e.specularGlossiness;return l(i)&&(n.push(i.diffuseTexture),n.push(i.specularGlossinessTexture)),n}function v0e(e,t){let n=t.length;for(let i=0;i<n;i++){let o=t[i];if(o instanceof _n.FeatureIdTexture){let r=o.textureReader;l(r.texture)&&e.addTexture(r.texture)}}}function S0e(e,t){let n=t.structuralMetadata;l(n)&&(rZe(e,n),e.propertyTablesByteLength+=n.propertyTablesByteLength);let i=t.featureTables;if(!l(i))return;let o=i.length;for(let r=0;r<o;r++){let a=i[r];e.addBatchTexture(a.batchTexture)}}function rZe(e,t){let n=t.propertyTextures;if(!l(n))return;let i=n.length;for(let o=0;o<i;o++){let a=n[o].properties;for(let s in a)if(a.hasOwnProperty(s)){let u=a[s].textureReader;l(u.texture)&&e.addTexture(u.texture)}}}var kL=x0e;var aZe=new M,sZe=new M,w0e={name:"SceneMode2DPipelineStage"};w0e.process=function(e,t,n){let i=ht.getAttributeBySemantic(t,it.POSITION),o=e.shaderBuilder,r=e.model,a=r.sceneGraph.computedModelMatrix,s=e.runtimeNode.computedTransform,c=M.multiplyTransformation(a,s,aZe),u=uZe(e,c,n),f=e.runtimePrimitive;f.boundingSphere2D=u;let d=e.runtimeNode.node.instances;if(l(d))return;if(l(i.typedArray)){let A=hZe(i,c,u,n);f.positionBuffer2D=A,r._modelResources.push(A),i.typedArray=void 0}o.addDefine("USE_2D_POSITIONS",void 0,he.VERTEX),o.addUniform("mat4","u_modelView2D",he.VERTEX);let p=M.fromTranslation(u.center,new M),g=n.context,m={u_modelView2D:function(){return M.multiplyTransformation(g.uniformState.view,p,sZe)}};e.uniformMap=wt(m,e.uniformMap)};var cZe=new h,lZe=new h;function uZe(e,t,n){let i=M.multiplyByPoint(t,e.positionMin,cZe),o=eo.computeActualEllipsoidPosition(n,i,i),r=M.multiplyByPoint(t,e.positionMax,lZe),a=eo.computeActualEllipsoidPosition(n,r,r);return ce.fromCornerPoints(o,a,new ce)}var I0e=new h;function fZe(e,t){let n=e.length,i=new Float32Array(n),o=t.quantizedVolumeOffset,r=t.quantizedVolumeStepSize;for(let a=0;a<n;a+=3){let s=h.fromArray(e,a,I0e),c=h.multiplyComponents(s,r,s),u=h.add(c,o,c);i[a]=u.x,i[a+1]=u.y,i[a+2]=u.z}return i}function dZe(e,t,n,i){let o;l(e.quantization)?o=fZe(e.typedArray,e.quantization):o=e.typedArray.slice();let r=e.byteOffset/Float32Array.BYTES_PER_ELEMENT,a=o.length,s=l(e.byteStride)?e.byteStride/Float32Array.BYTES_PER_ELEMENT:3;for(let c=r;c<a;c+=s){let u=h.fromArray(o,c,I0e);if(isNaN(u.x)||isNaN(u.y)||isNaN(u.z))continue;let f=M.multiplyByPoint(t,u,u),d=eo.computeActualEllipsoidPosition(i,f,f),p=h.subtract(d,n,d);o[c]=p.x,o[c+1]=p.y,o[c+2]=p.z}return o}function hZe(e,t,n,i){let o=We(i);o.mode=ie.COLUMBUS_VIEW;let r=n.center,a=dZe(e,t,r,o),s=Ke.createVertexBuffer({context:i.context,typedArray:a,usage:Oe.STATIC_DRAW});return s.vertexArrayDestroyable=!1,s}var zL=w0e;var UL=`void skinningStage(inout ProcessedAttributes attributes)
- {
- mat4 skinningMatrix = getSkinningMatrix();
- mat3 skinningMatrixMat3 = mat3(skinningMatrix);
-
- vec4 positionMC = vec4(attributes.positionMC, 1.0);
- attributes.positionMC = vec3(skinningMatrix * positionMC);
-
- #ifdef HAS_NORMALS
- vec3 normalMC = attributes.normalMC;
- attributes.normalMC = skinningMatrixMat3 * normalMC;
- #endif
-
- #ifdef HAS_TANGENTS
- vec3 tangentMC = attributes.tangentMC;
- attributes.tangentMC = skinningMatrixMat3 * tangentMC;
- #endif
- }`;var Ob={name:"SkinningPipelineStage",FUNCTION_ID_GET_SKINNING_MATRIX:"getSkinningMatrix",FUNCTION_SIGNATURE_GET_SKINNING_MATRIX:"mat4 getSkinningMatrix()"};Ob.process=function(e,t){let n=e.shaderBuilder;n.addDefine("HAS_SKINNING",void 0,he.VERTEX),pZe(n,t);let i=e.runtimeNode,o=i.computedJointMatrices;n.addUniform("mat4",`u_jointMatrices[${o.length}]`,he.VERTEX),n.addVertexLines(UL);let r={u_jointMatrices:function(){return i.computedJointMatrices}};e.uniformMap=wt(r,e.uniformMap)};function mZe(e){let t=-1,n=e.attributes,i=n.length;for(let o=0;o<i;o++){let r=n[o];(r.semantic===it.JOINTS||r.semantic===it.WEIGHTS)&&(t=Math.max(t,r.setIndex))}return t}function pZe(e,t){e.addFunction(Ob.FUNCTION_ID_GET_SKINNING_MATRIX,Ob.FUNCTION_SIGNATURE_GET_SKINNING_MATRIX,he.VERTEX),e.addFunctionLines(Ob.FUNCTION_ID_GET_SKINNING_MATRIX,["mat4 skinnedMatrix = mat4(0);"]);let i,o,r=["x","y","z","w"],a=mZe(t);for(i=0;i<=a;i++)for(o=0;o<=3;o++){let c=r[o],u=`skinnedMatrix += a_weights_${i}.${c} * u_jointMatrices[int(a_joints_${i}.${c})];`;e.addFunctionLines(Ob.FUNCTION_ID_GET_SKINNING_MATRIX,[u])}e.addFunctionLines(Ob.FUNCTION_ID_GET_SKINNING_MATRIX,["return skinnedMatrix;"])}var VL=Ob;var jL=`void verticalExaggerationStage(
- inout ProcessedAttributes attributes
- ) {
- // Compute the distance from the camera to the local center of curvature.
- vec4 vertexPositionENU = czm_modelToEnu * vec4(attributes.positionMC, 1.0);
- vec2 vertexAzimuth = normalize(vertexPositionENU.xy);
- // Curvature = 1 / radius of curvature.
- float azimuthalCurvature = dot(vertexAzimuth * vertexAzimuth, czm_eyeEllipsoidCurvature);
- float eyeToCenter = 1.0 / azimuthalCurvature + czm_eyeHeight;
-
- // Compute the approximate ellipsoid normal at the vertex position.
- // Uses a circular approximation for the Earth curvature along the geodesic.
- vec3 vertexPositionEC = (czm_modelView * vec4(attributes.positionMC, 1.0)).xyz;
- vec3 centerToVertex = eyeToCenter * czm_eyeEllipsoidNormalEC + vertexPositionEC;
- vec3 vertexNormal = normalize(centerToVertex);
-
- // Estimate the (sine of the) angle between the camera direction and the vertex normal
- float verticalDistance = dot(vertexPositionEC, czm_eyeEllipsoidNormalEC);
- float horizontalDistance = length(vertexPositionEC - verticalDistance * czm_eyeEllipsoidNormalEC);
- float sinTheta = horizontalDistance / (eyeToCenter + verticalDistance);
- bool isSmallAngle = clamp(sinTheta, 0.0, 0.05) == sinTheta;
-
- // Approximate the change in height above the ellipsoid, from camera to vertex position.
- float exactVersine = 1.0 - dot(czm_eyeEllipsoidNormalEC, vertexNormal);
- float smallAngleVersine = 0.5 * sinTheta * sinTheta;
- float versine = isSmallAngle ? smallAngleVersine : exactVersine;
- float dHeight = dot(vertexPositionEC, vertexNormal) - eyeToCenter * versine;
- float vertexHeight = czm_eyeHeight + dHeight;
-
- // Transform the approximate vertex normal to model coordinates.
- vec3 vertexNormalMC = (czm_inverseModelView * vec4(vertexNormal, 0.0)).xyz;
- vertexNormalMC = normalize(vertexNormalMC);
-
- // Compute the exaggeration and apply it along the approximate vertex normal.
- float stretch = u_verticalExaggerationAndRelativeHeight.x;
- float shift = u_verticalExaggerationAndRelativeHeight.y;
- float exaggeration = (vertexHeight - shift) * (stretch - 1.0);
- attributes.positionMC += exaggeration * vertexNormalMC;
- }
- `;var D0e={name:"VerticalExaggerationPipelineStage"},gZe=new z;D0e.process=function(e,t,n){let{shaderBuilder:i,uniformMap:o}=e;i.addVertexLines(jL),i.addDefine("HAS_VERTICAL_EXAGGERATION",void 0,he.VERTEX),i.addUniform("vec2","u_verticalExaggerationAndRelativeHeight",he.VERTEX),o.u_verticalExaggerationAndRelativeHeight=function(){return z.fromElements(n.verticalExaggeration,n.verticalExaggerationRelativeHeight,gZe)}};var GL=D0e;var OK={};function _Ze(e){let t=Ue.createTypedArray(e,e*2),n=e,i=0;for(let o=0;o<n;o+=3)t[i++]=o,t[i++]=o+1,t[i++]=o+1,t[i++]=o+2,t[i++]=o+2,t[i++]=o;return t}function AZe(e,t){let n=t.length,i=Ue.createTypedArray(e,n*2),o=0;for(let r=0;r<n;r+=3){let a=t[r],s=t[r+1],c=t[r+2];i[o++]=a,i[o++]=s,i[o++]=s,i[o++]=c,i[o++]=c,i[o++]=a}return i}function yZe(e){let t=e-2,n=2+t*4,i=Ue.createTypedArray(e,n),o=0;i[o++]=0,i[o++]=1;for(let r=0;r<t;r++)i[o++]=r+1,i[o++]=r+2,i[o++]=r+2,i[o++]=r;return i}function xZe(e,t){let i=t.length-2,o=2+i*4,r=Ue.createTypedArray(e,o),a=0;r[a++]=t[0],r[a++]=t[1];for(let s=0;s<i;s++){let c=t[s],u=t[s+1],f=t[s+2];r[a++]=u,r[a++]=f,r[a++]=f,r[a++]=c}return r}function bZe(e){let t=e-2,n=2+t*4,i=Ue.createTypedArray(e,n),o=0;i[o++]=0,i[o++]=1;for(let r=0;r<t;r++)i[o++]=r+1,i[o++]=r+2,i[o++]=r+2,i[o++]=0;return i}function CZe(e,t){let i=t.length-2,o=2+i*4,r=Ue.createTypedArray(e,o),a=0,s=t[0];r[a++]=s,r[a++]=t[1];for(let c=0;c<i;c++){let u=t[c+1],f=t[c+2];r[a++]=u,r[a++]=f,r[a++]=f,r[a++]=s}return r}OK.createWireframeIndices=function(e,t,n){let i=l(n);if(e===Re.TRIANGLES)return i?AZe(t,n):_Ze(t);if(e===Re.TRIANGLE_STRIP)return i?xZe(t,n):yZe(t);if(e===Re.TRIANGLE_FAN)return i?CZe(t,n):bZe(t)};OK.getWireframeIndicesCount=function(e,t){return e===Re.TRIANGLES?t*2:e===Re.TRIANGLE_STRIP||e===Re.TRIANGLE_FAN?2+(t-2)*4:t};var aS=OK;var P0e={name:"WireframePipelineStage"};P0e.process=function(e,t,n){e.shaderBuilder.addDefine("HAS_WIREFRAME",void 0,he.FRAGMENT);let o=e.model,r=TZe(t,e.indices,n);o._pipelineResources.push(r),e.wireframeIndexBuffer=r,o.statistics.addBuffer(r,!1);let s=e.primitiveType,c=e.count;e.primitiveType=Re.LINES,e.count=aS.getWireframeIndicesCount(s,c)};function TZe(e,t,n){let o=ht.getAttributeBySemantic(e,it.POSITION).count,r=n.context.webgl2,a;if(l(t)){let f=t.buffer,d=t.count;l(f)&&r?(a=f.sizeInBytes===d?new Uint8Array(d):Ue.createTypedArray(o,d),f.getBufferData(a)):a=t.typedArray}let s=e.primitiveType,c=aS.createWireframeIndices(s,o,a),u=Ue.fromSizeInBytes(c.BYTES_PER_ELEMENT);return Ke.createIndexBuffer({context:n.context,typedArray:c,usage:Oe.STATIC_DRAW,indexDatatype:u})}var HL=P0e;function R0e(e){e=e??G.EMPTY_OBJECT;let t=e.primitive,n=e.node,i=e.model;this.primitive=t,this.node=n,this.model=i,this.pipelineStages=[],this.drawCommand=void 0,this.boundingSphere=void 0,this.boundingSphere2D=void 0,this.positionBuffer2D=void 0,this.batchLengths=void 0,this.batchOffsets=void 0,this.updateStages=[]}R0e.prototype.configurePipeline=function(e){let t=this.pipelineStages;t.length=0;let n=this.primitive,i=this.node,o=this.model,r=o.customShader,a=o.style,s=e.context.webgl2,u=e.mode!==ie.SCENE3D&&!e.scene3DOnly&&o._projectTo2D,f=e.verticalExaggeration!==1&&o.hasVerticalExaggeration,d=l(n.morphTargets)&&n.morphTargets.length>0,p=l(i.skin),g=l(o.imageryLayers)&&o.imageryLayers.length>0,m=l(r),y=!(m&&l(r.fragmentShaderText))||r.mode!==vg.REPLACE_MATERIAL,x=ht.hasQuantizedAttributes(n.attributes),b=o.debugWireframe&&Re.isTriangles(n.primitiveType)&&(o._enableDebugWireframe||s),C=o.pointCloudShading,E=l(C)&&C.attenuation,S=l(C)&&C.backFaceCulling,w=n.primitiveType===Re.POINTS&&(l(a)||E||S),P=o._enableShowOutline&&l(n.outlineCoordinates),R=l(n.edgeVisibility),B=EZe(o,i,n),L=l(o.classificationType);u&&t.push(zL),t.push(oL),b&&t.push(HL),L&&t.push(FB),d&&t.push(RL),p&&t.push(VL),w&&t.push(BL),x&&t.push(KB),g&&(P?_t("outlines-and-draping","Primitive outlines disable imagery draping"):t.push(TL)),y&&t.push(DL),t.push(UA),t.push(Bd),t.push(Sf),B.hasPropertyTable&&(t.push(jA),t.push(NB),t.push(UB)),f&&t.push(GL),m&&t.push(YB),t.push(vL),o.allowPicking&&t.push(OL),P&&t.push(FL),R&&(e.edgeVisibilityRequested=!0,t.push(eL),t.push($B)),t.push(LB),t.push(kL)};function EZe(e,t,n){let i;return l(t.instances)&&(i=ht.getFeatureIdsByLabel(t.instances.featureIds,e.instanceFeatureIdLabel),l(i))?{hasFeatureIds:!0,hasPropertyTable:l(i.propertyTableId)}:(i=ht.getFeatureIdsByLabel(n.featureIds,e.featureIdLabel),l(i)?{hasFeatureIds:!0,hasPropertyTable:l(i.propertyTableId)}:{hasFeatureIds:!1,hasPropertyTable:!1})}var WL=R0e;function MK(e){e=e??G.EMPTY_OBJECT,this._sceneGraph=e.sceneGraph;let t=e.skin;this._skin=t,this._inverseBindMatrices=void 0,this._joints=[],this._jointMatrices=[],vZe(this)}Object.defineProperties(MK.prototype,{skin:{get:function(){return this._skin}},sceneGraph:{get:function(){return this._sceneGraph}},inverseBindMatrices:{get:function(){return this._inverseBindMatrices}},joints:{get:function(){return this._joints}},jointMatrices:{get:function(){return this._jointMatrices}}});function vZe(e){let t=e.skin,n=t.inverseBindMatrices;e._inverseBindMatrices=n;let i=t.joints,o=i.length,r=e.sceneGraph._runtimeNodes,a=e.joints,s=e._jointMatrices;for(let c=0;c<o;c++){let u=i[c].index,f=r[u];a.push(f);let d=n[c],p=O0e(f,d,new M);s.push(p)}}function O0e(e,t,n){let i=M.multiplyTransformation(e.transformToRoot,e.transform,n);return n=M.multiplyTransformation(i,t,n),n}MK.prototype.updateJointMatrices=function(){let e=this._jointMatrices,t=e.length;for(let n=0;n<t;n++){let i=this.joints[n],o=this.inverseBindMatrices[n];e[n]=O0e(i,o,e[n])}};var qL=MK;function SZe(){this.pass=void 0,this.alphaCutoff=void 0}var Mb=SZe;function wZe(e){this.shaderBuilder=new V0,this.model=e,this.uniformMap={},this.alphaOptions=new Mb,this.renderStateOptions=Ve.getState(Ve.fromCache({depthTest:{enabled:!0,func:tc.LESS_OR_EQUAL}})),this.hasSilhouette=!1,this.hasSkipLevelOfDetail=!1,this.nodeRenderResources=[]}var YL=wZe;var XL=`void silhouetteStage(inout vec4 color) {
- if(model_silhouettePass) {
- color = czm_gammaCorrect(model_silhouetteColor);
- }
- }`;var KL=`void silhouetteStage(in ProcessedAttributes attributes, inout vec4 positionClip) {
- #ifdef HAS_NORMALS
- if(model_silhouettePass) {
- vec3 normal = normalize(czm_normal3D * attributes.normalMC);
- normal.x *= czm_projection[0][0];
- normal.y *= czm_projection[1][1];
- positionClip.xy += normal.xy * positionClip.w * model_silhouetteSize * czm_pixelRatio / czm_viewport.z;
- }
- #endif
- }
- `;var Vj={name:"ModelSilhouettePipelineStage"};Vj.silhouettesLength=0;Vj.process=function(e,t,n){l(t._silhouetteId)||(t._silhouetteId=++Vj.silhouettesLength);let i=e.shaderBuilder;i.addDefine("HAS_SILHOUETTE",void 0,he.BOTH),i.addVertexLines(KL),i.addFragmentLines(XL),i.addUniform("vec4","model_silhouetteColor",he.FRAGMENT),i.addUniform("float","model_silhouetteSize",he.VERTEX),i.addUniform("bool","model_silhouettePass",he.BOTH);let o={model_silhouetteColor:function(){return t.silhouetteColor},model_silhouetteSize:function(){return t.silhouetteSize},model_silhouettePass:function(){return!1}};e.uniformMap=wt(o,e.uniformMap),e.hasSilhouette=!0};var QL=Vj;var $L=`void modelSplitterStage()
- {
- // Don't split when rendering the shadow map, because it is rendered from
- // the perspective of a totally different camera.
- #ifndef SHADOW_MAP
- if (model_splitDirection < 0.0 && gl_FragCoord.x > czm_splitPosition) discard;
- if (model_splitDirection > 0.0 && gl_FragCoord.x < czm_splitPosition) discard;
- #endif
- }
- `;var jj={name:"ModelSplitterPipelineStage",SPLIT_DIRECTION_UNIFORM_NAME:"model_splitDirection"};jj.process=function(e,t,n){let i=e.shaderBuilder;i.addDefine("HAS_MODEL_SPLITTER",void 0,he.FRAGMENT),i.addFragmentLines($L);let o={};i.addUniform("float",jj.SPLIT_DIRECTION_UNIFORM_NAME,he.FRAGMENT),o[jj.SPLIT_DIRECTION_UNIFORM_NAME]=function(){return t.splitDirection},e.uniformMap=wt(o,e.uniformMap)};var JL=jj;function IZe(e,t){this.model=e.model,this.shaderBuilder=e.shaderBuilder.clone(),this.uniformMap=We(e.uniformMap),this.alphaOptions=We(e.alphaOptions),this.renderStateOptions=We(e.renderStateOptions,!0),this.hasSilhouette=e.hasSilhouette,this.hasSkipLevelOfDetail=e.hasSkipLevelOfDetail,this.runtimeNode=t,this.attributes=[],this.attributeIndex=1,this.featureIdVertexAttributeSetIndex=0,this.instanceCount=0,this.primitiveRenderResources=[]}var ZL=IZe;function DZe(e){e=e??G.EMPTY_OBJECT,this.lightingModel=e.lightingModel??Ip.UNLIT}var eN=DZe;function PZe(e,t){this.model=e.model,this.runtimeNode=e.runtimeNode,this.attributes=e.attributes.slice(),this.attributeIndex=e.attributeIndex,this.featureIdVertexAttributeSetIndex=e.featureIdVertexAttributeSetIndex,this.uniformMap=We(e.uniformMap),this.alphaOptions=We(e.alphaOptions),this.renderStateOptions=We(e.renderStateOptions,!0),this.hasSilhouette=e.hasSilhouette,this.hasSkipLevelOfDetail=e.hasSkipLevelOfDetail,this.shaderBuilder=e.shaderBuilder.clone(),this.instanceCount=e.instanceCount,this.runtimePrimitive=t;let n=t.primitive;this.count=l(n.indices)?n.indices.count:ht.getAttributeBySemantic(n,"POSITION").count,this.hasPropertyTable=!1,this.indices=n.indices,this.wireframeIndexBuffer=void 0,this.primitiveType=n.primitiveType;let i=ht.getPositionMinMax(n,this.runtimeNode.instancingTranslationMin,this.runtimeNode.instancingTranslationMax);this.positionMin=h.clone(i.min,new h),this.positionMax=h.clone(i.max,new h),this.boundingSphere=ce.fromCornerPoints(this.positionMin,this.positionMax,new ce),this.lightingOptions=new eN,this.pickId=void 0}var tN=PZe;function LK(e){e=e??G.EMPTY_OBJECT;let t=e.command,n=e.primitiveRenderResources,i=n.model;this._command=t,this._model=i,this._runtimePrimitive=n.runtimePrimitive,this._modelMatrix=t.modelMatrix,this._boundingVolume=t.boundingVolume,this._cullFace=t.renderState.cull.face;let o=i.classificationType;this._classificationType=o,this._classifiesTerrain=o!==Wn.CESIUM_3D_TILE,this._classifies3DTiles=o!==Wn.TERRAIN,this._useDebugWireframe=i._enableDebugWireframe&&i.debugWireframe,this._pickId=n.pickId,this._commandListTerrain=[],this._commandList3DTiles=[],this._commandListIgnoreShow=[],this._commandListDebugWireframe=[],this._commandListTerrainPicking=[],this._commandList3DTilesPicking=[],BZe(this)}function RZe(e){return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:!0,frontFunction:e,frontOperation:{fail:vt.KEEP,zFail:vt.DECREMENT_WRAP,zPass:vt.KEEP},backFunction:e,backOperation:{fail:vt.KEEP,zFail:vt.INCREMENT_WRAP,zPass:vt.KEEP},reference:Gt.CESIUM_3D_TILE_MASK,mask:Gt.CESIUM_3D_TILE_MASK},stencilMask:Gt.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:tc.LESS_OR_EQUAL},depthMask:!1}}var OZe={stencilTest:{enabled:!0,frontFunction:qn.NOT_EQUAL,frontOperation:{fail:vt.ZERO,zFail:vt.ZERO,zPass:vt.ZERO},backFunction:qn.NOT_EQUAL,backOperation:{fail:vt.ZERO,zFail:vt.ZERO,zPass:vt.ZERO},reference:0,mask:Gt.CLASSIFICATION_MASK},stencilMask:Gt.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:Jt.PRE_MULTIPLIED_ALPHA_BLEND},MZe={stencilTest:{enabled:!0,frontFunction:qn.NOT_EQUAL,frontOperation:{fail:vt.ZERO,zFail:vt.ZERO,zPass:vt.ZERO},backFunction:qn.NOT_EQUAL,backOperation:{fail:vt.ZERO,zFail:vt.ZERO,zPass:vt.ZERO},reference:0,mask:Gt.CLASSIFICATION_MASK},stencilMask:Gt.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1},L0e=[];function BZe(e){let t=e._command,n=L0e;if(e._useDebugWireframe){t.pass=Ie.OPAQUE,n.length=0,n.push(t),e._commandListDebugWireframe=nN(e,n,e._commandListDebugWireframe);let r=e._commandListDebugWireframe,a=r.length;for(let s=0;s<a;s++){let c=r[s];c.count*=2,c.offset*=2}return}let o=e.model.allowPicking;if(e._classifiesTerrain){let r=Ie.TERRAIN_CLASSIFICATION,a=BK(t,r),s=M0e(t,r);n.length=0,n.push(a,s),e._commandListTerrain=nN(e,n,e._commandListTerrain),o&&(e._commandListTerrainPicking=B0e(e,n,e._commandListTerrainPicking))}if(e._classifies3DTiles){let r=Ie.CESIUM_3D_TILE_CLASSIFICATION,a=BK(t,r),s=M0e(t,r);n.length=0,n.push(a,s),e._commandList3DTiles=nN(e,n,e._commandList3DTiles),o&&(e._commandList3DTilesPicking=B0e(e,n,e._commandList3DTilesPicking))}}function nN(e,t,n){let i=e._runtimePrimitive,o=i.batchLengths,r=i.batchOffsets,a=o.length,s=t.length;for(let c=0;c<a;c++){let u=o[c],f=r[c];for(let d=0;d<s;d++){let p=t[d],g=tt.shallowClone(p);g.count=u,g.offset=f,n.push(g)}}return n}function BK(e,t){let n=tt.shallowClone(e);n.cull=!1,n.pass=t;let i=t===Ie.TERRAIN_CLASSIFICATION?qn.ALWAYS:qn.EQUAL,o=RZe(i);return n.renderState=Ve.fromCache(o),n}function M0e(e,t){let n=tt.shallowClone(e);return n.cull=!1,n.pass=t,n.renderState=Ve.fromCache(OZe),n}var LZe=[];function B0e(e,t,n){let i=Ve.fromCache(MZe),o=t[0],r=t[1],a=tt.shallowClone(o);a.cull=!0,a.pickOnly=!0;let s=tt.shallowClone(r);s.cull=!0,s.pickOnly=!0,s.renderState=i,s.pickId=e._pickId;let c=LZe;return c.length=0,c.push(a,s),nN(e,c,n)}Object.defineProperties(LK.prototype,{command:{get:function(){return this._command}},runtimePrimitive:{get:function(){return this._runtimePrimitive}},batchLengths:{get:function(){return this._runtimePrimitive.batchLengths}},batchOffsets:{get:function(){return this._runtimePrimitive.batchOffsets}},model:{get:function(){return this._model}},classificationType:{get:function(){return this._classificationType}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix=M.clone(e,this._modelMatrix);let t=this._runtimePrimitive.boundingSphere;this._boundingVolume=ce.transform(t,this._modelMatrix,this._boundingVolume)}},boundingVolume:{get:function(){return this._boundingVolume}},cullFace:{get:function(){return this._cullFace},set:function(e){this._cullFace=e}}});LK.prototype.pushCommands=function(e,t){let n=e.passes;if(n.render){if(this._useDebugWireframe){Qn(t,this._commandListDebugWireframe);return}if(this._classifiesTerrain&&Qn(t,this._commandListTerrain),this._classifies3DTiles&&Qn(t,this._commandList3DTiles),e.invertClassification&&this._classifies3DTiles){if(this._commandListIgnoreShow.length===0){let o=Ie.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,r=BK(this._command,o),a=L0e;a.length=0,a.push(r),this._commandListIgnoreShow=nN(this,a,this._commandListIgnoreShow)}Qn(t,this._commandListIgnoreShow)}}return n.pick&&(this._classifiesTerrain&&Qn(t,this._commandListTerrainPicking),this._classifies3DTiles&&Qn(t,this._commandList3DTilesPicking)),t};var iN=LK;function oN(e){e=e??G.EMPTY_OBJECT;let t=e.command,n=e.primitiveRenderResources,i=n.model;this._model=i;let o=n.runtimePrimitive;this._runtimePrimitive=o,this._primitiveRenderResources=n;let r=t.pass===Ie.TRANSLUCENT,s=!o.primitive.material.doubleSided&&!r,c=n.hasSilhouette,u=!r&&!c,f=n.hasSkipLevelOfDetail&&!r,d=c,p=l(n.edgeGeometry);this._command=t,this._modelMatrix=M.clone(t.modelMatrix),this._boundingVolume=ce.clone(t.boundingVolume),this._modelMatrix2D=new M,this._boundingVolume2D=new ce,this._modelMatrix2DDirty=!1,this._backFaceCulling=t.renderState.cull.enabled,this._cullFace=t.renderState.cull.face,this._shadows=i.shadows,this._debugShowBoundingVolume=t.debugShowBoundingVolume,this._usesBackFaceCulling=s,this._needsTranslucentCommand=u,this._needsSkipLevelOfDetailCommands=f,this._needsSilhouetteCommands=d,this._needsEdgeCommands=p,this._originalCommand=void 0,this._translucentCommand=void 0,this._skipLodBackfaceCommand=void 0,this._skipLodStencilCommand=void 0,this._silhouetteModelCommand=void 0,this._silhouetteColorCommand=void 0,this._edgeCommand=void 0,this._derivedCommands=[],this._has2DCommands=!1,NZe(this)}function Dp(e){this.command=e.command,this.updateShadows=e.updateShadows,this.updateBackFaceCulling=e.updateBackFaceCulling,this.updateCullFace=e.updateCullFace,this.updateDebugShowBoundingVolume=e.updateDebugShowBoundingVolume,this.is2D=e.is2D??!1,this.derivedCommand2D=void 0}Dp.clone=function(e){return new Dp({command:e.command,updateShadows:e.updateShadows,updateBackFaceCulling:e.updateBackFaceCulling,updateCullFace:e.updateCullFace,updateDebugShowBoundingVolume:e.updateDebugShowBoundingVolume,is2D:e.is2D,derivedCommand2D:e.derivedCommand2D})};function NZe(e){let t=e._command;t.modelMatrix=e._modelMatrix,t.boundingVolume=e._boundingVolume;let n=e._model,i=e._usesBackFaceCulling,o=e._derivedCommands;if(e._originalCommand=new Dp({command:t,updateShadows:!0,updateBackFaceCulling:i,updateCullFace:i,updateDebugShowBoundingVolume:!0,is2D:!1}),o.push(e._originalCommand),e._needsTranslucentCommand&&(e._translucentCommand=new Dp({command:GZe(t),updateShadows:!0,updateBackFaceCulling:!1,updateCullFace:!1,updateDebugShowBoundingVolume:!0}),o.push(e._translucentCommand)),e._needsSkipLevelOfDetailCommands&&(e._skipLodBackfaceCommand=new Dp({command:QZe(t),updateShadows:!1,updateBackFaceCulling:!1,updateCullFace:i,updateDebugShowBoundingVolume:!1}),e._skipLodStencilCommand=new Dp({command:$Ze(t,n),updateShadows:!0,updateBackFaceCulling:i,updateCullFace:i,updateDebugShowBoundingVolume:!0}),o.push(e._skipLodBackfaceCommand),o.push(e._skipLodStencilCommand)),e._needsSilhouetteCommands&&(e._silhouetteModelCommand=new Dp({command:HZe(t,n),updateShadows:!0,updateBackFaceCulling:i,updateCullFace:i,updateDebugShowBoundingVolume:!0}),e._silhouetteColorCommand=new Dp({command:WZe(t,n),updateShadows:!1,updateBackFaceCulling:!1,updateCullFace:!1,updateDebugShowBoundingVolume:!1}),o.push(e._silhouetteModelCommand),o.push(e._silhouetteColorCommand)),e._needsEdgeCommands){let r=e._primitiveRenderResources;e._edgeCommand=new Dp({command:qZe(t,r,n),updateShadows:!1,updateBackFaceCulling:!1,updateCullFace:!1,updateDebugShowBoundingVolume:!1}),o.push(e._edgeCommand)}}Object.defineProperties(oN.prototype,{command:{get:function(){return this._command}},runtimePrimitive:{get:function(){return this._runtimePrimitive}},model:{get:function(){return this._model}},primitiveType:{get:function(){return this._command.primitiveType}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix=M.clone(e,this._modelMatrix),this._modelMatrix2DDirty=!0,this._boundingVolume=ce.transform(this.runtimePrimitive.boundingSphere,this._modelMatrix,this._boundingVolume)}},boundingVolume:{get:function(){return this._boundingVolume}},shadows:{get:function(){return this._shadows},set:function(e){this._shadows=e,kZe(this)}},backFaceCulling:{get:function(){return this._backFaceCulling},set:function(e){this._backFaceCulling!==e&&(this._backFaceCulling=e,zZe(this))}},cullFace:{get:function(){return this._cullFace},set:function(e){this._cullFace!==e&&(this._cullFace=e,UZe(this))}},debugShowBoundingVolume:{get:function(){return this._debugShowBoundingVolume},set:function(e){this._debugShowBoundingVolume!==e&&(this._debugShowBoundingVolume=e,VZe(this))}}});function FZe(e,t){let n=e._modelMatrix;e._modelMatrix2D=M.clone(n,e._modelMatrix2D),e._modelMatrix2D[13]-=D.sign(n[13])*2*D.PI*t.mapProjection.ellipsoid.maximumRadius,e._boundingVolume2D=ce.transform(e.runtimePrimitive.boundingSphere,e._modelMatrix2D,e._boundingVolume2D)}function kZe(e){let t=e.shadows,n=vn.castShadows(t),i=vn.receiveShadows(t),o=e._derivedCommands;for(let r=0;r<o.length;++r){let a=o[r];if(a.updateShadows){let s=a.command;s.castShadows=n,s.receiveShadows=i}}}function zZe(e){let t=e.backFaceCulling,n=e._derivedCommands;for(let i=0;i<n.length;++i){let o=n[i];if(o.updateBackFaceCulling){let r=o.command,a=We(r.renderState,!0);a.cull.enabled=t,r.renderState=Ve.fromCache(a)}}}function UZe(e){let t=e.cullFace,n=e._derivedCommands;for(let i=0;i<n.length;++i){let o=n[i];if(o.updateCullFace){let r=o.command,a=We(r.renderState,!0);a.cull.face=t,r.renderState=Ve.fromCache(a)}}}function VZe(e){let t=e.debugShowBoundingVolume,n=e._derivedCommands;for(let i=0;i<n.length;++i){let o=n[i];if(o.updateDebugShowBoundingVolume){let r=o.command;r.debugShowBoundingVolume=t}}}oN.prototype.pushCommands=function(e,t){let n=NK(this,e);n&&!this._has2DCommands&&(jZe(this),this._has2DCommands=!0,this._modelMatrix2DDirty=!0),this._modelMatrix2DDirty&&(FZe(this,e),this._modelMatrix2DDirty=!1);let i=this.model.styleCommandsNeeded;if(!(this._needsTranslucentCommand&&l(i)&&(i!==tm.ALL_OPAQUE&&HA(t,this._translucentCommand,n),i===tm.ALL_TRANSLUCENT))){if(this._needsSkipLevelOfDetailCommands){let{tileset:o,tile:r}=this._model.content;if(o.hasMixedContent){r._finalResolution||HA(o._backfaceCommands,this._skipLodBackfaceCommand,n),YZe(this,r,n),HA(t,this._skipLodStencilCommand,n);return}}if(this._needsSilhouetteCommands){HA(t,this._silhouetteModelCommand,n);return}return this._model.edgeDisplayMode===Md.EDGES_ONLY&&this._needsEdgeCommands||(HA(t,this._originalCommand,n),this._needsEdgeCommands&&this._model.edgeDisplayMode!==Md.SURFACES_ONLY&&HA(t,this._edgeCommand,n)),t}};oN.prototype.pushSilhouetteCommands=function(e,t){let n=NK(this,e);return HA(t,this._silhouetteColorCommand,n),t};oN.prototype.pushEdgeCommands=function(e,t){if(!l(this._edgeCommand)||this._model.edgeDisplayMode===Md.SURFACES_ONLY)return t;let n=this._model.edgeDisplayMode===Md.EDGES_ONLY?Ie.CESIUM_3D_TILE_EDGES_DIRECT:Ie.CESIUM_3D_TILE_EDGES;this._edgeCommand.command.pass=n,l(this._edgeCommand.derivedCommand2D)&&(this._edgeCommand.derivedCommand2D.command.pass=n);let i=NK(this,e);return HA(t,this._edgeCommand,i),t};function HA(e,t,n){e.push(t.command),n&&e.push(t.derivedCommand2D.command)}function NK(e,t){if(t.mode!==ie.SCENE2D||e.model._projectTo2D)return!1;let i=e.model.sceneGraph._boundingSphere2D,o=i.center.y-i.radius,r=i.center.y+i.radius,a=t.mapProjection.ellipsoid.maximumRadius*D.PI;return o<a&&r>a||o<-a&&r>-a}function Bb(e,t){if(!l(t))return;let n=Dp.clone(t),i=tt.shallowClone(t.command);return i.modelMatrix=e._modelMatrix2D,i.boundingVolume=e._boundingVolume2D,n.command=i,n.updateShadows=!1,n.is2D=!0,t.derivedCommand2D=n,e._derivedCommands.push(n),n}function jZe(e){Bb(e,e._originalCommand),Bb(e,e._translucentCommand),Bb(e,e._skipLodBackfaceCommand),Bb(e,e._skipLodStencilCommand),Bb(e,e._silhouetteModelCommand),Bb(e,e._silhouetteColorCommand),Bb(e,e._edgeCommand)}function GZe(e){let t=tt.shallowClone(e);t.pass=Ie.TRANSLUCENT;let n=We(e.renderState,!0);return n.cull.enabled=!1,n.depthMask=!1,n.blending=Jt.ALPHA_BLEND,t.renderState=Ve.fromCache(n),t}function HZe(e,t){let n=t._silhouetteId%255,i=tt.shallowClone(e),o=We(e.renderState,!0);return o.stencilTest={enabled:!0,frontFunction:ee.ALWAYS,backFunction:ee.ALWAYS,reference:n,mask:-1,frontOperation:{fail:ee.KEEP,zFail:ee.KEEP,zPass:ee.REPLACE},backOperation:{fail:ee.KEEP,zFail:ee.KEEP,zPass:ee.REPLACE}},t.isInvisible()&&(o.colorMask={red:!1,green:!1,blue:!1,alpha:!1}),i.renderState=Ve.fromCache(o),i}function WZe(e,t){let n=t._silhouetteId%255,i=tt.shallowClone(e),o=We(e.renderState,!0);o.cull.enabled=!1,(e.pass===Ie.TRANSLUCENT||t.silhouetteColor.alpha<1)&&(i.pass=Ie.TRANSLUCENT,o.depthMask=!1,o.blending=Jt.ALPHA_BLEND),o.stencilTest={enabled:!0,frontFunction:ee.NOTEQUAL,backFunction:ee.NOTEQUAL,reference:n,mask:-1,frontOperation:{fail:ee.KEEP,zFail:ee.KEEP,zPass:ee.KEEP},backOperation:{fail:ee.KEEP,zFail:ee.KEEP,zPass:ee.KEEP}};let a=We(e.uniformMap);return a.model_silhouettePass=function(){return!0},i.renderState=Ve.fromCache(o),i.uniformMap=a,i.castShadows=!1,i.receiveShadows=!1,i}function qZe(e,t){let n=t.edgeGeometry,i=tt.shallowClone(e);i.vertexArray=n.vertexArray,i.primitiveType=n.primitiveType,i.count=n.indexCount,l(n.shaderProgram)&&(i.shaderProgram=n.shaderProgram),i.pass=n.pass;let o=We(e.uniformMap);return o.u_isEdgePass=function(){return!0},i.uniformMap=o,i.castShadows=!1,i.receiveShadows=!1,i}function YZe(e,t,n){let i=e._skipLodStencilCommand,o=i.command,r=t._selectionDepth,a=XZe(o);if(r!==a){let s=KZe(r),c=We(o.renderState,!0);c.stencilTest.reference=s,o.renderState=Ve.fromCache(c),n&&(i.derivedCommand2D.renderState=c)}}function XZe(e){return(e.renderState.stencilTest.reference&Gt.SKIP_LOD_MASK)>>>Gt.SKIP_LOD_BIT_SHIFT}function KZe(e){return Gt.CESIUM_3D_TILE_MASK|e<<Gt.SKIP_LOD_BIT_SHIFT}function QZe(e){let t=tt.shallowClone(e),n=We(e.renderState,!0);n.cull.enabled=!0,n.cull.face=Mi.FRONT,n.colorMask={red:!1,green:!1,blue:!1,alpha:!1},n.polygonOffset={enabled:!0,factor:5,units:5};let i=We(t.uniformMap),o=new z(5,5);return i.u_polygonOffset=function(){return o},t.renderState=Ve.fromCache(n),t.uniformMap=i,t.castShadows=!1,t.receiveShadows=!1,t}function $Ze(e){let t=tt.shallowClone(e),n=We(e.renderState,!0),{stencilTest:i}=n;return i.enabled=!0,i.mask=Gt.SKIP_LOD_MASK,i.reference=Gt.CESIUM_3D_TILE_MASK,i.frontFunction=qn.GREATER_OR_EQUAL,i.frontOperation.zPass=vt.REPLACE,i.backFunction=qn.GREATER_OR_EQUAL,i.backOperation.zPass=vt.REPLACE,n.stencilMask=Gt.CESIUM_3D_TILE_MASK|Gt.SKIP_LOD_MASK,t.renderState=Ve.fromCache(n),t}var rN=oN;var aN=`precision highp float;
-
- czm_modelVertexOutput defaultVertexOutput(vec3 positionMC) {
- czm_modelVertexOutput vsOutput;
- vsOutput.positionMC = positionMC;
- vsOutput.pointSize = 1.0;
- return vsOutput;
- }
-
- void main()
- {
- // Initialize the attributes struct with all
- // attributes except quantized ones.
- ProcessedAttributes attributes;
- initializeAttributes(attributes);
-
- #ifdef HAS_IMAGERY
- initializeImageryAttributes();
- #endif
-
- // Dequantize the quantized ones and add them to the
- // attributes struct.
- #ifdef USE_DEQUANTIZATION
- dequantizationStage(attributes);
- #endif
-
- #ifdef HAS_MORPH_TARGETS
- morphTargetsStage(attributes);
- #endif
-
- #ifdef HAS_SKINNING
- skinningStage(attributes);
- #endif
-
- #ifdef HAS_PRIMITIVE_OUTLINE
- primitiveOutlineStage();
- #endif
-
- // Compute the bitangent according to the formula in the glTF spec.
- // Normal and tangents can be affected by morphing and skinning, so
- // the bitangent should not be computed until their values are finalized.
- #ifdef HAS_BITANGENTS
- attributes.bitangentMC = normalize(cross(attributes.normalMC, attributes.tangentMC) * attributes.tangentSignMC);
- #endif
-
- FeatureIds featureIds;
- featureIdStage(featureIds, attributes);
-
- #ifdef HAS_SELECTED_FEATURE_ID
- SelectedFeature feature;
- selectedFeatureIdStage(feature, featureIds);
- // Handle any show properties that come from the style.
- cpuStylingStage(attributes.positionMC, feature);
- #endif
-
- #if defined(USE_2D_POSITIONS) || defined(USE_2D_INSTANCING)
- // The scene mode 2D pipeline stage and instancing stage add a different
- // model view matrix to accurately project the model to 2D. However, the
- // output positions and normals should be transformed by the 3D matrices
- // to keep the data the same for the fragment shader.
- mat4 modelView = czm_modelView3D;
- mat3 normal = czm_normal3D;
- #else
- // These are used for individual model projection because they will
- // automatically change based on the scene mode.
- mat4 modelView = czm_modelView;
- mat3 normal = czm_normal;
- #endif
-
- // Update the position for this instance in place
- #ifdef HAS_INSTANCING
-
- // The legacy instance stage is used when rendering i3dm models that
- // encode instances transforms in world space, as opposed to glTF models
- // that use EXT_mesh_gpu_instancing, where instance transforms are encoded
- // in object space.
- #ifdef USE_LEGACY_INSTANCING
- mat4 instanceModelView;
- mat3 instanceModelViewInverseTranspose;
-
- legacyInstancingStage(attributes, instanceModelView, instanceModelViewInverseTranspose);
-
- modelView = instanceModelView;
- normal = instanceModelViewInverseTranspose;
- #else
- instancingStage(attributes);
- #endif
-
- #ifdef USE_PICKING
- v_pickColor = a_pickColor;
- #endif
-
- #endif
-
- Metadata metadata;
- MetadataClass metadataClass;
- MetadataStatistics metadataStatistics;
- metadataStage(featureIds, metadata, metadataClass, metadataStatistics, attributes);
-
- #ifdef HAS_VERTICAL_EXAGGERATION
- verticalExaggerationStage(attributes);
- #endif
-
- #ifdef HAS_CUSTOM_VERTEX_SHADER
- czm_modelVertexOutput vsOutput = defaultVertexOutput(attributes.positionMC);
- customShaderStage(vsOutput, attributes, featureIds, metadata, metadataClass, metadataStatistics);
- #endif
-
- // Compute the final position in each coordinate system needed.
- // This returns the value that will be assigned to gl_Position.
- vec4 positionClip = geometryStage(attributes, modelView, normal);
-
- #if defined(HAS_LINE_CUMULATIVE_DISTANCE) || defined(HAS_LINE_PATTERN)
- lineStyleStageVS(attributes);
- #endif
-
- // This must go after the geometry stage as it needs v_positionWC
- #ifdef HAS_ATMOSPHERE
- atmosphereStage(attributes);
- #endif
-
- #ifdef ENABLE_CLIPPING_POLYGONS
- modelClippingPolygonsStage(attributes);
- #endif
-
- #ifdef HAS_SILHOUETTE
- silhouetteStage(attributes, positionClip);
- #endif
-
- #ifdef HAS_POINT_CLOUD_SHOW_STYLE
- float show = pointCloudShowStylingStage(attributes, metadata);
- #else
- float show = 1.0;
- #endif
-
- #ifdef HAS_POINT_CLOUD_BACK_FACE_CULLING
- show *= pointCloudBackFaceCullingStage();
- #endif
-
- #ifdef HAS_POINT_CLOUD_COLOR_STYLE
- v_pointCloudColor = pointCloudColorStylingStage(attributes, metadata);
- #endif
-
- #ifdef PRIMITIVE_TYPE_POINTS
- #ifdef HAS_CUSTOM_VERTEX_SHADER
- gl_PointSize = vsOutput.pointSize;
- #elif defined(HAS_POINT_CLOUD_POINT_SIZE_STYLE) || defined(HAS_POINT_CLOUD_ATTENUATION)
- gl_PointSize = pointCloudPointSizeStylingStage(attributes, metadata);
- #elif defined(HAS_POINT_DIAMETER)
- gl_PointSize = u_pointDiameter;
- #else
- gl_PointSize = 1.0;
- #endif
-
- gl_PointSize *= show;
- #endif
-
- // Important NOT to compute gl_Position = show * positionClip or we hit:
- // https://github.com/CesiumGS/cesium/issues/11270
- //
- // We will discard points with v_pointCloudShow == 0 in the fragment shader.
- gl_Position = positionClip;
-
- #ifdef HAS_EDGE_VISIBILITY
- edgeVisibilityStageVS();
- #endif
-
- #ifdef HAS_POINT_CLOUD_SHOW_STYLE
- v_pointCloudShow = show;
- #endif
- }
- `;var sN=`
- precision highp float;
-
- czm_modelMaterial defaultModelMaterial()
- {
- czm_modelMaterial material;
- material.diffuse = vec3(0.0);
- material.specular = vec3(1.0);
- material.roughness = 1.0;
- material.occlusion = 1.0;
- material.normalEC = vec3(0.0, 0.0, 1.0);
- material.emissive = vec3(0.0);
- material.alpha = 1.0;
- return material;
- }
-
- vec4 handleAlpha(vec3 color, float alpha)
- {
- #ifdef ALPHA_MODE_MASK
- if (alpha < u_alphaCutoff) {
- discard;
- }
- #endif
-
- return vec4(color, alpha);
- }
-
- void lineStyleStage()
- {
- #if defined(HAS_LINE_PATTERN) && !defined(HAS_EDGE_VISIBILITY)
- const float maskLength = 16.0;
- float dashPosition = fract(v_lineCoord / maskLength);
- float maskIndex = floor(dashPosition * maskLength);
- float maskTest = floor(u_linePattern / pow(2.0, maskIndex));
- if (mod(maskTest, 2.0) < 1.0) {
- discard;
- }
- #endif
- }
-
- SelectedFeature selectedFeature;
-
- void main()
- {
- #if defined(PRIMITIVE_TYPE_POINTS) && defined(HAS_POINT_DIAMETER)
- // Render points as circles
- float distanceToCenter = length(gl_PointCoord - vec2(0.5));
- if (distanceToCenter > 0.5) {
- discard;
- }
- #endif
-
- #ifdef HAS_POINT_CLOUD_SHOW_STYLE
- if (v_pointCloudShow == 0.0)
- {
- discard;
- }
- #endif
-
- #ifdef HAS_MODEL_SPLITTER
- modelSplitterStage();
- #endif
-
- czm_modelMaterial material = defaultModelMaterial();
-
- ProcessedAttributes attributes;
- geometryStage(attributes);
-
- FeatureIds featureIds;
- featureIdStage(featureIds, attributes);
-
- Metadata metadata;
- MetadataClass metadataClass;
- MetadataStatistics metadataStatistics;
- metadataStage(featureIds, metadata, metadataClass, metadataStatistics, attributes);
-
- //========================================================================
- // When not picking metadata START
- #ifndef METADATA_PICKING_ENABLED
-
- #ifdef HAS_SELECTED_FEATURE_ID
- selectedFeatureIdStage(selectedFeature, featureIds);
- #endif
-
- #ifndef CUSTOM_SHADER_REPLACE_MATERIAL
- materialStage(material, attributes, selectedFeature);
- #endif
-
- #ifdef HAS_CUSTOM_FRAGMENT_SHADER
- customShaderStage(material, attributes, featureIds, metadata, metadataClass, metadataStatistics);
- #endif
-
- lightingStage(material, attributes);
-
- #ifdef HAS_SELECTED_FEATURE_ID
- cpuStylingStage(material, selectedFeature);
- #endif
-
- #ifdef HAS_MODEL_COLOR
- modelColorStage(material);
- #endif
-
- #ifdef HAS_PRIMITIVE_OUTLINE
- primitiveOutlineStage(material);
- #endif
-
- vec4 color = handleAlpha(material.diffuse, material.alpha);
-
- // When not picking metadata END
- //========================================================================
- #else
- //========================================================================
- // When picking metadata START
-
- vec4 metadataValues = vec4(0.0, 0.0, 0.0, 0.0);
- metadataPickingStage(metadata, metadataClass, metadataValues);
- vec4 color = metadataValues;
-
- #endif
- // When picking metadata END
- //========================================================================
-
- lineStyleStage();
-
- #ifdef HAS_CLIPPING_PLANES
- modelClippingPlanesStage(color);
- #endif
-
- #ifdef ENABLE_CLIPPING_POLYGONS
- modelClippingPolygonsStage();
- #endif
-
- //========================================================================
- // When not picking metadata START
- #ifndef METADATA_PICKING_ENABLED
-
- #if defined(HAS_SILHOUETTE) && defined(HAS_NORMALS)
- silhouetteStage(color);
- #endif
-
- #ifdef HAS_ATMOSPHERE
- atmosphereStage(color, attributes);
- #endif
-
- #ifdef HAS_EDGE_VISIBILITY
- edgeVisibilityStage(color, featureIds);
- edgeDetectionStage(color, featureIds);
- #endif
-
- #endif
- // When not picking metadata END
- //========================================================================
-
- out_FragColor = color;
- }
-
- `;function N0e(){}N0e.buildModelDrawCommand=function(e,t){let n=e.shaderBuilder,i=JZe(e,n,t),o=ZZe(e,i,t),r=e.model;return l(r.classificationType)?new iN({primitiveRenderResources:e,command:o}):new rN({primitiveRenderResources:e,command:o})};function JZe(e,t,n){t.addVertexLines(aN),t.addFragmentLines(sN);let i=e.model,o=t.buildShaderProgram(n.context);return i._pipelineResources.push(o),o}function ZZe(e,t,n){let i=eet(e),o=new Fn({context:n.context,indexBuffer:i,attributes:e.attributes}),r=e.model;r._pipelineResources.push(o);let a=e.alphaOptions.pass,s=r.sceneGraph,c=n.mode===ie.SCENE3D,u,f;if(!c&&!n.scene3DOnly&&r._projectTo2D)u=M.multiplyTransformation(s._computedModelMatrix,e.runtimeNode.computedTransform,new M),f=e.runtimePrimitive.boundingSphere2D;else{let x=c?s._computedModelMatrix:s._computedModelMatrix2D;u=M.multiplyTransformation(x,e.runtimeNode.computedTransform,new M),f=ce.transform(e.boundingSphere,u)}let d=We(Ve.fromCache(e.renderStateOptions),!0);d.cull.face=ht.getCullFace(u,e.primitiveType),d=Ve.fromCache(d);let p=l(r.classificationType),g=p?!1:vn.castShadows(r.shadows),m=p?!1:vn.receiveShadows(r.shadows),A=p?void 0:e.pickId;return new tt({boundingVolume:f,modelMatrix:u,uniformMap:e.uniformMap,renderState:d,vertexArray:o,shaderProgram:t,cull:r.cull,pass:a,count:e.count,owner:r,pickId:A,pickMetadataAllowed:!0,instanceCount:e.instanceCount,primitiveType:e.primitiveType,debugShowBoundingVolume:r.debugShowBoundingVolume,castShadows:g,receiveShadows:m})}function eet(e){let t=e.wireframeIndexBuffer;if(l(t))return t;let n=e.indices;if(l(n))return n.buffer}var cN=N0e;function ul(e){e=e??G.EMPTY_OBJECT;let t=e.modelComponents;this._model=e.model,this._components=t,this._pipelineStages=[],this._updateStages=[],this._runtimeNodes=[],this._rootNodes=[],this._skinnedNodes=[],this._runtimeSkins=[],this.modelPipelineStages=[],this._boundingSphere=void 0,this._boundingSphere2D=void 0,this._computedModelMatrix=M.clone(M.IDENTITY),this._computedModelMatrix2D=M.clone(M.IDENTITY),this._axisCorrectionMatrix=ht.getAxisCorrectionMatrix(t.upAxis,t.forwardAxis,new M),this._runtimeArticulations={},tet(this)}Object.defineProperties(ul.prototype,{components:{get:function(){return this._components}},computedModelMatrix:{get:function(){return this._computedModelMatrix}},axisCorrectionMatrix:{get:function(){return this._axisCorrectionMatrix}},boundingSphere:{get:function(){return this._boundingSphere}}});function tet(e){let t=e._components,n=t.scene,o=e._model.modelMatrix;F0e(e,o);let r=t.articulations,a=r.length,s=e._runtimeArticulations;for(let b=0;b<a;b++){let C=r[b],E=new yB({articulation:C,sceneGraph:e}),S=E.name;s[S]=E}let c=t.nodes,u=c.length;e._runtimeNodes=new Array(u);let d=n.nodes.length,p=M.IDENTITY;for(let b=0;b<d;b++){let C=n.nodes[b],E=k0e(e,C,p);e._rootNodes.push(E)}let g=t.skins,m=e._runtimeSkins,A=g.length;for(let b=0;b<A;b++){let C=g[b];m.push(new qL({skin:C,sceneGraph:e}))}let y=e._skinnedNodes,x=y.length;for(let b=0;b<x;b++){let C=y[b],E=e._runtimeNodes[C],w=c[C].skin.index;E._runtimeSkin=m[w],E.updateJointMatrices()}e.applyArticulations()}function F0e(e,t){let n=e._components,i=e._model;e._computedModelMatrix=M.multiplyTransformation(t,n.transform,e._computedModelMatrix),e._computedModelMatrix=M.multiplyTransformation(e._computedModelMatrix,e._axisCorrectionMatrix,e._computedModelMatrix),e._computedModelMatrix=M.multiplyByUniformScale(e._computedModelMatrix,i.computedScale,e._computedModelMatrix)}var net=new h;function iet(e,t){let n=e._computedModelMatrix,i=M.getTranslation(n,net);if(!h.equals(i,h.ZERO))e._computedModelMatrix2D=pt.basisTo2D(t.mapProjection,n,e._computedModelMatrix2D);else{let o=e.boundingSphere.center,r=pt.ellipsoidTo2DModelMatrix(t.mapProjection,o,e._computedModelMatrix2D);e._computedModelMatrix2D=M.multiply(r,n,e._computedModelMatrix2D)}e._boundingSphere2D=ce.transform(e._boundingSphere,e._computedModelMatrix2D,e._boundingSphere2D)}function k0e(e,t,n){let i=[],o=ht.getNodeTransform(t),r=t.children.length;for(let f=0;f<r;f++){let d=t.children[f],p=M.multiplyTransformation(n,o,new M),g=k0e(e,d,p);i.push(g)}let a=new BB({node:t,transform:o,transformToRoot:n,children:i,sceneGraph:e}),s=t.primitives.length;for(let f=0;f<s;f++)a.runtimePrimitives.push(new WL({primitive:t.primitives[f],node:t,model:e._model}));let c=t.index;e._runtimeNodes[c]=a,l(t.skin)&&e._skinnedNodes.push(c);let u=t.name;if(l(u)){let f=e._model,d=new SB(f,a);f._nodesByName[u]=d}return c}var oet=new h,ret=new h,aet=new h,set=new h;ul.prototype.buildDrawCommands=function(e){let t=this.buildRenderResources(e);this.computeBoundingVolumes(t),this.createDrawCommands(t,e)};ul.prototype.buildRenderResources=function(e){let t=this._model,n=new YL(t);t.statistics.clear(),this.configurePipeline(e);let i=this.modelPipelineStages;for(let o=0;o<i.length;o++)i[o].process(n,t,e);for(let o=0;o<this._runtimeNodes.length;o++){let r=this._runtimeNodes[o];if(!l(r))continue;r.configurePipeline();let a=r.pipelineStages,s=new ZL(n,r);n.nodeRenderResources[o]=s;for(let c=0;c<a.length;c++)a[c].process(s,r.node,e);for(let c=0;c<r.runtimePrimitives.length;c++){let u=r.runtimePrimitives[c];u.configurePipeline(e);let f=u.pipelineStages,d=new tN(s,u);s.primitiveRenderResources[c]=d;for(let p=0;p<f.length;p++)f[p].process(d,u.primitive,e)}}return n};ul.prototype.computeBoundingVolumes=function(e){let t=this._model,n=h.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,oet),i=h.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,ret);for(let o=0;o<this._runtimeNodes.length;o++){let r=this._runtimeNodes[o];if(!l(r))continue;let a=e.nodeRenderResources[o],s=r.computedTransform;for(let c=0;c<r.runtimePrimitives.length;c++){let u=r.runtimePrimitives[c],f=a.primitiveRenderResources[c];u.boundingSphere=ce.clone(f.boundingSphere,new ce);let d=M.multiplyByPoint(s,f.positionMin,aet),p=M.multiplyByPoint(s,f.positionMax,set);h.minimumByComponent(n,d,n),h.maximumByComponent(i,p,i)}}this._boundingSphere=ce.fromCornerPoints(n,i,new ce),this._boundingSphere=ce.transformWithoutScale(this._boundingSphere,this._axisCorrectionMatrix,this._boundingSphere),this._boundingSphere=ce.transform(this._boundingSphere,this._components.transform,this._boundingSphere),t._boundingSphere=ce.transform(this._boundingSphere,t.modelMatrix,t._boundingSphere),t._initialRadius=t._boundingSphere.radius,t._boundingSphere.radius*=t._clampedScale};ul.prototype.createDrawCommands=function(e,t){for(let n=0;n<this._runtimeNodes.length;n++){let i=this._runtimeNodes[n];if(!l(i))continue;let o=e.nodeRenderResources[n];for(let r=0;r<i.runtimePrimitives.length;r++){let a=i.runtimePrimitives[r],s=o.primitiveRenderResources[r],c=cN.buildModelDrawCommand(s,t);a.drawCommand=c}}};ul.prototype.configurePipeline=function(e){let t=this.modelPipelineStages;t.length=0;let n=this._model,i=e.fog.enabled&&e.fog.renderable;l(n.color)&&t.push(zA),!l(n.classificationType)&&(n.imageBasedLighting.enabled&&t.push(_B),n.isClippingEnabled()&&t.push(CB),n.isClippingPolygonsEnabled()&&t.push(vB),n.hasSilhouette(e)&&t.push(QL),l(n.splitDirection)&&n.splitDirection!==Or.NONE&&t.push(JL),Br.is3DTiles(n.type)&&t.push(dB),i&&t.push(pB))};ul.prototype.update=function(e,t){let n,i,o;for(n=0;n<this._runtimeNodes.length;n++){let r=this._runtimeNodes[n];if(!l(r))continue;for(i=0;i<r.updateStages.length;i++)r.updateStages[i].update(r,this,e);let a=e.mode!==ie.SCENE3D&&this._model._projectTo2D;for(t&&!a&&this.updateJointMatrices(),i=0;i<r.runtimePrimitives.length;i++){let s=r.runtimePrimitives[i];for(o=0;o<s.updateStages.length;o++)s.updateStages[o].update(s,this)}}};ul.prototype.updateModelMatrix=function(e,t){F0e(this,e),t.mode!==ie.SCENE3D&&iet(this,t);let n=this._rootNodes;for(let i=0;i<n.length;i++){let o=this._runtimeNodes[n[i]];o._transformDirty=!0}};ul.prototype.updateJointMatrices=function(){let e=this._skinnedNodes,t=e.length;for(let n=0;n<t;n++){let i=e[n];this._runtimeNodes[i].updateJointMatrices()}};function z0e(e,t,n,i,o){if(n&&!t.show)return;let r=t.children.length;for(let c=0;c<r;c++){let u=t.getChild(c);z0e(e,u,n,i,o)}let a=t.runtimePrimitives,s=a.length;for(let c=0;c<s;c++){let u=a[c];i(u,o)}}function Gj(e,t,n,i){let o=e._rootNodes,r=o.length;for(let a=0;a<r;a++){let s=o[a],c=e._runtimeNodes[s];z0e(e,c,t,n,i)}}var cet={backFaceCulling:void 0};ul.prototype.updateBackFaceCulling=function(e){let t=cet;t.backFaceCulling=e,Gj(this,!1,uet,t)};function uet(e,t){let n=e.drawCommand;n.backFaceCulling=t.backFaceCulling}var fet={shadowMode:void 0};ul.prototype.updateShadows=function(e){let t=fet;t.shadowMode=e,Gj(this,!1,det,t)};function det(e,t){let n=e.drawCommand;n.shadows=t.shadowMode}var het={debugShowBoundingVolume:void 0};ul.prototype.updateShowBoundingVolume=function(e){let t=het;t.debugShowBoundingVolume=e,Gj(this,!1,met,t)};function met(e,t){let n=e.drawCommand;n.debugShowBoundingVolume=t.debugShowBoundingVolume}var U0e=[],V0e=[],pet={frameState:void 0,hasSilhouette:void 0};ul.prototype.pushDrawCommands=function(e){let t=U0e;t.length=0;let n=V0e;n.length=0;let i=pet;i.hasSilhouette=this._model.hasSilhouette(e),i.frameState=e,Gj(this,!0,get,i),Qn(e.commandList,t),Qn(e.commandList,n)};function get(e,t){let n=t.frameState,i=t.hasSilhouette,o=n.passes,r=U0e,a=V0e,s=e.drawCommand;s.pushCommands(n,n.commandList),i&&!o.pick&&s.pushSilhouetteCommands(n,r),l(s.pushEdgeCommands)&&s.pushEdgeCommands(n,a)}ul.prototype.setArticulationStage=function(e,t){let n=e.split(" ");if(n.length!==2)return;let i=n[0],o=n[1],r=this._runtimeArticulations[i];l(r)&&r.setArticulationStage(o,t)};ul.prototype.applyArticulations=function(){let e=this._runtimeArticulations;for(let t in e)e.hasOwnProperty(t)&&e[t].apply()};var lN=ul;function WA(){this.pointsLength=0,this.trianglesLength=0,this.geometryByteLength=0,this.texturesByteLength=0,this.propertyTablesByteLength=0,this._bufferIdSet={},this._textureIdByteLengths={},this._batchTextureIdMap=new Lt}Object.defineProperties(WA.prototype,{batchTexturesByteLength:{get:function(){let e=this._batchTextureIdMap.length,t=this._batchTextureIdMap.values,n=0;for(let i=0;i<e;i++)n+=t[i].byteLength;return n}}});WA.prototype.clear=function(){this.pointsLength=0,this.trianglesLength=0,this.geometryByteLength=0,this.texturesByteLength=0,this.propertyTablesByteLength=0,this._bufferIdSet={},this._textureIdByteLengths={},this._batchTextureIdMap.removeAll()};WA.prototype.addBuffer=function(e,t){if(!this._bufferIdSet.hasOwnProperty(e._id)){let n=t?2:1;this.geometryByteLength+=e.sizeInBytes*n}this._bufferIdSet[e._id]=!0};WA.prototype.addTexture=function(e){this._textureIdByteLengths.hasOwnProperty(e._id)||(this.texturesByteLength+=e.sizeInBytes,this._textureIdByteLengths[e._id]=e.sizeInBytes)};WA.prototype.getTextureIds=function(){return Object.keys(this._textureIdByteLengths)};WA.prototype.getTextureByteLengthById=function(e){return this._textureIdByteLengths[e]};WA.prototype.addBatchTexture=function(e){this._batchTextureIdMap.contains(e._id)||this._batchTextureIdMap.set(e._id,e)};var uN=WA;var W0e=Yr(M4(),1);var j0e={},Lb=Uint32Array.BYTES_PER_ELEMENT;j0e.parse=function(e,t){t=t??0;let n=new Uint8Array(e),i=new DataView(e);t+=Lb;let o=i.getUint32(t,!0);if(o!==1)throw new re(`Only Point Cloud tile version 1 is supported. Version ${o} is not.`);t+=Lb,t+=Lb;let r=i.getUint32(t,!0);if(r===0)throw new re("Feature table must have a byte length greater than zero");t+=Lb;let a=i.getUint32(t,!0);t+=Lb;let s=i.getUint32(t,!0);t+=Lb;let c=i.getUint32(t,!0);t+=Lb;let u=Cr(n,t,r);t+=r;let f=new Uint8Array(e,t,a);t+=a;let d,p;s>0&&(d=Cr(n,t,s),Object.keys(d).length===0&&(d=void 0),t+=s,c>0&&(p=new Uint8Array(e,t,c),p=new Uint8Array(p),t+=c));let g=new Zh(u,f),m=g.getGlobalProperty("POINTS_LENGTH");if(g.featuresLength=m,!l(m))throw new re("Feature table global property: POINTS_LENGTH must be defined");let A=g.getGlobalProperty("RTC_CENTER",Y.FLOAT,3);l(A)&&(A=h.unpack(A));let y=Aet(g,d);if(y.rtcCenter=A,y.pointsLength=m,!y.hasPositions){let x=yet(g);y.positions=x,y.hasPositions=y.hasPositions||l(x)}if(!y.hasPositions)throw new re("Either POSITION or POSITION_QUANTIZED must be defined.");if(!y.hasNormals){let x=bet(g);y.normals=x,y.hasNormals=y.hasNormals||l(x)}if(!y.hasColors){let x=xet(g);y.colors=x,y.hasColors=y.hasColors||l(x),y.hasConstantColor=l(y.constantColor),y.isTranslucent=l(x)&&x.isTranslucent}if(!y.hasBatchIds){let x=Cet(g);y.batchIds=x,y.hasBatchIds=y.hasBatchIds||l(x)}if(y.hasBatchIds){let x=g.getGlobalProperty("BATCH_LENGTH");if(!l(x))throw new re("Global property: BATCH_LENGTH must be defined when BATCH_ID is defined.");y.batchLength=x}return(l(d)||l(p))&&(y.batchTableJson=d,y.batchTableBinary=p),_et(y),y};function _et(e){let t=e.batchTableJson;if(!l(t))return;let n=e.batchTableBinary;if(l(n))return;let i=Object.keys(e.draco?.batchTableProperties??{}),o=[];for(let r of Object.keys(t)){let s=t[r].byteOffset;l(s)&&(i.includes(r)||o.push(r))}for(let r of o)_t("PntsParser-invalidBinaryBodyReference",`The point cloud data contained a binary property ${r} that could not be resolved - skipping`),delete t[r]}function Aet(e,t){let n=e.json,i,o,r,a=l(n.extensions)?n.extensions["3DTILES_draco_point_compression"]:void 0,s=l(t)&&l(t.extensions)?t.extensions["3DTILES_draco_point_compression"]:void 0;l(s)&&(r=s.properties);let c,u,f,d,p;if(l(a)){o=a.properties;let m=a.byteOffset,A=a.byteLength;if(!l(o)||!l(m)||!l(A))throw new re("Draco properties, byteOffset, and byteLength must be defined");i=e.buffer.slice(m,m+A),c=l(o.POSITION),u=l(o.RGB)||l(o.RGBA),f=l(o.NORMAL),d=l(o.BATCH_ID),p=l(o.RGBA)}let g;return l(i)&&(g={buffer:i,featureTableProperties:o,batchTableProperties:r,properties:wt(o,r),dequantizeInShader:!0}),{draco:g,hasPositions:c,hasColors:u,isTranslucent:p,hasNormals:f,hasBatchIds:d}}function yet(e){let t=e.json,n;if(l(t.POSITION))return n=e.getPropertyArray("POSITION",Y.FLOAT,3),{name:it.POSITION,semantic:it.POSITION,typedArray:n,isQuantized:!1,componentDatatype:Y.FLOAT,type:Ft.VEC3};if(l(t.POSITION_QUANTIZED)){n=e.getPropertyArray("POSITION_QUANTIZED",Y.UNSIGNED_SHORT,3);let i=e.getGlobalProperty("QUANTIZED_VOLUME_SCALE",Y.FLOAT,3);if(!l(i))throw new re("Global property: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");let o=65535,r=e.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",Y.FLOAT,3);if(!l(r))throw new re("Global property: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");return{name:it.POSITION,semantic:it.POSITION,typedArray:n,isQuantized:!0,componentDatatype:Y.FLOAT,type:Ft.VEC3,quantizedRange:o,quantizedVolumeOffset:h.unpack(r),quantizedVolumeScale:h.unpack(i),quantizedComponentDatatype:Y.UNSIGNED_SHORT,quantizedType:Ft.VEC3}}}function xet(e){let t=e.json,n;if(l(t.RGBA))return n=e.getPropertyArray("RGBA",Y.UNSIGNED_BYTE,4),{name:it.COLOR,semantic:it.COLOR,setIndex:0,typedArray:n,componentDatatype:Y.UNSIGNED_BYTE,type:Ft.VEC4,normalized:!0,isRGB565:!1,isTranslucent:!0};if(l(t.RGB))return n=e.getPropertyArray("RGB",Y.UNSIGNED_BYTE,3),{name:"COLOR",semantic:it.COLOR,setIndex:0,typedArray:n,componentDatatype:Y.UNSIGNED_BYTE,type:Ft.VEC3,normalized:!0,isRGB565:!1,isTranslucent:!1};if(l(t.RGB565))return n=e.getPropertyArray("RGB565",Y.UNSIGNED_SHORT,1),{name:"COLOR",semantic:it.COLOR,setIndex:0,typedArray:n,componentDatatype:Y.FLOAT,type:Ft.VEC3,normalized:!1,isRGB565:!0,isTranslucent:!1};if(l(t.CONSTANT_RGBA)){let i=e.getGlobalProperty("CONSTANT_RGBA",Y.UNSIGNED_BYTE,4),o=i[3],r=V.fromBytes(i[0],i[1],i[2],o),a=o<255;return{name:it.COLOR,semantic:it.COLOR,setIndex:0,constantColor:r,componentDatatype:Y.FLOAT,type:Ft.VEC4,isQuantized:!1,isTranslucent:a}}}function bet(e){let t=e.json,n;if(l(t.NORMAL))return n=e.getPropertyArray("NORMAL",Y.FLOAT,3),{name:it.NORMAL,semantic:it.NORMAL,typedArray:n,octEncoded:!1,octEncodedZXY:!1,componentDatatype:Y.FLOAT,type:Ft.VEC3};if(l(t.NORMAL_OCT16P))return n=e.getPropertyArray("NORMAL_OCT16P",Y.UNSIGNED_BYTE,2),{name:it.NORMAL,semantic:it.NORMAL,typedArray:n,octEncoded:!0,octEncodedZXY:!1,quantizedRange:(1<<8)-1,quantizedType:Ft.VEC2,quantizedComponentDatatype:Y.UNSIGNED_BYTE,componentDatatype:Y.FLOAT,type:Ft.VEC3}}function Cet(e){let t=e.json;if(l(t.BATCH_ID)){let n=e.getPropertyArray("BATCH_ID",Y.UNSIGNED_SHORT,1);return{name:it.FEATURE_ID,semantic:it.FEATURE_ID,setIndex:0,typedArray:n,componentDatatype:Y.fromTypedArray(n),type:Ft.SCALAR}}}var Nb=j0e;var Tet=_n.Components,Eet=_n.Scene,vet=_n.Node,wet=_n.Primitive,Iet=_n.Attribute,G0e=_n.Quantization,Det=_n.FeatureIdAttribute,Pet=_n.Material,Ret=_n.MetallicRoughness,FK=class extends qi{constructor(t){super(),t=t??G.EMPTY_OBJECT;let n=t.arrayBuffer,i=t.byteOffset??0;this._arrayBuffer=n,this._byteOffset=i,this._loadAttributesFor2D=t.loadAttributesFor2D??!1,this._parsedContent=void 0,this._decodePromise=void 0,this._decodedAttributes=void 0,this._promise=void 0,this._error=void 0,this._state=gt.UNLOADED,this._buffers=[],this._components=void 0,this._transform=M.IDENTITY}get cacheKey(){}get components(){return this._components}get transform(){return this._transform}load(){if(l(this._promise))return this._promise;this._parsedContent=Nb.parse(this._arrayBuffer,this._byteOffset),this._state=gt.PROCESSING,this._promise=Promise.resolve(this)}process(t){if(l(this._error)){let n=this._error;throw this._error=void 0,n}if(this._state===gt.READY)return!0;if(this._state===gt.PROCESSING){if(l(this._decodePromise))return!1;this._decodePromise=Oet(this,t.context)}return!1}unload(){let t=this._buffers;for(let n=0;n<t.length;n++)t[n].destroy();t.length=0,this._components=void 0,this._parsedContent=void 0,this._arrayBuffer=void 0}};function Oet(e,t){let i=e._parsedContent.draco,o;if(l(i)?o=cg.decodePointCloud(i,t):o=Promise.resolve(),!!l(o))return e._decodePromise=o,o.then(function(r){if(!e.isDestroyed())return l(r)&&Met(e,i,r),Het(e,t),e._state=gt.READY,e}).catch(function(r){e.unload(),e._state=gt.FAILED;let a="Failed to load Draco pnts";e._error=e.getError(a,r)})}function Met(e,t,n){e._state=gt.READY;let i=e._parsedContent,o;if(l(n.POSITION)){if(o={name:"POSITION",semantic:it.POSITION,typedArray:n.POSITION.array,componentDatatype:Y.FLOAT,type:Ft.VEC3,isQuantized:!1},l(n.POSITION.data.quantization)){let s=n.POSITION.data.quantization,c=s.range,u=h.fromElements(c,c,c),f=h.unpack(s.minValues),d=(1<<s.quantizationBits)-1;o.isQuantized=!0,o.quantizedRange=d,o.quantizedVolumeOffset=f,o.quantizedVolumeScale=u,o.quantizedComponentDatatype=d<=255?Y.UNSIGNED_BYTE:Y.UNSIGNED_SHORT,o.quantizedType=Ft.VEC3}i.positions=o}if(l(n.NORMAL)){if(o={name:"NORMAL",semantic:it.NORMAL,typedArray:n.NORMAL.array,componentDatatype:Y.FLOAT,type:Ft.VEC3,isQuantized:!1,octEncoded:!1,octEncodedZXY:!1},l(n.NORMAL.data.quantization)){let s=(1<<n.NORMAL.data.quantization.quantizationBits)-1;o.quantizedRange=s,o.octEncoded=!0,o.octEncodedZXY=!0,o.quantizedComponentDatatype=Y.UNSIGNED_BYTE,o.quantizedType=Ft.VEC2}i.normals=o}if(l(n.RGBA)?i.colors={name:"COLOR",semantic:it.COLOR,setIndex:0,typedArray:n.RGBA.array,componentDatatype:Y.UNSIGNED_BYTE,type:Ft.VEC4,normalized:!0,isTranslucent:!0}:l(n.RGB)&&(i.colors={name:"COLOR",semantic:it.COLOR,setIndex:0,typedArray:n.RGB.array,componentDatatype:Y.UNSIGNED_BYTE,type:Ft.VEC3,normalized:!0,isTranslucent:!1}),l(n.BATCH_ID)){let s=n.BATCH_ID.array;i.batchIds={name:"_FEATURE_ID",semantic:it.FEATURE_ID,setIndex:0,typedArray:s,componentDatatype:Y.fromTypedArray(s),type:Ft.SCALAR}}let r=i.batchTableJson,a=t.batchTableProperties;for(let s in a)if(a.hasOwnProperty(s)){let c=n[s];l(r)||(r={}),i.hasDracoBatchTable=!0;let u=c.data;r[s]={byteOffset:u.byteOffset,type:Bet(u.componentsPerAttribute),componentType:Let(u.componentDatatype),typedArray:c.array}}i.batchTableJson=r}function Bet(e){switch(e){case 1:return"SCALAR";case 2:return"VEC2";case 3:return"VEC3";case 4:return"VEC4"}}function Let(e){switch(e){case ee.BYTE:return"BYTE";case ee.UNSIGNED_BYTE:return"UNSIGNED_BYTE";case ee.SHORT:return"SHORT";case ee.UNSIGNED_SHORT:return"UNSIGNED_SHORT";case ee.INT:return"INT";case ee.UNSIGNED_INT:return"UNSIGNED_INT";case ee.DOUBLE:return"DOUBLE";case ee.FLOAT:return"FLOAT"}}function fN(e,t,n){let i=t.typedArray,o;if(t.octEncoded&&(o=new G0e,o.octEncoded=t.octEncoded,o.octEncodedZXY=t.octEncodedZXY,o.normalizationRange=t.quantizedRange,o.type=t.quantizedType,o.componentDatatype=t.quantizedComponentDatatype),t.isQuantized){o=new G0e;let s=t.quantizedRange;o.normalizationRange=s,o.quantizedVolumeOffset=h.ZERO;let c=t.quantizedVolumeScale;o.quantizedVolumeDimensions=c,o.quantizedVolumeStepSize=h.divideByScalar(c,s,new h),o.componentDatatype=t.quantizedComponentDatatype,o.type=t.quantizedType}let r=new Iet;if(r.name=t.name,r.semantic=t.semantic,r.setIndex=t.setIndex,r.componentDatatype=t.componentDatatype,r.type=t.type,r.normalized=t.normalized??!1,r.min=t.min,r.max=t.max,r.quantization=o,t.isRGB565&&(i=nn.decodeRGB565(i)),l(t.constantColor)){let s=new Array(4);r.constant=V.pack(t.constantColor,s)}else{let s=Ke.createVertexBuffer({typedArray:i,context:n,usage:Oe.STATIC_DRAW});s.vertexArrayDestroyable=!1,e._buffers.push(s),r.buffer=s}let a=e._loadAttributesFor2D;return r.semantic===it.POSITION&&a&&(r.typedArray=i),r}var H0e,Hj;function Net(e){if(!l(Hj)){H0e=new W0e.default(0),Hj=new Array(e);for(let t=0;t<e;++t)Hj[t]=H0e.random()}return Hj}var Fet=new h,ket=new h,zet=new h;function Uet(e){let t=e.typedArray,n=20,i=t.length/3,o=Math.min(i,n),r=Net(n),a=Number.MAX_VALUE,s=-Number.MAX_VALUE,c=h.fromElements(a,a,a,Fet),u=h.fromElements(s,s,s,ket),f,d,p;if(e.isQuantized)c=h.ZERO,u=e.quantizedVolumeScale;else for(f=0;f<o;++f)d=Math.floor(r[f]*i),p=h.unpack(t,d*3,zet),h.minimumByComponent(c,p,c),h.maximumByComponent(u,p,u);e.min=h.clone(c),e.max=h.clone(u)}var Vet={name:it.COLOR,semantic:it.COLOR,setIndex:0,constantColor:V.DARKGRAY,componentDatatype:Y.FLOAT,type:Ft.VEC4,isQuantized:!1,isTranslucent:!1};function jet(e,t,n){let i=[],o,r=t.positions;return l(r)&&(Uet(r),o=fN(e,r,n),o.count=t.pointsLength,i.push(o)),l(t.normals)&&(o=fN(e,t.normals,n),o.count=t.pointsLength,i.push(o)),l(t.colors)?(o=fN(e,t.colors,n),o.count=t.pointsLength,i.push(o)):(o=fN(e,Vet,n),o.count=t.pointsLength,i.push(o)),l(t.batchIds)&&(o=fN(e,t.batchIds,n),o.count=t.pointsLength,i.push(o)),i}function Get(e,t){let n=e.batchLength,i=e.pointsLength,o=e.batchTableJson,r=e.batchTableBinary,a=!l(e.batchIds);return l(r)||l(o)||e.hasDracoBatchTable?bg({count:n??i,batchTable:o,binaryBody:r,parseAsPropertyAttributes:a,customAttributeOutput:t}):new Ls({schema:{},propertyTables:[]})}function Het(e,t){let n=e._parsedContent,i=new Ret;i.metallicFactor=0,i.roughnessFactor=.9;let o=new Pet;o.metallicRoughness=i;let r=n.colors;l(r)&&r.isTranslucent&&(o.alphaMode=Cp.BLEND);let a=!l(n.normals);o.unlit=a;let s=new wet;if(s.attributes=jet(e,n,t),s.primitiveType=Re.POINTS,s.material=o,l(n.batchIds)){let g=new Det;g.propertyTableId=0,g.setIndex=0,g.positionalLabel="featureId_0",s.featureIds.push(g)}let c=new vet;c.index=0,c.primitives=[s];let u=new Eet;u.nodes=[c],u.upAxis=Li.Z,u.forwardAxis=Li.X;let f=new Tet;f.scene=u,f.nodes=[c];let d=[];f.structuralMetadata=Get(n,d),d.length>0&&Wet(e,s,d,t),l(n.rtcCenter)&&(f.transform=M.multiplyByTranslation(f.transform,n.rtcCenter,f.transform));let p=n.positions;l(p)&&p.isQuantized&&(f.transform=M.multiplyByTranslation(f.transform,p.quantizedVolumeOffset,f.transform)),e._components=f,e._parsedContent=void 0,e._arrayBuffer=void 0}function Wet(e,t,n,i){let o=t.attributes,r=n.length;for(let a=0;a<r;a++){let s=n[a],c=Ke.createVertexBuffer({typedArray:s.typedArray,context:i,usage:Oe.STATIC_DRAW});c.vertexArrayDestroyable=!1,e._buffers.push(c),s.buffer=c,s.typedArray=void 0,o.push(s)}t.propertyAttributeIds=[0]}var dN=FK;var q0e=new h,Y0e=new h,X0e=new h,qet=new h,Yet=new h,Xet=new h,Ket=new de,Qet=new ce;function kK(e,t,n,i){let o=t*n;return i.x=e[o],i.y=e[o+1],i.z=e[o+2],i}function sS(e,t,n,i,o,r,a){if(!e._ready||n.mode===ie.MORPHING)return;let s=Number.MAX_VALUE;r=r??te.default,i=i??1,o=o??0;let c=n.mode!==ie.SCENE3D?n.mapProjection:void 0;if(hs.forEachPrimitive(e,{mapProjection:c},function(u,f,d,p){if(l(u.boundingSphere)&&d.length===1){let b=ce.transform(u.boundingSphere,p,Qet),C=si.raySphere(t,b);if(!l(C))return}if(!l(f.indices))return;let g,m,A=ht.getAttributeBySemantic(f,it.POSITION);l(A)&&(m=Ft.getNumberOfComponents(A.type),g=hs.readAttributeAsTypedArray(A));let y;if(l(f.indices)&&(y=hs.readIndicesAsTypedArray(f.indices)),!l(y)||!l(g))return;let x=y.length;for(let b=0;b<x;b+=3){let C=y[b],E=y[b+1],S=y[b+2];kK(g,C,m,q0e),kK(g,E,m,Y0e),kK(g,S,m,X0e);for(let w of d){let P=M.multiplyByPoint(w.transform,q0e,qet),R=M.multiplyByPoint(w.transform,Y0e,Yet),B=M.multiplyByPoint(w.transform,X0e,Xet);i!==1&&(so.getPosition(P,r,i,o,P),so.getPosition(R,r,i,o,R),so.getPosition(B,r,i,o,B));let L=si.rayTriangleParametric(t,P,R,B,e.backFaceCulling??!0);l(L)&&L<s&&L>=0&&(s=L)}}}),s!==Number.MAX_VALUE){if(a=gn.getPoint(t,s,a),n.mode!==ie.SCENE3D){h.fromElements(a.y,a.z,a.x,a);let u=n.mapProjection,f=u.ellipsoid,d=u.unproject(a,Ket);f.cartographicToCartesian(d,a)}return a}}var zK=class{constructor(t){this.show=t.show,this.alpha=t.alpha,this.brightness=t.brightness,this.contrast=t.contrast,this.hue=t.hue,this.saturation=t.saturation,this.gamma=t.gamma,this.colorToAlpha=t.colorToAlpha}},hN=zK;var UK=class{constructor(t){this._model=t,this._modelPrimitiveImageries=void 0,this._imageryConfigurations=[]}update(t){if(!this._hasImagery){this._deleteModelPrimitiveImageries();return}this._allImageryLayersReady&&(l(this._modelPrimitiveImageries)||(this._modelPrimitiveImageries=this._createModelPrimitiveImageries()),this._updateModelPrimitiveImageries(t),this._checkForModifiedImageryConfigurations())}_createModelPrimitiveImageries(){let t=this._model,n=this._collectRuntimeNodesAndPrimitives(),i=[],o=n.length;for(let r=0;r<o;r++){let a=n[r],s=a.runtimeNode,c=a.runtimePrimitive,u=new Rb(t,s,c);c.primitive.modelPrimitiveImagery=u,i.push(u)}return i}_collectRuntimeNodesAndPrimitives(){let i=this._model.sceneGraph._runtimeNodes,o=[];for(let r=0;r<i.length;r++){let a=i[r];if(l(a))for(let s=0;s<a.runtimePrimitives.length;s++){let c=a.runtimePrimitives[s];o.push({runtimeNode:a,runtimePrimitive:c})}}return o}_updateModelPrimitiveImageries(t){if(!l(this._modelPrimitiveImageries))throw new _e("The modelPrimitiveImageries have not been created");let n=this._modelPrimitiveImageries,i=n.length;for(let o=0;o<i;o++)n[o].update(t)}_deleteModelPrimitiveImageries(){let t=this._modelPrimitiveImageries;if(!l(t))return;let n=t.length;for(let i=0;i<n;i++)t[i].destroy();delete this._modelPrimitiveImageries,this._model.resetDrawCommands()}get ready(){return this._hasImagery?!(!this._allImageryLayersReady||!this._allModelPrimitiveImageriesReady):!0}get _hasImagery(){let n=this._model.imageryLayers;return l(n)&&n.length>0}get _allImageryLayersReady(){if(!this._hasImagery)return!0;let t=this._model.imageryLayers,n=t.length;for(let i=0;i<n;i++)if(!t.get(i).ready)return!1;return!0}get _allModelPrimitiveImageriesReady(){let t=this._modelPrimitiveImageries;if(!l(t))return!1;let n=t.length;for(let i=0;i<n;i++)if(!t[i].ready)return!1;return!0}_checkForModifiedImageryConfigurations(){this._imageryConfigurationsModified()&&(this._updateImageryConfigurations(),this._model.resetDrawCommands())}_imageryConfigurationsModified(){let n=this._model.imageryLayers,i=this._imageryConfigurations;if(n.length!==i.length)return!0;for(let o=0;o<n.length;o++){let r=n.get(o),a=i[o];if(r.show!==a.show||r.alpha!==a.alpha||r.brightness!==a.brightness||r.contrast!==a.contrast||r.hue!==a.hue||r.saturation!==a.saturation||r.gamma!==a.gamma||r.colorToAlpha!==a.colorToAlpha)return!0}return!1}_updateImageryConfigurations(){let n=this._model.imageryLayers,i=this._imageryConfigurations;i.length=n.length;for(let o=0;o<n.length;o++){let r=n.get(o);i[o]=new hN(r)}}isDestroyed(){return!1}destroy(){if(!this.isDestroyed())return this._deleteModelPrimitiveImageries(),fe(this)}},mN=UK;function vo(e){e=e??G.EMPTY_OBJECT,this._loader=e.loader,this._resource=e.resource,this.type=e.type??Br.GLTF,this.modelMatrix=M.clone(e.modelMatrix??M.IDENTITY),this._modelMatrix=M.clone(this.modelMatrix),this._scale=e.scale??1,this._minimumPixelSize=e.minimumPixelSize??0,this._maximumScale=e.maximumScale,this._clampedScale=l(this._maximumScale)?Math.min(this._scale,this._maximumScale):this._scale,this._computedScale=this._clampedScale,this._updateModelMatrix=!1,this.referenceMatrix=void 0,this._iblReferenceFrameMatrix=$.clone($.IDENTITY),this._resourcesLoaded=!1,this._drawCommandsBuilt=!1,this._ready=!1,this._customShader=e.customShader,this._content=e.content,this._texturesLoaded=!1,this._defaultTexture=void 0,this._activeAnimations=new lB(this),this._clampAnimations=e.clampAnimations??!0,this._userAnimationDirty=!1,this._id=e.id,this._idDirty=!1,this._color=V.clone(e.color),this._colorBlendMode=e.colorBlendMode??sl.HIGHLIGHT,this._colorBlendAmount=e.colorBlendAmount??.5;let t=e.silhouetteColor??V.RED;this._silhouetteColor=V.clone(t),this._silhouetteSize=e.silhouetteSize??0,this._silhouetteDirty=!1,this._silhouetteId=void 0,this._cull=e.cull??!0,this._opaquePass=e.opaquePass??Ie.OPAQUE,this._allowPicking=e.allowPicking??!0,this._show=e.show??!0,this._style=void 0,this._styleDirty=!1,this._styleCommandsNeeded=void 0;let n=e.featureIdLabel??"featureId_0";typeof n=="number"&&(n=`featureId_${n}`),this._featureIdLabel=n;let i=e.instanceFeatureIdLabel??"instanceFeatureId_0";typeof i=="number"&&(i=`instanceFeatureId_${i}`),this._instanceFeatureIdLabel=i,this._featureTables=[],this._featureTableId=void 0,this._featureTableIdDirty=!0,this._pipelineResources=[],this._modelResources=[],this._pickIds=[],this._boundingSphere=new ce,this._initialRadius=void 0,this._heightReference=e.heightReference??nt.NONE,this._heightDirty=this._heightReference!==nt.NONE,this._removeUpdateHeightCallback=void 0,this._enableVerticalExaggeration=e.enableVerticalExaggeration??!0,this._hasVerticalExaggeration=!1,this._clampedModelMatrix=void 0;let o=e.scene;l(o)&&l(o.terrainProviderChanged)&&(this._terrainProviderChangedCallback=o.terrainProviderChanged.addEventListener(()=>{this._heightDirty=!0})),this._scene=o,this._distanceDisplayCondition=e.distanceDisplayCondition;let r=new Ep(e.pointCloudShading);this._pointCloudShading=r,this._attenuation=r.attenuation,this._pointCloudBackFaceCulling=r.backFaceCulling;let a=e.clippingPlanes;l(a)&&a.owner===void 0?ma.setOwner(a,this,"_clippingPlanes"):this._clippingPlanes=a,this._clippingPlanesState=0,this._clippingPlanesMatrix=M.clone(M.IDENTITY);let s=e.clippingPolygons;l(s)&&s.owner===void 0?Qh.setOwner(s,this,"_clippingPolygons"):this._clippingPolygons=s,this._clippingPolygonsState=0,this._modelImagery=new mN(this),this._lightColor=h.clone(e.lightColor),this._imageBasedLighting=l(e.imageBasedLighting)?e.imageBasedLighting:new nb,this._shouldDestroyImageBasedLighting=!l(e.imageBasedLighting),this._environmentMapManager=void 0;let c=new pg(e.environmentMapOptions);pg.setOwner(c,this,"_environmentMapManager"),this._backFaceCulling=e.backFaceCulling??!0,this._backFaceCullingDirty=!1,this._shadows=e.shadows??vn.ENABLED,this._shadowsDirty=!1,this._debugShowBoundingVolumeDirty=!1,this._debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this._enableDebugWireframe=e.enableDebugWireframe??!1,this._enableShowOutline=e.enableShowOutline??!0,this._debugWireframe=e.debugWireframe??!1,this._edgeDisplayMode=e.edgeDisplayMode??Md.SURFACES_ONLY,this._debugWireframe===!0&&this._enableDebugWireframe===!1&&this.type===Br.GLTF&&_t("model-debug-wireframe-ignored","enableDebugWireframe must be set to true in Model.fromGltf, otherwise debugWireframe will be ignored.");let u=e.credit;typeof u=="string"&&(u=new yt(u)),this._credits=[],this._credit=u,this._resourceCredits=[],this._gltfCredits=[],this._showCreditsOnScreen=e.showCreditsOnScreen??!1,this._showCreditsOnScreenDirty=!0,this._splitDirection=e.splitDirection??Or.NONE,this._enableShowOutline=e.enableShowOutline??!0,this.showOutline=e.showOutline??!0,this.outlineColor=e.outlineColor??V.BLACK,this._classificationType=e.classificationType,this._statistics=new uN,this._sceneMode=void 0,this._projectTo2D=e.projectTo2D??!1,this._enablePick=e.enablePick??!1,this._fogRenderable=void 0,this._skipLevelOfDetail=!1,this._ignoreCommands=e.ignoreCommands??!1,this._errorEvent=new ye,this._readyEvent=new ye,this._texturesReadyEvent=new ye,this._sceneGraph=void 0,this._nodesByName={},this.pickObject=e.pickObject}function VK(e,t){if(e._errorEvent.numberOfListeners>0){e._errorEvent.raiseEvent(t);return}console.log(t)}function $et(e,t){let n=e._featureTables,i=t.propertyTables,o=i.length;for(let r=0;r<o;r++){let a=i[r],s=new fB({model:e,propertyTable:a});n.push(s)}return n}function Jet(e,t){let n=t._featureIdLabel,i=t._instanceFeatureIdLabel,o,r,a,s;for(o=0;o<e.nodes.length;o++)if(s=e.nodes[o],l(s.instances)&&(a=ht.getFeatureIdsByLabel(s.instances.featureIds,i),l(a)&&l(a.propertyTableId)))return a.propertyTableId;for(o=0;o<e.nodes.length;o++)for(s=e.nodes[o],r=0;r<s.primitives.length;r++){let c=s.primitives[r],u=ht.getFeatureIdsByLabel(c.featureIds,n);if(l(u))return u.propertyTableId}if(t._featureTables.length===1)return 0}function HK(e,t){if(!l(e)&&!l(t))return!1;if(l(e)!==l(t))return!0;let n=e.alpha,i=t.alpha;return Math.floor(n)!==Math.floor(i)||Math.ceil(n)!==Math.ceil(i)}Object.defineProperties(vo.prototype,{ready:{get:function(){return this._ready}},errorEvent:{get:function(){return this._errorEvent}},readyEvent:{get:function(){return this._readyEvent}},incrementallyLoadTextures:{get:function(){return this._loader.incrementallyLoadTextures??!1}},texturesReadyEvent:{get:function(){return this._texturesReadyEvent}},loader:{get:function(){return this._loader}},statistics:{get:function(){return this._statistics}},activeAnimations:{get:function(){return this._activeAnimations}},clampAnimations:{get:function(){return this._clampAnimations},set:function(e){this._clampAnimations=e}},cull:{get:function(){return this._cull}},opaquePass:{get:function(){return this._opaquePass}},pointCloudShading:{get:function(){return this._pointCloudShading},set:function(e){e!==this._pointCloudShading&&this.resetDrawCommands(),this._pointCloudShading=e}},customShader:{get:function(){return this._customShader},set:function(e){e!==this._customShader&&this.resetDrawCommands(),this._customShader=e}},sceneGraph:{get:function(){return this._sceneGraph}},content:{get:function(){return this._content}},heightReference:{get:function(){return this._heightReference},set:function(e){e!==this._heightReference&&(this._heightDirty=!0),this._heightReference=e}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){this._distanceDisplayCondition=kt.clone(e,this._distanceDisplayCondition)}},structuralMetadata:{get:function(){return this._sceneGraph.components.structuralMetadata}},featureTableId:{get:function(){return this._featureTableId},set:function(e){this._featureTableId=e}},featureTables:{get:function(){return this._featureTables},set:function(e){this._featureTables=e}},id:{get:function(){return this._id},set:function(e){e!==this._id&&(this._idDirty=!0),this._id=e}},allowPicking:{get:function(){return this._allowPicking}},style:{get:function(){return this._style},set:function(e){this._style=e,this._styleDirty=!0}},color:{get:function(){return this._color},set:function(e){HK(e,this._color)&&this.resetDrawCommands(),this._color=V.clone(e,this._color)}},colorBlendMode:{get:function(){return this._colorBlendMode},set:function(e){this._colorBlendMode=e}},colorBlendAmount:{get:function(){return this._colorBlendAmount},set:function(e){this._colorBlendAmount=e}},silhouetteColor:{get:function(){return this._silhouetteColor},set:function(e){if(!V.equals(e,this._silhouetteColor)){let t=HK(e,this._silhouetteColor);this._silhouetteDirty=this._silhouetteDirty||t}this._silhouetteColor=V.clone(e,this._silhouetteColor)}},silhouetteSize:{get:function(){return this._silhouetteSize},set:function(e){if(e!==this._silhouetteSize){let t=this._silhouetteSize,n=e>0&&t===0||e===0&&t>0;this._silhouetteDirty=this._silhouetteDirty||n,this._backFaceCullingDirty=this._backFaceCullingDirty||n}this._silhouetteSize=e}},boundingSphere:{get:function(){let e=l(this._clampedModelMatrix)?this._clampedModelMatrix:this.modelMatrix;return $0e(this,e),this._boundingSphere}},debugShowBoundingVolume:{get:function(){return this._debugShowBoundingVolume},set:function(e){this._debugShowBoundingVolume!==e&&(this._debugShowBoundingVolumeDirty=!0),this._debugShowBoundingVolume=e}},debugWireframe:{get:function(){return this._debugWireframe},set:function(e){this._debugWireframe!==e&&this.resetDrawCommands(),this._debugWireframe=e,this._debugWireframe===!0&&this._enableDebugWireframe===!1&&this.type===Br.GLTF&&_t("model-debug-wireframe-ignored","enableDebugWireframe must be set to true in Model.fromGltfAsync, otherwise debugWireframe will be ignored.")}},edgeDisplayMode:{get:function(){return this._edgeDisplayMode},set:function(e){this._edgeDisplayMode=e}},show:{get:function(){return this._show},set:function(e){this._show=e}},featureIdLabel:{get:function(){return this._featureIdLabel},set:function(e){typeof e=="number"&&(e=`featureId_${e}`),e!==this._featureIdLabel&&(this._featureTableIdDirty=!0),this._featureIdLabel=e}},instanceFeatureIdLabel:{get:function(){return this._instanceFeatureIdLabel},set:function(e){typeof e=="number"&&(e=`instanceFeatureId_${e}`),e!==this._instanceFeatureIdLabel&&(this._featureTableIdDirty=!0),this._instanceFeatureIdLabel=e}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){e!==this._clippingPlanes&&(ma.setOwner(e,this,"_clippingPlanes"),this.resetDrawCommands())}},clippingPolygons:{get:function(){return this._clippingPolygons},set:function(e){e!==this._clippingPolygons&&(Qh.setOwner(e,this,"_clippingPolygons"),this.resetDrawCommands())}},enableVerticalExaggeration:{get:function(){return this._enableVerticalExaggeration},set:function(e){e!==this._enableVerticalExaggeration&&this.resetDrawCommands(),this._enableVerticalExaggeration=e}},hasVerticalExaggeration:{get:function(){return this._hasVerticalExaggeration}},imageryLayers:{get:function(){if(l(this._content)){let e=this._content.tileset;if(l(e))return e.imageryLayers}}},lightColor:{get:function(){return this._lightColor},set:function(e){l(e)!==l(this._lightColor)&&this.resetDrawCommands(),this._lightColor=h.clone(e,this._lightColor)}},imageBasedLighting:{get:function(){return this._imageBasedLighting},set:function(e){e!==this._imageBasedLighting&&(this._shouldDestroyImageBasedLighting&&!this._imageBasedLighting.isDestroyed()&&this._imageBasedLighting.destroy(),this._imageBasedLighting=e,this._shouldDestroyImageBasedLighting=!1,this.resetDrawCommands())}},environmentMapManager:{get:function(){return this._environmentMapManager},set:function(e){e!==this.environmentMapManager&&(pg.setOwner(e,this,"_environmentMapManager"),this.resetDrawCommands())}},backFaceCulling:{get:function(){return this._backFaceCulling},set:function(e){e!==this._backFaceCulling&&(this._backFaceCullingDirty=!0),this._backFaceCulling=e}},scale:{get:function(){return this._scale},set:function(e){e!==this._scale&&(this._updateModelMatrix=!0),this._scale=e}},computedScale:{get:function(){return this._computedScale}},minimumPixelSize:{get:function(){return this._minimumPixelSize},set:function(e){e!==this._minimumPixelSize&&(this._updateModelMatrix=!0),this._minimumPixelSize=e}},maximumScale:{get:function(){return this._maximumScale},set:function(e){e!==this._maximumScale&&(this._updateModelMatrix=!0),this._maximumScale=e}},shadows:{get:function(){return this._shadows},set:function(e){e!==this._shadows&&(this._shadowsDirty=!0),this._shadows=e}},credit:{get:function(){return this._credit}},showCreditsOnScreen:{get:function(){return this._showCreditsOnScreen},set:function(e){this._showCreditsOnScreen!==e&&(this._showCreditsOnScreenDirty=!0),this._showCreditsOnScreen=e}},splitDirection:{get:function(){return this._splitDirection},set:function(e){this._splitDirection!==e&&this.resetDrawCommands(),this._splitDirection=e}},classificationType:{get:function(){return this._classificationType}},pickIds:{get:function(){return this._pickIds}},styleCommandsNeeded:{get:function(){return this._styleCommandsNeeded}}});vo.prototype.getNode=function(e){return this._nodesByName[e]};vo.prototype.setArticulationStage=function(e,t){this._sceneGraph.setArticulationStage(e,t)};vo.prototype.applyArticulations=function(){this._sceneGraph.applyArticulations()};vo.prototype.getExtension=function(e){return this._loader.components.extensions[e]};vo.prototype.makeStyleDirty=function(){this._styleDirty=!0};vo.prototype.resetDrawCommands=function(){this._drawCommandsBuilt=!1};var Zet=new M,ett=new $,ttt=new M;vo.prototype.update=function(e){let t=!1;try{t=ntt(this,e)}catch(i){if(!this._loader.incrementallyLoadTextures&&i.name==="TextureError")VK(this,i);else{let o=ht.getError("model",this._resource,i);VK(this,o)}}if(itt(this,e),ott(this,e),rtt(this,e),!this._resourcesLoaded&&t){this._resourcesLoaded=!0;let i=this._loader.components;if(!l(i)){if(this._loader.isUnloaded())return;let a=ht.getError("model",this._resource,new re("Failed to load model."));VK(a),this._rejectLoad=this._rejectLoad&&this._rejectLoad(a)}let o=i.structuralMetadata;l(o)&&o.propertyTableCount>0&&$et(this,o);let r=new lN({model:this,modelComponents:i});this._sceneGraph=r,this._gltfCredits=r.components.asset.credits}if(!this._resourcesLoaded||e.mode===ie.MORPHING)return;let n=this._modelImagery;if(n.update(e),!(!n.ready&&!(this._content?.tileset?._asynchronouslyLoadImagery??!1))){if(att(this),stt(this),ctt(this,e),ltt(this),utt(this,e),ftt(this,e),dtt(this,e),htt(this,e),mtt(this,e),ptt(this,e),gtt(this,e),this._defaultTexture=e.context.defaultTexture,_tt(this,e),Att(this,e),ytt(this),xtt(this,e),Ett(this,e),!this._ready){e.afterRender.push(()=>{this._ready=!0,this._readyEvent.raiseEvent(this)});return}this._loader.incrementallyLoadTextures&&!this._texturesLoaded&&this._loader.texturesLoaded&&(this.resetDrawCommands(),this._texturesLoaded=!0,this._texturesReadyEvent.raiseEvent(this)),Ctt(this),vtt(this,e),Stt(this),wtt(this,e)}};function ntt(e,t){return!e._resourcesLoaded||e._loader.incrementallyLoadTextures&&!e._texturesLoaded?(t.afterRender.push(()=>!0),e._loader.process(t)):!0}function itt(e,t){l(e._customShader)&&e._customShader.update(t)}function ott(e,t){let n=e._environmentMapManager,i=t.passes.pick||t.passes.pickVoxel;e._ready&&n.owner===e&&!i&&(n.position=e._boundingSphere.center,n.shouldUpdate=!l(e._imageBasedLighting.sphericalHarmonicCoefficients)||!l(e._imageBasedLighting.specularEnvironmentMaps),n.update(t),n.shouldRegenerateShaders&&e.resetDrawCommands())}function rtt(e,t){e._imageBasedLighting.update(t),e._imageBasedLighting.shouldRegenerateShaders&&e.resetDrawCommands()}function att(e){if(!e._featureTableIdDirty)return;e._featureTableIdDirty=!1;let t=e._sceneGraph.components,n=t.structuralMetadata;l(n)&&n.propertyTableCount>0&&(e.featureTableId=Jet(t,e),e._styleDirty=!0,e.resetDrawCommands())}function stt(e){e._styleDirty&&(e.applyStyle(e._style),e._styleDirty=!1)}function ctt(e,t){let n=e._featureTables,i=n.length,o=!1;for(let r=0;r<i;r++)n[r].update(t),n[r].styleCommandsNeededDirty&&(o=!0);o&&Q0e(e)}function Q0e(e){let t=e.featureTables[e.featureTableId];e._styleCommandsNeeded=tm.getStyleCommandsNeeded(t.featuresLength,t.batchTexture.translucentFeaturesLength)}function ltt(e){let t=e.pointCloudShading;t.attenuation!==e._attenuation&&(e.resetDrawCommands(),e._attenuation=t.attenuation),t.backFaceCulling!==e._pointCloudBackFaceCulling&&(e.resetDrawCommands(),e._pointCloudBackFaceCulling=t.backFaceCulling)}function utt(e,t){e._silhouetteDirty&&(J0e(t)&&e.resetDrawCommands(),e._silhouetteDirty=!1)}function ftt(e,t){let n=e.hasSkipLevelOfDetail(t);n!==e._skipLevelOfDetail&&(e.resetDrawCommands(),e._skipLevelOfDetail=n)}function dtt(e,t){let n=0;e.isClippingEnabled()&&(e._clippingPlanes.owner===e&&e._clippingPlanes.update(t),n=e._clippingPlanes.clippingPlanesState),n!==e._clippingPlanesState&&(e.resetDrawCommands(),e._clippingPlanesState=n)}function htt(e,t){let n=0;e.isClippingPolygonsEnabled()&&(e._clippingPolygons.owner===e&&(e._clippingPolygons.update(t),e._clippingPolygons.queueCommands(t)),n=e._clippingPolygons.clippingPolygonsState),n!==e._clippingPolygonsState&&(e.resetDrawCommands(),e._clippingPolygonsState=n)}function mtt(e,t){t.mode!==e._sceneMode&&(e._projectTo2D?e.resetDrawCommands():e._updateModelMatrix=!0,e._sceneMode=t.mode)}function ptt(e,t){let n=t.fog.enabled&&t.fog.renderable;n!==e._fogRenderable&&(e.resetDrawCommands(),e._fogRenderable=n)}function gtt(e,t){if(e.enableVerticalExaggeration){let n=t.verticalExaggeration!==1;e.hasVerticalExaggeration!==n&&(e.resetDrawCommands(),e._hasVerticalExaggeration=n)}else e.hasVerticalExaggeration&&(e.resetDrawCommands(),e._hasVerticalExaggeration=!1)}function _tt(e,t){e._drawCommandsBuilt||(e.destroyPipelineResources(),e._sceneGraph.buildDrawCommands(t),e._drawCommandsBuilt=!0)}function Att(e,t){M.equals(e.modelMatrix,e._modelMatrix)||(e._updateModelMatrix=!0,e._modelMatrix=M.clone(e.modelMatrix,e._modelMatrix))}var qA=new h,jK=new de;function ytt(e){if(!e._updateModelMatrix&&!e._heightDirty&&e._minimumPixelSize===0)return;l(e._removeUpdateHeightCallback)&&(e._removeUpdateHeightCallback(),e._removeUpdateHeightCallback=void 0);let t=e._scene;if(!l(t)||e.heightReference===nt.NONE){e._clampedModelMatrix=void 0;return}let n=t.ellipsoid??te.default,i=e.modelMatrix;qA.x=i[12],qA.y=i[13],qA.z=i[14];let o=n.cartesianToCartographic(qA);l(e._clampedModelMatrix)||(e._clampedModelMatrix=M.clone(i,new M)),e._removeUpdateHeightCallback=t.updateHeight(o,K0e(e,n,o),e.heightReference);let r=t.getHeight(o,e.heightReference);if(l(r)){let a=K0e(e,n,o);de.clone(o,jK),jK.height=r,a(jK)}e._heightDirty=!1,e._updateModelMatrix=!0}function xtt(e,t){if(!e._updateModelMatrix&&e._minimumPixelSize===0)return;let n=l(e._clampedModelMatrix)?e._clampedModelMatrix:e.modelMatrix;$0e(e,n),btt(e,n,t)}function $0e(e,t){e._clampedScale=l(e._maximumScale)?Math.min(e._scale,e._maximumScale):e._scale,e._boundingSphere.center=h.multiplyByScalar(e._sceneGraph.boundingSphere.center,e._clampedScale,e._boundingSphere.center),e._boundingSphere.radius=e._initialRadius*e._clampedScale,e._boundingSphere=ce.transform(e._boundingSphere,t,e._boundingSphere)}function btt(e,t,n){let i=e.scale;if(e.minimumPixelSize!==0&&!e._projectTo2D){let o=n.context,r=Math.max(o.drawingBufferWidth,o.drawingBufferHeight);M.getTranslation(t,qA),e._sceneMode!==ie.SCENE3D&&eo.computeActualEllipsoidPosition(n,qA,qA);let a=e._boundingSphere.radius,s=Itt(qA,a,n),c=1/s;Math.min(c*(2*a),r)<e.minimumPixelSize&&(i=e.minimumPixelSize*s/(2*e._initialRadius))}e._computedScale=l(e.maximumScale)?Math.min(e.maximumScale,i):i}function Ctt(e){if(!e._idDirty)return;e._idDirty=!1;let t=e._id,n=e._pickIds,i=n.length;for(let o=0;o<i;++o)n[o].object.id=t}var Ttt=new $(1,0,0,0,0,1,0,-1,0);function Ett(e,t){let n=l(e._clampedModelMatrix)?e._clampedModelMatrix:e.modelMatrix,i=e.referenceMatrix??n,o=t.context,r=ett,a=Zet;if(a=M.multiply(o.uniformState.view3D,i,a),r=M.getRotation(a,r),r=$.transpose(r,r),e._iblReferenceFrameMatrix=$.multiply(Ttt,r,e._iblReferenceFrameMatrix),e.isClippingEnabled()){let s=ttt;s=M.multiply(o.uniformState.view3D,i,s),s=M.multiply(s,e._clippingPlanes.modelMatrix,s),e._clippingPlanesMatrix=M.inverseTranspose(s,e._clippingPlanesMatrix)}}function vtt(e,t){let n=e._sceneGraph;if(e._updateModelMatrix||e._minimumPixelSize!==0){let o=l(e._clampedModelMatrix)?e._clampedModelMatrix:e.modelMatrix;n.updateModelMatrix(o,t),e._updateModelMatrix=!1}e._backFaceCullingDirty&&(n.updateBackFaceCulling(e._backFaceCulling),e._backFaceCullingDirty=!1),e._shadowsDirty&&(n.updateShadows(e._shadows),e._shadowsDirty=!1),e._debugShowBoundingVolumeDirty&&(n.updateShowBoundingVolume(e._debugShowBoundingVolume),e._debugShowBoundingVolumeDirty=!1);let i=!1;l(e.classificationType)||(i=e._userAnimationDirty||e._activeAnimations.update(t)),n.update(t,i),e._userAnimationDirty=!1}function Stt(e){if(!e._showCreditsOnScreenDirty)return;e._showCreditsOnScreenDirty=!1,e._credits.length=0;let t=e._showCreditsOnScreen;if(l(e._credit)){let a=yt.clone(e._credit);a.showOnScreen=a.showOnScreen||t,e._credits.push(a)}let n=e._resourceCredits,i=n.length;for(let a=0;a<i;a++){let s=yt.clone(n[a]);s.showOnScreen=s.showOnScreen||t,e._credits.push(s)}let o=e._gltfCredits,r=o.length;for(let a=0;a<r;a++){let s=yt.clone(o[a]);s.showOnScreen=s.showOnScreen||t,e._credits.push(s)}}function wtt(e,t){let n=Ptt(e,t),i=e.isInvisible(),o=e.hasSilhouette(t),r=e._show&&e._computedScale!==0&&n&&(!i||o),a=t.passes,s=a.render||a.pick&&e.allowPicking;r&&!e._ignoreCommands&&s&&(Rtt(e,t),e._sceneGraph.pushDrawCommands(t))}var GK=new ce;function Itt(e,t,n){return GK.center=e,GK.radius=t,n.camera.getPixelSize(GK,n.context.drawingBufferWidth,n.context.drawingBufferHeight)}var Wj=new h;function K0e(e,t,n){return function(i){OE(e.heightReference)&&(i.height+=n.height),t.cartographicToCartesian(i,Wj);let o=e._clampedModelMatrix;M.clone(e.modelMatrix,o),o[12]=Wj.x,o[13]=Wj.y,o[14]=Wj.z,e._heightDirty=!0}}var Dtt=new h;function Ptt(e,t){let n=e.distanceDisplayCondition;if(!l(n))return!0;let i=n.near*n.near,o=n.far*n.far,r;if(t.mode===ie.SCENE2D){let s=(t.camera.frustum.right-t.camera.frustum.left)*.5;r=s*s}else{let a=M.getTranslation(e.modelMatrix,Dtt);eo.computeActualEllipsoidPosition(t,a,a),r=h.distanceSquared(a,t.camera.positionWC)}return r>=i&&r<=o}function Rtt(e,t){let n=t.creditDisplay,i=e._credits,o=i.length;for(let r=0;r<o;r++)n.addCreditToNextFrame(i[r])}vo.prototype.isTranslucent=function(){let e=this.color;return l(e)&&e.alpha>0&&e.alpha<1};vo.prototype.isInvisible=function(){let e=this.color;return l(e)&&e.alpha===0};function J0e(e){return e.context.stencilBuffer}vo.prototype.hasSilhouette=function(e){return J0e(e)&&this._silhouetteSize>0&&this._silhouetteColor.alpha>0&&!l(this._classificationType)};vo.prototype.hasSkipLevelOfDetail=function(e){if(!Br.is3DTiles(this.type))return!1;let t=e.context.stencilBuffer,n=this._content.tileset;return t&&n.isSkippingLevelOfDetail};vo.prototype.isClippingEnabled=function(){let e=this._clippingPlanes;return l(e)&&e.enabled&&e.length!==0};vo.prototype.pick=function(e,t,n,i,o){return sS(this,e,t,n,i,o)};vo.prototype.isClippingPolygonsEnabled=function(){let e=this._clippingPolygons;return l(e)&&e.enabled&&e.length!==0};vo.prototype.isDestroyed=function(){return!1};vo.prototype.destroy=function(){let e=this._loader;l(e)&&e.destroy();let t=this._featureTables;if(l(t)){let r=t.length;for(let a=0;a<r;a++)t[a].destroy()}this.destroyPipelineResources(),this.destroyModelResources(),l(this._removeUpdateHeightCallback)&&(this._removeUpdateHeightCallback(),this._removeUpdateHeightCallback=void 0),l(this._terrainProviderChangedCallback)&&(this._terrainProviderChangedCallback(),this._terrainProviderChangedCallback=void 0);let n=this._clippingPlanes;l(n)&&!n.isDestroyed()&&n.owner===this&&n.destroy(),this._clippingPlanes=void 0;let i=this._clippingPolygons;l(i)&&!i.isDestroyed()&&i.owner===this&&i.destroy(),this._clippingPolygons=void 0,this._shouldDestroyImageBasedLighting&&!this._imageBasedLighting.isDestroyed()&&this._imageBasedLighting.destroy(),this._imageBasedLighting=void 0;let o=this._environmentMapManager;!o.isDestroyed()&&o.owner===this&&o.destroy(),this._environmentMapManager=void 0,fe(this)};vo.prototype.destroyPipelineResources=function(){let e=this._pipelineResources;for(let t=0;t<e.length;t++)e[t].destroy();this._pipelineResources.length=0,this._pickIds.length=0};vo.prototype.destroyModelResources=function(){let e=this._modelResources;for(let t=0;t<e.length;t++)e[t].destroy();this._modelResources.length=0};vo.fromGltfAsync=async function(e){e=e??G.EMPTY_OBJECT;let t=e.url??e.gltf,n={releaseGltfJson:e.releaseGltfJson,asynchronous:e.asynchronous,incrementallyLoadTextures:e.incrementallyLoadTextures,upAxis:e.upAxis,forwardAxis:e.forwardAxis,loadAttributesFor2D:e.projectTo2D,enablePick:e.enablePick,loadIndicesForWireframe:e.enableDebugWireframe,loadPrimitiveOutline:e.enableShowOutline,loadForClassification:l(e.classificationType)},i=e.basePath??"",o=De.createIfNeeded(i);l(t.asset)?(n.gltfJson=t,n.baseResource=o,n.gltfResource=o):t instanceof Uint8Array?(n.typedArray=t,n.baseResource=o,n.gltfResource=o):n.gltfResource=De.createIfNeeded(t);let r=new bf(n),s=l(e.content)?Br.TILE_GLTF:Br.GLTF,c=n.gltfResource,u=pN(r,s,e);u.resource=c,u.environmentMapOptions=e.environmentMapOptions;try{await r.load()}catch(g){throw r.destroy(),ht.getError("model",c,g)}let f=e.gltfCallback;l(f)&&f(r.gltfJson);let d=new vo(u),p=d._resource.credits;if(l(p)){let g=p.length;for(let m=0;m<g;m++)d._resourceCredits.push(yt.clone(p[m]))}return d};vo.fromB3dm=async function(e){let t={b3dmResource:e.resource,arrayBuffer:e.arrayBuffer,byteOffset:e.byteOffset,releaseGltfJson:e.releaseGltfJson,asynchronous:e.asynchronous,incrementallyLoadTextures:e.incrementallyLoadTextures,upAxis:e.upAxis,forwardAxis:e.forwardAxis,loadAttributesFor2D:e.projectTo2D,enablePick:e.enablePick,loadIndicesForWireframe:e.enableDebugWireframe,loadPrimitiveOutline:e.enableShowOutline,loadForClassification:l(e.classificationType)},n=new eB(t);try{await n.load();let i=pN(n,Br.TILE_B3DM,e);return new vo(i)}catch(i){throw n.destroy(),i}};vo.fromPnts=async function(e){let t={arrayBuffer:e.arrayBuffer,byteOffset:e.byteOffset,loadAttributesFor2D:e.projectTo2D},n=new dN(t);try{await n.load();let i=pN(n,Br.TILE_PNTS,e);return new vo(i)}catch(i){throw n.destroy(),i}};vo.fromI3dm=async function(e){let t={i3dmResource:e.resource,arrayBuffer:e.arrayBuffer,byteOffset:e.byteOffset,releaseGltfJson:e.releaseGltfJson,asynchronous:e.asynchronous,incrementallyLoadTextures:e.incrementallyLoadTextures,upAxis:e.upAxis,forwardAxis:e.forwardAxis,loadAttributesFor2D:e.projectTo2D,enablePick:e.enablePick,loadIndicesForWireframe:e.enableDebugWireframe,loadPrimitiveOutline:e.enableShowOutline},n=new iB(t);try{await n.load();let i=pN(n,Br.TILE_I3DM,e);return new vo(i)}catch(i){throw n.destroy(),i}};vo.fromGeoJson=async function(e){let t={geoJson:e.geoJson},n=new tB(t),i=pN(n,Br.TILE_GEOJSON,e);return new vo(i)};var Ott=new V;vo.prototype.applyColorAndShow=function(e){let t=V.clone(this._color,Ott),n=l(e)&&l(e.color),i=l(e)&&l(e.show);this._color=n?e.color.evaluateColor(void 0,this._color):V.clone(V.WHITE,this._color),this._show=i?e.show.evaluate(void 0):!0,HK(t,this._color)&&this.resetDrawCommands()};vo.prototype.applyStyle=function(e){let t=this.type===Br.TILE_PNTS,n=l(this.featureTableId)&&this.featureTables[this.featureTableId].featuresLength>0,i=l(this.structuralMetadata)?this.structuralMetadata.propertyAttributes:void 0,o=l(i)&&l(i[0]);if(t&&(!n||o)){this.resetDrawCommands();return}n?(this.featureTables[this.featureTableId].applyStyle(e),Q0e(this,e)):(this.applyColorAndShow(e),this._styleCommandsNeeded=void 0)};function pN(e,t,n){return{loader:e,type:t,resource:n.resource,show:n.show,modelMatrix:n.modelMatrix,scale:n.scale,enableVerticalExaggeration:n.enableVerticalExaggeration,minimumPixelSize:n.minimumPixelSize,maximumScale:n.maximumScale,id:n.id,allowPicking:n.allowPicking,clampAnimations:n.clampAnimations,shadows:n.shadows,debugShowBoundingVolume:n.debugShowBoundingVolume,enableDebugWireframe:n.enableDebugWireframe,debugWireframe:n.debugWireframe,cull:n.cull,opaquePass:n.opaquePass,customShader:n.customShader,content:n.content,heightReference:n.heightReference,scene:n.scene,distanceDisplayCondition:n.distanceDisplayCondition,color:n.color,colorBlendAmount:n.colorBlendAmount,colorBlendMode:n.colorBlendMode,edgeDisplayMode:n.edgeDisplayMode,silhouetteColor:n.silhouetteColor,silhouetteSize:n.silhouetteSize,enableShowOutline:n.enableShowOutline,showOutline:n.showOutline,outlineColor:n.outlineColor,clippingPlanes:n.clippingPlanes,clippingPolygons:n.clippingPolygons,lightColor:n.lightColor,imageBasedLighting:n.imageBasedLighting,backFaceCulling:n.backFaceCulling,credit:n.credit,showCreditsOnScreen:n.showCreditsOnScreen,splitDirection:n.splitDirection,projectTo2D:n.projectTo2D,enablePick:n.enablePick,featureIdLabel:n.featureIdLabel,instanceFeatureIdLabel:n.instanceFeatureIdLabel,pointCloudShading:n.pointCloudShading,classificationType:n.classificationType,pickObject:n.pickObject}}var wf=vo;var WK=class e{constructor(t,n,i){this._tileset=t,this._tile=n,this._resource=i,this._model=void 0,this._metadata=void 0,this._group=void 0,this._ready=!1}get featuresLength(){let t=this._model,n=t.featureTables,i=t.featureTableId;return l(n)&&l(n[i])?n[i].featuresLength:0}get pointsLength(){return this._model.statistics.pointsLength}get trianglesLength(){return this._model.statistics.trianglesLength}get geometryByteLength(){return this._model.statistics.geometryByteLength}get texturesByteLength(){return this._model.statistics.texturesByteLength}get batchTableByteLength(){let t=this._model.statistics;return t.propertyTablesByteLength+t.batchTexturesByteLength}get innerContents(){}get ready(){return this._ready}get tileset(){return this._tileset}get tile(){return this._tile}get url(){return this._resource.getUrlComponent(!0)}get batchTable(){let t=this._model,n=t.featureTables,i=t.featureTableId;if(l(n)&&l(n[i]))return n[i]}get metadata(){return this._metadata}set metadata(t){this._metadata=t}get group(){return this._group}set group(t){this._group=t}getTextureIds(){return this._model.statistics.getTextureIds()}getTextureByteLengthById(t){return this._model.statistics.getTextureByteLengthById(t)}getExtension(t){return this._model.getExtension(t)}getFeature(t){let n=this._model,i=n.featureTableId;return n.featureTables[i].getFeature(t)}hasProperty(t,n){let i=this._model,o=i.featureTableId;return l(o)?i.featureTables[o].hasProperty(t,n):!1}applyDebugSettings(t,n){n=t?n:V.WHITE,this.featuresLength===0?this._model.color=n:l(this.batchTable)&&this.batchTable.setAllColor(n)}applyStyle(t){this._model.style=t}update(t,n){let i=this._model,o=this._tile;i.colorBlendAmount=t.colorBlendAmount,i.colorBlendMode=t.colorBlendMode,i.modelMatrix=o.computedTransform,i.customShader=t.customShader,i.featureIdLabel=t.featureIdLabel,i.instanceFeatureIdLabel=t.instanceFeatureIdLabel,i.lightColor=t.lightColor,i.imageBasedLighting=t.imageBasedLighting,i.backFaceCulling=t.backFaceCulling,i.shadows=t.shadows,i.showCreditsOnScreen=t.showCreditsOnScreen,i.splitDirection=t.splitDirection,i.debugWireframe=t.debugWireframe,i.edgeDisplayMode=t.edgeDisplayMode,i.showOutline=t.showOutline,i.outlineColor=t.outlineColor,i.pointCloudShading=t.pointCloudShading;let r=t.clippingPlanes;i.referenceMatrix=t.clippingPlanesOriginMatrix,l(r)&&o.clippingPlanesDirty&&(i._clippingPlanes=r.enabled&&o._isClipped?r:void 0);let a=t.environmentMapManager;i.environmentMapManager!==r&&(i._environmentMapManager=a),l(r)&&l(i._clippingPlanes)&&i._clippingPlanes!==r&&(i._clippingPlanes=r,i._clippingPlanesState=0);let s=t.clippingPolygons;l(s)&&o.clippingPolygonsDirty&&(i._clippingPolygons=s.enabled&&o._isClippedByPolygon?s:void 0),l(s)&&l(i._clippingPolygons)&&i._clippingPolygons!==s&&(i._clippingPolygons=s,i._clippingPolygonsState=0),i.update(n),!this._ready&&i.ready&&(i.activeAnimations.addAll({loop:Ou.REPEAT}),this._ready=!0)}isDestroyed(){return!1}destroy(){return this._model=this._model&&this._model.destroy(),fe(this)}static async fromGltf(t,n,i,o){let r=new e(t,n,i),s=gN(t,n,r,{gltf:o,basePath:i}),c=t.vectorClassificationOnly?void 0:t.classificationType;s.classificationType=c;let u=await wf.fromGltfAsync(s);return r._model=u,r}static async fromB3dm(t,n,i,o,r){let a=new e(t,n,i),c=gN(t,n,a,{arrayBuffer:o,byteOffset:r,resource:i}),u=t.vectorClassificationOnly?void 0:t.classificationType;c.classificationType=u;let f=await wf.fromB3dm(c);return a._model=f,a}static async fromI3dm(t,n,i,o,r){let a=new e(t,n,i),c=gN(t,n,a,{arrayBuffer:o,byteOffset:r,resource:i}),u=await wf.fromI3dm(c);return a._model=u,a}static async fromPnts(t,n,i,o,r){let a=new e(t,n,i),c=gN(t,n,a,{arrayBuffer:o,byteOffset:r,resource:i}),u=await wf.fromPnts(c);return a._model=u,a}static async fromGeoJson(t,n,i,o){let r=new e(t,n,i),s=gN(t,n,r,{geoJson:o,resource:i}),c=await wf.fromGeoJson(s);return r._model=c,r}pick(t,n,i){if(!l(this._model)||!this._ready)return;let o=n.verticalExaggeration,r=n.verticalExaggerationRelativeHeight;return this._model.pick(t,n,o,r,te.WGS84,i)}};function gN(e,t,n,i){let o={cull:!1,releaseGltfJson:!0,opaquePass:Ie.CESIUM_3D_TILE,modelMatrix:t.computedTransform,upAxis:e._modelUpAxis,forwardAxis:e._modelForwardAxis,incrementallyLoadTextures:!1,customShader:e.customShader,content:n,colorBlendMode:e.colorBlendMode,colorBlendAmount:e.colorBlendAmount,lightColor:e.lightColor,imageBasedLighting:e.imageBasedLighting,featureIdLabel:e.featureIdLabel,instanceFeatureIdLabel:e.instanceFeatureIdLabel,pointCloudShading:e.pointCloudShading,clippingPlanes:e.clippingPlanes,backFaceCulling:e.backFaceCulling,shadows:e.shadows,showCreditsOnScreen:e.showCreditsOnScreen,splitDirection:e.splitDirection,enableDebugWireframe:e._enableDebugWireframe,debugWireframe:e.debugWireframe,projectTo2D:e._projectTo2D,enablePick:e._enablePick,enableShowOutline:e._enableShowOutline,showOutline:e.showOutline,outlineColor:e.outlineColor};return wt(i,o)}var If=WK;var qK=class e{constructor(t,n,i){this._tileset=t,this._tile=n,this._resource=i,this.featurePropertiesDirty=!1,this._metadata=void 0,this._group=void 0,this._ready=!1}get featuresLength(){return 0}get pointsLength(){return 0}get trianglesLength(){return 0}get geometryByteLength(){return 0}get texturesByteLength(){return 0}get batchTableByteLength(){return 0}get innerContents(){}get ready(){return this._ready}get tileset(){return this._tileset}get tile(){return this._tile}get url(){return this._resource.getUrlComponent(!0)}get batchTable(){}get metadata(){return this._metadata}set metadata(t){this._metadata=t}get group(){return this._group}set group(t){this._group=t}static fromJson(t,n,i,o){let r=new e(t,n,i);return r._tileset.loadTileset(r._resource,o,r._tile),r._ready=!0,r}hasProperty(t,n){return!1}getFeature(t){}applyDebugSettings(t,n){}applyStyle(t){}update(t,n){}pick(t,n,i){}isDestroyed(){return!1}destroy(){return fe(this)}},_N=qK;var AN=`uniform sampler2D u_atlas;
- uniform float u_coarseDepthTestDistance;
- uniform float u_threePointDepthTestDistance;
-
- #ifdef VECTOR_TILE
- uniform vec4 u_highlightColor;
- #endif
-
- in vec2 v_textureCoordinates;
- in vec4 v_pickColor;
- in vec4 v_color;
- flat in vec2 v_splitDirectionAndEllipsoidDepthEC;
-
- #ifdef SDF
- in vec4 v_outlineColor;
- in float v_outlineWidth;
- #endif
-
- in vec4 v_compressed; // x: eyeDepth, y: applyTranslate & enableDepthCheck, z: dimensions, w: imageSize
- const float SHIFT_LEFT1 = 2.0;
- const float SHIFT_RIGHT1 = 1.0 / 2.0;
-
- float getGlobeDepthAtCoords(vec2 st)
- {
- float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, st));
- if (logDepthOrDepth == 0.0)
- {
- return 0.0; // not on the globe
- }
-
- vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);
- return eyeCoordinate.z / eyeCoordinate.w;
- }
-
- #ifdef SDF
-
- // Get the distance from the edge of a glyph at a given position sampling an SDF texture.
- float getDistance(vec2 position)
- {
- return texture(u_atlas, position).r;
- }
-
- // Samples the sdf texture at the given position and produces a color based on the fill color and the outline.
- vec4 getSDFColor(vec2 position, float outlineWidth, vec4 outlineColor, float smoothing)
- {
- float distance = getDistance(position);
-
- if (outlineWidth > 0.0)
- {
- // Don't get the outline edge exceed the SDF_EDGE
- float outlineEdge = clamp(SDF_EDGE - outlineWidth, 0.0, SDF_EDGE);
- float outlineFactor = smoothstep(SDF_EDGE - smoothing, SDF_EDGE + smoothing, distance);
- vec4 sdfColor = mix(outlineColor, v_color, outlineFactor);
- float alpha = smoothstep(outlineEdge - smoothing, outlineEdge + smoothing, distance);
- return vec4(sdfColor.rgb, sdfColor.a * alpha);
- }
- else
- {
- float alpha = smoothstep(SDF_EDGE - smoothing, SDF_EDGE + smoothing, distance);
- return vec4(v_color.rgb, v_color.a * alpha);
- }
- }
- #endif
-
- bool getDepthTestEnabled() {
- float temp = v_compressed.y;
- temp = temp * SHIFT_RIGHT1;
- float temp2 = (temp - floor(temp)) * SHIFT_LEFT1;
- return temp2 != 0.0;
- }
-
- float getRelativeEyeDepth(float eyeDepth, float distanceToEllipsoid, float epsilon) {
- float depthDifferential = eyeDepth - distanceToEllipsoid;
- float depthRatio = abs(depthDifferential / distanceToEllipsoid);
- if (depthRatio < epsilon) {
- // The approximations are imprecise, so use an epsilon check for small value differences and assume a value of 0.0
- return 0.0;
- }
-
- return depthDifferential;
- }
-
- // Extra manual depth testing is done to allow more control over how a billboard is occluded
- // by the globe when near and far from the camera.
- void doDepthTest(float eyeDepth, float globeDepth) {
-
- #ifdef VS_THREE_POINT_DEPTH_CHECK
- // Since discarding vertices is not possible, the vertex shader sets eyeDepth to 0 to indicate the depth test failed. Apply the discard here.
- if (eyeDepth > -u_threePointDepthTestDistance) {
- if (eyeDepth == 0.0) {
- discard;
- }
- return;
- }
- #endif
- bool useGlobeDepth = eyeDepth > -u_coarseDepthTestDistance;
- if (useGlobeDepth && globeDepth == 0.0) {
- // Pixel is not on the globe, so there is no distance to compare against. Pass.
- return;
- }
-
- // If the camera is close, compare against the globe depth texture that includes depth from the 3D tile pass.
- if (useGlobeDepth && getRelativeEyeDepth(eyeDepth, globeDepth, czm_epsilon1) < 0.0) {
- discard;
- }
- }
-
- #ifdef LOG_DEPTH
- void writeDepth(float eyeDepth, float globeDepth, float distanceToEllipsoid) {
- // If we've made it here, the manual depth test above determined that this fragment should be visible.
- // But the automatic depth test must still run in order to write the result to the depth buffer, and its results may
- // disagree with our manual depth test's results. To prefer our manual results when in front of the globe, apply an offset towards the camera.
-
- float depthArg = v_depthFromNearPlusOne;
-
- if (globeDepth != 0.0 && getRelativeEyeDepth(eyeDepth, distanceToEllipsoid, czm_epsilon3) > 0.0) {
- float globeDepthFromNearPlusOne = (-globeDepth - czm_currentFrustum.x) + 1.0;
- float nudge = max(globeDepthFromNearPlusOne * 5e-6, czm_epsilon7);
- float globeOnTop = max(1.0, globeDepthFromNearPlusOne - nudge);
- depthArg = min(depthArg, globeOnTop);
- }
-
- czm_writeLogDepth(depthArg);
- }
- #endif
-
- void main()
- {
- if (v_splitDirectionAndEllipsoidDepthEC.x < 0.0 && gl_FragCoord.x > czm_splitPosition) {
- discard;
- }
- if (v_splitDirectionAndEllipsoidDepthEC.x > 0.0 && gl_FragCoord.x < czm_splitPosition) {
- discard;
- }
-
- if (getDepthTestEnabled()) {
- vec2 fragSt = gl_FragCoord.xy / czm_viewport.zw;
- float eyeDepth = v_compressed.x;
- float globeDepth = getGlobeDepthAtCoords(fragSt);
- float distanceToEllipsoid = -v_splitDirectionAndEllipsoidDepthEC.y;
- doDepthTest(eyeDepth, globeDepth);
-
- #ifdef LOG_DEPTH
- writeDepth(eyeDepth, globeDepth, distanceToEllipsoid);
- #endif
- }
-
- vec4 color = texture(u_atlas, v_textureCoordinates);
-
- #ifdef SDF
- float outlineWidth = v_outlineWidth;
- vec4 outlineColor = v_outlineColor;
-
- // Get the current distance
- float distance = getDistance(v_textureCoordinates);
-
- #if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))
- float smoothing = fwidth(distance);
- // Get an offset that is approximately half the distance to the neighbor pixels
- // 0.354 is approximately half of 1/sqrt(2)
- vec2 sampleOffset = 0.354 * vec2(dFdx(v_textureCoordinates) + dFdy(v_textureCoordinates));
-
- // Sample the center point
- vec4 center = getSDFColor(v_textureCoordinates, outlineWidth, outlineColor, smoothing);
-
- // Sample the 4 neighbors
- vec4 color1 = getSDFColor(v_textureCoordinates + vec2(sampleOffset.x, sampleOffset.y), outlineWidth, outlineColor, smoothing);
- vec4 color2 = getSDFColor(v_textureCoordinates + vec2(-sampleOffset.x, sampleOffset.y), outlineWidth, outlineColor, smoothing);
- vec4 color3 = getSDFColor(v_textureCoordinates + vec2(-sampleOffset.x, -sampleOffset.y), outlineWidth, outlineColor, smoothing);
- vec4 color4 = getSDFColor(v_textureCoordinates + vec2(sampleOffset.x, -sampleOffset.y), outlineWidth, outlineColor, smoothing);
-
- // Equally weight the center sample and the 4 neighboring samples
- color = (center + color1 + color2 + color3 + color4)/5.0;
- #else
- // If no derivatives available (IE 10?), just do a single sample
- float smoothing = 1.0/32.0;
- color = getSDFColor(v_textureCoordinates, outlineWidth, outlineColor, smoothing);
- #endif
-
- color = czm_gammaCorrect(color);
- #else
- color = czm_gammaCorrect(color);
- color *= czm_gammaCorrect(v_color);
- #endif
-
- // Fully transparent parts of the billboard are not pickable.
- #if !defined(OPAQUE) && !defined(TRANSLUCENT)
- if (color.a < 0.005) // matches 0/255 and 1/255
- {
- discard;
- }
- #else
- // The billboard is rendered twice. The opaque pass discards translucent fragments
- // and the translucent pass discards opaque fragments.
- #ifdef OPAQUE
- if (color.a < 0.995) // matches < 254/255
- {
- discard;
- }
- #else
- if (color.a >= 0.995) // matches 254/255 and 255/255
- {
- discard;
- }
- #endif
- #endif
-
- #ifdef VECTOR_TILE
- color *= u_highlightColor;
- #endif
- out_FragColor = color;
- }
- `;var yN=`uniform float u_threePointDepthTestDistance;
- in vec2 direction;
- in vec4 positionHighAndScale;
- in vec4 positionLowAndRotation;
- in vec4 compressedAttribute0; // pixel offset, translate, horizontal origin, vertical origin, show, direction, texture coordinates (texture offset)
- in vec4 compressedAttribute1; // aligned axis, translucency by distance, image width
- in vec4 compressedAttribute2; // label horizontal origin, image height, color, pick color, size in meters, valid aligned axis, 13 bits free
- in vec4 eyeOffset; // eye offset in meters, 4 bytes free (texture range)
- in vec4 scaleByDistance; // near, nearScale, far, farScale
- in vec4 pixelOffsetScaleByDistance; // near, nearScale, far, farScale
- in vec4 compressedAttribute3; // distance display condition near, far, disableDepthTestDistanceSq, dimensions
- in vec2 sdf; // sdf outline color (rgb) and width (w)
- in float splitDirection; // splitDirection
- #ifdef VS_THREE_POINT_DEPTH_CHECK
- in vec4 textureCoordinateBoundsOrLabelTranslate; // the min and max x and y values for the texture coordinates
- #endif
- #ifdef VECTOR_TILE
- in float a_batchId;
- #endif
-
- out vec2 v_textureCoordinates;
- out vec4 v_compressed; // x: eyeDepth, y: applyTranslate & enableDepthCheck, z: dimensions, w: imageSize
-
- out vec4 v_pickColor;
- out vec4 v_color;
- flat out vec2 v_splitDirectionAndEllipsoidDepthEC; // x: splitDirection, y: ellipsoid depth in eye coordinates
- #ifdef SDF
- out vec4 v_outlineColor;
- out float v_outlineWidth;
- #endif
-
- const float UPPER_BOUND = 32768.0;
-
- const float SHIFT_LEFT16 = 65536.0;
- const float SHIFT_LEFT12 = 4096.0;
- const float SHIFT_LEFT8 = 256.0;
- const float SHIFT_LEFT7 = 128.0;
- const float SHIFT_LEFT5 = 32.0;
- const float SHIFT_LEFT3 = 8.0;
- const float SHIFT_LEFT2 = 4.0;
- const float SHIFT_LEFT1 = 2.0;
-
- const float SHIFT_RIGHT12 = 1.0 / 4096.0;
- const float SHIFT_RIGHT8 = 1.0 / 256.0;
- const float SHIFT_RIGHT7 = 1.0 / 128.0;
- const float SHIFT_RIGHT5 = 1.0 / 32.0;
- const float SHIFT_RIGHT3 = 1.0 / 8.0;
- const float SHIFT_RIGHT2 = 1.0 / 4.0;
- const float SHIFT_RIGHT1 = 1.0 / 2.0;
-
- vec4 addScreenSpaceOffset(vec4 positionEC, vec2 imageSize, float scale, vec2 direction, vec2 origin, vec2 translate, vec2 pixelOffset, vec3 alignedAxis, bool validAlignedAxis, float rotation, bool sizeInMeters, out mat2 rotationMatrix, out float mpp)
- {
- // Note the halfSize cannot be computed in JavaScript because it is sent via
- // compressed vertex attributes that coerce it to an integer.
- vec2 halfSize = imageSize * scale * 0.5;
- halfSize *= ((direction * 2.0) - 1.0);
-
- vec2 originTranslate = origin * abs(halfSize);
-
- #if defined(ROTATION) || defined(ALIGNED_AXIS)
- if (validAlignedAxis || rotation != 0.0)
- {
- float angle = rotation;
- if (validAlignedAxis)
- {
- vec4 projectedAlignedAxis = czm_modelView3D * vec4(alignedAxis, 0.0);
- angle += sign(-projectedAlignedAxis.x) * acos(sign(projectedAlignedAxis.y) * (projectedAlignedAxis.y * projectedAlignedAxis.y) /
- (projectedAlignedAxis.x * projectedAlignedAxis.x + projectedAlignedAxis.y * projectedAlignedAxis.y));
- }
-
- float cosTheta = cos(angle);
- float sinTheta = sin(angle);
- rotationMatrix = mat2(cosTheta, sinTheta, -sinTheta, cosTheta);
- halfSize = rotationMatrix * halfSize;
- }
- else
- {
- rotationMatrix = mat2(1.0, 0.0, 0.0, 1.0);
- }
- #endif
-
- mpp = czm_metersPerPixel(positionEC);
- positionEC.xy += (originTranslate + halfSize) * czm_branchFreeTernary(sizeInMeters, 1.0, mpp);
- positionEC.xy += (translate + pixelOffset) * mpp;
-
- return positionEC;
- }
-
- #ifdef VS_THREE_POINT_DEPTH_CHECK
- float getGlobeDepth(vec4 positionEC)
- {
- vec4 posWC = czm_eyeToWindowCoordinates(positionEC);
-
- float globeDepth = czm_unpackDepth(texture(czm_globeDepthTexture, posWC.xy / czm_viewport.zw));
-
- if (globeDepth == 0.0)
- {
- return 0.0; // not on the globe
- }
-
- vec4 eyeCoordinate = czm_windowToEyeCoordinates(posWC.xy, globeDepth);
- return eyeCoordinate.z / eyeCoordinate.w;
- }
- #endif
- void main()
- {
- // Modifying this shader may also require modifications to Billboard._computeScreenSpacePosition
-
- // unpack attributes
- vec3 positionHigh = positionHighAndScale.xyz;
- vec3 positionLow = positionLowAndRotation.xyz;
- float scale = positionHighAndScale.w;
-
- #if defined(ROTATION) || defined(ALIGNED_AXIS)
- float rotation = positionLowAndRotation.w;
- #else
- float rotation = 0.0;
- #endif
-
- float compressed = compressedAttribute0.x;
-
- vec2 pixelOffset;
- pixelOffset.x = floor(compressed * SHIFT_RIGHT7);
- compressed -= pixelOffset.x * SHIFT_LEFT7;
- pixelOffset.x -= UPPER_BOUND;
-
- vec2 origin;
- origin.x = floor(compressed * SHIFT_RIGHT5);
- compressed -= origin.x * SHIFT_LEFT5;
-
- origin.y = floor(compressed * SHIFT_RIGHT3);
- compressed -= origin.y * SHIFT_LEFT3;
-
- origin -= vec2(1.0);
-
- float show = floor(compressed * SHIFT_RIGHT2);
- compressed -= show * SHIFT_LEFT2;
-
- vec2 textureCoordinatesBottomLeft = czm_decompressTextureCoordinates(compressedAttribute0.w);
- vec2 textureCoordinatesRange = czm_decompressTextureCoordinates(eyeOffset.w);
- vec2 textureCoordinates = textureCoordinatesBottomLeft + direction * textureCoordinatesRange;
-
- float temp = compressedAttribute0.y * SHIFT_RIGHT8;
- pixelOffset.y = -(floor(temp) - UPPER_BOUND);
-
- vec2 translate;
- translate.y = (temp - floor(temp)) * SHIFT_LEFT16;
-
- temp = compressedAttribute0.z * SHIFT_RIGHT8;
- translate.x = floor(temp) - UPPER_BOUND;
- translate.x *= SHIFT_RIGHT2; // undo translateX scaling (helps preserve subpixel precision, see BillboardCollection.js attribute writer for more info)
-
- translate.y += (temp - floor(temp)) * SHIFT_LEFT8;
- translate.y -= UPPER_BOUND;
- translate.y *= SHIFT_RIGHT2;
-
- temp = compressedAttribute1.x * SHIFT_RIGHT8;
- float temp2 = floor(compressedAttribute2.w * SHIFT_RIGHT2);
-
- vec2 imageSize = vec2(floor(temp), temp2);
-
- #ifdef EYE_DISTANCE_TRANSLUCENCY
- vec4 translucencyByDistance;
- translucencyByDistance.x = compressedAttribute1.z;
- translucencyByDistance.z = compressedAttribute1.w;
-
- translucencyByDistance.y = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;
-
- temp = compressedAttribute1.y * SHIFT_RIGHT8;
- translucencyByDistance.w = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;
- #endif
-
- #ifdef VS_THREE_POINT_DEPTH_CHECK
- temp = compressedAttribute3.w;
- temp = temp * SHIFT_RIGHT12;
-
- vec2 dimensions;
- dimensions.y = (temp - floor(temp)) * SHIFT_LEFT12;
- dimensions.x = floor(temp);
- #endif
-
- #ifdef ALIGNED_AXIS
- vec3 alignedAxis = czm_octDecode(floor(compressedAttribute1.y * SHIFT_RIGHT8));
- temp = compressedAttribute2.z * SHIFT_RIGHT5;
- bool validAlignedAxis = (temp - floor(temp)) * SHIFT_LEFT1 > 0.0;
- #else
- vec3 alignedAxis = vec3(0.0);
- bool validAlignedAxis = false;
- #endif
-
- vec4 color = czm_decodeRGB8(compressedAttribute2.x);
- vec4 pickColor = czm_decodeRGB8(compressedAttribute2.y);
-
- temp = compressedAttribute2.z * SHIFT_RIGHT8;
- bool sizeInMeters = floor((temp - floor(temp)) * SHIFT_LEFT7) > 0.0;
- temp = floor(temp) * SHIFT_RIGHT8;
-
- pickColor.a = (temp - floor(temp)) * SHIFT_LEFT8;
- pickColor.a /= 255.0;
-
- color.a = floor(temp);
- color.a /= 255.0;
-
- ///////////////////////////////////////////////////////////////////////////
-
- vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);
- vec4 positionEC = czm_modelViewRelativeToEye * p;
-
- positionEC = czm_eyeOffset(positionEC, eyeOffset.xyz);
- positionEC.xyz *= show;
-
- ///////////////////////////////////////////////////////////////////////////
-
- #if defined(EYE_DISTANCE_SCALING) || defined(EYE_DISTANCE_TRANSLUCENCY) || defined(EYE_DISTANCE_PIXEL_OFFSET) || defined(DISTANCE_DISPLAY_CONDITION) || defined(DISABLE_DEPTH_DISTANCE)
- float lengthSq;
- if (czm_sceneMode == czm_sceneMode2D)
- {
- // 2D camera distance is a special case
- // treat all billboards as flattened to the z=0.0 plane
- lengthSq = czm_eyeHeight2D.y;
- }
- else
- {
- lengthSq = dot(positionEC.xyz, positionEC.xyz);
- }
- #endif
-
- #ifdef EYE_DISTANCE_SCALING
- float distanceScale = czm_nearFarScalar(scaleByDistance, lengthSq);
- scale *= distanceScale;
- translate *= distanceScale;
- // push vertex behind near plane for clipping
- if (scale == 0.0)
- {
- positionEC.xyz = vec3(0.0);
- }
- #endif
-
- float translucency = 1.0;
- #ifdef EYE_DISTANCE_TRANSLUCENCY
- translucency = czm_nearFarScalar(translucencyByDistance, lengthSq);
- // push vertex behind near plane for clipping
- if (translucency == 0.0)
- {
- positionEC.xyz = vec3(0.0);
- }
- #endif
-
- #ifdef EYE_DISTANCE_PIXEL_OFFSET
- float pixelOffsetScale = czm_nearFarScalar(pixelOffsetScaleByDistance, lengthSq);
- pixelOffset *= pixelOffsetScale;
- #endif
-
- #ifdef DISTANCE_DISPLAY_CONDITION
- float nearSq = compressedAttribute3.x;
- float farSq = compressedAttribute3.y;
- if (lengthSq < nearSq || lengthSq > farSq)
- {
- positionEC.xyz = vec3(0.0);
- }
- #endif
-
- mat2 rotationMatrix;
- float mpp;
-
- float enableDepthCheck = 1.0;
- #ifdef DISABLE_DEPTH_DISTANCE
- float disableDepthTestDistanceSq = compressedAttribute3.z;
- if (disableDepthTestDistanceSq == 0.0 && czm_minimumDisableDepthTestDistance != 0.0)
- {
- disableDepthTestDistanceSq = czm_minimumDisableDepthTestDistance;
- }
-
- if (lengthSq < disableDepthTestDistanceSq || disableDepthTestDistanceSq < 0.0)
- {
- enableDepthCheck = 0.0;
- }
- #endif
-
- v_splitDirectionAndEllipsoidDepthEC.y = czm_infinity;
- vec3 ellipsoidCenter = czm_view[3].xyz;
- vec3 rayDirection = normalize(positionEC.xyz);
- czm_ray ray = czm_ray(vec3(0.0), rayDirection);
- vec3 ellipsoid_inverseRadii = czm_ellipsoidInverseRadii;
- czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoidCenter, ellipsoid_inverseRadii);
-
- if (!czm_isEmpty(intersection))
- {
- v_splitDirectionAndEllipsoidDepthEC.y = intersection.start;
- }
-
- v_compressed.y = enableDepthCheck;
-
- #ifdef VS_THREE_POINT_DEPTH_CHECK
- if (lengthSq < (u_threePointDepthTestDistance * u_threePointDepthTestDistance) && (enableDepthCheck == 1.0)) {
- float depthsilon = 10.0;
- vec2 depthOrigin;
- // Horizontal origin for labels comes from a special attribute. If that value is 0, this is a billboard - use the regular origin.
- // Otherwise, transform the label origin to -1, 0, 1 (right, center, left).
- depthOrigin.x = floor(compressedAttribute2.w - (temp2 * SHIFT_LEFT2));
- depthOrigin.x = czm_branchFreeTernary(depthOrigin.x == 0.0, origin.x, depthOrigin.x - 2.0);
- depthOrigin.y = origin.y;
-
- vec4 pEC1 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(0.0), depthOrigin, vec2(0.0), pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);
- float globeDepth1 = getGlobeDepth(pEC1);
-
- if (globeDepth1 != 0.0 && pEC1.z + depthsilon < globeDepth1)
- {
- vec4 pEC2 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(0.0, 1.0), depthOrigin, vec2(0.0), pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);
- float globeDepth2 = getGlobeDepth(pEC2);
-
- if (globeDepth2 != 0.0 && pEC2.z + depthsilon < globeDepth2)
- {
- vec4 pEC3 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(1.0), depthOrigin, vec2(0.0), pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);
- float globeDepth3 = getGlobeDepth(pEC3);
- if (globeDepth3 != 0.0 && pEC3.z + depthsilon < globeDepth3)
- {
- // "Discard" this vertex, as three key points fail depth test.
- positionEC.xyz = vec3(0.0);
- }
- }
- }
- }
- #endif
- // Write out the eyespace depth before applying the screen space offset, but after potentially "discarding" the vertex
- // by setting its eyespace position to zero, via the three-point depth test above.
- v_compressed.x = positionEC.z;
-
- positionEC = addScreenSpaceOffset(positionEC, imageSize, scale, direction, origin, translate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);
- gl_Position = czm_projection * positionEC;
- v_textureCoordinates = textureCoordinates;
-
- #ifdef LOG_DEPTH
- czm_vertexLogDepth();
- #endif
-
- #ifdef DISABLE_DEPTH_DISTANCE
-
- if (disableDepthTestDistanceSq != 0.0)
- {
- // Don't try to "multiply both sides" by w. Greater/less-than comparisons won't work for negative values of w.
- float zclip = gl_Position.z / gl_Position.w;
- bool clipped = (zclip < -1.0 || zclip > 1.0);
- // disableDepthTestDistanceSq can be less than zero if it's explicitly set to -1 in JS (as a sentinel value equivalent to infinity)
- if (!clipped && (disableDepthTestDistanceSq < 0.0 || (lengthSq > 0.0 && lengthSq < disableDepthTestDistanceSq)))
- {
- // Position z on the near plane.
- gl_Position.z = -gl_Position.w;
- #ifdef LOG_DEPTH
- v_depthFromNearPlusOne = 1.0;
- #endif
- }
- }
- #endif
-
- #ifdef SDF
- vec4 outlineColor = czm_decodeRGB8(sdf.x);
- float outlineWidth;
-
- temp = sdf.y;
- temp = temp * SHIFT_RIGHT8;
- float temp3 = (temp - floor(temp)) * SHIFT_LEFT8;
- temp = floor(temp) * SHIFT_RIGHT8;
- outlineWidth = (temp - floor(temp)) * SHIFT_LEFT8;
- outlineColor.a = floor(temp);
- outlineColor.a /= 255.0;
-
- v_outlineWidth = outlineWidth / 255.0;
- v_outlineColor = outlineColor;
- v_outlineColor.a *= translucency;
- #endif
-
- v_pickColor = pickColor;
-
- v_color = color;
- v_color.a *= translucency;
- v_splitDirectionAndEllipsoidDepthEC.x = splitDirection;
- }
- `;var Mtt=Object.freeze({NONE:0,LOADING:2,LOADED:3,ERROR:4,FAILED:5}),ka=Mtt;function am(e){this._billboardCollection=e,this._id=void 0,this._loadState=ka.NONE,this._loadError=void 0,this._index=-1,this._width=void 0,this._height=void 0,this._hasSubregion=!1,this.dirty=!1}Object.defineProperties(am.prototype,{loadError:{get:function(){return this._loadError}},loadState:{get:function(){return this._loadState}},ready:{get:function(){return this._loadState===ka.LOADED}},hasImage:{get:function(){return this._loadState!==ka.NONE}},id:{get:function(){return this._id}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}});am.prototype.unload=async function(){this._loadState!==ka.NONE&&(this._id=void 0,this._loadError=void 0,this._loadState=ka.NONE,this._index=-1,this._width=void 0,this._height=void 0,this.dirty=!0)};am.prototype.loadImage=async function(e,t,n,i){if(this._id===e)return;let o=this._billboardCollection,r=o.billboardTextureCache,a=r.get(e);if(l(a)&&t.loadState===ka.LOADING||t.loadState===ka.LOADED){am.clone(a,this);return}l(a)||(a=new am(o),r.set(e,a)),a._id=this._id=e,a._loadState=this._loadState=ka.LOADING,a._loadError=this._loadError=void 0;let s,c=this._billboardCollection.textureAtlas;try{s=c.addImage(e,t,n,i),s instanceof Promise&&(s=await s)}catch(f){if(a._loadState=ka.ERROR,a._loadError=f,this._id!==e)return;this._loadState=ka.ERROR,this._loadError=f;return}if(!l(s)||s===-1){if(a._loadState=ka.FAILED,a._index=-1,this._id!==e)return;this._loadState=ka.FAILED,this._index=-1;return}a._index=s,a._loadState=ka.LOADED;let u=c.rectangles[s];a._width=u.width,a._height=u.height,this._id===e&&(this._index=s,this._loadState=ka.LOADED,this._width=u.width,this._height=u.height,this.dirty=!0)};am.prototype.addImageSubRegion=function(e,t){this._id=e,this._loadError=void 0,this._hasSubregion=!0;let i=this._billboardCollection.textureAtlas.addImageSubRegion(e,t);if(typeof i=="number"){this.setImageSubRegion(i,t);return}this.loadImageSubRegion(e,t,i)};am.prototype.loadImageSubRegion=async function(e,t,n){let i;try{this._loadState=ka.LOADING,i=await n}catch(o){this._loadState=ka.ERROR,this._loadError=o;return}this._id===e&&(this._loadState=ka.LOADED,this.setImageSubRegion(i,t))};am.prototype.setImageSubRegion=function(e,t){if(this._index!==e){if(!l(e)||e===-1){this._loadState=ka.FAILED,this._index=-1,this._width=void 0,this._height=void 0;return}this._width=t.width,this._height=t.height,this._index=e,this.dirty=!0}};am.prototype.computeTextureCoordinates=function(e){return this._billboardCollection.textureAtlas.computeTextureCoordinates(this._index,e)};am.clone=function(e,t){if(t._id=e._id,t._loadState=e._loadState,t._loadError=void 0,t._index=e._index,t._width=e._width,t._height=e._height,t._hasSubregion=e._hasSubregion,e.ready){t.dirty=!0;return}return(async()=>{let i=e._id;await e._billboardCollection.textureAtlas._indexPromiseById.get(i),t._id===i&&(e._hasSubregion&&await Promise.resolve(),t._id=i,t._loadState=e._loadState,t._loadError=e._loadError,t._index=e._index,t._width=e._width,t._height=e._height,t.dirty=!0)})(),t};var Pg=am;function wi(e,t){e=e??G.EMPTY_OBJECT;let n=e.translucencyByDistance,i=e.pixelOffsetScaleByDistance,o=e.scaleByDistance,r=e.distanceDisplayCondition;l(n)&&(n=zt.clone(n)),l(i)&&(i=zt.clone(i)),l(o)&&(o=zt.clone(o)),l(r)&&(r=kt.clone(r)),this._show=e.show??!0,this._position=h.clone(e.position??h.ZERO),this._actualPosition=h.clone(this._position),this._pixelOffset=z.clone(e.pixelOffset??z.ZERO),this._translate=new z(0,0),this._eyeOffset=h.clone(e.eyeOffset??h.ZERO),this._heightReference=e.heightReference??nt.NONE,this._verticalOrigin=e.verticalOrigin??zn.CENTER,this._horizontalOrigin=e.horizontalOrigin??Oi.CENTER,this._scale=e.scale??1,this._color=V.clone(e.color??V.WHITE),this._rotation=e.rotation??0,this._alignedAxis=h.clone(e.alignedAxis??h.ZERO),this._width=e.width,this._height=e.height,this._scaleByDistance=o,this._translucencyByDistance=n,this._pixelOffsetScaleByDistance=i,this._sizeInMeters=e.sizeInMeters??!1,this._distanceDisplayCondition=r,this._disableDepthTestDistance=e.disableDepthTestDistance,this._id=e.id,this._collection=e.collection??t,this._pickId=void 0,this._pickPrimitive=e._pickPrimitive??this,this._billboardCollection=t,this._dirty=!1,this._index=-1,this._batchIndex=void 0,this._imageTexture=new Pg(t),this._imageId=e.imageId,this._imageWidth=void 0,this._imageHeight=void 0,this._labelDimensions=void 0,this._labelHorizontalOrigin=void 0,this._labelTranslate=void 0;let a=e.image;l(a)&&(this._computeImageTextureProperties(e.imageId,a),this._imageTexture.loadImage(this._imageId,a,this._imageWidth,this._imageHeight)),l(e.imageSubRegion)&&this._imageTexture.addImageSubRegion(this._imageId,e.imageSubRegion),this._actualClampedPosition=void 0,this._removeCallbackFunc=void 0,this._mode=ie.SCENE3D,this._clusterShow=!0,this._outlineColor=V.clone(e.outlineColor??V.BLACK),this._outlineWidth=e.outlineWidth??0,this._updateClamping(),this._splitDirection=e.splitDirection??Or.NONE,this._positionFromParent=!1}var Z0e=wi.SHOW_INDEX=0,Yj=wi.POSITION_INDEX=1,rge=wi.PIXEL_OFFSET_INDEX=2,Btt=wi.EYE_OFFSET_INDEX=3,Ltt=wi.HORIZONTAL_ORIGIN_INDEX=4,Ntt=wi.VERTICAL_ORIGIN_INDEX=5,Ftt=wi.SCALE_INDEX=6,ege=wi.IMAGE_INDEX_INDEX=7,tge=wi.COLOR_INDEX=8,ktt=wi.ROTATION_INDEX=9,ztt=wi.ALIGNED_AXIS_INDEX=10,Utt=wi.SCALE_BY_DISTANCE_INDEX=11,Vtt=wi.TRANSLUCENCY_BY_DISTANCE_INDEX=12,jtt=wi.PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX=13,Gtt=wi.DISTANCE_DISPLAY_CONDITION=14,Htt=wi.DISABLE_DEPTH_DISTANCE=15;wi.TEXTURE_COORDINATE_BOUNDS=16;var nge=wi.SDF_INDEX=17,Wtt=wi.SPLIT_DIRECTION_INDEX=18;wi.NUMBER_OF_PROPERTIES=19;function Sr(e,t){let n=e._billboardCollection;l(n)&&(n._updateBillboard(e,t),e._dirty=!0)}Object.defineProperties(wi.prototype,{show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,Sr(this,Z0e))}},position:{get:function(){return this._position},set:function(e){let t=this._position;h.equals(t,e)||(h.clone(e,t),h.clone(e,this._actualPosition),this._updateClamping(),Sr(this,Yj))}},heightReference:{get:function(){return this._heightReference},set:function(e){let t=this._heightReference;e!==t&&(this._heightReference=e,this._updateClamping(),Sr(this,Yj))}},pixelOffset:{get:function(){return this._pixelOffset},set:function(e){let t=this._pixelOffset;z.equals(t,e)||(z.clone(e,t),Sr(this,rge))}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){let t=this._scaleByDistance;zt.equals(t,e)||(this._scaleByDistance=zt.clone(e,t),Sr(this,Utt))}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){let t=this._translucencyByDistance;zt.equals(t,e)||(this._translucencyByDistance=zt.clone(e,t),Sr(this,Vtt))}},pixelOffsetScaleByDistance:{get:function(){return this._pixelOffsetScaleByDistance},set:function(e){let t=this._pixelOffsetScaleByDistance;zt.equals(t,e)||(this._pixelOffsetScaleByDistance=zt.clone(e,t),Sr(this,jtt))}},eyeOffset:{get:function(){return this._eyeOffset},set:function(e){let t=this._eyeOffset;h.equals(t,e)||(h.clone(e,t),Sr(this,Btt))}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){this._horizontalOrigin!==e&&(this._horizontalOrigin=e,Sr(this,Ltt))}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){this._verticalOrigin!==e&&(this._verticalOrigin=e,Sr(this,Ntt))}},scale:{get:function(){return this._scale},set:function(e){this._scale!==e&&(this._scale=e,Sr(this,Ftt))}},color:{get:function(){return this._color},set:function(e){let t=this._color;V.equals(t,e)||(V.clone(e,t),Sr(this,tge))}},rotation:{get:function(){return this._rotation},set:function(e){this._rotation!==e&&(this._rotation=e,Sr(this,ktt))}},alignedAxis:{get:function(){return this._alignedAxis},set:function(e){let t=this._alignedAxis;h.equals(t,e)||(h.clone(e,t),Sr(this,ztt))}},width:{get:function(){return this._width??this._imageTexture.width},set:function(e){this._width!==e&&(this._width=e,Sr(this,ege))}},height:{get:function(){return this._height??this._imageTexture.height},set:function(e){this._height!==e&&(this._height=e,Sr(this,ege))}},sizeInMeters:{get:function(){return this._sizeInMeters},set:function(e){this._sizeInMeters!==e&&(this._sizeInMeters=e,Sr(this,tge))}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){kt.equals(e,this._distanceDisplayCondition)||(this._distanceDisplayCondition=kt.clone(e,this._distanceDisplayCondition),Sr(this,Gtt))}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){this._disableDepthTestDistance!==e&&(this._disableDepthTestDistance=e,Sr(this,Htt))}},id:{get:function(){return this._id},set:function(e){this._id=e,l(this._pickId)&&(this._pickId.object.id=e)}},pickPrimitive:{get:function(){return this._pickPrimitive},set:function(e){this._pickPrimitive=e,l(this._pickId)&&(this._pickId.object.primitive=e)}},pickId:{get:function(){return this._pickId}},image:{get:function(){return this._imageTexture.id},set:function(e){if(!l(e)){this._imageTexture.unload();return}this._computeImageTextureProperties(void 0,e),this._imageTexture.loadImage(this._imageId,e,this._imageWidth,this._imageHeight)}},ready:{get:function(){return this._imageTexture.ready}},loadError:{get:function(){return this._imageTexture.loadError}},textureDirty:{get:function(){return this._imageTexture.dirty},set:function(e){this._imageTexture.dirty=e}},_clampedPosition:{get:function(){return this._actualClampedPosition},set:function(e){this._actualClampedPosition=h.clone(e,this._actualClampedPosition),Sr(this,Yj)}},clusterShow:{get:function(){return this._clusterShow},set:function(e){this._clusterShow!==e&&(this._clusterShow=e,Sr(this,Z0e))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){let t=this._outlineColor;V.equals(t,e)||(V.clone(e,t),Sr(this,nge))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){this._outlineWidth!==e&&(this._outlineWidth=e,Sr(this,nge))}},splitDirection:{get:function(){return this._splitDirection},set:function(e){this._splitDirection!==e&&(this._splitDirection=e,Sr(this,Wtt))}}});wi.prototype.getPickId=function(e){return l(this._pickId)||(this._pickId=e.createPickId({primitive:this._pickPrimitive,collection:this._collection,id:this._id})),this._pickId};wi.prototype._updateClamping=function(){wi._updateClamping(this._billboardCollection,this)};var Xj=new de;wi._updateClamping=function(e,t){if(!l(e)||!l(e._scene))return;let n=e._scene,i=n.ellipsoid??te.default,o=n.frameState.mode,r=o!==t._mode;if(t._mode=o,(t._heightReference===nt.NONE||r)&&l(t._removeCallbackFunc)&&(t._removeCallbackFunc(),t._removeCallbackFunc=void 0,t._clampedPosition=void 0),t._heightReference===nt.NONE||t._positionFromParent||!l(t._position))return;l(t._removeCallbackFunc)&&t._removeCallbackFunc();let a=i.cartesianToCartographic(t._position);if(!l(a)){t._actualClampedPosition=void 0;return}function s(u){let f=i.cartographicToCartesian(u,t._clampedPosition);OE(t._heightReference)&&(t._mode===ie.SCENE3D?(u.height+=a.height,i.cartographicToCartesian(u,f)):f.x+=a.height),t._clampedPosition=f}t._removeCallbackFunc=n.updateHeight(a,s,t._heightReference),de.clone(a,Xj);let c=n.getHeight(a,t._heightReference);l(c)&&(Xj.height=c),s(Xj)};wi.prototype.computeTextureCoordinates=function(e){return this._imageTexture.computeTextureCoordinates(e)};wi.prototype.setImage=function(e,t){this._computeImageTextureProperties(e,t),this._imageTexture.loadImage(this._imageId,t,this._imageWidth,this._imageHeight)};wi.prototype.setImageTexture=function(e){Pg.clone(e,this._imageTexture)};var ige=512;wi.prototype._computeImageTextureProperties=function(e,t){if(this._imageWidth=void 0,this._imageHeight=void 0,!l(t)){this._imageId=jn();return}let n;typeof t=="string"?n=t:t instanceof De?n=t._url:l(t.src)&&(n=t.src),this._imageId=e??n??jn(),l(this._width)&&l(this._height)&&!this._sizeInMeters&&qtt(n)&&(this._imageWidth=Math.min(this._width,ige),this._imageHeight=Math.min(this._height,ige))};function qtt(e){return l(e)?Sh(e)?e.startsWith("data:image/svg+xml"):O0(e)==="svg":!1}wi.prototype.setImageSubRegion=function(e,t){this._imageTexture.addImageSubRegion(e,t)};wi.prototype._setTranslate=function(e){let t=this._translate;z.equals(t,e)||(z.clone(e,t),Sr(this,rge))};wi.prototype._getActualPosition=function(){return l(this._clampedPosition)?this._clampedPosition:this._actualPosition};wi.prototype._setActualPosition=function(e){l(this._clampedPosition)||h.clone(e,this._actualPosition),Sr(this,Yj)};var oge=new se;wi._computeActualPosition=function(e,t,n,i){return l(e._clampedPosition)?(n.mode!==e._mode&&e._updateClamping(),e._clampedPosition):n.mode===ie.SCENE3D?t:(M.multiplyByPoint(i,t,oge),eo.computeActualEllipsoidPosition(n,oge))};var age=new h;wi._computeScreenSpacePosition=function(e,t,n,i,o,r){let a=M.multiplyByPoint(e,t,age),s=eo.worldWithEyeOffsetToWindowCoordinates(o,a,n,r);if(l(s))return z.add(s,i,s),s};var qj=new z(0,0);wi.prototype.computeScreenSpacePosition=function(e,t){let n=this._billboardCollection;l(t)||(t=new z),z.clone(this._pixelOffset,qj),z.add(qj,this._translate,qj);let i=n.modelMatrix,o=this._position;if(l(this._clampedPosition)&&(o=this._clampedPosition,e.mode!==ie.SCENE3D)){let a=e.mapProjection,s=a.ellipsoid,c=a.unproject(o,Xj);o=s.cartographicToCartesian(c,age),i=M.IDENTITY}return wi._computeScreenSpacePosition(i,o,this._eyeOffset,qj,e,t)};wi.getScreenSpaceBoundingBox=function(e,t,n){let i=e.width,o=e.height,r=e.scale;i*=r,o*=r;let a=t.x;e.horizontalOrigin===Oi.RIGHT?a-=i:e.horizontalOrigin===Oi.CENTER&&(a-=i*.5);let s=t.y;return e.verticalOrigin===zn.BOTTOM||e.verticalOrigin===zn.BASELINE?s-=o:e.verticalOrigin===zn.CENTER&&(s-=o*.5),l(n)||(n=new Je),n.x=a,n.y=s,n.width=i,n.height=o,n};wi.prototype.equals=function(e){return this===e||l(e)&&this._id===e._id&&h.equals(this._position,e._position)&&this.image===e.image&&this._show===e._show&&this._scale===e._scale&&this._verticalOrigin===e._verticalOrigin&&this._horizontalOrigin===e._horizontalOrigin&&this._heightReference===e._heightReference&&V.equals(this._color,e._color)&&z.equals(this._pixelOffset,e._pixelOffset)&&z.equals(this._translate,e._translate)&&h.equals(this._eyeOffset,e._eyeOffset)&&zt.equals(this._scaleByDistance,e._scaleByDistance)&&zt.equals(this._translucencyByDistance,e._translucencyByDistance)&&zt.equals(this._pixelOffsetScaleByDistance,e._pixelOffsetScaleByDistance)&&kt.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance&&this._splitDirection===e._splitDirection};wi.prototype._destroy=function(){l(this._customData)&&(this._billboardCollection._scene.globe._surface.removeTileCustomData(this._customData),this._customData=void 0),l(this._removeCallbackFunc)&&(this._removeCallbackFunc(),this._removeCallbackFunc=void 0),this.image=void 0,this._pickId=this._pickId&&this._pickId.destroy(),this._billboardCollection=void 0};var So=wi;var sge={OPAQUE:0,TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2};Object.freeze(sge);var Di=sge;var Ytt={FONT_SIZE:48,PADDING:10,RADIUS:8,CUTOFF:.25},ks=Object.freeze(Ytt);var Xtt=So.SHOW_INDEX,xN=So.POSITION_INDEX,lge=So.PIXEL_OFFSET_INDEX,uge=So.EYE_OFFSET_INDEX,Ktt=So.HORIZONTAL_ORIGIN_INDEX,Qtt=So.VERTICAL_ORIGIN_INDEX,$tt=So.SCALE_INDEX,Fb=So.IMAGE_INDEX_INDEX,fge=So.COLOR_INDEX,Jtt=So.ROTATION_INDEX,Ztt=So.ALIGNED_AXIS_INDEX,dge=So.SCALE_BY_DISTANCE_INDEX,hge=So.TRANSLUCENCY_BY_DISTANCE_INDEX,mge=So.PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX,pge=So.DISTANCE_DISPLAY_CONDITION,ent=So.DISABLE_DEPTH_DISTANCE,tnt=So.TEXTURE_COORDINATE_BOUNDS,gge=So.SDF_INDEX,_ge=So.SPLIT_DIRECTION_INDEX,JK=So.NUMBER_OF_PROPERTIES,Ro={direction:0,positionHighAndScale:1,positionLowAndRotation:2,compressedAttribute0:3,compressedAttribute1:4,compressedAttribute2:5,eyeOffset:6,scaleByDistance:7,pixelOffsetScaleByDistance:8,compressedAttribute3:9,textureCoordinateBoundsOrLabelTranslate:10,a_batchId:11,sdf:12,splitDirection:13};function Fd(e){e=e??G.EMPTY_OBJECT,this._scene=e.scene,this._batchTable=e.batchTable;let t=e.textureAtlas;l(t)||(t=new Ox),this._textureAtlas=t,this._textureAtlasGUID=t.guid,this._destroyTextureAtlas=!0,this._billboardTextureCache=new Map,this._sp=void 0,this._spTranslucent=void 0,this._rsOpaque=void 0,this._rsTranslucent=void 0,this._vaf=void 0,this._billboards=[],this._billboardsToUpdate=[],this._billboardsToUpdateIndex=0,this._billboardsRemoved=!1,this._createVertexArray=!1,this._shaderRotation=!1,this._compiledShaderRotation=!1,this._shaderAlignedAxis=!1,this._compiledShaderAlignedAxis=!1,this._shaderScaleByDistance=!1,this._compiledShaderScaleByDistance=!1,this._shaderTranslucencyByDistance=!1,this._compiledShaderTranslucencyByDistance=!1,this._shaderPixelOffsetScaleByDistance=!1,this._compiledShaderPixelOffsetScaleByDistance=!1,this._shaderDistanceDisplayCondition=!1,this._compiledShaderDistanceDisplayCondition=!1,this._shaderDisableDepthDistance=!1,this._compiledShaderDisableDepthDistance=!1,this._shaderClampToGround=!1,this._compiledShaderClampToGround=!1,this._propertiesChanged=new Uint32Array(JK),this._maxSize=0,this._maxEyeOffset=0,this._maxScale=1,this._maxPixelOffset=0,this._allHorizontalCenter=!0,this._allVerticalCenter=!0,this._allSizedInMeters=!0,this._baseVolume=new ce,this._baseVolumeWC=new ce,this._baseVolume2D=new ce,this._boundingVolume=new ce,this._boundingVolumeDirty=!1,this._colorCommands=[],this._allBillboardsReady=!1,this.show=e.show??!0,this.modelMatrix=M.clone(e.modelMatrix??M.IDENTITY),this._modelMatrix=M.clone(M.IDENTITY),this.debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this.debugShowTextureAtlas=e.debugShowTextureAtlas??!1,this.blendOption=e.blendOption??Di.OPAQUE_AND_TRANSLUCENT,this._blendOption=void 0,this._mode=ie.SCENE3D,this._buffersUsage=[Oe.STATIC_DRAW,Oe.STATIC_DRAW,Oe.STATIC_DRAW,Oe.STATIC_DRAW,Oe.STATIC_DRAW,Oe.STATIC_DRAW,Oe.STATIC_DRAW,Oe.STATIC_DRAW,Oe.STATIC_DRAW,Oe.STATIC_DRAW,Oe.STATIC_DRAW,Oe.STATIC_DRAW,Oe.STATIC_DRAW,Oe.STATIC_DRAW,Oe.STATIC_DRAW,Oe.STATIC_DRAW,Oe.STATIC_DRAW],this._highlightColor=V.clone(V.WHITE),this._coarseDepthTestDistance=e.coarseDepthTestDistance??te.default.minimumRadius/10,this._threePointDepthTestDistance=e.threePointDepthTestDistance??te.default.minimumRadius/1e3,this._uniforms={u_atlas:()=>this.textureAtlas.texture,u_highlightColor:()=>this._highlightColor,u_coarseDepthTestDistance:()=>this._coarseDepthTestDistance,u_threePointDepthTestDistance:()=>this._threePointDepthTestDistance};let n=this._scene;l(n)&&l(n.terrainProviderChanged)&&(this._removeCallbackFunc=n.terrainProviderChanged.addEventListener(function(){let i=this._billboards,o=i.length;for(let r=0;r<o;++r)l(i[r])&&i[r]._updateClamping()},this))}Object.defineProperties(Fd.prototype,{length:{get:function(){return ZK(this),this._billboards.length}},textureAtlas:{get:function(){return this._textureAtlas},set:function(e){this._textureAtlas!==e&&(this._textureAtlas=this._destroyTextureAtlas&&this._textureAtlas&&this._textureAtlas.destroy(),this._textureAtlas=e)}},destroyTextureAtlas:{get:function(){return this._destroyTextureAtlas},set:function(e){this._destroyTextureAtlas=e}},sizeInBytes:{get:function(){return this._textureAtlas.sizeInBytes}},ready:{get:function(){return this._allBillboardsReady}},billboardTextureCache:{get:function(){return this._billboardTextureCache}},coarseDepthTestDistance:{get:function(){return this._coarseDepthTestDistance},set:function(e){this._coarseDepthTestDistance=e}},threePointDepthTestDistance:{get:function(){return this._threePointDepthTestDistance},set:function(e){this._threePointDepthTestDistance=e}}});function Age(e){let t=e.length;for(let n=0;n<t;++n)e[n]&&e[n]._destroy()}Fd.prototype.add=function(e){let t=new So(e,this);return t._index=this._billboards.length,this._billboards.push(t),this._createVertexArray=!0,t};Fd.prototype.remove=function(e){return this.contains(e)?(this._billboards[e._index]=void 0,this._billboardsRemoved=!0,this._createVertexArray=!0,e._destroy(),!0):!1};Fd.prototype.removeAll=function(){Age(this._billboards),this._billboards=[],this._billboardsToUpdate=[],this._billboardsToUpdateIndex=0,this._billboardsRemoved=!1,this._createVertexArray=!0};function ZK(e){if(e._billboardsRemoved){e._billboardsRemoved=!1;let t=[],n=e._billboards,i=n.length;for(let o=0,r=0;o<i;++o){let a=n[o];l(a)&&(a._index=r++,t.push(a))}e._billboards=t}}Fd.prototype._updateBillboard=function(e,t){e._dirty||(this._billboardsToUpdate[this._billboardsToUpdateIndex++]=e),++this._propertiesChanged[t]};Fd.prototype.contains=function(e){return l(e)&&e._billboardCollection===this};Fd.prototype.get=function(e){return ZK(this),this._billboards[e]};function cge(e){let t=e.cache.billboardCollection_indexBufferInstanced;return l(t)||(t=Ke.createIndexBuffer({context:e,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:Oe.STATIC_DRAW,indexDatatype:Ue.UNSIGNED_SHORT}),t.vertexArrayDestroyable=!1,e.cache.billboardCollection_indexBufferInstanced=t),t}function nnt(e){let t=e.cache.billboardCollection_vertexBufferInstanced;return l(t)||(t=Ke.createVertexBuffer({context:e,typedArray:new Float32Array([0,0,1,0,1,1,0,1]),usage:Oe.STATIC_DRAW}),t.vertexArrayDestroyable=!1,e.cache.billboardCollection_vertexBufferInstanced=t),t}Fd.prototype.computeNewBuffersUsage=function(){let e=this._buffersUsage,t=!1,n=this._propertiesChanged;for(let i=0;i<JK;++i){let o=n[i]===0?Oe.STATIC_DRAW:Oe.STREAM_DRAW;t=t||e[i]!==o,e[i]=o}return t};function int(e,t,n,i,o){let r=[{index:Ro.positionHighAndScale,componentsPerAttribute:4,componentDatatype:Y.FLOAT,usage:n[xN]},{index:Ro.positionLowAndRotation,componentsPerAttribute:4,componentDatatype:Y.FLOAT,usage:n[xN]},{index:Ro.compressedAttribute0,componentsPerAttribute:4,componentDatatype:Y.FLOAT,usage:n[lge]},{index:Ro.compressedAttribute1,componentsPerAttribute:4,componentDatatype:Y.FLOAT,usage:n[hge]},{index:Ro.compressedAttribute2,componentsPerAttribute:4,componentDatatype:Y.FLOAT,usage:n[fge]},{index:Ro.eyeOffset,componentsPerAttribute:4,componentDatatype:Y.FLOAT,usage:n[uge]},{index:Ro.scaleByDistance,componentsPerAttribute:4,componentDatatype:Y.FLOAT,usage:n[dge]},{index:Ro.pixelOffsetScaleByDistance,componentsPerAttribute:4,componentDatatype:Y.FLOAT,usage:n[mge]},{index:Ro.compressedAttribute3,componentsPerAttribute:4,componentDatatype:Y.FLOAT,usage:n[pge]},{index:Ro.textureCoordinateBoundsOrLabelTranslate,componentsPerAttribute:4,componentDatatype:Y.FLOAT,usage:n[tnt]},{index:Ro.splitDirection,componentsPerAttribute:1,componentDatatype:Y.FLOAT,usage:n[_ge]},{index:Ro.direction,componentsPerAttribute:2,componentDatatype:Y.FLOAT,vertexBuffer:nnt(e)}];return l(i)&&r.push({index:Ro.a_batchId,componentsPerAttribute:1,componentDatatype:Y.FLOAT,bufferUsage:Oe.STATIC_DRAW}),o&&r.push({index:Ro.sdf,componentsPerAttribute:2,componentDatatype:Y.FLOAT,usage:n[gge]}),new j0(e,r,t,!0)}var YK=new xn;function yge(e,t,n,i){let o=n[Ro.positionHighAndScale],r=n[Ro.positionLowAndRotation],a=i._getActualPosition();e._mode===ie.SCENE3D&&(ce.expand(e._baseVolume,a,e._baseVolume),e._boundingVolumeDirty=!0),xn.fromCartesian(a,YK);let s=i.scale,c=i.rotation;c!==0&&(e._shaderRotation=!0),e._maxScale=Math.max(e._maxScale,s);let u=YK.high,f=YK.low;o(i._index,u.x,u.y,u.z,s),r(i._index,f.x,f.y,f.z,c)}var YA=new z,Nd=32768,eQ=65536,XK=4096,kb=256,ont=128,rnt=32,ant=8,Kj=4,snt=1/256,xge=new Je;function bge(e,t,n,i){let o=n[Ro.compressedAttribute0],r=i.pixelOffset,a=r.x,s=r.y,c=i._translate,u=c.x,f=c.y;e._maxPixelOffset=Math.max(e._maxPixelOffset,Math.abs(a+u),Math.abs(-s+f));let d=i.horizontalOrigin,p=i._verticalOrigin,g=i.show&&i.clusterShow;i.color.alpha===0&&(g=!1),p===zn.BASELINE&&(p=zn.BOTTOM),e._allHorizontalCenter=e._allHorizontalCenter&&d===Oi.CENTER,e._allVerticalCenter=e._allVerticalCenter&&p===zn.CENTER;let m=0,A=0;if(i.ready){let P=i.computeTextureCoordinates(xge);m=P.x,A=P.y}let y=Math.floor(D.clamp(a,-Nd,Nd)+Nd)*ont;y+=(d+1)*rnt,y+=(p+1)*ant,y+=(g?1:0)*Kj;let x=Math.floor(D.clamp(s,-Nd,Nd)+Nd)*kb,b=Math.floor(D.clamp(u*Kj,-Nd,Nd)+Nd)*kb,C=(D.clamp(f*Kj,-Nd,Nd)+Nd)*snt,E=Math.floor(C),S=Math.floor((C-E)*kb);x+=E,b+=S,YA.x=m,YA.y=A;let w=nn.compressTextureCoordinates(YA);o(i._index,y,x,b,w)}function Cge(e,t,n,i){let o=n[Ro.compressedAttribute1],r=i.alignedAxis;h.equals(r,h.ZERO)||(e._shaderAlignedAxis=!0);let a=0,s=1,c=1,u=1,f=i.translucencyByDistance;l(f)&&(a=f.near,s=f.nearValue,c=f.far,u=f.farValue,(s!==1||u!==1)&&(e._shaderTranslucencyByDistance=!0));let d=Math.round(i.width??0);e._maxSize=Math.max(e._maxSize,d);let p=D.clamp(d,0,eQ),g=0;Math.abs(h.magnitudeSquared(r)-1)<D.EPSILON6&&(g=nn.octEncodeFloat(r)),s=D.clamp(s,0,1),s=s===1?255:s*255|0,p=p*kb+s,u=D.clamp(u,0,1),u=u===1?255:u*255|0,g=g*kb+u,o(i._index,p,g,a,c)}function QK(e,t,n,i){let o=n[Ro.compressedAttribute2],r=i.color,a=l(e._batchTable)?V.WHITE:i.getPickId(t.context).color,s=i.sizeInMeters?1:0,c=Math.abs(h.magnitudeSquared(i.alignedAxis)-1)<D.EPSILON6?1:0;e._allSizedInMeters=e._allSizedInMeters&&s===1;let u=i.height??0;e._maxSize=Math.max(e._maxSize,u);let f=i._labelHorizontalOrigin??-2;f+=2;let d=nn.encodeRGB8(r),p=nn.encodeRGB8(a),g=V.floatToByte(r.alpha)*eQ+V.floatToByte(a.alpha)*kb+(s*2+c),m=u*Kj+f;o(i._index,d,p,g,m)}function $K(e,t,n,i){let o=n[Ro.eyeOffset],r=i.eyeOffset,a=r.z;if(i._heightReference!==nt.NONE&&(a*=1.005),e._maxEyeOffset=Math.max(e._maxEyeOffset,Math.abs(r.x),Math.abs(r.y),Math.abs(a)),YA.x=0,YA.y=0,i.ready){let c=i.computeTextureCoordinates(xge);YA.x=c.width,YA.y=c.height}let s=nn.compressTextureCoordinates(YA);o(i._index,r.x,r.y,a,s)}function Tge(e,t,n,i){let o=n[Ro.scaleByDistance],r=0,a=1,s=1,c=1,u=i.scaleByDistance;l(u)&&(r=u.near,a=u.nearValue,s=u.far,c=u.farValue,(a!==1||c!==1)&&(e._shaderScaleByDistance=!0)),o(i._index,r,a,s,c)}function Ege(e,t,n,i){let o=n[Ro.pixelOffsetScaleByDistance],r=0,a=1,s=1,c=1,u=i.pixelOffsetScaleByDistance;l(u)&&(r=u.near,a=u.nearValue,s=u.far,c=u.farValue,(a!==1||c!==1)&&(e._shaderPixelOffsetScaleByDistance=!0)),o(i._index,r,a,s,c)}function vge(e,t,n,i){let o=n[Ro.compressedAttribute3],r=0,a=Number.MAX_VALUE,s=i.distanceDisplayCondition;l(s)&&(r=s.near,a=s.far,r*=r,a*=a,e._shaderDistanceDisplayCondition=!0);let c=i.disableDepthTestDistance,u=bd(i.heightReference)&&t.context.depthTexture;c*=c,(u||c>0)&&(e._shaderDisableDepthDistance=!0,c===Number.POSITIVE_INFINITY&&(c=-1));let f,d;l(i._labelDimensions)?(d=i._labelDimensions.x,f=i._labelDimensions.y):(d=i.width??0,f=i.height??0);let p=Math.floor(D.clamp(d,0,XK)),g=Math.floor(D.clamp(f,0,XK)),m=p*XK+g;o(i._index,r,a,c,m)}function Sge(e,t,n,i){if(bd(i.heightReference)){let s=e._scene,c=t.context,u=t.globeTranslucencyState.translucent,f=l(s.globe)&&s.globe.depthTestAgainstTerrain;e._shaderClampToGround=c.depthTexture&&!u&&f}let o=n[Ro.textureCoordinateBoundsOrLabelTranslate],r=0,a=0;l(i._labelTranslate)&&(r=i._labelTranslate.x,a=i._labelTranslate.y),o(i._index,r,a,0,0)}function cnt(e,t,n,i){if(!l(e._batchTable))return;let o=n[Ro.a_batchId],r=i._batchIndex;o(i._index,r)}function wge(e,t,n,i){if(!e._sdf)return;let o=n[Ro.sdf],r=i.outlineColor,a=i.outlineWidth,s=nn.encodeRGB8(r),c=a/ks.RADIUS,u=V.floatToByte(r.alpha)*eQ+V.floatToByte(c)*kb;o(i._index,s,u)}function Ige(e,t,n,i){let o=n[Ro.splitDirection],r=0,a=i.splitDirection;l(a)&&(r=a),o(i._index,r)}function lnt(e,t,n,i){yge(e,t,n,i),bge(e,t,n,i),Cge(e,t,n,i),QK(e,t,n,i),$K(e,t,n,i),Tge(e,t,n,i),Ege(e,t,n,i),vge(e,t,n,i),Sge(e,t,n,i),cnt(e,t,n,i),wge(e,t,n,i),Ige(e,t,n,i)}function KK(e,t,n,i,o,r){let a;i.mode===ie.SCENE3D?(a=e._baseVolume,e._boundingVolumeDirty=!0):a=e._baseVolume2D;let s=[];for(let c=0;c<n;++c){let u=t[c],f=u.position,d=So._computeActualPosition(u,f,i,o);l(d)&&(u._setActualPosition(d),r?s.push(d):ce.expand(a,d,a))}r&&ce.fromPoints(s,a)}function unt(e,t){let n=t.mode,i=e._billboards,o=e._billboardsToUpdate,r=e._modelMatrix;e._createVertexArray||e._mode!==n||n!==ie.SCENE3D&&!M.equals(r,e.modelMatrix)?(e._mode=n,M.clone(e.modelMatrix,r),e._createVertexArray=!0,(n===ie.SCENE3D||n===ie.SCENE2D||n===ie.COLUMBUS_VIEW)&&KK(e,i,i.length,t,r,!0)):n===ie.MORPHING?KK(e,i,i.length,t,r,!0):(n===ie.SCENE2D||n===ie.COLUMBUS_VIEW)&&KK(e,o,e._billboardsToUpdateIndex,t,r,!1)}function fnt(e,t,n){let i=1;(!e._allSizedInMeters||e._maxPixelOffset!==0)&&(i=t.camera.getPixelSize(n,t.context.drawingBufferWidth,t.context.drawingBufferHeight));let o=i*e._maxScale*e._maxSize*2;e._allHorizontalCenter&&e._allVerticalCenter&&(o*=.5);let r=i*e._maxPixelOffset+e._maxEyeOffset;n.radius+=o+r}function dnt(e,t){let i=t.createViewportQuadCommand(`uniform sampler2D billboard_texture;
- in vec2 v_textureCoordinates;
- void main()
- {
- out_FragColor = texture(billboard_texture, v_textureCoordinates);
- }
- `,{uniformMap:{billboard_texture:function(){return e.textureAtlas.texture}}});return i.pass=Ie.OVERLAY,i}var hnt=[];Fd.prototype.update=function(e){if(ZK(this),!this.show)return;let t=e.context;if(!t.instancedArrays||!(Rt.maximumVertexTextureImageUnits>0))throw new _e("Beginning in CesiumJS 1.140, billboards and labels require device support for WebGL 2, or WebGL 1 with ANGLE_instanced_arrays and MAX_VERTEX_TEXTURE_IMAGE_UNITS > 0. For more information or to share feedback, see: https://github.com/CesiumGS/cesium/issues/13053");let n=this._billboards,i=n.length,o=!0;for(let P=0;P<i;++P){let R=n[P];l(R.loadError)&&(console.error(`Error loading image for billboard: ${R.loadError}`),R.image=void 0),R.textureDirty&&this._updateBillboard(R,Fb),R.show&&(o=o&&R.ready)}let r=this._textureAtlas;if(e.afterRender.push(()=>{if(!this.isDestroyed())return r.update(e.context)}),!l(r.texture))return;unt(this,e),n=this._billboards,i=n.length;let a=this._billboardsToUpdate,s=this._billboardsToUpdateIndex,c=this._propertiesChanged,u=r.guid,f=this._createVertexArray||this._textureAtlasGUID!==u;this._textureAtlasGUID=u;let d,p=e.passes,g=p.pick;if(f||!g&&this.computeNewBuffersUsage()){this._createVertexArray=!1;for(let P=0;P<JK;++P)c[P]=0;if(this._vaf=this._vaf&&this._vaf.destroy(),i>0){this._vaf=int(t,i,this._buffersUsage,this._batchTable,this._sdf),d=this._vaf.writers;for(let P=0;P<i;++P){let R=this._billboards[P];R._dirty=!1,R.textureDirty=!1,lnt(this,e,d,R)}this._vaf.commit(cge(t))}this._billboardsToUpdateIndex=0}else if(s>0){let P=hnt;P.length=0,(c[xN]||c[Jtt]||c[$tt])&&P.push(yge),(c[Fb]||c[lge]||c[Ktt]||c[Qtt]||c[Xtt])&&(P.push(bge),P.push($K)),(c[Fb]||c[Ztt]||c[hge])&&(P.push(Cge),P.push(QK)),(c[Fb]||c[fge])&&P.push(QK),(c[Fb]||c[uge])&&P.push($K),c[dge]&&P.push(Tge),c[mge]&&P.push(Ege),(c[pge]||c[ent]||c[Fb]||c[xN])&&P.push(vge),(c[Fb]||c[xN])&&P.push(Sge),c[gge]&&P.push(wge),c[_ge]&&P.push(Ige);let R=P.length;if(d=this._vaf.writers,s/i>.1){for(let B=0;B<s;++B){let L=a[B];L._dirty=!1,L.textureDirty=!1;for(let _=0;_<R;++_)P[_](this,e,d,L)}this._vaf.commit(cge(t))}else{for(let B=0;B<s;++B){let L=a[B];L._dirty=!1,L.textureDirty=!1;for(let _=0;_<R;++_)P[_](this,e,d,L);this._vaf.subCommit(L._index,1)}this._vaf.endSubCommits()}this._billboardsToUpdateIndex=0}if(s>i*1.5&&(a.length=i),!l(this._vaf)||!l(this._vaf.va))return;this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,ce.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));let m,A=M.IDENTITY;e.mode===ie.SCENE3D?(A=this.modelMatrix,m=ce.clone(this._baseVolumeWC,this._boundingVolume)):m=ce.clone(this._baseVolume2D,this._boundingVolume),fnt(this,e,m);let y=this._blendOption!==this.blendOption;if(this._blendOption=this.blendOption,y){this._blendOption===Di.OPAQUE||this._blendOption===Di.OPAQUE_AND_TRANSLUCENT?this._rsOpaque=Ve.fromCache({depthTest:{enabled:!0,func:ee.LESS},depthMask:!0}):this._rsOpaque=void 0;let P=this._blendOption===Di.TRANSLUCENT;this._blendOption===Di.TRANSLUCENT||this._blendOption===Di.OPAQUE_AND_TRANSLUCENT?this._rsTranslucent=Ve.fromCache({depthTest:{enabled:!0,func:P?ee.LEQUAL:ee.LESS},depthMask:P,blending:Jt.ALPHA_BLEND}):this._rsTranslucent=void 0}this._shaderDisableDepthDistance=this._shaderDisableDepthDistance||e.minimumDisableDepthTestDistance!==0;let x,b,C,E,S;if(y||this._shaderRotation!==this._compiledShaderRotation||this._shaderAlignedAxis!==this._compiledShaderAlignedAxis||this._shaderScaleByDistance!==this._compiledShaderScaleByDistance||this._shaderTranslucencyByDistance!==this._compiledShaderTranslucencyByDistance||this._shaderPixelOffsetScaleByDistance!==this._compiledShaderPixelOffsetScaleByDistance||this._shaderDistanceDisplayCondition!==this._compiledShaderDistanceDisplayCondition||this._shaderDisableDepthDistance!==this._compiledShaderDisableDepthDistance||this._shaderClampToGround!==this._compiledShaderClampToGround||this._sdf!==this._compiledSDF){x=yN,b=AN,S=["INSTANCED"],l(this._batchTable)&&(S.push("VECTOR_TILE"),x=this._batchTable.getVertexShaderCallback(!1,"a_batchId",void 0)(x),b=this._batchTable.getFragmentShaderCallback(!1,void 0)(b)),C=new He({defines:S,sources:[x]}),this._shaderRotation&&C.defines.push("ROTATION"),this._shaderAlignedAxis&&C.defines.push("ALIGNED_AXIS"),this._shaderScaleByDistance&&C.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&C.defines.push("EYE_DISTANCE_TRANSLUCENCY"),this._shaderPixelOffsetScaleByDistance&&C.defines.push("EYE_DISTANCE_PIXEL_OFFSET"),this._shaderDistanceDisplayCondition&&C.defines.push("DISTANCE_DISPLAY_CONDITION"),this._shaderDisableDepthDistance&&C.defines.push("DISABLE_DEPTH_DISTANCE"),this._shaderClampToGround&&C.defines.push("VS_THREE_POINT_DEPTH_CHECK");let P=1-ks.CUTOFF;this._sdf&&C.defines.push("SDF");let R=l(this._batchTable)?"VECTOR_TILE":"";this._blendOption===Di.OPAQUE_AND_TRANSLUCENT&&(E=new He({defines:["OPAQUE",R],sources:[b]}),this._shaderClampToGround&&E.defines.push("VS_THREE_POINT_DEPTH_CHECK"),this._sdf&&(E.defines.push("SDF"),E.defines.push(`SDF_EDGE ${P}`)),this._sp=Kt.replaceCache({context:t,shaderProgram:this._sp,vertexShaderSource:C,fragmentShaderSource:E,attributeLocations:Ro}),E=new He({defines:["TRANSLUCENT",R],sources:[b]}),this._shaderClampToGround&&E.defines.push("VS_THREE_POINT_DEPTH_CHECK"),this._sdf&&(E.defines.push("SDF"),E.defines.push(`SDF_EDGE ${P}`)),this._spTranslucent=Kt.replaceCache({context:t,shaderProgram:this._spTranslucent,vertexShaderSource:C,fragmentShaderSource:E,attributeLocations:Ro})),this._blendOption===Di.OPAQUE&&(E=new He({defines:[R],sources:[b]}),this._shaderClampToGround&&E.defines.push("VS_THREE_POINT_DEPTH_CHECK"),this._sdf&&(E.defines.push("SDF"),E.defines.push(`SDF_EDGE ${P}`)),this._sp=Kt.replaceCache({context:t,shaderProgram:this._sp,vertexShaderSource:C,fragmentShaderSource:E,attributeLocations:Ro})),this._blendOption===Di.TRANSLUCENT&&(E=new He({defines:[R],sources:[b]}),this._shaderClampToGround&&E.defines.push("VS_THREE_POINT_DEPTH_CHECK"),this._sdf&&(E.defines.push("SDF"),E.defines.push(`SDF_EDGE ${P}`)),this._spTranslucent=Kt.replaceCache({context:t,shaderProgram:this._spTranslucent,vertexShaderSource:C,fragmentShaderSource:E,attributeLocations:Ro})),this._compiledShaderRotation=this._shaderRotation,this._compiledShaderAlignedAxis=this._shaderAlignedAxis,this._compiledShaderScaleByDistance=this._shaderScaleByDistance,this._compiledShaderTranslucencyByDistance=this._shaderTranslucencyByDistance,this._compiledShaderPixelOffsetScaleByDistance=this._shaderPixelOffsetScaleByDistance,this._compiledShaderDistanceDisplayCondition=this._shaderDistanceDisplayCondition,this._compiledShaderDisableDepthDistance=this._shaderDisableDepthDistance,this._compiledShaderClampToGround=this._shaderClampToGround,this._compiledSDF=this._sdf}let w=e.commandList;if(p.render||p.pick){let P=this._colorCommands,R=this._blendOption===Di.OPAQUE,B=this._blendOption===Di.OPAQUE_AND_TRANSLUCENT,L=this._vaf.va,_=L.length,T=this._uniforms,v;l(this._batchTable)?(T=this._batchTable.getUniformMapCallback()(T),v=this._batchTable.getPickId()):v="v_pickColor",P.length=_;let I=B?_*2:_;for(let O=0;O<I;++O){let N=P[O];l(N)||(N=P[O]=new tt);let j=R||B&&O%2===0;N.pass=j||!B?Ie.OPAQUE:Ie.TRANSLUCENT,N.owner=this;let k=B?Math.floor(O/2):O;N.boundingVolume=m,N.modelMatrix=A,N.count=L[k].indicesCount,N.shaderProgram=j?this._sp:this._spTranslucent,N.uniformMap=T,N.vertexArray=L[k].va,N.renderState=j?this._rsOpaque:this._rsTranslucent,N.debugShowBoundingVolume=this.debugShowBoundingVolume,N.pickId=v,N.count=6,N.instanceCount=i,w.push(N)}this.debugShowTextureAtlas&&(l(this.debugCommand)||(this.debugCommand=dnt(this,e.context)),w.push(this.debugCommand))}this._allBillboardsReady=o};Fd.prototype.isDestroyed=function(){return!1};Fd.prototype.destroy=function(){return l(this._removeCallbackFunc)&&(this._removeCallbackFunc(),this._removeCallbackFunc=void 0),this._textureAtlas=this._destroyTextureAtlas&&this._textureAtlas&&this._textureAtlas.destroy(),this._sp=this._sp&&this._sp.destroy(),this._spTranslucent=this._spTranslucent&&this._spTranslucent.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),Age(this._billboards),fe(this)};var Df=Fd;function mnt(e,t,n,i,o){return function(){let r=document.createElement("canvas"),a=o+2*i;r.height=r.width=a;let s=r.getContext("2d");return s.clearRect(0,0,a,a),i!==0&&(s.beginPath(),s.arc(a/2,a/2,a/2,0,2*Math.PI,!0),s.closePath(),s.fillStyle=n,s.fill(),e<1&&(s.save(),s.globalCompositeOperation="destination-out",s.beginPath(),s.arc(a/2,a/2,o/2,0,2*Math.PI,!0),s.closePath(),s.fillStyle="black",s.fill(),s.restore())),s.beginPath(),s.arc(a/2,a/2,o/2,0,2*Math.PI,!0),s.closePath(),s.fillStyle=t,s.fill(),r}}var zb=mnt;var pnt=new de,sm=class{constructor(t,n,i,o,r){this._content=t,this._billboard=i,this._label=o,this._polyline=r,this._batchId=n,this._billboardImage=void 0,this._billboardColor=void 0,this._billboardOutlineColor=void 0,this._billboardOutlineWidth=void 0,this._billboardSize=void 0,this._pointSize=void 0,this._color=void 0,this._pointSize=void 0,this._pointOutlineColor=void 0,this._pointOutlineWidth=void 0,this._heightOffset=void 0,this._pickIds=new Array(3),cS(this)}get show(){return this._label.show}set show(t){this._label.show=t,this._billboard.show=t,this._polyline.show=t}get color(){return this._color}set color(t){this._color=V.clone(t,this._color),cS(this)}get pointSize(){return this._pointSize}set pointSize(t){this._pointSize=t,cS(this)}get pointOutlineColor(){return this._pointOutlineColor}set pointOutlineColor(t){this._pointOutlineColor=V.clone(t,this._pointOutlineColor),cS(this)}get pointOutlineWidth(){return this._pointOutlineWidth}set pointOutlineWidth(t){this._pointOutlineWidth=t,cS(this)}get labelColor(){return this._label.fillColor}set labelColor(t){this._label.fillColor=t,this._polyline.show=this._label.show&&t.alpha>0}get labelOutlineColor(){return this._label.outlineColor}set labelOutlineColor(t){this._label.outlineColor=t}get labelOutlineWidth(){return this._label.outlineWidth}set labelOutlineWidth(t){this._label.outlineWidth=t}get font(){return this._label.font}set font(t){this._label.font=t}get labelStyle(){return this._label.style}set labelStyle(t){this._label.style=t}get labelText(){return this._label.text}set labelText(t){l(t)||(t=""),this._label.text=t}get backgroundColor(){return this._label.backgroundColor}set backgroundColor(t){this._label.backgroundColor=t}get backgroundPadding(){return this._label.backgroundPadding}set backgroundPadding(t){this._label.backgroundPadding=t}get backgroundEnabled(){return this._label.showBackground}set backgroundEnabled(t){this._label.showBackground=t}get scaleByDistance(){return this._label.scaleByDistance}set scaleByDistance(t){this._label.scaleByDistance=t,this._billboard.scaleByDistance=t}get translucencyByDistance(){return this._label.translucencyByDistance}set translucencyByDistance(t){this._label.translucencyByDistance=t,this._billboard.translucencyByDistance=t}get distanceDisplayCondition(){return this._label.distanceDisplayCondition}set distanceDisplayCondition(t){this._label.distanceDisplayCondition=t,this._polyline.distanceDisplayCondition=t,this._billboard.distanceDisplayCondition=t}get heightOffset(){return this._heightOffset}set heightOffset(t){let n=this._heightOffset??0,i=this._content.tileset.ellipsoid,o=i.cartesianToCartographic(this._billboard.position,pnt);o.height=o.height-n+t;let r=i.cartographicToCartesian(o);this._billboard.position=r,this._label.position=this._billboard.position,this._polyline.positions=[this._polyline.positions[0],r],this._heightOffset=t}get anchorLineEnabled(){return this._polyline.show}set anchorLineEnabled(t){this._polyline.show=t}get anchorLineColor(){return this._polyline.material.uniforms.color}set anchorLineColor(t){this._polyline.material.uniforms.color=V.clone(t,this._polyline.material.uniforms.color)}get image(){return this._billboardImage}set image(t){let n=this._billboardImage!==t;this._billboardImage=t,n&&cS(this)}get disableDepthTestDistance(){return this._label.disableDepthTestDistance}set disableDepthTestDistance(t){this._label.disableDepthTestDistance=t,this._billboard.disableDepthTestDistance=t}get horizontalOrigin(){return this._billboard.horizontalOrigin}set horizontalOrigin(t){this._billboard.horizontalOrigin=t}get verticalOrigin(){return this._billboard.verticalOrigin}set verticalOrigin(t){this._billboard.verticalOrigin=t}get labelHorizontalOrigin(){return this._label.horizontalOrigin}set labelHorizontalOrigin(t){this._label.horizontalOrigin=t}get labelVerticalOrigin(){return this._label.verticalOrigin}set labelVerticalOrigin(t){this._label.verticalOrigin=t}get content(){return this._content}get tileset(){return this._content.tileset}get primitive(){return this._content.tileset}get pickIds(){let t=this._pickIds;return t[0]=this._billboard.pickId,t[1]=this._label.pickId,t[2]=this._polyline.pickId,t}hasProperty(t){return this._content.batchTable.hasProperty(this._batchId,t)}getPropertyIds(t){return this._content.batchTable.getPropertyIds(this._batchId,t)}getProperty(t){return this._content.batchTable.getProperty(this._batchId,t)}getPropertyInherited(t){return Qa.getPropertyInherited(this._content,this._batchId,t)}setProperty(t,n){this._content.batchTable.setProperty(this._batchId,t,n),this._content.featurePropertiesDirty=!0}isExactClass(t){return this._content.batchTable.isExactClass(this._batchId,t)}isClass(t){return this._content.batchTable.isClass(this._batchId,t)}getExactClassName(){return this._content.batchTable.getExactClassName(this._batchId)}};lt(sm,"defaultColor",V.WHITE),lt(sm,"defaultPointOutlineColor",V.BLACK),lt(sm,"defaultPointOutlineWidth",0),lt(sm,"defaultPointSize",8);function cS(e){let t=e._billboard;if(l(e._billboardImage)&&e._billboardImage!==t.image){t.image=e._billboardImage;return}if(l(e._billboardImage))return;let n=e._color??sm.defaultColor,i=e._pointOutlineColor??sm.defaultPointOutlineColor,o=e._pointOutlineWidth??sm.defaultPointOutlineWidth,r=e._pointSize??sm.defaultPointSize,a=e._billboardColor,s=e._billboardOutlineColor,c=e._billboardOutlineWidth,u=e._billboardSize;if(V.equals(n,a)&&V.equals(i,s)&&o===c&&r===u)return;e._billboardColor=V.clone(n,e._billboardColor),e._billboardOutlineColor=V.clone(i,e._billboardOutlineColor),e._billboardOutlineWidth=o,e._billboardSize=r;let f=n.alpha,d=n.toCssColorString(),p=i.toCssColorString(),g=JSON.stringify([d,r,p,o]);t.setImage(g,zb(f,d,p,o,r))}var Rg=sm;function gnt(e,t){let n=e.measureText(t);if(!/\S/.test(t))return{width:n.width,height:0,ascent:0,descent:0,minx:0};let o=Math.round(n.actualBoundingBoxAscent),r=Math.round(n.actualBoundingBoxDescent),a=Math.max(o+r,1);return{width:n.width,height:a,ascent:o,descent:r,minx:-Math.round(n.actualBoundingBoxLeft)}}var Ub;function _nt(e,t){if(e==="")return;t=t??G.EMPTY_OBJECT;let n=t.font??"10px sans-serif",i=t.stroke??!1,o=t.fill??!0,r=t.strokeWidth??1,a=t.backgroundColor??V.TRANSPARENT,s=t.padding??0,c=s*2,u=document.createElement("canvas");u.width=1,u.height=1,u.style.font=n;let f=u.getContext("2d",{willReadFrequently:!0});l(Ub)||(l(f.imageSmoothingEnabled)?Ub="imageSmoothingEnabled":l(f.mozImageSmoothingEnabled)?Ub="mozImageSmoothingEnabled":l(f.webkitImageSmoothingEnabled)?Ub="webkitImageSmoothingEnabled":l(f.msImageSmoothingEnabled)&&(Ub="msImageSmoothingEnabled")),f.font=n,f.lineJoin="round",f.lineWidth=r,f[Ub]=!1,u.style.visibility="hidden",document.body.appendChild(u);let d=gnt(f,e);u.dimensions=d,document.body.removeChild(u),u.style.visibility="";let p=!/\S/.test(e),g=i&&!p?Math.ceil(r/2):0,m=g*2,A=-d.minx+g,y=Math.ceil(d.width)+A+c+g,x=d.height+c+m,b=d.ascent+s+g;if(u.width=y,u.height=x,f.font=n,f.lineJoin="round",f.lineWidth=r,f[Ub]=!1,a!==V.TRANSPARENT&&(f.fillStyle=a.toCssColorString(),f.fillRect(0,0,u.width,u.height)),i){let C=t.strokeColor??V.BLACK;f.strokeStyle=C.toCssColorString(),f.strokeText(e,A+s,b)}if(o){let C=t.fillColor??V.WHITE;f.fillStyle=C.toCssColorString(),f.fillText(e,A+s,b)}return u}var Vb=_nt;var Vge=Yr(Oge(),1);var Mge={FILL:0,OUTLINE:1,FILL_AND_OUTLINE:2};Object.freeze(Mge);var sr=Mge;var Bge={},Lge=0,ynt=256,xnt=new V(.165,.165,.165,.8),bnt=new z(7,5),Ja=Object.freeze({LTR:0,RTL:1,WEAK:2,BRACKETS:3});function jb(e){!e._rebindAllGlyphs&&!e._repositionAllGlyphs&&e._labelCollection._labelsToUpdate.push(e),e._rebindAllGlyphs=!0}function CN(e){!e._rebindAllGlyphs&&!e._repositionAllGlyphs&&e._labelCollection._labelsToUpdate.push(e),e._repositionAllGlyphs=!0}function TN(e,t){return document.defaultView.getComputedStyle(e,null).getPropertyValue(t)}function Fge(e){let t=Bge[e._font];if(!l(t)){let n=document.createElement("div");n.style.position="absolute",n.style.opacity=0,n.style.font=e._font,document.body.appendChild(n);let i=parseFloat(TN(n,"line-height"));isNaN(i)&&(i=void 0),t={family:TN(n,"font-family"),size:TN(n,"font-size").replace("px",""),style:TN(n,"font-style"),weight:TN(n,"font-weight"),lineHeight:i},document.body.removeChild(n),Lge<ynt&&(Bge[e._font]=t,Lge++)}e._fontFamily=t.family,e._fontSize=t.size,e._fontStyle=t.style,e._fontWeight=t.weight,e._lineHeight=t.lineHeight}function cm(e,t){e=e??G.EMPTY_OBJECT;let n=e.translucencyByDistance,i=e.pixelOffsetScaleByDistance,o=e.scaleByDistance,r=e.distanceDisplayCondition;l(n)&&(n=zt.clone(n)),l(i)&&(i=zt.clone(i)),l(o)&&(o=zt.clone(o)),l(r)&&(r=kt.clone(r)),this._renderedText=void 0,this._text=void 0,this._show=e.show??!0,this._font=e.font??"30px sans-serif",this._fillColor=V.clone(e.fillColor??V.WHITE),this._outlineColor=V.clone(e.outlineColor??V.BLACK),this._outlineWidth=e.outlineWidth??1,this._showBackground=e.showBackground??!1,this._backgroundColor=V.clone(e.backgroundColor??xnt),this._backgroundPadding=z.clone(e.backgroundPadding??bnt),this._style=e.style??sr.FILL,this._verticalOrigin=e.verticalOrigin??zn.BASELINE,this._horizontalOrigin=e.horizontalOrigin??Oi.LEFT,this._pixelOffset=z.clone(e.pixelOffset??z.ZERO),this._eyeOffset=h.clone(e.eyeOffset??h.ZERO),this._position=h.clone(e.position??h.ZERO),this._scale=e.scale??1,this._id=e.id,this._translucencyByDistance=n,this._pixelOffsetScaleByDistance=i,this._scaleByDistance=o,this._heightReference=e.heightReference??nt.NONE,this._distanceDisplayCondition=r,this._disableDepthTestDistance=e.disableDepthTestDistance,this._labelCollection=t,this._glyphs=[],this._backgroundBillboard=void 0,this._batchIndex=void 0,this._rebindAllGlyphs=!0,this._repositionAllGlyphs=!0,this._actualClampedPosition=void 0,this._removeCallbackFunc=void 0,this._mode=void 0,this._clusterShow=!0,this.text=e.text??"",this._relativeSize=1,Fge(this),this._updateClamping()}Object.defineProperties(cm.prototype,{show:{get:function(){return this._show},set:function(e){if(this._show!==e){this._show=e;let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i].billboard;l(r)&&(r.show=e)}let n=this._backgroundBillboard;l(n)&&(n.show=e)}}},position:{get:function(){return this._position},set:function(e){let t=this._position;if(!h.equals(t,e)){h.clone(e,t);let n=this._glyphs;for(let o=0,r=n.length;o<r;o++){let a=n[o].billboard;l(a)&&(a.position=e)}let i=this._backgroundBillboard;l(i)&&(i.position=e),this._updateClamping()}}},heightReference:{get:function(){return this._heightReference},set:function(e){if(e!==this._heightReference){this._heightReference=e;let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i].billboard;l(r)&&(r.heightReference=e)}let n=this._backgroundBillboard;l(n)&&(n.heightReference=e),CN(this),this._updateClamping()}}},text:{get:function(){return this._text},set:function(e){if(this._text!==e){this._text=e;let t=cm.filterUnsupportedCharacters(e);this._renderedText=cm.enableRightToLeftDetection?wnt(t):t,jb(this)}}},font:{get:function(){return this._font},set:function(e){this._font!==e&&(this._font=e,jb(this),Fge(this))}},fillColor:{get:function(){return this._fillColor},set:function(e){let t=this._fillColor;V.equals(t,e)||(V.clone(e,t),jb(this))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){let t=this._outlineColor;V.equals(t,e)||(V.clone(e,t),jb(this))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){this._outlineWidth!==e&&(this._outlineWidth=e,jb(this))}},showBackground:{get:function(){return this._showBackground},set:function(e){this._showBackground!==e&&(this._showBackground=e,jb(this))}},backgroundColor:{get:function(){return this._backgroundColor},set:function(e){let t=this._backgroundColor;if(!V.equals(t,e)){V.clone(e,t);let n=this._backgroundBillboard;l(n)&&(n.color=t)}}},backgroundPadding:{get:function(){return this._backgroundPadding},set:function(e){let t=this._backgroundPadding;z.equals(t,e)||(z.clone(e,t),CN(this))}},style:{get:function(){return this._style},set:function(e){this._style!==e&&(this._style=e,jb(this))}},pixelOffset:{get:function(){return this._pixelOffset},set:function(e){let t=this._pixelOffset;if(!z.equals(t,e)){z.clone(e,t);let n=this._glyphs;for(let o=0,r=n.length;o<r;o++){let a=n[o];l(a.billboard)&&(a.billboard.pixelOffset=e)}let i=this._backgroundBillboard;l(i)&&(i.pixelOffset=e)}}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){let t=this._translucencyByDistance;if(!zt.equals(t,e)){this._translucencyByDistance=zt.clone(e,t);let n=this._glyphs;for(let o=0,r=n.length;o<r;o++){let a=n[o];l(a.billboard)&&(a.billboard.translucencyByDistance=e)}let i=this._backgroundBillboard;l(i)&&(i.translucencyByDistance=e)}}},pixelOffsetScaleByDistance:{get:function(){return this._pixelOffsetScaleByDistance},set:function(e){let t=this._pixelOffsetScaleByDistance;if(!zt.equals(t,e)){this._pixelOffsetScaleByDistance=zt.clone(e,t);let n=this._glyphs;for(let o=0,r=n.length;o<r;o++){let a=n[o];l(a.billboard)&&(a.billboard.pixelOffsetScaleByDistance=e)}let i=this._backgroundBillboard;l(i)&&(i.pixelOffsetScaleByDistance=e)}}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){let t=this._scaleByDistance;if(!zt.equals(t,e)){this._scaleByDistance=zt.clone(e,t);let n=this._glyphs;for(let o=0,r=n.length;o<r;o++){let a=n[o];l(a.billboard)&&(a.billboard.scaleByDistance=e)}let i=this._backgroundBillboard;l(i)&&(i.scaleByDistance=e)}}},eyeOffset:{get:function(){return this._eyeOffset},set:function(e){let t=this._eyeOffset;if(!h.equals(t,e)){h.clone(e,t);let n=this._glyphs;for(let o=0,r=n.length;o<r;o++){let a=n[o];l(a.billboard)&&(a.billboard.eyeOffset=e)}let i=this._backgroundBillboard;l(i)&&(i.eyeOffset=e)}}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){this._horizontalOrigin!==e&&(this._horizontalOrigin=e,CN(this))}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){if(this._verticalOrigin!==e){this._verticalOrigin=e;let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];l(r.billboard)&&(r.billboard.verticalOrigin=e)}let n=this._backgroundBillboard;l(n)&&(n.verticalOrigin=e),CN(this)}}},scale:{get:function(){return this._scale},set:function(e){if(this._scale!==e){this._scale=e;let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];l(r.billboard)&&(r.billboard.scale=e*this._relativeSize)}let n=this._backgroundBillboard;l(n)&&(n.scale=e*this._relativeSize),CN(this)}}},totalScale:{get:function(){return this._scale*this._relativeSize}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(!kt.equals(e,this._distanceDisplayCondition)){this._distanceDisplayCondition=kt.clone(e,this._distanceDisplayCondition);let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];l(r.billboard)&&(r.billboard.distanceDisplayCondition=e)}let n=this._backgroundBillboard;l(n)&&(n.distanceDisplayCondition=e)}}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){if(this._disableDepthTestDistance!==e){this._disableDepthTestDistance=e;let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];l(r.billboard)&&(r.billboard.disableDepthTestDistance=e)}let n=this._backgroundBillboard;l(n)&&(n.disableDepthTestDistance=e)}}},id:{get:function(){return this._id},set:function(e){if(this._id!==e){this._id=e;let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];l(r.billboard)&&(r.billboard.id=e)}let n=this._backgroundBillboard;l(n)&&(n.id=e)}}},pickId:{get:function(){if(!(this._glyphs.length===0||!l(this._glyphs[0].billboard)))return this._glyphs[0].billboard.pickId}},_clampedPosition:{get:function(){return this._actualClampedPosition},set:function(e){this._actualClampedPosition=h.clone(e,this._actualClampedPosition);let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];l(r.billboard)&&(r.billboard._clampedPosition=e)}let n=this._backgroundBillboard;l(n)&&(n._clampedPosition=e)}},clusterShow:{get:function(){return this._clusterShow},set:function(e){if(this._clusterShow!==e){this._clusterShow=e;let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];l(r.billboard)&&(r.billboard.clusterShow=e)}let n=this._backgroundBillboard;l(n)&&(n.clusterShow=e)}}},ready:{get:function(){if(this._rebindAllGlyphs||this._repositionAllGlyphs||l(this._backgroundBillboard)&&!this._backgroundBillboard.ready)return!1;let e=this._glyphs;for(let t=0,n=e.length;t<n;t++){let i=e[t];if(l(i.billboard)&&!i.billboard.ready)return!1}return!0}}});cm.prototype._updateClamping=function(){So._updateClamping(this._labelCollection,this)};cm.prototype.computeScreenSpacePosition=function(e,t){l(t)||(t=new z);let i=this._labelCollection.modelMatrix,o=l(this._actualClampedPosition)?this._actualClampedPosition:this._position;return So._computeScreenSpacePosition(i,o,this._eyeOffset,this._pixelOffset,e,t)};cm.getScreenSpaceBoundingBox=function(e,t,n){let i=0,o=0,r=0,a=0,s=e.totalScale,c=e._backgroundBillboard;if(l(c))i=t.x+c._translate.x,o=t.y-c._translate.y,r=c.width*s,a=c.height*s,e.verticalOrigin===zn.BOTTOM||e.verticalOrigin===zn.BASELINE?o-=a:e.verticalOrigin===zn.CENTER&&(o-=a*.5);else{i=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;let u=0,f=0,d=e._glyphs,p=d.length;for(let g=0;g<p;++g){let m=d[g],A=m.billboard;if(!l(A))continue;let y=t.x+A._translate.x,x=t.y-A._translate.y,b=m.dimensions.width*s,C=m.dimensions.height*s;e.verticalOrigin===zn.BOTTOM||e.verticalOrigin===zn.BASELINE?x-=C:e.verticalOrigin===zn.CENTER&&(x-=C*.5),e._verticalOrigin===zn.TOP?x+=ks.PADDING*s:(e._verticalOrigin===zn.BOTTOM||e._verticalOrigin===zn.BASELINE)&&(x-=ks.PADDING*s),i=Math.min(i,y),o=Math.min(o,x),u=Math.max(u,y+b),f=Math.max(f,x+C)}r=u-i,a=f-o}return l(n)||(n=new Je),n.x=i,n.y=o,n.width=r,n.height=a,n};cm.filterUnsupportedCharacters=function(e){let t=new RegExp(/[\u0000-\u0008\u000E-\u001F\u00ad\u202a-\u206f\u200b-\u200f]/,"g");return e.replace(t,"")};cm.prototype.equals=function(e){return this===e||l(e)&&this._show===e._show&&this._scale===e._scale&&this._outlineWidth===e._outlineWidth&&this._showBackground===e._showBackground&&this._style===e._style&&this._verticalOrigin===e._verticalOrigin&&this._horizontalOrigin===e._horizontalOrigin&&this._heightReference===e._heightReference&&this._renderedText===e._renderedText&&this._font===e._font&&h.equals(this._position,e._position)&&V.equals(this._fillColor,e._fillColor)&&V.equals(this._outlineColor,e._outlineColor)&&V.equals(this._backgroundColor,e._backgroundColor)&&z.equals(this._backgroundPadding,e._backgroundPadding)&&z.equals(this._pixelOffset,e._pixelOffset)&&h.equals(this._eyeOffset,e._eyeOffset)&&zt.equals(this._translucencyByDistance,e._translucencyByDistance)&&zt.equals(this._pixelOffsetScaleByDistance,e._pixelOffsetScaleByDistance)&&zt.equals(this._scaleByDistance,e._scaleByDistance)&&kt.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance&&this._id===e._id};cm.prototype.isDestroyed=function(){return!1};cm.enableRightToLeftDetection=!1;function Cnt(e,t){let n=/[a-zA-Z0-9]/,i=/[()[\]{}<>]/,o=[],r="",a=Ja.LTR,s="",c=e.length;for(let u=0;u<c;++u){let f=e.charAt(u);t.test(f)?s=Ja.RTL:n.test(f)?s=Ja.LTR:i.test(f)?s=Ja.BRACKETS:s=Ja.WEAK,u===0&&(a=s),a===s&&s!==Ja.BRACKETS?r+=f:(r!==""&&o.push({Type:a,Word:r}),a=s,r=f)}return o.push({Type:s,Word:r}),o}function Tnt(e){return e.split("").reverse().join("")}function EN(e,t,n){return e.slice(0,t)+n+e.slice(t)}function Ent(e){switch(e){case"(":return")";case")":return"(";case"[":return"]";case"]":return"[";case"{":return"}";case"}":return"{";case"<":return">";case">":return"<"}}var vnt="\u05D0-\u05EA",Snt="\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF",Nge=new RegExp(`[${vnt}${Snt}]`);function wnt(e){let t=e.split(`
- `),n="";for(let i=0;i<t.length;i++){let o=t[i],r=Nge.test(o.charAt(0)),a=Cnt(o,Nge),s=0,c="";for(let u=0;u<a.length;++u){let f=a[u],d=f.Type===Ja.BRACKETS?Ent(f.Word):Tnt(f.Word);r?f.Type===Ja.RTL?(c=d+c,s=0):f.Type===Ja.LTR?(c=EN(c,s,f.Word),s+=f.Word.length):(f.Type===Ja.WEAK||f.Type===Ja.BRACKETS)&&(f.Type===Ja.WEAK&&a[u-1].Type===Ja.BRACKETS?c=d+c:a[u-1].Type===Ja.RTL?(c=d+c,s=0):a.length>u+1?a[u+1].Type===Ja.RTL?(c=d+c,s=0):(c=EN(c,s,f.Word),s+=f.Word.length):c=EN(c,0,d)):f.Type===Ja.RTL?c=EN(c,s,d):f.Type===Ja.LTR?(c+=f.Word,s=c.length):(f.Type===Ja.WEAK||f.Type===Ja.BRACKETS)&&(u>0&&a[u-1].Type===Ja.RTL?a.length>u+1?a[u+1].Type===Ja.RTL?c=EN(c,s,d):(c+=f.Word,s=c.length):c+=f.Word:(c+=f.Word,s=c.length))}n+=c,i<t.length-1&&(n+=`
- `)}return n}var XA=cm;var jge=Yr(kge(),1);function Dnt(){this.dimensions=void 0,this.billboardTexture=void 0,this.billboard=void 0}var Pnt=1.2,zge="ID_WHITE_PIXEL",tQ=new z(4,4),Rnt=new Je(1,1,1,1);function Ont(e,t){let n=t._backgroundBillboardTexture;if(!n.hasImage){let o=document.createElement("canvas");o.width=tQ.x,o.height=tQ.y;let r=o.getContext("2d");r.fillStyle="#fff",r.fillRect(0,0,o.width,o.height),n.loadImage(zge,o),n.addImageSubRegion(zge,Rnt)}let i=e.add({collection:t});return i.setImageTexture(n),i._positionFromParent=!0,i._labelTranslate=new z,i}var Og={};function Mnt(e,t,n,i,o,r){return Og.font=t,Og.fillColor=n,Og.strokeColor=i,Og.strokeWidth=o,Og.padding=ks.PADDING,Og.fill=r===sr.FILL||r===sr.FILL_AND_OUTLINE,Og.stroke=r===sr.OUTLINE||r===sr.FILL_AND_OUTLINE,Og.backgroundColor=V.BLACK,Vb(e,Og)}function nQ(e,t){let n=t.billboard;l(n)&&(n.show=!1,n._clampedPosition=void 0,l(n._removeCallbackFunc)&&(n._removeCallbackFunc(),n._removeCallbackFunc=void 0),e._spareBillboards.push(n),t.billboard=void 0)}var Bnt=new jge.default,Lnt=/\s/;function Nnt(e,t){let n=t._renderedText,i=Bnt.splitGraphemes(n),o=i.length,r=t._glyphs,a=r.length;if(t._relativeSize=t._fontSize/ks.FONT_SIZE,o<a)for(let p=o;p<a;++p)nQ(e,r[p]);r.length=o;let s=t._backgroundBillboard,c=e._backgroundBillboardCollection;t._showBackground&&!l(s)&&(s=Ont(c,e),t._backgroundBillboard=s),Fnt(c,t,s);let u=e._glyphBillboardCollection,f=u.billboardTextureCache,d=e._textDimensionsCache;for(let p=0;p<o;++p){let g=i[p],m=t._verticalOrigin,A=JSON.stringify([g,t._fontFamily,t._fontStyle,t._fontWeight,+m]),y=d[A],x=f.get(A);if(!l(x)||!l(y)){x=new Pg(u),f.set(A,x);let S=`${t._fontStyle} ${t._fontWeight} ${ks.FONT_SIZE}px ${t._fontFamily}`,w=Mnt(g,S,V.WHITE,V.WHITE,0,sr.FILL);if(y=w.dimensions,d[A]=y,w.width>0&&w.height>0&&!Lnt.test(g)){let P=(0,Vge.default)(w,{cutoff:ks.CUTOFF,radius:ks.RADIUS}),R=w.getContext("2d"),B=w.width,L=w.height,_=R.getImageData(0,0,B,L);for(let T=0;T<B;T++)for(let v=0;v<L;v++){let I=v*B+T,O=P[I]*255,N=I*4;_.data[N+0]=O,_.data[N+1]=O,_.data[N+2]=O,_.data[N+3]=O}R.putImageData(_,0,0),x.loadImage(A,w)}}let b=r[p];if(l(b)||(b=new Dnt,b.dimensions=y,b.billboardTexture=x,r[p]=b),b.billboardTexture.id!==A&&(b.billboardTexture=x,b.dimensions=y),!x.hasImage){nQ(e,b);continue}let C=b.billboard,E=e._spareBillboards;l(C)||(E.length>0?C=E.pop():(C=u.add({collection:e}),C._labelDimensions=new z,C._labelTranslate=new z,C._positionFromParent=!0),b.billboard=C),C.setImageTexture(x),C.show=t._show,C.position=t._position,C.eyeOffset=t._eyeOffset,C.pixelOffset=t._pixelOffset,C.horizontalOrigin=Oi.LEFT,C.verticalOrigin=t._verticalOrigin,C.heightReference=t._heightReference,l(t._clampedPosition)&&(C._clampedPosition=t._clampedPosition),C.scale=t.totalScale,C.pickPrimitive=t,C.id=t._id,C.translucencyByDistance=t._translucencyByDistance,C.pixelOffsetScaleByDistance=t._pixelOffsetScaleByDistance,C.scaleByDistance=t._scaleByDistance,C.distanceDisplayCondition=t._distanceDisplayCondition,C.disableDepthTestDistance=t._disableDepthTestDistance,C._batchIndex=t._batchIndex,C.outlineColor=t.outlineColor,t.style===sr.FILL_AND_OUTLINE?(C.color=t._fillColor,C.outlineWidth=t.outlineWidth):t.style===sr.FILL?(C.color=t._fillColor,C.outlineWidth=0):t.style===sr.OUTLINE&&(C.color=V.TRANSPARENT,C.outlineWidth=t.outlineWidth)}t._repositionAllGlyphs=!0}function Fnt(e,t,n){if(!l(n))return;let i=t.show&&t._showBackground&&t._renderedText.split(`
- `).join("").length>0;if(t.show&&!i){e.remove(n),t._backgroundBillboard=n=void 0;return}n.color=t._backgroundColor,n.show=t._show,n.position=t._position,n.eyeOffset=t._eyeOffset,n.pixelOffset=t._pixelOffset,n.horizontalOrigin=Oi.LEFT,n.verticalOrigin=t._verticalOrigin,n.heightReference=t._heightReference,l(t._clampedPosition)&&(n._clampedPosition=t._clampedPosition),n.scale=t.totalScale,n.pickPrimitive=t,n.id=t._id,n.translucencyByDistance=t._translucencyByDistance,n.pixelOffsetScaleByDistance=t._pixelOffsetScaleByDistance,n.scaleByDistance=t._scaleByDistance,n.distanceDisplayCondition=t._distanceDisplayCondition,n.disableDepthTestDistance=t._disableDepthTestDistance,n.clusterShow=t.clusterShow}function Uge(e,t,n){return t===Oi.CENTER?-e/2:t===Oi.RIGHT?-(e+n.x):n.x}var Lr=new z,knt=new z;function znt(e){let t=e._glyphs,n=e._renderedText,i=0,o=0,r=[],a=Number.NEGATIVE_INFINITY,s=0,c=1,u=t.length,f=e._backgroundBillboard,d=z.clone(l(f)?e._backgroundPadding:z.ZERO,knt);d.x/=e._relativeSize,d.y/=e._relativeSize;for(let B=0;B<u;++B){if(n.charAt(B)===`
- `){r.push(i),++c,i=0;continue}let _=t[B].dimensions;l(_)&&(s=Math.max(s,_.height-_.descent),a=Math.max(a,_.descent),i+=_.width-_.minx,B<u-1&&(i+=t[B+1].dimensions.minx),o=Math.max(o,i))}r.push(i);let p=s+a,g=e.totalScale,m=e._horizontalOrigin,A=e._verticalOrigin,y=0,x=r[y],b=Uge(x,m,d),C=(l(e._lineHeight)?e._lineHeight:Pnt*e._fontSize)/e._relativeSize,E=C*(c-1),S=o,w=p+E;l(f)&&(S+=d.x*2,w+=d.y*2,f._labelHorizontalOrigin=m),Lr.x=b*g,Lr.y=0;let P=!0,R=0;for(let B=0;B<u;++B){if(n.charAt(B)===`
- `){++y,R+=C,x=r[y],b=Uge(x,m,d),Lr.x=b*g,P=!0;continue}let L=t[B],_=L.dimensions;if(l(_)&&(A===zn.TOP?(Lr.y=_.height-s-d.y,Lr.y+=ks.PADDING):A===zn.CENTER?Lr.y=(E+_.height-s)/2:A===zn.BASELINE?(Lr.y=E,Lr.y-=ks.PADDING):(Lr.y=E+a+d.y,Lr.y-=ks.PADDING),Lr.y=(Lr.y-_.descent-R)*g,P&&(Lr.x-=ks.PADDING*g,P=!1),l(L.billboard)&&(L.billboard._setTranslate(Lr),L.billboard._labelDimensions.x=S,L.billboard._labelDimensions.y=w,L.billboard._labelHorizontalOrigin=m,bd(e.heightReference)&&(L.billboard._labelTranslate=z.clone(Lr,L.billboard._labelTranslate))),B<u-1)){let T=t[B+1];Lr.x+=(_.width-_.minx+T.dimensions.minx)*g}}l(f)&&n.split(`
- `).join("").length>0&&(m===Oi.CENTER?b=-o/2-d.x:m===Oi.RIGHT?b=-(o+d.x*2):b=0,Lr.x=b*g,A===zn.TOP?Lr.y=p-s-a:A===zn.CENTER?Lr.y=(p-s)/2-a:A===zn.BASELINE?Lr.y=-d.y-a:Lr.y=0,Lr.y=Lr.y*g,f.width=S,f.height=w,f._setTranslate(Lr),f._labelTranslate=z.clone(Lr,f._labelTranslate))}function Gge(e,t){let n=t._glyphs;for(let i=0,o=n.length;i<o;++i)nQ(e,n[i]);l(t._backgroundBillboard)&&(e._backgroundBillboardCollection.remove(t._backgroundBillboard),t._backgroundBillboard=void 0),t._labelCollection=void 0,l(t._removeCallbackFunc)&&t._removeCallbackFunc(),fe(t)}function Pp(e){e=e??G.EMPTY_OBJECT,this._scene=e.scene,this._batchTable=e.batchTable;let t=new Df({scene:this._scene,textureAtlas:new Ox({initialSize:tQ}),coarseDepthTestDistance:e.coarseDepthTestDistance,threePointDepthTestDistance:e.threePointDepthTestDistance});this._backgroundBillboardCollection=t,this._backgroundBillboardTexture=new Pg(t),this._glyphBillboardCollection=new Df({scene:this._scene,batchTable:this._batchTable,coarseDepthTestDistance:e.coarseDepthTestDistance,threePointDepthTestDistance:e.threePointDepthTestDistance}),this._glyphBillboardCollection._sdf=!0,this._spareBillboards=[],this._textDimensionsCache={},this._labels=[],this._labelsToUpdate=[],this._totalGlyphCount=0,this._highlightColor=V.clone(V.WHITE),this.show=e.show??!0,this.modelMatrix=M.clone(e.modelMatrix??M.IDENTITY),this.debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this.blendOption=e.blendOption??Di.OPAQUE_AND_TRANSLUCENT}Object.defineProperties(Pp.prototype,{length:{get:function(){return this._labels.length}},sizeInBytes:{get:function(){return this._glyphBillboardCollection.sizeInBytes+this._backgroundBillboardCollection.sizeInBytes}},ready:{get:function(){let e=this._backgroundBillboardCollection.get(0);return l(e)&&!e.ready?!1:this._glyphBillboardCollection.ready}},coarseDepthTestDistance:{get:function(){return this._backgroundBillboardCollection.coarseDepthTestDistance},set:function(e){this._backgroundBillboardCollection.coarseDepthTestDistance=e,this._glyphBillboardCollection.coarseDepthTestDistance=e}},threePointDepthTestDistance:{get:function(){return this._backgroundBillboardCollection.threePointDepthTestDistance},set:function(e){this._backgroundBillboardCollection.threePointDepthTestDistance=e,this._glyphBillboardCollection.threePointDepthTestDistance=e}}});Pp.prototype.add=function(e){let t=new XA(e,this);return this._labels.push(t),this._labelsToUpdate.push(t),t};Pp.prototype.remove=function(e){if(l(e)&&e._labelCollection===this){let t=this._labels.indexOf(e);if(t!==-1)return this._labels.splice(t,1),Gge(this,e),!0}return!1};Pp.prototype.removeAll=function(){let e=this._labels;for(let t=0,n=e.length;t<n;++t)Gge(this,e[t]);e.length=0};Pp.prototype.contains=function(e){return l(e)&&e._labelCollection===this};Pp.prototype.get=function(e){return this._labels[e]};Pp.prototype.update=function(e){if(!this.show)return;let t=this._glyphBillboardCollection,n=this._backgroundBillboardCollection;t.modelMatrix=this.modelMatrix,t.debugShowBoundingVolume=this.debugShowBoundingVolume,n.modelMatrix=this.modelMatrix,n.debugShowBoundingVolume=this.debugShowBoundingVolume;let i=this._labelsToUpdate.length;for(let r=0;r<i;++r){let a=this._labelsToUpdate[r];if(a.isDestroyed())continue;let s=a._glyphs.length;a._rebindAllGlyphs&&(Nnt(this,a),a._rebindAllGlyphs=!1),a._repositionAllGlyphs&&(znt(a),a._repositionAllGlyphs=!1);let c=a._glyphs.length-s;this._totalGlyphCount+=c}let o=n.length>0?Di.TRANSLUCENT:this.blendOption;t.blendOption=o,n.blendOption=o,t._highlightColor=this._highlightColor,n._highlightColor=this._highlightColor,this._labelsToUpdate.length=0,n.update(e),t.update(e)};Pp.prototype.isDestroyed=function(){return!1};Pp.prototype.destroy=function(){return this.removeAll(),this._glyphBillboardCollection=this._glyphBillboardCollection.destroy(),this._backgroundBillboardCollection=this._backgroundBillboardCollection.destroy(),fe(this)};var Rp=Pp;var vN=`in vec3 position3DHigh;
- in vec3 position3DLow;
- in vec3 position2DHigh;
- in vec3 position2DLow;
- in vec3 prevPosition3DHigh;
- in vec3 prevPosition3DLow;
- in vec3 prevPosition2DHigh;
- in vec3 prevPosition2DLow;
- in vec3 nextPosition3DHigh;
- in vec3 nextPosition3DLow;
- in vec3 nextPosition2DHigh;
- in vec3 nextPosition2DLow;
- in vec4 texCoordExpandAndBatchIndex;
-
- out vec2 v_st;
- out float v_width;
- out vec4 v_pickColor;
- out float v_polylineAngle;
-
- void main()
- {
- float texCoord = texCoordExpandAndBatchIndex.x;
- float expandDir = texCoordExpandAndBatchIndex.y;
- bool usePrev = texCoordExpandAndBatchIndex.z < 0.0;
- float batchTableIndex = texCoordExpandAndBatchIndex.w;
-
- vec2 widthAndShow = batchTable_getWidthAndShow(batchTableIndex);
- float width = widthAndShow.x + 0.5;
- float show = widthAndShow.y;
-
- if (width < 1.0)
- {
- show = 0.0;
- }
-
- vec4 pickColor = batchTable_getPickColor(batchTableIndex);
-
- vec4 p, prev, next;
- if (czm_morphTime == 1.0)
- {
- p = czm_translateRelativeToEye(position3DHigh.xyz, position3DLow.xyz);
- prev = czm_translateRelativeToEye(prevPosition3DHigh.xyz, prevPosition3DLow.xyz);
- next = czm_translateRelativeToEye(nextPosition3DHigh.xyz, nextPosition3DLow.xyz);
- }
- else if (czm_morphTime == 0.0)
- {
- p = czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy);
- prev = czm_translateRelativeToEye(prevPosition2DHigh.zxy, prevPosition2DLow.zxy);
- next = czm_translateRelativeToEye(nextPosition2DHigh.zxy, nextPosition2DLow.zxy);
- }
- else
- {
- p = czm_columbusViewMorph(
- czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy),
- czm_translateRelativeToEye(position3DHigh.xyz, position3DLow.xyz),
- czm_morphTime);
- prev = czm_columbusViewMorph(
- czm_translateRelativeToEye(prevPosition2DHigh.zxy, prevPosition2DLow.zxy),
- czm_translateRelativeToEye(prevPosition3DHigh.xyz, prevPosition3DLow.xyz),
- czm_morphTime);
- next = czm_columbusViewMorph(
- czm_translateRelativeToEye(nextPosition2DHigh.zxy, nextPosition2DLow.zxy),
- czm_translateRelativeToEye(nextPosition3DHigh.xyz, nextPosition3DLow.xyz),
- czm_morphTime);
- }
-
- #ifdef DISTANCE_DISPLAY_CONDITION
- vec3 centerHigh = batchTable_getCenterHigh(batchTableIndex);
- vec4 centerLowAndRadius = batchTable_getCenterLowAndRadius(batchTableIndex);
- vec3 centerLow = centerLowAndRadius.xyz;
- float radius = centerLowAndRadius.w;
- vec2 distanceDisplayCondition = batchTable_getDistanceDisplayCondition(batchTableIndex);
-
- float lengthSq;
- if (czm_sceneMode == czm_sceneMode2D)
- {
- lengthSq = czm_eyeHeight2D.y;
- }
- else
- {
- vec4 center = czm_translateRelativeToEye(centerHigh.xyz, centerLow.xyz);
- lengthSq = max(0.0, dot(center.xyz, center.xyz) - radius * radius);
- }
-
- float nearSq = distanceDisplayCondition.x * distanceDisplayCondition.x;
- float farSq = distanceDisplayCondition.y * distanceDisplayCondition.y;
- if (lengthSq < nearSq || lengthSq > farSq)
- {
- show = 0.0;
- }
- #endif
-
- float polylineAngle;
- vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, polylineAngle);
- gl_Position = czm_viewportOrthographic * positionWC * show;
-
- v_st.s = texCoord;
- v_st.t = czm_writeNonPerspective(clamp(expandDir, 0.0, 1.0), gl_Position.w);
-
- v_width = width;
- v_pickColor = pickColor;
- v_polylineAngle = polylineAngle;
- }
- `;var eu={};eu.numberOfPoints=function(e,t,n){let i=h.distance(e,t);return Math.ceil(i/n)};eu.numberOfPointsRhumbLine=function(e,t,n){let i=Math.pow(e.longitude-t.longitude,2)+Math.pow(e.latitude-t.latitude,2);return Math.max(1,Math.ceil(Math.sqrt(i/(n*n))))};var Unt=new de;eu.extractHeights=function(e,t){let n=e.length,i=new Array(n);for(let o=0;o<n;o++){let r=e[o];i[o]=t.cartesianToCartographic(r,Unt).height}return i};var Vnt=new M,jnt=new h,Hge=new h,Gnt=new en(h.UNIT_X,0),Wge=new h,Hnt=new en(h.UNIT_X,0),Wnt=new h,qnt=new h,oQ=[];function Yge(e,t,n){let i=oQ;i.length=e;let o;if(t===n){for(o=0;o<e;o++)i[o]=t;return i}let a=(n-t)/e;for(o=0;o<e;o++){let s=t+o*a;i[o]=s}return i}var Jj=new de,$j=new de,KA=new h,rQ=new h,Ynt=new h,iQ=new Y0,SN=new wc;function Xnt(e,t,n,i,o,r,a,s){let c=i.scaleToGeodeticSurface(e,rQ),u=i.scaleToGeodeticSurface(t,Ynt),f=eu.numberOfPoints(e,t,n),d=i.cartesianToCartographic(c,Jj),p=i.cartesianToCartographic(u,$j),g=Yge(f,o,r);iQ.setEndPoints(d,p);let m=iQ.surfaceDistance/f,A=s;d.height=o;let y=i.cartographicToCartesian(d,KA);h.pack(y,a,A),A+=3;for(let x=1;x<f;x++){let b=iQ.interpolateUsingSurfaceDistance(x*m,$j);b.height=g[x],y=i.cartographicToCartesian(b,KA),h.pack(y,a,A),A+=3}return A}function Knt(e,t,n,i,o,r,a,s){let c=i.cartesianToCartographic(e,Jj),u=i.cartesianToCartographic(t,$j),f=eu.numberOfPointsRhumbLine(c,u,n);c.height=0,u.height=0;let d=Yge(f,o,r);SN.ellipsoid.equals(i)||(SN=new wc(void 0,void 0,i)),SN.setEndPoints(c,u);let p=SN.surfaceDistance/f,g=s;c.height=o;let m=i.cartographicToCartesian(c,KA);h.pack(m,a,g),g+=3;for(let A=1;A<f;A++){let y=SN.interpolateUsingSurfaceDistance(A*p,$j);y.height=d[A],m=i.cartographicToCartesian(y,KA),h.pack(m,a,g),g+=3}return g}eu.wrapLongitude=function(e,t){let n=[],i=[];if(l(e)&&e.length>0){t=t??M.IDENTITY;let o=M.inverseTransformation(t,Vnt),r=M.multiplyByPoint(o,h.ZERO,jnt),a=h.normalize(M.multiplyByPointAsVector(o,h.UNIT_Y,Hge),Hge),s=en.fromPointNormal(r,a,Gnt),c=h.normalize(M.multiplyByPointAsVector(o,h.UNIT_X,Wge),Wge),u=en.fromPointNormal(r,c,Hnt),f=1;n.push(h.clone(e[0]));let d=n[0],p=e.length;for(let g=1;g<p;++g){let m=e[g];if(en.getPointDistance(u,d)<0||en.getPointDistance(u,m)<0){let A=si.lineSegmentPlane(d,m,s,Wnt);if(l(A)){let y=h.multiplyByScalar(a,5e-9,qnt);en.getPointDistance(s,d)<0&&h.negate(y,y),n.push(h.add(A,y,new h)),i.push(f+1),h.negate(y,y),n.push(h.add(A,y,new h)),f=1}}n.push(h.clone(e[g])),f++,d=m}i.push(f)}return{positions:n,lengths:i}};eu.generateArc=function(e){l(e)||(e={});let t=e.positions,n=t.length,i=e.ellipsoid??te.default,o=e.height??0,r=Array.isArray(o);if(n<1)return[];if(n===1){let A=i.scaleToGeodeticSurface(t[0],rQ);if(o=r?o[0]:o,o!==0){let y=i.geodeticSurfaceNormal(A,KA);h.multiplyByScalar(y,o,y),h.add(A,y,A)}return[A.x,A.y,A.z]}let a=e.minDistance;if(!l(a)){let A=e.granularity??D.RADIANS_PER_DEGREE;a=D.chordLength(A,i.maximumRadius)}let s=0,c;for(c=0;c<n-1;c++)s+=eu.numberOfPoints(t[c],t[c+1],a);let u=(s+1)*3,f=new Array(u),d=0;for(c=0;c<n-1;c++){let A=t[c],y=t[c+1],x=r?o[c]:o,b=r?o[c+1]:o;d=Xnt(A,y,a,i,x,b,f,d)}oQ.length=0;let p=t[n-1],g=i.cartesianToCartographic(p,Jj);g.height=r?o[n-1]:o;let m=i.cartographicToCartesian(g,KA);return h.pack(m,f,u-3),f};var qge=new de,Qnt=new de;eu.generateRhumbArc=function(e){l(e)||(e={});let t=e.positions,n=t.length,i=e.ellipsoid??te.default,o=e.height??0,r=Array.isArray(o);if(n<1)return[];if(n===1){let x=i.scaleToGeodeticSurface(t[0],rQ);if(o=r?o[0]:o,o!==0){let b=i.geodeticSurfaceNormal(x,KA);h.multiplyByScalar(b,o,b),h.add(x,b,x)}return[x.x,x.y,x.z]}let a=e.granularity??D.RADIANS_PER_DEGREE,s=0,c,u=i.cartesianToCartographic(t[0],qge),f;for(c=0;c<n-1;c++)f=i.cartesianToCartographic(t[c+1],Qnt),s+=eu.numberOfPointsRhumbLine(u,f,a),u=de.clone(f,qge);let d=(s+1)*3,p=new Array(d),g=0;for(c=0;c<n-1;c++){let x=t[c],b=t[c+1],C=r?o[c]:o,E=r?o[c+1]:o;g=Knt(x,b,a,i,C,E,p,g)}oQ.length=0;let m=t[n-1],A=i.cartesianToCartographic(m,Jj);A.height=r?o[n-1]:o;let y=i.cartographicToCartesian(A,KA);return h.pack(y,p,d-3),p};eu.generateCartesianArc=function(e){let t=eu.generateArc(e),n=t.length/3,i=new Array(n);for(let o=0;o<n;o++)i[o]=h.unpack(t,o*3);return i};eu.generateCartesianRhumbArc=function(e){let t=eu.generateRhumbArc(e),n=t.length/3,i=new Array(n);for(let o=0;o<n;o++)i[o]=h.unpack(t,o*3);return i};var Yi=eu;function Pf(e,t){e=e??G.EMPTY_OBJECT,this._show=e.show??!0,this._width=e.width??1,this._loop=e.loop??!1,this._distanceDisplayCondition=e.distanceDisplayCondition,this._material=e.material,l(this._material)||(this._material=Hi.fromType(Hi.ColorType,{color:new V(1,1,1,1)}));let n=e.positions;l(n)||(n=[]),this._positions=n,this._actualPositions=Fo(n,h.equalsEpsilon),this._loop&&this._actualPositions.length>2&&(this._actualPositions===this._positions&&(this._actualPositions=n.slice()),this._actualPositions.push(h.clone(this._actualPositions[0]))),this._length=this._actualPositions.length,this._id=e.id;let i;l(t)&&(i=M.clone(t.modelMatrix)),this._modelMatrix=i,this._segments=Yi.wrapLongitude(this._actualPositions,i),this._actualLength=void 0,this._propertiesChanged=new Uint32Array(Kge),this._polylineCollection=t,this._dirty=!1,this._pickId=void 0,this._boundingVolume=ce.fromPoints(this._actualPositions),this._boundingVolumeWC=ce.transform(this._boundingVolume,this._modelMatrix),this._boundingVolume2D=new ce}var Xge=Pf.POSITION_INDEX=0,$nt=Pf.SHOW_INDEX=1,Jnt=Pf.WIDTH_INDEX=2,Znt=Pf.MATERIAL_INDEX=3,wN=Pf.POSITION_SIZE_INDEX=4,eit=Pf.DISTANCE_DISPLAY_CONDITION=5,Kge=Pf.NUMBER_OF_PROPERTIES=6;function Mg(e,t){++e._propertiesChanged[t];let n=e._polylineCollection;l(n)&&(n._updatePolyline(e,t),e._dirty=!0)}Object.defineProperties(Pf.prototype,{show:{get:function(){return this._show},set:function(e){e!==this._show&&(this._show=e,Mg(this,$nt))}},positions:{get:function(){return this._positions},set:function(e){let t=Fo(e,h.equalsEpsilon);this._loop&&t.length>2&&(t===e&&(t=e.slice()),t.push(h.clone(t[0]))),(this._actualPositions.length!==t.length||this._actualPositions.length!==this._length)&&Mg(this,wN),this._positions=e,this._actualPositions=t,this._length=t.length,this._boundingVolume=ce.fromPoints(this._actualPositions,this._boundingVolume),this._boundingVolumeWC=ce.transform(this._boundingVolume,this._modelMatrix,this._boundingVolumeWC),Mg(this,Xge),this.update()}},material:{get:function(){return this._material},set:function(e){this._material!==e&&(this._material=e,Mg(this,Znt))}},width:{get:function(){return this._width},set:function(e){let t=this._width;e!==t&&(this._width=e,Mg(this,Jnt))}},loop:{get:function(){return this._loop},set:function(e){if(e!==this._loop){let t=this._actualPositions;e?t.length>2&&!h.equals(t[0],t[t.length-1])&&(t.length===this._positions.length&&(this._actualPositions=t=this._positions.slice()),t.push(h.clone(t[0]))):t.length>2&&h.equals(t[0],t[t.length-1])&&(t.length-1===this._positions.length?this._actualPositions=this._positions:t.pop()),this._loop=e,Mg(this,wN)}}},id:{get:function(){return this._id},set:function(e){this._id=e,l(this._pickId)&&(this._pickId.object.id=e)}},pickId:{get:function(){return this._pickId}},isDestroyed:{get:function(){return!l(this._polylineCollection)}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){kt.equals(e,this._distanceDisplayCondition)||(this._distanceDisplayCondition=kt.clone(e,this._distanceDisplayCondition),Mg(this,eit))}}});Pf.prototype.update=function(){let e=M.IDENTITY;l(this._polylineCollection)&&(e=this._polylineCollection.modelMatrix);let t=this._segments.positions.length,n=this._segments.lengths,i=this._propertiesChanged[Xge]>0||this._propertiesChanged[wN]>0;if((!M.equals(e,this._modelMatrix)||i)&&(this._segments=Yi.wrapLongitude(this._actualPositions,e),this._boundingVolumeWC=ce.transform(this._boundingVolume,e,this._boundingVolumeWC)),this._modelMatrix=M.clone(e,this._modelMatrix),this._segments.positions.length!==t)Mg(this,wN);else{let o=n.length;for(let r=0;r<o;++r)if(n[r]!==this._segments.lengths[r]){Mg(this,wN);break}}};Pf.prototype.getPickId=function(e){return l(this._pickId)||(this._pickId=e.createPickId({primitive:this,collection:this._polylineCollection,id:this._id})),this._pickId};Pf.prototype._clean=function(){this._dirty=!1;let e=this._propertiesChanged;for(let t=0;t<Kge-1;++t)e[t]=0};Pf.prototype._destroy=function(){this._pickId=this._pickId&&this._pickId.destroy(),this._material=this._material&&this._material.destroy(),this._polylineCollection=void 0};var kd=Pf;var tit=kd.SHOW_INDEX,nit=kd.WIDTH_INDEX,sQ=kd.POSITION_INDEX,iit=kd.MATERIAL_INDEX,Qge=kd.POSITION_SIZE_INDEX,oit=kd.DISTANCE_DISPLAY_CONDITION,i_e=kd.NUMBER_OF_PROPERTIES,Fu={texCoordExpandAndBatchIndex:0,position3DHigh:1,position3DLow:2,position2DHigh:3,position2DLow:4,prevPosition3DHigh:5,prevPosition3DLow:6,prevPosition2DHigh:7,prevPosition2DLow:8,nextPosition3DHigh:9,nextPosition3DLow:10,nextPosition2DHigh:11,nextPosition2DLow:12};function lm(e){e=e??G.EMPTY_OBJECT,this.show=e.show??!0,this.modelMatrix=M.clone(e.modelMatrix??M.IDENTITY),this._modelMatrix=M.clone(M.IDENTITY),this.debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this._opaqueRS=void 0,this._translucentRS=void 0,this._colorCommands=[],this._polylinesUpdated=!1,this._polylinesRemoved=!1,this._createVertexArray=!1,this._propertiesChanged=new Uint32Array(i_e),this._polylines=[],this._polylineBuckets={},this._positionBufferUsage={bufferUsage:Oe.STATIC_DRAW,frameCount:0},this._mode=void 0,this._polylinesToUpdate=[],this._vertexArrays=[],this._positionBuffer=void 0,this._texCoordExpandAndBatchIndexBuffer=void 0,this._batchTable=void 0,this._createBatchTable=!1,this._useHighlightColor=!1,this._highlightColor=V.clone(V.WHITE);let t=this;this._uniformMap={u_highlightColor:function(){return t._highlightColor}}}Object.defineProperties(lm.prototype,{length:{get:function(){return cQ(this),this._polylines.length}}});lm.prototype.add=function(e){let t=new kd(e,this);return t._index=this._polylines.length,this._polylines.push(t),this._createVertexArray=!0,this._createBatchTable=!0,t};lm.prototype.remove=function(e){if(this.contains(e)){if(this._polylinesRemoved=!0,this._createVertexArray=!0,this._createBatchTable=!0,l(e._bucket)){let t=e._bucket;t.shaderProgram=t.shaderProgram&&t.shaderProgram.destroy()}return e._destroy(),!0}return!1};lm.prototype.removeAll=function(){lQ(this),c_e(this),this._polylineBuckets={},this._polylinesRemoved=!1,this._polylines.length=0,this._polylinesToUpdate.length=0,this._createVertexArray=!0};lm.prototype.contains=function(e){return l(e)&&e._polylineCollection===this};lm.prototype.get=function(e){return cQ(this),this._polylines[e]};function rit(e,t){l(e._batchTable)&&e._batchTable.destroy();let n=[{functionName:"batchTable_getWidthAndShow",componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:2},{functionName:"batchTable_getPickColor",componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!0},{functionName:"batchTable_getCenterHigh",componentDatatype:Y.FLOAT,componentsPerAttribute:3},{functionName:"batchTable_getCenterLowAndRadius",componentDatatype:Y.FLOAT,componentsPerAttribute:4},{functionName:"batchTable_getDistanceDisplayCondition",componentDatatype:Y.FLOAT,componentsPerAttribute:2}];e._batchTable=new Lx(t,n,e._polylines.length)}var o_e=new xn,r_e=new se,a_e=new z;lm.prototype.update=function(e){if(cQ(this),this._polylines.length===0||!this.show)return;fit(this,e);let t=e.context,n=e.mapProjection,i,o=this._propertiesChanged;if(this._createBatchTable){if(Rt.maximumVertexTextureImageUnits===0)throw new re("Vertex texture fetch support is required to render polylines. The maximum number of vertex texture image units must be greater than zero.");rit(this,t),this._createBatchTable=!1}if(this._createVertexArray||sit(this))Zge(this,t,n);else if(this._polylinesUpdated){let c=this._polylinesToUpdate;if(this._mode!==ie.SCENE3D){let u=c.length;for(let f=0;f<u;++f)i=c[f],i.update()}if(o[Qge]||o[iit])Zge(this,t,n);else{let u=c.length,f=this._polylineBuckets;for(let d=0;d<u;++d){i=c[d],o=i._propertiesChanged;let p=i._bucket,g=0;for(let m in f)if(f.hasOwnProperty(m)){if(f[m]===p){o[sQ]&&p.writeUpdate(g,i,this._positionBuffer,n);break}g+=f[m].lengthOfPositions}if((o[tit]||o[nit])&&this._batchTable.setBatchedAttribute(i._index,0,new z(i._width,i._show)),this._batchTable.attributes.length>2){if(o[sQ]||o[Qge]){let m=e.mode===ie.SCENE2D?i._boundingVolume2D:i._boundingVolumeWC,A=xn.fromCartesian(m.center,o_e),y=se.fromElements(A.low.x,A.low.y,A.low.z,m.radius,r_e);this._batchTable.setBatchedAttribute(i._index,2,A.high),this._batchTable.setBatchedAttribute(i._index,3,y)}if(o[oit]){let m=a_e;m.x=0,m.y=Number.MAX_VALUE;let A=i.distanceDisplayCondition;l(A)&&(m.x=A.near,m.y=A.far),this._batchTable.setBatchedAttribute(i._index,4,m)}}i._clean()}}c.length=0,this._polylinesUpdated=!1}o=this._propertiesChanged;for(let c=0;c<i_e;++c)o[c]=0;let r=M.IDENTITY;e.mode===ie.SCENE3D&&(r=this.modelMatrix);let a=e.passes,s=e.morphTime!==0;if((!l(this._opaqueRS)||this._opaqueRS.depthTest.enabled!==s)&&(this._opaqueRS=Ve.fromCache({depthMask:s,depthTest:{enabled:s}})),(!l(this._translucentRS)||this._translucentRS.depthTest.enabled!==s)&&(this._translucentRS=Ve.fromCache({blending:Jt.ALPHA_BLEND,depthMask:!s,depthTest:{enabled:s}})),this._batchTable.update(e),a.render||a.pick){let c=this._colorCommands;ait(this,e,c,r)}};var IN=new ce,$ge=new ce;function ait(e,t,n,i){let o=t.context,r=t.commandList,a=n.length,s=0,c=!0,u=e._vertexArrays,f=e.debugShowBoundingVolume,p=e._batchTable.getUniformMapCallback(),g=u.length;for(let m=0;m<g;++m){let A=u[m],y=A.buckets,x=y.length;for(let b=0;b<x;++b){let C=y[b],E=C.offset,S=C.bucket.shaderProgram,w=C.bucket.polylines,P=w.length,R,B,L=0,_,T;for(let v=0;v<P;++v){let I=w[v],O=lit(I._material);if(O!==R){if(l(R)&&L>0){let U=B.isTranslucent();s>=a?(_=new tt({owner:e}),n.push(_)):_=n[s],++s,T=wt(p(B._uniforms),e._uniformMap),_.boundingVolume=ce.clone(IN,_.boundingVolume),_.modelMatrix=i,_.shaderProgram=S,_.vertexArray=A.va,_.renderState=U?e._translucentRS:e._opaqueRS,_.pass=U?Ie.TRANSLUCENT:Ie.OPAQUE,_.debugShowBoundingVolume=f,_.pickId="v_pickColor",_.uniformMap=T,_.count=L,_.offset=E,E+=L,L=0,c=!0,r.push(_)}B=I._material,B.update(o),R=O}let N=I._locatorBuckets,j=N.length;for(let U=0;U<j;++U){let F=N[U];F.locator===C&&(L+=F.count)}let k;t.mode===ie.SCENE3D?k=I._boundingVolumeWC:t.mode===ie.COLUMBUS_VIEW?k=I._boundingVolume2D:t.mode===ie.SCENE2D?l(I._boundingVolume2D)&&(k=ce.clone(I._boundingVolume2D,$ge),k.center.x=0):l(I._boundingVolumeWC)&&l(I._boundingVolume2D)&&(k=ce.union(I._boundingVolumeWC,I._boundingVolume2D,$ge)),c?(c=!1,ce.clone(k,IN)):ce.union(k,IN,IN)}l(R)&&L>0&&(s>=a?(_=new tt({owner:e}),n.push(_)):_=n[s],++s,T=wt(p(B._uniforms),e._uniformMap),_.boundingVolume=ce.clone(IN,_.boundingVolume),_.modelMatrix=i,_.shaderProgram=S,_.vertexArray=A.va,_.renderState=B.isTranslucent()?e._translucentRS:e._opaqueRS,_.pass=B.isTranslucent()?Ie.TRANSLUCENT:Ie.OPAQUE,_.debugShowBoundingVolume=f,_.pickId="v_pickColor",_.uniformMap=T,_.count=L,_.offset=E,c=!0,r.push(_)),R=void 0}}n.length=s}lm.prototype.isDestroyed=function(){return!1};lm.prototype.destroy=function(){return s_e(this),lQ(this),c_e(this),this._batchTable=this._batchTable&&this._batchTable.destroy(),fe(this)};function sit(e){let t=!1,n=e._propertiesChanged,i=e._positionBufferUsage;return n[sQ]?(i.bufferUsage!==Oe.STREAM_DRAW&&(t=!0,i.bufferUsage=Oe.STREAM_DRAW),i.frameCount=100):i.bufferUsage!==Oe.STATIC_DRAW&&(i.frameCount===0?(t=!0,i.bufferUsage=Oe.STATIC_DRAW):i.frameCount--),t}var Jge=[0,0,0];function Zge(e,t,n){e._createVertexArray=!1,lQ(e),s_e(e),uit(e);let i=[[]],o=i[0],r=e._batchTable,a=e._useHighlightColor,s=[0],c=0,u=[[]],f=0,d=e._polylineBuckets,p,g;for(p in d)d.hasOwnProperty(p)&&(g=d[p],g.updateShader(t,r,a),f+=g.lengthOfPositions);if(f>0){let m=e._mode,A=new Float32Array(6*f*3),y=new Float32Array(f*4),x,b=0,C=0,E=0;for(p in d)if(d.hasOwnProperty(p)){g=d[p],g.write(A,y,b,C,E,r,t,n),m===ie.MORPHING&&(l(x)||(x=new Float32Array(6*f*3)),g.writeForMorph(x,b));let T=g.lengthOfPositions;b+=6*T*3,C+=T*4,E+=T*4,c=g.updateIndices(i,s,u,c)}let S=e._positionBufferUsage.bufferUsage,w=Oe.STATIC_DRAW;e._positionBuffer=Ke.createVertexBuffer({context:t,typedArray:A,usage:S});let P;l(x)&&(P=Ke.createVertexBuffer({context:t,typedArray:x,usage:S})),e._texCoordExpandAndBatchIndexBuffer=Ke.createVertexBuffer({context:t,typedArray:y,usage:w});let R=3*Float32Array.BYTES_PER_ELEMENT,B=4*Float32Array.BYTES_PER_ELEMENT,L=0,_=i.length;for(let T=0;T<_;++T)if(o=i[T],o.length>0){let v=new Uint16Array(o),I=Ke.createIndexBuffer({context:t,typedArray:v,usage:Oe.STATIC_DRAW,indexDatatype:Ue.UNSIGNED_SHORT});L+=s[T];let O=6*(T*(R*D.SIXTY_FOUR_KILOBYTES)-L*R),N=R+O,j=R+N,k=R+j,U=R+k,F=R+U,H=T*(B*D.SIXTY_FOUR_KILOBYTES)-L*B,q=[{index:Fu.position3DHigh,componentsPerAttribute:3,componentDatatype:Y.FLOAT,offsetInBytes:O,strideInBytes:6*R},{index:Fu.position3DLow,componentsPerAttribute:3,componentDatatype:Y.FLOAT,offsetInBytes:N,strideInBytes:6*R},{index:Fu.position2DHigh,componentsPerAttribute:3,componentDatatype:Y.FLOAT,offsetInBytes:O,strideInBytes:6*R},{index:Fu.position2DLow,componentsPerAttribute:3,componentDatatype:Y.FLOAT,offsetInBytes:N,strideInBytes:6*R},{index:Fu.prevPosition3DHigh,componentsPerAttribute:3,componentDatatype:Y.FLOAT,offsetInBytes:j,strideInBytes:6*R},{index:Fu.prevPosition3DLow,componentsPerAttribute:3,componentDatatype:Y.FLOAT,offsetInBytes:k,strideInBytes:6*R},{index:Fu.prevPosition2DHigh,componentsPerAttribute:3,componentDatatype:Y.FLOAT,offsetInBytes:j,strideInBytes:6*R},{index:Fu.prevPosition2DLow,componentsPerAttribute:3,componentDatatype:Y.FLOAT,offsetInBytes:k,strideInBytes:6*R},{index:Fu.nextPosition3DHigh,componentsPerAttribute:3,componentDatatype:Y.FLOAT,offsetInBytes:U,strideInBytes:6*R},{index:Fu.nextPosition3DLow,componentsPerAttribute:3,componentDatatype:Y.FLOAT,offsetInBytes:F,strideInBytes:6*R},{index:Fu.nextPosition2DHigh,componentsPerAttribute:3,componentDatatype:Y.FLOAT,offsetInBytes:U,strideInBytes:6*R},{index:Fu.nextPosition2DLow,componentsPerAttribute:3,componentDatatype:Y.FLOAT,offsetInBytes:F,strideInBytes:6*R},{index:Fu.texCoordExpandAndBatchIndex,componentsPerAttribute:4,componentDatatype:Y.FLOAT,vertexBuffer:e._texCoordExpandAndBatchIndexBuffer,offsetInBytes:H}],J,W,Z,K;m===ie.SCENE3D?(W=e._positionBuffer,J="vertexBuffer",Z=Jge,K="value"):m===ie.SCENE2D||m===ie.COLUMBUS_VIEW?(W=Jge,J="value",Z=e._positionBuffer,K="vertexBuffer"):(W=P,J="vertexBuffer",Z=e._positionBuffer,K="vertexBuffer"),q[0][J]=W,q[1][J]=W,q[2][K]=Z,q[3][K]=Z,q[4][J]=W,q[5][J]=W,q[6][K]=Z,q[7][K]=Z,q[8][J]=W,q[9][J]=W,q[10][K]=Z,q[11][K]=Z;let le=new Fn({context:t,attributes:q,indexBuffer:I});e._vertexArrays.push({va:le,buckets:u[T]})}}}function cit(e,t){return t instanceof It?t.id:t}var Zj=[];function lit(e){let t=Hi._uniformList[e.type],n=t.length;Zj.length=2*n;let i=0;for(let o=0;o<n;++o){let r=t[o];Zj[i]=r,Zj[i+1]=e._uniforms[r](),i+=2}return`${e.type}:${JSON.stringify(Zj,cit)}`}function uit(e){let t=e._mode,n=e._modelMatrix,i=e._polylineBuckets={},o=e._polylines,r=o.length;for(let a=0;a<r;++a){let s=o[a];if(s._actualPositions.length>1){s.update();let c=s.material,u=i[c.type];l(u)||(u=i[c.type]=new Op(c,t,n)),u.addPolyline(s)}}}function fit(e,t){let n=t.mode;(e._mode!==n||!M.equals(e._modelMatrix,e.modelMatrix))&&(e._mode=n,e._modelMatrix=M.clone(e.modelMatrix),e._createVertexArray=!0)}function cQ(e){if(e._polylinesRemoved){e._polylinesRemoved=!1;let t=[],n=[],i=0,o,r=e._polylines.length;for(let a=0;a<r;++a)o=e._polylines[a],o.isDestroyed||(o._index=i++,n.push(o),t.push(o));e._polylines=t,e._polylinesToUpdate=n}}function lQ(e){let t=e._polylines,n=t.length;for(let i=0;i<n;++i)if(!t[i].isDestroyed){let o=t[i]._bucket;l(o)&&(o.shaderProgram=o.shaderProgram&&o.shaderProgram.destroy())}}function s_e(e){let t=e._vertexArrays.length;for(let n=0;n<t;++n)e._vertexArrays[n].va.destroy();e._vertexArrays.length=0}lm.prototype._updatePolyline=function(e,t){this._polylinesUpdated=!0,e._dirty||this._polylinesToUpdate.push(e),++this._propertiesChanged[t]};function c_e(e){let t=e._polylines,n=t.length;for(let i=0;i<n;++i)t[i].isDestroyed||t[i]._destroy()}function aQ(e,t,n){this.count=e,this.offset=t,this.bucket=n}function Op(e,t,n){this.polylines=[],this.lengthOfPositions=0,this.material=e,this.shaderProgram=void 0,this.mode=t,this.modelMatrix=n}Op.prototype.addPolyline=function(e){this.polylines.push(e),e._actualLength=this.getPolylinePositionsLength(e),this.lengthOfPositions+=e._actualLength,e._bucket=this};Op.prototype.updateShader=function(e,t,n){if(l(this.shaderProgram))return;let i=["DISTANCE_DISPLAY_CONDITION"];n&&i.push("VECTOR_TILE"),this.material.shaderSource.search(/in\s+float\s+v_polylineAngle;/g)!==-1&&i.push("POLYLINE_DASH"),i.push("CLIP_POLYLINE");let o=new He({defines:i,sources:[`in vec4 v_pickColor;
- `,this.material.shaderSource,Vx]}),r=t.getVertexShaderCallback()(vN),a=new He({defines:i,sources:[kl,r]});this.shaderProgram=Kt.fromCache({context:e,vertexShaderSource:a,fragmentShaderSource:o,attributeLocations:Fu})};function l_e(e){return h.dot(h.UNIT_X,e._boundingVolume.center)<0||e._boundingVolume.intersectPlane(en.ORIGIN_ZX_PLANE)===qt.INTERSECTING}Op.prototype.getPolylinePositionsLength=function(e){let t;if(this.mode===ie.SCENE3D||!l_e(e))return t=e._actualPositions.length,t*4-4;let n=0,i=e._segments.lengths;t=i.length;for(let o=0;o<t;++o)n+=i[o]*4-4;return n};var gs=new h,zd=new h,Ud=new h,eG=new h,dit=new se,hit=new z;Op.prototype.write=function(e,t,n,i,o,r,a,s){let c=this.mode,u=s.ellipsoid.maximumRadius*D.PI,f=this.polylines,d=f.length;for(let p=0;p<d;++p){let g=f[p],m=g.width,A=g.show&&m>0,y=g._index,x=this.getSegments(g,s),b=x.positions,C=x.lengths,E=b.length,S=g.getPickId(a).color,w=0,P=0,R;for(let j=0;j<E;++j){j===0?g._loop?R=b[E-2]:(R=eG,h.subtract(b[0],b[1],R),h.add(b[0],R,R)):R=b[j-1],h.clone(R,zd),h.clone(b[j],gs),j===E-1?g._loop?R=b[1]:(R=eG,h.subtract(b[E-1],b[E-2],R),h.add(b[E-1],R,R)):R=b[j+1],h.clone(R,Ud);let k=C[w];j===P+k&&(P+=k,++w);let U=j-P===0,F=j===P+C[w]-1;c===ie.SCENE2D&&(zd.z=0,gs.z=0,Ud.z=0),(c===ie.SCENE2D||c===ie.MORPHING)&&(U||F)&&u-Math.abs(gs.x)<1&&((gs.x<0&&zd.x>0||gs.x>0&&zd.x<0)&&h.clone(gs,zd),(gs.x<0&&Ud.x>0||gs.x>0&&Ud.x<0)&&h.clone(gs,Ud));let H=U?2:0,q=F?2:4;for(let J=H;J<q;++J){xn.writeElements(gs,e,n),xn.writeElements(zd,e,n+6),xn.writeElements(Ud,e,n+12);let W=J-2<0?-1:1;t[o]=j/(E-1),t[o+1]=2*(J%2)-1,t[o+2]=W,t[o+3]=y,n+=18,o+=4}}let B=dit;B.x=V.floatToByte(S.red),B.y=V.floatToByte(S.green),B.z=V.floatToByte(S.blue),B.w=V.floatToByte(S.alpha);let L=hit;L.x=m,L.y=A?1:0;let _=c===ie.SCENE2D?g._boundingVolume2D:g._boundingVolumeWC,T=xn.fromCartesian(_.center,o_e),v=T.high,I=se.fromElements(T.low.x,T.low.y,T.low.z,_.radius,r_e),O=a_e;O.x=0,O.y=Number.MAX_VALUE;let N=g.distanceDisplayCondition;l(N)&&(O.x=N.near,O.y=N.far),r.setBatchedAttribute(y,0,L),r.setBatchedAttribute(y,1,B),r.attributes.length>2&&(r.setBatchedAttribute(y,2,v),r.setBatchedAttribute(y,3,I),r.setBatchedAttribute(y,4,O))}};var mit=new h,pit=new h,git=new h,e_e=new h;Op.prototype.writeForMorph=function(e,t){let n=this.modelMatrix,i=this.polylines,o=i.length;for(let r=0;r<o;++r){let a=i[r],s=a._segments.positions,c=a._segments.lengths,u=s.length,f=0,d=0;for(let p=0;p<u;++p){let g;p===0?a._loop?g=s[u-2]:(g=e_e,h.subtract(s[0],s[1],g),h.add(s[0],g,g)):g=s[p-1],g=M.multiplyByPoint(n,g,pit);let m=M.multiplyByPoint(n,s[p],mit),A;p===u-1?a._loop?A=s[1]:(A=e_e,h.subtract(s[u-1],s[u-2],A),h.add(s[u-1],A,A)):A=s[p+1],A=M.multiplyByPoint(n,A,git);let y=c[f];p===d+y&&(d+=y,++f);let x=p-d===0,b=p===d+c[f]-1,C=x?2:0,E=b?2:4;for(let S=C;S<E;++S)xn.writeElements(m,e,t),xn.writeElements(g,e,t+6),xn.writeElements(A,e,t+12),t+=18}}};var _it=new Array(1);Op.prototype.updateIndices=function(e,t,n,i){let o=n.length-1,r=new aQ(0,i,this);n[o].push(r);let a=0,s=e[e.length-1],c=0;s.length>0&&(c=s[s.length-1]+1);let u=this.polylines,f=u.length;for(let d=0;d<f;++d){let p=u[d];p._locatorBuckets=[];let g;if(this.mode===ie.SCENE3D){g=_it;let A=p._actualPositions.length;if(A>0)g[0]=A;else continue}else g=p._segments.lengths;let m=g.length;if(m>0){let A=0;for(let y=0;y<m;++y){let x=g[y]-1;for(let b=0;b<x;++b)c+4>D.SIXTY_FOUR_KILOBYTES&&(p._locatorBuckets.push({locator:r,count:A}),A=0,t.push(4),s=[],e.push(s),c=0,r.count=a,a=0,i=0,r=new aQ(0,0,this),n[++o]=[r]),s.push(c,c+2,c+1),s.push(c+1,c+2,c+3),A+=6,a+=6,i+=6,c+=4}p._locatorBuckets.push({locator:r,count:A}),c+4>D.SIXTY_FOUR_KILOBYTES&&(t.push(0),s=[],e.push(s),c=0,r.count=a,i=0,a=0,r=new aQ(0,0,this),n[++o]=[r])}p._clean()}return r.count=a,i};Op.prototype.getPolylineStartIndex=function(e){let t=this.polylines,n=0,i=t.length;for(let o=0;o<i;++o){let r=t[o];if(r===e)break;n+=r._actualLength}return n};var lS={positions:void 0,lengths:void 0},t_e=new Array(1),Ait=new h,yit=new de;Op.prototype.getSegments=function(e,t){let n=e._actualPositions;if(this.mode===ie.SCENE3D)return t_e[0]=n.length,lS.positions=n,lS.lengths=t_e,lS;l_e(e)&&(n=e._segments.positions);let i=t.ellipsoid,o=[],r=this.modelMatrix,a=n.length,s,c=Ait;for(let u=0;u<a;++u)s=n[u],c=M.multiplyByPoint(r,s,c),o.push(t.project(i.cartesianToCartographic(c,yit)));if(o.length>0){e._boundingVolume2D=ce.fromPoints(o,e._boundingVolume2D);let u=e._boundingVolume2D.center;e._boundingVolume2D.center=new h(u.z,u.x,u.y)}return lS.positions=o,lS.lengths=e._segments.lengths,lS};var n_e;Op.prototype.writeUpdate=function(e,t,n,i){let o=this.mode,r=i.ellipsoid.maximumRadius*D.PI,a=t._actualLength;if(a){e+=this.getPolylineStartIndex(t);let s=n_e,c=6*a*3;!l(s)||s.length<c?s=n_e=new Float32Array(c):s.length>c&&(s=new Float32Array(s.buffer,0,c));let u=this.getSegments(t,i),f=u.positions,d=u.lengths,p=0,g=0,m=0,A;a=f.length;for(let y=0;y<a;++y){y===0?t._loop?A=f[a-2]:(A=eG,h.subtract(f[0],f[1],A),h.add(f[0],A,A)):A=f[y-1],h.clone(A,zd),h.clone(f[y],gs),y===a-1?t._loop?A=f[1]:(A=eG,h.subtract(f[a-1],f[a-2],A),h.add(f[a-1],A,A)):A=f[y+1],h.clone(A,Ud);let x=d[g];y===m+x&&(m+=x,++g);let b=y-m===0,C=y===m+d[g]-1;o===ie.SCENE2D&&(zd.z=0,gs.z=0,Ud.z=0),(o===ie.SCENE2D||o===ie.MORPHING)&&(b||C)&&r-Math.abs(gs.x)<1&&((gs.x<0&&zd.x>0||gs.x>0&&zd.x<0)&&h.clone(gs,zd),(gs.x<0&&Ud.x>0||gs.x>0&&Ud.x<0)&&h.clone(gs,Ud));let E=b?2:0,S=C?2:4;for(let w=E;w<S;++w)xn.writeElements(gs,s,p),xn.writeElements(zd,s,p+6),xn.writeElements(Ud,s,p+12),p+=18}n.copyFromArrayView(s,18*Float32Array.BYTES_PER_ELEMENT*e)}};var um=lm;function QA(e){this._positions=e.positions,this._batchTable=e.batchTable,this._batchIds=e.batchIds,this._rectangle=e.rectangle,this._minHeight=e.minimumHeight,this._maxHeight=e.maximumHeight,this._heightReference=e.heightReference,this._billboardCollection=new Df({batchTable:e.batchTable,scene:e.scene}),this._labelCollection=new Rp({batchTable:e.batchTable,scene:e.scene}),this._polylineCollection=new um,this._polylineCollection._useHighlightColor=!0,this._packedBuffer=void 0,this._ready=!1,this._promise=void 0,this._error=void 0}Object.defineProperties(QA.prototype,{ready:{get:function(){return this._ready}},pointsLength:{get:function(){return this._billboardCollection.length}},texturesByteLength:{get:function(){let e=this._billboardCollection.sizeInBytes,t=this._labelCollection.sizeInBytes;return e+t}}});function xit(e,t){let n=e._rectangle,i=e._minHeight,o=e._maxHeight,r=2+oe.packedLength+te.packedLength,a=new Float64Array(r),s=0;return a[s++]=i,a[s++]=o,oe.pack(n,a,s),s+=oe.packedLength,te.pack(t,a,s),a}var bit=new Gn("createVectorTilePoints",5),Cit=new h;function Tit(e,t){let n=e._positions,i=e._packedBuffer;l(i)||(n=e._positions=n.slice(),e._batchIds=e._batchIds.slice(),i=e._packedBuffer=xit(e,t));let o=[n.buffer,i.buffer],r={positions:n.buffer,packedBuffer:i.buffer},a=bit.scheduleTask(r,o);if(l(a))return a.then(s=>{if(e.isDestroyed())return;e._positions=new Float64Array(s.positions);let c=e._billboardCollection,u=e._labelCollection,f=e._polylineCollection;n=e._positions;let d=e._batchIds,p=n.length/3,g=e._heightReference??nt.NONE;for(let m=0;m<p;++m){let A=d[m],y=h.unpack(n,m*3,Cit),x=c.add();x.position=y,x._batchIndex=A,x.heightReference=g;let b=u.add();b.text=" ",b.position=y,b._batchIndex=A,b.heightReference=g;let C=f.add();C.positions=[h.clone(y),h.clone(y)]}e._positions=void 0,e._packedBuffer=void 0,e._ready=!0}).catch(s=>{e.isDestroyed()||(e._error=s)})}QA.prototype.createFeatures=function(e,t){let n=this._billboardCollection,i=this._labelCollection,o=this._polylineCollection,r=this._batchIds,a=r.length;for(let s=0;s<a;++s){let c=r[s],u=n.get(s),f=i.get(s),d=o.get(s);t[c]=new Rg(e,c,u,f,d)}};QA.prototype.applyDebugSettings=function(e,t){e?(V.clone(t,this._billboardCollection._highlightColor),V.clone(t,this._labelCollection._highlightColor),V.clone(t,this._polylineCollection._highlightColor)):(V.clone(V.WHITE,this._billboardCollection._highlightColor),V.clone(V.WHITE,this._labelCollection._highlightColor),V.clone(V.WHITE,this._polylineCollection._highlightColor))};function Eit(e,t){let n=e._batchIds,i=n.length;for(let o=0;o<i;++o){let r=n[o],a=t[r];a.show=!0,a.pointSize=Rg.defaultPointSize,a.color=Rg.defaultColor,a.pointOutlineColor=Rg.defaultPointOutlineColor,a.pointOutlineWidth=Rg.defaultPointOutlineWidth,a.labelColor=V.WHITE,a.labelOutlineColor=V.WHITE,a.labelOutlineWidth=1,a.font="30px sans-serif",a.labelStyle=sr.FILL,a.labelText=void 0,a.backgroundColor=new V(.165,.165,.165,.8),a.backgroundPadding=new z(7,5),a.backgroundEnabled=!1,a.scaleByDistance=void 0,a.translucencyByDistance=void 0,a.distanceDisplayCondition=void 0,a.heightOffset=0,a.anchorLineEnabled=!1,a.anchorLineColor=V.WHITE,a.image=void 0,a.disableDepthTestDistance=0,a.horizontalOrigin=Oi.CENTER,a.verticalOrigin=zn.CENTER,a.labelHorizontalOrigin=Oi.RIGHT,a.labelVerticalOrigin=zn.BASELINE}}var vit=new V,Sit=new V,wit=new V,Iit=new V,Dit=new V,Pit=new V,DN=new zt,PN=new zt,uQ=new kt;QA.prototype.applyStyle=function(e,t){if(!l(e)){Eit(this,t);return}let n=this._batchIds,i=n.length;for(let o=0;o<i;++o){let r=n[o],a=t[r];if(l(e.show)&&(a.show=e.show.evaluate(a)),l(e.pointSize)&&(a.pointSize=e.pointSize.evaluate(a)),l(e.color)&&(a.color=e.color.evaluateColor(a,vit)),l(e.pointOutlineColor)&&(a.pointOutlineColor=e.pointOutlineColor.evaluateColor(a,Sit)),l(e.pointOutlineWidth)&&(a.pointOutlineWidth=e.pointOutlineWidth.evaluate(a)),l(e.labelColor)&&(a.labelColor=e.labelColor.evaluateColor(a,wit)),l(e.labelOutlineColor)&&(a.labelOutlineColor=e.labelOutlineColor.evaluateColor(a,Iit)),l(e.labelOutlineWidth)&&(a.labelOutlineWidth=e.labelOutlineWidth.evaluate(a)),l(e.font)&&(a.font=e.font.evaluate(a)),l(e.labelStyle)&&(a.labelStyle=e.labelStyle.evaluate(a)),l(e.labelText)?a.labelText=e.labelText.evaluate(a):a.labelText=void 0,l(e.backgroundColor)&&(a.backgroundColor=e.backgroundColor.evaluateColor(a,Dit)),l(e.backgroundPadding)&&(a.backgroundPadding=e.backgroundPadding.evaluate(a)),l(e.backgroundEnabled)&&(a.backgroundEnabled=e.backgroundEnabled.evaluate(a)),l(e.scaleByDistance)){let s=e.scaleByDistance.evaluate(a);l(s)?(DN.near=s.x,DN.nearValue=s.y,DN.far=s.z,DN.farValue=s.w,a.scaleByDistance=DN):a.scaleByDistance=void 0}else a.scaleByDistance=void 0;if(l(e.translucencyByDistance)){let s=e.translucencyByDistance.evaluate(a);l(s)?(PN.near=s.x,PN.nearValue=s.y,PN.far=s.z,PN.farValue=s.w,a.translucencyByDistance=PN):a.translucencyByDistance=void 0}else a.translucencyByDistance=void 0;if(l(e.distanceDisplayCondition)){let s=e.distanceDisplayCondition.evaluate(a);l(s)?(uQ.near=s.x,uQ.far=s.y,a.distanceDisplayCondition=uQ):a.distanceDisplayCondition=void 0}else a.distanceDisplayCondition=void 0;l(e.heightOffset)&&(a.heightOffset=e.heightOffset.evaluate(a)),l(e.anchorLineEnabled)&&(a.anchorLineEnabled=e.anchorLineEnabled.evaluate(a)),l(e.anchorLineColor)&&(a.anchorLineColor=e.anchorLineColor.evaluateColor(a,Pit)),l(e.image)?a.image=e.image.evaluate(a):a.image=void 0,l(e.disableDepthTestDistance)&&(a.disableDepthTestDistance=e.disableDepthTestDistance.evaluate(a)),l(e.horizontalOrigin)&&(a.horizontalOrigin=e.horizontalOrigin.evaluate(a)),l(e.verticalOrigin)&&(a.verticalOrigin=e.verticalOrigin.evaluate(a)),l(e.labelHorizontalOrigin)&&(a.labelHorizontalOrigin=e.labelHorizontalOrigin.evaluate(a)),l(e.labelVerticalOrigin)&&(a.labelVerticalOrigin=e.labelVerticalOrigin.evaluate(a))}};QA.prototype.update=function(e){if(!this._ready&&(l(this._promise)||(this._promise=Tit(this,e.mapProjection.ellipsoid)),l(this._error))){let t=this._error;throw this._error=void 0,t}this._polylineCollection.update(e),this._billboardCollection.update(e),this._labelCollection.update(e)};QA.prototype.isDestroyed=function(){return!1};QA.prototype.destroy=function(){return this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),this._labelCollection=this._labelCollection&&this._labelCollection.destroy(),this._polylineCollection=this._polylineCollection&&this._polylineCollection.destroy(),fe(this)};var RN=QA;function Bg(e){this._batchTable=e.batchTable,this._batchIds=e.batchIds,this._positions=e.positions,this._counts=e.counts,this._indices=e.indices,this._indexCounts=e.indexCounts,this._indexOffsets=void 0,this._batchTableColors=void 0,this._packedBuffer=void 0,this._batchedPositions=void 0,this._transferrableBatchIds=void 0,this._vertexBatchIds=void 0,this._ellipsoid=e.ellipsoid??te.WGS84,this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._polygonMinimumHeights=e.polygonMinimumHeights,this._polygonMaximumHeights=e.polygonMaximumHeights,this._center=e.center??h.ZERO,this._rectangle=e.rectangle,this._center=void 0,this._boundingVolume=e.boundingVolume,this._boundingVolumes=void 0,this._batchedIndices=void 0,this._ready=!1,this._promise=void 0,this._error=void 0,this._primitive=void 0,this.debugWireframe=!1,this.forceRebatch=!1,this.classificationType=Wn.BOTH}Object.defineProperties(Bg.prototype,{trianglesLength:{get:function(){return l(this._primitive)?this._primitive.trianglesLength:0}},geometryByteLength:{get:function(){return l(this._primitive)?this._primitive.geometryByteLength:0}},ready:{get:function(){return this._ready}}});function Rit(e){let t=new Float64Array(3+h.packedLength+te.packedLength+oe.packedLength),n=0;return t[n++]=e._indices.BYTES_PER_ELEMENT,t[n++]=e._minimumHeight,t[n++]=e._maximumHeight,h.pack(e._center,t,n),n+=h.packedLength,te.pack(e._ellipsoid,t,n),n+=te.packedLength,oe.pack(e._rectangle,t,n),t}function Oit(e,t){let n=1,i=t[n++],o=e._boundingVolumes=new Array(i);for(let s=0;s<i;++s)o[s]=Qt.unpack(t,n),n+=Qt.packedLength;let r=t[n++],a=e._batchedIndices=new Array(r);for(let s=0;s<r;++s){let c=V.unpack(t,n);n+=V.packedLength;let u=t[n++],f=t[n++],d=t[n++],p=new Array(d);for(let g=0;g<d;++g)p[g]=t[n++];a[s]=new Ap({color:c,offset:u,count:f,batchIds:p})}}var Mit=new Gn("createVectorTilePolygons",5),Bit=new V;function Lit(e){if(l(e._primitive))return;let t=e._positions,n=e._counts,i=e._indexCounts,o=e._indices,r=e._transferrableBatchIds,a=e._batchTableColors,s=e._packedBuffer;if(!l(a)){t=e._positions=e._positions.slice(),n=e._counts=e._counts.slice(),i=e._indexCounts=e._indexCounts.slice(),o=e._indices=e._indices.slice(),e._center=e._ellipsoid.cartographicToCartesian(oe.center(e._rectangle)),r=e._transferrableBatchIds=new Uint32Array(e._batchIds),a=e._batchTableColors=new Uint32Array(r.length);let g=e._batchTable,m=a.length;for(let A=0;A<m;++A){let y=g.getColor(A,Bit);a[A]=y.toRgba()}s=e._packedBuffer=Rit(e)}let c=[t.buffer,n.buffer,i.buffer,o.buffer,r.buffer,a.buffer,s.buffer],u={packedBuffer:s.buffer,positions:t.buffer,counts:n.buffer,indexCounts:i.buffer,indices:o.buffer,batchIds:r.buffer,batchTableColors:a.buffer},f=e._polygonMinimumHeights,d=e._polygonMaximumHeights;l(f)&&l(d)&&(f=f.slice(),d=d.slice(),c.push(f.buffer,d.buffer),u.minimumHeights=f,u.maximumHeights=d);let p=Mit.scheduleTask(u,c);if(l(p))return p.then(g=>{if(e.isDestroyed())return;e._positions=void 0,e._counts=void 0,e._polygonMinimumHeights=void 0,e._polygonMaximumHeights=void 0;let m=new Float64Array(g.packedBuffer),A=m[0];Oit(e,m),e._indices=Ue.getSizeInBytes(A)===2?new Uint16Array(g.indices):new Uint32Array(g.indices),e._indexOffsets=new Uint32Array(g.indexOffsets),e._indexCounts=new Uint32Array(g.indexCounts),e._batchedPositions=new Float32Array(g.positions),e._vertexBatchIds=new Uint16Array(g.batchIds),Nit(e),e._ready=!0}).catch(g=>{e.isDestroyed()||(e._error=g)})}function Nit(e){l(e._primitive)||(e._primitive=new sb({batchTable:e._batchTable,positions:e._batchedPositions,batchIds:e._batchIds,vertexBatchIds:e._vertexBatchIds,indices:e._indices,indexOffsets:e._indexOffsets,indexCounts:e._indexCounts,batchedIndices:e._batchedIndices,boundingVolume:e._boundingVolume,boundingVolumes:e._boundingVolumes,center:e._center}),e._batchTable=void 0,e._batchIds=void 0,e._positions=void 0,e._counts=void 0,e._indices=void 0,e._indexCounts=void 0,e._indexOffsets=void 0,e._batchTableColors=void 0,e._packedBuffer=void 0,e._batchedPositions=void 0,e._transferrableBatchIds=void 0,e._vertexBatchIds=void 0,e._ellipsoid=void 0,e._minimumHeight=void 0,e._maximumHeight=void 0,e._polygonMinimumHeights=void 0,e._polygonMaximumHeights=void 0,e._center=void 0,e._rectangle=void 0,e._boundingVolume=void 0,e._boundingVolumes=void 0,e._batchedIndices=void 0)}Bg.prototype.createFeatures=function(e,t){this._primitive.createFeatures(e,t)};Bg.prototype.applyDebugSettings=function(e,t){this._primitive.applyDebugSettings(e,t)};Bg.prototype.applyStyle=function(e,t){this._primitive.applyStyle(e,t)};Bg.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)};Bg.prototype.update=function(e){if(!this._ready){if(l(this._promise)||(this._promise=Lit(this)),l(this._error)){let t=this._error;throw this._error=void 0,t}return}this._primitive.debugWireframe=this.debugWireframe,this._primitive.forceRebatch=this.forceRebatch,this._primitive.classificationType=this.classificationType,this._primitive.update(e)};Bg.prototype.isDestroyed=function(){return!1};Bg.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),fe(this)};var ON=Bg;var MN=`in vec4 currentPosition;
- in vec4 previousPosition;
- in vec4 nextPosition;
- in vec2 expandAndWidth;
- in float a_batchId;
-
- uniform mat4 u_modifiedModelView;
-
- void main()
- {
- float expandDir = expandAndWidth.x;
- float width = abs(expandAndWidth.y) + 0.5;
- bool usePrev = expandAndWidth.y < 0.0;
-
- vec4 p = u_modifiedModelView * currentPosition;
- vec4 prev = u_modifiedModelView * previousPosition;
- vec4 next = u_modifiedModelView * nextPosition;
-
- float angle;
- vec4 positionWC = getPolylineWindowCoordinatesEC(p, prev, next, expandDir, width, usePrev, angle);
- gl_Position = czm_viewportOrthographic * positionWC;
- }
- `;function fm(e){this._positions=e.positions,this._widths=e.widths,this._counts=e.counts,this._batchIds=e.batchIds,this._ellipsoid=e.ellipsoid??te.WGS84,this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._center=e.center,this._rectangle=e.rectangle,this._boundingVolume=e.boundingVolume,this._batchTable=e.batchTable,this._va=void 0,this._sp=void 0,this._rs=void 0,this._uniformMap=void 0,this._command=void 0,this._transferrableBatchIds=void 0,this._packedBuffer=void 0,this._keepDecodedPositions=e.keepDecodedPositions,this._decodedPositions=void 0,this._decodedPositionOffsets=void 0,this._currentPositions=void 0,this._previousPositions=void 0,this._nextPositions=void 0,this._expandAndWidth=void 0,this._vertexBatchIds=void 0,this._indices=void 0,this._constantColor=V.clone(V.WHITE),this._highlightColor=this._constantColor,this._trianglesLength=0,this._geometryByteLength=0,this._ready=!1,this._promise=void 0,this._error=void 0}Object.defineProperties(fm.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},ready:{get:function(){return this._ready}}});function Fit(e){let t=e._rectangle,n=e._minimumHeight,i=e._maximumHeight,o=e._ellipsoid,r=e._center,a=2+oe.packedLength+te.packedLength+h.packedLength,s=new Float64Array(a),c=0;return s[c++]=n,s[c++]=i,oe.pack(t,s,c),c+=oe.packedLength,te.pack(o,s,c),c+=te.packedLength,h.pack(r,s,c),s}var kit=new Gn("createVectorTilePolylines",5),uS={previousPosition:0,currentPosition:1,nextPosition:2,expandAndWidth:3,a_batchId:4};function zit(e,t){if(l(e._va))return;let n=e._positions,i=e._widths,o=e._counts,r=e._transferrableBatchIds,a=e._packedBuffer;l(a)||(n=e._positions=n.slice(),i=e._widths=i.slice(),o=e._counts=o.slice(),r=e._transferrableBatchIds=e._batchIds.slice(),a=e._packedBuffer=Fit(e));let s=[n.buffer,i.buffer,o.buffer,r.buffer,a.buffer],c={positions:n.buffer,widths:i.buffer,counts:o.buffer,batchIds:r.buffer,packedBuffer:a.buffer,keepDecodedPositions:e._keepDecodedPositions},u=kit.scheduleTask(c,s);if(l(u))return u.then(function(f){if(e.isDestroyed())return;e._keepDecodedPositions&&(e._decodedPositions=new Float64Array(f.decodedPositions),e._decodedPositionOffsets=new Uint32Array(f.decodedPositionOffsets)),e._currentPositions=new Float32Array(f.currentPositions),e._previousPositions=new Float32Array(f.previousPositions),e._nextPositions=new Float32Array(f.nextPositions),e._expandAndWidth=new Float32Array(f.expandAndWidth),e._vertexBatchIds=new Uint16Array(f.batchIds);let d=f.indexDatatype;e._indices=d===Ue.UNSIGNED_SHORT?new Uint16Array(f.indices):new Uint32Array(f.indices),Uit(e,t),e._ready=!0}).catch(f=>{e.isDestroyed()||(e._error=f)})}function Uit(e,t){if(!l(e._va)){let n=e._currentPositions,i=e._previousPositions,o=e._nextPositions,r=e._expandAndWidth,a=e._vertexBatchIds,s=e._indices,c=i.byteLength+n.byteLength+o.byteLength;c+=r.byteLength+a.byteLength+s.byteLength,e._trianglesLength=s.length/3,e._geometryByteLength=c;let u=Ke.createVertexBuffer({context:t,typedArray:i,usage:Oe.STATIC_DRAW}),f=Ke.createVertexBuffer({context:t,typedArray:n,usage:Oe.STATIC_DRAW}),d=Ke.createVertexBuffer({context:t,typedArray:o,usage:Oe.STATIC_DRAW}),p=Ke.createVertexBuffer({context:t,typedArray:r,usage:Oe.STATIC_DRAW}),g=Ke.createVertexBuffer({context:t,typedArray:a,usage:Oe.STATIC_DRAW}),m=Ke.createIndexBuffer({context:t,typedArray:s,usage:Oe.STATIC_DRAW,indexDatatype:s.BYTES_PER_ELEMENT===2?Ue.UNSIGNED_SHORT:Ue.UNSIGNED_INT}),A=[{index:uS.previousPosition,vertexBuffer:u,componentDatatype:Y.FLOAT,componentsPerAttribute:3},{index:uS.currentPosition,vertexBuffer:f,componentDatatype:Y.FLOAT,componentsPerAttribute:3},{index:uS.nextPosition,vertexBuffer:d,componentDatatype:Y.FLOAT,componentsPerAttribute:3},{index:uS.expandAndWidth,vertexBuffer:p,componentDatatype:Y.FLOAT,componentsPerAttribute:2},{index:uS.a_batchId,vertexBuffer:g,componentDatatype:Y.UNSIGNED_SHORT,componentsPerAttribute:1}];e._va=new Fn({context:t,attributes:A,indexBuffer:m}),e._positions=void 0,e._widths=void 0,e._counts=void 0,e._ellipsoid=void 0,e._minimumHeight=void 0,e._maximumHeight=void 0,e._rectangle=void 0,e._transferrableBatchIds=void 0,e._packedBuffer=void 0,e._currentPositions=void 0,e._previousPositions=void 0,e._nextPositions=void 0,e._expandAndWidth=void 0,e._vertexBatchIds=void 0,e._indices=void 0}}var BN=new M,u_e=new h;function Vit(e,t){l(e._uniformMap)||(e._uniformMap={u_modifiedModelView:function(){let n=t.uniformState.view;return M.clone(n,BN),M.multiplyByPoint(BN,e._center,u_e),M.setTranslation(BN,u_e,BN),BN},u_highlightColor:function(){return e._highlightColor}})}function jit(e){if(l(e._rs))return;let t={enabled:!0,factor:-5,units:-5};e._rs=Ve.fromCache({blending:Jt.ALPHA_BLEND,depthMask:!1,depthTest:{enabled:!0},polygonOffset:t})}var Git=`uniform vec4 u_highlightColor;
- void main()
- {
- out_FragColor = u_highlightColor;
- }
- `;function Hit(e,t){if(l(e._sp))return;let n=e._batchTable,i=n.getVertexShaderCallback(!1,"a_batchId",void 0)(MN),o=n.getFragmentShaderCallback(!1,void 0,!1)(Git),r=new He({defines:["VECTOR_TILE","CLIP_POLYLINE"],sources:[kl,i]}),a=new He({defines:["VECTOR_TILE"],sources:[o]});e._sp=Kt.fromCache({context:t,vertexShaderSource:r,fragmentShaderSource:a,attributeLocations:uS})}function Wit(e,t){if(!l(e._command)){let n=e._batchTable.getUniformMapCallback()(e._uniformMap);e._command=new tt({owner:e,vertexArray:e._va,renderState:e._rs,shaderProgram:e._sp,uniformMap:n,boundingVolume:e._boundingVolume,pass:Ie.TRANSLUCENT,pickId:e._batchTable.getPickId()})}t.commandList.push(e._command)}fm.getPolylinePositions=function(e,t){let n=e._batchIds,i=e._decodedPositions,o=e._decodedPositionOffsets;if(!l(n)||!l(i))return;let r,a,s=n.length,c=0,u=0;for(r=0;r<s;++r)n[r]===t&&(c+=o[r+1]-o[r]);if(c===0)return;let f=new Float64Array(c*3);for(r=0;r<s;++r)if(n[r]===t){let d=o[r],p=o[r+1]-d;for(a=0;a<p;++a){let g=(d+a)*3;f[u++]=i[g],f[u++]=i[g+1],f[u++]=i[g+2]}}return f};fm.prototype.getPositions=function(e){return fm.getPolylinePositions(this,e)};fm.prototype.createFeatures=function(e,t){let n=this._batchIds,i=n.length;for(let o=0;o<i;++o){let r=n[o];t[r]=new Qa(e,r)}};fm.prototype.applyDebugSettings=function(e,t){this._highlightColor=e?t:this._constantColor};function qit(e,t){let n=e._batchIds,i=n.length;for(let o=0;o<i;++o){let r=n[o],a=t[r];a.show=!0,a.color=V.WHITE}}var Yit=new V,Xit=V.WHITE,Kit=!0;fm.prototype.applyStyle=function(e,t){if(!l(e)){qit(this,t);return}let n=this._batchIds,i=n.length;for(let o=0;o<i;++o){let r=n[o],a=t[r];a.color=l(e.color)?e.color.evaluateColor(a,Yit):Xit,a.show=l(e.show)?e.show.evaluate(a):Kit}};fm.prototype.update=function(e){let t=e.context;if(!this._ready){if(l(this._promise)||(this._promise=zit(this,t)),l(this._error)){let i=this._error;throw this._error=void 0,i}return}Vit(this,t),Hit(this,t),jit(this);let n=e.passes;(n.render||n.pick)&&Wit(this,e)};fm.prototype.isDestroyed=function(){return!1};fm.prototype.destroy=function(){return this._va=this._va&&this._va.destroy(),this._sp=this._sp&&this._sp.destroy(),fe(this)};var Gb=fm;var LN=`in vec3 startEllipsoidNormal;
- in vec3 endEllipsoidNormal;
- in vec4 startPositionAndHeight;
- in vec4 endPositionAndHeight;
- in vec4 startFaceNormalAndVertexCorner;
- in vec4 endFaceNormalAndHalfWidth;
- in float a_batchId;
-
- uniform mat4 u_modifiedModelView;
- uniform vec2 u_minimumMaximumVectorHeights;
-
- out vec4 v_startPlaneEC;
- out vec4 v_endPlaneEC;
- out vec4 v_rightPlaneEC;
- out float v_halfWidth;
- out vec3 v_volumeUpEC;
-
- void main()
- {
- // vertex corner IDs
- // 3-----------7
- // /| left /|
- // / | 1 / |
- // 2-----------6 5 end
- // | / | /
- // start |/ right |/
- // 0-----------4
- //
- float isEnd = floor(startFaceNormalAndVertexCorner.w * 0.251); // 0 for front, 1 for end
- float isTop = floor(startFaceNormalAndVertexCorner.w * mix(0.51, 0.19, isEnd)); // 0 for bottom, 1 for top
-
- vec3 forward = endPositionAndHeight.xyz - startPositionAndHeight.xyz;
- vec3 right = normalize(cross(forward, startEllipsoidNormal));
-
- vec4 position = vec4(startPositionAndHeight.xyz, 1.0);
- position.xyz += forward * isEnd;
-
- v_volumeUpEC = czm_normal * normalize(cross(right, forward));
-
- // Push for volume height
- float offset;
- vec3 ellipsoidNormal = mix(startEllipsoidNormal, endEllipsoidNormal, isEnd);
-
- // offset height to create volume
- offset = mix(startPositionAndHeight.w, endPositionAndHeight.w, isEnd);
- offset = mix(u_minimumMaximumVectorHeights.y, u_minimumMaximumVectorHeights.x, isTop) - offset;
- position.xyz += offset * ellipsoidNormal;
-
- // move from RTC to EC
- position = u_modifiedModelView * position;
- right = czm_normal * right;
-
- // Push for width in a direction that is in the start or end plane and in a plane with right
- // N = normalEC ("right-facing" direction for push)
- // R = right
- // p = angle between N and R
- // w = distance to push along R if R == N
- // d = distance to push along N
- //
- // N R
- // { p| } * cos(p) = dot(N, R) = w / d
- // d | |w * d = w / dot(N, R)
- // { | }
- // o---------- polyline segment ---->
- //
- vec3 scratchNormal = mix(-startFaceNormalAndVertexCorner.xyz, endFaceNormalAndHalfWidth.xyz, isEnd);
- scratchNormal = cross(scratchNormal, mix(startEllipsoidNormal, endEllipsoidNormal, isEnd));
- vec3 miterPushNormal = czm_normal * normalize(scratchNormal);
-
- offset = 2.0 * endFaceNormalAndHalfWidth.w * max(0.0, czm_metersPerPixel(position)); // offset = widthEC
- offset = offset / dot(miterPushNormal, right);
- position.xyz += miterPushNormal * (offset * sign(0.5 - mod(startFaceNormalAndVertexCorner.w, 2.0)));
-
- gl_Position = czm_depthClamp(czm_projection * position);
-
- position = u_modifiedModelView * vec4(startPositionAndHeight.xyz, 1.0);
- vec3 startNormalEC = czm_normal * startFaceNormalAndVertexCorner.xyz;
- v_startPlaneEC = vec4(startNormalEC, -dot(startNormalEC, position.xyz));
- v_rightPlaneEC = vec4(right, -dot(right, position.xyz));
-
- position = u_modifiedModelView * vec4(endPositionAndHeight.xyz, 1.0);
- vec3 endNormalEC = czm_normal * endFaceNormalAndHalfWidth.xyz;
- v_endPlaneEC = vec4(endNormalEC, -dot(endNormalEC, position.xyz));
- v_halfWidth = endFaceNormalAndHalfWidth.w;
- }
- `;var NN=`in vec4 v_startPlaneEC;
- in vec4 v_endPlaneEC;
- in vec4 v_rightPlaneEC;
- in float v_halfWidth;
- in vec3 v_volumeUpEC;
-
- uniform vec4 u_highlightColor;
- void main()
- {
- float logDepthOrDepth = czm_branchFreeTernary(czm_sceneMode == czm_sceneMode2D, gl_FragCoord.z, czm_unpackDepth(texture(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw)));
-
- // Discard for sky
- if (logDepthOrDepth == 0.0) {
- #ifdef DEBUG_SHOW_VOLUME
- out_FragColor = vec4(0.0, 0.0, 1.0, 0.5);
- return;
- #else // DEBUG_SHOW_VOLUME
- discard;
- #endif // DEBUG_SHOW_VOLUME
- }
-
- vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);
- eyeCoordinate /= eyeCoordinate.w;
-
- float halfMaxWidth = v_halfWidth * czm_metersPerPixel(eyeCoordinate);
-
- // Expand halfMaxWidth if direction to camera is almost perpendicular with the volume's up direction
- halfMaxWidth += halfMaxWidth * (1.0 - dot(-normalize(eyeCoordinate.xyz), v_volumeUpEC));
-
- // Check distance of the eye coordinate against the right-facing plane
- float widthwiseDistance = czm_planeDistance(v_rightPlaneEC, eyeCoordinate.xyz);
-
- // Check eye coordinate against the mitering planes
- float distanceFromStart = czm_planeDistance(v_startPlaneEC, eyeCoordinate.xyz);
- float distanceFromEnd = czm_planeDistance(v_endPlaneEC, eyeCoordinate.xyz);
-
- if (abs(widthwiseDistance) > halfMaxWidth || distanceFromStart < 0.0 || distanceFromEnd < 0.0) {
- #ifdef DEBUG_SHOW_VOLUME
- out_FragColor = vec4(logDepthOrDepth, 0.0, 0.0, 0.5);
- return;
- #else // DEBUG_SHOW_VOLUME
- discard;
- #endif // DEBUG_SHOW_VOLUME
- }
- out_FragColor = u_highlightColor;
-
- czm_writeDepthClamp();
- }
- `;function Lg(e){this._positions=e.positions,this._widths=e.widths,this._counts=e.counts,this._batchIds=e.batchIds,this._ellipsoid=e.ellipsoid??te.WGS84,this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._center=e.center,this._rectangle=e.rectangle,this._batchTable=e.batchTable,this._va=void 0,this._sp=void 0,this._rs=void 0,this._uniformMap=void 0,this._command=void 0,this._transferrableBatchIds=void 0,this._packedBuffer=void 0,this._minimumMaximumVectorHeights=new z(vi._defaultMinTerrainHeight,vi._defaultMaxTerrainHeight),this._boundingVolume=Qt.fromRectangle(e.rectangle,vi._defaultMinTerrainHeight,vi._defaultMaxTerrainHeight,this._ellipsoid),this._classificationType=e.classificationType,this._keepDecodedPositions=e.keepDecodedPositions,this._decodedPositions=void 0,this._decodedPositionOffsets=void 0,this._startEllipsoidNormals=void 0,this._endEllipsoidNormals=void 0,this._startPositionAndHeights=void 0,this._startFaceNormalAndVertexCornerIds=void 0,this._endPositionAndHeights=void 0,this._endFaceNormalAndHalfWidths=void 0,this._vertexBatchIds=void 0,this._indices=void 0,this._constantColor=V.clone(V.WHITE),this._highlightColor=this._constantColor,this._trianglesLength=0,this._geometryByteLength=0,this._ready=!1,this._promise=void 0,this._error=void 0}Object.defineProperties(Lg.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},ready:{get:function(){return this._ready}}});function Qit(e,t,n){let i=vi.getMinimumMaximumHeights(t,n),o=i.minimumTerrainHeight,r=i.maximumTerrainHeight,a=e._minimumMaximumVectorHeights;a.x=o,a.y=r;let s=e._boundingVolume,c=e._rectangle;Qt.fromRectangle(c,o,r,n,s)}function $it(e){let t=e._rectangle,n=e._minimumHeight,i=e._maximumHeight,o=e._ellipsoid,r=e._center,a=2+oe.packedLength+te.packedLength+h.packedLength,s=new Float64Array(a),c=0;return s[c++]=n,s[c++]=i,oe.pack(t,s,c),c+=oe.packedLength,te.pack(o,s,c),c+=te.packedLength,h.pack(r,s,c),s}var Jit=new Gn("createVectorTileClampedPolylines"),$A={startEllipsoidNormal:0,endEllipsoidNormal:1,startPositionAndHeight:2,endPositionAndHeight:3,startFaceNormalAndVertexCorner:4,endFaceNormalAndHalfWidth:5,a_batchId:6};function Zit(e,t){if(l(e._va))return;let n=e._positions,i=e._widths,o=e._counts,r=e._transferrableBatchIds,a=e._packedBuffer;l(a)||(n=e._positions=n.slice(),i=e._widths=i.slice(),o=e._counts=o.slice(),r=e._transferrableBatchIds=e._batchIds.slice(),a=e._packedBuffer=$it(e));let s=[n.buffer,i.buffer,o.buffer,r.buffer,a.buffer],c={positions:n.buffer,widths:i.buffer,counts:o.buffer,batchIds:r.buffer,packedBuffer:a.buffer,keepDecodedPositions:e._keepDecodedPositions},u=Jit.scheduleTask(c,s);if(l(u))return u.then(function(f){if(e.isDestroyed())return;e._keepDecodedPositions&&(e._decodedPositions=new Float64Array(f.decodedPositions),e._decodedPositionOffsets=new Uint32Array(f.decodedPositionOffsets)),e._startEllipsoidNormals=new Float32Array(f.startEllipsoidNormals),e._endEllipsoidNormals=new Float32Array(f.endEllipsoidNormals),e._startPositionAndHeights=new Float32Array(f.startPositionAndHeights),e._startFaceNormalAndVertexCornerIds=new Float32Array(f.startFaceNormalAndVertexCornerIds),e._endPositionAndHeights=new Float32Array(f.endPositionAndHeights),e._endFaceNormalAndHalfWidths=new Float32Array(f.endFaceNormalAndHalfWidths),e._vertexBatchIds=new Uint16Array(f.vertexBatchIds);let d=f.indexDatatype;e._indices=d===Ue.UNSIGNED_SHORT?new Uint16Array(f.indices):new Uint32Array(f.indices),eot(e,t),e._ready=!0}).catch(f=>{e.isDestroyed()||(e._error=f)})}function eot(e,t){if(!l(e._va)){let n=e._startEllipsoidNormals,i=e._endEllipsoidNormals,o=e._startPositionAndHeights,r=e._endPositionAndHeights,a=e._startFaceNormalAndVertexCornerIds,s=e._endFaceNormalAndHalfWidths,c=e._vertexBatchIds,u=e._indices,f=n.byteLength+i.byteLength;f+=o.byteLength+r.byteLength,f+=a.byteLength+s.byteLength,f+=c.byteLength+u.byteLength,e._trianglesLength=u.length/3,e._geometryByteLength=f;let d=Ke.createVertexBuffer({context:t,typedArray:n,usage:Oe.STATIC_DRAW}),p=Ke.createVertexBuffer({context:t,typedArray:i,usage:Oe.STATIC_DRAW}),g=Ke.createVertexBuffer({context:t,typedArray:o,usage:Oe.STATIC_DRAW}),m=Ke.createVertexBuffer({context:t,typedArray:r,usage:Oe.STATIC_DRAW}),A=Ke.createVertexBuffer({context:t,typedArray:a,usage:Oe.STATIC_DRAW}),y=Ke.createVertexBuffer({context:t,typedArray:s,usage:Oe.STATIC_DRAW}),x=Ke.createVertexBuffer({context:t,typedArray:c,usage:Oe.STATIC_DRAW}),b=Ke.createIndexBuffer({context:t,typedArray:u,usage:Oe.STATIC_DRAW,indexDatatype:u.BYTES_PER_ELEMENT===2?Ue.UNSIGNED_SHORT:Ue.UNSIGNED_INT}),C=[{index:$A.startEllipsoidNormal,vertexBuffer:d,componentDatatype:Y.FLOAT,componentsPerAttribute:3},{index:$A.endEllipsoidNormal,vertexBuffer:p,componentDatatype:Y.FLOAT,componentsPerAttribute:3},{index:$A.startPositionAndHeight,vertexBuffer:g,componentDatatype:Y.FLOAT,componentsPerAttribute:4},{index:$A.endPositionAndHeight,vertexBuffer:m,componentDatatype:Y.FLOAT,componentsPerAttribute:4},{index:$A.startFaceNormalAndVertexCorner,vertexBuffer:A,componentDatatype:Y.FLOAT,componentsPerAttribute:4},{index:$A.endFaceNormalAndHalfWidth,vertexBuffer:y,componentDatatype:Y.FLOAT,componentsPerAttribute:4},{index:$A.a_batchId,vertexBuffer:x,componentDatatype:Y.UNSIGNED_SHORT,componentsPerAttribute:1}];e._va=new Fn({context:t,attributes:C,indexBuffer:b}),e._positions=void 0,e._widths=void 0,e._counts=void 0,e._ellipsoid=void 0,e._minimumHeight=void 0,e._maximumHeight=void 0,e._rectangle=void 0,e._transferrableBatchIds=void 0,e._packedBuffer=void 0,e._startEllipsoidNormals=void 0,e._endEllipsoidNormals=void 0,e._startPositionAndHeights=void 0,e._startFaceNormalAndVertexCornerIds=void 0,e._endPositionAndHeights=void 0,e._endFaceNormalAndHalfWidths=void 0,e._vertexBatchIds=void 0,e._indices=void 0}}var FN=new M,f_e=new h;function tot(e,t){l(e._uniformMap)||(e._uniformMap={u_modifiedModelView:function(){let n=t.uniformState.view;return M.clone(n,FN),M.multiplyByPoint(FN,e._center,f_e),M.setTranslation(FN,f_e,FN),FN},u_highlightColor:function(){return e._highlightColor},u_minimumMaximumVectorHeights:function(){return e._minimumMaximumVectorHeights}})}function d_e(e){return Ve.fromCache({cull:{enabled:!0,face:Mi.FRONT},blending:Jt.PRE_MULTIPLIED_ALPHA_BLEND,depthMask:!1,stencilTest:{enabled:e,frontFunction:qn.EQUAL,frontOperation:{fail:vt.KEEP,zFail:vt.KEEP,zPass:vt.KEEP},backFunction:qn.EQUAL,backOperation:{fail:vt.KEEP,zFail:vt.KEEP,zPass:vt.KEEP},reference:Gt.CESIUM_3D_TILE_MASK,mask:Gt.CESIUM_3D_TILE_MASK}})}function not(e){l(e._rs)||(e._rs=d_e(!1),e._rs3DTiles=d_e(!0))}function iot(e,t){if(l(e._sp))return;let n=e._batchTable,i=n.getVertexShaderCallback(!1,"a_batchId",void 0)(LN),o=n.getFragmentShaderCallback(!1,void 0,!0)(NN),r=new He({defines:["VECTOR_TILE","CLIP_POLYLINE"],sources:[kl,i]}),a=new He({defines:["VECTOR_TILE"],sources:[o]});e._sp=Kt.fromCache({context:t,vertexShaderSource:r,fragmentShaderSource:a,attributeLocations:$A})}function oot(e,t){let n=e._command;if(!l(e._command)){let o=e._batchTable.getUniformMapCallback()(e._uniformMap);n=e._command=new tt({owner:e,vertexArray:e._va,renderState:e._rs,shaderProgram:e._sp,uniformMap:o,boundingVolume:e._boundingVolume,pass:Ie.TERRAIN_CLASSIFICATION,pickId:e._batchTable.getPickId()});let r=tt.shallowClone(n,n.derivedCommands.tileset);r.renderState=e._rs3DTiles,r.pass=Ie.CESIUM_3D_TILE_CLASSIFICATION,n.derivedCommands.tileset=r}let i=e._classificationType;(i===Wn.TERRAIN||i===Wn.BOTH)&&t.commandList.push(n),(i===Wn.CESIUM_3D_TILE||i===Wn.BOTH)&&t.commandList.push(n.derivedCommands.tileset)}Lg.prototype.getPositions=function(e){return Gb.getPolylinePositions(this,e)};Lg.prototype.createFeatures=function(e,t){let n=this._batchIds,i=n.length;for(let o=0;o<i;++o){let r=n[o];t[r]=new Qa(e,r)}};Lg.prototype.applyDebugSettings=function(e,t){this._highlightColor=e?t:this._constantColor};function rot(e,t){let n=e._batchIds,i=n.length;for(let o=0;o<i;++o){let r=n[o],a=t[r];a.show=!0,a.color=V.WHITE}}var aot=new V,sot=V.WHITE,cot=!0;Lg.prototype.applyStyle=function(e,t){if(!l(e)){rot(this,t);return}let n=this._batchIds,i=n.length;for(let o=0;o<i;++o){let r=n[o],a=t[r];a.color=l(e.color)?e.color.evaluateColor(a,aot):sot,a.show=l(e.show)?e.show.evaluate(a):cot}};function lot(e){return vi.initialize().then(function(){Qit(e,e._rectangle,e._ellipsoid)}).catch(t=>{e.isDestroyed()||(e._error=t)})}Lg.prototype.update=function(e){let t=e.context;if(!this._ready){if(l(this._promise)||(this._promise=lot(this).then(Zit(this,t))),l(this._error)){let i=this._error;throw this._error=void 0,i}return}tot(this,t),iot(this,t),not(this);let n=e.passes;(n.render||n.pick)&&oot(this,e)};Lg.prototype.isDestroyed=function(){return!1};Lg.prototype.destroy=function(){return this._va=this._va&&this._va.destroy(),this._sp=this._sp&&this._sp.destroy(),fe(this)};var kN=Lg;var fQ=32767,uot=new de,fot=new h;function dot(e,t,n,i,o){let r=e.length/3,a=e.subarray(0,r),s=e.subarray(r,2*r),c=e.subarray(2*r,3*r);nn.zigZagDeltaDecode(a,s,c);let u=new Float64Array(e.length);for(let f=0;f<r;++f){let d=a[f],p=s[f],g=c[f],m=D.lerp(t.west,t.east,d/fQ),A=D.lerp(t.south,t.north,p/fQ),y=D.lerp(n,i,g/fQ),x=de.fromRadians(m,A,y,uot),b=o.cartographicToCartesian(x,fot);h.pack(b,u,f*3)}return u}var zN=dot;var hQ=class{constructor(t,n,i,o,r){this._tileset=t,this._tile=n,this._resource=i,this._polygons=void 0,this._polylines=void 0,this._points=void 0,this._metadata=void 0,this._batchTable=void 0,this._features=void 0,this.featurePropertiesDirty=!1,this._group=void 0,this._ready=!1,_ot(this,o,r)}get featuresLength(){return l(this._batchTable)?this._batchTable.featuresLength:0}get pointsLength(){return l(this._points)?this._points.pointsLength:0}get trianglesLength(){let t=0;return l(this._polygons)&&(t+=this._polygons.trianglesLength),l(this._polylines)&&(t+=this._polylines.trianglesLength),t}get geometryByteLength(){let t=0;return l(this._polygons)&&(t+=this._polygons.geometryByteLength),l(this._polylines)&&(t+=this._polylines.geometryByteLength),t}get texturesByteLength(){return l(this._points)?this._points.texturesByteLength:0}get batchTableByteLength(){return l(this._batchTable)?this._batchTable.batchTableByteLength:0}get innerContents(){}get ready(){return this._ready}get tileset(){return this._tileset}get tile(){return this._tile}get url(){return this._resource.getUrlComponent(!0)}get metadata(){return this._metadata}set metadata(t){this._metadata=t}get batchTable(){return this._batchTable}get group(){return this._group}set group(t){this._group=t}hasProperty(t,n){return this._batchTable.hasProperty(t,n)}getFeature(t){return l(this._features)||dQ(this),this._features[t]}applyDebugSettings(t,n){l(this._polygons)&&this._polygons.applyDebugSettings(t,n),l(this._polylines)&&this._polylines.applyDebugSettings(t,n),l(this._points)&&this._points.applyDebugSettings(t,n)}applyStyle(t){l(this._features)||dQ(this),l(this._polygons)&&this._polygons.applyStyle(t,this._features),l(this._polylines)&&this._polylines.applyStyle(t,this._features),l(this._points)&&this._points.applyStyle(t,this._features)}update(t,n){let i=!0;l(this._polygons)&&(this._polygons.classificationType=this._tileset.classificationType,this._polygons.debugWireframe=this._tileset.debugWireframe,this._polygons.update(n),i=i&&this._polygons.ready),l(this._polylines)&&(this._polylines.update(n),i=i&&this._polylines.ready),l(this._points)&&(this._points.update(n),i=i&&this._points.ready),l(this._batchTable)&&i&&(l(this._features)||dQ(this),this._batchTable.update(t,n),this._ready=!0)}pick(t,n,i){}getPolylinePositions(t){let n=this._polylines;if(l(n))return n.getPositions(t)}isDestroyed(){return!1}destroy(){return this._polygons=this._polygons&&this._polygons.destroy(),this._polylines=this._polylines&&this._polylines.destroy(),this._points=this._points&&this._points.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),fe(this)}};function hot(e){return function(t,n){l(e._polygons)&&e._polygons.updateCommands(t,n)}}function mot(e,t){let n,i,o,r,a=e.POLYGONS_LENGTH??0,s=e.POLYLINES_LENGTH??0,c=e.POINTS_LENGTH??0;if(a>0&&l(e.POLYGON_BATCH_IDS)){let p=t.byteOffset+e.POLYGON_BATCH_IDS.byteOffset;n=new Uint16Array(t.buffer,p,a)}if(s>0&&l(e.POLYLINE_BATCH_IDS)){let p=t.byteOffset+e.POLYLINE_BATCH_IDS.byteOffset;i=new Uint16Array(t.buffer,p,s)}if(c>0&&l(e.POINT_BATCH_IDS)){let p=t.byteOffset+e.POINT_BATCH_IDS.byteOffset;o=new Uint16Array(t.buffer,p,c)}let u=l(n)||l(i)||l(o),f=a>0&&!l(n)||s>0&&!l(i)||c>0&&!l(o);if(u&&f)throw new re("If one group of batch ids is defined, then all batch ids must be defined");if(!l(n)&&!l(i)&&!l(o)){let p=0;if(!l(n)&&a>0)for(n=new Uint16Array(a),r=0;r<a;++r)n[r]=p++;if(!l(i)&&s>0)for(i=new Uint16Array(s),r=0;r<s;++r)i[r]=p++;if(!l(o)&&c>0)for(o=new Uint16Array(c),r=0;r<c;++r)o[r]=p++}return{polygons:n,polylines:i,points:o}}var dm=Uint32Array.BYTES_PER_ELEMENT;function pot(e){return new Gb(e)}function got(e){return new kN(e)}function _ot(e,t,n){n=n??0;let i=new Uint8Array(t),o=new DataView(t);n+=dm;let r=o.getUint32(n,!0);if(r!==1)throw new re(`Only Vector tile version 1 is supported. Version ${r} is not.`);n+=dm;let a=o.getUint32(n,!0);if(n+=dm,a===0){e._ready=!0;return}let s=o.getUint32(n,!0);if(n+=dm,s===0)throw new re("Feature table must have a byte length greater than zero");let c=o.getUint32(n,!0);n+=dm;let u=o.getUint32(n,!0);n+=dm;let f=o.getUint32(n,!0);n+=dm;let d=o.getUint32(n,!0);n+=dm;let p=o.getUint32(n,!0);n+=dm;let g=o.getUint32(n,!0);n+=dm;let m=o.getUint32(n,!0);n+=dm;let A=Cr(i,n,s);n+=s;let y=new Uint8Array(t,n,c);n+=c;let x,b;u>0&&(x=Cr(i,n,u),n+=u,f>0&&(b=new Uint8Array(t,n,f),b=new Uint8Array(b),n+=f));let C=A.POLYGONS_LENGTH??0,E=A.POLYLINES_LENGTH??0,S=A.POINTS_LENGTH??0,w=C+E+S,P=new qh(e,w,x,b,hot(e));if(e._batchTable=P,w===0)return;let R=new Zh(A,y),B=R.getGlobalProperty("REGION");if(!l(B))throw new re("Feature table global property: REGION must be defined");let L=oe.unpack(B),_=B[4],T=B[5],v=e._tile.computedTransform,I=R.getGlobalProperty("RTC_CENTER",Y.FLOAT,3);l(I)?(I=h.unpack(I),M.multiplyByPoint(v,I,I)):(I=oe.center(L),I.height=D.lerp(_,T,.5),I=te.WGS84.cartographicToCartesian(I));let O=mot(A,y);if(n+=(4-n%4)%4,C>0){R.featuresLength=C;let j=R.getPropertyArray("POLYGON_COUNTS",Y.UNSIGNED_INT,1)??R.getPropertyArray("POLYGON_COUNT",Y.UNSIGNED_INT,1);if(!l(j))throw new re("Feature table property: POLYGON_COUNTS must be defined when POLYGONS_LENGTH is greater than 0");let k=R.getPropertyArray("POLYGON_INDEX_COUNTS",Y.UNSIGNED_INT,1)??R.getPropertyArray("POLYGON_INDEX_COUNT",Y.UNSIGNED_INT,1);if(!l(k))throw new re("Feature table property: POLYGON_INDEX_COUNTS must be defined when POLYGONS_LENGTH is greater than 0");let U=j.reduce(function(Z,K){return Z+K*2},0),F=k.reduce(function(Z,K){return Z+K},0),H=new Uint32Array(t,n,F);n+=d;let q=new Uint16Array(t,n,U);n+=p;let J,W;l(A.POLYGON_MINIMUM_HEIGHTS)&&l(A.POLYGON_MAXIMUM_HEIGHTS)&&(J=R.getPropertyArray("POLYGON_MINIMUM_HEIGHTS",Y.FLOAT,1),W=R.getPropertyArray("POLYGON_MAXIMUM_HEIGHTS",Y.FLOAT,1)),e._polygons=new ON({positions:q,counts:j,indexCounts:k,indices:H,minimumHeight:_,maximumHeight:T,polygonMinimumHeights:J,polygonMaximumHeights:W,center:I,rectangle:L,boundingVolume:e.tile.boundingVolume.boundingVolume,batchTable:P,batchIds:O.polygons,modelMatrix:v})}let N=e._tileset;if(E>0){R.featuresLength=E;let j=R.getPropertyArray("POLYLINE_COUNTS",Y.UNSIGNED_INT,1)??R.getPropertyArray("POLYLINE_COUNT",Y.UNSIGNED_INT,1);if(!l(j))throw new re("Feature table property: POLYLINE_COUNTS must be defined when POLYLINES_LENGTH is greater than 0");let k=R.getPropertyArray("POLYLINE_WIDTHS",Y.UNSIGNED_SHORT,1);if(!l(k)){k=new Uint16Array(E);for(let J=0;J<E;++J)k[J]=2}let U=j.reduce(function(J,W){return J+W*3},0),F=new Uint16Array(t,n,U);n+=g;let H=N.examineVectorLinesFunction;if(l(H)){let J=zN(new Uint16Array(F),L,_,T,te.WGS84);Aot(J,j,O.polylines,P,e.url,H)}let q=pot;l(N.classificationType)&&(q=got),e._polylines=q({positions:F,widths:k,counts:j,batchIds:O.polylines,minimumHeight:_,maximumHeight:T,center:I,rectangle:L,boundingVolume:e.tile.boundingVolume.boundingVolume,batchTable:P,classificationType:N.classificationType,keepDecodedPositions:N.vectorKeepDecodedPositions})}if(S>0){let j=new Uint16Array(t,n,S*3);n+=m,e._points=new RN({positions:j,batchIds:O.points,minimumHeight:_,maximumHeight:T,rectangle:L,batchTable:P,heightReference:N.heightReference,scene:N.scene})}}function dQ(e){let t=e.featuresLength;if(!l(e._features)&&t>0){let n=new Array(t);l(e._polygons)&&e._polygons.createFeatures(e,n),l(e._polylines)&&e._polylines.createFeatures(e,n),l(e._points)&&e._points.createFeatures(e,n),e._features=n}}function Aot(e,t,n,i,o,r){let a=t.length,s=0;for(let c=0;c<a;c++){let u=t[c]*3,f=e.slice(s,s+u);s+=u,r(f,n[c],o,i)}}var UN=hQ;var hm=class hm{constructor(){lt(this,"_collection",null);lt(this,"_index",-1);lt(this,"_byteOffset",-1)}static clone(t,n){let i=t._collection._getMaterialClass();return n.featureId=t.featureId,n.show=t.show,n.setMaterial(t.getMaterial(new i)),n}_isResizable(){return this._index===this._collection.primitiveCount-1}get featureId(){return this._getUint32(hm.Layout.FEATURE_ID_U32)}set featureId(t){this._setUint32(hm.Layout.FEATURE_ID_U32,t)}get show(){return this._getUint8(hm.Layout.SHOW_U8)===1}set show(t){this._setUint8(hm.Layout.SHOW_U8,t?1:0)}getMaterial(t){let n=this._collection,i=n._getMaterialClass();return i.unpack(n._materialView,this._index*i.packedLength,t)}setMaterial(t){let n=this._collection,i=n._getMaterialClass();return i.pack(t,n._materialView,this._index*i.packedLength),this._dirty=!0,t}get _dirty(){return this._getUint8(hm.Layout.DIRTY_U8)===1}set _dirty(t){this._collection._primitiveView.setUint8(this._byteOffset+hm.Layout.DIRTY_U8,t?1:0),t&&this._collection._makeDirty(this._index)}get _pickId(){return this._getUint32(hm.Layout.PICK_ID_U32)}set _pickId(t){this._setUint32(hm.Layout.PICK_ID_U32,t)}_getUint8(t){return this._collection._primitiveView.getUint8(this._byteOffset+t)}_setUint8(t,n){this._collection._primitiveView.setUint8(this._byteOffset+t,n),this._dirty=!0}_getUint32(t){return this._collection._primitiveView.getUint32(this._byteOffset+t,!0)}_setUint32(t,n){this._collection._primitiveView.setUint32(this._byteOffset+t,n,!0),this._dirty=!0}_getFloat32(t){return this._collection._primitiveView.getFloat32(this._byteOffset+t,!0)}_setFloat32(t,n){this._collection._primitiveView.setFloat32(this._byteOffset+t,n,!0),this._dirty=!0}toJSON(){let n=this._collection._getMaterialClass();return{featureId:this.featureId,show:this.show,dirty:this._dirty,material:this.getMaterial(new n).toJSON()}}};lt(hm,"Layout",{FEATURE_ID_U32:0,SHOW_U8:4,DIRTY_U8:5,PICK_ID_U32:8,__BYTE_LENGTH:12});var mQ=hm,ia=mQ;var VN=class VN{constructor(t=G.EMPTY_OBJECT){lt(this,"_renderContext",null);this.show=t.show??!0,this._blendOption=t.blendOption??Di.TRANSLUCENT,this._modelMatrix=M.clone(t.modelMatrix??M.IDENTITY),this._boundingVolume=ce.clone(t.boundingVolume??new ce,new ce),this._boundingVolumeAutoUpdate=!l(t.boundingVolume),this._allowPicking=t.allowPicking??!1,this._pickIds=new Map,this._pickObjects=[],this.debugShowBoundingVolume=t.debugShowBoundingVolume??!1,this._primitiveCount=0,this._primitiveCountMax=t.primitiveCountMax??VN.DEFAULT_CAPACITY,this._primitiveView=null,this._positionCount=0,this._positionCountMax=t.vertexCountMax??VN.DEFAULT_CAPACITY,this._positionView=null,this._positionDatatype=t.positionDatatype??Y.DOUBLE,this._positionNormalized=t.positionNormalized??!1,this._materialView=null,this._dirtyOffset=0,this._dirtyCount=0,this._dirtyBoundingVolume=!1,this._allocatePrimitiveBuffer(),this._allocatePositionBuffer(),this._allocateMaterialBuffer()}_getCollectionClass(){_e.throwInstantiationError()}_getPrimitiveClass(){_e.throwInstantiationError()}_getMaterialClass(){_e.throwInstantiationError()}_allocatePrimitiveBuffer(){let t=this._getPrimitiveClass().Layout;this._primitiveView=new DataView(new ArrayBuffer(this._primitiveCountMax*t.__BYTE_LENGTH))}_allocatePositionBuffer(){this._positionView=Y.createTypedArray(this._positionDatatype,this._positionCountMax*3)}_allocateMaterialBuffer(){let t=this._getMaterialClass();this._materialView=new DataView(new ArrayBuffer(this._primitiveCountMax*t.packedLength))}isDestroyed(){return!1}destroy(){this._pickObjects.length=0;for(let t of this._pickIds.values())for(let n of t)n.destroy();l(this._renderContext)&&(this._renderContext.destroy(),this._renderContext=void 0,this._dirtyOffset=0,this._dirtyCount=this.primitiveCount)}sort(t,n=new Uint32Array(this.primitiveCount)){let i=this._getPrimitiveClass(),o=this._getCollectionClass(),{primitiveCount:r}=this,a=new i,s=new i,c=new Uint32Array(r);for(let f=0;f<r;f++)c[f]=f;c.sort((f,d)=>t(this.get(f,a),this.get(d,s)));for(let f=0;f<r;f++)n[c[f]]=f;let u=o._cloneEmpty(this);for(let f=0;f<r;f++){let d=this.get(c[f],a),p=u.add({},s);i.clone(d,p)}return o._replaceBuffers(u,this),this._dirtyOffset=0,this._dirtyCount=r,n}static clone(t,n){let i=t._getPrimitiveClass().Layout,o=t._getMaterialClass(),r=t._getPrimitiveClass();this._copySubDataView(t._primitiveView,n._primitiveView,t.primitiveCount*i.__BYTE_LENGTH),this._copySubArray(t._positionView,n._positionView,t.vertexCount*3),this._copySubDataView(t._materialView,n._materialView,t.primitiveCount*o.packedLength),n.show=t.show,n.debugShowBoundingVolume=t.debugShowBoundingVolume,n._primitiveCount=t._primitiveCount,n._positionCount=t._positionCount;let a=new r;for(let s=0,c=n.primitiveCount;s<c;s++)n.get(s,a)._pickId=0;return n._dirtyOffset=0,n._dirtyCount=n.primitiveCount,t.boundingVolume.clone(n.boundingVolume),n}static _cloneEmpty(t){_e.throwInstantiationError()}static _replaceBuffers(t,n){n._primitiveView=t._primitiveView,n._positionView=t._positionView,n._materialView=t._materialView}_updateBoundingVolume(){let t=this._positionView.subarray(0,this._positionCount*3);this._positionNormalized&&(t=nn.dequantize(t,this._positionDatatype,Ft.VEC3,this._positionCount)),ce.fromVertices(t,h.ZERO,3,this.boundingVolume),ce.transform(this.boundingVolume,this.modelMatrix,this.boundingVolume),this._dirtyBoundingVolume=!1}_updatePickIds(t){let n=this._pickIds.get(t);if(n&&n.length===this._primitiveCount)return;n||(n=[],this._pickIds.set(t,n));let i=this,o=this._getPrimitiveClass(),r=new o;for(let a=n.length,s=this._primitiveCount;a<s;a++){this.get(a,r);let c=this._pickObjects[a]||{collection:this,index:a,get primitive(){return i.get(a,new o)}},u=t.createPickId(c);r._pickId=u.key,n.push(u)}}get(t,n){return n._collection=this,n._index=t,n._byteOffset=t*this._getPrimitiveClass().Layout.__BYTE_LENGTH,n}add(t=G.EMPTY_OBJECT,n){let i=this._getMaterialClass(),o=this._primitiveCount++;return n=this.get(o,n),n.featureId=t.featureId??o,n.show=t.show??!0,n.setMaterial(t.material??i.DEFAULT_MATERIAL),n._pickId=0,n._dirty=!0,l(t.pickObject)&&(this._pickObjects[o]=t.pickObject),n}_makeDirty(t){this._dirtyCount===0?(this._dirtyCount=1,this._dirtyOffset=t):t<this._dirtyOffset?(this._dirtyCount+=this._dirtyOffset-t,this._dirtyOffset=t):t+1>this._dirtyOffset+this._dirtyCount&&(this._dirtyCount=t+1-this._dirtyOffset)}_makeDirtyBoundingVolume(){this._boundingVolumeAutoUpdate&&(this._dirtyBoundingVolume=!0)}update(t){t.mode!==ie.SCENE3D&&_t("bufferprim-scenemode","BufferPrimitiveCollection requires SceneMode.SCENE3D."),this._dirtyBoundingVolume&&this._updateBoundingVolume(),this._allowPicking&&this._dirtyCount>0&&this._updatePickIds(t.context)}get primitiveCount(){return this._primitiveCount}get primitiveCountMax(){return this._primitiveCountMax}get byteLength(){return this._primitiveView.byteLength+this._positionView.byteLength+this._materialView.byteLength}get vertexCount(){return this._positionCount}get vertexCountMax(){return this._positionCountMax}get modelMatrix(){return this._modelMatrix}get boundingVolume(){return this._boundingVolume}get positionDatatype(){return this._positionDatatype}get positionNormalized(){return this._positionNormalized}static _copySubArray(t,n,i){for(let o=0;o<i;o++)n[o]=t[o]}static _copySubDataView(t,n,i){this._copySubArray(new Uint32Array(t.buffer,t.byteOffset,t.byteLength/4),new Uint32Array(n.buffer,n.byteOffset,n.byteLength/4),i/4)}toJSON(){let t=this._getPrimitiveClass(),n=new t,i=[];for(let o=0,r=this.primitiveCount;o<r;o++)i.push(this.get(o,n).toJSON());return i}};lt(VN,"Error",{ERR_RESIZE:"BufferPrimitive range cannot be resized after initialization.",ERR_CAPACITY:"BufferPrimitiveCollection capacity exceeded.",ERR_MULTIPLE_OF_FOUR:"BufferPrimitive byte length must be a multiple of 4.",ERR_OUT_OF_RANGE:"BufferPrimitive buffer access out of range."});var tG=VN;tG.DEFAULT_CAPACITY=1024;var Za=tG;var{ERR_CAPACITY:dWn}=Za.Error,yot=new h,nG=class nG extends ia{constructor(){super(...arguments);lt(this,"_collection",null)}static clone(n,i){return super.clone(n,i),i.setPosition(n.getPosition(yot)),i}get vertexOffset(){return this._getUint32(nG.Layout.POSITION_OFFSET_U32)}get vertexCount(){return 1}getPosition(n){let i=this._collection._positionView;return h.fromArray(i,this.vertexOffset*3,n)}setPosition(n){let i=this._collection,o=this.vertexOffset;i._positionView[o*3]=n.x,i._positionView[o*3+1]=n.y,i._positionView[o*3+2]=n.z,this._dirty=!0,i._makeDirtyBoundingVolume()}toJSON(){return{...super.toJSON(),position:h.pack(this.getPosition(),[])}}};lt(nG,"Layout",{...ia.Layout,POSITION_OFFSET_U32:ia.Layout.__BYTE_LENGTH,__BYTE_LENGTH:ia.Layout.__BYTE_LENGTH+4});var pQ=nG,Bc=pQ;var jN=`#ifdef USE_FLOAT64
- in vec3 positionHigh;
- in vec3 positionLow;
- #else
- in vec3 position;
- #endif
- in vec4 pickColor;
- in vec4 showPixelSizeColorAlpha;
- in vec3 outlineWidthColorAlpha;
-
- out vec4 v_pickColor;
- out vec4 v_color;
- out vec4 v_outlineColor;
- out float v_innerRadiusFrac;
-
- void main()
- {
- // Unpack attributes.
- float show = showPixelSizeColorAlpha.x;
- float pixelSize = showPixelSizeColorAlpha.y;
- vec4 color = czm_decodeRGB8(showPixelSizeColorAlpha.z);
- float alpha = showPixelSizeColorAlpha.w;
- float outlineWidth = outlineWidthColorAlpha.x;
- vec4 outlineColor = czm_decodeRGB8(outlineWidthColorAlpha.y);
- float outlineAlpha = outlineWidthColorAlpha.z;
-
- ///////////////////////////////////////////////////////////////////////////
-
- float innerRadius = 0.5 * pixelSize * czm_pixelRatio;
- float outerRadius = (0.5 * pixelSize + outlineWidth) * czm_pixelRatio;
-
- ///////////////////////////////////////////////////////////////////////////
-
- #ifdef USE_FLOAT64
- vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);
- vec4 positionEC = czm_modelViewRelativeToEye * p;
- #else
- vec4 positionEC = czm_modelView * vec4(position, 1.0);
- #endif
-
- ///////////////////////////////////////////////////////////////////////////
-
- gl_Position = czm_projection * positionEC;
- czm_vertexLogDepth();
-
- v_pickColor = pickColor / 255.0;
-
- v_color = color;
- v_color.a *= alpha * show;
-
- v_outlineColor = outlineColor;
- v_outlineColor.a *= outlineAlpha * show;
-
- v_innerRadiusFrac = innerRadius / outerRadius;
-
- gl_PointSize = 2.0 * outerRadius * show;
- gl_Position *= show;
- }
- `;var GN=`in vec4 v_pickColor;
- in vec4 v_color;
- in vec4 v_outlineColor;
- in float v_innerRadiusFrac;
-
- void main()
- {
- // Distance between fragment and point center, 0 to 0.5.
- float distanceToCenter = length(gl_PointCoord - vec2(0.5));
- float delta = fwidth(distanceToCenter);
-
- float outerLimit = 0.5;
- float innerLimit = 0.5 * v_innerRadiusFrac;
-
- float outerAlpha = 1.0 - smoothstep(max(0.0, outerLimit - delta), outerLimit, distanceToCenter);
- float innerAlpha = 1.0 - smoothstep(innerLimit - delta, innerLimit, distanceToCenter);
-
- vec4 color = vec4(mix(v_outlineColor.rgb, v_color.rgb, innerAlpha), outerAlpha);
- color.a *= mix(v_outlineColor.a, v_color.a, innerAlpha);
-
- if (color.a < 0.005) // matches 0/255 and 1/255
- {
- discard;
- }
-
- out_FragColor = czm_gammaCorrect(color);
- czm_writeLogDepth();
- }
- `;var HN=class{constructor(t=G.EMPTY_OBJECT){this.color=V.clone(t.color??V.WHITE),this.outlineColor=V.clone(t.outlineColor??V.WHITE),this.outlineWidth=t.outlineWidth??0}static get packedLength(){return this.Layout.__BYTE_LENGTH}static pack(t,n,i){n.setUint32(this.Layout.COLOR_U32+i,t.color.toRgba(),!0),n.setUint32(this.Layout.OUTLINE_COLOR_U32+i,t.outlineColor.toRgba(),!0),n.setUint8(this.Layout.OUTLINE_WIDTH_U8+i,t.outlineWidth)}static unpack(t,n,i){return V.fromRgba(t.getUint32(this.Layout.COLOR_U32+n,!0),i.color),V.fromRgba(t.getUint32(this.Layout.OUTLINE_COLOR_U32+n,!0),i.outlineColor),i.outlineWidth=t.getUint8(this.Layout.OUTLINE_WIDTH_U8+n),i}toJSON(){return{color:this.color.toCssHexString(),outlineColor:this.outlineColor.toCssHexString(),outlineWidth:this.outlineWidth}}};lt(HN,"Layout",{COLOR_U32:0,OUTLINE_COLOR_U32:4,OUTLINE_WIDTH_U8:8,__BYTE_LENGTH:12}),lt(HN,"DEFAULT_MATERIAL");var tu=HN;var WN=class WN extends tu{constructor(t=G.EMPTY_OBJECT){super(t),this.size=t.size??1}static pack(t,n,i){super.pack(t,n,i),n.setUint8(this.Layout.SIZE_U8+i,t.size)}static unpack(t,n,i){return super.unpack(t,n,i),i.size=t.getUint8(this.Layout.SIZE_U8+n),i}toJSON(){return{...super.toJSON(),size:this.size}}};lt(WN,"Layout",{...tu.Layout,SIZE_U8:tu.Layout.__BYTE_LENGTH,__BYTE_LENGTH:tu.Layout.__BYTE_LENGTH+4}),lt(WN,"DEFAULT_MATERIAL",Object.freeze(new WN));var gQ=WN,mm=gQ;var _Q={positionHigh:0,positionLow:1,pickColor:2,showSizeColorAlpha:3,outlineWidthColorAlpha:4},h_e={position:0,pickColor:1,showSizeColorAlpha:2,outlineWidthColorAlpha:3},Hb=new Bc,Wb=new mm,qN=new V,m_e=new h,qb=new xn;function xot(e,t,n){let i=t.context;n=n||{destroy:bot};let o=e._positionDatatype===Y.DOUBLE,r=o?_Q:h_e;if(!l(n.attributeArrays)){let s=e.primitiveCountMax;n.attributeArrays={...o?{positionHigh:new Float32Array(s*3),positionLow:new Float32Array(s*3)}:{position:e._positionView},pickColor:new Uint8Array(s*4),showSizeColorAlpha:new Float32Array(s*4),outlineWidthColorAlpha:new Float32Array(s*3)}}if(e._dirtyCount>0){let{attributeArrays:s}=n,c=s.pickColor,u=s.showSizeColorAlpha,f=s.outlineWidthColorAlpha,{_dirtyOffset:d,_dirtyCount:p}=e;for(let g=d,m=d+p;g<m;g++)e.get(g,Hb),Hb._dirty&&(o&&(Hb.getPosition(m_e),xn.fromCartesian(m_e,qb),s.positionHigh[g*3]=qb.high.x,s.positionHigh[g*3+1]=qb.high.y,s.positionHigh[g*3+2]=qb.high.z,s.positionLow[g*3]=qb.low.x,s.positionLow[g*3+1]=qb.low.y,s.positionLow[g*3+2]=qb.low.z),Hb.getMaterial(Wb),V.fromRgba(Hb._pickId,qN),c[g*4]=V.floatToByte(qN.red),c[g*4+1]=V.floatToByte(qN.green),c[g*4+2]=V.floatToByte(qN.blue),c[g*4+3]=V.floatToByte(qN.alpha),u[g*4]=Hb.show?1:0,u[g*4+1]=Wb.size,u[g*4+2]=nn.encodeRGB8(Wb.color),u[g*4+3]=Wb.color.alpha,f[g*3]=Wb.outlineWidth,f[g*3+1]=nn.encodeRGB8(Wb.outlineColor),f[g*3+2]=Wb.outlineColor.alpha,Hb._dirty=!1)}if(l(n.vertexArray)){if(e._dirtyCount>0){for(let s in r)if(Object.hasOwn(r,s)){let c=s;n.vertexArray.copyAttributeFromRange(r[c],n.attributeArrays[c],e._dirtyOffset,e._dirtyCount)}}}else{let{attributeArrays:s}=n;n.vertexArray=new Fn({context:i,attributes:[...o?[{index:_Q.positionHigh,componentDatatype:Y.FLOAT,componentsPerAttribute:3,vertexBuffer:Ke.createVertexBuffer({typedArray:s.positionHigh,context:i,usage:Oe.STATIC_DRAW})},{index:_Q.positionLow,componentDatatype:Y.FLOAT,componentsPerAttribute:3,vertexBuffer:Ke.createVertexBuffer({typedArray:s.positionLow,context:i,usage:Oe.STATIC_DRAW})}]:[{index:h_e.position,componentDatatype:e._positionDatatype,componentsPerAttribute:3,normalize:e._positionNormalized,vertexBuffer:Ke.createVertexBuffer({typedArray:e._positionView,context:i,usage:Oe.STATIC_DRAW})}],{index:r.pickColor,componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:4,vertexBuffer:Ke.createVertexBuffer({typedArray:s.pickColor,context:i,usage:Oe.STATIC_DRAW})},{index:r.showSizeColorAlpha,componentDatatype:Y.FLOAT,componentsPerAttribute:4,vertexBuffer:Ke.createVertexBuffer({typedArray:s.showSizeColorAlpha,context:i,usage:Oe.STATIC_DRAW})},{index:r.outlineWidthColorAlpha,componentDatatype:Y.FLOAT,componentsPerAttribute:3,vertexBuffer:Ke.createVertexBuffer({typedArray:s.outlineWidthColorAlpha,context:i,usage:Oe.STATIC_DRAW})}]})}l(n.renderState)||(n.renderState=Ve.fromCache({blending:e._blendOption===Di.OPAQUE?Jt.DISABLED:Jt.ALPHA_BLEND,depthTest:{enabled:!0}})),l(n.shaderProgram)||(n.shaderProgram=Kt.fromCache({context:i,vertexShaderSource:new He({sources:[jN],defines:o?["USE_FLOAT64"]:[]}),fragmentShaderSource:new He({sources:[GN]}),attributeLocations:r})),l(n.command)||(n.command=new tt({vertexArray:n.vertexArray,renderState:n.renderState,shaderProgram:n.shaderProgram,primitiveType:Re.POINTS,pass:e._blendOption===Di.OPAQUE?Ie.OPAQUE:Ie.TRANSLUCENT,pickId:e._allowPicking?"v_pickColor":void 0,owner:e,count:e.primitiveCount,modelMatrix:e.modelMatrix,boundingVolume:e.boundingVolume,debugShowBoundingVolume:e.debugShowBoundingVolume}));let a=n.command;return a.count!==e.primitiveCount&&(a.count=e.primitiveCount),a.debugShowBoundingVolume!==e.debugShowBoundingVolume&&(a.debugShowBoundingVolume=e.debugShowBoundingVolume),t.commandList.push(a),e._dirtyCount=0,e._dirtyOffset=0,n}function bot(){let e=this;l(e.vertexArray)&&e.vertexArray.destroy(),l(e.shaderProgram)&&e.shaderProgram.destroy(),l(e.renderState)&&Ve.removeFromCache(e.renderState)}var YN=xot;var AQ=class e extends Za{constructor(t=G.EMPTY_OBJECT){super({...t,vertexCountMax:t.primitiveCountMax})}_getCollectionClass(){return e}_getPrimitiveClass(){return Bc}_getMaterialClass(){return mm}static _cloneEmpty(t){return new e({primitiveCountMax:t.primitiveCountMax,positionDatatype:t.positionDatatype,positionNormalized:t.positionNormalized})}add(t,n=new Bc){return super.add(t,n),n._setUint32(Bc.Layout.POSITION_OFFSET_U32,this._positionCount++),n.setPosition(t.position??h.ZERO),n}update(t){super.update(t);let n=t.passes;this.show&&(n.render||n.pick)&&(this._renderContext=YN(this,t,this._renderContext))}},ku=AQ;var{ERR_CAPACITY:iqn,ERR_RESIZE:oqn,ERR_OUT_OF_RANGE:rqn}=Za.Error,Vd=class Vd extends ia{constructor(){super(...arguments);lt(this,"_collection",null)}static clone(n,i){return super.clone(n,i),i.setPositions(n.getPositions()),i.setHoles(n.getHoles()),i.setTriangles(n.getTriangles()),i}get vertexOffset(){return this._getUint32(Vd.Layout.POSITION_OFFSET_U32)}get vertexCount(){return this._getUint32(Vd.Layout.POSITION_COUNT_U32)}getPositions(n){return this._getPositionsRange(0,this.vertexCount,n)}setPositions(n){let i=this._collection,o=this.vertexOffset,r=this.vertexCount,a=n.length/3,s=i.vertexCount+a-r;i._positionCount=s,this._setUint32(Vd.Layout.POSITION_COUNT_U32,a);let c=i._positionView;for(let u=0;u<a;u++)c[(o+u)*3]=n[u*3],c[(o+u)*3+1]=n[u*3+1],c[(o+u)*3+2]=n[u*3+2];this._dirty=!0,i._makeDirtyBoundingVolume()}get outerVertexOffset(){return this.vertexOffset}get outerVertexCount(){return this.holeCount>0?this.getHoles()[0]:this.vertexCount}getOuterPositions(n){return this._getPositionsRange(0,this.outerVertexCount,n)}get holeOffset(){return this._getUint32(Vd.Layout.HOLE_OFFSET_U32)}get holeCount(){return this._getUint32(Vd.Layout.HOLE_COUNT_U32)}getHoles(n){let{holeOffset:i,holeCount:o}=this,r=this._collection._holeIndexView;if(!l(n)){let a=r.byteOffset+i*r.BYTES_PER_ELEMENT,s=r.constructor;return new s(r.buffer,a,o)}for(let a=0;a<o;a++)n[a]=r[i+a];return n}setHoles(n){let i=this._collection,o=this.holeOffset,r=this.holeCount,a=n.length,s=i.holeCount+a-r;i._holeCount=s,this._setUint32(Vd.Layout.HOLE_COUNT_U32,a);let c=i._holeIndexView;for(let u=0;u<a;u++)c[o+u]=n[u];this._dirty=!0}getHoleVertexCount(n){let i=this.getHoles(),o=i[n];return n===i.length-1?this.vertexCount-o:i[n+1]-o}getHolePositions(n,i){let r=this.getHoles()[n],a=this.getHoleVertexCount(n);return this._getPositionsRange(r,a,i)}_getPositionsRange(n,i,o){let r=this._collection,a=this._collection._positionView,s=this.vertexOffset+n;if(!l(o)){let c=a.byteOffset+s*3*a.BYTES_PER_ELEMENT,u=a.constructor;return new u(a.buffer,c,i*3)}for(let c=0;c<i;c++)o[c*3]=a[(s+c)*3],o[c*3+1]=a[(s+c)*3+1],o[c*3+2]=a[(s+c)*3+2];return o}get triangleOffset(){return this._getUint32(Vd.Layout.TRIANGLE_OFFSET_U32)}get triangleCount(){return this._getUint32(Vd.Layout.TRIANGLE_COUNT_U32)}getTriangles(n){let{triangleOffset:i,triangleCount:o}=this,r=this._collection._triangleIndexView;if(!l(n)){let a=r.byteOffset+i*3*r.BYTES_PER_ELEMENT,s=r.constructor;return new s(r.buffer,a,o*3)}for(let a=0;a<o;a++)n[a*3]=r[(i+a)*3],n[a*3+1]=r[(i+a)*3+1],n[a*3+2]=r[(i+a)*3+2];return n}setTriangles(n){let i=this._collection,o=this.triangleOffset,r=this.triangleCount,a=n.length/3,s=i.triangleCount+a-r;i._triangleCount+=a-r,this._setUint32(Vd.Layout.TRIANGLE_COUNT_U32,a);let c=i._triangleIndexView;for(let u=0;u<a;u++)c[(o+u)*3]=n[u*3],c[(o+u)*3+1]=n[u*3+1],c[(o+u)*3+2]=n[u*3+2];this._dirty=!0}toJSON(){return{...super.toJSON(),positions:Array.from(this.getPositions()),holes:Array.from(this.getHoles()),triangles:Array.from(this.getTriangles())}}};lt(Vd,"Layout",{...ia.Layout,POSITION_OFFSET_U32:ia.Layout.__BYTE_LENGTH,POSITION_COUNT_U32:ia.Layout.__BYTE_LENGTH+4,HOLE_OFFSET_U32:ia.Layout.__BYTE_LENGTH+8,HOLE_COUNT_U32:ia.Layout.__BYTE_LENGTH+12,TRIANGLE_OFFSET_U32:ia.Layout.__BYTE_LENGTH+16,TRIANGLE_COUNT_U32:ia.Layout.__BYTE_LENGTH+20,__BYTE_LENGTH:ia.Layout.__BYTE_LENGTH+24});var yQ=Vd,za=yQ;var XN=`#ifdef USE_FLOAT64
- in vec3 positionHigh;
- in vec3 positionLow;
- #else
- in vec3 position;
- #endif
- in vec4 pickColor;
- in vec3 showColorAlpha;
-
- out vec4 v_pickColor;
- out vec4 v_color;
-
- void main()
- {
- float show = showColorAlpha.x;
- vec4 color = czm_decodeRGB8(showColorAlpha.y);
- float alpha = showColorAlpha.z;
-
- ///////////////////////////////////////////////////////////////////////////
-
- #ifdef USE_FLOAT64
- vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);
- vec4 positionEC = czm_modelViewRelativeToEye * p;
- #else
- vec4 positionEC = czm_modelView * vec4(position, 1.0);
- #endif
-
- ///////////////////////////////////////////////////////////////////////////
-
- gl_Position = czm_projection * positionEC;
- czm_vertexLogDepth();
-
- v_pickColor = pickColor / 255.0;
-
- v_color = color;
- v_color.a *= alpha * show;
-
- gl_Position *= show;
- }
- `;var KN=`in vec4 v_pickColor;
- in vec4 v_color;
-
- void main()
- {
- if (v_color.a < 0.005) // matches 0/255 and 1/255
- {
- discard;
- }
-
- out_FragColor = czm_gammaCorrect(v_color);
- czm_writeLogDepth();
- }
- `;var iG=class iG extends tu{constructor(t=G.EMPTY_OBJECT){super(t)}};lt(iG,"DEFAULT_MATERIAL",Object.freeze(new iG));var xQ=iG,pm=xQ;var bQ={positionHigh:0,positionLow:1,pickColor:2,showColorAlpha:3},p_e={position:0,pickColor:1,showColorAlpha:2},_s=new za,CQ=new pm,QN=new V,g_e=new h,Yb=new xn;function Cot(e,t,n){let i=t.context;n=n||{destroy:Eot};let o=e._positionDatatype===Y.DOUBLE,r=o?bQ:p_e;if(!l(n.attributeArrays)||!l(n.indexArray)){let{vertexCountMax:c,triangleCountMax:u}=e;n.indexArray=Ue.createTypedArray(c,u*3),n.attributeArrays={...o?{positionHigh:new Float32Array(c*3),positionLow:new Float32Array(c*3)}:{position:e._positionView},pickColor:new Uint8Array(c*4),showColorAlpha:new Float32Array(c*3)}}if(e._dirtyCount>0){let{attributeArrays:c}=n,{_dirtyOffset:u,_dirtyCount:f}=e,d=n.indexArray,p=c.pickColor,g=c.showColorAlpha;for(let m=u,A=u+f;m<A;m++){if(e.get(m,_s),!_s._dirty)continue;let y=_s.triangleOffset,x=_s.vertexOffset,b=_s.getTriangles();for(let w=0,P=_s.triangleCount;w<P;w++)d[y*3]=x+b[w*3],d[y*3+1]=x+b[w*3+1],d[y*3+2]=x+b[w*3+2],y++;let C=_s.show,E=o?_s.getPositions():null;_s.getMaterial(CQ);let S=nn.encodeRGB8(CQ.color);V.fromRgba(_s._pickId,QN);for(let w=0,P=_s.vertexCount;w<P;w++)o&&(h.fromArray(E,w*3,g_e),xn.fromCartesian(g_e,Yb),c.positionHigh[x*3]=Yb.high.x,c.positionHigh[x*3+1]=Yb.high.y,c.positionHigh[x*3+2]=Yb.high.z,c.positionLow[x*3]=Yb.low.x,c.positionLow[x*3+1]=Yb.low.y,c.positionLow[x*3+2]=Yb.low.z),p[x*4]=V.floatToByte(QN.red),p[x*4+1]=V.floatToByte(QN.green),p[x*4+2]=V.floatToByte(QN.blue),p[x*4+3]=V.floatToByte(QN.alpha),g[x*3]=C?1:0,g[x*3+1]=S,g[x*3+2]=CQ.color.alpha,x++;_s._dirty=!1}}if(l(n.vertexArray)){if(e._dirtyCount>0){let{indexOffset:c,indexCount:u,vertexOffset:f,vertexCount:d}=Tot(e);n.vertexArray.copyIndexFromRange(n.indexArray,c,u);for(let p in r)if(Object.hasOwn(r,p)){let g=p;n.vertexArray.copyAttributeFromRange(r[g],n.attributeArrays[g],f,d)}}}else{let{attributeArrays:c}=n;n.vertexArray=new Fn({context:i,indexBuffer:Ke.createIndexBuffer({context:i,typedArray:n.indexArray,usage:Oe.STATIC_DRAW,indexDatatype:Ue.fromTypedArray(n.indexArray)}),attributes:[...o?[{index:bQ.positionHigh,componentDatatype:Y.FLOAT,componentsPerAttribute:3,vertexBuffer:Ke.createVertexBuffer({typedArray:c.positionHigh,context:i,usage:Oe.STATIC_DRAW})},{index:bQ.positionLow,componentDatatype:Y.FLOAT,componentsPerAttribute:3,vertexBuffer:Ke.createVertexBuffer({typedArray:c.positionLow,context:i,usage:Oe.STATIC_DRAW})}]:[{index:p_e.position,componentDatatype:e._positionDatatype,componentsPerAttribute:3,normalize:e._positionNormalized,vertexBuffer:Ke.createVertexBuffer({typedArray:c.position,context:i,usage:Oe.STATIC_DRAW})}],{index:r.pickColor,componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:4,vertexBuffer:Ke.createVertexBuffer({typedArray:c.pickColor,context:i,usage:Oe.STATIC_DRAW})},{index:r.showColorAlpha,componentDatatype:Y.FLOAT,componentsPerAttribute:3,vertexBuffer:Ke.createVertexBuffer({typedArray:c.showColorAlpha,context:i,usage:Oe.STATIC_DRAW})}]})}l(n.renderState)||(n.renderState=Ve.fromCache({blending:e._blendOption===Di.OPAQUE?Jt.DISABLED:Jt.ALPHA_BLEND,depthTest:{enabled:!0}})),l(n.shaderProgram)||(n.shaderProgram=Kt.fromCache({context:i,vertexShaderSource:new He({sources:[XN],defines:o?["USE_FLOAT64"]:[]}),fragmentShaderSource:new He({sources:[KN]}),attributeLocations:r}));let a=e.triangleCount*3;l(n.command)||(n.command=new tt({vertexArray:n.vertexArray,renderState:n.renderState,shaderProgram:n.shaderProgram,primitiveType:Re.TRIANGLES,pass:e._blendOption===Di.OPAQUE?Ie.OPAQUE:Ie.TRANSLUCENT,pickId:e._allowPicking?"v_pickColor":void 0,owner:e,count:a,modelMatrix:e.modelMatrix,boundingVolume:e.boundingVolume,debugShowBoundingVolume:e.debugShowBoundingVolume}));let s=n.command;return s.count!==a&&(s.count=a),s.debugShowBoundingVolume!==e.debugShowBoundingVolume&&(s.debugShowBoundingVolume=e.debugShowBoundingVolume),t.commandList.push(s),e._dirtyCount=0,e._dirtyOffset=0,n}function Tot(e){let{_dirtyOffset:t,_dirtyCount:n}=e;e.get(t,_s);let i=_s.vertexOffset,o=_s.triangleOffset*3;e.get(t+n-1,_s);let r=_s.vertexOffset+_s.vertexCount-i,a=(_s.triangleOffset+_s.triangleCount)*3-o;return{indexOffset:o,indexCount:a,vertexOffset:i,vertexCount:r}}function Eot(){let e=this;l(e.vertexArray)&&e.vertexArray.destroy(),l(e.shaderProgram)&&e.shaderProgram.destroy(),l(e.renderState)&&Ve.removeFromCache(e.renderState)}var $N=Cot;var{ERR_CAPACITY:Hqn}=Za.Error,TQ=class e extends Za{constructor(t=G.EMPTY_OBJECT){super(t),this._holeCount=0,this._holeCountMax=t.holeCountMax??Za.DEFAULT_CAPACITY,this._holeIndexView=null,this._triangleCount=0,this._triangleCountMax=t.triangleCountMax??Za.DEFAULT_CAPACITY,this._triangleIndexView=null,this._allocateHoleIndexBuffer(),this._allocateTriangleIndexBuffer()}_getCollectionClass(){return e}_getPrimitiveClass(){return za}_getMaterialClass(){return pm}_allocateHoleIndexBuffer(){this._holeIndexView=Ue.createTypedArray(this._positionCountMax,this._holeCountMax)}_allocateTriangleIndexBuffer(){this._triangleIndexView=Ue.createTypedArray(this._positionCountMax,this._triangleCountMax*3)}static clone(t,n){return super.clone(t,n),this._copySubArray(t._holeIndexView,n._holeIndexView,t.holeCount),this._copySubArray(t._triangleIndexView,n._triangleIndexView,t._triangleCount*3),n._holeCount=t._holeCount,n._triangleCount=t._triangleCount,n}static _cloneEmpty(t){return new e({primitiveCountMax:t.primitiveCountMax,vertexCountMax:t.vertexCountMax,holeCountMax:t.holeCountMax,triangleCountMax:t.triangleCountMax,positionDatatype:t.positionDatatype,positionNormalized:t.positionNormalized})}static _replaceBuffers(t,n){super._replaceBuffers(t,n),n._holeIndexView=t._holeIndexView,n._triangleIndexView=t._triangleIndexView}add(t,n=new za){super.add(t,n);let i=this._positionCount;n._setUint32(za.Layout.POSITION_OFFSET_U32,i),n._setUint32(za.Layout.POSITION_COUNT_U32,0);let o=this._holeCount;n._setUint32(za.Layout.HOLE_OFFSET_U32,o),n._setUint32(za.Layout.HOLE_COUNT_U32,0);let r=this._triangleCount;return n._setUint32(za.Layout.TRIANGLE_OFFSET_U32,r),n._setUint32(za.Layout.TRIANGLE_COUNT_U32,0),l(t.positions)&&n.setPositions(t.positions),l(t.holes)&&n.setHoles(t.holes),l(t.triangles)&&n.setTriangles(t.triangles),n}update(t){super.update(t);let n=t.passes;this.show&&(n.render||n.pick)&&(this._renderContext=$N(this,t,this._renderContext))}get byteLength(){return super.byteLength+this._holeIndexView.byteLength+this._triangleIndexView.byteLength}get holeCount(){return this._holeCount}get holeCountMax(){return this._holeCountMax}get triangleCount(){return this._triangleCount}get triangleCountMax(){return this._triangleCountMax}},zu=TQ;var{ERR_RESIZE:Kqn,ERR_CAPACITY:Qqn}=Za.Error,fS=class fS extends ia{constructor(){super(...arguments);lt(this,"_collection",null)}static clone(n,i){return super.clone(n,i),i.setPositions(n.getPositions()),i}get vertexOffset(){return this._getUint32(fS.Layout.POSITION_OFFSET_U32)}get vertexCount(){return this._getUint32(fS.Layout.POSITION_COUNT_U32)}getPositions(n){let{vertexOffset:i,vertexCount:o}=this,r=this._collection._positionView;if(!l(n)){let a=r.byteOffset+i*3*r.BYTES_PER_ELEMENT,s=r.constructor;return new s(r.buffer,a,o*3)}for(let a=0;a<o;a++)n[a*3]=r[(i+a)*3],n[a*3+1]=r[(i+a)*3+1],n[a*3+2]=r[(i+a)*3+2];return n}setPositions(n){let i=this._collection,o=this.vertexOffset,r=this.vertexCount,a=n.length/3,s=i._positionCount+a-r;i._positionCount=s,this._setUint32(fS.Layout.POSITION_COUNT_U32,a);let c=i._positionView;for(let u=0;u<a;u++)c[(o+u)*3]=n[u*3],c[(o+u)*3+1]=n[u*3+1],c[(o+u)*3+2]=n[u*3+2];this._dirty=!0,i._makeDirtyBoundingVolume()}toJSON(){return{...super.toJSON(),positions:Array.from(this.getPositions())}}};lt(fS,"Layout",{...ia.Layout,POSITION_OFFSET_U32:ia.Layout.__BYTE_LENGTH,POSITION_COUNT_U32:ia.Layout.__BYTE_LENGTH+4,__BYTE_LENGTH:ia.Layout.__BYTE_LENGTH+8});var EQ=fS,rc=EQ;var JN=`#ifdef USE_FLOAT64
- in vec3 positionHigh;
- in vec3 positionLow;
- in vec3 prevPositionHigh;
- in vec3 prevPositionLow;
- in vec3 nextPositionHigh;
- in vec3 nextPositionLow;
- #else
- in vec3 position;
- in vec3 prevPosition;
- in vec3 nextPosition;
- #endif
- in vec4 pickColor;
- in vec4 showColorWidthAndTexCoord;
- in float alpha;
-
- out vec4 v_pickColor;
- out vec4 v_color;
- out vec2 v_st;
- out float v_width;
- out float v_polylineAngle;
-
- void main()
- {
- float show = showColorWidthAndTexCoord.x;
- vec4 color = czm_decodeRGB8(showColorWidthAndTexCoord.y);
- float width = showColorWidthAndTexCoord.z;
- float texCoord = showColorWidthAndTexCoord.w;
-
- ///////////////////////////////////////////////////////////////////////////
-
- bool usePrevious = texCoord == 1.0;
- float expandDir = gl_VertexID % 2 == 1 ? 1.0 : -1.0;
- float polylineAngle;
-
- #ifdef USE_FLOAT64
- vec4 positionEC = czm_translateRelativeToEye(positionHigh, positionLow);
- vec4 prevPositionEC = czm_translateRelativeToEye(prevPositionHigh, prevPositionLow);
- vec4 nextPositionEC = czm_translateRelativeToEye(nextPositionHigh, nextPositionLow);
- vec4 positionWC = getPolylineWindowCoordinates(positionEC, prevPositionEC, nextPositionEC, expandDir, width, usePrevious, polylineAngle);
- #else
- vec4 positionEC = czm_modelView * vec4(position, 1.0);
- vec4 prevPositionEC = czm_modelView * vec4(prevPosition, 1.0);
- vec4 nextPositionEC = czm_modelView * vec4(nextPosition, 1.0);
- // Positions are already in eye space; use the EC variant to skip the redundant transform.
- vec4 positionWC = getPolylineWindowCoordinatesEC(positionEC, prevPositionEC, nextPositionEC, expandDir, width, usePrevious, polylineAngle);
- #endif
-
- ///////////////////////////////////////////////////////////////////////////
-
- gl_Position = czm_viewportOrthographic * positionWC * show;
-
- v_pickColor = pickColor / 255.0;
-
- v_color = color;
- v_color.a *= alpha / 255.0 * show;
-
- v_st.s = texCoord;
- v_st.t = czm_writeNonPerspective(clamp(expandDir, 0.0, 1.0), gl_Position.w);
-
- v_width = width;
- v_polylineAngle = polylineAngle;
- }
- `;var ZN=`in vec4 v_pickColor;
- in vec4 v_color;
-
- void main()
- {
- if (v_color.a < 0.005) // matches 0/255 and 1/255
- {
- discard;
- }
-
- out_FragColor = czm_gammaCorrect(v_color);
- czm_writeLogDepth();
- }
- `;var eF=class eF extends tu{constructor(t=G.EMPTY_OBJECT){super(t),this.width=t.width??1}static pack(t,n,i){super.pack(t,n,i),n.setUint8(this.Layout.WIDTH_U8+i,t.width)}static unpack(t,n,i){return super.unpack(t,n,i),i.width=t.getUint8(this.Layout.WIDTH_U8+n),i}toJSON(){return{...super.toJSON(),width:this.width}}};lt(eF,"Layout",{...tu.Layout,WIDTH_U8:tu.Layout.__BYTE_LENGTH,__BYTE_LENGTH:tu.Layout.__BYTE_LENGTH+4}),lt(eF,"DEFAULT_MATERIAL",Object.freeze(new eF));var vQ=eF,gm=vQ;var Xb={positionHigh:0,positionLow:1,prevPositionHigh:2,prevPositionLow:3,nextPositionHigh:4,nextPositionLow:5,pickColor:6,showColorWidthAndTexCoord:7,alpha:8},oG={position:0,prevPosition:1,nextPosition:2,pickColor:3,showColorWidthAndTexCoord:4,alpha:5},Lc=new rc,tF=new gm,Ng=new V,dS=new h,Kb=new h,Qb=new h,$b=new xn,Jb=new xn,Zb=new xn;function vot(e,t,n){let i=t.context;n=n||{destroy:Iot};let o=e._positionDatatype===Y.DOUBLE,r=o?Xb:oG;if(!l(n.attributeArrays)||!l(n.indexArray)){let c=e.vertexCountMax-e.primitiveCount,u=e.vertexCountMax*2;n.indexArray=Ue.createTypedArray(u,c*6),n.attributeArrays={...o?{positionHigh:new Float32Array(u*3),positionLow:new Float32Array(u*3),prevPositionHigh:new Float32Array(u*3),prevPositionLow:new Float32Array(u*3),nextPositionHigh:new Float32Array(u*3),nextPositionLow:new Float32Array(u*3)}:{position:Y.createTypedArray(e._positionDatatype,u*3),prevPosition:Y.createTypedArray(e._positionDatatype,u*3),nextPosition:Y.createTypedArray(e._positionDatatype,u*3)},pickColor:new Uint8Array(u*4),showColorWidthAndTexCoord:new Float32Array(u*4),alpha:new Uint8Array(u)}}if(e._dirtyCount>0){let{_dirtyOffset:c,_dirtyCount:u}=e,{attributeArrays:f}=n,d=n.indexArray,p=f.pickColor,g=f.showColorWidthAndTexCoord,m=f.alpha;for(let A=c,y=c+u;A<y;A++){if(e.get(A,Lc),!Lc._dirty)continue;Lc.getMaterial(tF);let x=nn.encodeRGB8(tF.color),b=tF.color.alpha;V.fromRgba(Lc._pickId,Ng);let C=Lc.show,E=Lc.vertexOffset*2,S=(Lc.vertexOffset-A)*6,w=Lc.vertexCount;if(o){let P=Lc.getPositions();for(let R=0;R<w;R++){let B=R===0,L=R===w-1;h.fromArray(P,R*3,dS),B?(h.fromArray(P,(R+1)*3,Qb),h.subtract(dS,Qb,Kb),h.add(dS,Kb,Kb)):L?(h.fromArray(P,(R-1)*3,Kb),h.subtract(dS,Kb,Qb),h.add(dS,Qb,Qb)):(h.fromArray(P,(R-1)*3,Kb),h.fromArray(P,(R+1)*3,Qb)),L||(d[S]=E,d[S+1]=E+1,d[S+2]=E+2,d[S+3]=E+2,d[S+4]=E+1,d[S+5]=E+3,S+=6),xn.fromCartesian(dS,$b),xn.fromCartesian(Kb,Jb),xn.fromCartesian(Qb,Zb);for(let _=0;_<2;_++)f.positionHigh[E*3]=$b.high.x,f.positionHigh[E*3+1]=$b.high.y,f.positionHigh[E*3+2]=$b.high.z,f.positionLow[E*3]=$b.low.x,f.positionLow[E*3+1]=$b.low.y,f.positionLow[E*3+2]=$b.low.z,f.prevPositionHigh[E*3]=Jb.high.x,f.prevPositionHigh[E*3+1]=Jb.high.y,f.prevPositionHigh[E*3+2]=Jb.high.z,f.prevPositionLow[E*3]=Jb.low.x,f.prevPositionLow[E*3+1]=Jb.low.y,f.prevPositionLow[E*3+2]=Jb.low.z,f.nextPositionHigh[E*3]=Zb.high.x,f.nextPositionHigh[E*3+1]=Zb.high.y,f.nextPositionHigh[E*3+2]=Zb.high.z,f.nextPositionLow[E*3]=Zb.low.x,f.nextPositionLow[E*3+1]=Zb.low.y,f.nextPositionLow[E*3+2]=Zb.low.z,p[E*4]=V.floatToByte(Ng.red),p[E*4+1]=V.floatToByte(Ng.green),p[E*4+2]=V.floatToByte(Ng.blue),p[E*4+3]=V.floatToByte(Ng.alpha),g[E*4]=C?1:0,g[E*4+1]=x,g[E*4+2]=tF.width,g[E*4+3]=R/(w-1),m[E]=b*255,E++}}else{let P=e._positionView,R=Lc.vertexOffset*3,B=f.position,L=f.prevPosition,_=f.nextPosition;for(let T=0;T<w;T++){let v=T===0,I=T===w-1,O=P[R+T*3],N=P[R+T*3+1],j=P[R+T*3+2],k,U,F,H,q,J;v?(H=P[R+3],q=P[R+3+1],J=P[R+3+2],k=2*O-H,U=2*N-q,F=2*j-J):I?(k=P[R+(T-1)*3],U=P[R+(T-1)*3+1],F=P[R+(T-1)*3+2],H=2*O-k,q=2*N-U,J=2*j-F):(k=P[R+(T-1)*3],U=P[R+(T-1)*3+1],F=P[R+(T-1)*3+2],H=P[R+(T+1)*3],q=P[R+(T+1)*3+1],J=P[R+(T+1)*3+2]),I||(d[S]=E,d[S+1]=E+1,d[S+2]=E+2,d[S+3]=E+2,d[S+4]=E+1,d[S+5]=E+3,S+=6);for(let W=0;W<2;W++)B[E*3]=O,B[E*3+1]=N,B[E*3+2]=j,L[E*3]=k,L[E*3+1]=U,L[E*3+2]=F,_[E*3]=H,_[E*3+1]=q,_[E*3+2]=J,p[E*4]=V.floatToByte(Ng.red),p[E*4+1]=V.floatToByte(Ng.green),p[E*4+2]=V.floatToByte(Ng.blue),p[E*4+3]=V.floatToByte(Ng.alpha),g[E*4]=C?1:0,g[E*4+1]=x,g[E*4+2]=tF.width,g[E*4+3]=T/(w-1),m[E]=b*255,E++}}Lc._dirty=!1}}if(l(n.vertexArray)){if(e._dirtyCount>0){let{indexOffset:c,indexCount:u,vertexOffset:f,vertexCount:d}=wot(e);n.vertexArray.copyIndexFromRange(n.indexArray,c,u);for(let p in r)if(Object.hasOwn(r,p)){let g=p;n.vertexArray.copyAttributeFromRange(r[g],n.attributeArrays[g],f,d)}}}else{let c=n.attributeArrays;n.vertexArray=new Fn({context:i,indexBuffer:Ke.createIndexBuffer({context:i,typedArray:n.indexArray,usage:Oe.STATIC_DRAW,indexDatatype:Ue.fromTypedArray(n.indexArray)}),attributes:[...o?[{index:Xb.positionHigh,componentDatatype:Y.FLOAT,componentsPerAttribute:3,vertexBuffer:Ke.createVertexBuffer({typedArray:c.positionHigh,context:i,usage:Oe.STATIC_DRAW})},{index:Xb.positionLow,componentDatatype:Y.FLOAT,componentsPerAttribute:3,vertexBuffer:Ke.createVertexBuffer({typedArray:c.positionLow,context:i,usage:Oe.STATIC_DRAW})},{index:Xb.prevPositionHigh,componentDatatype:Y.FLOAT,componentsPerAttribute:3,vertexBuffer:Ke.createVertexBuffer({typedArray:c.prevPositionHigh,context:i,usage:Oe.STATIC_DRAW})},{index:Xb.prevPositionLow,componentDatatype:Y.FLOAT,componentsPerAttribute:3,vertexBuffer:Ke.createVertexBuffer({typedArray:c.prevPositionLow,context:i,usage:Oe.STATIC_DRAW})},{index:Xb.nextPositionHigh,componentDatatype:Y.FLOAT,componentsPerAttribute:3,vertexBuffer:Ke.createVertexBuffer({typedArray:c.nextPositionHigh,context:i,usage:Oe.STATIC_DRAW})},{index:Xb.nextPositionLow,componentDatatype:Y.FLOAT,componentsPerAttribute:3,vertexBuffer:Ke.createVertexBuffer({typedArray:c.nextPositionLow,context:i,usage:Oe.STATIC_DRAW})}]:[{index:oG.position,componentDatatype:e._positionDatatype,componentsPerAttribute:3,normalize:e._positionNormalized,vertexBuffer:Ke.createVertexBuffer({typedArray:c.position,context:i,usage:Oe.STATIC_DRAW})},{index:oG.prevPosition,componentDatatype:e._positionDatatype,componentsPerAttribute:3,normalize:e._positionNormalized,vertexBuffer:Ke.createVertexBuffer({typedArray:c.prevPosition,context:i,usage:Oe.STATIC_DRAW})},{index:oG.nextPosition,componentDatatype:e._positionDatatype,componentsPerAttribute:3,normalize:e._positionNormalized,vertexBuffer:Ke.createVertexBuffer({typedArray:c.nextPosition,context:i,usage:Oe.STATIC_DRAW})}],{index:r.pickColor,componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:4,vertexBuffer:Ke.createVertexBuffer({typedArray:c.pickColor,context:i,usage:Oe.STATIC_DRAW})},{index:r.showColorWidthAndTexCoord,componentDatatype:Y.FLOAT,componentsPerAttribute:4,vertexBuffer:Ke.createVertexBuffer({typedArray:c.showColorWidthAndTexCoord,context:i,usage:Oe.STATIC_DRAW})},{index:r.alpha,componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,vertexBuffer:Ke.createVertexBuffer({typedArray:c.alpha,context:i,usage:Oe.STATIC_DRAW})}]})}l(n.renderState)||(n.renderState=Ve.fromCache({blending:e._blendOption===Di.OPAQUE?Jt.DISABLED:Jt.ALPHA_BLEND,depthTest:{enabled:!0}})),l(n.shaderProgram)||(n.shaderProgram=Kt.fromCache({context:i,vertexShaderSource:new He({sources:[kl,JN],defines:o?["USE_FLOAT64"]:[]}),fragmentShaderSource:new He({sources:[ZN]}),attributeLocations:r}));let a=Sot(e);l(n.command)||(n.command=new tt({vertexArray:n.vertexArray,renderState:n.renderState,shaderProgram:n.shaderProgram,primitiveType:Re.TRIANGLES,pass:e._blendOption===Di.OPAQUE?Ie.OPAQUE:Ie.TRANSLUCENT,pickId:e._allowPicking?"v_pickColor":void 0,owner:e,count:a,modelMatrix:e.modelMatrix,boundingVolume:e.boundingVolume,debugShowBoundingVolume:e.debugShowBoundingVolume}));let s=n.command;return s.count!==a&&(s.count=a),s.debugShowBoundingVolume!==e.debugShowBoundingVolume&&(s.debugShowBoundingVolume=e.debugShowBoundingVolume),t.commandList.push(s),e._dirtyCount=0,e._dirtyOffset=0,n}function Sot(e){return(e.vertexCount-e.primitiveCount)*6}function wot(e){let{_dirtyOffset:t,_dirtyCount:n}=e;e.get(t,Lc);let i=Lc.vertexOffset*2,r=(Lc.vertexOffset-t)*6;e.get(t+n-1,Lc);let a=(Lc.vertexOffset+Lc.vertexCount)*2-i,c=(a/2-n)*6;return{indexOffset:r,indexCount:c,vertexOffset:i,vertexCount:a}}function Iot(){let e=this;l(e.vertexArray)&&e.vertexArray.destroy(),l(e.shaderProgram)&&e.shaderProgram.destroy(),l(e.renderState)&&Ve.removeFromCache(e.renderState)}var nF=vot;var SQ=class e extends Za{_getCollectionClass(){return e}_getPrimitiveClass(){return rc}_getMaterialClass(){return gm}static _cloneEmpty(t){return new e({primitiveCountMax:t.primitiveCountMax,vertexCountMax:t.vertexCountMax,positionDatatype:t.positionDatatype,positionNormalized:t.positionNormalized})}add(t,n=new rc){super.add(t,n);let i=this._positionCount;return n._setUint32(rc.Layout.POSITION_OFFSET_U32,i),n._setUint32(rc.Layout.POSITION_COUNT_U32,0),l(t.positions)&&n.setPositions(t.positions),n}update(t){super.update(t);let n=t.passes;this.show&&(n.render||n.pick)&&(this._renderContext=nF(this,t,this._renderContext))}},Uu=SQ;function hS(e,t){this._conditionsExpression=We(e,!0),this._conditions=e.conditions,this._runtimeConditions=void 0,Pot(this,t)}Object.defineProperties(hS.prototype,{conditionsExpression:{get:function(){return this._conditionsExpression}}});function Dot(e,t){this.condition=e,this.expression=t}function Pot(e,t){let n=[],i=e._conditions;if(!l(i))return;let o=i.length;for(let r=0;r<o;++r){let a=i[r],s=String(a[0]),c=String(a[1]);n.push(new Dot(new Sd(s,t),new Sd(c,t)))}e._runtimeConditions=n}hS.prototype.evaluate=function(e,t){let n=this._runtimeConditions;if(!l(n))return;let i=n.length;for(let o=0;o<i;++o){let r=n[o];if(r.condition.evaluate(e))return r.expression.evaluate(e,t)}};hS.prototype.evaluateColor=function(e,t){let n=this._runtimeConditions;if(!l(n))return;let i=n.length;for(let o=0;o<i;++o){let r=n[o];if(r.condition.evaluate(e))return r.expression.evaluateColor(e,t)}};hS.prototype.getShaderFunction=function(e,t,n,i){let o=this._runtimeConditions;if(!l(o)||o.length===0)return;let r="",a=o.length;for(let s=0;s<a;++s){let c=o[s],u=c.condition.getShaderExpression(t,n),f=c.expression.getShaderExpression(t,n);r+=` ${s===0?"if":"else if"} (${u})
- {
- return ${f};
- }
- `}return r=`${i} ${e}
- {
- ${r} return ${i}(1.0);
- }
- `,r};hS.prototype.getVariables=function(){let e=[],t=this._runtimeConditions;if(!l(t)||t.length===0)return e;let n=t.length;for(let i=0;i<n;++i){let o=t[i];Qn(e,o.condition.getVariables()),Qn(e,o.expression.getVariables())}return e=e.filter(function(i,o,r){return r.indexOf(i)===o}),e};var iF=hS;function JA(e){this._style={},this._ready=!1,this._show=void 0,this._color=void 0,this._pointSize=void 0,this._pointOutlineColor=void 0,this._pointOutlineWidth=void 0,this._labelColor=void 0,this._labelOutlineColor=void 0,this._labelOutlineWidth=void 0,this._font=void 0,this._labelStyle=void 0,this._labelText=void 0,this._backgroundColor=void 0,this._backgroundPadding=void 0,this._backgroundEnabled=void 0,this._scaleByDistance=void 0,this._translucencyByDistance=void 0,this._distanceDisplayCondition=void 0,this._heightOffset=void 0,this._anchorLineEnabled=void 0,this._anchorLineColor=void 0,this._image=void 0,this._disableDepthTestDistance=void 0,this._horizontalOrigin=void 0,this._verticalOrigin=void 0,this._labelHorizontalOrigin=void 0,this._labelVerticalOrigin=void 0,this._meta=void 0,this._lineWidth=void 0,this._colorShaderFunction=void 0,this._showShaderFunction=void 0,this._pointSizeShaderFunction=void 0,this._colorShaderFunctionReady=!1,this._showShaderFunctionReady=!1,this._pointSizeShaderFunctionReady=!1,this._colorShaderTranslucent=!1,Rot(this,e)}function Rot(e,t){t=We(t,!0)??e._style,e._style=t,e.show=t.show,e.color=t.color,e.pointSize=t.pointSize,e.pointOutlineColor=t.pointOutlineColor,e.pointOutlineWidth=t.pointOutlineWidth,e.labelColor=t.labelColor,e.labelOutlineColor=t.labelOutlineColor,e.labelOutlineWidth=t.labelOutlineWidth,e.labelStyle=t.labelStyle,e.font=t.font,e.labelText=t.labelText,e.backgroundColor=t.backgroundColor,e.backgroundPadding=t.backgroundPadding,e.backgroundEnabled=t.backgroundEnabled,e.scaleByDistance=t.scaleByDistance,e.translucencyByDistance=t.translucencyByDistance,e.distanceDisplayCondition=t.distanceDisplayCondition,e.heightOffset=t.heightOffset,e.anchorLineEnabled=t.anchorLineEnabled,e.anchorLineColor=t.anchorLineColor,e.image=t.image,e.disableDepthTestDistance=t.disableDepthTestDistance,e.horizontalOrigin=t.horizontalOrigin,e.verticalOrigin=t.verticalOrigin,e.labelHorizontalOrigin=t.labelHorizontalOrigin,e.labelVerticalOrigin=t.labelVerticalOrigin,e.lineWidth=t.lineWidth;let n={};if(l(t.meta)){let i=t.defines,o=t.meta??G.EMPTY_OBJECT;for(let r in o)o.hasOwnProperty(r)&&(n[r]=new Sd(o[r],i))}e._meta=n,e._ready=!0}function cr(e,t){let n=(e._style??G.EMPTY_OBJECT).defines;if(l(t)){if(typeof t=="boolean"||typeof t=="number")return new Sd(String(t));if(typeof t=="string")return new Sd(t,n);if(l(t.conditions))return new iF(t,n)}else return;return t}function lr(e){if(l(e)){if(l(e.expression))return e.expression;if(l(e.conditionsExpression))return We(e.conditionsExpression,!0)}else return;return e}Object.defineProperties(JA.prototype,{style:{get:function(){return this._style}},show:{get:function(){return this._show},set:function(e){this._show=cr(this,e),this._style.show=lr(this._show),this._showShaderFunctionReady=!1}},color:{get:function(){return this._color},set:function(e){this._color=cr(this,e),this._style.color=lr(this._color),this._colorShaderFunctionReady=!1}},pointSize:{get:function(){return this._pointSize},set:function(e){this._pointSize=cr(this,e),this._style.pointSize=lr(this._pointSize),this._pointSizeShaderFunctionReady=!1}},pointOutlineColor:{get:function(){return this._pointOutlineColor},set:function(e){this._pointOutlineColor=cr(this,e),this._style.pointOutlineColor=lr(this._pointOutlineColor)}},pointOutlineWidth:{get:function(){return this._pointOutlineWidth},set:function(e){this._pointOutlineWidth=cr(this,e),this._style.pointOutlineWidth=lr(this._pointOutlineWidth)}},labelColor:{get:function(){return this._labelColor},set:function(e){this._labelColor=cr(this,e),this._style.labelColor=lr(this._labelColor)}},labelOutlineColor:{get:function(){return this._labelOutlineColor},set:function(e){this._labelOutlineColor=cr(this,e),this._style.labelOutlineColor=lr(this._labelOutlineColor)}},labelOutlineWidth:{get:function(){return this._labelOutlineWidth},set:function(e){this._labelOutlineWidth=cr(this,e),this._style.labelOutlineWidth=lr(this._labelOutlineWidth)}},font:{get:function(){return this._font},set:function(e){this._font=cr(this,e),this._style.font=lr(this._font)}},labelStyle:{get:function(){return this._labelStyle},set:function(e){this._labelStyle=cr(this,e),this._style.labelStyle=lr(this._labelStyle)}},labelText:{get:function(){return this._labelText},set:function(e){this._labelText=cr(this,e),this._style.labelText=lr(this._labelText)}},backgroundColor:{get:function(){return this._backgroundColor},set:function(e){this._backgroundColor=cr(this,e),this._style.backgroundColor=lr(this._backgroundColor)}},backgroundPadding:{get:function(){return this._backgroundPadding},set:function(e){this._backgroundPadding=cr(this,e),this._style.backgroundPadding=lr(this._backgroundPadding)}},backgroundEnabled:{get:function(){return this._backgroundEnabled},set:function(e){this._backgroundEnabled=cr(this,e),this._style.backgroundEnabled=lr(this._backgroundEnabled)}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){this._scaleByDistance=cr(this,e),this._style.scaleByDistance=lr(this._scaleByDistance)}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){this._translucencyByDistance=cr(this,e),this._style.translucencyByDistance=lr(this._translucencyByDistance)}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){this._distanceDisplayCondition=cr(this,e),this._style.distanceDisplayCondition=lr(this._distanceDisplayCondition)}},heightOffset:{get:function(){return this._heightOffset},set:function(e){this._heightOffset=cr(this,e),this._style.heightOffset=lr(this._heightOffset)}},anchorLineEnabled:{get:function(){return this._anchorLineEnabled},set:function(e){this._anchorLineEnabled=cr(this,e),this._style.anchorLineEnabled=lr(this._anchorLineEnabled)}},anchorLineColor:{get:function(){return this._anchorLineColor},set:function(e){this._anchorLineColor=cr(this,e),this._style.anchorLineColor=lr(this._anchorLineColor)}},image:{get:function(){return this._image},set:function(e){this._image=cr(this,e),this._style.image=lr(this._image)}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){this._disableDepthTestDistance=cr(this,e),this._style.disableDepthTestDistance=lr(this._disableDepthTestDistance)}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){this._horizontalOrigin=cr(this,e),this._style.horizontalOrigin=lr(this._horizontalOrigin)}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){this._verticalOrigin=cr(this,e),this._style.verticalOrigin=lr(this._verticalOrigin)}},labelHorizontalOrigin:{get:function(){return this._labelHorizontalOrigin},set:function(e){this._labelHorizontalOrigin=cr(this,e),this._style.labelHorizontalOrigin=lr(this._labelHorizontalOrigin)}},labelVerticalOrigin:{get:function(){return this._labelVerticalOrigin},set:function(e){this._labelVerticalOrigin=cr(this,e),this._style.labelVerticalOrigin=lr(this._labelVerticalOrigin)}},lineWidth:{get:function(){return this._lineWidth},set:function(e){this._lineWidth=cr(this,e),this._style.lineWidth=lr(this._lineWidth)}},meta:{get:function(){return this._meta},set:function(e){this._meta=e}}});JA.fromUrl=function(e){return De.createIfNeeded(e).fetchJson(e).then(function(n){return new JA(n)})};JA.prototype.getColorShaderFunction=function(e,t,n){return this._colorShaderFunctionReady?(n.translucent=this._colorShaderTranslucent,this._colorShaderFunction):(this._colorShaderFunctionReady=!0,l(this.color)&&l(this.color.getShaderFunction)?this._colorShaderFunction=this.color.getShaderFunction(e,t,n,"vec4"):this._colorShaderFunction=void 0,this._colorShaderTranslucent=n.translucent,this._colorShaderFunction)};JA.prototype.getShowShaderFunction=function(e,t,n){return this._showShaderFunctionReady?this._showShaderFunction:(this._showShaderFunctionReady=!0,l(this.show)&&l(this.show.getShaderFunction)?this._showShaderFunction=this.show.getShaderFunction(e,t,n,"bool"):this._showShaderFunction=void 0,this._showShaderFunction)};JA.prototype.getPointSizeShaderFunction=function(e,t,n){return this._pointSizeShaderFunctionReady?this._pointSizeShaderFunction:(this._pointSizeShaderFunctionReady=!0,l(this.pointSize)&&l(this.pointSize.getShaderFunction)?this._pointSizeShaderFunction=this.pointSize.getShaderFunction(e,t,n,"float"):this._pointSizeShaderFunction=void 0,this._pointSizeShaderFunction)};JA.prototype.getVariables=function(){let e=[];return l(this.color)&&l(this.color.getVariables)&&Qn(e,this.color.getVariables()),l(this.show)&&l(this.show.getVariables)&&Qn(e,this.show.getVariables()),l(this.pointSize)&&l(this.pointSize.getVariables)&&Qn(e,this.pointSize.getVariables()),e=e.filter(function(t,n,i){return i.indexOf(t)===n}),e};var Fg=JA;var __e=new Bc,A_e=new rc,y_e=new za,Oot=new mm,Mot=new gm,Bot=new pm,wQ=class{constructor(t,n,i=0){lt(this,"_color",new V);lt(this,"_outlineColor",new V);this._content=t,this._batchId=n,this._batchTableId=i,this._primitivesByCollection=new Map}addPrimitiveByCollection(t,n){let i=this._primitivesByCollection.get(t);i||(i=[],this._primitivesByCollection.set(t,i)),i.push(n)}get show(){for(let t of this._iteratePrimitives())if(t.show)return!0;return!1}set show(t){for(let n of this._iteratePrimitives())n.show=t}get color(){for(let t of this._iterateMaterials())return V.clone(t.color,this._color);return V.clone(V.WHITE,this._color)}set color(t){for(let n of this._iterateMaterials())V.clone(t,n.color)}get pointSize(){for(let t of this._iteratePointMaterials())return t.size;return 1}set pointSize(t){for(let n of this._iteratePointMaterials())n.size=t}get pointOutlineColor(){for(let t of this._iteratePointMaterials())return V.clone(t.outlineColor,this._outlineColor);return V.clone(V.WHITE,this._outlineColor)}set pointOutlineColor(t){for(let n of this._iteratePointMaterials())V.clone(t,n.outlineColor)}get pointOutlineWidth(){for(let t of this._iteratePointMaterials())return t.outlineWidth;return 0}set pointOutlineWidth(t){for(let n of this._iteratePointMaterials())n.outlineWidth=t}get lineWidth(){for(let t of this._iteratePolylineMaterials())return t.width;return 1}set lineWidth(t){for(let n of this._iteratePolylineMaterials())n.width=t}get lineOutlineColor(){for(let t of this._iteratePolylineMaterials())return V.clone(t.outlineColor,this._outlineColor);return V.clone(V.WHITE,this._outlineColor)}set lineOutlineColor(t){for(let n of this._iteratePolylineMaterials())V.clone(t,n.outlineColor)}get lineOutlineWidth(){for(let t of this._iteratePolylineMaterials())return t.outlineWidth;return 0}set lineOutlineWidth(t){for(let n of this._iteratePolylineMaterials())n.outlineWidth=t}get polygonOutlineColor(){for(let t of this._iteratePolygonMaterials())return V.clone(t.outlineColor,this._outlineColor);return V.clone(V.WHITE,this._outlineColor)}set polygonOutlineColor(t){for(let n of this._iteratePolygonMaterials())V.clone(t,n.outlineColor)}get polygonOutlineWidth(){for(let t of this._iteratePolygonMaterials())return t.outlineWidth;return 0}set polygonOutlineWidth(t){for(let n of this._iteratePolygonMaterials())n.outlineWidth=t}get content(){return this._content}get tileset(){return this._content.tileset}get primitive(){return this._content.tileset}get featureId(){return this._batchId}get _batchTable(){return this._content.batchTables[this._batchTableId]}get pickIds(){let t=[];for(let n of this._iteratePrimitives())t.push(n._pickId);return t}hasProperty(t){return l(this._batchTable)?this._batchTable.hasProperty(this._batchId,t):!1}getPropertyIds(t){return l(this._batchTable)?this._batchTable.getPropertyIds(this._batchId,t):[]}getProperty(t){if(l(this._batchTable))return this._batchTable.getProperty(this._batchId,t)}getPropertyInherited(t){return Qa.getPropertyInherited(this._content,this._batchId,t,this._batchTable)}setProperty(t,n){throw new _e("Not implemented")}isExactClass(t){return l(this._batchTable)?this._batchTable.isExactClass(this._batchId,t):!1}isClass(t){return l(this._batchTable)?this._batchTable.isClass(this._batchId,t):!1}getExactClassName(){if(l(this._batchTable))return this._batchTable.getExactClassName(this._batchId)}*_iteratePrimitives(){yield*this._iteratePrimitivesWith(ku,__e),yield*this._iteratePrimitivesWith(Uu,A_e),yield*this._iteratePrimitivesWith(zu,y_e)}*_iteratePrimitivesWith(t,n){let i=this._content._collections;for(let o=0;o<i.length;o++){let r=i[o],a=this._primitivesByCollection.get(o);if(a&&r instanceof t)for(let s of a)r.get(s,n),yield n}}*_iterateMaterials(){yield*this._iteratePointMaterials(),yield*this._iteratePolylineMaterials(),yield*this._iteratePolygonMaterials()}*_iteratePointMaterials(){yield*this._iterateMaterialsWith(ku,__e,Oot)}*_iteratePolylineMaterials(){yield*this._iterateMaterialsWith(Uu,A_e,Mot)}*_iteratePolygonMaterials(){yield*this._iterateMaterialsWith(zu,y_e,Bot)}*_iterateMaterialsWith(t,n,i){for(let o of this._iteratePrimitivesWith(t,n))o.getMaterial(i),yield i,o.setMaterial(i)}},eC=wQ;var x_e=new h,Lot=new Bc,Not=new rc,C_e=new za;function Fot(e,t){let n=t.scene.nodes,i={collections:[],collectionLocalMatrices:[],collectionFeatureTableIds:new Map,featuresByTableId:new Map};for(let o=0;o<n.length;o++)T_e(e,n[o],M.IDENTITY,i);return i}function rG(e){let t=e.BYTES_PER_ELEMENT*8;return Math.pow(2,t)-1}function kot(e){let t={pointPrimitiveCount:0,pointVertexCount:0,polylinePrimitiveCount:0,polylineVertexCount:0,polygonPrimitiveCount:0,polygonVertexCount:0,polygonHoleCount:0,polygonTriangleCount:0},n=e.vector,i=e.polygon,o=e.primitiveType,a=ht.getAttributeBySemantic(e,it.POSITION).count,s=e.indices?hs.readIndicesAsTypedArray(e.indices):void 0;if(o===Re.POINTS)t.pointPrimitiveCount+=a,t.pointVertexCount+=a;else if(o===Re.LINE_STRIP){let c=n?n.count:b_e(s);t.polylinePrimitiveCount+=c,t.polylineVertexCount+=s.length-c+1}else if(o===Re.TRIANGLES||o===Re.LINE_LOOP)if(n){t.polygonPrimitiveCount+=n.count,t.polygonVertexCount+=a,t.polygonTriangleCount+=s.length/3;let c=n.polygonHoleCounts;if(c)for(let u=0;u<c.length;u++)t.polygonHoleCount+=c[u]}else{let c=b_e(i.loopIndices);t.polygonPrimitiveCount+=i.count,t.polygonVertexCount+=i.loopIndices.length-c+1,t.polygonTriangleCount+=i.triangleIndices.length,t.polygonHoleCount+=c-i.count}else throw new re(`Unexpected primitive type: ${o}`);return t}function b_e(e){let t=rG(e),n=0;for(let i=0;i<e.length;i++)e[i]===t&&i+1<e.length&&n++;return n+1}function zot(e,t,n,i,o){let r=ht.getAttributeBySemantic(t,it.POSITION),a=r.typedArray??(n.positionNormalized?hs.readAttributeAsRawCompactTypedArray(r):hs.readAttributeAsTypedArray(r)),s=t.indices?hs.readIndicesAsTypedArray(t.indices):void 0,c=Uot(e,t,o);n instanceof ku?Vot(n,i,a,s,c):n instanceof Uu?jot(n,i,a,s,c):n instanceof zu&&(l(t.vector)?Got(n,i,a,s,c,t.vector):Hot(n,i,a,c,t.polygon))}function Uot(e,t,n){let i=e.tileset.featureIdLabel,o=ht.getFeatureIdsByLabel(t.featureIds,i);if(!(o instanceof _n.FeatureIdAttribute))return()=>{};let r=ht.getAttributeBySemantic(t,it.FEATURE_ID,o.setIndex),a=r.typedArray??hs.readAttributeAsTypedArray(r);for(let s=0;s<a.length;s++){let c=a[s];if(!n.has(c)){let u=new eC(e,c,o.propertyTableId);n.set(c,u)}}return function(c){let u=a[c];if(u!==o.nullFeatureId)return n.get(u)}}function Vot(e,t,n,i,o){let r=n.length/3;for(let a=0,s=i?i.length:r;a<s;a++){let c=i?i[a]:a;h.fromArray(n,c*3,x_e);let u=o(c);u&&u.addPrimitiveByCollection(t,a),e.add({position:x_e,pickObject:u,featureId:u?.featureId},Lot)}}function jot(e,t,n,i,o){let r=rG(i),a=0,s=0,c=0;for(let u=0;u<i.length;u++){if(i[u]===r?s=u-a:u+1===i.length&&(s=u+1-a),s===0)continue;let d=a+s,p=i.subarray(a,d),g=E_e(n,p,3),m=o(i[a]);m&&m.addPrimitiveByCollection(t,c),e.add({positions:g,pickObject:m,featureId:m?.featureId},Not),a=u+1,s=0,c++}}function Got(e,t,n,i,o,r){let a=r.polygonAttributeOffsets,s=r.polygonIndicesOffsets,c=r.polygonHoleCounts,u=r.polygonHoleOffsets,f=n.length/3,d=a.length;for(let p=0;p<d;p++){let g=a[p],m=p+1<d?a[p+1]:f,A=n.subarray(g*3,m*3),y;if(l(c)&&c[p]>0){let S=c[p];y=u.slice(p,p+S);for(let w=0;w<S;w++)y[w]-=g}let x=s[p],b=p+1<d?s[p+1]:i.length,C=i.slice(x,b);for(let S=0;S<C.length;S++)C[S]-=g;let E=o(g);E&&E.addPrimitiveByCollection(t,p),e.add({positions:A,triangles:C,holes:y,pickObject:E,featureId:E?.featureId},C_e)}}function Hot(e,t,n,i,o){let r=o.loopIndices.constructor,a=new r(o.loopIndices.length),s=rG(o.loopIndices);for(let c=0;c<o.count;c++){let u=c+1===o.count,f=o.loopIndicesOffsets[c],d=u?o.loopIndices.length:o.loopIndicesOffsets[c+1],p=o.loopIndices.subarray(f,d),g=E_e(n,p,3,a),m=[];for(let b=0;b<p.length;b++){let C=b+1===p.length;p[b]===s&&!C&&m.push(b)}let A=new r(m),y;if(l(o.triangleIndices)){let b=o.triangleIndicesOffsets[c],C=u?o.triangleIndices.length:o.triangleIndicesOffsets[c+1];y=o.triangleIndices.subarray(b,C);for(let E=0;E<y.length;E++)y[E]=a[y[E]]}else throw new Error("Runtime triangulation not yet supported.");let x=i(p[0]);x&&x.addPrimitiveByCollection(t,c),e.add({positions:g,triangles:y,holes:A,pickObject:x,featureId:x?.featureId},C_e)}}function T_e(e,t,n,i){let o=ht.getNodeTransform(t),r=M.multiplyTransformation(n,o,new M),a=t.primitives;for(let c=0;c<a.length;c++){let u=a[c],f=u.primitiveType,d,p=kot(u),g=ht.getAttributeBySemantic(u,it.POSITION),m=g.normalized??!1,A=g.componentDatatype;f===Re.POINTS?d=new ku({primitiveCountMax:p.pointPrimitiveCount,allowPicking:!0,positionNormalized:m,positionDatatype:A}):f===Re.LINE_STRIP?d=new Uu({primitiveCountMax:p.polylinePrimitiveCount,vertexCountMax:p.polylineVertexCount,allowPicking:!0,positionNormalized:m,positionDatatype:A}):(f===Re.TRIANGLES||f===Re.LINE_LOOP)&&(d=new zu({primitiveCountMax:p.polygonPrimitiveCount,vertexCountMax:p.polygonVertexCount,holeCountMax:p.polygonHoleCount,triangleCountMax:p.polygonTriangleCount,allowPicking:!0,positionNormalized:m,positionDatatype:A}));let x=u.featureIds?.[0]?.propertyTableId;i.featuresByTableId.has(x)||i.featuresByTableId.set(x,new Map),i.collections.push(d),i.collectionLocalMatrices.push(M.clone(r)),i.collectionFeatureTableIds.set(d,x),zot(e,u,d,i.collections.length-1,i.featuresByTableId.get(x))}let s=t.children;for(let c=0;c<s.length;c++)T_e(e,s[c],r,i)}function E_e(e,t,n,i){let o=rG(t),r=0;for(let u=0;u<t.length;u++)t[u]!==o&&r++;let a=e.constructor,s=new a(r*n),c=0;for(let u=0;u<t.length;u++){let f=t[u];if(i&&(i[f]=f===o?o:c),f!==o){for(let d=0;d<n;d++)s[c*n+d]=e[f*n+d];c++}}return s}var oF=Fot;var aG=new Bc,sG=new rc,cG=new za,rF=new mm,IQ=new gm,v_e=new pm,S_e=new M,DQ=class e{constructor(t,n,i){this._tileset=t,this._tile=n,this._resource=i,this._model=void 0,this._collections=[],this._collectionLocalMatrices=[],this._collectionFeatureTableIds=new Map,this._featuresByTableId=new Map,this._metadata=void 0,this._group=void 0,this.featurePropertiesDirty=!1,this._ready=!1,this._modelMatrix=M.clone(M.IDENTITY)}get featuresLength(){return this.batchTables.reduce((t,n)=>t+n.featuresLength,0)}get pointsLength(){return this._collections.filter(t=>t instanceof ku).reduce((t,n)=>t+n.primitiveCount,0)}get trianglesLength(){return this._collections.reduce((t,n)=>n instanceof zu?t+n.triangleCount:n instanceof Uu?t+(n.vertexCount-n.primitiveCount)*2:t,0)}get geometryByteLength(){return this._collections.reduce((t,n)=>t+n.byteLength,0)}get texturesByteLength(){return 0}get batchTableByteLength(){return this.batchTables.reduce((t,n)=>t+n.batchTableByteLength,0)}get innerContents(){}get ready(){return this._ready}get tileset(){return this._tileset}get tile(){return this._tile}get url(){return this._resource.getUrlComponent(!0)}get batchTables(){return this._model._featureTables}get batchTable(){throw new _e("Deprecated: Use `content.batchTables`.")}get metadata(){return this._metadata}set metadata(t){this._metadata=t}get group(){return this._group}set group(t){this._group=t}getFeature(t,n){return this._featuresByTableId.get(n)?.get(t)}hasProperty(t,n,i){let o=this.getFeature(t,i);return o?o.hasProperty(n):!1}applyDebugSettings(t,n){let i=t?`color("${n.toCssHexString()}", 1.0)`:'color("white", 1.0)';this.applyStyle(new Fg({color:i}))}applyStyle(t){let n=r=>r instanceof ku,i=r=>r instanceof Uu,o=r=>r instanceof zu;for(let r of this._collections.filter(n)){let a=this._collectionFeatureTableIds.get(r);for(let s=0,c=r.primitiveCount;s<c;s++){r.get(s,aG);let u=this.getFeature(aG.featureId,a);l(t.show)&&(aG.show=t.show.evaluate(u)),l(t.color)&&t.color.evaluate(u,rF.color),l(t.pointSize)&&(rF.size=t.pointSize.evaluate(u)),l(t.pointOutlineWidth)&&(rF.outlineWidth=t.pointOutlineWidth.evaluate(u)),l(t.pointOutlineColor)&&t.pointOutlineColor.evaluate(u,rF.outlineColor),aG.setMaterial(rF)}}for(let r of this._collections.filter(i)){let a=this._collectionFeatureTableIds.get(r);for(let s=0,c=r.primitiveCount;s<c;s++){r.get(s,sG);let u=this.getFeature(sG.featureId,a);l(t.show)&&(sG.show=t.show.evaluate(u)),l(t.color)&&t.color.evaluate(u,IQ.color),l(t.lineWidth)&&(IQ.width=t.lineWidth.evaluate(u)),sG.setMaterial(IQ)}}for(let r of this._collections.filter(o)){let a=this._collectionFeatureTableIds.get(r);for(let s=0,c=r.primitiveCount;s<c;s++){r.get(s,cG);let u=this.getFeature(cG.featureId,a);l(t.show)&&(cG.show=t.show.evaluate(u)),l(t.color)&&t.color.evaluate(u,v_e.color),cG.setMaterial(v_e)}}}update(t,n){if(l(this._model)&&!this._ready){let i=this._model;i.modelMatrix=this._tile.computedTransform,i.update(n),i.ready&&(qot(this),this._ready=!0)}M.multiplyTransformation(this._tile.computedTransform,this._modelMatrix,S_e);for(let i=0;i<this._collections.length;i++)M.multiplyTransformation(S_e,this._collectionLocalMatrices[i],this._collections[i].modelMatrix),this._collections[i].update(n)}pick(t,n,i){}isDestroyed(){return!1}destroy(){return this._model?.destroy(),this._model=void 0,this._collections.forEach(t=>t.destroy()),this._collections.length=0,fe(this)}static async fromGltf(t,n,i,o){let r=new e(t,n,i),a=Wot(t,n,r,o),s=await wf.fromGltfAsync(a);return s.show=!1,r._model=s,r}};function Wot(e,t,n,i){return{gltf:i,basePath:n._resource,cull:!1,releaseGltfJson:!0,opaquePass:Ie.CESIUM_3D_TILE,modelMatrix:t.computedTransform,upAxis:e._modelUpAxis,forwardAxis:e._modelForwardAxis,incrementallyLoadTextures:!1,content:n,featureIdLabel:e.featureIdLabel,instanceFeatureIdLabel:e.instanceFeatureIdLabel,projectTo2D:e._projectTo2D,enablePick:e._enablePick,enableDebugWireframe:e._enableDebugWireframe,enableShowOutline:!1}}function qot(e){let t=e._model.sceneGraph.components,n=ht.getAxisCorrectionMatrix(t.upAxis,t.forwardAxis,new M);M.multiplyTransformation(t.transform,n,e._modelMatrix);let i=oF(e,t);e._collections=i.collections,e._collectionLocalMatrices=i.collectionLocalMatrices,e._collectionFeatureTableIds=i.collectionFeatureTableIds,e._featuresByTableId=i.featuresByTableId}var ZA=DQ;function ac(){}ac._maxSortingConcurrency=Math.max(sn.hardwareConcurrency-1,1);ac._sorterTaskProcessor=void 0;ac._taskProcessorReady=!1;ac._error=void 0;ac._getSorterTaskProcessor=function(){if(!l(ac._sorterTaskProcessor)){let e=new Gn("gaussianSplatSorter",ac._maxSortingConcurrency);e.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/wasm_splats_bg.wasm"}).then(function(t){t?ac._taskProcessorReady=!0:ac._error=new re("Gaussian splat sorter could not be initialized.")}).catch(t=>{ac._error=t}),ac._sorterTaskProcessor=e}return ac._sorterTaskProcessor};ac.radixSortIndexes=function(e){let t=ac._getSorterTaskProcessor();if(l(ac._error))throw ac._error;if(ac._taskProcessorReady)return t.scheduleTask(e,[e.primitive.positions.buffer])};var tC=ac;function sc(){}sc._maxSortingConcurrency=Math.max(sn.hardwareConcurrency-1,1);sc._textureTaskProcessor=void 0;sc._taskProcessorReady=!1;sc._error=void 0;sc._getTextureTaskProcessor=function(){if(!l(sc._textureTaskProcessor)){let e=new Gn("gaussianSplatTextureGenerator",sc._maxSortingConcurrency);e.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/wasm_splats_bg.wasm"}).then(function(t){t?sc._taskProcessorReady=!0:sc._error=new re("Gaussian splat sorter could not be initialized.")}).catch(t=>{sc._error=t}),sc._textureTaskProcessor=e}return sc._textureTaskProcessor};sc.generateFromAttributes=function(e){let t=sc._getTextureTaskProcessor();if(l(sc._error))throw sc._error;if(!sc._taskProcessorReady)return;let{attributes:n}=e;return t.scheduleTask(e,[n.positions.buffer,n.scales.buffer,n.rotations.buffer,n.colors.buffer])};var aF=sc;function Yot(e){let t=new V0;this.shaderBuilder=t,this.uniformMap={},this.renderStateOptions=Ve.getState(Ve.fromCache({depthTest:{enabled:!0,func:tc.LESS_OR_EQUAL}})),this.alphaOptions=new Mb,this.hasSkipLevelOfDetail=!1,e._useLogDepth&&t.addDefine("LOG_DEPTH_READ_ONLY",void 0,he.FRAGMENT)}var sF=Yot;var cF=`//
- // Vertex shader for Gaussian splats.
-
- // The splats are rendered as quads in view space. Splat attributes are loaded from a texture with precomputed 3D covariance.
-
- // Passes local quad coordinates and color to the fragment shader for Gaussian evaluation.
- //
- // Discards splats outside the view frustum or with negligible screen size.
- //
- #if defined(HAS_SPHERICAL_HARMONICS)
- const uint coefficientCount[3] = uint[3](3u,8u,15u);
- const float SH_C1 = 0.48860251;
- const float SH_C2[5] = float[5](
- 1.092548430,
- -1.09254843,
- 0.315391565,
- -1.09254843,
- 0.546274215
- );
-
- const float SH_C3[7] = float[7](
- -0.59004358,
- 2.890611442,
- -0.45704579,
- 0.373176332,
- -0.45704579,
- 1.445305721,
- -0.59004358
- );
-
- //Retrieve SH coefficient. Currently RG32UI format
- uvec2 loadSHCoeff(uint splatID, int index) {
- ivec2 shTexSize = textureSize(u_sphericalHarmonicsTexture, 0);
- uint dims = coefficientCount[uint(u_sphericalHarmonicsDegree)-1u];
- uint splatsPerRow = uint(shTexSize.x) / dims;
- uint shIndex = (splatID%splatsPerRow) * dims + uint(index);
- ivec2 shPosCoord = ivec2(shIndex, splatID / splatsPerRow);
- return texelFetch(u_sphericalHarmonicsTexture, shPosCoord, 0).rg;
- }
-
- //Unpack RG32UI half float coefficients to vec3
- vec3 halfToVec3(uvec2 packed) {
- return vec3(unpackHalf2x16(packed.x), unpackHalf2x16(packed.y).x);
- }
-
- vec3 loadAndExpandSHCoeff(uint splatID, int index) {
- uvec2 coeff = loadSHCoeff(splatID, index);
- return halfToVec3(coeff);
- }
-
- vec3 evaluateSH(uint splatID, vec3 viewDir) {
- vec3 result = vec3(0.0);
- int coeffIndex = 0;
- float x = viewDir.x, y = viewDir.y, z = viewDir.z;
-
- if (u_sphericalHarmonicsDegree >= 1.) {
- vec3 sh1 = loadAndExpandSHCoeff(splatID, coeffIndex++);
- vec3 sh2 = loadAndExpandSHCoeff(splatID, coeffIndex++);
- vec3 sh3 = loadAndExpandSHCoeff(splatID, coeffIndex++);
- result += -SH_C1 * y * sh1 + SH_C1 * z * sh2 - SH_C1 * x * sh3;
-
- if (u_sphericalHarmonicsDegree >= 2.) {
- float xx = x * x;
- float yy = y * y;
- float zz = z * z;
- float xy = x * y;
- float yz = y * z;
- float xz = x * z;
-
- vec3 sh4 = loadAndExpandSHCoeff(splatID, coeffIndex++);
- vec3 sh5 = loadAndExpandSHCoeff(splatID, coeffIndex++);
- vec3 sh6 = loadAndExpandSHCoeff(splatID, coeffIndex++);
- vec3 sh7 = loadAndExpandSHCoeff(splatID, coeffIndex++);
- vec3 sh8 = loadAndExpandSHCoeff(splatID, coeffIndex++);
- result += SH_C2[0] * xy * sh4 +
- SH_C2[1] * yz * sh5 +
- SH_C2[2] * (2.0f * zz - xx - yy) * sh6 +
- SH_C2[3] * xz * sh7 +
- SH_C2[4] * (xx - yy) * sh8;
-
- if (u_sphericalHarmonicsDegree >= 3.) {
- vec3 sh9 = loadAndExpandSHCoeff(splatID, coeffIndex++);
- vec3 sh10 = loadAndExpandSHCoeff(splatID, coeffIndex++);
- vec3 sh11 = loadAndExpandSHCoeff(splatID, coeffIndex++);
- vec3 sh12 = loadAndExpandSHCoeff(splatID, coeffIndex++);
- vec3 sh13 = loadAndExpandSHCoeff(splatID, coeffIndex++);
- vec3 sh14 = loadAndExpandSHCoeff(splatID, coeffIndex++);
- vec3 sh15 = loadAndExpandSHCoeff(splatID, coeffIndex++);
- result += SH_C3[0] * y * (3.0f * xx - yy) * sh9 +
- SH_C3[1] * xy * z * sh10 +
- SH_C3[2] * y * (4.0f * zz - xx - yy) * sh11 +
- SH_C3[3] * z * (2.0f * zz - 3.0f * xx - 3.0f * yy) * sh12 +
- SH_C3[4] * x * (4.0f * zz - xx - yy) * sh13 +
- SH_C3[5] * z * (xx - yy) * sh14 +
- SH_C3[6] * x * (xx - 3.0f * yy) * sh15;
- }
- }
- }
- return result;
- }
- #endif
-
- // Transforms and projects splat covariance into screen space and extracts the major and minor axes of the Gaussian ellipsoid
- // which is used to calculate the vertex position in clip space.
- vec4 calcCovVectors(vec3 viewPos, mat3 Vrk) {
- vec4 t = vec4(viewPos, 1.0);
- vec2 focal = vec2(czm_projection[0][0] * czm_viewport.z, czm_projection[1][1] * czm_viewport.w);
-
- vec2 J1 = focal / t.z;
- vec2 J2 = -focal * vec2(t.x, t.y) / (t.z * t.z);
- mat3 J = mat3(
- J1.x, 0.0, J2.x,
- 0.0, J1.y, J2.y,
- 0.0, 0.0, 0.0
- );
-
- mat3 R = mat3(czm_modelView);
-
- //transform our covariance into view space
- //ensures orientation is correct
- mat3 Vrk_view = R * Vrk * transpose(R);
- mat3 cov = transpose(J) * Vrk_view * J;
-
- float diagonal1 = cov[0][0] + .3;
- float offDiagonal = cov[0][1];
- float diagonal2 = cov[1][1] + .3;
-
- float mid = 0.5 * (diagonal1 + diagonal2);
- float radius = length(vec2((diagonal1 - diagonal2) * 0.5, offDiagonal));
- float lambda1 = mid + radius;
- float lambda2 = max(mid - radius, 0.1);
-
- vec2 diagonalVector = normalize(vec2(offDiagonal, lambda1 - diagonal1));
-
- return vec4(
- min(sqrt(2.0 * lambda1), 1024.0) * diagonalVector,
- min(sqrt(2.0 * lambda2), 1024.0) * vec2(diagonalVector.y, -diagonalVector.x)
- );
- }
-
- highp vec4 discardVec = vec4(0.0, 0.0, 2.0, 1.0);
-
- void main() {
- uint texIdx = uint(a_splatIndex);
- // u_splatRowMask and u_splatRowShift encode the row width of the splat
- // attribute texture. The texture width is always maximumTextureSize, which
- // varies by GPU, so these are passed as uniforms rather than constants.
- // rowMask = maximumTextureSize/2 - 1
- // rowShift = log2(maximumTextureSize/2)
- uint rowMask = uint(u_splatRowMask);
- uint rowShift = uint(u_splatRowShift);
- ivec2 posCoord = ivec2(int((texIdx & rowMask) << 1), int(texIdx >> rowShift));
- vec4 splatPosition = vec4( uintBitsToFloat(uvec4(texelFetch(u_splatAttributeTexture, posCoord, 0))) );
-
- vec4 splatViewPos = czm_modelView * vec4(splatPosition.xyz, 1.0);
- vec4 clipPosition = czm_projection * splatViewPos;
-
- float clip = 1.2 * clipPosition.w;
- if (clipPosition.z < -clip || clipPosition.x < -clip || clipPosition.x > clip ||
- clipPosition.y < -clip || clipPosition.y > clip) {
- gl_Position = vec4(0.0, 0.0, 2.0, 1.0);
- return;
- }
-
- ivec2 covCoord = ivec2(int(((texIdx & rowMask) << 1) | 1u), int(texIdx >> rowShift));
- uvec4 covariance = uvec4(texelFetch(u_splatAttributeTexture, covCoord, 0));
-
- gl_Position = clipPosition;
-
- vec2 u1 = unpackHalf2x16(covariance.x) ;
- vec2 u2 = unpackHalf2x16(covariance.y);
- vec2 u3 = unpackHalf2x16(covariance.z);
- mat3 Vrk = mat3(u1.x, u1.y, u2.x, u1.y, u2.y, u3.x, u2.x, u3.x, u3.y);
-
- vec4 covVectors = calcCovVectors(splatViewPos.xyz, Vrk);
-
- if (dot(covVectors.xy, covVectors.xy) < 4.0 && dot(covVectors.zw, covVectors.zw) < 4.0) {
- gl_Position = discardVec;
- return;
- }
-
- vec2 corner = vec2((gl_VertexID << 1) & 2, gl_VertexID & 2) - 1.;
-
- gl_Position += vec4((corner.x * covVectors.xy + corner.y * covVectors.zw) / czm_viewport.zw * gl_Position.w, 0, 0);
- gl_Position.z = clamp(gl_Position.z, -abs(gl_Position.w), abs(gl_Position.w));
-
- v_vertPos = corner ;
- v_splatColor = vec4(covariance.w & 0xffu, (covariance.w >> 8) & 0xffu, (covariance.w >> 16) & 0xffu, (covariance.w >> 24) & 0xffu) / 255.0;
- #if defined(HAS_SPHERICAL_HARMONICS)
- vec4 splatWC = czm_inverseView * splatViewPos;
- vec3 viewDirModel = normalize(u_inverseModelRotation * (splatWC.xyz - u_cameraPositionWC.xyz));
-
- v_splatColor.rgb += evaluateSH(texIdx, viewDirModel).rgb;
- #endif
- v_splitDirection = u_splitDirection;
- }`;var lF=`//
- // Fragment shader for Gaussian splats.
- // Renders a Gaussian splat within a quad, discarding fragments outside the unit circle.
- // Applies an approximate Gaussian falloff based on distance from the center and outputs
- // a color modulated by the alpha and Gaussian weight.
- //
- void main() {
- if (v_splitDirection < 0.0 && gl_FragCoord.x > czm_splitPosition) discard;
- if (v_splitDirection > 0.0 && gl_FragCoord.x < czm_splitPosition) discard;
-
- float A = -dot(v_vertPos, v_vertPos);
- if (A < -4.) {
- discard;
- }
-
- float B = exp(A * 4.) * v_splatColor.a ;
- out_FragColor = vec4(v_splatColor.rgb * B , B);
- }
- `;var nC=new M,O_e=new M,uF=new M,pi=new $,fF=new Le,Xot=new h,Kot=new Le,Qot=new h,$ot=1e-12,lG=1e-5,PQ=1e-7,zs={IDLE:0,WAITING:1,SORTING:2,SORTED:3,ERROR:4},Ua={BUILDING:"BUILDING",TEXTURE_PENDING:"TEXTURE_PENDING",TEXTURE_READY:"TEXTURE_READY",SORTING:"SORTING",READY:"READY"},Jot=2,Zot=30,ert=3,trt=.008726646259971648,nrt=1;function irt(e,t){let n=e._lastSteadySortFrameNumber>=0?t.frameNumber-e._lastSteadySortFrameNumber:Number.POSITIVE_INFINITY;if(e._lastSteadySortFrameNumber>=0&&n<ert)return!1;let i=t.camera;return l(i)?!e._hasLastSteadySortCameraPosition||!e._hasLastSteadySortCameraDirection||h.distance(i.positionWC,e._lastSteadySortCameraPosition)>=nrt?!0:h.angleBetween(i.directionWC,e._lastSteadySortCameraDirection)>=trt:!1}function w_e(e,t){e._lastSteadySortFrameNumber=t.frameNumber;let n=t.camera;l(n)&&(h.clone(n.positionWC,e._lastSteadySortCameraPosition),e._hasLastSteadySortCameraPosition=!0,h.clone(n.directionWC,e._lastSteadySortCameraDirection),e._hasLastSteadySortCameraDirection=!0)}function ort(e,t){let n=e._selectedTileSet;if(!l(n)||n.size!==t.length)return!0;for(let i=0;i<t.length;i++)if(!n.has(t[i]))return!0;return!1}function I_e(e,t){return l(t)&&t.requestId===e._sortRequestId&&t.dataGeneration===e._splatDataGeneration}function RQ(e){l(e)&&(l(e.gaussianSplatTexture)&&(e.gaussianSplatTexture.destroy(),e.gaussianSplatTexture=void 0),l(e.sphericalHarmonicsTexture)&&(e.sphericalHarmonicsTexture.destroy(),e.sphericalHarmonicsTexture=void 0))}function D_e(e,t,n){if(!l(t))return;e._retiredTextures.push({texture:t,frameNumber:n})}function rrt(e,t){let n=e._retiredTextures;if(!l(n)||n.length===0)return;let i=[];for(let o=0;o<n.length;o++){let r=n[o];t-r.frameNumber>0?r.texture.destroy():i.push(r)}e._retiredTextures=i}function art(e,t){let n=e?.[t];return l(n)?n.buffer:void 0}function srt(e,t,n,i){let o=e._aggregateScratchBuffers[t];l(o)||(o=[],e._aggregateScratchBuffers[t]=o);let r=art(e._snapshot,t);for(let s=0;s<o.length;s++){let c=o[s];if(c.length>=i&&c.buffer!==r)return c}let a=Y.createTypedArray(n,i);return o.push(a),a}function crt(e,t){return e.length===t?e:e.subarray(0,t)}function lrt(e,t,n){if(!l(t.indexes)||t.state!==Ua.READY)throw new _e("Committing snapshot before it is READY.");let i=n.frameNumber,o=e._snapshot,r=l(o)?o.gaussianSplatTexture:e.gaussianSplatTexture;l(r)&&r!==t.gaussianSplatTexture&&D_e(e,r,i);let a=l(o)?o.sphericalHarmonicsTexture:e.sphericalHarmonicsTexture;l(a)&&a!==t.sphericalHarmonicsTexture&&D_e(e,a,i),e._snapshot=t,e._positions=t.positions,e._rotations=t.rotations,e._scales=t.scales,e._colors=t.colors,e._shData=t.shData,e._sphericalHarmonicsDegree=t.sphericalHarmonicsDegree,e._numSplats=t.numSplats,e._indexes=t.indexes,e.gaussianSplatTexture=t.gaussianSplatTexture,e.sphericalHarmonicsTexture=t.sphericalHarmonicsTexture,e._lastTextureWidth=t.lastTextureWidth,e._lastTextureHeight=t.lastTextureHeight,e._splatRowMask=t.splatRowMask,e._splatRowShift=t.splatRowShift,e._splatBudgetSSEScale=t.splatBudgetSSEScale??1,e._hasGaussianSplatTexture=l(t.gaussianSplatTexture),e._needsGaussianSplatTexture=!1,e._gaussianSplatTexturePending=!1,e._vertexArray=void 0,e._vertexArrayLen=-1,e._drawCommand=void 0,e._sorterPromise=void 0,e._activeSort=void 0,e._sorterState=zs.IDLE,e._dirty=!1}async function urt(e,t,n,i){try{let o=await i,r=Rt.maximumTextureSize,a=r,s=Math.ceil(n.numSplats/(r/2)),c=Math.log2(r/2),u=r/2-1;if(s>r){let g=n.numSplats;s=r;let m=a/2;if(n.numSplats=r*m,n.positions=n.positions.subarray(0,n.numSplats*3),n.rotations=n.rotations.subarray(0,n.numSplats*4),n.scales=n.scales.subarray(0,n.numSplats*3),n.colors=n.colors.subarray(0,n.numSplats*4),l(n.shData)){let A=n.shData.length/g;n.shData=n.shData.subarray(0,Math.floor(n.numSplats*A))}n.splatBudgetSSEScale=g/n.numSplats,console.warn(`[GaussianSplat][HARD CAP] ${g} splats exceed the maximum texture capacity (${r}\xD7${m} = ${n.numSplats} splats at width=${a}). Rendering only the first ${n.numSplats} splats to avoid a WebGL crash. Increasing maximumScreenSpaceError by ${n.splatBudgetSSEScale.toFixed(2)}x next frame.`)}else n.splatBudgetSSEScale=1;let f=a*s*4,d;f<=o.data.length?d=o.data.subarray(0,f):(d=new Uint32Array(f),d.set(o.data));let p={width:a,height:s,data:d};if(n.splatRowMask=u,n.splatRowShift=c,e._pendingSnapshot!==n){n.state=Ua.BUILDING;return}if(!l(n.gaussianSplatTexture))n.gaussianSplatTexture=R_e(t.context,p);else if(n.lastTextureHeight!==p.height||n.lastTextureWidth!==p.width){let g=n.gaussianSplatTexture;n.gaussianSplatTexture=R_e(t.context,p),g.destroy()}else n.gaussianSplatTexture.copyFrom({source:{width:p.width,height:p.height,arrayBufferView:p.data}});if(n.lastTextureHeight=p.height,n.lastTextureWidth=p.width,l(n.shData)&&n.sphericalHarmonicsDegree>0){let g=n.sphericalHarmonicsTexture,m=Rt.maximumTextureSize,A=n.shCoefficientCount/3,y=Math.floor(m/A),x=y*(A*2),b=Math.ceil(n.numSplats/y);if(b>m)console.warn(`[GaussianSplat][SHTexture] ${n.numSplats} splats require SH height ${b} > maxTex ${m}. Disabling spherical harmonics for this snapshot (color-only fallback).`),n.sphericalHarmonicsDegree=0,l(g)&&g.destroy(),n.sphericalHarmonicsTexture=void 0;else{let C=new Uint32Array(m*b*2),E=0;for(let S=0;E<n.shData.length;S+=m*2)C.set(n.shData.subarray(E,E+x),S),E+=x;n.sphericalHarmonicsTexture=drt(t.context,{data:C,width:m,height:b}),l(g)&&g.destroy()}}n.state=Ua.TEXTURE_READY}catch(o){console.error("Error generating Gaussian splat texture:",o),n.state=Ua.BUILDING}}async function frt(e,t,n,i){try{let o=await i;if(!l(n)||n.snapshot!==e._pendingSnapshot)return;let r=n.expectedCount,a=r,s=o?.length;if(r!==a||s!==r){e._pendingSortPromise=void 0,e._pendingSort=void 0,n.snapshot.state===Ua.SORTING&&(n.snapshot.state=Ua.TEXTURE_READY);return}let c=n.snapshot;c.indexes=o,c.state=Ua.READY,e._pendingSortPromise=void 0,e._pendingSort=void 0,lrt(e,c,t),e._pendingSnapshot=void 0,nu.buildGSplatDrawCommand(e,t)}catch(o){if(!l(n)||n.snapshot!==e._pendingSnapshot)return;e._pendingSortPromise=void 0,e._pendingSort=void 0,n.snapshot.state===Ua.SORTING&&(n.snapshot.state=Ua.TEXTURE_READY),e._sorterState=zs.ERROR,e._sorterError=o}}async function P_e(e,t,n){try{let i=await n,o=I_e(e,t),r=t?.expectedCount,a=r,s=i?.length;if(!o||(r!==a||s!==r)){o&&(e._sorterPromise=void 0,e._sorterState=zs.IDLE);return}e._indexes=i,e._sorterState=zs.SORTED}catch(i){if(!I_e(e,t))return;e._sorterState=zs.ERROR,e._sorterError=i}}function drt(e,t){return new It({context:e,source:{width:t.width,height:t.height,arrayBufferView:t.data},preMultiplyAlpha:!1,skipColorSpaceConversion:!0,pixelFormat:Xe.RG_INTEGER,pixelDatatype:je.UNSIGNED_INT,flipY:!1,sampler:jt.NEAREST})}function R_e(e,t){return new It({context:e,source:{width:t.width,height:t.height,arrayBufferView:t.data},preMultiplyAlpha:!1,skipColorSpaceConversion:!0,pixelFormat:Xe.RGBA_INTEGER,pixelDatatype:je.UNSIGNED_INT,flipY:!1,sampler:jt.NEAREST})}function nu(e){e=e??G.EMPTY_OBJECT,this._positions=void 0,this._rotations=void 0,this._scales=void 0,this._colors=void 0,this._indexes=void 0,this._numSplats=0,this._needsGaussianSplatTexture=!0,this._snapshot=void 0,this._pendingSnapshot=void 0,this._retiredTextures=[],this._aggregateScratchBuffers={positions:[],scales:[],rotations:[],colors:[]},this._scratchAggregateShBuffer=void 0,this._selectedTilesStableFrames=0,this._needsSnapshotRebuild=!1,this._snapshotRebuildStallFrames=0,this._prevViewMatrix=new M,this._debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this.gaussianSplatTexture=void 0,this.sphericalHarmonicsTexture=void 0,this._lastTextureWidth=0,this._lastTextureHeight=0,this._vertexArray=void 0,this._vertexArrayLen=-1,this._splitDirection=Or.NONE,this._dirty=!1,this._tileset=e.tileset,this._baseTilesetUpdate=this._tileset.update,this._tileset.update=this._wrappedUpdate.bind(this),this._tileset.tileLoad.addEventListener(this.onTileLoad,this),this._tileset.tileVisible.addEventListener(this.onTileVisible,this),this.selectedTileLength=0,this._selectedTileSet=new Set,this._ready=!1,this._hasGaussianSplatTexture=!1,this._gaussianSplatTexturePending=!1,this._drawCommand=void 0,this._drawCommandModelMatrix=new M,this._rootTransform=void 0,this._axisCorrectionMatrix=ht.getAxisCorrectionMatrix(Li.Y,Li.X,new M),this._shInverseRotation=new $,this._isDestroyed=!1,this._sorterState=zs.IDLE,this._sorterPromise=void 0,this._splatDataGeneration=0,this._sortRequestId=0,this._activeSort=void 0,this._pendingSortPromise=void 0,this._pendingSort=void 0,this._lastSteadySortFrameNumber=-1,this._lastSteadySortCameraPosition=new h,this._hasLastSteadySortCameraPosition=!1,this._lastSteadySortCameraDirection=new h,this._hasLastSteadySortCameraDirection=!1,this._sorterError=void 0,this._splatRowMask=0,this._splatRowShift=0,this._splatBudgetSSEScale=1}Object.defineProperties(nu.prototype,{ready:{get:function(){return this._ready}},isStable:{get:function(){return!this._dirty&&(!l(this._pendingSnapshot)||this._pendingSnapshot.state===Ua.READY)}},splitDirection:{get:function(){return this._splitDirection},set:function(e){this._splitDirection!==e&&(this._splitDirection=e,this._dirty=!0)}}});nu.prototype._wrappedUpdate=function(e){let t=this._tileset;if(this._splatBudgetSSEScale!==1){let n=t.maximumScreenSpaceError;t.maximumScreenSpaceError*=this._splatBudgetSSEScale,this._baseTilesetUpdate.call(t,e),t.maximumScreenSpaceError=n}else this._baseTilesetUpdate.call(t,e);this.update(e)};nu.prototype.destroy=function(){if(this._positions=void 0,this._rotations=void 0,this._scales=void 0,this._colors=void 0,this._indexes=void 0,RQ(this._pendingSnapshot),RQ(this._snapshot),l(this._retiredTextures))for(let t=0;t<this._retiredTextures.length;t++)this._retiredTextures[t].texture.destroy();this._retiredTextures=[],this._pendingSnapshot=void 0,this._snapshot=void 0,this._aggregateScratchBuffers=void 0,this.gaussianSplatTexture=void 0,this.sphericalHarmonicsTexture=void 0;let e=this._drawCommand;return l(e)&&(e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy()),l(this._vertexArray)&&(this._vertexArray.destroy(),this._vertexArray=void 0),this._tileset.update=this._baseTilesetUpdate.bind(this._tileset),fe(this)};nu.prototype.isDestroyed=function(){return this._isDestroyed};nu.prototype.onTileLoad=function(e){this._dirty=!0};nu.prototype.onTileVisible=function(e){};nu.transformTile=function(e){let t=e.computedTransform,n=e.content.gltfPrimitive,i=e.tileset.gaussianSplatPrimitive;i._rootTransform===void 0&&(i._rootTransform=pt.eastNorthUpToFixedFrame(e.tileset.boundingSphere.center));let o=i._rootTransform,r=M.multiplyTransformation(t,i._axisCorrectionMatrix,nC);M.multiplyTransformation(r,e.content.worldTransform,r);let a=M.inverse(o,O_e),s=M.multiplyTransformation(a,r,nC),c=e.content._lastSplatTransform;if(e.content._transformed&&l(c)&&M.equalsEpsilon(s,c,$ot))return;let u=e.content.positions,f=e.content.rotations,d=e.content.scales,p=Math.sqrt(s[0]*s[0]+s[1]*s[1]+s[2]*s[2]),g=Math.sqrt(s[4]*s[4]+s[5]*s[5]+s[6]*s[6]),m=Math.sqrt(s[8]*s[8]+s[9]*s[9]+s[10]*s[10]);pi[0]=s[0]/p,pi[1]=s[1]/p,pi[2]=s[2]/p,pi[3]=s[4]/g,pi[4]=s[5]/g,pi[5]=s[6]/g,pi[6]=s[8]/m,pi[7]=s[9]/m,pi[8]=s[10]/m;let A=pi[0]*pi[3]+pi[1]*pi[4]+pi[2]*pi[5],y=pi[0]*pi[6]+pi[1]*pi[7]+pi[2]*pi[8],x=pi[3]*pi[6]+pi[4]*pi[7]+pi[5]*pi[8],b=Math.abs(p-1)<=PQ&&Math.abs(g-1)<=PQ&&Math.abs(m-1)<=PQ,C=Math.abs(A)<=lG&&Math.abs(y)<=lG&&Math.abs(x)<=lG,E=pi[0]*(pi[4]*pi[8]-pi[5]*pi[7])-pi[3]*(pi[1]*pi[8]-pi[2]*pi[7])+pi[6]*(pi[1]*pi[5]-pi[2]*pi[4]),S=b&&C&&Math.abs(E-1)<=lG;Le.fromRotationMatrix(pi,fF),Le.normalize(fF,fF);let w=ht.getAttributeBySemantic(n,it.POSITION).typedArray,P=ht.getAttributeBySemantic(n,it.ROTATION).typedArray,R=ht.getAttributeBySemantic(n,it.SCALE).typedArray,B=Xot,L=Kot,_=Qot;for(let T=0;T<w.length/3;++T)B.x=w[T*3],B.y=w[T*3+1],B.z=w[T*3+2],L.x=P[T*4],L.y=P[T*4+1],L.z=P[T*4+2],L.w=P[T*4+3],_.x=R[T*3],_.y=R[T*3+1],_.z=R[T*3+2],S?(M.multiplyByPoint(s,B,B),Le.multiply(fF,L,L),Le.normalize(L,L)):(M.fromTranslationQuaternionRotationScale(B,L,_,uF),M.multiplyTransformation(s,uF,uF),M.getTranslation(uF,B),M.getScale(uF,_),Le.multiply(fF,L,L),Le.normalize(L,L)),u[T*3]=B.x,u[T*3+1]=B.y,u[T*3+2]=B.z,f[T*4]=L.x,f[T*4+1]=L.y,f[T*4+2]=L.z,f[T*4+3]=L.w,d[T*3]=_.x,d[T*3+1]=_.y,d[T*3+2]=_.z;e.content._lastSplatTransform=M.clone(s,e.content._lastSplatTransform),e.content._transformed=!0};nu.generateSplatTexture=function(e,t,n){if(!l(n)||n.state!==Ua.BUILDING)return;n.state=Ua.TEXTURE_PENDING;let i=aF.generateFromAttributes({attributes:{positions:new Float32Array(n.positions),scales:new Float32Array(n.scales),rotations:new Float32Array(n.rotations),colors:new Uint8Array(n.colors)},count:n.numSplats});if(!l(i)){n.state=Ua.BUILDING;return}urt(e,t,n,i)};nu.buildGSplatDrawCommand=function(e,t){let n=e._tileset,i=new sF(e),{shaderBuilder:o}=i,r=i.renderStateOptions;r.cull.enabled=!1,r.depthMask=!1,r.depthTest.enabled=!0,r.blending=Jt.PRE_MULTIPLIED_ALPHA_BLEND,i.alphaOptions.pass=Ie.GAUSSIAN_SPLATS,o.addAttribute("vec2","a_screenQuadPosition"),o.addAttribute("float","a_splatIndex"),o.addVarying("vec4","v_splatColor"),o.addVarying("vec2","v_vertPos"),o.addUniform("float","u_splitDirection",he.VERTEX),o.addVarying("float","v_splitDirection"),o.addUniform("highp usampler2D","u_splatAttributeTexture",he.VERTEX),o.addUniform("float","u_sphericalHarmonicsDegree",he.VERTEX),o.addUniform("float","u_splatScale",he.VERTEX),o.addUniform("vec3","u_cameraPositionWC",he.VERTEX),o.addUniform("mat3","u_inverseModelRotation",he.VERTEX);let a=i.uniformMap;o.addUniform("int","u_splatRowMask",he.VERTEX),o.addUniform("int","u_splatRowShift",he.VERTEX);let s=e.gaussianSplatTexture;a.u_splatAttributeTexture=function(){return s},a.u_splatRowMask=function(){return e._splatRowMask},a.u_splatRowShift=function(){return e._splatRowShift},e._sphericalHarmonicsDegree>0&&(o.addDefine("HAS_SPHERICAL_HARMONICS","1",he.VERTEX),o.addUniform("highp usampler2D","u_sphericalHarmonicsTexture",he.VERTEX),a.u_sphericalHarmonicsTexture=function(){return e.sphericalHarmonicsTexture}),a.u_sphericalHarmonicsDegree=function(){return e._sphericalHarmonicsDegree},a.u_cameraPositionWC=function(){return h.clone(t.camera.positionWC)},a.u_inverseModelRotation=function(){return e._shInverseRotation},a.u_splitDirection=function(){return e.splitDirection};let c=l(e._indexes)?e._indexes.length:e._numSplats;i.instanceCount=c,i.count=4,i.primitiveType=Re.TRIANGLE_STRIP,o.addVertexLines(cF),o.addFragmentLines(lF);let u=o.buildShaderProgram(t.context),f=We(Ve.fromCache(i.renderStateOptions),!0);f.cull.face=ht.getCullFace(n.modelMatrix,Re.TRIANGLE_STRIP),f=Ve.fromCache(f);let d={screenQuadPosition:0,splatIndex:2},p=new _n.Attribute;if(p.name="_SPLAT_INDEXES",p.typedArray=e._indexes,p.componentDatatype=Y.UNSIGNED_INT,p.type=Ft.SCALAR,p.normalized=!1,p.count=i.instanceCount,p.constant=0,p.instanceDivisor=1,!l(e._vertexArray)||e._indexes.length>e._vertexArrayLen){let x=new At({attributes:{screenQuadPosition:new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:[-1,-1,1,-1,1,1,-1,1],name:"_SCREEN_QUAD_POS",variableName:"screenQuadPosition"}),splatIndex:{...p,variableName:"splatIndex"}},primitiveType:Re.TRIANGLE_STRIP});e._vertexArray=Fn.fromGeometry({context:t.context,geometry:x,attributeLocations:d,bufferUsage:Oe.DYNAMIC_DRAW,interleave:!1})}else e._vertexArray.getAttribute(1).vertexBuffer.copyFromArrayView(e._indexes);e._vertexArrayLen=e._indexes.length;let m=M.clone(e._rootTransform,e._drawCommandModelMatrix),A=e._vertexArray,y=new tt({boundingVolume:n.boundingSphere,modelMatrix:m,uniformMap:a,renderState:f,vertexArray:A,shaderProgram:u,cull:r.cull.enabled,pass:Ie.GAUSSIAN_SPLATS,count:i.count,owner:e,instanceCount:i.instanceCount,primitiveType:Re.TRIANGLE_STRIP,debugShowBoundingVolume:n.debugShowBoundingVolume,castShadows:!1,receiveShadows:!1});e._drawCommand=y};nu.prototype.update=function(e){let t=this._tileset;if(rrt(this,e.frameNumber),!t.show)return;if(this._drawCommand&&e.commandList.push(this._drawCommand),t._modelMatrixChanged){this._dirty=!0;return}let n=l(this._rootTransform);if(e.passes.pick===!0)return;this.splitDirection!==t.splitDirection&&(this.splitDirection=t.splitDirection);let i=e.camera;if(l(i)){if(this._sorterState===zs.IDLE){let o=t._selectedTiles.length!==0&&ort(this,t._selectedTiles);t._selectedTiles.length===0?(this._selectedTilesStableFrames=0,this._needsSnapshotRebuild=!1,this._snapshotRebuildStallFrames=0):o?this._selectedTilesStableFrames=0:this._selectedTilesStableFrames++,(o||this._dirty)&&(this._needsSnapshotRebuild=!0);let r=this._selectedTilesStableFrames>=Jot,a=!l(this._snapshot)&&!l(this._pendingSnapshot)&&!l(this._drawCommand);this._needsSnapshotRebuild&&t._selectedTiles.length!==0?this._snapshotRebuildStallFrames++:this._snapshotRebuildStallFrames=0;let s=r||a||this._snapshotRebuildStallFrames>=Zot;if(!(this._dirty||this._needsSnapshotRebuild||o||l(this._pendingSnapshot)||l(this._pendingSortPromise)||!l(this._drawCommand))&&M.equals(i.viewMatrix,this._prevViewMatrix))return;if(t._selectedTiles.length!==0&&this._needsSnapshotRebuild&&s){this._splatDataGeneration++,this._activeSort=void 0,this._sorterPromise=void 0,this._sorterState=zs.IDLE,this._pendingSortPromise=void 0,this._pendingSort=void 0,l(this._pendingSnapshot)&&RQ(this._pendingSnapshot);let u=t._selectedTiles;this._rootTransform=pt.eastNorthUpToFixedFrame(t.boundingSphere.center);{let E=u[0],S=M.multiplyTransformation(E.computedTransform,this._axisCorrectionMatrix,O_e);M.multiplyTransformation(S,E.content.worldTransform??M.IDENTITY,S),M.getRotation(M.inverse(S,S),this._shInverseRotation)}for(let E of u)nu.transformTile(E);let f=u.reduce((E,S)=>E+S.content.pointsLength,0),d=(E,S,w,P)=>{let R,B=0,L=0;for(let _ of u){let T=w(_.content),v=l(P)?P:Ft.getNumberOfComponents(T.type),I=l(T.typedArray)?T.typedArray:T;L+=I.length,l(R)||(R=srt(this,E,S,f*v))}if(!l(R))return Y.createTypedArray(S,0);for(let _ of u){let T=_.content,v=w(T),I=l(v.typedArray)?v.typedArray:v;R.set(I,B),B+=I.length}return crt(R,L)},p=()=>{let E=0;for(let R of u)if(R.content.sphericalHarmonicsDegree>0){switch(R.content.sphericalHarmonicsDegree){case 1:E=9;break;case 2:E=24;break;case 3:E=45;break}break}if(E===0)return;let S=f*(E*(2/3));(!l(this._scratchAggregateShBuffer)||this._scratchAggregateShBuffer.length<S)&&(this._scratchAggregateShBuffer=new Uint32Array(S));let w=this._scratchAggregateShBuffer,P=0;for(let R of u){let B=R.content.packedSphericalHarmonicsData;R.content.sphericalHarmonicsDegree>0&&(w.set(B,P),P+=B.length)}return P<w.length?w.subarray(0,P):w},g=d("positions",Y.FLOAT,E=>E.positions,3),m=d("scales",Y.FLOAT,E=>E.scales,3),A=d("rotations",Y.FLOAT,E=>E.rotations,4),y=d("colors",Y.UNSIGNED_BYTE,E=>ht.getAttributeBySemantic(E.gltfPrimitive,it.COLOR)),x=u[0].content.sphericalHarmonicsDegree,b=x>0?u[0].content.sphericalHarmonicsCoefficientCount:0,C=p();this._pendingSnapshot={generation:this._splatDataGeneration,positions:g,rotations:A,scales:m,colors:y,shData:C,sphericalHarmonicsDegree:x,shCoefficientCount:b,numSplats:f,indexes:void 0,gaussianSplatTexture:void 0,sphericalHarmonicsTexture:void 0,lastTextureWidth:0,lastTextureHeight:0,splatRowMask:0,splatRowShift:0,state:Ua.BUILDING},this.selectedTileLength=t._selectedTiles.length,this._selectedTileSet=new Set(t._selectedTiles),this._dirty=!1,this._needsSnapshotRebuild=!1,this._snapshotRebuildStallFrames=0}if(l(this._pendingSnapshot)){let u=this._pendingSnapshot;if(u.state===Ua.BUILDING){nu.generateSplatTexture(this,e,u);return}if(u.state===Ua.TEXTURE_PENDING||u.state===Ua.TEXTURE_READY&&!l(u.gaussianSplatTexture)||!n)return;if(M.clone(i.viewMatrix,this._prevViewMatrix),M.multiply(i.viewMatrix,this._rootTransform,nC),u.state===Ua.TEXTURE_READY&&!l(this._pendingSortPromise)){let f=++this._sortRequestId,d=this._splatDataGeneration;this._pendingSort={requestId:f,dataGeneration:d,expectedCount:u.numSplats,snapshot:u};let p=tC.radixSortIndexes({primitive:{positions:new Float32Array(u.positions),modelView:Float32Array.from(nC),count:u.numSplats},sortType:"Index"});if(!l(p)){this._pendingSortPromise=void 0,this._pendingSort=void 0,u.state=Ua.TEXTURE_READY;return}this._pendingSortPromise=p,u.state=Ua.SORTING;let g=this._pendingSort;frt(this,e,g,p);return}if(!l(this._pendingSortPromise)){u.state===Ua.SORTING&&(u.state=Ua.TEXTURE_READY);return}return}if(this._numSplats===0||!n)return;if(M.clone(i.viewMatrix,this._prevViewMatrix),M.multiply(i.viewMatrix,this._rootTransform,nC),!l(this._sorterPromise)){if(!irt(this,e))return;let u=++this._sortRequestId,f=this._splatDataGeneration,d=this._numSplats;this._activeSort={requestId:u,dataGeneration:f,expectedCount:d};let p=tC.radixSortIndexes({primitive:{positions:new Float32Array(this._positions),modelView:Float32Array.from(nC),count:this._numSplats},sortType:"Index"});if(this._sorterPromise=p,l(p)){w_e(this,e);let g=this._activeSort;this._sorterState=zs.SORTING,P_e(this,g,p);return}}if(!l(this._sorterPromise)){this._sorterState=zs.WAITING;return}this._sorterState=zs.SORTING;return}else if(this._sorterState===zs.WAITING){if(!l(this._sorterPromise)){let o=++this._sortRequestId,r=this._splatDataGeneration,a=this._numSplats;this._activeSort={requestId:o,dataGeneration:r,expectedCount:a};let s=tC.radixSortIndexes({primitive:{positions:new Float32Array(this._positions),modelView:Float32Array.from(nC),count:this._numSplats},sortType:"Index"});if(this._sorterPromise=s,l(s)){w_e(this,e);let c=this._activeSort;this._sorterState=zs.SORTING,P_e(this,c,s);return}}if(!l(this._sorterPromise)){this._sorterState=zs.WAITING;return}this._sorterState=zs.SORTING;return}else{if(this._sorterState===zs.SORTING)return;if(this._sorterState===zs.SORTED)nu.buildGSplatDrawCommand(this,e),this._sorterState=zs.IDLE,this._dirty=!1,this._sorterPromise=void 0,this._activeSort=void 0;else if(this._sorterState===zs.ERROR)throw this._sorterError}this._dirty=!1}};var dF=nu;var MQ=class e{constructor(t,n,i,o){this._tileset=n,this._tile=i,this._resource=o,this._loader=t,l(this._tileset.gaussianSplatPrimitive)||(this._tileset.gaussianSplatPrimitive=new dF({tileset:this._tileset})),this._positions=void 0,this._rotations=void 0,this._scales=void 0,this.gltfPrimitive=void 0,this.worldTransform=void 0,this.featurePropertiesDirty=!1,this._metadata=void 0,this._group=void 0,this._ready=!1,this._transformed=!1,this._sphericalHarmonicsDegree=0,this._sphericalHarmonicsCoefficientCount=0,this._packedSphericalHarmonicsData=void 0,this._lastSplatTransform=void 0}static tilesetRequiresGaussianSplattingExt(t){let n=!1;return t.isGltfExtensionRequired instanceof Function&&(n=t.isGltfExtensionRequired("KHR_gaussian_splatting")&&t.isGltfExtensionRequired("KHR_gaussian_splatting_compression_spz_2"),t.isGltfExtensionRequired("KHR_spz_gaussian_splats_compression")&&Ms("KHR_spz_gaussian_splats_compression",`Support for the original KHR_spz_gaussian_splats_compression extension has been removed in favor of the up to date KHR_gaussian_splatting and KHR_gaussian_splatting_compression_spz_2 extensions
-
- Please retile your tileset with the KHR_gaussian_splatting and KHR_gaussian_splatting_compression_spz_2 extensions.`)),n}get featuresLength(){return 0}get pointsLength(){return this.gltfPrimitive.attributes[0].count}get trianglesLength(){return 0}get geometryByteLength(){return 0}get texturesByteLength(){let t=this._tileset?.gaussianSplatPrimitive;if(!l(t))return 0;let n=t.gaussianSplatTexture,i=t.selectedTileLength;return!l(n)||i===0?0:n.sizeInBytes/i}get batchTableByteLength(){return 0}get innerContents(){}get ready(){return this._ready}get transformed(){return this._transformed}get tileset(){return this._tileset}get tile(){return this._tile}get url(){return this._resource.getUrlComponent(!0)}get batchTable(){}get metadata(){return this._metadata}set metadata(t){this._metadata=t}get group(){return this._group}set group(t){this._group=t}get positions(){return this._positions}get rotations(){return this._rotations}get scales(){return this._scales}get sphericalHarmonicsCoefficientCount(){return this._sphericalHarmonicsCoefficientCount}get sphericalHarmonicsDegree(){return this._sphericalHarmonicsDegree}get packedSphericalHarmonicsData(){return this._packedSphericalHarmonicsData}static async fromGltf(t,n,i,o){let r=i,a=De.createIfNeeded(r),s={releaseGltfJson:!1,upAxis:Li.Y,forwardAxis:Li.Z};l(o.asset)?(s.gltfJson=o,s.baseResource=a,s.gltfResource=a):o instanceof Uint8Array?(s.typedArray=o,s.baseResource=a,s.gltfResource=a):s.gltfResource=De.createIfNeeded(o);let c=new bf(s);try{await c.load()}catch(u){throw c.destroy(),new re(`Failed to load glTF: ${u.message}`)}return new e(c,t,n,i)}update(t,n){let i=this._loader;if(!this._ready){if(n.afterRender.push(()=>!0),!l(i)){this._ready=!0;return}if(this._resourcesLoaded){this.gltfPrimitive=i.components.scene.nodes[0].primitives[0],this.worldTransform=i.components.scene.nodes[0].matrix,this._ready=!0,this._positions=ht.getAttributeBySemantic(this.gltfPrimitive,it.POSITION).typedArray.slice(),this._rotations=ht.getAttributeBySemantic(this.gltfPrimitive,it.ROTATION).typedArray.slice(),this._scales=ht.getAttributeBySemantic(this.gltfPrimitive,it.SCALE).typedArray.slice();let{l:o,n:r}=mrt(this.gltfPrimitive.attributes);this._sphericalHarmonicsDegree=o,this._sphericalHarmonicsCoefficientCount=r,this._packedSphericalHarmonicsData=Art(this);return}this._resourcesLoaded=i.process(n)}}hasProperty(t,n){return!1}getFeature(t){}applyDebugSettings(t,n){}applyStyle(t){}pick(t,n,i){}isDestroyed(){return this.isDestroyed}destroy(){return this.splatPrimitive=void 0,this._tile=void 0,this._tileset=void 0,this._resource=void 0,this._ready=!1,this._group=void 0,this._metadata=void 0,this._resourcesLoaded=!1,this._lastSplatTransform=void 0,l(this._loader)&&(this._loader.destroy(),this._loader=void 0),fe(this)}};function hrt(e){return`${e.startsWith("KHR_gaussian_splatting:")?"KHR_gaussian_splatting:":"_"}SH_DEGREE_`}function mrt(e){switch(e.filter(n=>n.name.includes("SH_DEGREE_")).length){default:case 0:return{l:0,n:0};case 3:return{l:1,n:9};case 8:return{l:2,n:24};case 15:return{l:3,n:45}}}var M_e=new ArrayBuffer(4),prt=new Float32Array(M_e),grt=new Uint32Array(M_e);function OQ(e){prt[0]=e;let t=grt[0],n=t>>31&1,i=t>>23&255,o=t&8388607,r;if(i===255)r=n<<15|31744|(o?512:0);else if(i===0)r=n<<15;else{let a=i-127+15;a>=31?r=n<<15|31744:a<=0?r=n<<15:r=n<<15|a<<10|o>>>13}return r}function _rt(e){let t=hrt(e),n="_COEF_",i=t.length,o=e.indexOf(n,i),r=parseInt(e.slice(i,o),10),a=parseInt(e.slice(o+n.length),10);return{l:r,n:a}}function Art(e){let t=e.sphericalHarmonicsDegree,n=e.sphericalHarmonicsCoefficientCount,i=e.pointsLength*(n*(2/3)),o=new Uint32Array(i),r=e.gltfPrimitive.attributes.filter(u=>u.name.includes("SH_DEGREE_")),a=0,s=[0,9,24];switch(t){case 1:a=9;break;case 2:a=24;break;case 3:a=45;break}r.sort((u,f)=>u.name<f.name?-1:u.name>f.name?1:0);let c=a*(2/3);for(let u=0;u<r.length;u++){let{l:f,n:d}=_rt(r[u].name);for(let p=0;p<e.pointsLength;p++){let g=s[f-1]*2/3,m=p*c+g+d*2,A=p*3;o[m]=OQ(r[u].typedArray[A])|OQ(r[u].typedArray[A+1])<<16,o[m+1]=OQ(r[u].typedArray[A+2])}}return o}var ey=MQ;var B_e={b3dm:function(e,t,n,i,o){return If.fromB3dm(e,t,n,i,o)},pnts:function(e,t,n,i,o){return If.fromPnts(e,t,n,i,o)},i3dm:function(e,t,n,i,o){return If.fromI3dm(e,t,n,i,o)},cmpt:function(e,t,n,i,o){return KO.fromTileType(e,t,n,i,o,B_e)},externalTileset:function(e,t,n,i){return _N.fromJson(e,t,n,i)},geom:function(e,t,n,i,o){return new JO(e,t,n,i,o)},vctr:function(e,t,n,i,o){return new UN(e,t,n,i,o)},subt:function(e,t,n,i,o){return _v.fromSubtreeJson(e,t,n,void 0,i,o)},subtreeJson:function(e,t,n,i){return _v.fromSubtreeJson(e,t,n,i)},glb:function(e,t,n,i,o){if(i.byteLength<12)throw new re("Invalid glb content");let s=new DataView(i,o).getUint32(8,!0),c=new Uint8Array(i,o,s);return ey.tilesetRequiresGaussianSplattingExt(e)?ey.fromGltf(e,t,n,c):e.hasExtension("3DTILES_content_gltf_vector")||e.isGltfExtensionUsed("CESIUM_mesh_vector")?ZA.fromGltf(e,t,n,c):If.fromGltf(e,t,n,c)},gltf:function(e,t,n,i){return ey.tilesetRequiresGaussianSplattingExt(e)?ey.fromGltf(e,t,n,i):e.hasExtension("3DTILES_content_gltf_vector")||e.isGltfExtensionUsed("CESIUM_mesh_vector")?ZA.fromGltf(e,t,n,i):If.fromGltf(e,t,n,i)},geoJson:function(e,t,n,i){return If.fromGeoJson(e,t,n,i)}},iC=B_e;var L_e={UNLOADED:0,LOADING:1,PROCESSING:2,READY:3,EXPIRED:4,FAILED:5};Object.freeze(L_e);var er=L_e;var jd={BATCHED_3D_MODEL:"b3dm",INSTANCED_3D_MODEL:"i3dm",COMPOSITE:"cmpt",POINT_CLOUD:"pnts",VECTOR:"vctr",GEOMETRY:"geom",GLTF:"gltf",GLTF_BINARY:"glb",IMPLICIT_SUBTREE:"subt",IMPLICIT_SUBTREE_JSON:"subtreeJson",EXTERNAL_TILESET:"externalTileset",MULTIPLE_CONTENT:"multipleContent",GEOJSON:"geoJson",VOXEL_BINARY:"voxl",VOXEL_JSON:"voxelJson"};jd.isBinaryFormat=function(e){switch(e){case jd.BATCHED_3D_MODEL:case jd.INSTANCED_3D_MODEL:case jd.COMPOSITE:case jd.POINT_CLOUD:case jd.VECTOR:case jd.GEOMETRY:case jd.IMPLICIT_SUBTREE:case jd.VOXEL_BINARY:case jd.GLTF_BINARY:return!0;default:return!1}};Object.freeze(jd);var As=jd;var N_e={NOT_COMPUTED:-1,USE_OPTIMIZATION:1,SKIP_OPTIMIZATION:0};Object.freeze(N_e);var Gd=N_e;var ys={RENDER:0,PICK:1,SHADOW:2,PRELOAD:3,PRELOAD_FLIGHT:4,REQUEST_RENDER_MODE_DEFER_CHECK:5,MOST_DETAILED_PRELOAD:6,MOST_DETAILED_PICK:7,NUMBER_OF_PASSES:8},kg=new Array(ys.NUMBER_OF_PASSES);kg[ys.RENDER]=Object.freeze({pass:ys.RENDER,isRender:!0,requestTiles:!0,ignoreCommands:!1});kg[ys.PICK]=Object.freeze({pass:ys.PICK,isRender:!1,requestTiles:!1,ignoreCommands:!1});kg[ys.SHADOW]=Object.freeze({pass:ys.SHADOW,isRender:!1,requestTiles:!0,ignoreCommands:!1});kg[ys.PRELOAD]=Object.freeze({pass:ys.PRELOAD,isRender:!1,requestTiles:!0,ignoreCommands:!0});kg[ys.PRELOAD_FLIGHT]=Object.freeze({pass:ys.PRELOAD_FLIGHT,isRender:!1,requestTiles:!0,ignoreCommands:!0});kg[ys.REQUEST_RENDER_MODE_DEFER_CHECK]=Object.freeze({pass:ys.REQUEST_RENDER_MODE_DEFER_CHECK,isRender:!1,requestTiles:!0,ignoreCommands:!0});kg[ys.MOST_DETAILED_PRELOAD]=Object.freeze({pass:ys.MOST_DETAILED_PRELOAD,isRender:!1,requestTiles:!0,ignoreCommands:!0});kg[ys.MOST_DETAILED_PICK]=Object.freeze({pass:ys.MOST_DETAILED_PICK,isRender:!1,requestTiles:!1,ignoreCommands:!1});ys.getPassOptions=function(e){return kg[e]};Object.freeze(ys);var tr=ys;var BQ=class{constructor(t,n){this._tileset=t,this._tile=n,this.featurePropertiesDirty=!1}get featuresLength(){return 0}get pointsLength(){return 0}get trianglesLength(){return 0}get geometryByteLength(){return 0}get texturesByteLength(){return 0}get batchTableByteLength(){return 0}get innerContents(){}get ready(){return!0}get tileset(){return this._tileset}get tile(){return this._tile}get url(){}get metadata(){}set metadata(t){}get batchTable(){}get group(){}set group(t){}hasProperty(t,n){return!1}getFeature(t){}applyDebugSettings(t,n){}applyStyle(t){}update(t,n){}pick(t,n,i){}isDestroyed(){return!1}destroy(){return fe(this)}},Mp=BQ;function zg(e){e=e??G.EMPTY_OBJECT;let t=e.content,n=e.class;this._class=n,this._properties=t.properties,this._extensions=t.extensions,this._extras=t.extras}Object.defineProperties(zg.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});zg.prototype.hasProperty=function(e){return Un.hasProperty(e,this._properties,this._class)};zg.prototype.hasPropertyBySemantic=function(e){return Un.hasPropertyBySemantic(e,this._properties,this._class)};zg.prototype.getPropertyIds=function(e){return Un.getPropertyIds(this._properties,this._class,e)};zg.prototype.getProperty=function(e){return Un.getProperty(e,this._properties,this._class)};zg.prototype.setProperty=function(e,t){return Un.setProperty(e,t,this._properties,this._class)};zg.prototype.getPropertyBySemantic=function(e){return Un.getPropertyBySemantic(e,this._properties,this._class)};zg.prototype.setPropertyBySemantic=function(e,t){return Un.setPropertyBySemantic(e,t,this._properties,this._class)};var hF=zg;function LQ(e,t){let n=Ci(t,"3DTILES_metadata")?t.extensions["3DTILES_metadata"]:t.metadata;if(!l(n))return;if(!l(e.schema)){LQ._oneTimeWarning("findContentMetadata-missing-root-schema","Could not find a metadata schema for content metadata. For tilesets that contain external tilesets, make sure the schema is added to the root tileset.json.");return}let i=e.schema.classes??G.EMPTY_OBJECT;if(l(n.class)){let o=i[n.class];return new hF({content:n,class:o})}}LQ._oneTimeWarning=_t;var oC=LQ;function yrt(e,t){let n=e.metadataExtension;if(!l(n))return;let i=n.groups,o=Ci(t,"3DTILES_metadata")?t.extensions["3DTILES_metadata"].group:t.group;if(typeof o=="number")return i[o];let r=n.groupIds.findIndex(function(a){return a===o});return r>=0?i[r]:void 0}var rC=yrt;function Ug(e){e=e??G.EMPTY_OBJECT;let t=e.tile,n=e.class;this._class=n,this._properties=t.properties,this._extensions=t.extensions,this._extras=t.extras}Object.defineProperties(Ug.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});Ug.prototype.hasProperty=function(e){return Un.hasProperty(e,this._properties,this._class)};Ug.prototype.hasPropertyBySemantic=function(e){return Un.hasPropertyBySemantic(e,this._properties,this._class)};Ug.prototype.getPropertyIds=function(e){return Un.getPropertyIds(this._properties,this._class,e)};Ug.prototype.getProperty=function(e){return Un.getProperty(e,this._properties,this._class)};Ug.prototype.setProperty=function(e,t){return Un.setProperty(e,t,this._properties,this._class)};Ug.prototype.getPropertyBySemantic=function(e){return Un.getPropertyBySemantic(e,this._properties,this._class)};Ug.prototype.setPropertyBySemantic=function(e,t){return Un.setPropertyBySemantic(e,t,this._properties,this._class)};var mF=Ug;function NQ(e,t){let n=Ci(t,"3DTILES_metadata")?t.extensions["3DTILES_metadata"]:t.metadata;if(!l(n))return;if(!l(e.schema)){NQ._oneTimeWarning("findTileMetadata-missing-root-schema","Could not find a metadata schema for tile metadata. For tilesets that contain external tilesets, make sure the schema is added to the root tileset.json.");return}let i=e.schema.classes??G.EMPTY_OBJECT;if(l(n.class)){let o=i[n.class];return new mF({tile:n,class:o})}}NQ._oneTimeWarning=_t;var pF=NQ;function xrt(e){let t=new Uint8Array(e),n=Wh(t);if(n==="glTF"&&(n="glb"),As.isBinaryFormat(n))return{contentType:n,binaryPayload:t};let i=brt(t);if(l(i.root))return{contentType:As.EXTERNAL_TILESET,jsonPayload:i};if(l(i.asset))return{contentType:As.GLTF,jsonPayload:i};if(l(i.tileAvailability))return{contentType:As.IMPLICIT_SUBTREE_JSON,jsonPayload:i};if(l(i.type))return{contentType:As.GEOJSON,jsonPayload:i};if(l(i.voxelTable))return{contentType:As.VOXEL_JSON,jsonPayload:i};throw new re("Invalid tile content.")}function brt(e){let t;try{t=Cr(e)}catch{throw new re("Invalid tile content.")}return t}var Vg=xrt;var FQ=class{constructor(t,n,i,o){this._tileset=t,this._tile=n,this._tilesetResource=i,this._contents=[],this._contentsCreated=!1;let r=l(o.contents)?o.contents:o.content;this._innerContentHeaders=r,this._requestsInFlight=0,this._cancelCount=0,this._externalTilesetCount=0;let a=this._innerContentHeaders.length;this._arrayFetchPromises=new Array(a),this._requests=new Array(a),this._ready=!1,this._innerContentResources=new Array(a),this._serverKeys=new Array(a);for(let s=0;s<a;s++){let c=i.getDerivedResource({url:r[s].uri}),u=Xc.getServerKey(c.getUrlComponent());this._innerContentResources[s]=c,this._serverKeys[s]=u}}get featurePropertiesDirty(){let t=this._contents,n=t.length;for(let i=0;i<n;++i)if(t[i].featurePropertiesDirty)return!0;return!1}set featurePropertiesDirty(t){let n=this._contents,i=n.length;for(let o=0;o<i;++o)n[o].featurePropertiesDirty=t}get featuresLength(){return 0}get pointsLength(){return 0}get trianglesLength(){return 0}get geometryByteLength(){return 0}get texturesByteLength(){return 0}get batchTableByteLength(){return 0}get innerContents(){return this._contents}get ready(){return this._contentsCreated?this._ready:!1}get tileset(){return this._tileset}get tile(){return this._tile}get url(){}get metadata(){}set metadata(t){}get batchTable(){}get group(){}set group(t){}get innerContentUrls(){return this._innerContentHeaders.map(function(t){return t.uri})}requestInnerContents(){if(!Crt(this._serverKeys)){this.tileset.statistics.numberOfAttemptedRequests+=this._serverKeys.length;return}let t=this._innerContentHeaders;kQ(this,t.length);let n=this._cancelCount;for(let i=0;i<t.length;i++)this._arrayFetchPromises[i]=Trt(this,i,n,this._tile._contentState);return Ert(this)}cancelRequests(){for(let t=0;t<this._requests.length;t++){let n=this._requests[t];l(n)&&n.cancel()}}hasProperty(t,n){return!1}getFeature(t){}applyDebugSettings(t,n){let i=this._contents,o=i.length;for(let r=0;r<o;++r)i[r].applyDebugSettings(t,n)}applyStyle(t){let n=this._contents,i=n.length;for(let o=0;o<i;++o)n[o].applyStyle(t)}update(t,n){let i=this._contents,o=i.length,r=!0;for(let a=0;a<o;++a)i[a].update(t,n),r=r&&i[a].ready;!this._ready&&r&&(this._ready=!0)}pick(t,n,i){if(!this._ready)return;let o,r=Number.POSITIVE_INFINITY,a=this._contents,s=a.length;for(let c=0;c<s;++c){let u=a[c].pick(t,n,i);if(!l(u))continue;let f=h.distance(t.origin,u);f<r&&(o=u,r=f)}if(l(o))return i}isDestroyed(){return!1}destroy(){let t=this._contents,n=t.length;for(let i=0;i<n;++i)t[i].destroy();return fe(this)}};function kQ(e,t){e._requestsInFlight+=t,e.tileset.statistics.numberOfPendingRequests+=t}function F_e(e,t){e._cancelCount++,e._tile._contentState=t;let n=e.tileset.statistics;n.numberOfPendingRequests-=e._requestsInFlight,n.numberOfAttemptedRequests+=e._requestsInFlight,e._requestsInFlight=0;let i=e._innerContentHeaders.length;e._arrayFetchPromises=new Array(i)}function Crt(e){let t={};for(let n=0;n<e.length;n++){let i=e[n];l(t[i])?t[i]++:t[i]=1}for(let n in t)if(t.hasOwnProperty(n)&&!Xc.serverHasOpenSlots(n,t[n]))return!1;return Xc.heapHasOpenSlots(e.length)}function Trt(e,t,n,i){let o=e._innerContentResources[t].clone(),r=e.tile,a=function(){return r._priority},s=e._serverKeys[t],c=new _r({throttle:!0,throttleByServer:!0,type:qa.TILES3D,priorityFunction:a,serverKey:s});o.request=c,e._requests[t]=c;let u=o.fetchArrayBuffer();if(l(u))return u.then(function(f){if(!(n<e._cancelCount)){if(o.request.cancelled||o.request.state===di.CANCELLED){F_e(e,i);return}return kQ(e,-1),f}}).catch(function(f){if(!(n<e._cancelCount)){if(o.request.cancelled||o.request.state===di.CANCELLED){F_e(e,i);return}kQ(e,-1),k_e(e,t,f)}})}async function Ert(e){let t=e._cancelCount,n=await Promise.all(e._arrayFetchPromises);if(t<e._cancelCount)return;let i=n.map((r,a)=>vrt(e,r,a)),o=await Promise.all(i);if(e._contentsCreated=!0,e._contents=o.filter(l),e._externalTilesetCount===e._contents.length){let r=e._tile;r.hasRenderableContent=!1}return o}async function vrt(e,t,n){if(l(t))try{let i=Vg(t),o=e._tileset,r=e._innerContentResources[n],a=e._tile;i.contentType===As.EXTERNAL_TILESET&&(e._externalTilesetCount++,a.hasTilesetContent=!0),e._disableSkipLevelOfDetail=e._disableSkipLevelOfDetail||i.contentType===As.GEOMETRY||i.contentType===As.VECTOR;let s,c=iC[i.contentType];l(i.binaryPayload)?s=await Promise.resolve(c(o,a,r,i.binaryPayload.buffer,0)):s=await Promise.resolve(c(o,a,r,i.jsonPayload));let u=e._innerContentHeaders[n];if(a.hasImplicitContentMetadata){let d=a.implicitSubtree,p=a.implicitCoordinates;s.metadata=d.getContentMetadataView(p,n)}else a.hasImplicitContent||(s.metadata=oC(o,u));let f=rC(o,u);return l(f)&&(s.group=new ib({metadata:f})),s}catch(i){k_e(e,n,i)}}function k_e(e,t,n){let i=e._tileset,o=e._innerContentResources[t].url,r=l(n.message)?n.message:n.toString();i.tileFailed.numberOfListeners>0?i.tileFailed.raiseEvent({url:o,message:r}):(console.log(`A content failed to load: ${o}`),console.log(`Error: ${r}`))}var gF=FQ;var z_e=Math.cos,U_e=Math.sin,Srt=Math.sqrt,zQ={};zQ.computePosition=function(e,t,n,i,o,r,a){let s=t.radiiSquared,c=e.nwCorner,u=e.boundingRectangle,f=c.latitude-e.granYCos*i+o*e.granXSin,d=z_e(f),p=U_e(f),g=s.z*p,m=c.longitude+i*e.granYSin+o*e.granXCos,A=d*z_e(m),y=d*U_e(m),x=s.x*A,b=s.y*y,C=Srt(x*A+b*y+g*p);if(r.x=x/C,r.y=b/C,r.z=g/C,n){let E=e.stNwCorner;l(E)?(f=E.latitude-e.stGranYCos*i+o*e.stGranXSin,m=E.longitude+i*e.stGranYSin+o*e.stGranXCos,a.x=(m-e.stWest)*e.lonScalar,a.y=(f-e.stSouth)*e.latScalar):(a.x=(m-u.west)*e.lonScalar,a.y=(f-u.south)*e.latScalar)}};var wrt=new Gi,Hd=new h,Irt=new de,uG=new h,_F=new ji;function V_e(e,t,n,i,o,r,a){let s=Math.cos(t),c=i*s,u=n*s,f=Math.sin(t),d=i*f,p=n*f;_F._ellipsoid=te.default,Hd=_F.project(e,Hd),Hd=h.subtract(Hd,uG,Hd);let g=Gi.fromRotation(t,wrt);Hd=Gi.multiplyByVector(g,Hd,Hd),Hd=h.add(Hd,uG,Hd),e=_F.unproject(Hd,e),r-=1,a-=1;let m=e.latitude,A=m+r*p,y=m-c*a,x=m-c*a+r*p,b=Math.max(m,A,y,x),C=Math.min(m,A,y,x),E=e.longitude,S=E+r*u,w=E+a*d,P=E+a*d+r*u,R=Math.max(E,S,w,P),B=Math.min(E,S,w,P);return{north:b,south:C,east:R,west:B,granYCos:c,granYSin:d,granXCos:u,granXSin:p,nwCorner:e}}zQ.computeOptions=function(e,t,n,i,o,r,a){let s=e.east,c=e.west,u=e.north,f=e.south,d=!1,p=!1;u===D.PI_OVER_TWO&&(d=!0),f===-D.PI_OVER_TWO&&(p=!0);let g,m=u-f;c>s?g=D.TWO_PI-c+s:g=s-c;let A=Math.ceil(g/t)+1,y=Math.ceil(m/t)+1,x=g/(A-1),b=m/(y-1),C=oe.northwest(e,r),E=oe.center(e,Irt);(n!==0||i!==0)&&(E.longitude<C.longitude&&(E.longitude+=D.TWO_PI),_F._ellipsoid=te.default,uG=_F.project(E,uG));let S=b,w=x,P=0,R=0,B=oe.clone(e,o),L={granYCos:S,granYSin:P,granXCos:w,granXSin:R,nwCorner:C,boundingRectangle:B,width:A,height:y,northCap:d,southCap:p};if(n!==0){let _=V_e(C,n,x,b,E,A,y);u=_.north,f=_.south,s=_.east,c=_.west,L.granYCos=_.granYCos,L.granYSin=_.granYSin,L.granXCos=_.granXCos,L.granXSin=_.granXSin,B.north=u,B.south=f,B.east=s,B.west=c}if(i!==0){n=n-i;let _=oe.northwest(B,a),T=V_e(_,n,x,b,E,A,y);L.stGranYCos=T.granYCos,L.stGranXCos=T.granXCos,L.stGranYSin=T.granYSin,L.stGranXSin=T.granXSin,L.stNwCorner=_,L.stWest=T.west,L.stSouth=T.south}return L};var xs=zQ;var Drt=new ce,Prt=new ce,Rrt=new h,Ort=new oe;function j_e(e,t){let n=e._ellipsoid,i=t.height,o=t.width,r=t.northCap,a=t.southCap,s=i,c=2,u=0,f=4;r&&(c-=1,s-=1,u+=1,f-=2),a&&(c-=1,s-=1,u+=1,f-=2),u+=c*o+2*s-f;let d=new Float64Array(u*3),p=0,g=0,m,A=Rrt;if(r)xs.computePosition(t,n,!1,g,0,A),d[p++]=A.x,d[p++]=A.y,d[p++]=A.z;else for(m=0;m<o;m++)xs.computePosition(t,n,!1,g,m,A),d[p++]=A.x,d[p++]=A.y,d[p++]=A.z;for(m=o-1,g=1;g<i;g++)xs.computePosition(t,n,!1,g,m,A),d[p++]=A.x,d[p++]=A.y,d[p++]=A.z;if(g=i-1,!a)for(m=o-2;m>=0;m--)xs.computePosition(t,n,!1,g,m,A),d[p++]=A.x,d[p++]=A.y,d[p++]=A.z;for(m=0,g=i-2;g>0;g--)xs.computePosition(t,n,!1,g,m,A),d[p++]=A.x,d[p++]=A.y,d[p++]=A.z;let y=d.length/3*2,x=Ue.createTypedArray(d.length/3,y),b=0;for(let E=0;E<d.length/3-1;E++)x[b++]=E,x[b++]=E+1;x[b++]=d.length/3-1,x[b++]=0;let C=new At({attributes:new pn,primitiveType:Re.LINES});return C.attributes.position=new Me({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:d}),C.indices=x,C}function Mrt(e,t){let n=e._surfaceHeight,i=e._extrudedHeight,o=e._ellipsoid,r=j_e(e,t),a=t.height,s=t.width,c=ni.scaleToGeodeticHeight(r.attributes.position.values,n,o,!1),u=c.length,f=new Float64Array(u*2);f.set(c);let d=ni.scaleToGeodeticHeight(r.attributes.position.values,i,o);f.set(d,u),r.attributes.position.values=f;let p=t.northCap,g=t.southCap,m=4;p&&(m-=1),g&&(m-=1);let A=(f.length/3+m)*2,y=Ue.createTypedArray(f.length/3,A);u=f.length/6;let x=0;for(let C=0;C<u-1;C++)y[x++]=C,y[x++]=C+1,y[x++]=C+u,y[x++]=C+u+1;y[x++]=u-1,y[x++]=0,y[x++]=u+u-1,y[x++]=u,y[x++]=0,y[x++]=u;let b;if(p)b=a-1;else{let C=s-1;y[x++]=C,y[x++]=C+u,b=s+a-2}if(y[x++]=b,y[x++]=b+u,!g){let C=s+b-1;y[x++]=C,y[x]=C+u}return r.indices=y,r}function pS(e){e=e??G.EMPTY_OBJECT;let t=e.rectangle,n=e.granularity??D.RADIANS_PER_DEGREE,i=e.ellipsoid??te.default,o=e.rotation??0,r=e.height??0,a=e.extrudedHeight??r;this._rectangle=oe.clone(t),this._granularity=n,this._ellipsoid=i,this._surfaceHeight=Math.max(r,a),this._rotation=o,this._extrudedHeight=Math.min(r,a),this._offsetAttribute=e.offsetAttribute,this._workerName="createRectangleOutlineGeometry"}pS.packedLength=oe.packedLength+te.packedLength+5;pS.pack=function(e,t,n){return n=n??0,oe.pack(e._rectangle,t,n),n+=oe.packedLength,te.pack(e._ellipsoid,t,n),n+=te.packedLength,t[n++]=e._granularity,t[n++]=e._surfaceHeight,t[n++]=e._rotation,t[n++]=e._extrudedHeight,t[n]=e._offsetAttribute??-1,t};var G_e=new oe,H_e=te.clone(te.UNIT_SPHERE),mS={rectangle:G_e,ellipsoid:H_e,granularity:void 0,height:void 0,rotation:void 0,extrudedHeight:void 0,offsetAttribute:void 0};pS.unpack=function(e,t,n){t=t??0;let i=oe.unpack(e,t,G_e);t+=oe.packedLength;let o=te.unpack(e,t,H_e);t+=te.packedLength;let r=e[t++],a=e[t++],s=e[t++],c=e[t++],u=e[t];return l(n)?(n._rectangle=oe.clone(i,n._rectangle),n._ellipsoid=te.clone(o,n._ellipsoid),n._surfaceHeight=a,n._rotation=s,n._extrudedHeight=c,n._offsetAttribute=u===-1?void 0:u,n):(mS.granularity=r,mS.height=a,mS.rotation=s,mS.extrudedHeight=c,mS.offsetAttribute=u===-1?void 0:u,new pS(mS))};var Brt=new de;pS.createGeometry=function(e){let t=e._rectangle,n=e._ellipsoid,i=xs.computeOptions(t,e._granularity,e._rotation,0,Ort,Brt),o,r;if(D.equalsEpsilon(t.north,t.south,D.EPSILON10)||D.equalsEpsilon(t.east,t.west,D.EPSILON10))return;let a=e._surfaceHeight,s=e._extrudedHeight,c=!D.equalsEpsilon(a,s,0,D.EPSILON2),u;if(c){if(o=Mrt(e,i),l(e._offsetAttribute)){let p=o.attributes.position.values.length/3,g=new Uint8Array(p);e._offsetAttribute===ln.TOP?g=g.fill(1,0,p/2):(u=e._offsetAttribute===ln.NONE?0:1,g=g.fill(u)),o.attributes.applyOffset=new Me({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:g})}let f=ce.fromRectangle3D(t,n,a,Prt),d=ce.fromRectangle3D(t,n,s,Drt);r=ce.union(f,d)}else{if(o=j_e(e,i),o.attributes.position.values=ni.scaleToGeodeticHeight(o.attributes.position.values,a,n,!1),l(e._offsetAttribute)){let f=o.attributes.position.values.length;u=e._offsetAttribute===ln.NONE?0:1;let d=new Uint8Array(f/3).fill(u);o.attributes.applyOffset=new Me({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:d})}r=ce.fromRectangle3D(t,n,a)}return new At({attributes:o.attributes,indices:o.indices,primitiveType:Re.LINES,boundingSphere:r,offsetAttribute:e._offsetAttribute})};var aC=pS;function _S(e){this.rectangle=oe.clone(e.rectangle),this.minimumHeight=e.minimumHeight??0,this.maximumHeight=e.maximumHeight??0,this.southwestCornerCartesian=new h,this.northeastCornerCartesian=new h,this.westNormal=new h,this.southNormal=new h,this.eastNormal=new h,this.northNormal=new h;let t=e.ellipsoid??te.WGS84;zrt(this,e.rectangle,t),this._orientedBoundingBox=void 0,this._boundingSphere=void 0,(e.computeBoundingVolumes??!0)&&this.computeBoundingVolumes(t)}Object.defineProperties(_S.prototype,{boundingVolume:{get:function(){return this._orientedBoundingBox}},boundingSphere:{get:function(){return this._boundingSphere}}});_S.prototype.computeBoundingVolumes=function(e){this._orientedBoundingBox=Qt.fromRectangle(this.rectangle,this.minimumHeight,this.maximumHeight,e),this._boundingSphere=ce.fromOrientedBoundingBox(this._orientedBoundingBox)};var W_e=new h,fG=new h,q_e=new h,Lrt=new h,Nrt=new h,Frt=new h,krt=new h,Wd=new de,Y_e=new en(h.UNIT_X,0),gS=new gn;function zrt(e,t,n){n.cartographicToCartesian(oe.southwest(t),e.southwestCornerCartesian),n.cartographicToCartesian(oe.northeast(t),e.northeastCornerCartesian),Wd.longitude=t.west,Wd.latitude=(t.south+t.north)*.5,Wd.height=0;let i=n.cartographicToCartesian(Wd,Frt),o=h.cross(i,h.UNIT_Z,Lrt);h.normalize(o,e.westNormal),Wd.longitude=t.east;let r=n.cartographicToCartesian(Wd,krt),a=h.cross(h.UNIT_Z,r,W_e);h.normalize(a,e.eastNormal);let s=h.subtract(i,r,W_e);h.magnitude(s)===0&&(s=h.clone(o,s));let c=h.normalize(s,Nrt),u=t.south,f;if(u>0){Wd.longitude=(t.west+t.east)*.5,Wd.latitude=u;let A=n.cartographicToCartesian(Wd,gS.origin);h.clone(c,gS.direction);let y=en.fromPointNormal(e.southwestCornerCartesian,e.westNormal,Y_e);si.rayPlane(gS,y,e.southwestCornerCartesian),f=n.geodeticSurfaceNormal(A,fG)}else f=n.geodeticSurfaceNormalCartographic(oe.southeast(t),fG);let d=h.cross(f,s,q_e);h.normalize(d,e.southNormal);let p=t.north,g;if(p<0){Wd.longitude=(t.west+t.east)*.5,Wd.latitude=p;let A=n.cartographicToCartesian(Wd,gS.origin);h.negate(c,gS.direction);let y=en.fromPointNormal(e.northeastCornerCartesian,e.eastNormal,Y_e);si.rayPlane(gS,y,e.northeastCornerCartesian),g=n.geodeticSurfaceNormal(A,fG)}else g=n.geodeticSurfaceNormalCartographic(oe.northwest(t),fG);let m=h.cross(s,g,q_e);h.normalize(m,e.northNormal)}var Urt=new h,Vrt=new h,jrt=new h(0,-1,0),Grt=new h(0,0,-1),X_e=new h;function Hrt(e,t){let n=t.camera,i=n.positionWC,o=n.positionCartographic,r=0;if(!oe.contains(e.rectangle,o)){let u=e.southwestCornerCartesian,f=e.northeastCornerCartesian,d=e.westNormal,p=e.southNormal,g=e.eastNormal,m=e.northNormal;t.mode!==ie.SCENE3D&&(u=t.mapProjection.project(oe.southwest(e.rectangle),Urt),u.z=u.y,u.y=u.x,u.x=0,f=t.mapProjection.project(oe.northeast(e.rectangle),Vrt),f.z=f.y,f.y=f.x,f.x=0,d=jrt,g=h.UNIT_Y,p=Grt,m=h.UNIT_Z);let A=h.subtract(i,u,X_e),y=h.dot(A,d),x=h.dot(A,p),b=h.subtract(i,f,X_e),C=h.dot(b,g),E=h.dot(b,m);y>0?r+=y*y:C>0&&(r+=C*C),x>0?r+=x*x:E>0&&(r+=E*E)}let a,s,c;if(t.mode===ie.SCENE3D?(a=o.height,s=e.minimumHeight,c=e.maximumHeight):(a=i.x,s=0,c=0),a>c){let u=a-c;r+=u*u}else if(a<s){let u=s-a;r+=u*u}return Math.sqrt(r)}_S.prototype.distanceToCamera=function(e){let t=Hrt(this,e);if(e.mode===ie.SCENE3D&&l(this._orientedBoundingBox)){let n=Math.sqrt(this._orientedBoundingBox.distanceSquaredTo(e.camera.positionWC));return Math.max(t,n)}return t};_S.prototype.intersectPlane=function(e){return this._orientedBoundingBox.intersectPlane(e)};_S.prototype.createDebugVolume=function(e){let t=M.clone(M.IDENTITY),n=new aC({rectangle:this.rectangle,height:this.minimumHeight,extrudedHeight:this.maximumHeight}),i=new Ot({geometry:n,id:"outline",modelMatrix:t,attributes:{color:Yt.fromColor(e)}});return new Dn({geometryInstances:i,appearance:new dn({translucent:!1,flat:!0}),asynchronous:!1})};var Rf=_S;var AF={},Wrt=new h,K_e=new h,Q_e=new h,$_e=new h,J_e=new Qt;AF.validOutline=function(e){let n=Qt.fromPoints(e,J_e).halfAxes,i=$.getColumn(n,0,K_e),o=$.getColumn(n,1,Q_e),r=$.getColumn(n,2,$_e),a=h.magnitude(i),s=h.magnitude(o),c=h.magnitude(r);return!(a===0&&(s===0||c===0)||s===0&&c===0)};AF.computeProjectTo2DArguments=function(e,t,n,i){let o=Qt.fromPoints(e,J_e),r=o.halfAxes,a=$.getColumn(r,0,K_e),s=$.getColumn(r,1,Q_e),c=$.getColumn(r,2,$_e),u=h.magnitude(a),f=h.magnitude(s),d=h.magnitude(c),p=Math.min(u,f,d);if(u===0&&(f===0||d===0)||f===0&&d===0)return!1;let g,m;return(p===f||p===d)&&(g=a),p===u?g=s:p===d&&(m=s),(p===u||p===f)&&(m=c),h.normalize(g,n),h.normalize(m,i),h.clone(o.center,t),!0};function Z_e(e,t,n,i,o){let r=h.subtract(e,t,Wrt),a=h.dot(n,r),s=h.dot(i,r);return z.fromElements(a,s,o)}AF.createProjectPointsTo2DFunction=function(e,t,n){return function(i){let o=new Array(i.length);for(let r=0;r<i.length;r++)o[r]=Z_e(i[r],e,t,n);return o}};AF.createProjectPointTo2DFunction=function(e,t,n){return function(i,o){return Z_e(i,e,t,n,o)}};var jg=AF;function qrt(e){let t=e.length,n=new Float64Array(t*3),i=Ue.createTypedArray(t,t*2),o=0,r=0;for(let s=0;s<t;s++){let c=e[s];n[o++]=c.x,n[o++]=c.y,n[o++]=c.z,i[r++]=s,i[r++]=(s+1)%t}let a=new pn({position:new Me({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:n})});return new At({attributes:a,indices:i,primitiveType:Re.LINES})}function sC(e){e=e??G.EMPTY_OBJECT;let t=e.polygonHierarchy;this._polygonHierarchy=t,this._workerName="createCoplanarPolygonOutlineGeometry",this.packedLength=Yn.computeHierarchyPackedLength(t,h)+1}sC.fromPositions=function(e){e=e??G.EMPTY_OBJECT;let t={polygonHierarchy:{positions:e.positions}};return new sC(t)};sC.pack=function(e,t,n){return n=n??0,n=Yn.packPolygonHierarchy(e._polygonHierarchy,t,n,h),t[n]=e.packedLength,t};var Yrt={polygonHierarchy:{}};sC.unpack=function(e,t,n){t=t??0;let i=Yn.unpackPolygonHierarchy(e,t,h);t=i.startingIndex,delete i.startingIndex;let o=e[t];return l(n)||(n=new sC(Yrt)),n._polygonHierarchy=i,n.packedLength=o,n};sC.createGeometry=function(e){let t=e._polygonHierarchy,n=t.positions;if(n=Fo(n,h.equalsEpsilon,!0),n.length<3||!jg.validOutline(n))return;let o=Yn.polygonOutlinesFromHierarchy(t,!1);if(o.length===0)return;let r=[];for(let c=0;c<o.length;c++){let u=new Ot({geometry:qrt(o[c])});r.push(u)}let a=kn.combineInstances(r)[0],s=ce.fromPoints(t.positions);return new At({attributes:a.attributes,indices:a.indices,primitiveType:a.primitiveType,boundingSphere:s})};var qd=sC;var dG=new de;function yF(e){let t=rg.fromToken(e.token),n=e.minimumHeight??0,i=e.maximumHeight??0,o=e.ellipsoid??te.WGS84;this.s2Cell=t,this.minimumHeight=n,this.maximumHeight=i,this.ellipsoid=o;let r=nat(t,n,i,o);this._boundingPlanes=r;let a=aat(r);this._vertices=a,this._edgeNormals=new Array(6),this._edgeNormals[0]=YQ(r[0],a.slice(0,4));let s;for(s=0;s<4;s++)this._edgeNormals[0][s]=h.negate(this._edgeNormals[0][s],this._edgeNormals[0][s]);for(this._edgeNormals[1]=YQ(r[1],a.slice(4,8)),s=0;s<4;s++)this._edgeNormals[2+s]=YQ(r[2+s],[a[s%4],a[(s+1)%4],a[4+(s+1)%4],a[4+s]]);for(this._planeVertices=[this._vertices.slice(0,4),this._vertices.slice(4,8)],s=0;s<4;s++)this._planeVertices.push([this._vertices[s%4],this._vertices[(s+1)%4],this._vertices[4+(s+1)%4],this._vertices[4+s]]);let c=t.getCenter();dG=o.cartesianToCartographic(c,dG),dG.height=(i+n)/2,this.center=o.cartographicToCartesian(dG,c),this._boundingSphere=ce.fromPoints(a)}var Xrt=new h,Krt=new de,Qrt=new h,$rt=new de,Jrt=new h,Zrt=new h,eat=new h,tat=new h;function nat(e,t,n,i){let o=new Array(6),r=e.getCenter(),a=i.geodeticSurfaceNormal(r,Xrt),s=i.cartesianToCartographic(r,Krt);s.height=n;let c=i.cartographicToCartesian(s,Qrt),u=en.fromPointNormal(c,a);o[0]=u;let f=0,d,p=[],g,m;for(d=0;d<4;d++){g=e.getVertex(d),p[d]=g,m=i.cartesianToCartographic(g,$rt),m.height=t;let y=en.getPointDistance(u,i.cartographicToCartesian(m,Jrt));y<f&&(f=y)}let A=en.clone(u);for(A.normal=h.negate(A.normal,A.normal),A.distance=A.distance*-1+f,o[1]=A,d=0;d<4;d++){g=p[d];let y=p[(d+1)%4],x=i.geodeticSurfaceNormal(g,Zrt),b=h.subtract(y,g,tat),C=h.cross(b,x,eat);C=h.normalize(C,C),o[2+d]=en.fromPointNormal(g,C)}return o}var cC=new h,lC=new h,uC=new h,UQ=new h,VQ=new h,jQ=new h,iat=new h,oat=new h,rat=new h,GQ=new h,HQ=new h,WQ=new h,ty=new h,Bp=new $;function eAe(e,t,n){cC=e.normal,lC=t.normal,uC=n.normal,UQ=h.multiplyByScalar(e.normal,-e.distance,UQ),VQ=h.multiplyByScalar(t.normal,-t.distance,VQ),jQ=h.multiplyByScalar(n.normal,-n.distance,jQ),GQ=h.multiplyByScalar(h.cross(lC,uC,iat),h.dot(UQ,cC),GQ),HQ=h.multiplyByScalar(h.cross(uC,cC,oat),h.dot(VQ,lC),HQ),WQ=h.multiplyByScalar(h.cross(cC,lC,rat),h.dot(jQ,uC),WQ),Bp[0]=cC.x,Bp[1]=lC.x,Bp[2]=uC.x,Bp[3]=cC.y,Bp[4]=lC.y,Bp[5]=uC.y,Bp[6]=cC.z,Bp[7]=lC.z,Bp[8]=uC.z;let i=$.determinant(Bp);return ty=h.add(GQ,HQ,ty),ty=h.add(ty,WQ,ty),new h(ty.x/i,ty.y/i,ty.z/i)}function aat(e){let t=new Array(8);for(let n=0;n<4;n++)t[n]=eAe(e[0],e[2+(n+3)%4],e[2+n%4]),t[n+4]=eAe(e[1],e[2+(n+3)%4],e[2+n%4]);return t}var qQ=new h,AS=new h;function YQ(e,t){let n=[];for(let i=0;i<4;i++)qQ=h.subtract(t[(i+1)%4],t[i],qQ),AS=h.cross(e.normal,qQ,AS),AS=h.normalize(AS,AS),n[i]=h.clone(AS);return n}Object.defineProperties(yF.prototype,{boundingVolume:{get:function(){return this}},boundingSphere:{get:function(){return this._boundingSphere}}});var XQ=new h;yF.prototype.distanceToCamera=function(e){let t=e.camera.positionWC,n=[],i=[],o;en.getPointDistance(this._boundingPlanes[0],t)>0?(n.push(0),i.push(this._planeVertices[0]),o=this._edgeNormals[0]):en.getPointDistance(this._boundingPlanes[1],t)>0&&(n.push(1),i.push(this._planeVertices[1]),o=this._edgeNormals[1]);let r,a;for(r=0;r<4;r++)a=2+r,en.getPointDistance(this._boundingPlanes[a],t)>0&&(n.push(a),i.push(this._planeVertices[a]),o=this._edgeNormals[a]);if(n.length===0)return 0;let s,c;if(n.length===1)return c=this._boundingPlanes[n[0]],s=KQ(en.projectPointOntoPlane(c,t,XQ),i[0],c,o),h.distance(s,t);if(n.length===2){if(n[0]===0){let p=[this._vertices[4*n[0]+(n[1]-2)],this._vertices[4*n[0]+(n[1]-2+1)%4]];return s=tAe(t,p[0],p[1]),h.distance(s,t)}let f=Number.MAX_VALUE,d;for(r=0;r<2;r++)c=this._boundingPlanes[n[r]],s=KQ(en.projectPointOntoPlane(c,t,XQ),i[r],c,this._edgeNormals[n[r]]),d=h.distanceSquared(s,t),d<f&&(f=d);return Math.sqrt(f)}else if(n.length>3)return s=KQ(en.projectPointOntoPlane(this._boundingPlanes[1],t,XQ),this._planeVertices[1],this._boundingPlanes[1],this._edgeNormals[1]),h.distance(s,t);let u=n[1]===2&&n[2]===5?0:1;return n[0]===0?h.distance(t,this._vertices[(n[1]-2+u)%4]):h.distance(t,this._vertices[4+(n[1]-2+u)%4])};var sat=new h,cat=new h;function tAe(e,t,n){let i=h.subtract(n,t,sat),o=h.subtract(e,t,cat),r=h.dot(i,o);if(r<=0)return t;let a=h.dot(i,i);return r>=a?n:(r=r/a,new h((1-r)*t.x+r*n.x,(1-r)*t.y+r*n.y,(1-r)*t.z+r*n.z))}var lat=new en(h.UNIT_X,0);function KQ(e,t,n,i){let o=Number.MAX_VALUE,r,a,s;for(let c=0;c<t.length;c++){let u=en.fromPointNormal(t[c],i[c],lat);en.getPointDistance(u,e)<0||(s=tAe(e,t[c],t[(c+1)%4]),r=h.distance(e,s),r<o&&(o=r,a=s))}return l(a)?a:e}yF.prototype.intersectPlane=function(e){let t=0,n=0;for(let i=0;i<this._vertices.length;i++)h.dot(e.normal,this._vertices[i])+e.distance<0?n++:t++;return t===this._vertices.length?qt.INSIDE:n===this._vertices.length?qt.OUTSIDE:qt.INTERSECTING};yF.prototype.createDebugVolume=function(e){let t=M.clone(M.IDENTITY),n=new qd({polygonHierarchy:{positions:this._planeVertices[0]}}),i=qd.createGeometry(n),o=new Ot({geometry:i,id:"outline",modelMatrix:t,attributes:{color:Yt.fromColor(e)}}),r=new qd({polygonHierarchy:{positions:this._planeVertices[1]}}),a=qd.createGeometry(r),s=new Ot({geometry:a,id:"outline",modelMatrix:t,attributes:{color:Yt.fromColor(e)}}),c=[];for(let u=0;u<4;u++){let f=new qd({polygonHierarchy:{positions:this._planeVertices[2+u]}}),d=qd.createGeometry(f);c[u]=new Ot({geometry:d,id:"outline",modelMatrix:t,attributes:{color:Yt.fromColor(e)}})}return new Dn({geometryInstances:[c[0],c[1],c[2],c[3],s,o],appearance:new dn({translucent:!1,flat:!0}),asynchronous:!1})};var xF=yF;var uat=new h(1,1,1),hG=Math.cos,mG=Math.sin;function yS(e){e=e??G.EMPTY_OBJECT;let t=e.radii??uat,n=e.innerRadii??t,i=e.minimumClock??0,o=e.maximumClock??D.TWO_PI,r=e.minimumCone??0,a=e.maximumCone??D.PI,s=Math.round(e.stackPartitions??10),c=Math.round(e.slicePartitions??8),u=Math.round(e.subdivisions??128);this._radii=h.clone(t),this._innerRadii=h.clone(n),this._minimumClock=i,this._maximumClock=o,this._minimumCone=r,this._maximumCone=a,this._stackPartitions=s,this._slicePartitions=c,this._subdivisions=u,this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidOutlineGeometry"}yS.packedLength=2*h.packedLength+8;yS.pack=function(e,t,n){return n=n??0,h.pack(e._radii,t,n),n+=h.packedLength,h.pack(e._innerRadii,t,n),n+=h.packedLength,t[n++]=e._minimumClock,t[n++]=e._maximumClock,t[n++]=e._minimumCone,t[n++]=e._maximumCone,t[n++]=e._stackPartitions,t[n++]=e._slicePartitions,t[n++]=e._subdivisions,t[n]=e._offsetAttribute??-1,t};var nAe=new h,iAe=new h,Gg={radii:nAe,innerRadii:iAe,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0,offsetAttribute:void 0};yS.unpack=function(e,t,n){t=t??0;let i=h.unpack(e,t,nAe);t+=h.packedLength;let o=h.unpack(e,t,iAe);t+=h.packedLength;let r=e[t++],a=e[t++],s=e[t++],c=e[t++],u=e[t++],f=e[t++],d=e[t++],p=e[t];return l(n)?(n._radii=h.clone(i,n._radii),n._innerRadii=h.clone(o,n._innerRadii),n._minimumClock=r,n._maximumClock=a,n._minimumCone=s,n._maximumCone=c,n._stackPartitions=u,n._slicePartitions=f,n._subdivisions=d,n._offsetAttribute=p===-1?void 0:p,n):(Gg.minimumClock=r,Gg.maximumClock=a,Gg.minimumCone=s,Gg.maximumCone=c,Gg.stackPartitions=u,Gg.slicePartitions=f,Gg.subdivisions=d,Gg.offsetAttribute=p===-1?void 0:p,new yS(Gg))};yS.createGeometry=function(e){let t=e._radii;if(t.x<=0||t.y<=0||t.z<=0)return;let n=e._innerRadii;if(n.x<=0||n.y<=0||n.z<=0)return;let i=e._minimumClock,o=e._maximumClock,r=e._minimumCone,a=e._maximumCone,s=e._subdivisions,c=te.fromCartesian3(t),u=e._slicePartitions+1,f=e._stackPartitions+1;u=Math.round(u*Math.abs(o-i)/D.TWO_PI),f=Math.round(f*Math.abs(a-r)/D.PI),u<2&&(u=2),f<2&&(f=2);let d=0,p=1,g=n.x!==t.x||n.y!==t.y||n.z!==t.z,m=!1,A=!1;g&&(p=2,r>0&&(m=!0,d+=u),a<Math.PI&&(A=!0,d+=u));let y=s*p*(f+u),x=new Float64Array(y*3),b=2*(y+d-(u+f)*p),C=Ue.createTypedArray(y,b),E,S,w,P,R=0,B=new Array(f),L=new Array(f);for(E=0;E<f;E++)P=r+E*(a-r)/(f-1),B[E]=mG(P),L[E]=hG(P);let _=new Array(s),T=new Array(s);for(E=0;E<s;E++)w=i+E*(o-i)/(s-1),_[E]=mG(w),T[E]=hG(w);for(E=0;E<f;E++)for(S=0;S<s;S++)x[R++]=t.x*B[E]*T[S],x[R++]=t.y*B[E]*_[S],x[R++]=t.z*L[E];if(g)for(E=0;E<f;E++)for(S=0;S<s;S++)x[R++]=n.x*B[E]*T[S],x[R++]=n.y*B[E]*_[S],x[R++]=n.z*L[E];for(B.length=s,L.length=s,E=0;E<s;E++)P=r+E*(a-r)/(s-1),B[E]=mG(P),L[E]=hG(P);for(_.length=u,T.length=u,E=0;E<u;E++)w=i+E*(o-i)/(u-1),_[E]=mG(w),T[E]=hG(w);for(E=0;E<s;E++)for(S=0;S<u;S++)x[R++]=t.x*B[E]*T[S],x[R++]=t.y*B[E]*_[S],x[R++]=t.z*L[E];if(g)for(E=0;E<s;E++)for(S=0;S<u;S++)x[R++]=n.x*B[E]*T[S],x[R++]=n.y*B[E]*_[S],x[R++]=n.z*L[E];for(R=0,E=0;E<f*p;E++){let O=E*s;for(S=0;S<s-1;S++)C[R++]=O+S,C[R++]=O+S+1}let v=f*s*p;for(E=0;E<u;E++)for(S=0;S<s-1;S++)C[R++]=v+E+S*u,C[R++]=v+E+(S+1)*u;if(g)for(v=f*s*p+u*s,E=0;E<u;E++)for(S=0;S<s-1;S++)C[R++]=v+E+S*u,C[R++]=v+E+(S+1)*u;if(g){let O=f*s*p,N=O+s*u;if(m)for(E=0;E<u;E++)C[R++]=O+E,C[R++]=N+E;if(A)for(O+=s*u-u,N+=s*u-u,E=0;E<u;E++)C[R++]=O+E,C[R++]=N+E}let I=new pn({position:new Me({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:x})});if(l(e._offsetAttribute)){let O=x.length,N=e._offsetAttribute===ln.NONE?0:1,j=new Uint8Array(O/3).fill(N);I.applyOffset=new Me({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:j})}return new At({attributes:I,indices:C,primitiveType:Re.LINES,boundingSphere:ce.fromEllipsoid(c),offsetAttribute:e._offsetAttribute})};var Of=yS;function xS(e){let t=e.radius??1,i={radii:new h(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,subdivisions:e.subdivisions};this._ellipsoidGeometry=new Of(i),this._workerName="createSphereOutlineGeometry"}xS.packedLength=Of.packedLength;xS.pack=function(e,t,n){return Of.pack(e._ellipsoidGeometry,t,n)};var fat=new Of,fC={radius:void 0,radii:new h,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0};xS.unpack=function(e,t,n){let i=Of.unpack(e,t,fat);return fC.stackPartitions=i._stackPartitions,fC.slicePartitions=i._slicePartitions,fC.subdivisions=i._subdivisions,l(n)?(h.clone(i._radii,fC.radii),n._ellipsoidGeometry=new Of(fC),n):(fC.radius=i._radii.x,new xS(fC))};xS.createGeometry=function(e){return Of.createGeometry(e._ellipsoidGeometry)};var Hg=xS;function bS(e,t){t===0&&(t=D.EPSILON7),this._boundingSphere=new ce(e,t)}Object.defineProperties(bS.prototype,{center:{get:function(){return this._boundingSphere.center}},radius:{get:function(){return this._boundingSphere.radius}},boundingVolume:{get:function(){return this._boundingSphere}},boundingSphere:{get:function(){return this._boundingSphere}}});bS.prototype.distanceToCamera=function(e){let t=this._boundingSphere;return Math.max(0,h.distance(t.center,e.camera.positionWC)-t.radius)};bS.prototype.intersectPlane=function(e){return ce.intersectPlane(this._boundingSphere,e)};bS.prototype.update=function(e,t){h.clone(e,this._boundingSphere.center),this._boundingSphere.radius=t};bS.prototype.createDebugVolume=function(e){let t=new Hg({radius:this.radius}),n=M.fromTranslation(this.center,M.clone(M.IDENTITY)),i=new Ot({geometry:t,id:"outline",modelMatrix:n,attributes:{color:Yt.fromColor(e)}});return new Dn({geometryInstances:i,appearance:new dn({translucent:!1,flat:!0}),asynchronous:!1})};var Wg=bS;var dat=new h,hat=new h,mat=new h,pat=new h;function dC(e,t,n){n=h.cross(e,t,n);let i=h.magnitude(n);return h.multiplyByScalar(n,D.EPSILON7/i,n)}function QQ(e,t){let n=h.normalize(e,pat),i=h.equalsEpsilon(n,h.UNIT_X,D.EPSILON6)?h.UNIT_Y:h.UNIT_X;return dC(e,i,t)}function oAe(e){let t=$.getColumn(e,0,dat),n=$.getColumn(e,1,hat),i=$.getColumn(e,2,mat),o=h.equals(t,h.ZERO),r=h.equals(n,h.ZERO),a=h.equals(i,h.ZERO);return!o&&!r&&!a?e:o&&r&&a?(e[0]=D.EPSILON7,e[4]=D.EPSILON7,e[8]=D.EPSILON7,e):(o&&!r&&!a?t=dC(n,i,t):!o&&r&&!a?n=dC(t,i,n):!o&&!r&&a?i=dC(n,t,i):o?r?a||(t=QQ(i,t),n=dC(i,t,n)):(t=QQ(n,t),i=dC(n,t,i)):(n=QQ(t,n),i=dC(n,t,i)),$.setColumn(e,0,t,e),$.setColumn(e,1,n,e),$.setColumn(e,2,i,e),e)}function CS(e,t){t=oAe(t),this._orientedBoundingBox=new Qt(e,t),this._boundingSphere=ce.fromOrientedBoundingBox(this._orientedBoundingBox)}Object.defineProperties(CS.prototype,{boundingVolume:{get:function(){return this._orientedBoundingBox}},boundingSphere:{get:function(){return this._boundingSphere}}});CS.prototype.distanceToCamera=function(e){return Math.sqrt(this._orientedBoundingBox.distanceSquaredTo(e.camera.positionWC))};CS.prototype.intersectPlane=function(e){return this._orientedBoundingBox.intersectPlane(e)};CS.prototype.update=function(e,t){h.clone(e,this._orientedBoundingBox.center),t=oAe(t),$.clone(t,this._orientedBoundingBox.halfAxes),ce.fromOrientedBoundingBox(this._orientedBoundingBox,this._boundingSphere)};CS.prototype.createDebugVolume=function(e){let t=new Nh({minimum:new h(-1,-1,-1),maximum:new h(1,1,1)}),n=M.fromRotationTranslation(this.boundingVolume.halfAxes,this.boundingVolume.center),i=new Ot({geometry:t,id:"outline",modelMatrix:n,attributes:{color:Yt.fromColor(e)}});return new Dn({geometryInstances:i,appearance:new dn({translucent:!1,flat:!0}),asynchronous:!1})};var Vu=CS;function ur(e,t,n,i){this._tileset=e,this._header=n;let o=l(n.contents),r=o&&n.contents.length>1||Ci(n,"3DTILES_multiple_contents"),a=o&&!r?n.contents[0]:n.content;this._contentHeader=a,this.transform=l(n.transform)?M.unpack(n.transform):M.clone(M.IDENTITY);let s=l(i)?i.computedTransform:e.modelMatrix,c=M.multiply(s,this.transform,new M),u=l(i)?i._initialTransform:M.IDENTITY;this._initialTransform=M.multiply(u,this.transform,new M),this.computedTransform=c,this.metadata=pF(e,n),this._verticalExaggeration=1,this._verticalExaggerationRelativeHeight=0,this._boundingVolume=this.createBoundingVolume(n.boundingVolume,c),this._boundingVolume2D=void 0;let f;l(a)&&l(a.boundingVolume)&&(f=this.createBoundingVolume(a.boundingVolume,c)),this._contentBoundingVolume=f,this._contentBoundingVolume2D=void 0;let d;l(n.viewerRequestVolume)&&(d=this.createBoundingVolume(n.viewerRequestVolume,c)),this._viewerRequestVolume=d,this.geometricError=n.geometricError,this._geometricError=n.geometricError,l(this._geometricError)||(this._geometricError=l(i)?i._geometricError:e._geometricError,ur._deprecationWarning("geometricErrorUndefined","Required property geometricError is undefined for this tile. Using parent's geometric error instead.")),this.updateGeometricErrorScale();let p;l(n.refine)?((n.refine==="replace"||n.refine==="add")&&ur._deprecationWarning("lowercase-refine",`This tile uses a lowercase refine "${n.refine}". Instead use "${n.refine.toUpperCase()}".`),p=n.refine.toUpperCase()==="REPLACE"?ar.REPLACE:ar.ADD):l(i)?p=i.refine:p=ar.REPLACE,this.refine=p,this.children=[],this.parent=i;let g,m=!1,A,y,x;if(t=De.createIfNeeded(t),r)A=er.UNLOADED,y=t.clone();else if(l(a)){let S=a.uri;l(a.url)&&(ur._deprecationWarning("contentUrl",'This tileset JSON uses the "content.url" property which has been deprecated. Use "content.uri" instead.'),S=a.url),S===""?(ur._deprecationWarning("contentUriEmpty","content.uri property is an empty string, which creates a circular dependency, making this tileset invalid. Omit the content property instead"),g=new Mp(e,this),m=!0,A=er.READY):(A=er.UNLOADED,y=t.getDerivedResource({url:S}),x=Xc.getServerKey(y.getUrlComponent()))}else g=new Mp(e,this),m=!0,A=er.READY;this._content=g,this._contentResource=y,this._contentState=A,this._expiredContent=void 0,this._serverKey=x,this.hasEmptyContent=m,this.hasTilesetContent=!1,this.hasImplicitContent=!1,this.hasRenderableContent=!m,this.hasImplicitContentMetadata=!1,this.hasMultipleContents=r,this.cacheNode=void 0;let b=n.expire,C,E;l(b)&&(C=b.duration,l(b.date)&&(E=Q.fromIso8601(b.date))),this.expireDuration=C,this.expireDate=E,this.lastStyleTime=0,this._optimChildrenWithinParent=Gd.NOT_COMPUTED,this.clippingPlanesDirty=!1,this.clippingPolygonsDirty=!1,this.priorityDeferred=!1,this.implicitTileset=void 0,this.implicitCoordinates=void 0,this.implicitSubtree=void 0,this._distanceToCamera=0,this._centerZDepth=0,this._screenSpaceError=0,this._screenSpaceErrorProgressiveResolution=0,this._visibilityPlaneMask=0,this._visible=!1,this._inRequestVolume=!1,this._finalResolution=!0,this._depth=0,this._stackLength=0,this._selectionDepth=0,this._updatedVisibilityFrame=0,this._touchedFrame=0,this._visitedFrame=0,this._selectedFrame=0,this._wasSelectedLastFrame=!1,this._requestedFrame=0,this._ancestorWithContent=void 0,this._ancestorWithContentAvailable=void 0,this._refines=!1,this._shouldSelect=!1,this._isClipped=!0,this._isClippedByPolygon=!1,this._clippingPlanesState=0,this._clippingPolygonsState=0,this._debugBoundingVolume=void 0,this._debugContentBoundingVolume=void 0,this._debugViewerRequestVolume=void 0,this._debugColor=V.fromRandom({alpha:1}),this._debugColorizeTiles=!1,this._priority=0,this._priorityHolder=this,this._priorityProgressiveResolution=!1,this._priorityProgressiveResolutionScreenSpaceErrorLeaf=!1,this._priorityReverseScreenSpaceError=0,this._foveatedFactor=0,this._wasMinPriorityChild=!1,this._loadTimestamp=new Q,this._commandsLength=0,this._color=void 0,this._colorDirty=!1,this._request=void 0}ur._deprecationWarning=Ms;Object.defineProperties(ur.prototype,{tileset:{get:function(){return this._tileset}},content:{get:function(){return this._content}},boundingVolume:{get:function(){return this._boundingVolume}},contentBoundingVolume:{get:function(){return this._contentBoundingVolume??this._boundingVolume}},boundingSphere:{get:function(){return this._boundingVolume.boundingSphere}},isVisible:{get:function(){return this._visible&&this._inRequestVolume}},extras:{get:function(){return this._header.extras}},color:{get:function(){return l(this._color)||(this._color=new V),V.clone(this._color)},set:function(e){this._color=V.clone(e,this._color),this._colorDirty=!0}},contentAvailable:{get:function(){return this.contentReady&&this.hasRenderableContent||l(this._expiredContent)&&!this.contentFailed}},contentReady:{get:function(){return this._contentState===er.READY}},contentUnloaded:{get:function(){return this._contentState===er.UNLOADED}},hasUnloadedRenderableContent:{get:function(){return this.hasRenderableContent&&this.contentUnloaded}},contentExpired:{get:function(){return this._contentState===er.EXPIRED}},contentFailed:{get:function(){return this._contentState===er.FAILED}},commandsLength:{get:function(){return this._commandsLength}}});var ny=new h;function gat(e,t){let{tileset:n,boundingSphere:i}=e,{radius:o,center:r}=i,{camera:a}=t,s=h.multiplyByScalar(a.directionWC,e._centerZDepth,ny),c=h.add(a.positionWC,s,ny),u=h.subtract(c,r,ny);if(h.magnitude(u)>o){let E=h.normalize(u,ny),S=h.multiplyByScalar(E,o,ny),w=h.add(r,S,ny),P=h.subtract(w,a.positionWC,ny),R=h.normalize(P,ny);e._foveatedFactor=1-Math.abs(h.dot(a.directionWC,R))}else e._foveatedFactor=0;let p=e.refine===ar.REPLACE,g=n.isSkippingLevelOfDetail;if(p&&!g||!n.foveatedScreenSpaceError||n.foveatedConeSize===1||e._priorityProgressiveResolution&&p&&g||n._pass===tr.PRELOAD_FLIGHT||n._pass===tr.PRELOAD)return!1;let m=1-Math.cos(a.frustum.fov*.5),A=n.foveatedConeSize*m;if(e._foveatedFactor<=A)return!1;let y=m-A,x=D.clamp((e._foveatedFactor-A)/y,0,1),b=n.foveatedInterpolationCallback(n.foveatedMinimumScreenSpaceErrorRelaxation,n.memoryAdjustedScreenSpaceError,x),C=e._screenSpaceError===0&&l(e.parent)?e.parent._screenSpaceError*.5:e._screenSpaceError;return n.memoryAdjustedScreenSpaceError-b<=C}var uAe=new Q;ur.prototype.getScreenSpaceError=function(e,t,n){let i=this._tileset,o=n??1,r=l(this.parent)?this.parent.geometricError:i._scaledGeometricError,a=t?r:this.geometricError;if(a===0)return 0;let{camera:s,context:c}=e,u=s.frustum,f=c.drawingBufferWidth,d=c.drawingBufferHeight*o,p;if(e.mode===ie.SCENE2D||u instanceof fn){let g=u.offCenterFrustum;l(g)&&(u=g);let m=Math.max(u.top-u.bottom,u.right-u.left)/Math.max(f,d);p=a/m}else{let g=Math.max(this._distanceToCamera,D.EPSILON7),m=u.sseDenominator;if(p=a*d/(g*m),i.dynamicScreenSpaceError){let A=i._dynamicScreenSpaceErrorComputedDensity,y=i.dynamicScreenSpaceErrorFactor,x=D.fog(g,A)*y;p-=x}}return p/=e.pixelRatio,p};function _at(e,t){if(e.progressiveResolutionHeightFraction<=0||e.progressiveResolutionHeightFraction>.5)return!1;let n=e.memoryAdjustedScreenSpaceError,i=t._screenSpaceErrorProgressiveResolution>n;t._priorityProgressiveResolutionScreenSpaceErrorLeaf=!1;let o=t.parent,r=t._screenSpaceErrorProgressiveResolution<=n,a=l(o)&&o._screenSpaceErrorProgressiveResolution>n;return r&&a&&(t._priorityProgressiveResolutionScreenSpaceErrorLeaf=!0,i=!0),i}function Aat(e,t){let n=t.parent,o=l(n)&&(!e.isSkippingLevelOfDetail||t._screenSpaceError===0||n.hasTilesetContent||n.hasImplicitContent)?n._screenSpaceError:t._screenSpaceError;return e.root._screenSpaceError-o}ur.prototype.updateVisibility=function(e){let{parent:t,tileset:n}=this;if(this._updatedVisibilityFrame===n._updatedVisibilityFrame)return;let i=l(t)?t.computedTransform:n.modelMatrix,o=l(t)?t._visibilityPlaneMask:Ka.MASK_INDETERMINATE;this.updateTransform(i,e),this._distanceToCamera=this.distanceToTile(e),this._centerZDepth=this.distanceToTileCenter(e),this._screenSpaceError=this.getScreenSpaceError(e,!1),this._screenSpaceErrorProgressiveResolution=this.getScreenSpaceError(e,!1,n.progressiveResolutionHeightFraction),this._visibilityPlaneMask=this.visibility(e,o),this._visible=this._visibilityPlaneMask!==Ka.MASK_OUTSIDE,this._inRequestVolume=this.insideViewerRequestVolume(e),this._priorityReverseScreenSpaceError=Aat(n,this),this._priorityProgressiveResolution=_at(n,this),this.priorityDeferred=gat(this,e),this._updatedVisibilityFrame=n._updatedVisibilityFrame};ur.prototype.updateExpiration=function(){if(l(this.expireDate)&&this.contentReady&&!this.hasEmptyContent&&!this.hasMultipleContents){let e=Q.now(uAe);Q.lessThan(this.expireDate,e)&&(this._contentState=er.EXPIRED,this._expiredContent=this._content)}};function yat(e){if(!l(e.expireDuration))return;let t=Q.now(uAe);Q.addSeconds(t,e.expireDuration,t),l(e.expireDate)?Q.lessThan(e.expireDate,t)&&Q.clone(t,e.expireDate):e.expireDate=Q.clone(t)}function xat(e){return function(){return e._priority}}ur.prototype.requestContent=function(){if(!this.hasEmptyContent)return this.hasMultipleContents?bat(this):Tat(this)};function bat(e){let t=e._content,n=e._tileset;if(!l(t)){let o=Ci(e._header,"3DTILES_multiple_contents")?e._header.extensions["3DTILES_multiple_contents"]:e._header;t=new gF(n,e,e._contentResource.clone(),o),e._content=t}let i=t.requestInnerContents();if(l(i))return e._contentState=er.LOADING,i.then(o=>{if(!e.isDestroyed()&&l(o))return e._contentState=er.PROCESSING,t}).catch(o=>{if(!e.isDestroyed())throw e._contentState=er.FAILED,o})}async function Cat(e,t,n,i,o){let r=e._contentState;e._contentState=er.LOADING,++t.statistics.numberOfPendingRequests;let a;try{a=await o}catch(s){if(--t.statistics.numberOfPendingRequests,e.isDestroyed())return;if(n.cancelled||n.state===di.CANCELLED){e._contentState=r,++t.statistics.numberOfAttemptedRequests;return}if(fAe(e,s))return i&&(e.expireDate=void 0),e._content=new Mp(t,e),rAe(e),e._contentState=er.PROCESSING,e._content;throw e._contentState=er.FAILED,s}if(e.isDestroyed()){--t.statistics.numberOfPendingRequests;return}if(n.cancelled||n.state===di.CANCELLED){e._contentState=r,--t.statistics.numberOfPendingRequests,++t.statistics.numberOfAttemptedRequests;return}try{let s=await Eat(e,a);return--t.statistics.numberOfPendingRequests,e.isDestroyed()?void 0:(i&&(e.expireDate=void 0),e._content=s,s instanceof Mp&&rAe(e),e._contentState=er.PROCESSING,s)}catch(s){if(--t.statistics.numberOfPendingRequests,e.isDestroyed())return;throw e._contentState=er.FAILED,s}}function Tat(e){let t=e._contentResource.clone(),n=e.contentExpired;n&&t.setQueryParameters({expired:e.expireDate.toString()});let i=new _r({throttle:!0,throttleByServer:!0,type:qa.TILES3D,priorityFunction:xat(e),serverKey:e._serverKey});e._request=i,t.request=i;let o=e._tileset,r=t.fetchArrayBuffer();if(!l(r)){++o.statistics.numberOfAttemptedRequests;return}return Cat(e,o,i,n,r)}function fAe(e,t){let i=e._tileset?._runtimeContentCodec?.missingTilePolicy;return!l(i)||!l(t.statusCode)?!1:i.statusCodes.includes(t.statusCode)}function rAe(e){e.hasEmptyContent=!0,e.hasRenderableContent=!1}ur._isEmptyTile=fAe;async function Eat(e,t){let n=e._tileset,i=n?._runtimeContentCodec;if(l(i)&&typeof i.createContent=="function"){let u=await Promise.resolve(i.createContent(n,e,e._contentResource,t));return e.isDestroyed()?void 0:u}let o=Vg(t);n._disableSkipLevelOfDetail=n._disableSkipLevelOfDetail||o.contentType===As.GEOMETRY||o.contentType===As.VECTOR,(o.contentType===As.IMPLICIT_SUBTREE||o.contentType===As.IMPLICIT_SUBTREE_JSON)&&(e.hasImplicitContent=!0,e.hasRenderableContent=!1),o.contentType===As.EXTERNAL_TILESET&&(e.hasTilesetContent=!0,e.hasRenderableContent=!1);let r,a=iC[o.contentType];if(e.isDestroyed())return;l(o.binaryPayload)?r=await Promise.resolve(a(n,e,e._contentResource,o.binaryPayload.buffer,0)):r=await Promise.resolve(a(n,e,e._contentResource,o.jsonPayload));let s=e._contentHeader;if(e.hasImplicitContentMetadata){let u=e.implicitSubtree,f=e.implicitCoordinates;r.metadata=u.getContentMetadataView(f,0)}else e.hasImplicitContent||(r.metadata=oC(n,s));let c=rC(n,s);return l(c)&&(r.group=new ib({metadata:c})),r}ur.prototype.cancelRequests=function(){this.hasMultipleContents?this._content.cancelRequests():this._request.cancel()};ur.prototype.unloadContent=function(){this.hasRenderableContent&&(this._content=this._content&&this._content.destroy(),this._contentState=er.UNLOADED,this.lastStyleTime=0,this.clippingPlanesDirty=this._clippingPlanesState===0,this._clippingPlanesState=0,this.clippingPolygonsDirty=this._clippingPolygonsState===0,this._clippingPolygonsState=0,this._debugColorizeTiles=!1,this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy())};var dAe=new ce;function JQ(e,t){if(t.mode!==ie.SCENE3D&&!l(e._boundingVolume2D)){let n=e._boundingVolume.boundingSphere,i=ce.projectTo2D(n,t.mapProjection,dAe);e._boundingVolume2D=new Wg(i.center,i.radius)}return t.mode!==ie.SCENE3D?e._boundingVolume2D:e._boundingVolume}function vat(e,t){if(t.mode!==ie.SCENE3D&&!l(e._contentBoundingVolume2D)){let n=e._contentBoundingVolume.boundingSphere,i=ce.projectTo2D(n,t.mapProjection,dAe);e._contentBoundingVolume2D=new Wg(i.center,i.radius)}return t.mode!==ie.SCENE3D?e._contentBoundingVolume2D:e._contentBoundingVolume}ur.prototype.visibility=function(e,t){let n=e.cullingVolume,i=JQ(this,e),o=this._tileset,r=o.clippingPlanes;if(l(r)&&r.enabled){let s=r.computeIntersectionWithBoundingVolume(i,o.clippingPlanesOriginMatrix);if(this._isClipped=s!==qt.INSIDE,s===qt.OUTSIDE)return Ka.MASK_OUTSIDE}let a=o.clippingPolygons;if(l(a)&&a.enabled){let s=a.computeIntersectionWithBoundingVolume(i);this._isClippedByPolygon=s!==qt.OUTSIDE}return n.computeVisibilityWithPlaneMask(i,t)};ur.prototype.contentVisibility=function(e){if(!l(this._contentBoundingVolume))return qt.INSIDE;if(this._visibilityPlaneMask===Ka.MASK_INSIDE)return qt.INSIDE;let t=e.cullingVolume,n=vat(this,e),i=this._tileset,o=i.clippingPlanes;if(l(o)&&o.enabled){let a=o.computeIntersectionWithBoundingVolume(n,i.clippingPlanesOriginMatrix);if(this._isClipped=a!==qt.INSIDE,a===qt.OUTSIDE)return qt.OUTSIDE}let r=i.clippingPolygons;if(l(r)&&r.enabled){let a=r.computeIntersectionWithBoundingVolume(n);if(this._isClippedByPolygon=a!==qt.OUTSIDE,a===qt.INSIDE)return qt.OUTSIDE}return t.computeVisibility(n)};ur.prototype.distanceToTile=function(e){return JQ(this,e).distanceToCamera(e)};var Sat=new h;ur.prototype.distanceToTileCenter=function(e){let n=JQ(this,e).boundingVolume,i=h.subtract(n.center,e.camera.positionWC,Sat);return h.dot(e.camera.directionWC,i)};ur.prototype.insideViewerRequestVolume=function(e){let t=this._viewerRequestVolume;return!l(t)||t.distanceToCamera(e)===0};var hAe=new $,mAe=new h,wat=new $,ZQ=new h,pAe=new oe,gAe=new Qt,$Q=new M;function Iat(e,t,n){let i=h.fromElements(e[0],e[1],e[2],ZQ),o=$.fromArray(e,3,wat);i=M.multiplyByPoint(t,i,i);let r=M.getMatrix3(t,hAe);return o=$.multiply(r,o,o),l(n)?(n.update(i,o),n):new Vu(i,o)}function aAe(e,t,n,i){let o=oe.unpack(e,0,pAe),r=e[4],a=e[5],s=Qt.fromRectangle(o,r,a,te.WGS84,gAe),c=s.center,u=s.halfAxes;t=M.multiplyTransformation(t,M.inverseTransformation(n,$Q),$Q),c=M.multiplyByPoint(t,c,c);let f=M.getMatrix3(t,hAe);return u=$.multiply(f,u,u),l(i)&&i instanceof Vu?(i.update(c,u),i):new Vu(c,u)}function Dat(e,t,n,i){if(!M.equalsEpsilon(t,n,D.EPSILON8))return i instanceof Vu?aAe(e,t,n,i):aAe(e,t,n,void 0);let o=oe.unpack(e,0,pAe);return i instanceof Rf?(i.rectangle=oe.clone(o,i.rectangle),i.minimumHeight=e[4],i.maximumHeight=e[5],i.computeBoundingVolumes(te.WGS84),i):new Rf({rectangle:o,minimumHeight:e[4],maximumHeight:e[5]})}function Pat(e,t,n){let i=h.fromElements(e[0],e[1],e[2],ZQ),o=e[3];i=M.multiplyByPoint(t,i,i);let r=M.getScale(t,mAe),a=h.maximumComponent(r);return o*=a,l(n)?(n.update(i,o),n):new Wg(i,o)}ur.prototype.createBoundingVolume=function(e,t,n){let i=this.metadata,o;if(l(i)&&(o=IA.parseBoundingVolumeSemantic("TILE",i)),l(o)&&(e=o),!l(e))throw new re("boundingVolume must be defined");if(Ci(e,"3DTILES_bounding_volume_S2"))return new xF(e.extensions["3DTILES_bounding_volume_S2"]);let{box:r,region:a,sphere:s}=e;if(l(r)){let c=Iat(r,t,n);return this._verticalExaggeration!==1&&sAe(c,this._verticalExaggeration,this._verticalExaggerationRelativeHeight),c}if(l(a)){let c=Dat(a,t,this._initialTransform,n);return this._verticalExaggeration===1||(c instanceof Vu?sAe(c,this._verticalExaggeration,this._verticalExaggerationRelativeHeight):(c.minimumHeight=so.getHeight(c.minimumHeight,this._verticalExaggeration,this._verticalExaggerationRelativeHeight),c.maximumHeight=so.getHeight(c.maximumHeight,this._verticalExaggeration,this._verticalExaggerationRelativeHeight),c.computeBoundingVolumes(te.WGS84))),c}if(l(s)){let c=Pat(s,t,n);if(this._verticalExaggeration!==1){let u=so.getPosition(c.center,te.WGS84,this._verticalExaggeration,this._verticalExaggerationRelativeHeight,ZQ),f=c.radius*this._verticalExaggeration;c.update(u,f)}return c}throw new re("boundingVolume must contain a sphere, region, or box")};var Rat=h.unpackArray(new Array(24).fill(0));function sAe(e,t,n){let i=e.boundingVolume.computeCorners(Rat).map(r=>so.getPosition(r,te.WGS84,t,n,r)),o=Qt.fromPoints(i,gAe);e.update(o.center,o.halfAxes)}ur.prototype.updateTransform=function(e,t){e=e??M.IDENTITY;let n=M.multiplyTransformation(e,this.transform,$Q),i=!M.equals(n,this.computedTransform),o=l(t)&&(this._verticalExaggeration!==t.verticalExaggeration||this._verticalExaggerationRelativeHeight!==t.verticalExaggerationRelativeHeight);if(!i&&!o)return;i&&M.clone(n,this.computedTransform),o&&(this._verticalExaggeration=t.verticalExaggeration,this._verticalExaggerationRelativeHeight=t.verticalExaggerationRelativeHeight);let r=this._header,a=this._contentHeader;this._boundingVolume=this.createBoundingVolume(r.boundingVolume,this.computedTransform,this._boundingVolume),l(this._contentBoundingVolume)&&(this._contentBoundingVolume=this.createBoundingVolume(a.boundingVolume,this.computedTransform,this._contentBoundingVolume)),l(this._viewerRequestVolume)&&(this._viewerRequestVolume=this.createBoundingVolume(r.viewerRequestVolume,this.computedTransform,this._viewerRequestVolume)),this.updateGeometricErrorScale(),this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy()};ur.prototype.updateGeometricErrorScale=function(){let e=M.getScale(this.computedTransform,mAe),t=h.maximumComponent(e);if(this.geometricError=this._geometricError*t,!l(this.parent)){let n=this._tileset;n._scaledGeometricError=n._geometricError*t}};function Oat(e,t,n,i){if(!i.isRender)return;let o=l(e._contentHeader)&&l(e._contentHeader.boundingVolume),r=t.debugShowBoundingVolume||t.debugShowContentBoundingVolume&&!o;if(r){let c;e._finalResolution?e.hasRenderableContent?c=V.WHITE:c=V.DARKGRAY:c=V.YELLOW,l(e._debugBoundingVolume)||(e._debugBoundingVolume=e._boundingVolume.createDebugVolume(c)),e._debugBoundingVolume.update(n);let u=e._debugBoundingVolume.getGeometryInstanceAttributes("outline");u.color=Yt.toValue(c,u.color)}else!r&&l(e._debugBoundingVolume)&&(e._debugBoundingVolume=e._debugBoundingVolume.destroy());t.debugShowContentBoundingVolume&&o?(l(e._debugContentBoundingVolume)||(e._debugContentBoundingVolume=e._contentBoundingVolume.createDebugVolume(V.BLUE)),e._debugContentBoundingVolume.update(n)):!t.debugShowContentBoundingVolume&&l(e._debugContentBoundingVolume)&&(e._debugContentBoundingVolume=e._debugContentBoundingVolume.destroy()),t.debugShowViewerRequestVolume&&l(e._viewerRequestVolume)?(l(e._debugViewerRequestVolume)||(e._debugViewerRequestVolume=e._viewerRequestVolume.createDebugVolume(V.YELLOW)),e._debugViewerRequestVolume.update(n)):!t.debugShowViewerRequestVolume&&l(e._debugViewerRequestVolume)&&(e._debugViewerRequestVolume=e._debugViewerRequestVolume.destroy());let a=t.debugColorizeTiles&&!e._debugColorizeTiles||l(t._heatmap.tilePropertyName),s=!t.debugColorizeTiles&&e._debugColorizeTiles;a?(t._heatmap.colorize(e,n),e._debugColorizeTiles=!0,e.color=e._debugColor):s&&(e._debugColorizeTiles=!1,e.color=V.WHITE),e._colorDirty&&(e._colorDirty=!1,e._content.applyDebugSettings(!0,e._color)),s&&t.makeStyleDirty()}function Mat(e,t,n){let i=e._expiredContent;if(!e.hasMultipleContents&&l(i)){if(!e.contentReady){try{i.update(t,n)}catch{}return}e._expiredContent.destroy(),e._expiredContent=void 0}if(l(e.content))try{e.content.update(t,n)}catch(o){throw e._contentState=er.FAILED,o}}function Bat(e,t){let n=t.clippingPlanes,i=0;l(n)&&e._isClipped&&n.enabled&&(i=n.clippingPlanesState),i!==e._clippingPlanesState&&(e._clippingPlanesState=i,e.clippingPlanesDirty=!0)}function Lat(e,t){let n=t.clippingPolygons,i=0;l(n)&&e._isClippedByPolygon&&n.enabled&&(i=n.clippingPolygonsState),i!==e._clippingPolygonsState&&(e._clippingPolygonsState=i,e.clippingPolygonsDirty=!0)}ur.prototype.update=function(e,t,n){let{commandList:i}=t,o=i.length;Bat(this,e),Lat(this,e),Oat(this,e,t,n),Mat(this,e,t);let r=i.length;this._commandsLength=r-o;for(let a=o;a<r;++a){let s=i[a],c=s.pass===Ie.TRANSLUCENT;s.depthForTranslucentClassification=c}this.clippingPlanesDirty=!1,this.clippingPolygonsDirty=!1};var cAe=[];ur.prototype.process=function(e,t){!this.contentExpired&&!this.contentReady&&this._content.ready&&(yat(this),this._selectedFrame=0,this.lastStyleTime=0,Q.now(this._loadTimestamp),this._contentState=er.READY,!this.hasTilesetContent&&!this.hasImplicitContent&&(e._statistics.incrementLoadCounts(this.content),++e._statistics.numberOfTilesWithContentReady,++e._statistics.numberOfLoadedTilesTotal,e._cache.add(this)));let n=t.commandList;t.commandList=cAe;try{this._content.update(e,t)}catch(i){throw this._contentState=er.FAILED,i}cAe.length=0,t.commandList=n};function lAe(e,t,n){let i=e*Math.pow(10,t);return parseInt(i)*Math.pow(10,n)}function pG(e,t,n){return Math.max(D.normalize(e,t,n)-D.EPSILON7,0)}ur.prototype.updatePriority=function(){let e=this.tileset,t=e.preferLeaves,n=e._minimumPriority,i=e._maximumPriority,o=4,r=1,a=0,s=o,c=a+s,u=o,f=c+u,d=r,p=Math.pow(10,f),g=f+d,m=r,A=Math.pow(10,g),y=g+m,x=Math.pow(10,y),b=pG(this._depth,n.depth,i.depth);b=t?1-b:b;let E=!e.isSkippingLevelOfDetail&&this.refine===ar.REPLACE?pG(this._priorityHolder._distanceToCamera,n.distance,i.distance):pG(this._priorityReverseScreenSpaceError,n.reverseScreenSpaceError,i.reverseScreenSpaceError),S=lAe(E,s,a),w=this._priorityProgressiveResolution?0:p,P=pG(this._priorityHolder._foveatedFactor,n.foveatedFactor,i.foveatedFactor),R=lAe(P,u,c),B=this.priorityDeferred?A:0,L=e._pass===tr.PRELOAD_FLIGHT?0:x;this._priority=b+S+w+R+B+L};ur.prototype.isDestroyed=function(){return!1};ur.prototype.destroy=function(){return this._content=this._content&&this._content.destroy(),this._expiredContent=this._expiredContent&&!this._expiredContent.isDestroyed()&&this._expiredContent.destroy(),this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy(),fe(this)};var Yd=ur;function qg(e){e=e??G.EMPTY_OBJECT;let t=e.id,n=e.group,i=e.class,o=l(n.properties)?n.properties:{};this._class=i,this._properties=o,this._id=t,this._extras=n.extras,this._extensions=n.extensions}Object.defineProperties(qg.prototype,{class:{get:function(){return this._class}},id:{get:function(){return this._id}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});qg.prototype.hasProperty=function(e){return Un.hasProperty(e,this._properties,this._class)};qg.prototype.hasPropertyBySemantic=function(e){return Un.hasPropertyBySemantic(e,this._properties,this._class)};qg.prototype.getPropertyIds=function(e){return Un.getPropertyIds(this._properties,this._class,e)};qg.prototype.getProperty=function(e){return Un.getProperty(e,this._properties,this._class)};qg.prototype.setProperty=function(e,t){return Un.setProperty(e,t,this._properties,this._class)};qg.prototype.getPropertyBySemantic=function(e){return Un.getPropertyBySemantic(e,this._properties,this._class)};qg.prototype.setPropertyBySemantic=function(e,t){return Un.setPropertyBySemantic(e,t,this._properties,this._class)};var TS=qg;function Yg(e){e=e??G.EMPTY_OBJECT;let t=e.tileset,n=e.class,i=l(t.properties)?t.properties:{};this._class=n,this._properties=i,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(Yg.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});Yg.prototype.hasProperty=function(e){return Un.hasProperty(e,this._properties,this._class)};Yg.prototype.hasPropertyBySemantic=function(e){return Un.hasPropertyBySemantic(e,this._properties,this._class)};Yg.prototype.getPropertyIds=function(e){return Un.getPropertyIds(this._properties,this._class,e)};Yg.prototype.getProperty=function(e){return Un.getProperty(e,this._properties,this._class)};Yg.prototype.setProperty=function(e,t){return Un.setProperty(e,t,this._properties,this._class)};Yg.prototype.getPropertyBySemantic=function(e){return Un.getPropertyBySemantic(e,this._properties,this._class)};Yg.prototype.setPropertyBySemantic=function(e,t){return Un.setPropertyBySemantic(e,t,this._properties,this._class)};var bF=Yg;function _Ae(e){e=e??G.EMPTY_OBJECT;let t=e.metadataJson,n=e.schema,i=t.metadata??t.tileset,o;l(i)&&(o=new bF({tileset:i,class:n.classes[i.class]}));let r=[],a=[],s=t.groups;if(Array.isArray(s)){let c=s.length;for(let u=0;u<c;u++){let f=s[u];a.push(new TS({group:f,class:n.classes[f.class]}))}}else if(l(s)){r=Object.keys(s).sort();let c=r.length;for(let u=0;u<c;u++){let f=r[u];if(s.hasOwnProperty(f)){let d=s[f];a.push(new TS({id:f,group:s[f],class:n.classes[d.class]}))}}}this._schema=n,this._groups=a,this._groupIds=r,this._tileset=o,this._statistics=t.statistics,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(_Ae.prototype,{schema:{get:function(){return this._schema}},groups:{get:function(){return this._groups}},groupIds:{get:function(){return this._groupIds}},tileset:{get:function(){return this._tileset}},statistics:{get:function(){return this._statistics}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});var hC=_Ae;var AAe={},Nat=new h;AAe.checkChildrenWithinParent=function(e){let t=e.children,n=t.length,i=e.boundingVolume;if(i instanceof Vu||i instanceof Rf){let o=i._orientedBoundingBox;e._optimChildrenWithinParent=Gd.USE_OPTIMIZATION;for(let r=0;r<n;++r){let s=t[r].boundingVolume;if(!(s instanceof Vu||s instanceof Rf)){e._optimChildrenWithinParent=Gd.SKIP_OPTIMIZATION;break}let c=s._orientedBoundingBox,u=h.subtract(c.center,o.center,Nat),f=h.magnitude(u);h.divideByScalar(u,f,u);let d=Math.abs(o.halfAxes[0]*u.x)+Math.abs(o.halfAxes[1]*u.y)+Math.abs(o.halfAxes[2]*u.z)+Math.abs(o.halfAxes[3]*u.x)+Math.abs(o.halfAxes[4]*u.y)+Math.abs(o.halfAxes[5]*u.z)+Math.abs(o.halfAxes[6]*u.x)+Math.abs(o.halfAxes[7]*u.y)+Math.abs(o.halfAxes[8]*u.z),p=Math.abs(c.halfAxes[0]*u.x)+Math.abs(c.halfAxes[1]*u.y)+Math.abs(c.halfAxes[2]*u.z)+Math.abs(c.halfAxes[3]*u.x)+Math.abs(c.halfAxes[4]*u.y)+Math.abs(c.halfAxes[5]*u.z)+Math.abs(c.halfAxes[6]*u.x)+Math.abs(c.halfAxes[7]*u.y)+Math.abs(c.halfAxes[8]*u.z);if(d<=p+f){e._optimChildrenWithinParent=Gd.SKIP_OPTIMIZATION;break}}}return e._optimChildrenWithinParent===Gd.USE_OPTIMIZATION};var CF=AAe;function TF(){this.head=void 0,this.tail=void 0,this._length=0}Object.defineProperties(TF.prototype,{length:{get:function(){return this._length}}});function Fat(e,t,n){this.item=e,this.previous=t,this.next=n}TF.prototype.add=function(e){let t=new Fat(e,this.tail,void 0);return l(this.tail)?(this.tail.next=t,this.tail=t):(this.head=t,this.tail=t),++this._length,t};function yAe(e,t){l(t.previous)&&l(t.next)?(t.previous.next=t.next,t.next.previous=t.previous):l(t.previous)?(t.previous.next=void 0,e.tail=t.previous):l(t.next)?(t.next.previous=void 0,e.head=t.next):(e.head=void 0,e.tail=void 0),t.next=void 0,t.previous=void 0}TF.prototype.remove=function(e){l(e)&&(yAe(this,e),--this._length)};TF.prototype.splice=function(e,t){if(e===t)return;yAe(this,t);let n=e.next;e.next=t,this.tail===e?this.tail=t:n.previous=t,t.next=n,t.previous=e};var EF=TF;function mC(){this._list=new EF,this._sentinel=this._list.add(),this._trimTiles=!1}mC.prototype.reset=function(){this._list.splice(this._list.tail,this._sentinel)};mC.prototype.touch=function(e){let t=e.cacheNode;l(t)&&this._list.splice(this._sentinel,t)};mC.prototype.add=function(e){l(e.cacheNode)||(e.cacheNode=this._list.add(e))};mC.prototype.unloadTile=function(e,t,n){let i=t.cacheNode;l(i)&&(this._list.remove(i),t.cacheNode=void 0,n(e,t))};mC.prototype.unloadTiles=function(e,t){let n=this._trimTiles;this._trimTiles=!1;let i=this._list,o=this._sentinel,r=i.head;for(;r!==o&&(e.totalMemoryUsageInBytes>e.cacheBytes||n);){let a=r.item;r=r.next,this.unloadTile(e,a,t)}};mC.prototype.trim=function(){this._trimTiles=!0};var vF=mC;function gG(e){this.tilePropertyName=e,this._minimum=Number.MAX_VALUE,this._maximum=-Number.MAX_VALUE,this._previousMinimum=Number.MAX_VALUE,this._previousMaximum=-Number.MAX_VALUE,this._referenceMinimum={},this._referenceMaximum={}}function t$(e,t){let n;return t==="_loadTimestamp"?n=Q.toDate(e).getTime():n=e,n}gG.prototype.setReferenceMinimumMaximum=function(e,t,n){this._referenceMinimum[n]=t$(e,n),this._referenceMaximum[n]=t$(t,n)};function kat(e,t){let n=e.tilePropertyName;if(l(n)){let i=t$(t[n],n);return l(i)?(e._maximum=Math.max(i,e._maximum),e._minimum=Math.min(i,e._minimum),i):(e.tilePropertyName=void 0,i)}}var e$=[new V(.1,.1,.1,1),new V(.153,.278,.878,1),new V(.827,.231,.49,1),new V(.827,.188,.22,1),new V(1,.592,.259,1),new V(1,.843,0,1)];gG.prototype.colorize=function(e,t){let n=this.tilePropertyName;if(!l(n)||!e.contentAvailable||e._selectedFrame!==t.frameNumber)return;let i=kat(this,e),o=this._previousMinimum,r=this._previousMaximum;if(o===Number.MAX_VALUE||r===-Number.MAX_VALUE)return;let a=r-o+D.EPSILON7,c=D.clamp(i-o,0,a)/a,u=e$.length-1,f=c*u,d=Math.floor(f),p=Math.ceil(f),g=f-d,m=e$[d],A=e$[p],y=V.clone(V.WHITE);y.red=D.lerp(m.red,A.red,g),y.green=D.lerp(m.green,A.green,g),y.blue=D.lerp(m.blue,A.blue,g),e._debugColor=y};gG.prototype.resetMinimumMaximum=function(){let e=this.tilePropertyName;if(l(e)){let t=this._referenceMinimum[e],n=this._referenceMaximum[e],i=l(t)&&l(n);this._previousMinimum=i?t:this._minimum,this._previousMaximum=i?n:this._maximum,this._minimum=Number.MAX_VALUE,this._maximum=-Number.MAX_VALUE}};var SF=gG;function ES(){this.selected=0,this.visited=0,this.numberOfCommands=0,this.numberOfAttemptedRequests=0,this.numberOfPendingRequests=0,this.numberOfTilesProcessing=0,this.numberOfTilesWithContentReady=0,this.numberOfTilesTotal=0,this.numberOfLoadedTilesTotal=0,this.numberOfFeaturesSelected=0,this.numberOfFeaturesLoaded=0,this.numberOfPointsSelected=0,this.numberOfPointsLoaded=0,this.numberOfTrianglesSelected=0,this.numberOfTilesStyled=0,this.numberOfFeaturesStyled=0,this.numberOfTilesCulledWithChildrenUnion=0,this.geometryByteLength=0,this.texturesByteLength=0,this.texturesReferenceCounterById={},this.batchTableByteLength=0}ES.prototype.clear=function(){this.selected=0,this.visited=0,this.numberOfCommands=0,this.numberOfAttemptedRequests=0,this.numberOfFeaturesSelected=0,this.numberOfPointsSelected=0,this.numberOfTrianglesSelected=0,this.numberOfTilesStyled=0,this.numberOfFeaturesStyled=0,this.numberOfTilesCulledWithChildrenUnion=0};ES.prototype.incrementSelectionCounts=function(e){this.numberOfFeaturesSelected+=e.featuresLength,this.numberOfPointsSelected+=e.pointsLength,this.numberOfTrianglesSelected+=e.trianglesLength;let t=e.innerContents;if(l(t)){let n=t.length;for(let i=0;i<n;++i)this.incrementSelectionCounts(t[i])}};ES.prototype.incrementLoadCounts=function(e){if(this.numberOfFeaturesLoaded+=e.featuresLength,this.numberOfPointsLoaded+=e.pointsLength,this.geometryByteLength+=e.geometryByteLength,this.batchTableByteLength+=e.batchTableByteLength,!(e instanceof If))this.texturesByteLength+=e.texturesByteLength;else{let n=e.getTextureIds();for(let i of n){let o=this.texturesReferenceCounterById[i]??0;if(o===0){let r=e.getTextureByteLengthById(i);this.texturesByteLength+=r}this.texturesReferenceCounterById[i]=o+1}}let t=e.innerContents;if(l(t)){let n=t.length;for(let i=0;i<n;++i)this.incrementLoadCounts(t[i])}};ES.prototype.decrementLoadCounts=function(e){if(this.numberOfFeaturesLoaded-=e.featuresLength,this.numberOfPointsLoaded-=e.pointsLength,this.geometryByteLength-=e.geometryByteLength,this.batchTableByteLength-=e.batchTableByteLength,!(e instanceof If))this.texturesByteLength-=e.texturesByteLength;else{let n=e.getTextureIds();for(let i of n){let o=this.texturesReferenceCounterById[i];if(o===1){delete this.texturesReferenceCounterById[i];let r=e.getTextureByteLengthById(i);this.texturesByteLength-=r}else this.texturesReferenceCounterById[i]=o-1}}let t=e.innerContents;if(l(t)){let n=t.length;for(let i=0;i<n;++i)this.decrementLoadCounts(t[i])}};ES.clone=function(e,t){t.selected=e.selected,t.visited=e.visited,t.numberOfCommands=e.numberOfCommands,t.numberOfAttemptedRequests=e.numberOfAttemptedRequests,t.numberOfPendingRequests=e.numberOfPendingRequests,t.numberOfTilesProcessing=e.numberOfTilesProcessing,t.numberOfTilesWithContentReady=e.numberOfTilesWithContentReady,t.numberOfTilesTotal=e.numberOfTilesTotal,t.numberOfFeaturesSelected=e.numberOfFeaturesSelected,t.numberOfFeaturesLoaded=e.numberOfFeaturesLoaded,t.numberOfPointsSelected=e.numberOfPointsSelected,t.numberOfPointsLoaded=e.numberOfPointsLoaded,t.numberOfTrianglesSelected=e.numberOfTrianglesSelected,t.numberOfTilesStyled=e.numberOfTilesStyled,t.numberOfFeaturesStyled=e.numberOfFeaturesStyled,t.numberOfTilesCulledWithChildrenUnion=e.numberOfTilesCulledWithChildrenUnion,t.geometryByteLength=e.geometryByteLength,t.texturesByteLength=e.texturesByteLength,t.texturesReferenceCounterById={...e.texturesReferenceCounterById},t.batchTableByteLength=e.batchTableByteLength};var _m=ES;function wF(){this._style=void 0,this._styleDirty=!1,this._lastStyleTime=0}Object.defineProperties(wF.prototype,{style:{get:function(){return this._style},set:function(e){e!==this._style&&(this._style=e,this._styleDirty=!0)}}});wF.prototype.makeDirty=function(){this._styleDirty=!0};wF.prototype.resetDirty=function(){this._styleDirty=!1};wF.prototype.applyStyle=function(e){if(!l(e.root)||l(this._style)&&!this._style._ready)return;let t=this._styleDirty;t&&++this._lastStyleTime;let n=this._lastStyleTime,i=e._statistics,o=t?e._selectedTiles:e._selectedTilesToStyle,r=o.length;for(let a=0;a<r;++a){let s=o[a];if(s.lastStyleTime!==n){let c=s.content;s.lastStyleTime=n,c.applyStyle(this._style),i.numberOfFeaturesStyled+=c.featuresLength,++i.numberOfTilesStyled}}};var IF=wF;function zat(e,t,n){let i=Ci(t,"3DTILES_implicit_tiling")?t.extensions["3DTILES_implicit_tiling"]:t.implicitTiling;this.baseResource=e,this.geometricError=t.geometricError,this.metadataSchema=n;let o=t.boundingVolume;if(!l(o.box)&&!l(o.region)&&!Ci(o,"3DTILES_bounding_volume_S2")&&!Ci(o,"3DTILES_bounding_volume_cylinder"))throw new re("Only box, region, 3DTILES_bounding_volume_S2, and 3DTILES_bounding_volume_cylinder are supported for implicit tiling");this.boundingVolume=o,this.refine=t.refine,this.subtreeUriTemplate=new De({url:i.subtrees.uri}),this.contentUriTemplates=[],this.contentHeaders=[];let r=Uat(t);for(let a=0;a<r.length;a++){let s=r[a];this.contentHeaders.push(We(s,!0));let c=new De({url:s.uri});this.contentUriTemplates.push(c)}this.contentCount=this.contentHeaders.length,this.tileHeader=Vat(t),this.subdivisionScheme=La[i.subdivisionScheme],this.branchingFactor=La.getBranchingFactor(this.subdivisionScheme),this.subtreeLevels=i.subtreeLevels,l(i.availableLevels)?this.availableLevels=i.availableLevels:this.availableLevels=i.maximumLevel+1}function Uat(e){if(Ci(e,"3DTILES_multiple_contents")){let t=e.extensions["3DTILES_multiple_contents"];return l(t.contents)?t.contents:t.content}return l(e.contents)?e.contents:l(e.content)?[e.content]:[]}function Vat(e){let t=We(e,!0);return l(t.extensions)&&(delete t.extensions["3DTILES_implicit_tiling"],delete t.extensions["3DTILES_multiple_contents"],Object.keys(t.extensions).length===0&&delete t.extensions),delete t.implicitTiling,delete t.contents,delete t.content,t}var Lp=zat;var DF={};function xAe(e){return e=(e^e<<8)&16711935,e=(e^e<<4)&252645135,e=(e^e<<2)&858993459,e=(e^e<<1)&1431655765,e}function n$(e){return e=(e^e<<16)&50331903,e=(e^e<<8)&50393103,e=(e^e<<4)&51130563,e=(e^e<<2)&153391689,e}function bAe(e){return e&=1431655765,e=(e^e>>1)&858993459,e=(e^e>>2)&252645135,e=(e^e>>4)&16711935,e=(e^e>>8)&65535,e}function i$(e){return e&=153391689,e=(e^e>>2)&51130563,e=(e^e>>4)&50393103,e=(e^e>>8)&4278190335,e=(e^e>>16)&1023,e}DF.encode2D=function(e,t){return(xAe(e)|xAe(t)<<1)>>>0};DF.decode2D=function(e,t){return l(t)||(t=new Array(2)),t[0]=bAe(e),t[1]=bAe(e>>1),t};DF.encode3D=function(e,t,n){return n$(e)|n$(t)<<1|n$(n)<<2};DF.decode3D=function(e,t){return l(t)||(t=new Array(3)),t[0]=i$(e),t[1]=i$(e>>1),t[2]=i$(e>>2),t};var iy=DF;function fr(e){this.subdivisionScheme=e.subdivisionScheme,this.subtreeLevels=e.subtreeLevels,this.level=e.level,this.x=e.x,this.y=e.y,this.z=void 0,e.subdivisionScheme===La.OCTREE&&(this.z=e.z)}Object.defineProperties(fr.prototype,{childIndex:{get:function(){let e=0;return e|=this.x&1,e|=(this.y&1)<<1,this.subdivisionScheme===La.OCTREE&&(e|=(this.z&1)<<2),e}},mortonIndex:{get:function(){return this.subdivisionScheme===La.OCTREE?iy.encode3D(this.x,this.y,this.z):iy.encode2D(this.x,this.y)}},tileIndex:{get:function(){let e=this.subdivisionScheme===La.OCTREE?((1<<3*this.level)-1)/7:((1<<2*this.level)-1)/3,t=this.mortonIndex;return e+t}}});fr.prototype.getDescendantCoordinates=function(e){let t=this.level+e.level,n=(this.x<<e.level)+e.x,i=(this.y<<e.level)+e.y;if(this.subdivisionScheme===La.OCTREE){let o=(this.z<<e.level)+e.z;return new fr({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:n,y:i,z:o})}return new fr({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:n,y:i})};fr.prototype.getAncestorCoordinates=function(e){let t=1<<e,n=this.level-e,i=Math.floor(this.x/t),o=Math.floor(this.y/t);if(this.subdivisionScheme===La.OCTREE){let r=Math.floor(this.z/t);return new fr({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:n,x:i,y:o,z:r})}return new fr({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:n,x:i,y:o})};fr.prototype.getOffsetCoordinates=function(e){let t=e.level-this.level,n=1<<t,i=e.x%n,o=e.y%n;if(this.subdivisionScheme===La.OCTREE){let r=e.z%n;return new fr({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:i,y:o,z:r})}return new fr({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:i,y:o})};fr.prototype.getChildCoordinates=function(e){let t=this.level+1,n=2*this.x+e%2,i=2*this.y+Math.floor(e/2)%2;if(this.subdivisionScheme===La.OCTREE){let o=2*this.z+Math.floor(e/4)%2;return new fr({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:n,y:i,z:o})}return new fr({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:n,y:i})};fr.prototype.getSubtreeCoordinates=function(){return this.getAncestorCoordinates(this.level%this.subtreeLevels)};fr.prototype.getParentSubtreeCoordinates=function(){return this.getAncestorCoordinates(this.level%this.subtreeLevels+this.subtreeLevels)};fr.prototype.isAncestor=function(e){let t=e.level-this.level;if(t<=0)return!1;let n=e.x>>t,i=e.y>>t,o=this.x===n,r=this.y===i;if(this.subdivisionScheme===La.OCTREE){let a=e.z>>t,s=this.z===a;return o&&r&&s}return o&&r};fr.prototype.isEqual=function(e){return this.subdivisionScheme===e.subdivisionScheme&&this.subtreeLevels===e.subtreeLevels&&this.level===e.level&&this.x===e.x&&this.y===e.y&&(this.subdivisionScheme===La.OCTREE?this.z===e.z:!0)};fr.prototype.isImplicitTilesetRoot=function(){return this.level===0};fr.prototype.isSubtreeRoot=function(){return this.level%this.subtreeLevels===0};fr.prototype.isBottomOfSubtree=function(){return this.level%this.subtreeLevels===this.subtreeLevels-1};fr.prototype.getTemplateValues=function(){let e={level:this.level,x:this.x,y:this.y};return this.subdivisionScheme===La.OCTREE&&(e.z=this.z),e};var CAe=[0,0,0];fr.fromMortonIndex=function(e,t,n,i){let o;return e===La.OCTREE?(o=iy.decode3D(i,CAe),new fr({subdivisionScheme:e,subtreeLevels:t,level:n,x:o[0],y:o[1],z:o[2]})):(o=iy.decode2D(i,CAe),new fr({subdivisionScheme:e,subtreeLevels:t,level:n,x:o[0],y:o[1]}))};fr.fromTileIndex=function(e,t,n){let i,o,r;return e===La.OCTREE?(i=Math.floor(D.log2(7*n+1)/3),o=((1<<3*i)-1)/7,r=n-o):(i=Math.floor(D.log2(3*n+1)/2),o=((1<<2*i)-1)/3,r=n-o),fr.fromMortonIndex(e,t,i,r)};var Np=fr;function Xg(){}Xg.selectTiles=function(e,t){_e.throwInstantiationError()};Xg.sortChildrenByDistanceToCamera=function(e,t){return t._distanceToCamera===0&&e._distanceToCamera===0?t._centerZDepth-e._centerZDepth:t._distanceToCamera-e._distanceToCamera};Xg.canTraverse=function(e){return e.children.length===0?!1:e.hasTilesetContent||e.hasImplicitContent?!e.contentExpired:e._screenSpaceError>e.tileset.memoryAdjustedScreenSpaceError};Xg.selectTile=function(e,t){if(e.contentVisibility(t)===qt.OUTSIDE)return;e._wasSelectedLastFrame=!0;let{content:n,tileset:i}=e;n.featurePropertiesDirty?(n.featurePropertiesDirty=!1,e.lastStyleTime=0,i._selectedTilesToStyle.push(e)):e._selectedFrame<t.frameNumber-1&&(i._selectedTilesToStyle.push(e),e._wasSelectedLastFrame=!1),e._selectedFrame=t.frameNumber,i._selectedTiles.push(e)};Xg.visitTile=function(e,t){++e.tileset._statistics.visited,e._visitedFrame=t.frameNumber};Xg.touchTile=function(e,t){e._touchedFrame!==t.frameNumber&&(e.tileset._cache.touch(e),e._touchedFrame=t.frameNumber)};Xg.loadTile=function(e,t){let{tileset:n}=e;if(e._requestedFrame===t.frameNumber||!e.hasUnloadedRenderableContent&&!e.contentExpired||!jat(e,t))return;let i=t.camera.timeSinceMoved<n.foveatedTimeDelay;e.priorityDeferred&&i||(e._requestedFrame=t.frameNumber,n._requestedTiles.push(e))};function jat(e,t){let{tileset:n}=e;if(!n._cullRequestsWhileMoving)return!0;let{positionWCDeltaMagnitude:i,positionWCDeltaMagnitudeLastFrame:o}=t.camera,r=i!==0?i:o,a=Math.max(e.boundingSphere.radius*2,1);return n.cullRequestsWhileMovingMultiplier*r/a<1}Xg.updateTile=function(e,t){TAe(e,t),e.updateExpiration(),e._wasMinPriorityChild=!1,e._priorityHolder=e,Wat(e),e._shouldSelect=!1,e._finalResolution=!0};function TAe(e,t){if(e.updateVisibility(t),!e.isVisible)return;let n=e.children.length>0;if((e.hasTilesetContent||e.hasImplicitContent)&&n){let r=e.children[0];TAe(r,t),e._visible=r._visible;return}if(Gat(e,t)){e._visible=!1;return}let i=e.refine===ar.REPLACE,o=e._optimChildrenWithinParent===Gd.USE_OPTIMIZATION;if(i&&o&&n&&!Hat(e,t)){++e.tileset._statistics.numberOfTilesCulledWithChildrenUnion,e._visible=!1;return}}function Gat(e,t){let{parent:n,tileset:i}=e;return!l(n)||n.hasTilesetContent||n.hasImplicitContent||n.refine!==ar.ADD?!1:e.getScreenSpaceError(t,!0)<=i.memoryAdjustedScreenSpaceError}function Hat(e,t){let n=!1,i=e.children;for(let o=0;o<i.length;++o){let r=i[o];r.updateVisibility(t),n=n||r.isVisible}return n}function Wat(e){let t=e.tileset._minimumPriority,n=e.tileset._maximumPriority,i=e._priorityHolder;n.distance=Math.max(i._distanceToCamera,n.distance),t.distance=Math.min(i._distanceToCamera,t.distance),n.depth=Math.max(e._depth,n.depth),t.depth=Math.min(e._depth,t.depth),n.foveatedFactor=Math.max(i._foveatedFactor,n.foveatedFactor),t.foveatedFactor=Math.min(i._foveatedFactor,t.foveatedFactor),n.reverseScreenSpaceError=Math.max(e._priorityReverseScreenSpaceError,n.reverseScreenSpaceError),t.reverseScreenSpaceError=Math.min(e._priorityReverseScreenSpaceError,t.reverseScreenSpaceError)}var Us=Xg;function EAe(){}var PF={stack:new ql,stackMaximumLength:0};EAe.selectTiles=function(e,t){e._selectedTiles.length=0,e._requestedTiles.length=0,e.hasMixedContent=!1;let n=!0,i=e.root;if(i.updateVisibility(t),!i.isVisible)return n;let{touchTile:o,visitTile:r}=Us,a=PF.stack;for(a.push(i);a.length>0;){PF.stackMaximumLength=Math.max(PF.stackMaximumLength,a.length);let s=a.pop(),c=s.refine===ar.ADD,u=s.refine===ar.REPLACE,f=qat(s);f&&Yat(s,a,t),(c||u&&!f)&&(Xat(e,s),o(s,t),Kat(s,t),s.hasRenderableContent&&!s.contentAvailable&&(n=!1)),r(s,t)}return PF.stack.trim(PF.stackMaximumLength),n};function qat(e){return e.children.length===0?!1:e.hasTilesetContent||e.hasImplicitContent?!e.contentExpired:(e.hasEmptyContent,!0)}function Yat(e,t,n){let{children:i}=e;for(let o=0;o<i.length;++o){let r=i[o];r.updateVisibility(n),r.isVisible&&t.push(r)}}function Xat(e,t){(t.hasUnloadedRenderableContent||t.contentExpired)&&(t._priority=0,e._requestedTiles.push(t))}function Kat(e,t){e.contentAvailable&&e.contentVisibility(t)!==qt.OUTSIDE&&e.tileset._selectedTiles.push(e)}var RF=EAe;function vAe(){}var OF={stack:new ql,stackMaximumLength:0},MF={stack:new ql,stackMaximumLength:0};vAe.selectTiles=function(e,t){if(e._requestedTiles.length=0,e.debugFreezeFrame)return;e._selectedTiles.length=0,e._selectedTilesToStyle.length=0,e._emptyTiles.length=0,e.hasMixedContent=!1;let n=e.root;if(Us.updateTile(n,t),!n.isVisible||n.getScreenSpaceError(t,!0)<=e.memoryAdjustedScreenSpaceError)return;$at(n,t),OF.stack.trim(OF.stackMaximumLength),MF.stack.trim(MF.stackMaximumLength);let i=e._requestedTiles;for(let o=0;o<i.length;++o)i[o].updatePriority()};function o$(e,t){e.contentAvailable&&Us.selectTile(e,t)}function Qat(e,t,n){let i=e.refine===ar.REPLACE,{tileset:o,children:r}=e,{updateTile:a,loadTile:s,touchTile:c}=Us;for(let m=0;m<r.length;++m)a(r[m],n);r.sort(Us.sortChildrenByDistanceToCamera);let u=i&&e.hasRenderableContent,f=!0,d=!1,p=-1,g=Number.MAX_VALUE;for(let m=0;m<r.length;++m){let A=r[m];if(A.isVisible?(t.push(A),A._foveatedFactor<g&&(p=m,g=A._foveatedFactor),d=!0):(u||o.loadSiblings)&&(A._foveatedFactor<g&&(p=m,g=A._foveatedFactor),s(A,n),c(A,n)),u){let y;A._inRequestVolume?A.hasRenderableContent?y=A.contentAvailable:y=Jat(A,n):y=!1,f=f&&y}}if(d||(f=!1),p!==-1&&i){let m=r[p];m._wasMinPriorityChild=!0;let A=(e._wasMinPriorityChild||e===o.root)&&g<=e._priorityHolder._foveatedFactor?e._priorityHolder:e;A._foveatedFactor=Math.min(m._foveatedFactor,A._foveatedFactor),A._distanceToCamera=Math.min(m._distanceToCamera,A._distanceToCamera);for(let y=0;y<r.length;++y)r[y]._priorityHolder=A}return f}function $at(e,t){let{tileset:n}=e,{canTraverse:i,loadTile:o,visitTile:r,touchTile:a}=Us,s=OF.stack;for(s.push(e);s.length>0;){OF.stackMaximumLength=Math.max(OF.stackMaximumLength,s.length);let c=s.pop(),u=c.parent,f=!l(u)||u._refines;c._refines=i(c)?Qat(c,s,t)&&f:!1;let d=!c._refines&&f;c.hasRenderableContent?c.refine===ar.ADD?(o$(c,t),o(c,t)):c.refine===ar.REPLACE&&(o(c,t),d&&o$(c,t)):(n._emptyTiles.push(c),o(c,t),d&&o$(c,t)),r(c,t),a(c,t)}}function Jat(e,t){let{canTraverse:n,updateTile:i,loadTile:o,touchTile:r}=Us,a=!0,s=MF.stack;for(s.push(e);s.length>0;){MF.stackMaximumLength=Math.max(MF.stackMaximumLength,s.length);let c=s.pop(),u=c.children,f=u.length,d=!c.hasRenderableContent&&n(c);if(!d&&!c.contentAvailable&&(a=!1),i(c,t),c.isVisible||(o(c,t),r(c,t)),d)for(let p=0;p<f;++p){let g=u[p];s.push(g)}}return e.hasEmptyContent||a}var BF=vAe;function SAe(){}var LF={stack:new ql,stackMaximumLength:0},NF={stack:new ql,stackMaximumLength:0},Kg={stack:new ql,stackMaximumLength:0,ancestorStack:new ql,ancestorStackMaximumLength:0},Zat=2;SAe.selectTiles=function(e,t){if(e._requestedTiles.length=0,e.debugFreezeFrame)return;e._selectedTiles.length=0,e._selectedTilesToStyle.length=0,e._emptyTiles.length=0,e.hasMixedContent=!1;let n=e.root;if(Us.updateTile(n,t),!n.isVisible||n.getScreenSpaceError(t,!0)<=e.memoryAdjustedScreenSpaceError)return;rst(n,t),ast(n,t),LF.stack.trim(LF.stackMaximumLength),NF.stack.trim(NF.stackMaximumLength),Kg.stack.trim(Kg.stackMaximumLength),Kg.ancestorStack.trim(Kg.ancestorStackMaximumLength);let i=e._requestedTiles;for(let o=0;o<i.length;++o)i[o].updatePriority()};function est(e,t){let{updateTile:n,touchTile:i,selectTile:o}=Us,r=NF.stack;for(r.push(e);r.length>0;){NF.stackMaximumLength=Math.max(NF.stackMaximumLength,r.length);let s=r.pop().children;for(let c=0;c<s.length;++c){let u=s[c];u.isVisible&&(u.contentAvailable?(n(u,t),i(u,t),o(u,t)):u._depth-e._depth<Zat&&r.push(u))}}}function _G(e,t){let n=e.contentAvailable?e:e._ancestorWithContentAvailable;l(n)?n._shouldSelect=!0:est(e,t)}function tst(e,t){e._ancestorWithContent=void 0,e._ancestorWithContentAvailable=void 0;let{parent:n}=e;if(!l(n))return;let i=!n.hasUnloadedRenderableContent||n._requestedFrame===t.frameNumber;e._ancestorWithContent=i?n:n._ancestorWithContent,e._ancestorWithContentAvailable=n.contentAvailable?n:n._ancestorWithContentAvailable}function nst(e,t){let n=t._ancestorWithContent;return!e.immediatelyLoadDesiredLevelOfDetail&&(t._priorityProgressiveResolutionScreenSpaceErrorLeaf||l(n)&&t._screenSpaceError<n._screenSpaceError/e.skipScreenSpaceErrorFactor&&t._depth>n._depth+e.skipLevels)}function ist(e,t,n){let{tileset:i,children:o}=e,{updateTile:r,loadTile:a,touchTile:s}=Us;for(let u=0;u<o.length;++u)r(o[u],n);o.sort(Us.sortChildrenByDistanceToCamera);let c=!1;for(let u=0;u<o.length;++u){let f=o[u];f.isVisible?(t.push(f),c=!0):i.loadSiblings&&(a(f,n),s(f,n))}return c}function ost(e,t){let{tileset:n}=e;return n.immediatelyLoadDesiredLevelOfDetail?!1:l(e._ancestorWithContent)?e._screenSpaceError===0?e.parent._screenSpaceError>t:e._screenSpaceError>t:!0}function rst(e,t){let{tileset:n}=e,i=n.immediatelyLoadDesiredLevelOfDetail?Number.MAX_VALUE:Math.max(n.baseScreenSpaceError,n.memoryAdjustedScreenSpaceError),{canTraverse:o,loadTile:r,visitTile:a,touchTile:s}=Us,c=LF.stack;for(c.push(e);c.length>0;){LF.stackMaximumLength=Math.max(LF.stackMaximumLength,c.length);let u=c.pop();tst(u,t);let f=u.parent,d=!l(f)||f._refines;u._refines=o(u)?ist(u,c,t)&&d:!1;let p=!u._refines&&d;u.hasRenderableContent?u.refine===ar.ADD?(_G(u,t),r(u,t)):u.refine===ar.REPLACE&&(ost(u,i)?(r(u,t),p&&_G(u,t)):p?(_G(u,t),r(u,t)):nst(n,u)&&r(u,t)):(n._emptyTiles.push(u),r(u,t),p&&_G(u,t)),a(u,t),s(u,t)}}function ast(e,t){let{selectTile:n,canTraverse:i}=Us,{stack:o,ancestorStack:r}=Kg,a;for(o.push(e);o.length>0||r.length>0;){if(Kg.stackMaximumLength=Math.max(Kg.stackMaximumLength,o.length),Kg.ancestorStackMaximumLength=Math.max(Kg.ancestorStackMaximumLength,r.length),r.length>0){let u=r.peek();if(u._stackLength===o.length){r.pop(),u!==a&&(u._finalResolution=!1),n(u,t);continue}}let s=o.pop();if(!l(s))continue;let c=i(s);if(s._shouldSelect)if(s.refine===ar.ADD)n(s,t);else{if(s._selectionDepth=r.length,s._selectionDepth>0&&(s.tileset.hasMixedContent=!0),a=s,!c){n(s,t);continue}r.push(s),s._stackLength=o.length}if(c){let u=s.children;for(let f=0;f<u.length;++f){let d=u[f];d.isVisible&&o.push(d)}}}}var FF=SAe;function bs(){this._layers=[],this.layerAdded=new ye,this.layerRemoved=new ye,this.layerMoved=new ye,this.layerShownOrHidden=new ye}Object.defineProperties(bs.prototype,{length:{get:function(){return this._layers.length}}});bs.prototype.add=function(e,t){l(t)?this._layers.splice(t,0,e):(t=this._layers.length,this._layers.push(e)),this._update(),this.layerAdded.raiseEvent(e,t);let i=e.readyEvent.addEventListener(()=>{this.layerShownOrHidden.raiseEvent(e,e._layerIndex,e.show),i()})};bs.prototype.addImageryProvider=function(e,t){let n=new ya(e);return this.add(n,t),n};bs.prototype.remove=function(e,t){t=t??!0;let n=this._layers.indexOf(e);return n!==-1?(this._layers.splice(n,1),this._update(),this.layerRemoved.raiseEvent(e,n),t&&e.destroy(),!0):!1};bs.prototype.removeAll=function(e){e=e??!0;let t=this._layers;for(let n=0,i=t.length;n<i;n++){let o=t[n];this.layerRemoved.raiseEvent(o,n),e&&o.destroy()}this._layers=[]};bs.prototype.contains=function(e){return this.indexOf(e)!==-1};bs.prototype.indexOf=function(e){return this._layers.indexOf(e)};bs.prototype.get=function(e){return this._layers[e]};function AG(e,t){return e.indexOf(t)}function wAe(e,t,n){let i=e._layers;if(t=D.clamp(t,0,i.length-1),n=D.clamp(n,0,i.length-1),t===n)return;let o=i[t];i[t]=i[n],i[n]=o,e._update(),e.layerMoved.raiseEvent(o,n,t)}bs.prototype.raise=function(e){let t=AG(this._layers,e);wAe(this,t,t+1)};bs.prototype.lower=function(e){let t=AG(this._layers,e);wAe(this,t,t-1)};bs.prototype.raiseToTop=function(e){let t=AG(this._layers,e);t!==this._layers.length-1&&(this._layers.splice(t,1),this._layers.push(e),this._update(),this.layerMoved.raiseEvent(e,this._layers.length-1,t))};bs.prototype.lowerToBottom=function(e){let t=AG(this._layers,e);t!==0&&(this._layers.splice(t,1),this._layers.splice(0,0,e),this._update(),this.layerMoved.raiseEvent(e,0,t))};var sst=new oe;function IAe(e,t,n,i){let o=e.globe._surface._tilesToRender,r;for(let s=0;!l(r)&&s<o.length;++s){let c=o[s];oe.contains(c.rectangle,t)&&(r=c)}if(!l(r))return;let a=r.data.imagery;for(let s=a.length-1;s>=0;--s){let c=a[s],u=c.readyImagery;if(!l(u)||!u.imageryLayer.ready)continue;let f=u.imageryLayer.imageryProvider;if(n&&!l(f.pickFeatures)||!oe.contains(u.rectangle,t))continue;let d=sst,p=1/1024;d.west=D.lerp(r.rectangle.west,r.rectangle.east,c.textureCoordinateRectangle.x-p),d.east=D.lerp(r.rectangle.west,r.rectangle.east,c.textureCoordinateRectangle.z+p),d.south=D.lerp(r.rectangle.south,r.rectangle.north,c.textureCoordinateRectangle.y-p),d.north=D.lerp(r.rectangle.south,r.rectangle.north,c.textureCoordinateRectangle.w+p),oe.contains(d,t)&&i(u)}}bs.prototype.pickImageryLayers=function(e,t){let n=t.globe.pick(e,t);if(!l(n))return;let i=t.ellipsoid.cartesianToCartographic(n),o=[];if(IAe(t,i,!1,function(r){o.push(r.imageryLayer)}),o.length!==0)return o};bs.prototype.pickImageryLayerFeatures=function(e,t){let n=t.globe.pick(e,t);if(!l(n))return;let i=t.ellipsoid.cartesianToCartographic(n),o=[],r=[];if(IAe(t,i,!0,function(a){if(!a.imageryLayer.ready)return;let c=a.imageryLayer.imageryProvider.pickFeatures(a.x,a.y,a.level,i.longitude,i.latitude);l(c)&&(o.push(c),r.push(a.imageryLayer))}),o.length!==0)return Promise.all(o).then(function(a){let s=[];for(let c=0;c<a.length;++c){let u=a[c],f=r[c];if(l(u)&&u.length>0)for(let d=0;d<u.length;++d){let p=u[d];p.imageryLayer=f,l(p.position)||(p.position=i),s.push(p)}}return s})};bs.prototype.queueReprojectionCommands=function(e){let t=this._layers;for(let n=0,i=t.length;n<i;++n)t[n].queueReprojectionCommands(e)};bs.prototype.cancelReprojections=function(){let e=this._layers;for(let t=0,n=e.length;t<n;++t)e[t].cancelReprojections()};bs.prototype.isDestroyed=function(){return!1};bs.prototype.destroy=function(){return this.removeAll(!0),fe(this)};bs.prototype._update=function(){let e=!0,t=this._layers,n,i,o,r;for(o=0,r=t.length;o<r;++o)i=t[o],i._layerIndex=o,i.show?(i._isBaseLayer=e,e=!1):i._isBaseLayer=!1,i.show!==i._show&&(l(i._show)&&(l(n)||(n=[]),n.push(i)),i._show=i.show);if(l(n))for(o=0,r=n.length;o<r;++o)i=n[o],this.layerShownOrHidden.raiseEvent(i,i._layerIndex,i.show)};var pC=bs;function nr(e){e=e??G.EMPTY_OBJECT,this._url=void 0,this._basePath=void 0,this._root=void 0,this._resource=void 0,this._asset=void 0,this._properties=void 0,this._geometricError=void 0,this._scaledGeometricError=void 0,this._extensionsUsed=void 0,this._extensions=void 0,this._modelUpAxis=void 0,this._modelForwardAxis=void 0,this._cache=new vF,this._processingQueue=[],this._selectedTiles=[],this._emptyTiles=[],this._requestedTiles=[],this._selectedTilesToStyle=[],this._loadTimestamp=void 0,this._timeSinceLoad=0,this._updatedVisibilityFrame=0,this._updatedModelMatrixFrame=0,this._modelMatrixChanged=!1,this._previousModelMatrix=void 0,this._extras=void 0,this._credits=void 0,this._showCreditsOnScreen=e.showCreditsOnScreen??!1,this._cullWithChildrenBounds=e.cullWithChildrenBounds??!0,this._allTilesAdditive=!0,this._hasMixedContent=!1,this._stencilClearCommand=void 0,this._backfaceCommands=new ql,this._maximumScreenSpaceError=e.maximumScreenSpaceError??16,this._memoryAdjustedScreenSpaceError=this._maximumScreenSpaceError,this._cacheBytes=e.cacheBytes??512*1024*1024;let t=e.maximumCacheOverflowBytes??512*1024*1024;this._maximumCacheOverflowBytes=t,this._styleEngine=new IF,this._styleApplied=!1,this._modelMatrix=l(e.modelMatrix)?M.clone(e.modelMatrix):M.clone(M.IDENTITY),this._addHeightCallbacks=[],this._statistics=new _m,this._statisticsLast=new _m,this._statisticsPerPass=new Array(tr.NUMBER_OF_PASSES);for(let o=0;o<tr.NUMBER_OF_PASSES;++o)this._statisticsPerPass[o]=new _m;this._requestedTilesInFlight=[],this._maximumPriority={foveatedFactor:-Number.MAX_VALUE,depth:-Number.MAX_VALUE,distance:-Number.MAX_VALUE,reverseScreenSpaceError:-Number.MAX_VALUE},this._minimumPriority={foveatedFactor:Number.MAX_VALUE,depth:Number.MAX_VALUE,distance:Number.MAX_VALUE,reverseScreenSpaceError:Number.MAX_VALUE},this._heatmap=new SF(e.debugHeatmapTilePropertyName),this.cullRequestsWhileMoving=e.cullRequestsWhileMoving??!0,this._cullRequestsWhileMoving=!1,this.cullRequestsWhileMovingMultiplier=e.cullRequestsWhileMovingMultiplier??60,this.progressiveResolutionHeightFraction=D.clamp(e.progressiveResolutionHeightFraction??.3,0,.5),this.preferLeaves=e.preferLeaves??!1,this._tilesLoaded=!1,this._initialTilesLoaded=!1,this._tileDebugLabels=void 0,this._classificationType=e.classificationType,this._heightReference=e.heightReference,this._scene=e.scene,this._ellipsoid=e.ellipsoid??te.WGS84,this._initialClippingPlanesOriginMatrix=M.IDENTITY,this._clippingPlanesOriginMatrix=void 0,this._clippingPlanesOriginMatrixDirty=!0,this._vectorClassificationOnly=e.vectorClassificationOnly??!1,this._vectorKeepDecodedPositions=e.vectorKeepDecodedPositions??!1,this._imageryLayers=new pC(this),this._imageryLayersModificationCounter=0,this._imageryLayersListener=()=>{this._imageryLayersModificationCounter++},this.imageryLayers.layerAdded.addEventListener(this._imageryLayersListener),this.imageryLayers.layerRemoved.addEventListener(this._imageryLayersListener),this.imageryLayers.layerMoved.addEventListener(this._imageryLayersListener),this.imageryLayers.layerShownOrHidden.addEventListener(this._imageryLayersListener),this._asynchronouslyLoadImagery=e.asynchronouslyLoadImagery??!1,this.preloadWhenHidden=e.preloadWhenHidden??!1,this.preloadFlightDestinations=e.preloadFlightDestinations??!0,this._pass=void 0,this.dynamicScreenSpaceError=e.dynamicScreenSpaceError??!0,this.foveatedScreenSpaceError=e.foveatedScreenSpaceError??!0,this._foveatedConeSize=e.foveatedConeSize??.1,this._foveatedMinimumScreenSpaceErrorRelaxation=e.foveatedMinimumScreenSpaceErrorRelaxation??0,this.foveatedInterpolationCallback=e.foveatedInterpolationCallback??D.lerp,this.foveatedTimeDelay=e.foveatedTimeDelay??.2,this.dynamicScreenSpaceErrorDensity=e.dynamicScreenSpaceErrorDensity??2e-4,this.dynamicScreenSpaceErrorFactor=e.dynamicScreenSpaceErrorFactor??24,this.dynamicScreenSpaceErrorHeightFalloff=e.dynamicScreenSpaceErrorHeightFalloff??.25,this._dynamicScreenSpaceErrorComputedDensity=0,this.shadows=e.shadows??vn.ENABLED,this.show=e.show??!0,this.colorBlendMode=Iu.HIGHLIGHT,this.colorBlendAmount=.5,this._pointCloudShading=new Ep(e.pointCloudShading),this._pointCloudEyeDomeLighting=new Ag,this.loadProgress=new ye,this.allTilesLoaded=new ye,this.initialTilesLoaded=new ye,this.tileLoad=new ye,this.tileUnload=new ye,this.tileFailed=new ye,this.tileVisible=new ye,this.skipLevelOfDetail=e.skipLevelOfDetail??!1,this._disableSkipLevelOfDetail=!1,this._runtimeContentCodec=void 0,this.baseScreenSpaceError=e.baseScreenSpaceError??1024,this.skipScreenSpaceErrorFactor=e.skipScreenSpaceErrorFactor??16,this.skipLevels=e.skipLevels??1,this.immediatelyLoadDesiredLevelOfDetail=e.immediatelyLoadDesiredLevelOfDetail??!1,this.loadSiblings=e.loadSiblings??!1,this._clippingPlanes=void 0,l(e.clippingPlanes)&&ma.setOwner(e.clippingPlanes,this,"_clippingPlanes"),this._clippingPolygons=void 0,l(e.clippingPolygons)&&Qh.setOwner(e.clippingPolygons,this,"_clippingPolygons"),l(e.imageBasedLighting)?(this._imageBasedLighting=e.imageBasedLighting,this._shouldDestroyImageBasedLighting=!1):(this._imageBasedLighting=new nb,this._shouldDestroyImageBasedLighting=!0),this._environmentMapManager=new pg(e.environmentMapOptions),this.lightColor=e.lightColor,this.backFaceCulling=e.backFaceCulling??!0,this._enableShowOutline=e.enableShowOutline??!0,this.showOutline=e.showOutline??!0,this.outlineColor=e.outlineColor??V.BLACK,this.splitDirection=e.splitDirection??Or.NONE,this.enableCollision=e.enableCollision??!1,this._projectTo2D=e.projectTo2D??!1,this._enablePick=e.enablePick??!1,this.debugFreezeFrame=e.debugFreezeFrame??!1,this.debugColorizeTiles=e.debugColorizeTiles??!1,this._enableDebugWireframe=e.enableDebugWireframe??!1,this.debugWireframe=e.debugWireframe??!1,this.debugWireframe===!0&&this._enableDebugWireframe===!1&&_t("tileset-debug-wireframe-ignored","enableDebugWireframe must be set to true in the Cesium3DTileset constructor, otherwise debugWireframe will be ignored."),this.edgeDisplayMode=e.edgeDisplayMode??Md.SURFACES_ONLY,this.debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this.debugShowContentBoundingVolume=e.debugShowContentBoundingVolume??!1,this.debugShowViewerRequestVolume=e.debugShowViewerRequestVolume??!1,this._tileDebugLabels=void 0,this.debugPickedTileLabelOnly=!1,this.debugPickedTile=void 0,this.debugPickPosition=void 0,this.debugShowGeometricError=e.debugShowGeometricError??!1,this.debugShowRenderingStatistics=e.debugShowRenderingStatistics??!1,this.debugShowMemoryUsage=e.debugShowMemoryUsage??!1,this.debugShowUrl=e.debugShowUrl??!1,this.examineVectorLinesFunction=void 0,this._metadataExtension=void 0,this._customShader=e.customShader;let n=e.featureIdLabel??"featureId_0";typeof n=="number"&&(n=`featureId_${n}`),this._featureIdLabel=n;let i=e.instanceFeatureIdLabel??"instanceFeatureId_0";typeof i=="number"&&(i=`instanceFeatureId_${i}`),this._instanceFeatureIdLabel=i}Object.defineProperties(nr.prototype,{isCesium3DTileset:{get:function(){return!0}},asset:{get:function(){return this._asset}},extensions:{get:function(){return this._extensions}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){ma.setOwner(e,this,"_clippingPlanes")}},clippingPolygons:{get:function(){return this._clippingPolygons},set:function(e){Qh.setOwner(e,this,"_clippingPolygons")}},imageryLayers:{get:function(){return this._imageryLayers}},imageryLayersModificationCounter:{get:function(){return this._imageryLayersModificationCounter}},asynchronouslyLoadImagery:{get:function(){return this._asynchronouslyLoadImagery}},properties:{get:function(){return this._properties}},tilesLoaded:{get:function(){return this._tilesLoaded}},resource:{get:function(){return this._resource}},basePath:{get:function(){return Ms("Cesium3DTileset.basePath","Cesium3DTileset.basePath has been deprecated. All tiles are relative to the url of the tileset JSON file that contains them. Use the url property instead."),this._basePath}},style:{get:function(){return this._styleEngine.style},set:function(e){this._styleEngine.style=e}},customShader:{get:function(){return this._customShader},set:function(e){this._customShader=e}},hasMixedContent:{get:function(){return this._hasMixedContent},set:function(e){this._hasMixedContent=e}},isSkippingLevelOfDetail:{get:function(){return this.skipLevelOfDetail&&!l(this._classificationType)&&!this._disableSkipLevelOfDetail&&!this._allTilesAdditive}},metadataExtension:{get:function(){return this._metadataExtension}},metadata:{get:function(){if(l(this._metadataExtension))return this._metadataExtension.tileset}},schema:{get:function(){if(l(this._metadataExtension))return this._metadataExtension.schema}},maximumScreenSpaceError:{get:function(){return this._maximumScreenSpaceError},set:function(e){this._maximumScreenSpaceError=e,this._memoryAdjustedScreenSpaceError=e}},cacheBytes:{get:function(){return this._cacheBytes},set:function(e){this._cacheBytes=e}},maximumCacheOverflowBytes:{get:function(){return this._maximumCacheOverflowBytes},set:function(e){this._maximumCacheOverflowBytes=e}},memoryAdjustedScreenSpaceError:{get:function(){return this._memoryAdjustedScreenSpaceError}},pointCloudShading:{get:function(){return this._pointCloudShading},set:function(e){this._pointCloudShading=e}},root:{get:function(){return this._root}},boundingSphere:{get:function(){return this._root.updateTransform(this._modelMatrix),this._root.boundingSphere}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix=M.clone(e,this._modelMatrix)}},timeSinceLoad:{get:function(){return this._timeSinceLoad}},totalMemoryUsageInBytes:{get:function(){let e=this._statistics;return e.texturesByteLength+e.geometryByteLength+e.batchTableByteLength}},clippingPlanesOriginMatrix:{get:function(){return l(this._clippingPlanesOriginMatrix)?(this._clippingPlanesOriginMatrixDirty&&(M.multiply(this.root.computedTransform,this._initialClippingPlanesOriginMatrix,this._clippingPlanesOriginMatrix),this._clippingPlanesOriginMatrixDirty=!1),this._clippingPlanesOriginMatrix):M.IDENTITY}},styleEngine:{get:function(){return this._styleEngine}},statistics:{get:function(){return this._statistics}},classificationType:{get:function(){return this._classificationType}},heightReference:{get:function(){return this._heightReference}},scene:{get:function(){return this._scene}},ellipsoid:{get:function(){return this._ellipsoid}},foveatedConeSize:{get:function(){return this._foveatedConeSize},set:function(e){this._foveatedConeSize=e}},foveatedMinimumScreenSpaceErrorRelaxation:{get:function(){return this._foveatedMinimumScreenSpaceErrorRelaxation},set:function(e){this._foveatedMinimumScreenSpaceErrorRelaxation=e}},extras:{get:function(){return this._extras}},imageBasedLighting:{get:function(){return this._imageBasedLighting},set:function(e){e!==this._imageBasedLighting&&(this._shouldDestroyImageBasedLighting&&!this._imageBasedLighting.isDestroyed()&&this._imageBasedLighting.destroy(),this._imageBasedLighting=e,this._shouldDestroyImageBasedLighting=!1)}},environmentMapManager:{get:function(){return this._environmentMapManager}},vectorClassificationOnly:{get:function(){return this._vectorClassificationOnly}},vectorKeepDecodedPositions:{get:function(){return this._vectorKeepDecodedPositions}},showCreditsOnScreen:{get:function(){return this._showCreditsOnScreen},set:function(e){this._showCreditsOnScreen=e,NAe(this)}},featureIdLabel:{get:function(){return this._featureIdLabel},set:function(e){typeof e=="number"&&(e=`featureId_${e}`),this._featureIdLabel=e}},instanceFeatureIdLabel:{get:function(){return this._instanceFeatureIdLabel},set:function(e){typeof e=="number"&&(e=`instanceFeatureId_${e}`),this._instanceFeatureIdLabel=e}}});nr.fromIonAssetId=async function(e,t){let n=await ha.fromAssetId(e);return nr.fromUrl(n,t)};nr.fromUrl=async function(e,t){t=t??G.EMPTY_OBJECT;let n=De.createIfNeeded(e),i;n.extension==="json"?i=n.getBaseUri(!0):n.isDataUri&&(i="");let o=await nr.loadJson(n),r=await cst(n,o),a=new nr(t);a._resource=n,a._url=n.url,a._basePath=i,a._metadataExtension=r,a._geometricError=o.geometricError,a._scaledGeometricError=o.geometricError;let s=o.asset;a._asset=s,a._extras=o.extras,NAe(a);let c=l(o.asset.gltfUpAxis)?Li.fromName(o.asset.gltfUpAxis):Li.Y,u=t.modelUpAxis??c,f=t.modelForwardAxis??Li.X;a._properties=o.properties,a._extensionsUsed=o.extensionsUsed,a._extensions=o.extensions,a._modelUpAxis=u,a._modelForwardAxis=f,a._root=a.loadTileset(n,o);let p=a._root.createBoundingVolume(o.root.boundingVolume,M.IDENTITY).boundingSphere.center,g=a._ellipsoid.cartesianToCartographic(p);return l(g)&&g.height>vi._defaultMinTerrainHeight&&(a._initialClippingPlanesOriginMatrix=pt.eastNorthUpToFixedFrame(p)),a._clippingPlanesOriginMatrix=M.clone(a._initialClippingPlanesOriginMatrix),a};nr.loadJson=function(e){return De.createIfNeeded(e).fetchJson()};nr.prototype.makeStyleDirty=function(){this._styleEngine.makeDirty()};nr.prototype.loadTileset=function(e,t,n){let i=t.asset;if(!l(i))throw new re("Tileset must have an asset property.");if(i.version!=="0.0"&&i.version!=="1.0"&&i.version!=="1.1")throw new re("The tileset must be 3D Tiles version 0.0, 1.0, or 1.1");l(t.extensionsRequired)&&nr.checkSupportedExtensions(t.extensionsRequired);let o=this._statistics,r=i.tilesetVersion;l(r)&&(this._basePath+=`?v=${r}`,e=e.clone(),e.setQueryParameters({v:r}));let a=DAe(this,e,t.root,n);l(n)&&(n.children.push(a),a._depth=n._depth+1);let s=[];for(s.push(a);s.length>0;){let c=s.pop();++o.numberOfTilesTotal,this._allTilesAdditive=this._allTilesAdditive&&c.refine===ar.ADD;let u=c._header.children;if(l(u))for(let f=0;f<u.length;++f){let d=u[f],p=DAe(this,e,d,c);c.children.push(p),p._depth=c._depth+1,s.push(p)}this._cullWithChildrenBounds&&CF.checkChildrenWithinParent(c)}return a};function DAe(e,t,n,i){if(!(l(n.implicitTiling)||Ci(n,"3DTILES_implicit_tiling")))return new Yd(e,t,n,i);let r=e.schema,a=new Lp(t,n,r),s=new Np({subdivisionScheme:a.subdivisionScheme,subtreeLevels:a.subtreeLevels,level:0,x:0,y:0,z:0}),c=a.subtreeUriTemplate.getDerivedResource({templateValues:s.getTemplateValues()}).url,f=We(n,!0);f.contents=[{uri:c}],delete f.content,delete f.extensions;let d=new Yd(e,t,f,i);return d.implicitTileset=a,d.implicitCoordinates=s,d}async function cst(e,t){let n=Ci(t,"3DTILES_metadata")?t.extensions["3DTILES_metadata"]:t,i;if(l(n.schemaUri))e=e.getDerivedResource({url:n.schemaUri}),i=Ii.getSchemaLoader({resource:e});else if(l(n.schema))i=Ii.getSchemaLoader({schema:n.schema});else return;await i.load();let o=new hC({schema:i.schema,metadataJson:n});return Ii.unload(i),o}var PAe=new h,lst=new de,ust=new M,fst=new h,dst=new h,hst=new h,mst=new h;function pst(e,t){let n,i,o,r,a,s=t.camera,c=e._root,u=c.contentBoundingVolume;if(u instanceof Rf)n=h.normalize(s.positionWC,PAe),i=s.directionWC,o=s.positionCartographic.height,r=u.minimumHeight,a=u.maximumHeight;else{let A=M.inverseTransformation(c.computedTransform,ust),y=t.mapProjection.ellipsoid,x=u.boundingVolume,b=M.multiplyByPoint(A,x.center,fst);if(h.magnitude(b)>y.minimumRadius){let C=de.fromCartesian(b,y,lst);n=h.normalize(s.positionWC,PAe),i=s.directionWC,o=s.positionCartographic.height,r=0,a=C.height*2}else{let C=M.multiplyByPoint(A,s.positionWC,dst);if(n=h.UNIT_Z,i=M.multiplyByPointAsVector(A,s.directionWC,hst),i=h.normalize(i,i),o=C.z,u instanceof Vu){let E=$.getColumn(x.halfAxes,2,mst),S=h.magnitude(E);r=b.z-S,a=b.z+S}else if(u instanceof Wg){let E=x.radius;r=b.z-E,a=b.z+E}}}let f=e.dynamicScreenSpaceErrorHeightFalloff,d=r+(a-r)*f,p=a,g=D.clamp((o-d)/(p-d),0,1),m=1-Math.abs(h.dot(i,n));m=m*(1-g),e._dynamicScreenSpaceErrorComputedDensity=e.dynamicScreenSpaceErrorDensity*m}function gst(e,t){if(t.hasEmptyContent)return;let{statistics:n}=e,i=t.contentExpired,o=t.requestContent();l(o)&&(o.then(r=>{!l(r)||t.isDestroyed()||e.isDestroyed()||(e._processingQueue.push(t),++n.numberOfTilesProcessing)}).catch(r=>{MAe(r,e,t)}),i&&(t.hasTilesetContent||t.hasImplicitContent?Pst(e,t):(n.decrementLoadCounts(t.content),--n.numberOfTilesWithContentReady)),e._requestedTilesInFlight.push(t))}function OAe(e,t){return e._priority-t._priority}nr.prototype.postPassesUpdate=function(e){l(this._root)&&(_st(this,e),Ost(this,e),this._cache.unloadTiles(this,LAe),this._styleApplied&&this._styleEngine.resetDirty(),this._styleApplied=!1)};nr.prototype.prePassesUpdate=function(e){if(!l(this._root))return;Est(this,e);let t=this._clippingPlanes;this._clippingPlanesOriginMatrixDirty=!0,l(t)&&t.enabled&&t.update(e);let n=this._clippingPolygons;l(n)&&n.enabled&&n.update(e),l(this._loadTimestamp)||(this._loadTimestamp=Q.clone(e.time)),this._timeSinceLoad=Math.max(Q.secondsDifference(e.time,this._loadTimestamp)*1e3,0),this.dynamicScreenSpaceError&&pst(this,e),e.newFrame&&this._cache.reset()};function _st(e,t){let n=e._requestedTilesInFlight,i=0;for(let o=0;o<n.length;++o){let r=n[o],a=t.frameNumber-r._touchedFrame>=1;if(r._contentState!==er.LOADING){++i;continue}else if(a){r.cancelRequests(),++i;continue}i>0&&(n[o-i]=r)}n.length-=i}function Ast(e){let t=e._requestedTiles;t.sort(OAe);for(let n=0;n<t.length;++n)gst(e,t[n])}function MAe(e,t,n){if(t.isDestroyed())return;let i;n.isDestroyed()||(i=n._contentResource.url);let o=l(e.message)?e.message:e.toString();t.tileFailed.numberOfListeners>0?t.tileFailed.raiseEvent({url:i,message:o}):(console.log(`A 3D tile failed to load: ${i}`),console.log(`Error: ${o}`),console.log(e.stack))}function yst(e){let t=e._processingQueue,n=0;for(let i=0;i<t.length;++i){let o=t[i];if(o.isDestroyed()||o._contentState!==er.PROCESSING){++n;continue}n>0&&(t[i-n]=o)}t.length-=n}var xst=new de,bst=new de,Cst=new h;function Tst(e,t,n){if(!e.enableCollision||!e.show)return;let i=e._addHeightCallbacks,o=t.boundingSphere;for(let r of i){if(r.invoked||t._wasSelectedLastFrame)continue;let a=r.ellipsoid,s=de.clone(r.positionCartographic,xst),c=de.fromCartesian(o.center,a,bst);l(c)&&(s.height=c.height);let u=de.toCartesian(s,a,Cst);h.distance(u,o.center)<=o.radius&&(r.invoked=!0,n.afterRender.push(()=>{l(r.callback)&&r.callback(),r.invoked=!1}))}}function Est(e,t){yst(e);let n=e._processingQueue,{cacheBytes:i,maximumCacheOverflowBytes:o,statistics:r}=e,a=i+o,s=!1;for(let c=0;c<n.length;++c){if(e.totalMemoryUsageInBytes>a){s=!0;break}let u=n[c];try{u.process(e,t),u.contentReady&&(--r.numberOfTilesProcessing,e.tileLoad.raiseEvent(u))}catch(f){--r.numberOfTilesProcessing,MAe(f,e,u)}}e.totalMemoryUsageInBytes<i?Sst(e):s&&n.length>0&&vst(e)}function vst(e){e._memoryAdjustedScreenSpaceError*=1.02;let t=e._processingQueue;for(let n=0;n<t.length;++n)t[n].updatePriority();t.sort(OAe)}function Sst(e){e._memoryAdjustedScreenSpaceError=Math.max(e.memoryAdjustedScreenSpaceError/1.02,e.maximumScreenSpaceError)}var yG=new h,wst={maximumFractionDigits:3};function RAe(e){let t=e/1048576;return t<1?t.toLocaleString(void 0,wst):Math.round(t).toLocaleString()}function r$(e){let{halfAxes:t,radius:n,center:i}=e.boundingVolume.boundingVolume,o=h.clone(i,yG);if(l(t))o.x+=.75*(t[0]+t[3]+t[6]),o.y+=.75*(t[1]+t[4]+t[7]),o.z+=.75*(t[2]+t[5]+t[8]);else if(l(n)){let r=h.normalize(i,yG);r=h.multiplyByScalar(r,.75*n,yG),o=h.add(r,i,yG)}return o}function a$(e,t,n){let i="",o=0;if(t.debugShowGeometricError&&(i+=`
- Geometric error: ${e.geometricError}`,o++),t.debugShowRenderingStatistics&&(i+=`
- Commands: ${e.commandsLength}`,o++,e.content.pointsLength>0&&(i+=`
- Points: ${e.content.pointsLength}`,o++),e.content.trianglesLength>0&&(i+=`
- Triangles: ${e.content.trianglesLength}`,o++),i+=`
- Features: ${e.content.featuresLength}`,o++),t.debugShowMemoryUsage&&(i+=`
- Texture Memory: ${RAe(e.content.texturesByteLength)}`,i+=`
- Geometry Memory: ${RAe(e.content.geometryByteLength)}`,o+=2),t.debugShowUrl)if(e.hasMultipleContents){i+=`
- Urls:`;let a=e.content.innerContentUrls;for(let s=0;s<a.length;s++)i+=`
- - ${a[s]}`;o+=a.length}else i+=`
- Url: ${e._contentHeader.uri}`,o++;let r={text:i.substring(1),position:n,font:`${19-o}px sans-serif`,showBackground:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY};return t._tileDebugLabels.add(r)}function Ist(e,t){let n=e._selectedTiles,i=n.length,o=e._emptyTiles,r=o.length;if(e._tileDebugLabels.removeAll(),e.debugPickedTileLabelOnly){if(l(e.debugPickedTile)){let a=l(e.debugPickPosition)?e.debugPickPosition:r$(e.debugPickedTile),s=a$(e.debugPickedTile,e,a);s.pixelOffset=new z(15,-15)}}else{for(let a=0;a<i;++a){let s=n[a];a$(s,e,r$(s))}for(let a=0;a<r;++a){let s=o[a];(s.hasTilesetContent||s.hasImplicitContent)&&a$(s,e,r$(s))}}e._tileDebugLabels.update(t)}function Dst(e,t,n){e._styleEngine.applyStyle(e),e._styleApplied=!0;let{commandList:i,context:o}=t,r=i.length,a=e._selectedTiles,s=e.isSkippingLevelOfDetail&&e._hasMixedContent&&o.stencilBuffer&&a.length>0;e._backfaceCommands.length=0,s&&(l(e._stencilClearCommand)||(e._stencilClearCommand=new ai({stencil:0,pass:Ie.CESIUM_3D_TILE,renderState:Ve.fromCache({stencilMask:Gt.SKIP_LOD_MASK})})),i.push(e._stencilClearCommand));let{statistics:c,tileVisible:u}=e,f=n.isRender,d=i.length;for(let m=0;m<a.length;++m){let A=a[m];f&&u.raiseEvent(A),Tst(e,A,t),A.update(e,t,n),c.incrementSelectionCounts(A.content),++c.selected}let p=e._emptyTiles;for(let m=0;m<p.length;++m)p[m].update(e,t,n);let g=i.length-d;if(e._backfaceCommands.trim(),s){let m=e._backfaceCommands.values,A=m.length;i.length+=A;for(let y=g-1;y>=0;--y)i[d+A+y]=i[d+y];for(let y=0;y<A;++y)i[d+y]=m[y]}g=i.length-r,c.numberOfCommands=g,f&&(e.pointCloudShading.attenuation&&e.pointCloudShading.eyeDomeLighting&&g>0&&e._pointCloudEyeDomeLighting.update(t,r,e.pointCloudShading,e.boundingSphere),e.debugShowGeometricError||e.debugShowRenderingStatistics||e.debugShowMemoryUsage||e.debugShowUrl?(l(e._tileDebugLabels)||(e._tileDebugLabels=new Rp),Ist(e,t)):e._tileDebugLabels=e._tileDebugLabels&&e._tileDebugLabels.destroy())}var BAe=[];function Pst(e,t){let n=t,i=BAe;for(i.push(t);i.length>0;){t=i.pop();let o=t.children;for(let r=0;r<o.length;++r)i.push(o[r]);t!==n&&(Rst(e,t),--e._statistics.numberOfTilesTotal)}n.children=[]}function LAe(e,t){e.tileUnload.raiseEvent(t),e._statistics.decrementLoadCounts(t.content),--e._statistics.numberOfTilesWithContentReady,t.unloadContent()}function Rst(e,t){e._cache.unloadTile(e,t,LAe),t.destroy()}nr.prototype.trimLoadedTiles=function(){this._cache.trim()};function Ost(e,t){let n=e._statistics,i=e._statisticsLast,o=n.numberOfPendingRequests,r=n.numberOfTilesProcessing,a=i.numberOfPendingRequests,s=i.numberOfTilesProcessing;_m.clone(n,i);let c=o!==a||r!==s;c&&t.afterRender.push(function(){return e.loadProgress.raiseEvent(o,r),!0}),e._tilesLoaded=n.numberOfPendingRequests===0&&n.numberOfTilesProcessing===0&&n.numberOfAttemptedRequests===0,c&&e._tilesLoaded&&(t.afterRender.push(function(){return e.allTilesLoaded.raiseEvent(),!0}),e._initialTilesLoaded||(e._initialTilesLoaded=!0,t.afterRender.push(function(){return e.initialTilesLoaded.raiseEvent(),!0})))}function Mst(e){e._heatmap.resetMinimumMaximum(),e._minimumPriority.depth=Number.MAX_VALUE,e._maximumPriority.depth=-Number.MAX_VALUE,e._minimumPriority.foveatedFactor=Number.MAX_VALUE,e._maximumPriority.foveatedFactor=-Number.MAX_VALUE,e._minimumPriority.distance=Number.MAX_VALUE,e._maximumPriority.distance=-Number.MAX_VALUE,e._minimumPriority.reverseScreenSpaceError=Number.MAX_VALUE,e._maximumPriority.reverseScreenSpaceError=-Number.MAX_VALUE}function Bst(e,t){t.frameNumber===e._updatedModelMatrixFrame&&l(e._previousModelMatrix)||(e._updatedModelMatrixFrame=t.frameNumber,e._modelMatrixChanged=!M.equals(e.modelMatrix,e._previousModelMatrix),e._modelMatrixChanged&&(e._previousModelMatrix=M.clone(e.modelMatrix,e._previousModelMatrix)))}function Lst(e,t,n,i){if(t.mode===ie.MORPHING||!l(e._root))return!1;let o=e._statistics;o.clear(),++e._updatedVisibilityFrame,Mst(e),Bst(e,t),e._cullRequestsWhileMoving=e.cullRequestsWhileMoving&&!e._modelMatrixChanged;let r=e.getTraversal(i).selectTiles(e,t);if(i.requestTiles&&Ast(e),Dst(e,t,i),_m.clone(o,n),i.isRender){let a=e._credits;if(l(a)&&o.selected!==0)for(let s=0;s<a.length;++s){let c=a[s];t.creditDisplay.addCreditToNextFrame(c)}}return r}function NAe(e){let t=e._credits;l(t)||(t=[]),t.length=0,l(e.resource.credits)&&e.resource.credits.forEach(i=>{t.push(yt.clone(i))});let n=e.asset.extras;if(l(n)&&l(n.cesium)&&l(n.cesium.credits)){let i=n.cesium.credits;for(let o=0;o<i.length;++o){let r=i[o];t.push(new yt(r.html))}}t.forEach(i=>i.showOnScreen=i.showOnScreen||e._showCreditsOnScreen),e._credits=t}nr.prototype.getTraversal=function(e){let{pass:t}=e;return t===tr.MOST_DETAILED_PRELOAD||t===tr.MOST_DETAILED_PICK?RF:this.isSkippingLevelOfDetail?FF:BF};nr.prototype.update=function(e){this.updateForPass(e,e.tilesetPassState)};nr.prototype.updateForPass=function(e,t){this.imageryLayers._update();let n=t.pass;if(n===tr.PRELOAD&&(!this.preloadWhenHidden||this.show)||n===tr.PRELOAD_FLIGHT&&(!this.preloadFlightDestinations||!this.show&&!this.preloadWhenHidden)||n===tr.REQUEST_RENDER_MODE_DEFER_CHECK&&(!this._cullRequestsWhileMoving&&this.foveatedTimeDelay<=0||!this.show))return;let i=e.commandList,o=e.camera,r=e.cullingVolume;t.ready=!1;let a=tr.getPassOptions(n),s=a.ignoreCommands,c=t.commandList??i,u=c.length;if(e.commandList=c,e.camera=t.camera??o,e.cullingVolume=t.cullingVolume??r,a.isRender){let p=this._environmentMapManager;l(this._root)&&(p.position=this.boundingSphere.center),p.update(e)}let f=this._clippingPolygons;l(f)&&f.enabled&&f.queueCommands(e);let d=this._statisticsPerPass[n];(this.show||s)&&(this._pass=n,t.ready=Lst(this,e,d,a)),s&&(c.length=u),e.commandList=i,e.camera=o,e.cullingVolume=r};nr.prototype.hasExtension=function(e){return l(this._extensionsUsed)?this._extensionsUsed.indexOf(e)>-1:!1};nr.prototype.isDestroyed=function(){return!1};nr.prototype.destroy=function(){if(this._tileDebugLabels=this._tileDebugLabels&&this._tileDebugLabels.destroy(),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),this._clippingPolygons=this._clippingPolygons&&this._clippingPolygons.destroy(),l(this._root)){let e=BAe;for(e.push(this._root);e.length>0;){let t=e.pop();t.destroy();let n=t.children;for(let i=0;i<n.length;++i)e.push(n[i])}}return this._root=void 0,this._shouldDestroyImageBasedLighting&&!this._imageBasedLighting.isDestroyed()&&this._imageBasedLighting.destroy(),this._imageBasedLighting=void 0,this._environmentMapManager.isDestroyed()||this._environmentMapManager.destroy(),this._environmentMapManager=void 0,this._imageryLayers.isDestroyed()||(this.imageryLayers.layerAdded.removeEventListener(this._imageryLayersListener),this.imageryLayers.layerRemoved.removeEventListener(this._imageryLayersListener),this.imageryLayers.layerMoved.removeEventListener(this._imageryLayersListener),this.imageryLayers.layerShownOrHidden.removeEventListener(this._imageryLayersListener),this._imageryLayers.destroy()),this._imageryLayers=void 0,fe(this)};nr.supportedExtensions={"3DTILES_metadata":!0,"3DTILES_implicit_tiling":!0,"3DTILES_content_gltf":!0,"3DTILES_content_gltf_vector":!0,"3DTILES_multiple_contents":!0,"3DTILES_bounding_volume_S2":!0,"3DTILES_batch_table_hierarchy":!0,"3DTILES_draco_point_compression":!0,MAXAR_content_geojson:!0};nr.checkSupportedExtensions=function(e){for(let t=0;t<e.length;t++)if(!nr.supportedExtensions[e[t]])throw new re(`Unsupported 3D Tiles Extension: ${e[t]}`)};var Nst=new gn,Fst=new h,kst=new de;nr.prototype.getHeight=function(e,t){let n=t.ellipsoid;l(n)||(n=te.WGS84);let i=Nst,o=n.cartographicToCartesian(e,i.direction);h.normalize(i.direction,i.direction),i.direction=h.normalize(o,i.direction),i.direction=h.negate(o,i.direction),i.origin=h.multiplyByScalar(i.direction,-2*n.maximumRadius,i.origin);let r=this.pick(i,t.frameState,Fst);if(l(r))return n.cartesianToCartographic(r,kst)?.height};nr.prototype.updateHeight=function(e,t,n){n=n??te.WGS84;let i={positionCartographic:e,ellipsoid:n,callback:t,invoked:!1},o=()=>{let r=this._addHeightCallbacks,a=r.length;for(let s=0;s<a;++s)if(r[s]===i){r.splice(s,1);break}i.callback&&(i.callback=void 0)};return this._addHeightCallbacks.push(i),o};var zst=new Qr,Ust=new h;nr.prototype.pick=function(e,t,n){if(!t.context.webgl2&&!this._enablePick)return;let i=this._selectedTiles,o=i.length,r=[];for(let c=0;c<o;++c){let u=i[c],f=si.raySphere(e,u.contentBoundingVolume.boundingSphere,zst);!l(f)||!l(u.content)||r.push(u)}let a=r.length;r.sort((c,u)=>{let f=ce.distanceSquaredTo(c.contentBoundingVolume.boundingSphere,e.origin),d=ce.distanceSquaredTo(u.contentBoundingVolume.boundingSphere,e.origin);return f-d});let s;for(let c=0;c<a;++c){let f=r[c].content.pick(e,t,Ust);if(l(f))return s=h.clone(f,n),s}};nr.prototype.isGltfExtensionUsed=function(e){if(this.hasExtension("3DTILES_content_gltf")){if(!l(this.extensions))return!1;let t=this.extensions["3DTILES_content_gltf"]?.extensionsUsed;return l(t)?t.indexOf(e)>-1:!1}return!1};nr.prototype.isGltfExtensionRequired=function(e){if(this.isGltfExtensionUsed(e)){let t=this.extensions["3DTILES_content_gltf"].extensionsRequired;return l(t)?t.indexOf(e)>-1:!1}return!1};var xa=nr;var Vst=new M;function oy(e,t){t.collectionChanged.addEventListener(oy.prototype._onCollectionChanged,this),this._scene=e,this._primitives=e.primitives,this._entityCollection=t,this._tilesetHash={},this._entitiesToVisualize=new Lt,this._onCollectionChanged(t,t.values,[],[])}oy.prototype.update=function(e){let t=this._entitiesToVisualize.values,n=this._tilesetHash,i=this._primitives;for(let o=0,r=t.length;o<r;o++){let a=t[o],s=a._tileset,c,u=n[a.id],f=a.isShowing&&a.isAvailable(e)&&X.getValueOrDefault(s._show,e,!0),d;f&&(d=a.computeModelMatrix(e,Vst),c=De.createIfNeeded(X.getValueOrUndefined(s._uri,e)));let p=l(u)?u.tilesetPrimitive:void 0;if(!f){l(p)&&(p.show=!1);continue}(!l(u)||c.url!==u.url)&&(l(p)&&i.removeAndDestroy(p),delete n[a.id],jst(c,n,a,i)),l(p)&&(p.show=!0,l(d)&&(p.modelMatrix=d),p.maximumScreenSpaceError=X.getValueOrDefault(s.maximumScreenSpaceError,e,p.maximumScreenSpaceError))}return!0};oy.prototype.isDestroyed=function(){return!1};oy.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(oy.prototype._onCollectionChanged,this);let e=this._entitiesToVisualize.values,t=this._tilesetHash,n=this._primitives;for(let i=e.length-1;i>-1;i--)s$(this,e[i],t,n);return fe(this)};oy.prototype.getBoundingSphere=function(e,t){let n=this._tilesetHash[e.id];if(!l(n)||n.loadFail)return bt.FAILED;let i=n.tilesetPrimitive;return l(i)?i.show?(ce.clone(i.boundingSphere,t),bt.DONE):bt.FAILED:bt.PENDING};oy.prototype._onCollectionChanged=function(e,t,n,i){let o,r,a=this._entitiesToVisualize,s=this._tilesetHash,c=this._primitives;for(o=t.length-1;o>-1;o--)r=t[o],l(r._tileset)&&a.set(r.id,r);for(o=i.length-1;o>-1;o--)r=i[o],l(r._tileset)?a.set(r.id,r):(s$(this,r,s,c),a.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],s$(this,r,s,c),a.remove(r.id)};function s$(e,t,n,i){let o=n[t.id];l(o)&&(l(o.tilesetPrimitive)&&i.removeAndDestroy(o.tilesetPrimitive),delete n[t.id])}async function jst(e,t,n,i){t[n.id]={url:e.url,loadFail:!1};try{let o=await xa.fromUrl(e);if(o.id=n,i.add(o),!l(t[n.id]))return;t[n.id].tilesetPrimitive=o}catch(o){console.error(o),t[n.id].loadFail=!0}}var kF=oy;var Gst=V.WHITE,Hst=V.BLACK,Wst=new z(2,2);function vS(e){e=e??G.EMPTY_OBJECT,this._definitionChanged=new ye,this._evenColor=void 0,this._evenColorSubscription=void 0,this._oddColor=void 0,this._oddColorSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.evenColor=e.evenColor,this.oddColor=e.oddColor,this.repeat=e.repeat}Object.defineProperties(vS.prototype,{isConstant:{get:function(){return X.isConstant(this._evenColor)&&X.isConstant(this._oddColor)&&X.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},evenColor:pe("evenColor"),oddColor:pe("oddColor"),repeat:pe("repeat")});vS.prototype.getType=function(e){return"Checkerboard"};var qst=new Q;vS.prototype.getValue=function(e,t){return l(e)||(e=Q.now(qst)),l(t)||(t={}),t.lightColor=X.getValueOrClonedDefault(this._evenColor,e,Gst,t.lightColor),t.darkColor=X.getValueOrClonedDefault(this._oddColor,e,Hst,t.darkColor),t.repeat=X.getValueOrDefault(this._repeat,e,Wst),t};vS.prototype.equals=function(e){return this===e||e instanceof vS&&X.equals(this._evenColor,e._evenColor)&&X.equals(this._oddColor,e._oddColor)&&X.equals(this._repeat,e._repeat)};var SS=vS;var FAe={id:void 0};function zF(e){if(e._firing){e._refire=!0;return}if(e._suspendCount===0){let t=e._addedEntities,n=e._removedEntities,i=e._changedEntities;if(i.length!==0||t.length!==0||n.length!==0){e._firing=!0;do{e._refire=!1;let o=t.values.slice(0),r=n.values.slice(0),a=i.values.slice(0);t.removeAll(),n.removeAll(),i.removeAll(),e._collectionChanged.raiseEvent(e,o,r,a)}while(e._refire);e._firing=!1}}}function fl(e){this._owner=e,this._entities=new Lt,this._addedEntities=new Lt,this._removedEntities=new Lt,this._changedEntities=new Lt,this._suspendCount=0,this._collectionChanged=new ye,this._id=jn(),this._show=!0,this._firing=!1,this._refire=!1}fl.prototype.suspendEvents=function(){this._suspendCount++};fl.prototype.resumeEvents=function(){this._suspendCount--,zF(this)};Object.defineProperties(fl.prototype,{collectionChanged:{get:function(){return this._collectionChanged}},id:{get:function(){return this._id}},values:{get:function(){return this._entities.values}},show:{get:function(){return this._show},set:function(e){if(e===this._show)return;this.suspendEvents();let t,n=[],i=this._entities.values,o=i.length;for(t=0;t<o;t++)n.push(i[t].isShowing);for(this._show=e,t=0;t<o;t++){let r=n[t],a=i[t];r!==a.isShowing&&a.definitionChanged.raiseEvent(a,"isShowing",a.isShowing,r)}this.resumeEvents()}},owner:{get:function(){return this._owner}}});fl.prototype.computeAvailability=function(){let e=Qe.MAXIMUM_VALUE,t=Qe.MINIMUM_VALUE,n=this._entities.values;for(let i=0,o=n.length;i<o;i++){let a=n[i].availability;if(l(a)){let s=a.start,c=a.stop;Q.lessThan(s,e)&&!s.equals(Qe.MINIMUM_VALUE)&&(e=s),Q.greaterThan(c,t)&&!c.equals(Qe.MAXIMUM_VALUE)&&(t=c)}}return Qe.MAXIMUM_VALUE.equals(e)&&(e=Qe.MINIMUM_VALUE),Qe.MINIMUM_VALUE.equals(t)&&(t=Qe.MAXIMUM_VALUE),new wn({start:e,stop:t})};fl.prototype.add=function(e){e instanceof jo||(e=new jo(e));let t=e.id,n=this._entities;if(n.contains(t))throw new _e(`An entity with id ${t} already exists in this collection.`);return e.entityCollection=this,n.set(t,e),this._removedEntities.remove(t)||this._addedEntities.set(t,e),e.definitionChanged.addEventListener(fl.prototype._onEntityDefinitionChanged,this),zF(this),e};fl.prototype.remove=function(e){return l(e)?this.removeById(e.id):!1};fl.prototype.contains=function(e){return this._entities.get(e.id)===e};fl.prototype.removeById=function(e){if(!l(e))return!1;let n=this._entities.get(e);return this._entities.remove(e)?(this._addedEntities.remove(e)||(this._removedEntities.set(e,n),this._changedEntities.remove(e)),this._entities.remove(e),n.definitionChanged.removeEventListener(fl.prototype._onEntityDefinitionChanged,this),zF(this),!0):!1};fl.prototype.removeAll=function(){let e=this._entities,t=e.length,n=e.values,i=this._addedEntities,o=this._removedEntities;for(let r=0;r<t;r++){let a=n[r],s=a.id,c=i.get(s);l(c)||(a.definitionChanged.removeEventListener(fl.prototype._onEntityDefinitionChanged,this),o.set(s,a))}e.removeAll(),i.removeAll(),this._changedEntities.removeAll(),zF(this)};fl.prototype.getById=function(e){return this._entities.get(e)};fl.prototype.getOrCreateEntity=function(e){let t=this._entities.get(e);return l(t)||(FAe.id=e,t=new jo(FAe),this.add(t)),t};fl.prototype._onEntityDefinitionChanged=function(e){let t=e.id;this._addedEntities.contains(t)||this._changedEntities.set(t,e),zF(this)};var Vs=fl;var xG={id:void 0},wS=new Array(2);function c$(e){let t=e.propertyNames,n=t.length;for(let i=0;i<n;i++)e[t[i]]=void 0;e._name=void 0,e._availability=void 0}function kAe(e,t,n,i){wS[0]=n,wS[1]=i.id,t[JSON.stringify(wS)]=i.definitionChanged.addEventListener(ba.prototype._onDefinitionChanged,e)}function zAe(e,t,n,i){wS[0]=n,wS[1]=i.id;let o=JSON.stringify(wS);t[o](),t[o]=void 0}function ry(e){if(e._shouldRecomposite=!0,e._suspendCount!==0)return;let t=e._collections,n=t.length,i=e._collectionsCopy,o=i.length,r,a,s,c,u,f=e._composite,d=new Vs(e),p=e._eventHash,g;for(r=0;r<o;r++)for(u=i[r],u.collectionChanged.removeEventListener(ba.prototype._onCollectionChanged,e),s=u.values,g=u.id,c=s.length-1;c>-1;c--)a=s[c],zAe(e,p,g,a);for(r=n-1;r>=0;r--)for(u=t[r],u.collectionChanged.addEventListener(ba.prototype._onCollectionChanged,e),s=u.values,g=u.id,c=s.length-1;c>-1;c--){a=s[c],kAe(e,p,g,a);let A=d.getById(a.id);l(A)||(A=f.getById(a.id),l(A)?c$(A):(xG.id=a.id,A=new jo(xG)),d.add(A)),A.merge(a)}e._collectionsCopy=t.slice(0),f.suspendEvents(),f.removeAll();let m=d.values;for(r=0;r<m.length;r++)f.add(m[r]);f.resumeEvents()}function ba(e,t){this._owner=t,this._composite=new Vs(this),this._suspendCount=0,this._collections=l(e)?e.slice():[],this._collectionsCopy=[],this._id=jn(),this._eventHash={},ry(this),this._shouldRecomposite=!1}Object.defineProperties(ba.prototype,{collectionChanged:{get:function(){return this._composite._collectionChanged}},id:{get:function(){return this._id}},values:{get:function(){return this._composite.values}},owner:{get:function(){return this._owner}}});ba.prototype.addCollection=function(e,t){l(t)?this._collections.splice(t,0,e):(t=this._collections.length,this._collections.push(e)),ry(this)};ba.prototype.removeCollection=function(e){let t=this._collections.indexOf(e);return t!==-1?(this._collections.splice(t,1),ry(this),!0):!1};ba.prototype.removeAllCollections=function(){this._collections.length=0,ry(this)};ba.prototype.containsCollection=function(e){return this._collections.indexOf(e)!==-1};ba.prototype.contains=function(e){return this._composite.contains(e)};ba.prototype.indexOfCollection=function(e){return this._collections.indexOf(e)};ba.prototype.getCollection=function(e){return this._collections[e]};ba.prototype.getCollectionsLength=function(){return this._collections.length};function bG(e,t){return e.indexOf(t)}function UAe(e,t,n){let i=e._collections;if(t=D.clamp(t,0,i.length-1),n=D.clamp(n,0,i.length-1),t===n)return;let o=i[t];i[t]=i[n],i[n]=o,ry(e)}ba.prototype.raiseCollection=function(e){let t=bG(this._collections,e);UAe(this,t,t+1)};ba.prototype.lowerCollection=function(e){let t=bG(this._collections,e);UAe(this,t,t-1)};ba.prototype.raiseCollectionToTop=function(e){let t=bG(this._collections,e);t!==this._collections.length-1&&(this._collections.splice(t,1),this._collections.push(e),ry(this))};ba.prototype.lowerCollectionToBottom=function(e){let t=bG(this._collections,e);t!==0&&(this._collections.splice(t,1),this._collections.splice(0,0,e),ry(this))};ba.prototype.suspendEvents=function(){this._suspendCount++,this._composite.suspendEvents()};ba.prototype.resumeEvents=function(){this._suspendCount--,this._shouldRecomposite&&this._suspendCount===0&&(ry(this),this._shouldRecomposite=!1),this._composite.resumeEvents()};ba.prototype.computeAvailability=function(){return this._composite.computeAvailability()};ba.prototype.getById=function(e){return this._composite.getById(e)};ba.prototype._onCollectionChanged=function(e,t,n){let i=this._collectionsCopy,o=i.length,r=this._composite;r.suspendEvents();let a,s,c,u,f=n.length,d=this._eventHash,p=e.id;for(a=0;a<f;a++){let m=n[a];zAe(this,d,p,m);let A=m.id;for(s=o-1;s>=0;s--)c=i[s].getById(A),l(c)&&(l(u)||(u=r.getById(A),c$(u)),u.merge(c));l(u)||r.removeById(A),u=void 0}let g=t.length;for(a=0;a<g;a++){let m=t[a];kAe(this,d,p,m);let A=m.id;for(s=o-1;s>=0;s--)c=i[s].getById(A),l(c)&&(l(u)||(u=r.getById(A),l(u)?c$(u):(xG.id=A,u=new jo(xG),r.add(u))),u.merge(c));u=void 0}r.resumeEvents()};ba.prototype._onDefinitionChanged=function(e,t,n,i){let o=this._collections,r=this._composite,a=o.length,s=e.id,c=r.getById(s),u=c[t],f=!l(u),d=!0;for(let p=a-1;p>=0;p--){let g=o[p].getById(e.id);if(l(g)){let m=g[t];if(l(m)){if(d)if(d=!1,l(m.merge)&&l(m.clone))u=m.clone(u);else{u=m;break}u.merge(m)}}}f&&c.propertyNames.indexOf(t)===-1&&c.addProperty(t),c[t]=u};var l$=ba;function u$(){this._removalFunctions=[]}u$.prototype.add=function(e,t,n){let i=e.addEventListener(t,n);this._removalFunctions.push(i);let o=this;return function(){i();let r=o._removalFunctions;r.splice(r.indexOf(i),1)}};u$.prototype.removeAll=function(){let e=this._removalFunctions;for(let t=0,n=e.length;t<n;++t)e[t]();e.length=0};var Nr=u$;function h$(e,t){return Q.compare(e.start,t.start)}function Ca(e){if(this._intervals=[],this._changedEvent=new ye,l(e)){let t=e.length;for(let n=0;n<t;n++)this.addInterval(e[n])}}Object.defineProperties(Ca.prototype,{changedEvent:{get:function(){return this._changedEvent}},start:{get:function(){let e=this._intervals;return e.length===0?void 0:e[0].start}},isStartIncluded:{get:function(){let e=this._intervals;return e.length===0?!1:e[0].isStartIncluded}},stop:{get:function(){let e=this._intervals,t=e.length;return t===0?void 0:e[t-1].stop}},isStopIncluded:{get:function(){let e=this._intervals,t=e.length;return t===0?!1:e[t-1].isStopIncluded}},length:{get:function(){return this._intervals.length}},isEmpty:{get:function(){return this._intervals.length===0}}});Ca.prototype.equals=function(e,t){if(this===e)return!0;if(!(e instanceof Ca))return!1;let n=this._intervals,i=e._intervals,o=n.length;if(o!==i.length)return!1;for(let r=0;r<o;r++)if(!wn.equals(n[r],i[r],t))return!1;return!0};Ca.prototype.get=function(e){return this._intervals[e]};Ca.prototype.removeAll=function(){this._intervals.length>0&&(this._intervals.length=0,this._changedEvent.raiseEvent(this))};Ca.prototype.findIntervalContainingDate=function(e){let t=this.indexOf(e);return t>=0?this._intervals[t]:void 0};Ca.prototype.findDataForIntervalContainingDate=function(e){let t=this.indexOf(e);return t>=0?this._intervals[t].data:void 0};Ca.prototype.contains=function(e){return this.indexOf(e)>=0};var f$=new wn;Ca.prototype.indexOf=function(e){let t=this._intervals;f$.start=e,f$.stop=e;let n=_o(t,f$,h$);return n>=0?t[n].isStartIncluded?n:n>0&&t[n-1].stop.equals(e)&&t[n-1].isStopIncluded?n-1:~n:(n=~n,n>0&&n-1<t.length&&wn.contains(t[n-1],e)?n-1:~n)};Ca.prototype.findInterval=function(e){e=e??G.EMPTY_OBJECT;let t=e.start,n=e.stop,i=e.isStartIncluded,o=e.isStopIncluded,r=this._intervals;for(let a=0,s=r.length;a<s;a++){let c=r[a];if((!l(t)||c.start.equals(t))&&(!l(n)||c.stop.equals(n))&&(!l(i)||c.isStartIncluded===i)&&(!l(o)||c.isStopIncluded===o))return r[a]}};Ca.prototype.addInterval=function(e,t){if(e.isEmpty)return;let n=this._intervals;if(n.length===0||Q.greaterThan(e.start,n[n.length-1].stop)){n.push(e),this._changedEvent.raiseEvent(this);return}let i=_o(n,e,h$);i<0?i=~i:i>0&&e.isStartIncluded&&n[i-1].isStartIncluded&&n[i-1].start.equals(e.start)?--i:i<n.length&&!e.isStartIncluded&&n[i].isStartIncluded&&n[i].start.equals(e.start)&&++i;let o;for(i>0&&(o=Q.compare(n[i-1].stop,e.start),(o>0||o===0&&(n[i-1].isStopIncluded||e.isStartIncluded))&&((l(t)?t(n[i-1].data,e.data):n[i-1].data===e.data)?(Q.greaterThan(e.stop,n[i-1].stop)?e=new wn({start:n[i-1].start,stop:e.stop,isStartIncluded:n[i-1].isStartIncluded,isStopIncluded:e.isStopIncluded,data:e.data}):e=new wn({start:n[i-1].start,stop:n[i-1].stop,isStartIncluded:n[i-1].isStartIncluded,isStopIncluded:n[i-1].isStopIncluded||e.stop.equals(n[i-1].stop)&&e.isStopIncluded,data:e.data}),n.splice(i-1,1),--i):(o=Q.compare(n[i-1].stop,e.stop),(o>0||o===0&&n[i-1].isStopIncluded&&!e.isStopIncluded)&&n.splice(i,0,new wn({start:e.stop,stop:n[i-1].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:n[i-1].isStopIncluded,data:n[i-1].data})),n[i-1]=new wn({start:n[i-1].start,stop:e.start,isStartIncluded:n[i-1].isStartIncluded,isStopIncluded:!e.isStartIncluded,data:n[i-1].data}))));i<n.length&&(o=Q.compare(e.stop,n[i].start),o>0||o===0&&(e.isStopIncluded||n[i].isStartIncluded));)if(l(t)?t(n[i].data,e.data):n[i].data===e.data)e=new wn({start:e.start,stop:Q.greaterThan(n[i].stop,e.stop)?n[i].stop:e.stop,isStartIncluded:e.isStartIncluded,isStopIncluded:Q.greaterThan(n[i].stop,e.stop)?n[i].isStopIncluded:e.isStopIncluded,data:e.data}),n.splice(i,1);else if(n[i]=new wn({start:e.stop,stop:n[i].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:n[i].isStopIncluded,data:n[i].data}),n[i].isEmpty)n.splice(i,1);else break;n.splice(i,0,e),this._changedEvent.raiseEvent(this)};Ca.prototype.removeInterval=function(e){if(e.isEmpty)return!1;let t=this._intervals,n=_o(t,e,h$);n<0&&(n=~n);let i=!1;for(n>0&&(Q.greaterThan(t[n-1].stop,e.start)||t[n-1].stop.equals(e.start)&&t[n-1].isStopIncluded&&e.isStartIncluded)&&(i=!0,(Q.greaterThan(t[n-1].stop,e.stop)||t[n-1].isStopIncluded&&!e.isStopIncluded&&t[n-1].stop.equals(e.stop))&&t.splice(n,0,new wn({start:e.stop,stop:t[n-1].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:t[n-1].isStopIncluded,data:t[n-1].data})),t[n-1]=new wn({start:t[n-1].start,stop:e.start,isStartIncluded:t[n-1].isStartIncluded,isStopIncluded:!e.isStartIncluded,data:t[n-1].data})),n<t.length&&!e.isStartIncluded&&t[n].isStartIncluded&&e.start.equals(t[n].start)&&(i=!0,t.splice(n,0,new wn({start:t[n].start,stop:t[n].start,isStartIncluded:!0,isStopIncluded:!0,data:t[n].data})),++n);n<t.length&&Q.greaterThan(e.stop,t[n].stop);)i=!0,t.splice(n,1);return n<t.length&&e.stop.equals(t[n].stop)&&(i=!0,!e.isStopIncluded&&t[n].isStopIncluded?n+1<t.length&&t[n+1].start.equals(e.stop)&&t[n].data===t[n+1].data?(t.splice(n,1),t[n]=new wn({start:t[n].start,stop:t[n].stop,isStartIncluded:!0,isStopIncluded:t[n].isStopIncluded,data:t[n].data})):t[n]=new wn({start:e.stop,stop:e.stop,isStartIncluded:!0,isStopIncluded:!0,data:t[n].data}):t.splice(n,1)),n<t.length&&(Q.greaterThan(e.stop,t[n].start)||e.stop.equals(t[n].start)&&e.isStopIncluded&&t[n].isStartIncluded)&&(i=!0,t[n]=new wn({start:e.stop,stop:t[n].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:t[n].isStopIncluded,data:t[n].data})),i&&this._changedEvent.raiseEvent(this),i};Ca.prototype.intersect=function(e,t,n){let i=new Ca,o=0,r=0,a=this._intervals,s=e._intervals;for(;o<a.length&&r<s.length;){let c=a[o],u=s[r];if(Q.lessThan(c.stop,u.start))++o;else if(Q.lessThan(u.stop,c.start))++r;else{if(l(n)||l(t)&&t(c.data,u.data)||!l(t)&&u.data===c.data){let f=wn.intersect(c,u,new wn,n);f.isEmpty||i.addInterval(f,t)}Q.lessThan(c.stop,u.stop)||c.stop.equals(u.stop)&&!c.isStopIncluded&&u.isStopIncluded?++o:++r}}return i};Ca.fromJulianDateArray=function(e,t){l(t)||(t=new Ca);let n=e.julianDates,i=n.length,o=e.dataCallback,r=e.isStartIncluded??!0,a=e.isStopIncluded??!0,s=e.leadingInterval??!1,c=e.trailingInterval??!1,u,f=0;s&&(++f,u=new wn({start:Qe.MINIMUM_VALUE,stop:n[0],isStartIncluded:!0,isStopIncluded:!r}),u.data=l(o)?o(u,t.length):t.length,t.addInterval(u));for(let d=0;d<i-1;++d){let p=n[d],g=n[d+1];u=new wn({start:p,stop:g,isStartIncluded:t.length===f?r:!0,isStopIncluded:d===i-2?a:!1}),u.data=l(o)?o(u,t.length):t.length,t.addInterval(u),p=g}return c&&(u=new wn({start:n[i-1],stop:Qe.MAXIMUM_VALUE,isStartIncluded:!a,isStopIncluded:!0}),u.data=l(o)?o(u,t.length):t.length,t.addInterval(u)),t};var dl=new R0,UF=[0,31,28,31,30,31,30,31,31,30,31,30,31];function d$(e,t,n){l(n)||(n=new Q),Q.toGregorianDate(e,dl);let i=dl.millisecond+t.millisecond,o=dl.second+t.second,r=dl.minute+t.minute,a=dl.hour+t.hour,s=dl.day+t.day,c=dl.month+t.month,u=dl.year+t.year;for(i>=1e3&&(o+=Math.floor(i/1e3),i=i%1e3),o>=60&&(r+=Math.floor(o/60),o=o%60),r>=60&&(a+=Math.floor(r/60),r=r%60),a>=24&&(s+=Math.floor(a/24),a=a%24),UF[2]=Eh(u)?29:28;s>UF[c]||c>=13;)s>UF[c]&&(s-=UF[c],++c),c>=13&&(--c,u+=Math.floor(c/12),c=c%12,++c),UF[2]=Eh(u)?29:28;return dl.millisecond=i,dl.second=o,dl.minute=r,dl.hour=a,dl.day=s,dl.month=c,dl.year=u,Q.fromGregorianDate(dl,n)}var Yst=new Q,Xst=/P(?:([\d.,]+)Y)?(?:([\d.,]+)M)?(?:([\d.,]+)W)?(?:([\d.,]+)D)?(?:T(?:([\d.,]+)H)?(?:([\d.,]+)M)?(?:([\d.,]+)S)?)?/;function VAe(e,t){if(!l(e)||e.length===0)return!1;if(t.year=0,t.month=0,t.day=0,t.hour=0,t.minute=0,t.second=0,t.millisecond=0,e[0]==="P"){let n=e.match(Xst);if(!l(n))return!1;if(l(n[1])&&(t.year=Number(n[1].replace(",","."))),l(n[2])&&(t.month=Number(n[2].replace(",","."))),l(n[3])&&(t.day=Number(n[3].replace(",","."))*7),l(n[4])&&(t.day+=Number(n[4].replace(",","."))),l(n[5])&&(t.hour=Number(n[5].replace(",","."))),l(n[6])&&(t.minute=Number(n[6].replace(",","."))),l(n[7])){let i=Number(n[7].replace(",","."));t.second=Math.floor(i),t.millisecond=i%1*1e3}}else e[e.length-1]!=="Z"&&(e+="Z"),Q.toGregorianDate(Q.fromIso8601(e,Yst),t);return t.year||t.month||t.day||t.hour||t.minute||t.second||t.millisecond}var VF=new R0;Ca.fromIso8601=function(e,t){let n=e.iso8601.split("/"),i=Q.fromIso8601(n[0]),o=Q.fromIso8601(n[1]),r=[];if(!VAe(n[2],VF))r.push(i,o);else{let a=Q.clone(i);for(r.push(a);Q.compare(a,o)<0;)a=d$(a,VF),Q.compare(o,a)<=0&&Q.clone(o,a),r.push(a)}return Ca.fromJulianDateArray({julianDates:r,isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)};Ca.fromIso8601DateArray=function(e,t){return Ca.fromJulianDateArray({julianDates:e.iso8601Dates.map(function(n){return Q.fromIso8601(n)}),isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)};Ca.fromIso8601DurationArray=function(e,t){let n=e.epoch,i=e.iso8601Durations,o=e.relativeToPrevious??!1,r=[],a,s,c=i.length;for(let u=0;u<c;++u)(VAe(i[u],VF)||u===0)&&(o&&l(s)?a=d$(s,VF):a=d$(n,VF),r.push(a),s=a);return Ca.fromJulianDateArray({julianDates:r,isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)};var Ta=Ca;function Kst(e,t,n,i){function o(){n.raiseEvent(e)}let r=[];t.removeAll();let a=i.length;for(let s=0;s<a;s++){let c=i.get(s);l(c.data)&&r.indexOf(c.data)===-1&&t.add(c.data.definitionChanged,o)}}function gC(){this._eventHelper=new Nr,this._definitionChanged=new ye,this._intervals=new Ta,this._intervals.changedEvent.addEventListener(gC.prototype._intervalsChanged,this)}Object.defineProperties(gC.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}}});var Qst=new Q;gC.prototype.getValue=function(e,t){l(e)||(e=Q.now(Qst));let n=this._intervals.findDataForIntervalContainingDate(e);if(l(n))return n.getValue(e,t)};gC.prototype.equals=function(e){return this===e||e instanceof gC&&this._intervals.equals(e._intervals,X.equals)};gC.prototype._intervalsChanged=function(){Kst(this,this._eventHelper,this._definitionChanged,this._intervals),this._definitionChanged.raiseEvent(this)};var hl=gC;function ay(){this._definitionChanged=new ye,this._composite=new hl,this._composite.definitionChanged.addEventListener(ay.prototype._raiseDefinitionChanged,this)}Object.defineProperties(ay.prototype,{isConstant:{get:function(){return this._composite.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._composite._intervals}}});ay.prototype.getType=function(e){let t=this._composite._intervals.findDataForIntervalContainingDate(e);if(l(t))return t.getType(e)};var $st=new Q;ay.prototype.getValue=function(e,t){l(e)||(e=Q.now($st));let n=this._composite._intervals.findDataForIntervalContainingDate(e);if(l(n))return n.getValue(e,t)};ay.prototype.equals=function(e){return this===e||e instanceof ay&&this._composite.equals(e._composite,X.equals)};ay.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var IS=ay;function sy(e){this._referenceFrame=e??Bi.FIXED,this._definitionChanged=new ye,this._composite=new hl,this._composite.definitionChanged.addEventListener(sy.prototype._raiseDefinitionChanged,this)}Object.defineProperties(sy.prototype,{isConstant:{get:function(){return this._composite.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._composite.intervals}},referenceFrame:{get:function(){return this._referenceFrame},set:function(e){this._referenceFrame=e}}});var Jst=new Q;sy.prototype.getValue=function(e,t){return l(e)||(e=Q.now(Jst)),this.getValueInReferenceFrame(e,Bi.FIXED,t)};sy.prototype.getValueInReferenceFrame=function(e,t,n){let i=this._composite._intervals.findDataForIntervalContainingDate(e);if(l(i))return i.getValueInReferenceFrame(e,t,n)};sy.prototype.equals=function(e){return this===e||e instanceof sy&&this._referenceFrame===e._referenceFrame&&this._composite.equals(e._composite,X.equals)};sy.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var cc=sy;var jAe={ROUNDED:0,MITERED:1,BEVELED:2};Object.freeze(jAe);var Xi=jAe;var lc=[new h,new h],Zst=new h,ect=new h,tct=new h,nct=new h,ict=new h,oct=new h,rct=new h,act=new h,sct=new h,DS=new h,CG=new h,jF={},m$=new de;function cct(e,t){let n=new Array(e.length);for(let i=0;i<e.length;i++){let o=e[i];m$=t.cartesianToCartographic(o,m$),n[i]=m$.height,e[i]=t.scaleToGeodeticSurface(o,o)}return n}function p$(e,t,n,i){let o=e[0],r=e[1],a=h.angleBetween(o,r),s=Math.ceil(a/i),c=new Array(s),u;if(t===n){for(u=0;u<s;u++)c[u]=t;return c.push(n),c}let d=(n-t)/s;for(u=1;u<s;u++){let p=t+u*d;c[u]=p}return c[0]=t,c.push(n),c}var TG=new h,EG=new h;function lct(e,t,n,i){let o=new Ra(n,i),r=o.projectPointOntoPlane(h.add(n,e,TG),TG),a=o.projectPointOntoPlane(h.add(n,t,EG),EG),s=z.angleBetween(r,a);return a.x*r.y-a.y*r.x>=0?-s:s}var uct=new h(-1,0,0),_C=new M,fct=new M,g$=new $,dct=$.IDENTITY.clone(),hct=new h,mct=new se,GAe=new h;function Qg(e,t,n,i,o,r,a,s){let c=hct,u=mct;_C=pt.eastNorthUpToFixedFrame(e,o,_C),c=M.multiplyByPointAsVector(_C,uct,c),c=h.normalize(c,c);let f=lct(c,t,e,o);g$=$.fromRotationZ(f,g$),GAe.z=r,_C=M.multiplyTransformation(_C,M.fromRotationTranslation(g$,GAe,fct),_C);let d=dct;d[0]=a;for(let p=0;p<s;p++)for(let g=0;g<n.length;g+=3)u=h.fromArray(n,g,u),u=$.multiplyByVector(d,u,u),u=M.multiplyByPoint(_C,u,u),i.push(u.x,u.y,u.z);return i}var pct=new h;function _$(e,t,n,i,o,r,a){for(let s=0;s<e.length;s+=3){let c=h.fromArray(e,s,pct);i=Qg(c,t,n,i,o,r[s/3],a,1)}return i}function gct(e,t){let n=e.length,i=new Array(n*6),o=0,r=t.x+t.width/2,a=t.y+t.height/2,s=e[0];i[o++]=s.x-r,i[o++]=0,i[o++]=s.y-a;for(let c=1;c<n;c++){s=e[c];let u=s.x-r,f=s.y-a;i[o++]=u,i[o++]=0,i[o++]=f,i[o++]=u,i[o++]=0,i[o++]=f}return s=e[0],i[o++]=s.x-r,i[o++]=0,i[o++]=s.y-a,i}function HAe(e,t){let n=e.length,i=new Array(n*3),o=0,r=t.x+t.width/2,a=t.y+t.height/2;for(let s=0;s<n;s++)i[o++]=e[s].x-r,i[o++]=0,i[o++]=e[s].y-a;return i}var WAe=new Le,qAe=new h,YAe=new $;function XAe(e,t,n,i,o,r,a,s,c,u){let f=h.angleBetween(h.subtract(t,e,DS),h.subtract(n,e,CG)),d=i===Xi.BEVELED?0:Math.ceil(f/D.toRadians(5)),p;o?p=$.fromQuaternion(Le.fromAxisAngle(h.negate(e,DS),f/(d+1),WAe),YAe):p=$.fromQuaternion(Le.fromAxisAngle(e,f/(d+1),WAe),YAe);let g,m;if(t=h.clone(t,qAe),d>0){let A=u?2:1;for(let y=0;y<d;y++)t=$.multiplyByVector(p,t,t),g=h.subtract(t,e,DS),g=h.normalize(g,g),o||(g=h.negate(g,g)),m=r.scaleToGeodeticSurface(t,CG),a=Qg(m,g,s,a,r,c,1,A)}else g=h.subtract(t,e,DS),g=h.normalize(g,g),o||(g=h.negate(g,g)),m=r.scaleToGeodeticSurface(t,CG),a=Qg(m,g,s,a,r,c,1,1),n=h.clone(n,qAe),g=h.subtract(n,e,DS),g=h.normalize(g,g),o||(g=h.negate(g,g)),m=r.scaleToGeodeticSurface(n,CG),a=Qg(m,g,s,a,r,c,1,1);return a}jF.removeDuplicatesFromShape=function(e){let t=e.length,n=[];for(let i=t-1,o=0;o<t;i=o++){let r=e[i],a=e[o];z.equals(r,a)||n.push(a)}return n};jF.angleIsGreaterThanPi=function(e,t,n,i){let o=new Ra(n,i),r=o.projectPointOntoPlane(h.add(n,e,TG),TG),a=o.projectPointOntoPlane(h.add(n,t,EG),EG);return a.x*r.y-a.y*r.x>=0};var _ct=new h,Act=new h;jF.computePositions=function(e,t,n,i,o){let r=i._ellipsoid,a=cct(e,r),s=i._granularity,c=i._cornerType,u=o?gct(t,n):HAe(t,n),f=o?HAe(t,n):void 0,d=n.height/2,p=n.width/2,g=e.length,m=[],A=o?[]:void 0,y=Zst,x=ect,b=tct,C=nct,E=ict,S=oct,w=rct,P=act,R=sct,B=e[0],L=e[1];C=r.geodeticSurfaceNormal(B,C),y=h.subtract(L,B,y),y=h.normalize(y,y),P=h.cross(C,y,P),P=h.normalize(P,P);let _=a[0],T=a[1];o&&(A=Qg(B,P,f,A,r,_+d,1,1)),R=h.clone(B,R),B=L,x=h.negate(y,x);let v,I;for(let j=1;j<g-1;j++){let k=o?2:1;if(L=e[j+1],B.equals(L)){_t("Positions are too close and are considered equivalent with rounding error.");continue}y=h.subtract(L,B,y),y=h.normalize(y,y),C=r.geodeticSurfaceNormal(B,C);let U=h.multiplyByScalar(C,h.dot(y,C),_ct);h.subtract(y,U,U),h.normalize(U,U);let F=h.multiplyByScalar(C,h.dot(x,C),Act);if(h.subtract(x,F,F),h.normalize(F,F),!D.equalsEpsilon(Math.abs(h.dot(U,F)),1,D.EPSILON7)){b=h.add(y,x,b),b=h.normalize(b,b),b=h.cross(b,C,b),b=h.cross(C,b,b),b=h.normalize(b,b);let q=1/Math.max(.25,h.magnitude(h.cross(b,x,DS))),J=jF.angleIsGreaterThanPi(y,x,B,r);J?(E=h.add(B,h.multiplyByScalar(b,q*p,b),E),S=h.add(E,h.multiplyByScalar(P,p,S),S),lc[0]=h.clone(R,lc[0]),lc[1]=h.clone(S,lc[1]),v=p$(lc,_+d,T+d,s),I=Yi.generateArc({positions:lc,granularity:s,ellipsoid:r}),m=_$(I,P,u,m,r,v,1),P=h.cross(C,y,P),P=h.normalize(P,P),w=h.add(E,h.multiplyByScalar(P,p,w),w),c===Xi.ROUNDED||c===Xi.BEVELED?XAe(E,S,w,c,J,r,m,u,T+d,o):(b=h.negate(b,b),m=Qg(B,b,u,m,r,T+d,q,k)),R=h.clone(w,R)):(E=h.add(B,h.multiplyByScalar(b,q*p,b),E),S=h.add(E,h.multiplyByScalar(P,-p,S),S),lc[0]=h.clone(R,lc[0]),lc[1]=h.clone(S,lc[1]),v=p$(lc,_+d,T+d,s),I=Yi.generateArc({positions:lc,granularity:s,ellipsoid:r}),m=_$(I,P,u,m,r,v,1),P=h.cross(C,y,P),P=h.normalize(P,P),w=h.add(E,h.multiplyByScalar(P,-p,w),w),c===Xi.ROUNDED||c===Xi.BEVELED?XAe(E,S,w,c,J,r,m,u,T+d,o):m=Qg(B,b,u,m,r,T+d,q,k),R=h.clone(w,R)),x=h.negate(y,x)}else m=Qg(R,P,u,m,r,_+d,1,1),R=B;_=T,T=a[j+1],B=L}lc[0]=h.clone(R,lc[0]),lc[1]=h.clone(B,lc[1]),v=p$(lc,_+d,T+d,s),I=Yi.generateArc({positions:lc,granularity:s,ellipsoid:r}),m=_$(I,P,u,m,r,v,1),o&&(A=Qg(B,P,f,A,r,T+d,1,1)),g=m.length;let O=o?g+A.length:g,N=new Float64Array(O);return N.set(m),o&&N.set(A,g),N};var Am=jF;var y$={},PS=new h,ZAe=new h,yct=new h,KAe=new h,iu=[new h,new h],eye=new h,tye=new h,nye=new h,xct=new h,bct=new h,Cct=new h,Tct=new h,Ect=new h,vct=new h,Sct=new h,QAe=new Le,$Ae=new $;function vG(e,t,n,i,o){let r=h.angleBetween(h.subtract(t,e,PS),h.subtract(n,e,ZAe)),a=i===Xi.BEVELED?1:Math.ceil(r/D.toRadians(5))+1,s=a*3,c=new Array(s);c[s-3]=n.x,c[s-2]=n.y,c[s-1]=n.z;let u;o?u=$.fromQuaternion(Le.fromAxisAngle(h.negate(e,PS),r/a,QAe),$Ae):u=$.fromQuaternion(Le.fromAxisAngle(e,r/a,QAe),$Ae);let f=0;t=h.clone(t,PS);for(let d=0;d<a;d++)t=$.multiplyByVector(u,t,t),c[f++]=t.x,c[f++]=t.y,c[f++]=t.z;return c}function wct(e){let t=eye,n=tye,i=nye,o=e[1];n=h.fromArray(e[1],o.length-3,n),i=h.fromArray(e[0],0,i),t=h.midpoint(n,i,t);let r=vG(t,n,i,Xi.ROUNDED,!1),a=e.length-1,s=e[a-1];o=e[a],n=h.fromArray(s,s.length-3,n),i=h.fromArray(o,0,i),t=h.midpoint(n,i,t);let c=vG(t,n,i,Xi.ROUNDED,!1);return[r,c]}function JAe(e,t,n,i){let o=PS;return i?o=h.add(e,t,o):(t=h.negate(t,t),o=h.add(e,t,o)),[o.x,o.y,o.z,n.x,n.y,n.z]}function A$(e,t,n,i){let o=new Array(e.length),r=new Array(e.length),a=h.multiplyByScalar(t,n,PS),s=h.negate(a,ZAe),c=0,u=e.length-1;for(let f=0;f<e.length;f+=3){let d=h.fromArray(e,f,yct),p=h.add(d,s,KAe);o[c++]=p.x,o[c++]=p.y,o[c++]=p.z;let g=h.add(d,a,KAe);r[u--]=g.z,r[u--]=g.y,r[u--]=g.x}return i.push(o,r),i}y$.addAttribute=function(e,t,n,i){let o=t.x,r=t.y,a=t.z;l(n)&&(e[n]=o,e[n+1]=r,e[n+2]=a),l(i)&&(e[i]=a,e[i-1]=r,e[i-2]=o)};var Ict=new h,Dct=new h;y$.computePositions=function(e){let t=e.granularity,n=e.positions,i=e.ellipsoid,o=e.width/2,r=e.cornerType,a=e.saveAttributes,s=eye,c=tye,u=nye,f=xct,d=bct,p=Cct,g=Tct,m=Ect,A=vct,y=Sct,x=[],b=a?[]:void 0,C=a?[]:void 0,E=n[0],S=n[1];c=h.normalize(h.subtract(S,E,c),c),s=i.geodeticSurfaceNormal(E,s),f=h.normalize(h.cross(s,c,f),f),a&&(b.push(f.x,f.y,f.z),C.push(s.x,s.y,s.z)),g=h.clone(E,g),E=S,u=h.negate(c,u);let w,P=[],R,B=n.length;for(R=1;R<B-1;R++){s=i.geodeticSurfaceNormal(E,s),S=n[R+1],c=h.normalize(h.subtract(S,E,c),c);let _=h.multiplyByScalar(s,h.dot(c,s),Ict);h.subtract(c,_,_),h.normalize(_,_);let T=h.multiplyByScalar(s,h.dot(u,s),Dct);if(h.subtract(u,T,T),h.normalize(T,T),!D.equalsEpsilon(Math.abs(h.dot(_,T)),1,D.EPSILON7)){d=h.normalize(h.add(c,u,d),d),d=h.cross(d,s,d),d=h.cross(s,d,d),d=h.normalize(d,d);let I=o/Math.max(.25,h.magnitude(h.cross(d,u,PS))),O=Am.angleIsGreaterThanPi(c,u,E,i);d=h.multiplyByScalar(d,I,d),O?(m=h.add(E,d,m),y=h.add(m,h.multiplyByScalar(f,o,y),y),A=h.add(m,h.multiplyByScalar(f,o*2,A),A),iu[0]=h.clone(g,iu[0]),iu[1]=h.clone(y,iu[1]),w=Yi.generateArc({positions:iu,granularity:t,ellipsoid:i}),x=A$(w,f,o,x),a&&(b.push(f.x,f.y,f.z),C.push(s.x,s.y,s.z)),p=h.clone(A,p),f=h.normalize(h.cross(s,c,f),f),A=h.add(m,h.multiplyByScalar(f,o*2,A),A),g=h.add(m,h.multiplyByScalar(f,o,g),g),r===Xi.ROUNDED||r===Xi.BEVELED?P.push({leftPositions:vG(m,p,A,r,O)}):P.push({leftPositions:JAe(E,h.negate(d,d),A,O)})):(A=h.add(E,d,A),y=h.add(A,h.negate(h.multiplyByScalar(f,o,y),y),y),m=h.add(A,h.negate(h.multiplyByScalar(f,o*2,m),m),m),iu[0]=h.clone(g,iu[0]),iu[1]=h.clone(y,iu[1]),w=Yi.generateArc({positions:iu,granularity:t,ellipsoid:i}),x=A$(w,f,o,x),a&&(b.push(f.x,f.y,f.z),C.push(s.x,s.y,s.z)),p=h.clone(m,p),f=h.normalize(h.cross(s,c,f),f),m=h.add(A,h.negate(h.multiplyByScalar(f,o*2,m),m),m),g=h.add(A,h.negate(h.multiplyByScalar(f,o,g),g),g),r===Xi.ROUNDED||r===Xi.BEVELED?P.push({rightPositions:vG(A,p,m,r,O)}):P.push({rightPositions:JAe(E,d,m,O)})),u=h.negate(c,u)}E=S}s=i.geodeticSurfaceNormal(E,s),iu[0]=h.clone(g,iu[0]),iu[1]=h.clone(E,iu[1]),w=Yi.generateArc({positions:iu,granularity:t,ellipsoid:i}),x=A$(w,f,o,x),a&&(b.push(f.x,f.y,f.z),C.push(s.x,s.y,s.z));let L;return r===Xi.ROUNDED&&(L=wct(x)),{positions:x,corners:P,lefts:b,normals:C,endPositions:L}};var no=y$;var rye=new h,aye=new h,SG=new h,wG=new h,Pct=new h,sye=new h,cy=new h,RS=new h;function cye(e,t){for(let n=0;n<e.length;n++)e[n]=t.scaleToGeodeticSurface(e[n],e[n]);return e}function ym(e,t,n,i,o,r){let a=e.normals,s=e.tangents,c=e.bitangents,u=h.normalize(h.cross(n,t,cy),cy);r.normal&&no.addAttribute(a,t,i,o),r.tangent&&no.addAttribute(s,u,i,o),r.bitangent&&no.addAttribute(c,n,i,o)}function lye(e,t,n){let i=e.positions,o=e.corners,r=e.endPositions,a=e.lefts,s=e.normals,c=new pn,u,f=0,d=0,p,g=0,m;for(p=0;p<i.length;p+=2)m=i[p].length-3,f+=m,g+=m*2,d+=i[p+1].length-3;for(f+=3,d+=3,p=0;p<o.length;p++){u=o[p];let K=o[p].leftPositions;l(K)?(m=K.length,f+=m,g+=m):(m=o[p].rightPositions.length,d+=m,g+=m)}let A=l(r),y;A&&(y=r[0].length-3,f+=y,d+=y,y/=3,g+=y*6);let x=f+d,b=new Float64Array(x),C=t.normal?new Float32Array(x):void 0,E=t.tangent?new Float32Array(x):void 0,S=t.bitangent?new Float32Array(x):void 0,w={normals:C,tangents:E,bitangents:S},P=0,R=x-1,B,L,_,T,v=rye,I=aye,O,N,j=y/2,k=Ue.createTypedArray(x/3,g),U=0;if(A){N=SG,O=wG;let K=r[0];for(v=h.fromArray(s,0,v),I=h.fromArray(a,0,I),p=0;p<j;p++)N=h.fromArray(K,(j-1-p)*3,N),O=h.fromArray(K,(j+p)*3,O),no.addAttribute(b,O,P),no.addAttribute(b,N,void 0,R),ym(w,v,I,P,R,t),L=P/3,T=L+1,B=(R-2)/3,_=B-1,k[U++]=B,k[U++]=L,k[U++]=_,k[U++]=_,k[U++]=L,k[U++]=T,P+=3,R-=3}let F=0,H=0,q=i[F++],J=i[F++];b.set(q,P),b.set(J,R-J.length+1),I=h.fromArray(a,H,I);let W,Z;for(m=J.length-3,p=0;p<m;p+=3)W=n.geodeticSurfaceNormal(h.fromArray(q,p,cy),cy),Z=n.geodeticSurfaceNormal(h.fromArray(J,m-p,RS),RS),v=h.normalize(h.add(W,Z,v),v),ym(w,v,I,P,R,t),L=P/3,T=L+1,B=(R-2)/3,_=B-1,k[U++]=B,k[U++]=L,k[U++]=_,k[U++]=_,k[U++]=L,k[U++]=T,P+=3,R-=3;for(W=n.geodeticSurfaceNormal(h.fromArray(q,m,cy),cy),Z=n.geodeticSurfaceNormal(h.fromArray(J,m,RS),RS),v=h.normalize(h.add(W,Z,v),v),H+=3,p=0;p<o.length;p++){let K;u=o[p];let le=u.leftPositions,me=u.rightPositions,ae,be,ge=sye,we=SG,Ee=wG;if(v=h.fromArray(s,H,v),l(le)){for(ym(w,v,I,void 0,R,t),R-=3,ae=T,be=_,K=0;K<le.length/3;K++)ge=h.fromArray(le,K*3,ge),k[U++]=ae,k[U++]=be-K-1,k[U++]=be-K,no.addAttribute(b,ge,void 0,R),we=h.fromArray(b,(be-K-1)*3,we),Ee=h.fromArray(b,ae*3,Ee),I=h.normalize(h.subtract(we,Ee,I),I),ym(w,v,I,void 0,R,t),R-=3;ge=h.fromArray(b,ae*3,ge),we=h.subtract(h.fromArray(b,be*3,we),ge,we),Ee=h.subtract(h.fromArray(b,(be-K)*3,Ee),ge,Ee),I=h.normalize(h.add(we,Ee,I),I),ym(w,v,I,P,void 0,t),P+=3}else{for(ym(w,v,I,P,void 0,t),P+=3,ae=_,be=T,K=0;K<me.length/3;K++)ge=h.fromArray(me,K*3,ge),k[U++]=ae,k[U++]=be+K,k[U++]=be+K+1,no.addAttribute(b,ge,P),we=h.fromArray(b,ae*3,we),Ee=h.fromArray(b,(be+K)*3,Ee),I=h.normalize(h.subtract(we,Ee,I),I),ym(w,v,I,P,void 0,t),P+=3;ge=h.fromArray(b,ae*3,ge),we=h.subtract(h.fromArray(b,(be+K)*3,we),ge,we),Ee=h.subtract(h.fromArray(b,be*3,Ee),ge,Ee),I=h.normalize(h.negate(h.add(Ee,we,I),I),I),ym(w,v,I,void 0,R,t),R-=3}for(q=i[F++],J=i[F++],q.splice(0,3),J.splice(J.length-3,3),b.set(q,P),b.set(J,R-J.length+1),m=J.length-3,H+=3,I=h.fromArray(a,H,I),K=0;K<J.length;K+=3)W=n.geodeticSurfaceNormal(h.fromArray(q,K,cy),cy),Z=n.geodeticSurfaceNormal(h.fromArray(J,m-K,RS),RS),v=h.normalize(h.add(W,Z,v),v),ym(w,v,I,P,R,t),T=P/3,L=T-1,_=(R-2)/3,B=_+1,k[U++]=B,k[U++]=L,k[U++]=_,k[U++]=_,k[U++]=L,k[U++]=T,P+=3,R-=3;P-=3,R+=3}if(v=h.fromArray(s,s.length-3,v),ym(w,v,I,P,R,t),A){P+=3,R-=3,N=SG,O=wG;let K=r[1];for(p=0;p<j;p++)N=h.fromArray(K,(y-p-1)*3,N),O=h.fromArray(K,p*3,O),no.addAttribute(b,N,void 0,R),no.addAttribute(b,O,P),ym(w,v,I,P,R,t),T=P/3,L=T-1,_=(R-2)/3,B=_+1,k[U++]=B,k[U++]=L,k[U++]=_,k[U++]=_,k[U++]=L,k[U++]=T,P+=3,R-=3}if(c.position=new Me({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:b}),t.st){let K=new Float32Array(x/3*2),le,me,ae=0;if(A){f/=3,d/=3;let be=Math.PI/(y+1);me=1/(f-y+1),le=1/(d-y+1);let ge,we=y/2;for(p=we+1;p<y+1;p++)ge=D.PI_OVER_TWO+be*p,K[ae++]=le*(1+Math.cos(ge)),K[ae++]=.5*(1+Math.sin(ge));for(p=1;p<d-y+1;p++)K[ae++]=p*le,K[ae++]=0;for(p=y;p>we;p--)ge=D.PI_OVER_TWO-p*be,K[ae++]=1-le*(1+Math.cos(ge)),K[ae++]=.5*(1+Math.sin(ge));for(p=we;p>0;p--)ge=D.PI_OVER_TWO-be*p,K[ae++]=1-me*(1+Math.cos(ge)),K[ae++]=.5*(1+Math.sin(ge));for(p=f-y;p>0;p--)K[ae++]=p*me,K[ae++]=1;for(p=1;p<we+1;p++)ge=D.PI_OVER_TWO+be*p,K[ae++]=me*(1+Math.cos(ge)),K[ae++]=.5*(1+Math.sin(ge))}else{for(f/=3,d/=3,me=1/(f-1),le=1/(d-1),p=0;p<d;p++)K[ae++]=p*le,K[ae++]=0;for(p=f;p>0;p--)K[ae++]=(p-1)*me,K[ae++]=1}c.st=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:K})}return t.normal&&(c.normal=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:w.normals})),t.tangent&&(c.tangent=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:w.tangents})),t.bitangent&&(c.bitangent=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:w.bitangents})),{attributes:c,indices:k}}function Rct(e,t){if(!t.normal&&!t.tangent&&!t.bitangent&&!t.st)return e;let n=e.position.values,i,o;(t.normal||t.bitangent)&&(i=e.normal.values,o=e.bitangent.values);let r=e.position.values.length/18,a=r*3,s=r*2,c=a*2,u;if(t.normal||t.bitangent||t.tangent){let f=t.normal?new Float32Array(a*6):void 0,d=t.tangent?new Float32Array(a*6):void 0,p=t.bitangent?new Float32Array(a*6):void 0,g=rye,m=aye,A=SG,y=wG,x=Pct,b=sye,C=c;for(u=0;u<a;u+=3){let E=C+c;g=h.fromArray(n,u,g),m=h.fromArray(n,u+a,m),A=h.fromArray(n,(u+3)%a,A),m=h.subtract(m,g,m),A=h.subtract(A,g,A),y=h.normalize(h.cross(m,A,y),y),t.normal&&(no.addAttribute(f,y,E),no.addAttribute(f,y,E+3),no.addAttribute(f,y,C),no.addAttribute(f,y,C+3)),(t.tangent||t.bitangent)&&(b=h.fromArray(i,u,b),t.bitangent&&(no.addAttribute(p,b,E),no.addAttribute(p,b,E+3),no.addAttribute(p,b,C),no.addAttribute(p,b,C+3)),t.tangent&&(x=h.normalize(h.cross(b,y,x),x),no.addAttribute(d,x,E),no.addAttribute(d,x,E+3),no.addAttribute(d,x,C),no.addAttribute(d,x,C+3))),C+=6}if(t.normal){for(f.set(i),u=0;u<a;u+=3)f[u+a]=-i[u],f[u+a+1]=-i[u+1],f[u+a+2]=-i[u+2];e.normal.values=f}else e.normal=void 0;if(t.bitangent?(p.set(o),p.set(o,a),e.bitangent.values=p):e.bitangent=void 0,t.tangent){let E=e.tangent.values;d.set(E),d.set(E,a),e.tangent.values=d}}if(t.st){let f=e.st.values,d=new Float32Array(s*6);d.set(f),d.set(f,s);let p=s*2;for(let g=0;g<2;g++){for(d[p++]=f[0],d[p++]=f[1],u=2;u<s;u+=2){let m=f[u],A=f[u+1];d[p++]=m,d[p++]=A,d[p++]=m,d[p++]=A}d[p++]=f[0],d[p++]=f[1]}e.st.values=d}return e}function x$(e,t,n){n[t++]=e[0],n[t++]=e[1],n[t++]=e[2];for(let i=3;i<e.length;i+=3){let o=e[i],r=e[i+1],a=e[i+2];n[t++]=o,n[t++]=r,n[t++]=a,n[t++]=o,n[t++]=r,n[t++]=a}return n[t++]=e[0],n[t++]=e[1],n[t++]=e[2],n}function Oct(e,t){let n=new Ne({position:t.position,normal:t.normal||t.bitangent||e.shadowVolume,tangent:t.tangent,bitangent:t.normal||t.bitangent,st:t.st}),i=e.ellipsoid,o=no.computePositions(e),r=lye(o,n,i),a=e.height,s=e.extrudedHeight,c=r.attributes,u=r.indices,f=c.position.values,d=f.length,p=new Float64Array(d*6),g=new Float64Array(d);g.set(f);let m=new Float64Array(d*4);f=ni.scaleToGeodeticHeight(f,a,i),m=x$(f,0,m),g=ni.scaleToGeodeticHeight(g,s,i),m=x$(g,d*2,m),p.set(f),p.set(g,d),p.set(m,d*2),c.position.values=p,c=Rct(c,t);let A,y=d/3;if(e.shadowVolume){let B=c.normal.values;d=B.length;let L=new Float32Array(d*6);for(A=0;A<d;A++)B[A]=-B[A];L.set(B,d),L=x$(B,d*4,L),c.extrudeDirection=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:L}),t.normal||(c.normal=void 0)}if(l(e.offsetAttribute)){let B=new Uint8Array(y*6);if(e.offsetAttribute===ln.TOP)B=B.fill(1,0,y).fill(1,y*2,y*4);else{let L=e.offsetAttribute===ln.NONE?0:1;B=B.fill(L)}c.applyOffset=new Me({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:B})}let x=u.length,b=y+y,C=Ue.createTypedArray(p.length/3,x*2+b*3);C.set(u);let E=x;for(A=0;A<x;A+=3){let B=u[A],L=u[A+1],_=u[A+2];C[E++]=_+y,C[E++]=L+y,C[E++]=B+y}let S,w,P,R;for(A=0;A<b;A+=2)S=A+b,w=S+b,P=S+1,R=w+1,C[E++]=S,C[E++]=w,C[E++]=P,C[E++]=P,C[E++]=w,C[E++]=R;return{attributes:c,indices:C}}var iye=new h,GF=new h,Kd=new de;function oye(e,t,n,i,o,r){let a=h.subtract(t,e,iye);h.normalize(a,a);let s=n.geodeticSurfaceNormal(e,GF),c=h.cross(a,s,iye);h.multiplyByScalar(c,i,c);let u=o.latitude,f=o.longitude,d=r.latitude,p=r.longitude;h.add(e,c,GF),n.cartesianToCartographic(GF,Kd);let g=Kd.latitude,m=Kd.longitude;u=Math.min(u,g),f=Math.min(f,m),d=Math.max(d,g),p=Math.max(p,m),h.subtract(e,c,GF),n.cartesianToCartographic(GF,Kd),g=Kd.latitude,m=Kd.longitude,u=Math.min(u,g),f=Math.min(f,m),d=Math.max(d,g),p=Math.max(p,m),o.latitude=u,o.longitude=f,r.latitude=d,r.longitude=p}var Xd=new h,HF=new h,ju=new de,Gu=new de;function uye(e,t,n,i,o){e=cye(e,t);let r=Fo(e,h.equalsEpsilon),a=r.length;if(a<2||n<=0)return new oe;let s=n*.5;ju.latitude=Number.POSITIVE_INFINITY,ju.longitude=Number.POSITIVE_INFINITY,Gu.latitude=Number.NEGATIVE_INFINITY,Gu.longitude=Number.NEGATIVE_INFINITY;let c,u;if(i===Xi.ROUNDED){let p=r[0];h.subtract(p,r[1],Xd),h.normalize(Xd,Xd),h.multiplyByScalar(Xd,s,Xd),h.add(p,Xd,HF),t.cartesianToCartographic(HF,Kd),c=Kd.latitude,u=Kd.longitude,ju.latitude=Math.min(ju.latitude,c),ju.longitude=Math.min(ju.longitude,u),Gu.latitude=Math.max(Gu.latitude,c),Gu.longitude=Math.max(Gu.longitude,u)}for(let p=0;p<a-1;++p)oye(r[p],r[p+1],t,s,ju,Gu);let f=r[a-1];h.subtract(f,r[a-2],Xd),h.normalize(Xd,Xd),h.multiplyByScalar(Xd,s,Xd),h.add(f,Xd,HF),oye(f,HF,t,s,ju,Gu),i===Xi.ROUNDED&&(t.cartesianToCartographic(HF,Kd),c=Kd.latitude,u=Kd.longitude,ju.latitude=Math.min(ju.latitude,c),ju.longitude=Math.min(ju.longitude,u),Gu.latitude=Math.max(Gu.latitude,c),Gu.longitude=Math.max(Gu.longitude,u));let d=l(o)?o:new oe;return d.north=Gu.latitude,d.south=ju.latitude,d.east=Gu.longitude,d.west=ju.longitude,d}function Jg(e){e=e??G.EMPTY_OBJECT;let t=e.positions,n=e.width,i=e.height??0,o=e.extrudedHeight??i;this._positions=t,this._ellipsoid=te.clone(e.ellipsoid??te.default),this._vertexFormat=Ne.clone(e.vertexFormat??Ne.DEFAULT),this._width=n,this._height=Math.max(i,o),this._extrudedHeight=Math.min(i,o),this._cornerType=e.cornerType??Xi.ROUNDED,this._granularity=e.granularity??D.RADIANS_PER_DEGREE,this._shadowVolume=e.shadowVolume??!1,this._workerName="createCorridorGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this.packedLength=1+t.length*h.packedLength+te.packedLength+Ne.packedLength+7}Jg.pack=function(e,t,n){n=n??0;let i=e._positions,o=i.length;t[n++]=o;for(let r=0;r<o;++r,n+=h.packedLength)h.pack(i[r],t,n);return te.pack(e._ellipsoid,t,n),n+=te.packedLength,Ne.pack(e._vertexFormat,t,n),n+=Ne.packedLength,t[n++]=e._width,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._cornerType,t[n++]=e._granularity,t[n++]=e._shadowVolume?1:0,t[n]=e._offsetAttribute??-1,t};var fye=te.clone(te.UNIT_SPHERE),dye=new Ne,$g={positions:void 0,ellipsoid:fye,vertexFormat:dye,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,shadowVolume:void 0,offsetAttribute:void 0};Jg.unpack=function(e,t,n){t=t??0;let i=e[t++],o=new Array(i);for(let m=0;m<i;++m,t+=h.packedLength)o[m]=h.unpack(e,t);let r=te.unpack(e,t,fye);t+=te.packedLength;let a=Ne.unpack(e,t,dye);t+=Ne.packedLength;let s=e[t++],c=e[t++],u=e[t++],f=e[t++],d=e[t++],p=e[t++]===1,g=e[t];return l(n)?(n._positions=o,n._ellipsoid=te.clone(r,n._ellipsoid),n._vertexFormat=Ne.clone(a,n._vertexFormat),n._width=s,n._height=c,n._extrudedHeight=u,n._cornerType=f,n._granularity=d,n._shadowVolume=p,n._offsetAttribute=g===-1?void 0:g,n):($g.positions=o,$g.width=s,$g.height=c,$g.extrudedHeight=u,$g.cornerType=f,$g.granularity=d,$g.shadowVolume=p,$g.offsetAttribute=g===-1?void 0:g,new Jg($g))};Jg.computeRectangle=function(e,t){e=e??G.EMPTY_OBJECT;let n=e.positions,i=e.width,o=e.ellipsoid??te.default,r=e.cornerType??Xi.ROUNDED;return uye(n,o,i,r,t)};Jg.createGeometry=function(e){let t=e._positions,n=e._width,i=e._ellipsoid;t=cye(t,i);let o=Fo(t,h.equalsEpsilon);if(o.length<2||n<=0)return;let r=e._height,a=e._extrudedHeight,s=!D.equalsEpsilon(r,a,0,D.EPSILON2),c=e._vertexFormat,u={ellipsoid:i,positions:o,width:n,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!0},f;if(s)u.height=r,u.extrudedHeight=a,u.shadowVolume=e._shadowVolume,u.offsetAttribute=e._offsetAttribute,f=Oct(u,c);else{let g=no.computePositions(u);if(f=lye(g,c,i),f.attributes.position.values=ni.scaleToGeodeticHeight(f.attributes.position.values,r,i),l(e._offsetAttribute)){let m=e._offsetAttribute===ln.NONE?0:1,A=f.attributes.position.values.length,y=new Uint8Array(A/3).fill(m);f.attributes.applyOffset=new Me({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:y})}}let d=f.attributes,p=ce.fromVertices(d.position.values,void 0,3);return c.position||(f.attributes.position.values=void 0),new At({attributes:d,indices:f.indices,primitiveType:Re.TRIANGLES,boundingSphere:p,offsetAttribute:e._offsetAttribute})};Jg.createShadowVolume=function(e,t,n){let i=e._granularity,o=e._ellipsoid,r=t(i,o),a=n(i,o);return new Jg({positions:e._positions,width:e._width,cornerType:e._cornerType,ellipsoid:o,granularity:i,extrudedHeight:r,height:a,vertexFormat:Ne.POSITION_ONLY,shadowVolume:!0})};Object.defineProperties(Jg.prototype,{rectangle:{get:function(){return l(this._rectangle)||(this._rectangle=uye(this._positions,this._ellipsoid,this._width,this._cornerType)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return[0,0,0,1,1,0]}}});var AC=Jg;var hye=new h,mye=new h,Mct=new h;function Bct(e,t){for(let n=0;n<e.length;n++)e[n]=t.scaleToGeodeticSurface(e[n],e[n]);return e}function pye(e,t){let n=[],i=e.positions,o=e.corners,r=e.endPositions,a=new pn,s,c=0,u=0,f,d=0,p;for(f=0;f<i.length;f+=2)p=i[f].length-3,c+=p,d+=p/3*4,u+=i[f+1].length-3;for(c+=3,u+=3,f=0;f<o.length;f++){s=o[f];let O=o[f].leftPositions;l(O)?(p=O.length,c+=p,d+=p/3*2):(p=o[f].rightPositions.length,u+=p,d+=p/3*2)}let g=l(r),m;g&&(m=r[0].length-3,c+=m,u+=m,m/=3,d+=m*4);let A=c+u,y=new Float64Array(A),x=0,b=A-1,C,E,S,w,P,R,B=m/2,L=Ue.createTypedArray(A/3,d+4),_=0;if(L[_++]=x/3,L[_++]=(b-2)/3,g){n.push(x/3),R=hye,P=mye;let O=r[0];for(f=0;f<B;f++)R=h.fromArray(O,(B-1-f)*3,R),P=h.fromArray(O,(B+f)*3,P),no.addAttribute(y,P,x),no.addAttribute(y,R,void 0,b),E=x/3,w=E+1,C=(b-2)/3,S=C-1,L[_++]=C,L[_++]=S,L[_++]=E,L[_++]=w,x+=3,b-=3}let T=0,v=i[T++],I=i[T++];for(y.set(v,x),y.set(I,b-I.length+1),p=I.length-3,n.push(x/3,(b-2)/3),f=0;f<p;f+=3)E=x/3,w=E+1,C=(b-2)/3,S=C-1,L[_++]=C,L[_++]=S,L[_++]=E,L[_++]=w,x+=3,b-=3;for(f=0;f<o.length;f++){let O;s=o[f];let N=s.leftPositions,j=s.rightPositions,k,U=Mct;if(l(N)){for(b-=3,k=S,n.push(w),O=0;O<N.length/3;O++)U=h.fromArray(N,O*3,U),L[_++]=k-O-1,L[_++]=k-O,no.addAttribute(y,U,void 0,b),b-=3;n.push(k-Math.floor(N.length/6)),t===Xi.BEVELED&&n.push((b-2)/3+1),x+=3}else{for(x+=3,k=w,n.push(S),O=0;O<j.length/3;O++)U=h.fromArray(j,O*3,U),L[_++]=k+O,L[_++]=k+O+1,no.addAttribute(y,U,x),x+=3;n.push(k+Math.floor(j.length/6)),t===Xi.BEVELED&&n.push(x/3-1),b-=3}for(v=i[T++],I=i[T++],v.splice(0,3),I.splice(I.length-3,3),y.set(v,x),y.set(I,b-I.length+1),p=I.length-3,O=0;O<I.length;O+=3)w=x/3,E=w-1,S=(b-2)/3,C=S+1,L[_++]=C,L[_++]=S,L[_++]=E,L[_++]=w,x+=3,b-=3;x-=3,b+=3,n.push(x/3,(b-2)/3)}if(g){x+=3,b-=3,R=hye,P=mye;let O=r[1];for(f=0;f<B;f++)R=h.fromArray(O,(m-f-1)*3,R),P=h.fromArray(O,f*3,P),no.addAttribute(y,R,void 0,b),no.addAttribute(y,P,x),w=x/3,E=w-1,S=(b-2)/3,C=S+1,L[_++]=C,L[_++]=S,L[_++]=E,L[_++]=w,x+=3,b-=3;n.push(x/3)}else n.push(x/3,(b-2)/3);return L[_++]=x/3,L[_++]=(b-2)/3,a.position=new Me({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:y}),{attributes:a,indices:L,wallIndices:n}}function Lct(e){let t=e.ellipsoid,n=no.computePositions(e),i=pye(n,e.cornerType),o=i.wallIndices,r=e.height,a=e.extrudedHeight,s=i.attributes,c=i.indices,u=s.position.values,f=u.length,d=new Float64Array(f);d.set(u);let p=new Float64Array(f*2);if(u=ni.scaleToGeodeticHeight(u,r,t),d=ni.scaleToGeodeticHeight(d,a,t),p.set(u),p.set(d,f),s.position.values=p,f/=3,l(e.offsetAttribute)){let C=new Uint8Array(f*2);if(e.offsetAttribute===ln.TOP)C=C.fill(1,0,f);else{let E=e.offsetAttribute===ln.NONE?0:1;C=C.fill(E)}s.applyOffset=new Me({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:C})}let g,m=c.length,A=Ue.createTypedArray(p.length/3,(m+o.length)*2);A.set(c);let y=m;for(g=0;g<m;g+=2){let C=c[g],E=c[g+1];A[y++]=C+f,A[y++]=E+f}let x,b;for(g=0;g<o.length;g++)x=o[g],b=x+f,A[y++]=x,A[y++]=b;return{attributes:s,indices:A}}function WF(e){e=e??G.EMPTY_OBJECT;let t=e.positions,n=e.width,i=e.height??0,o=e.extrudedHeight??i;this._positions=t,this._ellipsoid=te.clone(e.ellipsoid??te.default),this._width=n,this._height=Math.max(i,o),this._extrudedHeight=Math.min(i,o),this._cornerType=e.cornerType??Xi.ROUNDED,this._granularity=e.granularity??D.RADIANS_PER_DEGREE,this._offsetAttribute=e.offsetAttribute,this._workerName="createCorridorOutlineGeometry",this.packedLength=1+t.length*h.packedLength+te.packedLength+6}WF.pack=function(e,t,n){n=n??0;let i=e._positions,o=i.length;t[n++]=o;for(let r=0;r<o;++r,n+=h.packedLength)h.pack(i[r],t,n);return te.pack(e._ellipsoid,t,n),n+=te.packedLength,t[n++]=e._width,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._cornerType,t[n++]=e._granularity,t[n]=e._offsetAttribute??-1,t};var gye=te.clone(te.UNIT_SPHERE),ly={positions:void 0,ellipsoid:gye,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,offsetAttribute:void 0};WF.unpack=function(e,t,n){t=t??0;let i=e[t++],o=new Array(i);for(let p=0;p<i;++p,t+=h.packedLength)o[p]=h.unpack(e,t);let r=te.unpack(e,t,gye);t+=te.packedLength;let a=e[t++],s=e[t++],c=e[t++],u=e[t++],f=e[t++],d=e[t];return l(n)?(n._positions=o,n._ellipsoid=te.clone(r,n._ellipsoid),n._width=a,n._height=s,n._extrudedHeight=c,n._cornerType=u,n._granularity=f,n._offsetAttribute=d===-1?void 0:d,n):(ly.positions=o,ly.width=a,ly.height=s,ly.extrudedHeight=c,ly.cornerType=u,ly.granularity=f,ly.offsetAttribute=d===-1?void 0:d,new WF(ly))};WF.createGeometry=function(e){let t=e._positions,n=e._width,i=e._ellipsoid;t=Bct(t,i);let o=Fo(t,h.equalsEpsilon);if(o.length<2||n<=0)return;let r=e._height,a=e._extrudedHeight,s=!D.equalsEpsilon(r,a,0,D.EPSILON2),c={ellipsoid:i,positions:o,width:n,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!1},u;if(s)c.height=r,c.extrudedHeight=a,c.offsetAttribute=e._offsetAttribute,u=Lct(c);else{let p=no.computePositions(c);if(u=pye(p,c.cornerType),u.attributes.position.values=ni.scaleToGeodeticHeight(u.attributes.position.values,r,i),l(e._offsetAttribute)){let g=u.attributes.position.values.length,m=e._offsetAttribute===ln.NONE?0:1,A=new Uint8Array(g/3).fill(m);u.attributes.applyOffset=new Me({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:A})}}let f=u.attributes,d=ce.fromVertices(f.position.values,void 0,3);return new At({attributes:f,indices:u.indices,primitiveType:Re.LINES,boundingSphere:d,offsetAttribute:e._offsetAttribute})};var qF=WF;var Nct=new ci(0);function ou(e){bi.call(this,e),this._zIndex=0,this._terrainOffsetProperty=void 0}l(Object.create)&&(ou.prototype=Object.create(bi.prototype),ou.prototype.constructor=ou);Object.defineProperties(ou.prototype,{zIndex:{get:function(){return this._zIndex}},terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}});ou.prototype._isOnTerrain=function(e,t){return this._fillEnabled&&!l(t.height)&&!l(t.extrudedHeight)&&Nl.isSupported(this._scene)};ou.prototype._getIsClosed=function(e){let t=e.height,n=e.extrudedHeight;return t===0||l(n)&&n!==t};ou.prototype._computeCenter=_e.throwInstantiationError;ou.prototype._onEntityPropertyChanged=function(e,t,n,i){if(bi.prototype._onEntityPropertyChanged.call(this,e,t,n,i),this._observedPropertyNames.indexOf(t)===-1)return;let o=this._entity[this._geometryPropertyName];if(!l(o))return;l(o.zIndex)&&(l(o.height)||l(o.extrudedHeight))&&_t(_t.geometryZIndex),this._zIndex=o.zIndex??Nct,l(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0);let r=o.heightReference,a=o.extrudedHeightReference;if(l(r)||l(a)){let s=new jh(this._computeCenter.bind(this),!this._dynamic);this._terrainOffsetProperty=new Zx(this._scene,s,r,a)}};ou.prototype.destroy=function(){l(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0),bi.prototype.destroy.call(this)};ou.getGeometryHeight=function(e,t){if(!l(e)){t!==nt.NONE&&_t(_t.geometryHeightReference);return}return bd(t)?0:e};ou.getGeometryExtrudedHeight=function(e,t){if(!l(e)){t!==nt.NONE&&_t(_t.geometryExtrudedHeightReference);return}return bd(t)?ou.CLAMP_TO_GROUND:e};ou.CLAMP_TO_GROUND="clamp";ou.computeGeometryOffsetAttribute=function(e,t,n,i){(!l(e)||!l(t))&&(t=nt.NONE),(!l(n)||!l(i))&&(i=nt.NONE);let o=0;if(t!==nt.NONE&&o++,i===nt.RELATIVE_TO_GROUND&&o++,o===2)return ln.ALL;if(o===1)return ln.TOP};var $n=ou;var _ye=new V,Aye=h.ZERO,yye=new h,xye=new oe;function Fct(e){this.id=e,this.vertexFormat=void 0,this.positions=void 0,this.width=void 0,this.cornerType=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.offsetAttribute=void 0}function xm(e,t){$n.call(this,{entity:e,scene:t,geometryOptions:new Fct(e),geometryPropertyName:"corridor",observedPropertyNames:["availability","corridor"]}),this._onEntityPropertyChanged(e,"corridor",e.corridor,void 0)}l(Object.create)&&(xm.prototype=Object.create($n.prototype),xm.prototype.constructor=xm);xm.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i={show:new En(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:Hn.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};if(this._materialProperty instanceof Wt){let o;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(o=this._materialProperty.color.getValue(e,_ye)),l(o)||(o=V.WHITE),i.color=Yt.fromColor(o)}return l(this._options.offsetAttribute)&&(i.offset=po.fromCartesian3(X.getValueOrDefault(this._terrainOffsetProperty,e,Aye,yye))),new Ot({id:t,geometry:new AC(this._options),attributes:i})};xm.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=X.getValueOrDefault(this._outlineColorProperty,e,V.BLACK,_ye),o={show:new En(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Yt.fromColor(i),distanceDisplayCondition:Hn.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0};return l(this._options.offsetAttribute)&&(o.offset=po.fromCartesian3(X.getValueOrDefault(this._terrainOffsetProperty,e,Aye,yye))),new Ot({id:t,geometry:new qF(this._options),attributes:o})};xm.prototype._computeCenter=function(e,t){let n=X.getValueOrUndefined(this._entity.corridor.positions,e);if(!(!l(n)||n.length===0))return h.clone(n[Math.floor(n.length/2)],t)};xm.prototype._isHidden=function(e,t){return!l(t.positions)||!l(t.width)||bi.prototype._isHidden.call(this,e,t)};xm.prototype._isDynamic=function(e,t){return!t.positions.isConstant||!X.isConstant(t.height)||!X.isConstant(t.extrudedHeight)||!X.isConstant(t.granularity)||!X.isConstant(t.width)||!X.isConstant(t.outlineWidth)||!X.isConstant(t.cornerType)||!X.isConstant(t.zIndex)||this._onTerrain&&!X.isConstant(this._materialProperty)&&!(this._materialProperty instanceof Wt)};xm.prototype._setStaticOptions=function(e,t){let n=X.getValueOrUndefined(t.height,Qe.MINIMUM_VALUE),i=X.getValueOrDefault(t.heightReference,Qe.MINIMUM_VALUE,nt.NONE),o=X.getValueOrUndefined(t.extrudedHeight,Qe.MINIMUM_VALUE),r=X.getValueOrDefault(t.extrudedHeightReference,Qe.MINIMUM_VALUE,nt.NONE);l(o)&&!l(n)&&(n=0);let a=this._options;a.vertexFormat=this._materialProperty instanceof Wt?dn.VERTEX_FORMAT:go.MaterialSupport.TEXTURED.vertexFormat,a.positions=t.positions.getValue(Qe.MINIMUM_VALUE,a.positions),a.width=t.width.getValue(Qe.MINIMUM_VALUE),a.granularity=X.getValueOrUndefined(t.granularity,Qe.MINIMUM_VALUE),a.cornerType=X.getValueOrUndefined(t.cornerType,Qe.MINIMUM_VALUE),a.offsetAttribute=$n.computeGeometryOffsetAttribute(n,i,o,r),a.height=$n.getGeometryHeight(n,i),o=$n.getGeometryExtrudedHeight(o,r),o===$n.CLAMP_TO_GROUND&&(o=vi.getMinimumMaximumHeights(AC.computeRectangle(a,xye)).minimumTerrainHeight),a.extrudedHeight=o};xm.DynamicGeometryUpdater=OS;function OS(e,t,n){xi.call(this,e,t,n)}l(Object.create)&&(OS.prototype=Object.create(xi.prototype),OS.prototype.constructor=OS);OS.prototype._isHidden=function(e,t,n){let i=this._options;return!l(i.positions)||!l(i.width)||xi.prototype._isHidden.call(this,e,t,n)};OS.prototype._setOptions=function(e,t,n){let i=this._options,o=X.getValueOrUndefined(t.height,n),r=X.getValueOrDefault(t.heightReference,n,nt.NONE),a=X.getValueOrUndefined(t.extrudedHeight,n),s=X.getValueOrDefault(t.extrudedHeightReference,n,nt.NONE);l(a)&&!l(o)&&(o=0),i.positions=X.getValueOrUndefined(t.positions,n),i.width=X.getValueOrUndefined(t.width,n),i.granularity=X.getValueOrUndefined(t.granularity,n),i.cornerType=X.getValueOrUndefined(t.cornerType,n),i.offsetAttribute=$n.computeGeometryOffsetAttribute(o,r,a,s),i.height=$n.getGeometryHeight(o,r),a=$n.getGeometryExtrudedHeight(a,s),a===$n.CLAMP_TO_GROUND&&(a=vi.getMinimumMaximumHeights(AC.computeRectangle(i,xye)).minimumTerrainHeight),i.extrudedHeight=a};var YF=xm;function IG(){_e.throwInstantiationError()}Object.defineProperties(IG.prototype,{name:{get:_e.throwInstantiationError},clock:{get:_e.throwInstantiationError},entities:{get:_e.throwInstantiationError},isLoading:{get:_e.throwInstantiationError},changedEvent:{get:_e.throwInstantiationError},errorEvent:{get:_e.throwInstantiationError},loadingEvent:{get:_e.throwInstantiationError},show:{get:_e.throwInstantiationError},clustering:{get:_e.throwInstantiationError}});IG.prototype.update=function(e){_e.throwInstantiationError()};IG.setLoading=function(e,t){e._isLoading!==t&&(t?e._entityCollection.suspendEvents():e._entityCollection.resumeEvents(),e._isLoading=t,e._loading.raiseEvent(e,t))};var Ea=IG;function Fp(e,t){this._ellipsoid=e,this._cameraPosition=new h,this._cameraPositionInScaledSpace=new h,this._distanceToLimbInScaledSpaceSquared=0,l(t)&&(this.cameraPosition=t)}Object.defineProperties(Fp.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},cameraPosition:{get:function(){return this._cameraPosition},set:function(e){let n=this._ellipsoid.transformPositionToScaledSpace(e,this._cameraPositionInScaledSpace),i=h.magnitudeSquared(n)-1;h.clone(e,this._cameraPosition),this._cameraPositionInScaledSpace=n,this._distanceToLimbInScaledSpaceSquared=i}}});var bye=new h;Fp.prototype.isPointVisible=function(e){let n=this._ellipsoid.transformPositionToScaledSpace(e,bye);return C$(n,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};Fp.prototype.isScaledSpacePointVisible=function(e){return C$(e,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};var kct=new h;Fp.prototype.isScaledSpacePointVisiblePossiblyUnderEllipsoid=function(e,t){let n=this._ellipsoid,i,o;return l(t)&&t<0&&n.minimumRadius>-t?(o=kct,o.x=this._cameraPosition.x/(n.radii.x+t),o.y=this._cameraPosition.y/(n.radii.y+t),o.z=this._cameraPosition.z/(n.radii.z+t),i=o.x*o.x+o.y*o.y+o.z*o.z-1):(o=this._cameraPositionInScaledSpace,i=this._distanceToLimbInScaledSpaceSquared),C$(e,o,i)};Fp.prototype.computeHorizonCullingPoint=function(e,t,n){return Eye(this._ellipsoid,e,t,n)};var Cye=te.clone(te.UNIT_SPHERE);Fp.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid=function(e,t,n,i){let o=Tye(this._ellipsoid,n,Cye);return Eye(o,e,t,i)};Fp.prototype.computeHorizonCullingPointFromVertices=function(e,t,n,i,o){return vye(this._ellipsoid,e,t,n,i,o)};Fp.prototype.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid=function(e,t,n,i,o,r){let a=Tye(this._ellipsoid,o,Cye);return vye(a,e,t,n,i,r)};var zct=[];Fp.prototype.computeHorizonCullingPointFromRectangle=function(e,t,n){let i=oe.subsample(e,t,0,zct),o=ce.fromPoints(i);if(!(h.magnitude(o.center)<.1*t.minimumRadius))return this.computeHorizonCullingPoint(o.center,i,n)};var Uct=new h;function Tye(e,t,n){if(l(t)&&t<0&&e.minimumRadius>-t){let i=h.fromElements(e.radii.x+t,e.radii.y+t,e.radii.z+t,Uct);e=te.fromCartesian3(i,n)}return e}function Eye(e,t,n,i){l(i)||(i=new h);let o=Iye(e,t),r=0;for(let a=0,s=n.length;a<s;++a){let c=n[a],u=Sye(e,c,o);if(u<0)return;r=Math.max(r,u)}return wye(o,r,i)}var DG=new h;function vye(e,t,n,i,o,r){l(r)||(r=new h),i=i??3,o=o??h.ZERO;let a=Iye(e,t),s=0;for(let c=0,u=n.length;c<u;c+=i){DG.x=n[c]+o.x,DG.y=n[c+1]+o.y,DG.z=n[c+2]+o.z;let f=Sye(e,DG,a);if(f<0)return;s=Math.max(s,f)}return wye(a,s,r)}function C$(e,t,n){let i=t,o=n,r=h.subtract(e,i,bye),a=-h.dot(r,i);return!(o<0?a>0:a>o&&a*a/h.magnitudeSquared(r)>o)}var Vct=new h,jct=new h;function Sye(e,t,n){let i=e.transformPositionToScaledSpace(t,Vct),o=h.magnitudeSquared(i),r=Math.sqrt(o),a=h.divideByScalar(i,r,jct);o=Math.max(1,o),r=Math.max(1,r);let s=h.dot(a,n),c=h.magnitude(h.cross(a,n,a)),u=1/r,f=Math.sqrt(o-1)*u;return 1/(s*u-c*f)}function wye(e,t,n){if(!(t<=0||t===1/0||t!==t))return h.multiplyByScalar(e,t,n)}var b$=new h;function Iye(e,t){return h.equals(t,h.ZERO)?t:(e.transformPositionToScaledSpace(t,b$),h.normalize(b$,b$))}var bm=Fp;function oa(e,t){e=e??G.EMPTY_OBJECT;let n=e.translucencyByDistance,i=e.scaleByDistance,o=e.distanceDisplayCondition;l(n)&&(n=zt.clone(n)),l(i)&&(i=zt.clone(i)),l(o)&&(o=kt.clone(o)),this._show=e.show??!0,this._position=h.clone(e.position??h.ZERO),this._actualPosition=h.clone(this._position),this._color=V.clone(e.color??V.WHITE),this._outlineColor=V.clone(e.outlineColor??V.TRANSPARENT),this._outlineWidth=e.outlineWidth??0,this._pixelSize=e.pixelSize??10,this._scaleByDistance=i,this._translucencyByDistance=n,this._distanceDisplayCondition=o,this._disableDepthTestDistance=e.disableDepthTestDistance??0,this._id=e.id,this._collection=e.collection??t,this._clusterShow=!0,this._pickId=void 0,this._pointPrimitiveCollection=t,this._dirty=!1,this._index=-1,this._splitDirection=e.splitDirection??Or.NONE}var Dye=oa.SHOW_INDEX=0,Oye=oa.POSITION_INDEX=1,Gct=oa.COLOR_INDEX=2,Hct=oa.OUTLINE_COLOR_INDEX=3,Wct=oa.OUTLINE_WIDTH_INDEX=4,qct=oa.PIXEL_SIZE_INDEX=5,Yct=oa.SCALE_BY_DISTANCE_INDEX=6,Xct=oa.TRANSLUCENCY_BY_DISTANCE_INDEX=7,Kct=oa.DISTANCE_DISPLAY_CONDITION_INDEX=8,Qct=oa.DISABLE_DEPTH_DISTANCE_INDEX=9,$ct=oa.SPLIT_DIRECTION_INDEX=10;oa.NUMBER_OF_PROPERTIES=11;function Mf(e,t){let n=e._pointPrimitiveCollection;l(n)&&(n._updatePointPrimitive(e,t),e._dirty=!0)}Object.defineProperties(oa.prototype,{show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,Mf(this,Dye))}},position:{get:function(){return this._position},set:function(e){let t=this._position;h.equals(t,e)||(h.clone(e,t),h.clone(e,this._actualPosition),Mf(this,Oye))}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){let t=this._scaleByDistance;zt.equals(t,e)||(this._scaleByDistance=zt.clone(e,t),Mf(this,Yct))}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){let t=this._translucencyByDistance;zt.equals(t,e)||(this._translucencyByDistance=zt.clone(e,t),Mf(this,Xct))}},pixelSize:{get:function(){return this._pixelSize},set:function(e){this._pixelSize!==e&&(this._pixelSize=e,Mf(this,qct))}},color:{get:function(){return this._color},set:function(e){let t=this._color;V.equals(t,e)||(V.clone(e,t),Mf(this,Gct))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){let t=this._outlineColor;V.equals(t,e)||(V.clone(e,t),Mf(this,Hct))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){this._outlineWidth!==e&&(this._outlineWidth=e,Mf(this,Wct))}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){kt.equals(this._distanceDisplayCondition,e)||(this._distanceDisplayCondition=kt.clone(e,this._distanceDisplayCondition),Mf(this,Kct))}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){this._disableDepthTestDistance!==e&&(this._disableDepthTestDistance=e,Mf(this,Qct))}},id:{get:function(){return this._id},set:function(e){this._id=e,l(this._pickId)&&(this._pickId.object.id=e)}},pickId:{get:function(){return this._pickId}},clusterShow:{get:function(){return this._clusterShow},set:function(e){this._clusterShow!==e&&(this._clusterShow=e,Mf(this,Dye))}},splitDirection:{get:function(){return this._splitDirection},set:function(e){this._splitDirection!==e&&(this._splitDirection=e,Mf(this,$ct))}}});oa.prototype.getPickId=function(e){return l(this._pickId)||(this._pickId=e.createPickId({primitive:this,collection:this._collection,id:this._id})),this._pickId};oa.prototype._getActualPosition=function(){return this._actualPosition};oa.prototype._setActualPosition=function(e){h.clone(e,this._actualPosition),Mf(this,Oye)};var Pye=new se;oa._computeActualPosition=function(e,t,n){return t.mode===ie.SCENE3D?e:(M.multiplyByPoint(n,e,Pye),eo.computeActualEllipsoidPosition(t,Pye))};var Rye=new se;oa._computeScreenSpacePosition=function(e,t,n,i){let o=M.multiplyByVector(e,se.fromElements(t.x,t.y,t.z,1,Rye),Rye);return eo.worldToWindowCoordinates(n,o,i)};oa.prototype.computeScreenSpacePosition=function(e,t){let n=this._pointPrimitiveCollection;l(t)||(t=new z);let i=n.modelMatrix,o=oa._computeScreenSpacePosition(i,this._actualPosition,e,t);if(l(o))return o.y=e.canvas.clientHeight-o.y,o};oa.getScreenSpaceBoundingBox=function(e,t,n){let i=e.pixelSize,o=i*.5,r=t.x-o,a=t.y-o,s=i,c=i;return l(n)||(n=new Je),n.x=r,n.y=a,n.width=s,n.height=c,n};oa.prototype.equals=function(e){return this===e||l(e)&&this._id===e._id&&h.equals(this._position,e._position)&&V.equals(this._color,e._color)&&this._pixelSize===e._pixelSize&&this._outlineWidth===e._outlineWidth&&this._show===e._show&&V.equals(this._outlineColor,e._outlineColor)&&zt.equals(this._scaleByDistance,e._scaleByDistance)&&zt.equals(this._translucencyByDistance,e._translucencyByDistance)&&kt.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance&&this._splitDirection===e._splitDirection};oa.prototype._destroy=function(){this._pickId=this._pickId&&this._pickId.destroy(),this._pointPrimitiveCollection=void 0};var Cs=oa;var uy=`in vec4 v_color;
- in vec4 v_outlineColor;
- in float v_innerPercent;
- in float v_pixelDistance;
- in vec4 v_pickColor;
- in float v_splitDirection;
-
- void main()
- {
- if (v_splitDirection < 0.0 && gl_FragCoord.x > czm_splitPosition) discard;
- if (v_splitDirection > 0.0 && gl_FragCoord.x < czm_splitPosition) discard;
-
- // The distance in UV space from this fragment to the center of the point, at most 0.5.
- float distanceToCenter = length(gl_PointCoord - vec2(0.5));
- // The max distance stops one pixel shy of the edge to leave space for anti-aliasing.
- float maxDistance = max(0.0, 0.5 - v_pixelDistance);
- float wholeAlpha = 1.0 - smoothstep(maxDistance, 0.5, distanceToCenter);
- float innerAlpha = 1.0 - smoothstep(maxDistance * v_innerPercent, 0.5 * v_innerPercent, distanceToCenter);
-
- vec4 color = mix(v_outlineColor, v_color, innerAlpha);
- color.a *= wholeAlpha;
-
- // Fully transparent parts of the billboard are not pickable.
- #if !defined(OPAQUE) && !defined(TRANSLUCENT)
- if (color.a < 0.005) // matches 0/255 and 1/255
- {
- discard;
- }
- #else
- // The billboard is rendered twice. The opaque pass discards translucent fragments
- // and the translucent pass discards opaque fragments.
- #ifdef OPAQUE
- if (color.a < 0.995) // matches < 254/255
- {
- discard;
- }
- #else
- if (color.a >= 0.995) // matches 254/255 and 255/255
- {
- discard;
- }
- #endif
- #endif
-
- out_FragColor = czm_gammaCorrect(color);
- czm_writeLogDepth();
- }
- `;var XF=`uniform float u_maxTotalPointSize;
-
- in vec4 positionHighAndSize;
- in vec4 positionLowAndOutline;
- in vec4 compressedAttribute0; // color, outlineColor, pick color
- in vec4 compressedAttribute1; // show, translucency by distance, some free space
- in vec4 scaleByDistance; // near, nearScale, far, farScale
- in vec4 distanceDisplayConditionAndDisableDepthAndSplitDirection; // near, far, disableDepthTestDistance, splitDirection
-
- out vec4 v_color;
- out vec4 v_outlineColor;
- out float v_innerPercent;
- out float v_pixelDistance;
- out vec4 v_pickColor;
- out float v_splitDirection;
-
- const float SHIFT_LEFT8 = 256.0;
- const float SHIFT_RIGHT8 = 1.0 / 256.0;
-
- void main()
- {
- // Modifying this shader may also require modifications to PointPrimitive._computeScreenSpacePosition
-
- // unpack attributes
- vec3 positionHigh = positionHighAndSize.xyz;
- vec3 positionLow = positionLowAndOutline.xyz;
- float outlineWidthBothSides = 2.0 * positionLowAndOutline.w;
- float totalSize = positionHighAndSize.w + outlineWidthBothSides;
- float outlinePercent = outlineWidthBothSides / totalSize;
- // Scale in response to browser-zoom.
- totalSize *= czm_pixelRatio;
-
- float temp = compressedAttribute1.x * SHIFT_RIGHT8;
- float show = floor(temp);
-
- #ifdef EYE_DISTANCE_TRANSLUCENCY
- vec4 translucencyByDistance;
- translucencyByDistance.x = compressedAttribute1.z;
- translucencyByDistance.z = compressedAttribute1.w;
-
- translucencyByDistance.y = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;
-
- temp = compressedAttribute1.y * SHIFT_RIGHT8;
- translucencyByDistance.w = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;
- #endif
-
- ///////////////////////////////////////////////////////////////////////////
-
- vec4 color = czm_decodeRGB8(compressedAttribute0.x);
- vec4 outlineColor = czm_decodeRGB8(compressedAttribute0.y);
- vec4 pickColor = czm_decodeRGB8(compressedAttribute0.z);
- vec4 alphaPacked = czm_decodeRGB8(compressedAttribute0.w);
-
- color.a = alphaPacked.x;
- outlineColor.a = alphaPacked.y;
- pickColor.a = alphaPacked.z;
-
- ///////////////////////////////////////////////////////////////////////////
-
- vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);
- vec4 positionEC = czm_modelViewRelativeToEye * p;
-
- ///////////////////////////////////////////////////////////////////////////
-
- #if defined(EYE_DISTANCE_SCALING) || defined(EYE_DISTANCE_TRANSLUCENCY) || defined(DISTANCE_DISPLAY_CONDITION) || defined(DISABLE_DEPTH_DISTANCE)
- float lengthSq;
- if (czm_sceneMode == czm_sceneMode2D)
- {
- // 2D camera distance is a special case
- // treat all billboards as flattened to the z=0.0 plane
- lengthSq = czm_eyeHeight2D.y;
- }
- else
- {
- lengthSq = dot(positionEC.xyz, positionEC.xyz);
- }
- #endif
-
- #ifdef EYE_DISTANCE_SCALING
- totalSize *= czm_nearFarScalar(scaleByDistance, lengthSq);
- #endif
- if (totalSize > 0.0) {
- // Add padding for anti-aliasing on both sides.
- totalSize += 3.0;
- }
-
- // Clamp to max point size.
- totalSize = min(totalSize, u_maxTotalPointSize);
- // If size is too small, push vertex behind near plane for clipping.
- // Note that context.minimumAliasedPointSize "will be at most 1.0".
- if (totalSize < 1.0)
- {
- positionEC.xyz = vec3(0.0);
- totalSize = 1.0;
- }
-
- float translucency = 1.0;
- #ifdef EYE_DISTANCE_TRANSLUCENCY
- translucency = czm_nearFarScalar(translucencyByDistance, lengthSq);
- // push vertex behind near plane for clipping
- if (translucency < 0.004)
- {
- positionEC.xyz = vec3(0.0);
- }
- #endif
-
- #ifdef DISTANCE_DISPLAY_CONDITION
- float nearSq = distanceDisplayConditionAndDisableDepthAndSplitDirection.x;
- float farSq = distanceDisplayConditionAndDisableDepthAndSplitDirection.y;
- if (lengthSq < nearSq || lengthSq > farSq) {
- // push vertex behind camera to force it to be clipped
- positionEC.xyz = vec3(0.0, 0.0, 1.0);
- }
- #endif
-
- gl_Position = czm_projection * positionEC;
- czm_vertexLogDepth();
-
- #ifdef DISABLE_DEPTH_DISTANCE
- float disableDepthTestDistance = distanceDisplayConditionAndDisableDepthAndSplitDirection.z;
- if (disableDepthTestDistance == 0.0 && czm_minimumDisableDepthTestDistance != 0.0)
- {
- disableDepthTestDistance = czm_minimumDisableDepthTestDistance;
- }
-
- if (disableDepthTestDistance != 0.0)
- {
- // Don't try to "multiply both sides" by w. Greater/less-than comparisons won't work for negative values of w.
- float zclip = gl_Position.z / gl_Position.w;
- bool clipped = (zclip < -1.0 || zclip > 1.0);
- if (!clipped && (disableDepthTestDistance < 0.0 || (lengthSq > 0.0 && lengthSq < disableDepthTestDistance)))
- {
- // Position z on the near plane.
- gl_Position.z = -gl_Position.w;
- #ifdef LOG_DEPTH
- czm_vertexLogDepth(vec4(czm_currentFrustum.x));
- #endif
- }
- }
- #endif
-
- v_color = color;
- v_color.a *= translucency * show;
- v_outlineColor = outlineColor;
- v_outlineColor.a *= translucency * show;
-
- v_innerPercent = 1.0 - outlinePercent;
- v_pixelDistance = 2.0 / totalSize;
- gl_PointSize = totalSize * show;
- gl_Position *= show;
-
- v_pickColor = pickColor;
- v_splitDirection = distanceDisplayConditionAndDisableDepthAndSplitDirection.w;
- }
- `;var Jct=Cs.SHOW_INDEX,v$=Cs.POSITION_INDEX,Mye=Cs.COLOR_INDEX,Zct=Cs.OUTLINE_COLOR_INDEX,elt=Cs.OUTLINE_WIDTH_INDEX,tlt=Cs.PIXEL_SIZE_INDEX,Bye=Cs.SCALE_BY_DISTANCE_INDEX,Lye=Cs.TRANSLUCENCY_BY_DISTANCE_INDEX,Nye=Cs.DISTANCE_DISPLAY_CONDITION_INDEX,nlt=Cs.DISABLE_DEPTH_DISTANCE_INDEX,ilt=Cs.SPLIT_DIRECTION_INDEX,S$=Cs.NUMBER_OF_PROPERTIES,ml={positionHighAndSize:0,positionLowAndOutline:1,compressedAttribute0:2,compressedAttribute1:3,scaleByDistance:4,distanceDisplayConditionAndDisableDepthAndSplitDirection:5};function Qd(e){e=e??G.EMPTY_OBJECT,this._sp=void 0,this._spTranslucent=void 0,this._rsOpaque=void 0,this._rsTranslucent=void 0,this._vaf=void 0,this._pointPrimitives=[],this._pointPrimitivesToUpdate=[],this._pointPrimitivesToUpdateIndex=0,this._pointPrimitivesRemoved=!1,this._createVertexArray=!1,this._shaderScaleByDistance=!1,this._compiledShaderScaleByDistance=!1,this._shaderTranslucencyByDistance=!1,this._compiledShaderTranslucencyByDistance=!1,this._shaderDistanceDisplayCondition=!1,this._compiledShaderDistanceDisplayCondition=!1,this._shaderDisableDepthDistance=!1,this._compiledShaderDisableDepthDistance=!1,this._propertiesChanged=new Uint32Array(S$),this._maxPixelSize=1,this._baseVolume=new ce,this._baseVolumeWC=new ce,this._baseVolume2D=new ce,this._boundingVolume=new ce,this._boundingVolumeDirty=!1,this._colorCommands=[],this.show=e.show??!0,this.modelMatrix=M.clone(e.modelMatrix??M.IDENTITY),this._modelMatrix=M.clone(M.IDENTITY),this.debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this.blendOption=e.blendOption??Di.OPAQUE_AND_TRANSLUCENT,this._blendOption=void 0,this._mode=ie.SCENE3D,this._maxTotalPointSize=1,this._buffersUsage=[Oe.STATIC_DRAW,Oe.STATIC_DRAW,Oe.STATIC_DRAW,Oe.STATIC_DRAW,Oe.STATIC_DRAW,Oe.STATIC_DRAW,Oe.STATIC_DRAW,Oe.STATIC_DRAW,Oe.STATIC_DRAW];let t=this;this._uniforms={u_maxTotalPointSize:function(){return t._maxTotalPointSize}}}Object.defineProperties(Qd.prototype,{length:{get:function(){return w$(this),this._pointPrimitives.length}}});function Fye(e){let t=e.length;for(let n=0;n<t;++n)e[n]&&e[n]._destroy()}Qd.prototype.add=function(e){let t=new Cs(e,this);return t._index=this._pointPrimitives.length,this._pointPrimitives.push(t),this._createVertexArray=!0,t};Qd.prototype.remove=function(e){return this.contains(e)?(this._pointPrimitives[e._index]=null,this._pointPrimitivesRemoved=!0,this._createVertexArray=!0,e._destroy(),!0):!1};Qd.prototype.removeAll=function(){Fye(this._pointPrimitives),this._pointPrimitives=[],this._pointPrimitivesToUpdate=[],this._pointPrimitivesToUpdateIndex=0,this._pointPrimitivesRemoved=!1,this._createVertexArray=!0};function w$(e){if(e._pointPrimitivesRemoved){e._pointPrimitivesRemoved=!1;let t=[],n=e._pointPrimitives,i=n.length;for(let o=0,r=0;o<i;++o){let a=n[o];a&&(a._index=r++,t.push(a))}e._pointPrimitives=t}}Qd.prototype._updatePointPrimitive=function(e,t){e._dirty||(this._pointPrimitivesToUpdate[this._pointPrimitivesToUpdateIndex++]=e),++this._propertiesChanged[t]};Qd.prototype.contains=function(e){return l(e)&&e._pointPrimitiveCollection===this};Qd.prototype.get=function(e){return w$(this),this._pointPrimitives[e]};Qd.prototype.computeNewBuffersUsage=function(){let e=this._buffersUsage,t=!1,n=this._propertiesChanged;for(let i=0;i<S$;++i){let o=n[i]===0?Oe.STATIC_DRAW:Oe.STREAM_DRAW;t=t||e[i]!==o,e[i]=o}return t};function olt(e,t,n){return new j0(e,[{index:ml.positionHighAndSize,componentsPerAttribute:4,componentDatatype:Y.FLOAT,usage:n[v$]},{index:ml.positionLowAndShow,componentsPerAttribute:4,componentDatatype:Y.FLOAT,usage:n[v$]},{index:ml.compressedAttribute0,componentsPerAttribute:4,componentDatatype:Y.FLOAT,usage:n[Mye]},{index:ml.compressedAttribute1,componentsPerAttribute:4,componentDatatype:Y.FLOAT,usage:n[Lye]},{index:ml.scaleByDistance,componentsPerAttribute:4,componentDatatype:Y.FLOAT,usage:n[Bye]},{index:ml.distanceDisplayConditionAndDisableDepthAndSplitDirection,componentsPerAttribute:4,componentDatatype:Y.FLOAT,usage:n[Nye]}],t)}var T$=new xn,PG=new V;function kye(e,t,n,i){let o=i._index,r=i._getActualPosition();e._mode===ie.SCENE3D&&(ce.expand(e._baseVolume,r,e._baseVolume),e._boundingVolumeDirty=!0),xn.fromCartesian(r,T$);let a=i.pixelSize,s=i.outlineWidth;e._maxPixelSize=Math.max(e._maxPixelSize,a+s);let c=n[ml.positionHighAndSize],u=T$.high;c(o,u.x,u.y,u.z,a);let f=n[ml.positionLowAndOutline],d=T$.low;f(o,d.x,d.y,d.z,s)}var rlt=256;function zye(e,t,n,i){let o=i._index,r=i.color,a=i.outlineColor,s=i.getPickId(t).color;PG.red=r.alpha,PG.green=a.alpha,PG.blue=s.alpha;let c=n[ml.compressedAttribute0];c(o,nn.encodeRGB8(r),nn.encodeRGB8(a),nn.encodeRGB8(s),nn.encodeRGB8(PG))}function Uye(e,t,n,i){let o=i._index,r=0,a=1,s=1,c=1,u=i.translucencyByDistance;l(u)&&(r=u.near,a=u.nearValue,s=u.far,c=u.farValue,(a!==1||c!==1)&&(e._shaderTranslucencyByDistance=!0));let f=i.show&&i.clusterShow;i.color.alpha===0&&i.outlineColor.alpha===0&&(f=!1),a=D.clamp(a,0,1),a=a===1?255:a*255|0;let d=(f?1:0)*rlt+a;c=D.clamp(c,0,1),c=c===1?255:c*255|0;let p=c,g=n[ml.compressedAttribute1];g(o,d,p,r,s)}function Vye(e,t,n,i){let o=i._index,r=n[ml.scaleByDistance],a=0,s=1,c=1,u=1,f=i.scaleByDistance;l(f)&&(a=f.near,s=f.nearValue,c=f.far,u=f.farValue,(s!==1||u!==1)&&(e._shaderScaleByDistance=!0)),r(o,a,s,c,u)}function jye(e,t,n,i){let o=i._index,r=n[ml.distanceDisplayConditionAndDisableDepthAndSplitDirection],a=0,s=Number.MAX_VALUE,c=i.distanceDisplayCondition;l(c)&&(a=c.near,s=c.far,a*=a,s*=s,e._shaderDistanceDisplayCondition=!0);let u=i.disableDepthTestDistance;u*=u,u>0&&(e._shaderDisableDepthDistance=!0,u===Number.POSITIVE_INFINITY&&(u=-1));let f=0,d=i.splitDirection;l(d)&&(f=d),r(o,a,s,u,f)}function alt(e,t,n,i){kye(e,t,n,i),zye(e,t,n,i),Uye(e,t,n,i),Vye(e,t,n,i),jye(e,t,n,i)}function E$(e,t,n,i,o,r){let a;i.mode===ie.SCENE3D?(a=e._baseVolume,e._boundingVolumeDirty=!0):a=e._baseVolume2D;let s=[];for(let c=0;c<n;++c){let u=t[c],f=u.position,d=Cs._computeActualPosition(f,i,o);l(d)&&(u._setActualPosition(d),r?s.push(d):ce.expand(a,d,a))}r&&ce.fromPoints(s,a)}function slt(e,t){let n=t.mode,i=e._pointPrimitives,o=e._pointPrimitivesToUpdate,r=e._modelMatrix;e._createVertexArray||e._mode!==n||n!==ie.SCENE3D&&!M.equals(r,e.modelMatrix)?(e._mode=n,M.clone(e.modelMatrix,r),e._createVertexArray=!0,(n===ie.SCENE3D||n===ie.SCENE2D||n===ie.COLUMBUS_VIEW)&&E$(e,i,i.length,t,r,!0)):n===ie.MORPHING?E$(e,i,i.length,t,r,!0):(n===ie.SCENE2D||n===ie.COLUMBUS_VIEW)&&E$(e,o,e._pointPrimitivesToUpdateIndex,t,r,!1)}function clt(e,t,n){let o=t.camera.getPixelSize(n,t.context.drawingBufferWidth,t.context.drawingBufferHeight)*e._maxPixelSize;n.radius+=o}var llt=[];Qd.prototype.update=function(e){if(w$(this),!this.show)return;this._maxTotalPointSize=Rt.maximumAliasedPointSize,slt(this,e);let n=this._pointPrimitives.length,i=this._pointPrimitivesToUpdate,o=this._pointPrimitivesToUpdateIndex,r=this._propertiesChanged,a=this._createVertexArray,s,c=e.context,u=e.passes,f=u.pick;if(a||!f&&this.computeNewBuffersUsage()){this._createVertexArray=!1;for(let S=0;S<S$;++S)r[S]=0;if(this._vaf=this._vaf&&this._vaf.destroy(),n>0){this._vaf=olt(c,n,this._buffersUsage),s=this._vaf.writers;for(let S=0;S<n;++S){let w=this._pointPrimitives[S];w._dirty=!1,alt(this,c,s,w)}this._vaf.commit()}this._pointPrimitivesToUpdateIndex=0}else if(o>0){let S=llt;S.length=0,(r[v$]||r[elt]||r[tlt])&&S.push(kye),(r[Mye]||r[Zct])&&S.push(zye),(r[Jct]||r[Lye])&&S.push(Uye),r[Bye]&&S.push(Vye),(r[Nye]||r[nlt]||r[ilt])&&S.push(jye);let w=S.length;if(s=this._vaf.writers,o/n>.1){for(let P=0;P<o;++P){let R=i[P];R._dirty=!1;for(let B=0;B<w;++B)S[B](this,c,s,R)}this._vaf.commit()}else{for(let P=0;P<o;++P){let R=i[P];R._dirty=!1;for(let B=0;B<w;++B)S[B](this,c,s,R);this._vaf.subCommit(R._index,1)}this._vaf.endSubCommits()}this._pointPrimitivesToUpdateIndex=0}if(o>n*1.5&&(i.length=n),!l(this._vaf)||!l(this._vaf.va))return;this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,ce.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));let d,p=M.IDENTITY;e.mode===ie.SCENE3D?(p=this.modelMatrix,d=ce.clone(this._baseVolumeWC,this._boundingVolume)):d=ce.clone(this._baseVolume2D,this._boundingVolume),clt(this,e,d);let g=this._blendOption!==this.blendOption;this._blendOption=this.blendOption,g&&(this._blendOption===Di.OPAQUE||this._blendOption===Di.OPAQUE_AND_TRANSLUCENT?this._rsOpaque=Ve.fromCache({depthTest:{enabled:!0,func:ee.LEQUAL},depthMask:!0}):this._rsOpaque=void 0,this._blendOption===Di.TRANSLUCENT||this._blendOption===Di.OPAQUE_AND_TRANSLUCENT?this._rsTranslucent=Ve.fromCache({depthTest:{enabled:!0,func:ee.LEQUAL},depthMask:!1,blending:Jt.ALPHA_BLEND}):this._rsTranslucent=void 0),this._shaderDisableDepthDistance=this._shaderDisableDepthDistance||e.minimumDisableDepthTestDistance!==0;let m,A;(g||this._shaderScaleByDistance&&!this._compiledShaderScaleByDistance||this._shaderTranslucencyByDistance&&!this._compiledShaderTranslucencyByDistance||this._shaderDistanceDisplayCondition&&!this._compiledShaderDistanceDisplayCondition||this._shaderDisableDepthDistance!==this._compiledShaderDisableDepthDistance)&&(m=new He({sources:[XF]}),this._shaderScaleByDistance&&m.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&m.defines.push("EYE_DISTANCE_TRANSLUCENCY"),this._shaderDistanceDisplayCondition&&m.defines.push("DISTANCE_DISPLAY_CONDITION"),this._shaderDisableDepthDistance&&m.defines.push("DISABLE_DEPTH_DISTANCE"),this._blendOption===Di.OPAQUE_AND_TRANSLUCENT&&(A=new He({defines:["OPAQUE"],sources:[uy]}),this._sp=Kt.replaceCache({context:c,shaderProgram:this._sp,vertexShaderSource:m,fragmentShaderSource:A,attributeLocations:ml}),A=new He({defines:["TRANSLUCENT"],sources:[uy]}),this._spTranslucent=Kt.replaceCache({context:c,shaderProgram:this._spTranslucent,vertexShaderSource:m,fragmentShaderSource:A,attributeLocations:ml})),this._blendOption===Di.OPAQUE&&(A=new He({sources:[uy]}),this._sp=Kt.replaceCache({context:c,shaderProgram:this._sp,vertexShaderSource:m,fragmentShaderSource:A,attributeLocations:ml})),this._blendOption===Di.TRANSLUCENT&&(A=new He({sources:[uy]}),this._spTranslucent=Kt.replaceCache({context:c,shaderProgram:this._spTranslucent,vertexShaderSource:m,fragmentShaderSource:A,attributeLocations:ml})),this._compiledShaderScaleByDistance=this._shaderScaleByDistance,this._compiledShaderTranslucencyByDistance=this._shaderTranslucencyByDistance,this._compiledShaderDistanceDisplayCondition=this._shaderDistanceDisplayCondition,this._compiledShaderDisableDepthDistance=this._shaderDisableDepthDistance);let y,x,b,C,E=e.commandList;if(u.render||f){let S=this._colorCommands,w=this._blendOption===Di.OPAQUE,P=this._blendOption===Di.OPAQUE_AND_TRANSLUCENT;y=this._vaf.va,x=y.length,S.length=x;let R=P?x*2:x;for(C=0;C<R;++C){let B=w||P&&C%2===0;b=S[C],l(b)||(b=S[C]=new tt),b.primitiveType=Re.POINTS,b.pass=B||!P?Ie.OPAQUE:Ie.TRANSLUCENT,b.owner=this;let L=P?Math.floor(C/2):C;b.boundingVolume=d,b.modelMatrix=p,b.shaderProgram=B?this._sp:this._spTranslucent,b.uniformMap=this._uniforms,b.vertexArray=y[L].va,b.renderState=B?this._rsOpaque:this._rsTranslucent,b.debugShowBoundingVolume=this.debugShowBoundingVolume,b.pickId="v_pickColor",E.push(b)}}};Qd.prototype.isDestroyed=function(){return!1};Qd.prototype.destroy=function(){return this._sp=this._sp&&this._sp.destroy(),this._spTranslucent=this._spTranslucent&&this._spTranslucent.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),Fye(this._pointPrimitives),fe(this)};var MS=Qd;var Gye=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],I$=1,KF=8,ra=new Uint32Array(96),$F=class e{static from(t){if(!t||t.byteLength===void 0||t.buffer)throw new Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");let[n,i]=new Uint8Array(t,0,2);if(n!==219)throw new Error("Data does not appear to be in a KDBush format.");let o=i>>4;if(o!==I$)throw new Error(`Got v${o} data when expected v${I$}.`);let r=Gye[i&15];if(!r)throw new Error("Unrecognized array type.");let[a]=new Uint16Array(t,2,1),[s]=new Uint32Array(t,4,1);return new e(s,a,r,void 0,t)}constructor(t,n=64,i=Float64Array,o=ArrayBuffer,r){if(isNaN(t)||t<0)throw new Error(`Unexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+n,2),65535),this.ArrayType=i,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;let a=Gye.indexOf(this.ArrayType),s=t*2*this.ArrayType.BYTES_PER_ELEMENT,c=t*this.IndexArrayType.BYTES_PER_ELEMENT,u=(8-c%8)%8;if(a<0)throw new Error(`Unexpected typed array class: ${i}.`);if(r)this.data=r,this.ids=new this.IndexArrayType(r,KF,t),this.coords=new i(r,KF+c+u,t*2),this._pos=t*2,this._finished=!0;else{let f=this.data=new o(KF+s+c+u);this.ids=new this.IndexArrayType(f,KF,t),this.coords=new i(f,KF+c+u,t*2),this._pos=0,this._finished=!1,new Uint8Array(f,0,2).set([219,(I$<<4)+a]),new Uint16Array(f,2,1)[0]=n,new Uint32Array(f,4,1)[0]=t}}add(t,n){let i=this._pos>>1;return this.ids[i]=i,this.coords[this._pos++]=t,this.coords[this._pos++]=n,i}finish(){let t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return P$(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,n,i,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:r,coords:a,nodeSize:s}=this;ra[0]=0,ra[1]=r.length-1,ra[2]=0;let c=3,u=[];for(;c>0;){let f=ra[--c],d=ra[--c],p=ra[--c];if(d-p<=s){for(let y=p;y<=d;y++){let x=a[2*y],b=a[2*y+1];x>=t&&x<=i&&b>=n&&b<=o&&u.push(r[y])}continue}let g=p+d>>1,m=a[2*g],A=a[2*g+1];m>=t&&m<=i&&A>=n&&A<=o&&u.push(r[g]),(f===0?t<=m:n<=A)&&(ra[c++]=p,ra[c++]=g-1,ra[c++]=1-f),(f===0?i>=m:o>=A)&&(ra[c++]=g+1,ra[c++]=d,ra[c++]=1-f)}return u}within(t,n,i){let o=[];return this.withinInto(t,n,i,o),o}withinInto(t,n,i,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:r,coords:a,nodeSize:s}=this;ra[0]=0,ra[1]=r.length-1,ra[2]=0;let c=3,u=0,f=i*i;for(;c>0;){let d=ra[--c],p=ra[--c],g=ra[--c];if(p-g<=s){for(let x=g;x<=p;x++)Hye(a[2*x],a[2*x+1],t,n)<=f&&(o[u++]=r[x]);continue}let m=g+p>>1,A=a[2*m],y=a[2*m+1];Hye(A,y,t,n)<=f&&(o[u++]=r[m]),(d===0?t-i<=A:n-i<=y)&&(ra[c++]=g,ra[c++]=m-1,ra[c++]=1-d),(d===0?t+i>=A:n+i>=y)&&(ra[c++]=m+1,ra[c++]=p,ra[c++]=1-d)}return u}};function P$(e,t,n,i,o,r){if(o-i<=n)return;let a=i+o>>1;Wye(e,t,a,i,o,r),P$(e,t,n,i,a-1,1-r),P$(e,t,n,a+1,o,1-r)}function Wye(e,t,n,i,o,r){for(;o>i;){if(o-i>600){let u=o-i+1,f=n-i+1,d=Math.log(u),p=.5*Math.exp(2*d/3),g=.5*Math.sqrt(d*p*(u-p)/u)*(f-u/2<0?-1:1),m=Math.max(i,Math.floor(n-f*p/u+g)),A=Math.min(o,Math.floor(n+(u-f)*p/u+g));Wye(e,t,n,m,A,r)}let a=t[2*n+r],s=i,c=o;for(QF(e,t,i,n),t[2*o+r]>a&&QF(e,t,i,o);s<c;){for(QF(e,t,s,c),s++,c--;t[2*s+r]<a;)s++;for(;t[2*c+r]>a;)c--}t[2*i+r]===a?QF(e,t,i,c):(c++,QF(e,t,c,o)),c<=n&&(i=c+1),n<=c&&(o=c-1)}}function QF(e,t,n,i){D$(e,n,i),D$(t,2*n,2*i),D$(t,2*n+1,2*i+1)}function D$(e,t,n){let i=e[t];e[t]=e[n],e[n]=i}function Hye(e,t,n,i){let o=e-n,r=t-i;return o*o+r*r}function Cm(e){e=e??G.EMPTY_OBJECT,this._enabled=e.enabled??!1,this._pixelRange=e.pixelRange??80,this._minimumClusterSize=e.minimumClusterSize??2,this._clusterBillboards=e.clusterBillboards??!0,this._clusterLabels=e.clusterLabels??!0,this._clusterPoints=e.clusterPoints??!0,this._labelCollection=void 0,this._billboardCollection=void 0,this._pointCollection=void 0,this._clusterBillboardCollection=void 0,this._clusterLabelCollection=void 0,this._clusterPointCollection=void 0,this._collectionIndicesByEntity={},this._unusedLabelIndices=[],this._unusedBillboardIndices=[],this._unusedPointIndices=[],this._previousClusters=[],this._previousHeight=void 0,this._enabledDirty=!1,this._clusterDirty=!1,this._cluster=void 0,this._removeEventListener=void 0,this._clusterEvent=new ye,this.show=e.show??!0}function qye(e,t){e.x-=t,e.y-=t,e.width+=t*2,e.height+=t*2}var ult=new Je;function Yye(e,t,n,i,o){if(l(e._labelCollection)&&i._clusterLabels?o=XA.getScreenSpaceBoundingBox(e,t,o):l(e._billboardCollection)&&i._clusterBillboards?o=So.getScreenSpaceBoundingBox(e,t,o):l(e._pointPrimitiveCollection)&&i._clusterPoints&&(o=Cs.getScreenSpaceBoundingBox(e,t,o)),qye(o,n),i._clusterLabels&&!l(e._labelCollection)&&l(e.id)&&Kye(i,e.id.id)&&l(e.id._label)){let r=i._collectionIndicesByEntity[e.id.id].labelIndex,a=i._labelCollection.get(r),s=XA.getScreenSpaceBoundingBox(a,t,ult);qye(s,n),o=Je.union(o,s,o)}return o}function flt(e,t){if(e.clusterShow=!0,!l(e._labelCollection)&&l(e.id)&&Kye(t,e.id.id)&&l(e.id._label)){let n=t._collectionIndicesByEntity[e.id.id].labelIndex,i=t._labelCollection.get(n);i.clusterShow=!0}}function Xye(e,t,n,i){let o={billboard:i._clusterBillboardCollection.add(),label:i._clusterLabelCollection.add(),point:i._clusterPointCollection.add()};o.billboard.show=!1,o.point.show=!1,o.label.show=!0,o.label.text=t.toLocaleString(),o.label.id=n,o.billboard.position=o.label.position=o.point.position=e,i._clusterEvent.raiseEvent(n,o)}function Kye(e,t){return l(e)&&l(e._collectionIndicesByEntity[t])&&l(e._collectionIndicesByEntity[t].labelIndex)}function R$(e,t,n,i,o){if(!l(e))return;let r=e.length;for(let a=0;a<r;++a){let s=e.get(a);if(s.clusterShow=!1,!s.show||o._scene.mode===ie.SCENE3D&&!i.isPointVisible(s.position))continue;let c=o._clusterLabels&&l(s._labelCollection),u=o._clusterBillboards&&l(s.id._billboard),f=o._clusterPoints&&l(s.id._point);if(c&&(f||u))continue;let d=s.computeScreenSpacePosition(n);l(d)&&t.push({index:a,collection:e,clustered:!1,coord:d})}}var dlt=new Je,hlt=new Je,mlt=new Je;function plt(e){return function(t){if(l(t)&&t<.05||!e.enabled)return;let n=e._scene,i=e._labelCollection,o=e._billboardCollection,r=e._pointCollection;if(!l(i)&&!l(o)&&!l(r)||!e._clusterBillboards&&!e._clusterLabels&&!e._clusterPoints)return;let a=e._clusterLabelCollection,s=e._clusterBillboardCollection,c=e._clusterPointCollection;l(a)?a.removeAll():a=e._clusterLabelCollection=new Rp({scene:n}),l(s)?s.removeAll():s=e._clusterBillboardCollection=new Df({scene:n}),l(c)?c.removeAll():c=e._clusterPointCollection=new MS;let u=e._pixelRange,f=e._minimumClusterSize,d=e._previousClusters,p=[],g=e._previousHeight,m=n.camera.positionCartographic.height,A=n.ellipsoid,y=n.camera.positionWC,x=new bm(A,y),b=[];e._clusterLabels&&R$(i,b,n,x,e),e._clusterBillboards&&R$(o,b,n,x,e),e._clusterPoints&&R$(r,b,n,x,e);let C,E,S,w,P,R,B,L,_,T,v,I;if(b.length>0){let O=new $F(b.length,64,Float64Array);for(let N=0;N<b.length;++N)O.add(b[N].coord.x,b[N].coord.y);if(O.finish(),m<g)for(S=d.length,C=0;C<S;++C){let N=d[C];if(!x.isPointVisible(N.position))continue;let j=So._computeScreenSpacePosition(M.IDENTITY,N.position,h.ZERO,z.ZERO,n);if(!l(j))continue;let k=1-m/g,U=N.width=N.width*k,F=N.height=N.height*k;U=Math.max(U,N.minimumWidth),F=Math.max(F,N.minimumHeight);let H=j.x-U*.5,q=j.y-F*.5,J=j.x+U,W=j.y+F;for(P=O.range(H,q,J,W),R=P.length,T=0,_=[],E=0;E<R;++E)B=P[E],L=b[B],L.clustered||(++T,v=L.collection,I=L.index,_.push(v.get(I).id));if(T>=f)for(Xye(N.position,T,_,e),p.push(N),E=0;E<R;++E)b[P[E]].clustered=!0}for(S=b.length,C=0;C<S;++C){let N=b[C];if(N.clustered)continue;N.clustered=!0,v=N.collection,I=N.index;let j=v.get(I);w=Yye(j,N.coord,u,e,dlt);let k=Je.clone(w,hlt);P=O.range(w.x,w.y,w.x+w.width,w.y+w.height),R=P.length;let U=h.clone(j.position);for(T=1,_=[j.id],E=0;E<R;++E)if(B=P[E],L=b[B],!L.clustered){let F=L.collection.get(L.index),H=Yye(F,L.coord,u,e,mlt);h.add(F.position,U,U),Je.union(k,H,k),++T,_.push(F.id)}if(T>=f){let F=h.multiplyByScalar(U,1/T,U);for(Xye(F,T,_,e),p.push({position:F,width:k.width,height:k.height,minimumWidth:w.width,minimumHeight:w.height}),E=0;E<R;++E)b[P[E]].clustered=!0}else flt(j,e)}}a.length===0&&(a.destroy(),e._clusterLabelCollection=void 0),s.length===0&&(s.destroy(),e._clusterBillboardCollection=void 0),c.length===0&&(c.destroy(),e._clusterPointCollection=void 0),e._previousClusters=p,e._previousHeight=m}}Cm.prototype._initialize=function(e){this._scene=e;let t=plt(this);this._cluster=t,this._removeEventListener=e.camera.changed.addEventListener(t)};Object.defineProperties(Cm.prototype,{enabled:{get:function(){return this._enabled},set:function(e){this._enabledDirty=e!==this._enabled,this._enabled=e}},pixelRange:{get:function(){return this._pixelRange},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._pixelRange,this._pixelRange=e}},minimumClusterSize:{get:function(){return this._minimumClusterSize},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._minimumClusterSize,this._minimumClusterSize=e}},clusterEvent:{get:function(){return this._clusterEvent}},clusterBillboards:{get:function(){return this._clusterBillboards},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._clusterBillboards,this._clusterBillboards=e}},clusterLabels:{get:function(){return this._clusterLabels},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._clusterLabels,this._clusterLabels=e}},clusterPoints:{get:function(){return this._clusterPoints},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._clusterPoints,this._clusterPoints=e}},ready:{get:function(){return!this._enabledDirty&&!this._clusterDirty&&(!l(this._billboardCollection)||this._billboardCollection.ready)&&(!l(this._labelCollection)||this._labelCollection.ready)}}});function M$(e,t,n,i){return function(o){let r=this[e];l(this._collectionIndicesByEntity)||(this._collectionIndicesByEntity={});let a=this._collectionIndicesByEntity[o.id];if(l(a)||(a=this._collectionIndicesByEntity[o.id]={billboardIndex:void 0,labelIndex:void 0,pointIndex:void 0}),l(r)&&l(a[i]))return r.get(a[i]);l(r)||(r=this[e]=new t({scene:this._scene}));let s,c,u=this[n];u.length>0?(s=u.shift(),c=r.get(s)):(c=r.add(),s=r.length-1),a[i]=s;let f=this;return Promise.resolve().then(function(){f._clusterDirty=!0}),c}}function B$(e,t){let n=e._collectionIndicesByEntity[t];!l(n.billboardIndex)&&!l(n.labelIndex)&&!l(n.pointIndex)&&delete e._collectionIndicesByEntity[t]}Cm.prototype.getLabel=M$("_labelCollection",Rp,"_unusedLabelIndices","labelIndex");Cm.prototype.removeLabel=function(e){let t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(!l(this._labelCollection)||!l(t)||!l(t.labelIndex))return;let n=t.labelIndex;t.labelIndex=void 0,B$(this,e.id);let i=this._labelCollection.get(n);i.show=!1,i.text="",i.id=void 0,this._unusedLabelIndices.push(n),this._clusterDirty=!0};Cm.prototype.getBillboard=M$("_billboardCollection",Df,"_unusedBillboardIndices","billboardIndex");Cm.prototype.removeBillboard=function(e){let t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(!l(this._billboardCollection)||!l(t)||!l(t.billboardIndex))return;let n=t.billboardIndex;t.billboardIndex=void 0,B$(this,e.id);let i=this._billboardCollection.get(n);i.id=void 0,i.show=!1,i.image=void 0,this._unusedBillboardIndices.push(n),this._clusterDirty=!0};Cm.prototype.getPoint=M$("_pointCollection",MS,"_unusedPointIndices","pointIndex");Cm.prototype.removePoint=function(e){let t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(!l(this._pointCollection)||!l(t)||!l(t.pointIndex))return;let n=t.pointIndex;t.pointIndex=void 0,B$(this,e.id);let i=this._pointCollection.get(n);i.show=!1,i.id=void 0,this._unusedPointIndices.push(n),this._clusterDirty=!0};function O$(e){if(!l(e))return;let t=e.length;for(let n=0;n<t;++n)e.get(n).clusterShow=!0}function glt(e){e.enabled||(l(e._clusterLabelCollection)&&e._clusterLabelCollection.destroy(),l(e._clusterBillboardCollection)&&e._clusterBillboardCollection.destroy(),l(e._clusterPointCollection)&&e._clusterPointCollection.destroy(),e._clusterLabelCollection=void 0,e._clusterBillboardCollection=void 0,e._clusterPointCollection=void 0,O$(e._labelCollection),O$(e._billboardCollection),O$(e._pointCollection))}Cm.prototype.update=function(e){if(!this.show)return;let t,n=this._labelCollection;l(n)&&n.length>0&&!n.ready&&(t=e.commandList,e.commandList=[],n.update(e),e.commandList=t);let i=this._billboardCollection;l(i)&&i.length>0&&!i.ready&&(t=e.commandList,e.commandList=[],i.update(e),e.commandList=t),this._enabledDirty&&(this._enabledDirty=!1,glt(this),this._clusterDirty=!0),this._clusterDirty&&(this._cluster(),this._clusterDirty=l(n)&&!n.ready||l(i)&&!i.ready),l(this._clusterLabelCollection)&&this._clusterLabelCollection.update(e),l(this._clusterBillboardCollection)&&this._clusterBillboardCollection.update(e),l(this._clusterPointCollection)&&this._clusterPointCollection.update(e),l(n)&&n.update(e),l(i)&&i.update(e),l(this._pointCollection)&&this._pointCollection.update(e)};Cm.prototype.destroy=function(){l(this._removeEventListener)&&(this._removeEventListener(),this._removeEventListener=void 0),this._labelCollection=this._labelCollection&&this._labelCollection.destroy(),this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),this._pointCollection=this._pointCollection&&this._pointCollection.destroy(),this._clusterLabelCollection=this._clusterLabelCollection&&this._clusterLabelCollection.destroy(),this._clusterBillboardCollection=this._clusterBillboardCollection&&this._clusterBillboardCollection.destroy(),this._clusterPointCollection=this._clusterPointCollection&&this._clusterPointCollection.destroy(),this._labelCollection=void 0,this._billboardCollection=void 0,this._pointCollection=void 0,this._clusterBillboardCollection=void 0,this._clusterLabelCollection=void 0,this._clusterPointCollection=void 0,this._collectionIndicesByEntity=void 0,this._unusedLabelIndices=[],this._unusedBillboardIndices=[],this._unusedPointIndices=[],this._previousClusters=[],this._previousHeight=void 0,this._enabledDirty=!1,this._pixelRangeDirty=!1,this._minimumClusterSizeDirty=!1};var Bf=Cm;function L$(e){this._name=e,this._clock=void 0,this._changed=new ye,this._error=new ye,this._isLoading=!1,this._loading=new ye,this._entityCollection=new Vs(this),this._entityCluster=new Bf}Object.defineProperties(L$.prototype,{name:{get:function(){return this._name},set:function(e){this._name!==e&&(this._name=e,this._changed.raiseEvent(this))}},clock:{get:function(){return this._clock},set:function(e){this._clock!==e&&(this._clock=e,this._changed.raiseEvent(this))}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading},set:function(e){Ea.setLoading(this,e)}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){this._entityCluster=e}}});L$.prototype.update=function(e){return!0};var JF=L$;var Qye={};Qye.computePositions=function(e,t,n,i,o){let r=e*.5,a=-r,s=i+i,c=o?2*s:s,u=new Float64Array(c*3),f,d=0,p=0,g=o?s*3:0,m=o?(s+i)*3:i*3;for(f=0;f<i;f++){let A=f/i*D.TWO_PI,y=Math.cos(A),x=Math.sin(A),b=y*n,C=x*n,E=y*t,S=x*t;u[p+g]=b,u[p+g+1]=C,u[p+g+2]=a,u[p+m]=E,u[p+m+1]=S,u[p+m+2]=r,p+=3,o&&(u[d++]=b,u[d++]=C,u[d++]=a,u[d++]=E,u[d++]=S,u[d++]=r)}return u};var yC=Qye;var N$=new z,_lt=new h,Alt=new h,ylt=new h,xlt=new h;function Zg(e){e=e??G.EMPTY_OBJECT;let t=e.length,n=e.topRadius,i=e.bottomRadius,o=e.vertexFormat??Ne.DEFAULT,r=e.slices??128;this._length=t,this._topRadius=n,this._bottomRadius=i,this._vertexFormat=Ne.clone(o),this._slices=r,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderGeometry"}Zg.packedLength=Ne.packedLength+5;Zg.pack=function(e,t,n){return n=n??0,Ne.pack(e._vertexFormat,t,n),n+=Ne.packedLength,t[n++]=e._length,t[n++]=e._topRadius,t[n++]=e._bottomRadius,t[n++]=e._slices,t[n]=e._offsetAttribute??-1,t};var $ye=new Ne,BS={vertexFormat:$ye,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0};Zg.unpack=function(e,t,n){t=t??0;let i=Ne.unpack(e,t,$ye);t+=Ne.packedLength;let o=e[t++],r=e[t++],a=e[t++],s=e[t++],c=e[t];return l(n)?(n._vertexFormat=Ne.clone(i,n._vertexFormat),n._length=o,n._topRadius=r,n._bottomRadius=a,n._slices=s,n._offsetAttribute=c===-1?void 0:c,n):(BS.length=o,BS.topRadius=r,BS.bottomRadius=a,BS.slices=s,BS.offsetAttribute=c===-1?void 0:c,new Zg(BS))};Zg.createGeometry=function(e){let t=e._length,n=e._topRadius,i=e._bottomRadius,o=e._vertexFormat,r=e._slices;if(t<=0||n<0||i<0||n===0&&i===0)return;let a=r+r,s=r+a,c=a+a,u=yC.computePositions(t,n,i,r,!0),f=o.st?new Float32Array(c*2):void 0,d=o.normal?new Float32Array(c*3):void 0,p=o.tangent?new Float32Array(c*3):void 0,g=o.bitangent?new Float32Array(c*3):void 0,m,A=o.normal||o.tangent||o.bitangent;if(A){let P=o.tangent||o.bitangent,R=0,B=0,L=0,_=Math.atan2(i-n,t),T=_lt;T.z=Math.sin(_);let v=Math.cos(_),I=ylt,O=Alt;for(m=0;m<r;m++){let N=m/r*D.TWO_PI,j=v*Math.cos(N),k=v*Math.sin(N);A&&(T.x=j,T.y=k,P&&(I=h.normalize(h.cross(h.UNIT_Z,T,I),I)),o.normal&&(d[R++]=T.x,d[R++]=T.y,d[R++]=T.z,d[R++]=T.x,d[R++]=T.y,d[R++]=T.z),o.tangent&&(p[B++]=I.x,p[B++]=I.y,p[B++]=I.z,p[B++]=I.x,p[B++]=I.y,p[B++]=I.z),o.bitangent&&(O=h.normalize(h.cross(T,I,O),O),g[L++]=O.x,g[L++]=O.y,g[L++]=O.z,g[L++]=O.x,g[L++]=O.y,g[L++]=O.z))}for(m=0;m<r;m++)o.normal&&(d[R++]=0,d[R++]=0,d[R++]=-1),o.tangent&&(p[B++]=1,p[B++]=0,p[B++]=0),o.bitangent&&(g[L++]=0,g[L++]=-1,g[L++]=0);for(m=0;m<r;m++)o.normal&&(d[R++]=0,d[R++]=0,d[R++]=1),o.tangent&&(p[B++]=1,p[B++]=0,p[B++]=0),o.bitangent&&(g[L++]=0,g[L++]=1,g[L++]=0)}let y=12*r-12,x=Ue.createTypedArray(c,y),b=0,C=0;for(m=0;m<r-1;m++)x[b++]=C,x[b++]=C+2,x[b++]=C+3,x[b++]=C,x[b++]=C+3,x[b++]=C+1,C+=2;for(x[b++]=a-2,x[b++]=0,x[b++]=1,x[b++]=a-2,x[b++]=1,x[b++]=a-1,m=1;m<r-1;m++)x[b++]=a+m+1,x[b++]=a+m,x[b++]=a;for(m=1;m<r-1;m++)x[b++]=s,x[b++]=s+m,x[b++]=s+m+1;let E=0;if(o.st){let P=Math.max(n,i);for(m=0;m<c;m++){let R=h.fromArray(u,m*3,xlt);f[E++]=(R.x+P)/(2*P),f[E++]=(R.y+P)/(2*P)}}let S=new pn;o.position&&(S.position=new Me({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:u})),o.normal&&(S.normal=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:d})),o.tangent&&(S.tangent=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:p})),o.bitangent&&(S.bitangent=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:g})),o.st&&(S.st=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:f})),N$.x=t*.5,N$.y=Math.max(i,n);let w=new ce(h.ZERO,z.magnitude(N$));if(l(e._offsetAttribute)){t=u.length;let P=e._offsetAttribute===ln.NONE?0:1,R=new Uint8Array(t/3).fill(P);S.applyOffset=new Me({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:R})}return new At({attributes:S,indices:x,primitiveType:Re.TRIANGLES,boundingSphere:w,offsetAttribute:e._offsetAttribute})};var F$;Zg.getUnitCylinder=function(){return l(F$)||(F$=Zg.createGeometry(new Zg({topRadius:1,bottomRadius:1,length:1,vertexFormat:Ne.POSITION_ONLY}))),F$};var ZF=Zg;var k$=new z;function LS(e){e=e??G.EMPTY_OBJECT;let t=e.length,n=e.topRadius,i=e.bottomRadius,o=e.slices??128,r=Math.max(e.numberOfVerticalLines??16,0);this._length=t,this._topRadius=n,this._bottomRadius=i,this._slices=o,this._numberOfVerticalLines=r,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderOutlineGeometry"}LS.packedLength=6;LS.pack=function(e,t,n){return n=n??0,t[n++]=e._length,t[n++]=e._topRadius,t[n++]=e._bottomRadius,t[n++]=e._slices,t[n++]=e._numberOfVerticalLines,t[n]=e._offsetAttribute??-1,t};var xC={length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};LS.unpack=function(e,t,n){t=t??0;let i=e[t++],o=e[t++],r=e[t++],a=e[t++],s=e[t++],c=e[t];return l(n)?(n._length=i,n._topRadius=o,n._bottomRadius=r,n._slices=a,n._numberOfVerticalLines=s,n._offsetAttribute=c===-1?void 0:c,n):(xC.length=i,xC.topRadius=o,xC.bottomRadius=r,xC.slices=a,xC.numberOfVerticalLines=s,xC.offsetAttribute=c===-1?void 0:c,new LS(xC))};LS.createGeometry=function(e){let t=e._length,n=e._topRadius,i=e._bottomRadius,o=e._slices,r=e._numberOfVerticalLines;if(t<=0||n<0||i<0||n===0&&i===0)return;let a=o*2,s=yC.computePositions(t,n,i,o,!1),c=o*2,u;if(r>0){let A=Math.min(r,o);u=Math.round(o/A),c+=A}let f=Ue.createTypedArray(a,c*2),d=0,p;for(p=0;p<o-1;p++)f[d++]=p,f[d++]=p+1,f[d++]=p+o,f[d++]=p+1+o;if(f[d++]=o-1,f[d++]=0,f[d++]=o+o-1,f[d++]=o,r>0)for(p=0;p<o;p+=u)f[d++]=p,f[d++]=p+o;let g=new pn;g.position=new Me({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:s}),k$.x=t*.5,k$.y=Math.max(i,n);let m=new ce(h.ZERO,z.magnitude(k$));if(l(e._offsetAttribute)){t=s.length;let A=e._offsetAttribute===ln.NONE?0:1,y=new Uint8Array(t/3).fill(A);g.applyOffset=new Me({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:y})}return new At({attributes:g,indices:f,primitiveType:Re.LINES,boundingSphere:m,offsetAttribute:e._offsetAttribute})};var e2=LS;var Jye=h.ZERO,Zye=new h,blt=new h,exe=new V;function Clt(e){this.id=e,this.vertexFormat=void 0,this.length=void 0,this.topRadius=void 0,this.bottomRadius=void 0,this.slices=void 0,this.numberOfVerticalLines=void 0,this.offsetAttribute=void 0}function Lf(e,t){bi.call(this,{entity:e,scene:t,geometryOptions:new Clt(e),geometryPropertyName:"cylinder",observedPropertyNames:["availability","position","orientation","cylinder"]}),this._onEntityPropertyChanged(e,"cylinder",e.cylinder,void 0)}l(Object.create)&&(Lf.prototype=Object.create(bi.prototype),Lf.prototype.constructor=Lf);Object.defineProperties(Lf.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}});Lf.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=new En(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),r=Hn.fromDistanceDisplayCondition(o),a={show:i,distanceDisplayCondition:r,color:void 0,offset:void 0};if(this._materialProperty instanceof Wt){let s;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(s=this._materialProperty.color.getValue(e,exe)),l(s)||(s=V.WHITE),a.color=Yt.fromColor(s)}return l(this._options.offsetAttribute)&&(a.offset=po.fromCartesian3(X.getValueOrDefault(this._terrainOffsetProperty,e,Jye,Zye))),new Ot({id:t,geometry:new ZF(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.cylinder.heightReference,this._options.length*.5,this._scene.ellipsoid),attributes:a})};Lf.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=X.getValueOrDefault(this._outlineColorProperty,e,V.BLACK,exe),o=this._distanceDisplayConditionProperty.getValue(e),r={show:new En(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Yt.fromColor(i),distanceDisplayCondition:Hn.fromDistanceDisplayCondition(o),offset:void 0};return l(this._options.offsetAttribute)&&(r.offset=po.fromCartesian3(X.getValueOrDefault(this._terrainOffsetProperty,e,Jye,Zye))),new Ot({id:t,geometry:new e2(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.cylinder.heightReference,this._options.length*.5,this._scene.ellipsoid),attributes:r})};Lf.prototype._computeCenter=function(e,t){return X.getValueOrUndefined(this._entity.position,e,t)};Lf.prototype._isHidden=function(e,t){return!l(e.position)||!l(t.length)||!l(t.topRadius)||!l(t.bottomRadius)||bi.prototype._isHidden.call(this,e,t)};Lf.prototype._isDynamic=function(e,t){return!e.position.isConstant||!X.isConstant(e.orientation)||!t.length.isConstant||!t.topRadius.isConstant||!t.bottomRadius.isConstant||!X.isConstant(t.slices)||!X.isConstant(t.outlineWidth)||!X.isConstant(t.numberOfVerticalLines)};Lf.prototype._setStaticOptions=function(e,t){let n=X.getValueOrDefault(t.heightReference,Qe.MINIMUM_VALUE,nt.NONE),i=this._options;i.vertexFormat=this._materialProperty instanceof Wt?dn.VERTEX_FORMAT:go.MaterialSupport.TEXTURED.vertexFormat,i.length=t.length.getValue(Qe.MINIMUM_VALUE),i.topRadius=t.topRadius.getValue(Qe.MINIMUM_VALUE),i.bottomRadius=t.bottomRadius.getValue(Qe.MINIMUM_VALUE),i.slices=X.getValueOrUndefined(t.slices,Qe.MINIMUM_VALUE),i.numberOfVerticalLines=X.getValueOrUndefined(t.numberOfVerticalLines,Qe.MINIMUM_VALUE),i.offsetAttribute=n!==nt.NONE?ln.ALL:void 0};Lf.prototype._onEntityPropertyChanged=tg;Lf.DynamicGeometryUpdater=NS;function NS(e,t,n){xi.call(this,e,t,n)}l(Object.create)&&(NS.prototype=Object.create(xi.prototype),NS.prototype.constructor=NS);NS.prototype._isHidden=function(e,t,n){let i=this._options,o=X.getValueOrUndefined(e.position,n,blt);return!l(o)||!l(i.length)||!l(i.topRadius)||!l(i.bottomRadius)||xi.prototype._isHidden.call(this,e,t,n)};NS.prototype._setOptions=function(e,t,n){let i=X.getValueOrDefault(t.heightReference,n,nt.NONE),o=this._options;o.length=X.getValueOrUndefined(t.length,n),o.topRadius=X.getValueOrUndefined(t.topRadius,n),o.bottomRadius=X.getValueOrUndefined(t.bottomRadius,n),o.slices=X.getValueOrUndefined(t.slices,n),o.numberOfVerticalLines=X.getValueOrUndefined(t.numberOfVerticalLines,n),o.offsetAttribute=i!==nt.NONE?ln.ALL:void 0};var t2=Lf;var txe={UNBOUNDED:0,CLAMPED:1,LOOP_STOP:2};Object.freeze(txe);var va=txe;var nxe={TICK_DEPENDENT:0,SYSTEM_CLOCK_MULTIPLIER:1,SYSTEM_CLOCK:2};Object.freeze(nxe);var Oo=nxe;var ixe={NONE:0,HOLD:1,EXTRAPOLATE:2};Object.freeze(ixe);var Nf=ixe;var oxe=Yr(uf(),1);function Tlt(e){let t=new oxe.default(e);t.normalize();let n=t.path(),i=n.lastIndexOf("/");return i!==-1&&(n=n.substr(i+1)),n}var e_=Tlt;var Elt=D.factorial;function z$(e,t,n,i,o,r){let a=0,s,c,u;if(i>0){for(c=0;c<o;c++){for(s=!1,u=0;u<r.length&&!s;u++)c===r[u]&&(s=!0);s||(r.push(c),a+=z$(e,t,n,i-1,o,r),r.splice(r.length-1,1))}return a}for(a=1,c=0;c<o;c++){for(s=!1,u=0;u<r.length&&!s;u++)c===r[u]&&(s=!0);s||(a*=e-n[t[c]])}return a}var RG={type:"Hermite"};RG.getRequiredDataPoints=function(e,t){return t=t??0,Math.max(Math.floor((e+1)/(t+1)),2)};RG.interpolateOrderZero=function(e,t,n,i,o){l(o)||(o=new Array(i));let r,a,s,c,u,f,d=t.length,p=new Array(i);for(r=0;r<i;r++){o[r]=0;let y=new Array(d);for(p[r]=y,a=0;a<d;a++)y[a]=[]}let g=d,m=new Array(g);for(r=0;r<g;r++)m[r]=r;let A=d-1;for(c=0;c<i;c++){for(a=0;a<g;a++)f=m[a]*i+c,p[c][0].push(n[f]);for(r=1;r<g;r++){let y=!1;for(a=0;a<g-r;a++){let x=t[m[a]],b=t[m[a+r]],C;b-x<=0?(f=m[a]*i+i*r+c,C=n[f],p[c][r].push(C/Elt(r))):(C=p[c][r-1][a+1]-p[c][r-1][a],p[c][r].push(C/(b-x))),y=y||C!==0}y||(A=r-1)}}for(s=0,u=0;s<=u;s++)for(r=s;r<=A;r++){let y=z$(e,m,t,s,r,[]);for(c=0;c<i;c++){let x=p[c][r][0];o[c+s*i]+=x*y}}return o};var vlt=[];RG.interpolate=function(e,t,n,i,o,r,a){let s=i*(r+1);l(a)||(a=new Array(s));for(let x=0;x<s;x++)a[x]=0;let c=t.length,u=new Array(c*(o+1)),f;for(f=0;f<c;f++)for(let x=0;x<o+1;x++)u[f*(o+1)+x]=f;let d=u.length,p=vlt,g=Slt(p,u,t,n,i,o),m=[],A=d*(d+1)/2,y=Math.min(g,r);for(let x=0;x<=y;x++)for(f=x;f<=g;f++){m.length=0;let b=z$(e,u,t,x,f,m),C=Math.floor(f*(1-f)/2)+d*f;for(let E=0;E<i;E++){let S=Math.floor(E*A),w=p[S+C];a[E+x*i]+=w*b}}return a};function Slt(e,t,n,i,o,r){let a,s,c=-1,u=t.length,f=u*(u+1)/2;for(let d=0;d<o;d++){let p=Math.floor(d*f);for(a=0;a<u;a++)s=t[a]*o*(r+1)+d,e[p+a]=i[s];for(let g=1;g<u;g++){let m=0,A=Math.floor(g*(1-g)/2)+u*g,y=!1;for(a=0;a<u-g;a++){let x=n[t[a]],b=n[t[a+g]],C,E;if(b-x<=0)s=t[a]*o*(r+1)+o*g+d,C=i[s],E=C/D.factorial(g),e[p+A+m]=E,m++;else{let S=Math.floor((g-1)*(2-g)/2)+u*(g-1);C=e[p+S+a+1]-e[p+S+a],E=C/(b-x),e[p+A+m]=E,m++}y=y||C!==0}y&&(c=Math.max(c,g))}}return c}var n2=RG;var U$={type:"Lagrange"};U$.getRequiredDataPoints=function(e){return Math.max(e+1,2)};U$.interpolateOrderZero=function(e,t,n,i,o){l(o)||(o=new Array(i));let r,a,s=t.length;for(r=0;r<i;r++)o[r]=0;for(r=0;r<s;r++){let c=1;for(a=0;a<s;a++)if(a!==r){let u=t[r]-t[a];c*=(e-t[a])/u}for(a=0;a<i;a++)o[a]+=c*n[r*i+a]}return o};var i2=U$;var V$={type:"Linear"};V$.getRequiredDataPoints=function(e){return 2};V$.interpolateOrderZero=function(e,t,n,i,o){l(o)||(o=new Array(i));let r,a,s,c=t[0],u=t[1];for(r=0;r<i;r++)a=n[r],s=n[r+i],o[r]=((s-a)*e+u*a-c*s)/(u-c);return o};var bC=V$;function pl(e,t,n){this.clock=e??0,this.cone=t??0,this.magnitude=n??1}pl.fromCartesian3=function(e,t){let n=e.x,i=e.y,o=e.z,r=n*n+i*i;return l(t)||(t=new pl),t.clock=Math.atan2(i,n),t.cone=Math.atan2(Math.sqrt(r),o),t.magnitude=Math.sqrt(r+o*o),t};pl.clone=function(e,t){if(l(e))return l(t)?(t.clock=e.clock,t.cone=e.cone,t.magnitude=e.magnitude,t):new pl(e.clock,e.cone,e.magnitude)};pl.normalize=function(e,t){return l(t)?(t.clock=e.clock,t.cone=e.cone,t.magnitude=1,t):new pl(e.clock,e.cone,1)};pl.equals=function(e,t){return e===t||l(e)&&l(t)&&e.clock===t.clock&&e.cone===t.cone&&e.magnitude===t.magnitude};pl.equalsEpsilon=function(e,t,n){return n=n??0,e===t||l(e)&&l(t)&&Math.abs(e.clock-t.clock)<=n&&Math.abs(e.cone-t.cone)<=n&&Math.abs(e.magnitude-t.magnitude)<=n};pl.prototype.equals=function(e){return pl.equals(this,e)};pl.prototype.clone=function(e){return pl.clone(this,e)};pl.prototype.equalsEpsilon=function(e,t){return pl.equalsEpsilon(this,e,t)};pl.prototype.toString=function(){return`(${this.clock}, ${this.cone}, ${this.magnitude})`};var o2=pl;var l2=Yr(uf(),1);var j$;typeof performance<"u"&&typeof performance.now=="function"&&isFinite(performance.now())?j$=function(){return performance.now()}:j$=function(){return Date.now()};var Fi=j$;function G$(e){e=e??G.EMPTY_OBJECT;let t=e.currentTime,n=e.startTime,i=e.stopTime;l(t)?t=Q.clone(t):l(n)?t=Q.clone(n):l(i)?t=Q.addDays(i,-1,new Q):t=Q.now(),l(n)?n=Q.clone(n):n=Q.clone(t),l(i)?i=Q.clone(i):i=Q.addDays(n,1,new Q),this.startTime=n,this.stopTime=i,this.clockRange=e.clockRange??va.UNBOUNDED,this.canAnimate=e.canAnimate??!0,this.onTick=new ye,this.onStop=new ye,this._currentTime=void 0,this._multiplier=void 0,this._clockStep=void 0,this._shouldAnimate=void 0,this._lastSystemTime=Fi(),this.currentTime=t,this.multiplier=e.multiplier??1,this.shouldAnimate=e.shouldAnimate??!1,this.clockStep=e.clockStep??Oo.SYSTEM_CLOCK_MULTIPLIER}Object.defineProperties(G$.prototype,{currentTime:{get:function(){return this._currentTime},set:function(e){Q.equals(this._currentTime,e)||(this._clockStep===Oo.SYSTEM_CLOCK&&(this._clockStep=Oo.SYSTEM_CLOCK_MULTIPLIER),this._currentTime=e)}},multiplier:{get:function(){return this._multiplier},set:function(e){this._multiplier!==e&&(this._clockStep===Oo.SYSTEM_CLOCK&&(this._clockStep=Oo.SYSTEM_CLOCK_MULTIPLIER),this._multiplier=e)}},clockStep:{get:function(){return this._clockStep},set:function(e){e===Oo.SYSTEM_CLOCK&&(this._multiplier=1,this._shouldAnimate=!0,this._currentTime=Q.now()),this._clockStep=e}},shouldAnimate:{get:function(){return this._shouldAnimate},set:function(e){this._shouldAnimate!==e&&(this._clockStep===Oo.SYSTEM_CLOCK&&(this._clockStep=Oo.SYSTEM_CLOCK_MULTIPLIER),this._shouldAnimate=e)}}});G$.prototype.tick=function(){let e=Fi(),t=Q.clone(this._currentTime);if(this.canAnimate&&this._shouldAnimate){let n=this._clockStep;if(n===Oo.SYSTEM_CLOCK)t=Q.now(t);else{let i=this._multiplier;if(n===Oo.TICK_DEPENDENT)t=Q.addSeconds(t,i,t);else{let s=e-this._lastSystemTime;t=Q.addSeconds(t,i*(s/1e3),t)}let o=this.clockRange,r=this.startTime,a=this.stopTime;if(o===va.CLAMPED)Q.lessThan(t,r)?t=Q.clone(r,t):Q.greaterThan(t,a)&&(t=Q.clone(a,t),this.onStop.raiseEvent(this));else if(o===va.LOOP_STOP)for(Q.lessThan(t,r)&&(t=Q.clone(r,t));Q.greaterThan(t,a);)t=Q.addSeconds(r,Q.secondsDifference(t,a),t),this.onStop.raiseEvent(this)}}return this._currentTime=t,this._lastSystemTime=e,this.onTick.raiseEvent(this),t};var Tm=G$;function CC(){this._definitionChanged=new ye,this._startTime=void 0,this._stopTime=void 0,this._currentTime=void 0,this._clockRange=void 0,this._clockStep=void 0,this._multiplier=void 0}Object.defineProperties(CC.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},startTime:Ul("startTime"),stopTime:Ul("stopTime"),currentTime:Ul("currentTime"),clockRange:Ul("clockRange"),clockStep:Ul("clockStep"),multiplier:Ul("multiplier")});CC.prototype.clone=function(e){return l(e)||(e=new CC),e.startTime=this.startTime,e.stopTime=this.stopTime,e.currentTime=this.currentTime,e.clockRange=this.clockRange,e.clockStep=this.clockStep,e.multiplier=this.multiplier,e};CC.prototype.equals=function(e){return this===e||l(e)&&Q.equals(this.startTime,e.startTime)&&Q.equals(this.stopTime,e.stopTime)&&Q.equals(this.currentTime,e.currentTime)&&this.clockRange===e.clockRange&&this.clockStep===e.clockStep&&this.multiplier===e.multiplier};CC.prototype.merge=function(e){this.startTime=this.startTime??e.startTime,this.stopTime=this.stopTime??e.stopTime,this.currentTime=this.currentTime??e.currentTime,this.clockRange=this.clockRange??e.clockRange,this.clockStep=this.clockStep??e.clockStep,this.multiplier=this.multiplier??e.multiplier};CC.prototype.getValue=function(e){return l(e)||(e=new Tm),e.startTime=this.startTime??e.startTime,e.stopTime=this.stopTime??e.stopTime,e.currentTime=this.currentTime??e.currentTime,e.clockRange=this.clockRange??e.clockRange,e.multiplier=this.multiplier??e.multiplier,e.clockStep=this.clockStep??e.clockStep,e};var Em=CC;var wlt=V.WHITE,Ilt=.1,Dlt=new z(8,8),Plt=new z(0,0),Rlt=new z(1,1);function FS(e){e=e??G.EMPTY_OBJECT,this._definitionChanged=new ye,this._color=void 0,this._colorSubscription=void 0,this._cellAlpha=void 0,this._cellAlphaSubscription=void 0,this._lineCount=void 0,this._lineCountSubscription=void 0,this._lineThickness=void 0,this._lineThicknessSubscription=void 0,this._lineOffset=void 0,this._lineOffsetSubscription=void 0,this.color=e.color,this.cellAlpha=e.cellAlpha,this.lineCount=e.lineCount,this.lineThickness=e.lineThickness,this.lineOffset=e.lineOffset}Object.defineProperties(FS.prototype,{isConstant:{get:function(){return X.isConstant(this._color)&&X.isConstant(this._cellAlpha)&&X.isConstant(this._lineCount)&&X.isConstant(this._lineThickness)&&X.isConstant(this._lineOffset)}},definitionChanged:{get:function(){return this._definitionChanged}},color:pe("color"),cellAlpha:pe("cellAlpha"),lineCount:pe("lineCount"),lineThickness:pe("lineThickness"),lineOffset:pe("lineOffset")});FS.prototype.getType=function(e){return"Grid"};var Olt=new Q;FS.prototype.getValue=function(e,t){return l(e)||(e=Q.now(Olt)),l(t)||(t={}),t.color=X.getValueOrClonedDefault(this._color,e,wlt,t.color),t.cellAlpha=X.getValueOrDefault(this._cellAlpha,e,Ilt),t.lineCount=X.getValueOrClonedDefault(this._lineCount,e,Dlt,t.lineCount),t.lineThickness=X.getValueOrClonedDefault(this._lineThickness,e,Rlt,t.lineThickness),t.lineOffset=X.getValueOrClonedDefault(this._lineOffset,e,Plt,t.lineOffset),t};FS.prototype.equals=function(e){return this===e||e instanceof FS&&X.equals(this._color,e._color)&&X.equals(this._cellAlpha,e._cellAlpha)&&X.equals(this._lineCount,e._lineCount)&&X.equals(this._lineThickness,e._lineThickness)&&X.equals(this._lineOffset,e._lineOffset)};var kS=FS;function zS(e){this._definitionChanged=new ye,this._color=void 0,this._colorSubscription=void 0,this.color=e}Object.defineProperties(zS.prototype,{isConstant:{get:function(){return X.isConstant(this._color)}},definitionChanged:{get:function(){return this._definitionChanged}},color:pe("color")});zS.prototype.getType=function(e){return"PolylineArrow"};var Mlt=new Q;zS.prototype.getValue=function(e,t){return l(e)||(e=Q.now(Mlt)),l(t)||(t={}),t.color=X.getValueOrClonedDefault(this._color,e,V.WHITE,t.color),t};zS.prototype.equals=function(e){return this===e||e instanceof zS&&X.equals(this._color,e._color)};var US=zS;var Blt=V.WHITE,Llt=V.TRANSPARENT,Nlt=16,Flt=255;function VS(e){e=e??G.EMPTY_OBJECT,this._definitionChanged=new ye,this._color=void 0,this._colorSubscription=void 0,this._gapColor=void 0,this._gapColorSubscription=void 0,this._dashLength=void 0,this._dashLengthSubscription=void 0,this._dashPattern=void 0,this._dashPatternSubscription=void 0,this.color=e.color,this.gapColor=e.gapColor,this.dashLength=e.dashLength,this.dashPattern=e.dashPattern}Object.defineProperties(VS.prototype,{isConstant:{get:function(){return X.isConstant(this._color)&&X.isConstant(this._gapColor)&&X.isConstant(this._dashLength)&&X.isConstant(this._dashPattern)}},definitionChanged:{get:function(){return this._definitionChanged}},color:pe("color"),gapColor:pe("gapColor"),dashLength:pe("dashLength"),dashPattern:pe("dashPattern")});VS.prototype.getType=function(e){return"PolylineDash"};var klt=new Q;VS.prototype.getValue=function(e,t){return l(e)||(e=Q.now(klt)),l(t)||(t={}),t.color=X.getValueOrClonedDefault(this._color,e,Blt,t.color),t.gapColor=X.getValueOrClonedDefault(this._gapColor,e,Llt,t.gapColor),t.dashLength=X.getValueOrDefault(this._dashLength,e,Nlt,t.dashLength),t.dashPattern=X.getValueOrDefault(this._dashPattern,e,Flt,t.dashPattern),t};VS.prototype.equals=function(e){return this===e||e instanceof VS&&X.equals(this._color,e._color)&&X.equals(this._gapColor,e._gapColor)&&X.equals(this._dashLength,e._dashLength)&&X.equals(this._dashPattern,e._dashPattern)};var jS=VS;var zlt=V.WHITE,Ult=.25,Vlt=1;function GS(e){e=e??G.EMPTY_OBJECT,this._definitionChanged=new ye,this._color=void 0,this._colorSubscription=void 0,this._glowPower=void 0,this._glowPowerSubscription=void 0,this._taperPower=void 0,this._taperPowerSubscription=void 0,this.color=e.color,this.glowPower=e.glowPower,this.taperPower=e.taperPower}Object.defineProperties(GS.prototype,{isConstant:{get:function(){return X.isConstant(this._color)&&X.isConstant(this._glow)}},definitionChanged:{get:function(){return this._definitionChanged}},color:pe("color"),glowPower:pe("glowPower"),taperPower:pe("taperPower")});GS.prototype.getType=function(e){return"PolylineGlow"};var jlt=new Q;GS.prototype.getValue=function(e,t){return l(e)||(e=Q.now(jlt)),l(t)||(t={}),t.color=X.getValueOrClonedDefault(this._color,e,zlt,t.color),t.glowPower=X.getValueOrDefault(this._glowPower,e,Ult,t.glowPower),t.taperPower=X.getValueOrDefault(this._taperPower,e,Vlt,t.taperPower),t};GS.prototype.equals=function(e){return this===e||e instanceof GS&&X.equals(this._color,e._color)&&X.equals(this._glowPower,e._glowPower)&&X.equals(this._taperPower,e._taperPower)};var HS=GS;var Glt=V.WHITE,Hlt=V.BLACK,Wlt=1;function WS(e){e=e??G.EMPTY_OBJECT,this._definitionChanged=new ye,this._color=void 0,this._colorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this.color=e.color,this.outlineColor=e.outlineColor,this.outlineWidth=e.outlineWidth}Object.defineProperties(WS.prototype,{isConstant:{get:function(){return X.isConstant(this._color)&&X.isConstant(this._outlineColor)&&X.isConstant(this._outlineWidth)}},definitionChanged:{get:function(){return this._definitionChanged}},color:pe("color"),outlineColor:pe("outlineColor"),outlineWidth:pe("outlineWidth")});WS.prototype.getType=function(e){return"PolylineOutline"};var qlt=new Q;WS.prototype.getValue=function(e,t){return l(e)||(e=Q.now(qlt)),l(t)||(t={}),t.color=X.getValueOrClonedDefault(this._color,e,Glt,t.color),t.outlineColor=X.getValueOrClonedDefault(this._outlineColor,e,Hlt,t.outlineColor),t.outlineWidth=X.getValueOrDefault(this._outlineWidth,e,Wlt),t};WS.prototype.equals=function(e){return this===e||e instanceof WS&&X.equals(this._color,e._color)&&X.equals(this._outlineColor,e._outlineColor)&&X.equals(this._outlineWidth,e._outlineWidth)};var fy=WS;function t_(e,t){this._value=void 0,this._definitionChanged=new ye,this._eventHelper=new Nr,this._referenceFrame=t??Bi.FIXED,this.setValue(e)}Object.defineProperties(t_.prototype,{isConstant:{get:function(){let e=this._value;if(!l(e))return!0;let t=e.length;for(let n=0;n<t;n++)if(!X.isConstant(e[n]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}}});var Ylt=new Q;t_.prototype.getValue=function(e,t){return l(e)||(e=Q.now(Ylt)),this.getValueInReferenceFrame(e,Bi.FIXED,t)};t_.prototype.getValueInReferenceFrame=function(e,t,n){let i=this._value;if(!l(i))return;let o=i.length;l(n)||(n=new Array(o));let r=0,a=0;for(;r<o;){let c=i[r].getValueInReferenceFrame(e,t,n[r]);l(c)&&(n[a]=c,a++),r++}return n.length=a,n};t_.prototype.setValue=function(e){let t=this._eventHelper;if(t.removeAll(),l(e)){this._value=e.slice();let n=e.length;for(let i=0;i<n;i++){let o=e[i];l(o)&&t.add(o.definitionChanged,t_.prototype._raiseDefinitionChanged,this)}}else this._value=void 0;this._definitionChanged.raiseEvent(this)};t_.prototype.equals=function(e){return this===e||e instanceof t_&&this._referenceFrame===e._referenceFrame&&X.arrayEquals(this._value,e._value)};t_.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var n_=t_;function dy(e){this._value=void 0,this._definitionChanged=new ye,this._eventHelper=new Nr,this.setValue(e)}Object.defineProperties(dy.prototype,{isConstant:{get:function(){let e=this._value;if(!l(e))return!0;let t=e.length;for(let n=0;n<t;n++)if(!X.isConstant(e[n]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}}});var Xlt=new Q;dy.prototype.getValue=function(e,t){l(e)||(e=Q.now(Xlt));let n=this._value;if(!l(n))return;let i=n.length;l(t)||(t=new Array(i));let o=0,r=0;for(;o<i;){let s=this._value[o].getValue(e,t[o]);l(s)&&(t[r]=s,r++),o++}return t.length=r,t};dy.prototype.setValue=function(e){let t=this._eventHelper;if(t.removeAll(),l(e)){this._value=e.slice();let n=e.length;for(let i=0;i<n;i++){let o=e[i];l(o)&&t.add(o.definitionChanged,dy.prototype._raiseDefinitionChanged,this)}}else this._value=void 0;this._definitionChanged.raiseEvent(this)};dy.prototype.equals=function(e){return this===e||e instanceof dy&&X.arrayEquals(this._value,e._value)};dy.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var qS=dy;function TC(e){let t=e._targetProperty;if(!l(t)){let n=e._targetEntity;if(!l(n)){if(n=e._targetCollection.getById(e._targetId),!l(n)){e._targetEntity=e._targetProperty=void 0;return}n.definitionChanged.addEventListener(Ff.prototype._onTargetEntityDefinitionChanged,e),e._targetEntity=n}let i=e._targetPropertyNames;t=e._targetEntity;for(let o=0,r=i.length;o<r&&l(t);++o)t=t[i[o]];e._targetProperty=t}return t}function Ff(e,t,n){this._targetCollection=e,this._targetId=t,this._targetPropertyNames=n,this._targetProperty=void 0,this._targetEntity=void 0,this._definitionChanged=new ye,e.collectionChanged.addEventListener(Ff.prototype._onCollectionChanged,this)}Object.defineProperties(Ff.prototype,{isConstant:{get:function(){return X.isConstant(TC(this))}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){let e=TC(this);return l(e)?e.referenceFrame:void 0}},targetId:{get:function(){return this._targetId}},targetCollection:{get:function(){return this._targetCollection}},targetPropertyNames:{get:function(){return this._targetPropertyNames}},resolvedProperty:{get:function(){return TC(this)}}});Ff.fromString=function(e,t){let n,i=[],o=!0,r=!1,a="";for(let s=0;s<t.length;++s){let c=t.charAt(s);r?(a+=c,r=!1):c==="\\"?r=!0:o&&c==="#"?(n=a,o=!1,a=""):!o&&c==="."?(i.push(a),a=""):a+=c}return i.push(a),new Ff(e,n,i)};var Klt=new Q;Ff.prototype.getValue=function(e,t){let n=TC(this);return l(e)||(e=Q.now(Klt)),l(n)?n.getValue(e,t):void 0};Ff.prototype.getValueInReferenceFrame=function(e,t,n){let i=TC(this);return l(i)?i.getValueInReferenceFrame(e,t,n):void 0};Ff.prototype.getType=function(e){let t=TC(this);return l(t)?t.getType(e):void 0};Ff.prototype.equals=function(e){if(this===e)return!0;let t=this._targetPropertyNames,n=e._targetPropertyNames;if(this._targetCollection!==e._targetCollection||this._targetId!==e._targetId||t.length!==n.length)return!1;let i=this._targetPropertyNames.length;for(let o=0;o<i;o++)if(t[o]!==n[o])return!1;return!0};Ff.prototype._onTargetEntityDefinitionChanged=function(e,t,n,i){l(this._targetProperty)&&this._targetPropertyNames[0]===t&&(this._targetProperty=void 0,this._definitionChanged.raiseEvent(this))};Ff.prototype._onCollectionChanged=function(e,t,n){let i=this._targetEntity;l(i)&&n.indexOf(i)!==-1?(i.definitionChanged.removeEventListener(Ff.prototype._onTargetEntityDefinitionChanged,this),this._targetEntity=this._targetProperty=void 0):l(i)||(i=TC(this),l(i)&&this._definitionChanged.raiseEvent(this))};var i_=Ff;var Qlt={packedLength:1,pack:function(e,t,n){return n=n??0,t[n]=e,t},unpack:function(e,t,n){return t=t??0,e[t]},convertPackedArrayForInterpolation:function(e,t,n,i){l(i)||(i=[]),t=t??0,n=n??e.length;let o;for(let r=0,a=n-t+1;r<a;r++){let s=e[t+r];r===0||Math.abs(o-s)<Math.PI?i[r]=s:i[r]=s-D.TWO_PI,o=s}},unpackInterpolationResult:function(e,t,n,i,o){return o=e[0],o<0?o+D.TWO_PI:o}},$d=Qlt;var rxe={packedLength:1,pack:function(e,t,n){n=n??0,t[n]=e},unpack:function(e,t,n){return t=t??0,e[t]}};function axe(e,t,n){let i,o=e.length,r=n.length,a=o+r;if(e.length=a,o!==t){let s=o-1;for(i=a-1;i>=t;i--)e[i]=e[s--]}for(i=0;i<r;i++)e[t++]=n[i]}function sxe(e,t){return e instanceof Q?e:typeof e=="string"?Q.fromIso8601(e):Q.addSeconds(t,e,new Q)}var H$=[],W$=[];function OG(e,t,n,i,o){let r=0,a,s,c,u,f,d;for(;r<i.length;){f=sxe(i[r],e),c=_o(t,f,Q.compare);let p=0,g=0;if(c<0){for(c=~c,u=c*o,s=void 0,d=t[c];r<i.length&&(f=sxe(i[r],e),!(l(s)&&Q.compare(s,f)>=0||l(d)&&Q.compare(f,d)>=0));){for(H$[p++]=f,r=r+1,a=0;a<o;a++)W$[g++]=i[r],r=r+1;s=f}p>0&&(W$.length=g,axe(n,u,W$),H$.length=p,axe(t,c,H$))}else{for(a=0;a<o;a++)r++,n[c*o+a]=i[r];r++}}}function Jd(e,t){let n=e;n===Number&&(n=rxe);let i=n.packedLength,o=n.packedInterpolationLength??i,r=0,a;if(l(t)){let s=t.length;a=new Array(s);for(let c=0;c<s;c++){let u=t[c];u===Number&&(u=rxe);let f=u.packedLength;i+=f,o+=u.packedInterpolationLength??f,a[c]=u}r=s}this._type=e,this._innerType=n,this._interpolationDegree=1,this._interpolationAlgorithm=bC,this._numberOfPoints=0,this._times=[],this._values=[],this._xTable=[],this._yTable=[],this._packedLength=i,this._packedInterpolationLength=o,this._updateTableLength=!0,this._interpolationResult=new Array(o),this._definitionChanged=new ye,this._derivativeTypes=t,this._innerDerivativeTypes=a,this._inputOrder=r,this._forwardExtrapolationType=Nf.NONE,this._forwardExtrapolationDuration=0,this._backwardExtrapolationType=Nf.NONE,this._backwardExtrapolationDuration=0}Object.defineProperties(Jd.prototype,{isConstant:{get:function(){return this._values.length===0}},definitionChanged:{get:function(){return this._definitionChanged}},type:{get:function(){return this._type}},derivativeTypes:{get:function(){return this._derivativeTypes}},interpolationDegree:{get:function(){return this._interpolationDegree}},interpolationAlgorithm:{get:function(){return this._interpolationAlgorithm}},forwardExtrapolationType:{get:function(){return this._forwardExtrapolationType},set:function(e){this._forwardExtrapolationType!==e&&(this._forwardExtrapolationType=e,this._definitionChanged.raiseEvent(this))}},forwardExtrapolationDuration:{get:function(){return this._forwardExtrapolationDuration},set:function(e){this._forwardExtrapolationDuration!==e&&(this._forwardExtrapolationDuration=e,this._definitionChanged.raiseEvent(this))}},backwardExtrapolationType:{get:function(){return this._backwardExtrapolationType},set:function(e){this._backwardExtrapolationType!==e&&(this._backwardExtrapolationType=e,this._definitionChanged.raiseEvent(this))}},backwardExtrapolationDuration:{get:function(){return this._backwardExtrapolationDuration},set:function(e){this._backwardExtrapolationDuration!==e&&(this._backwardExtrapolationDuration=e,this._definitionChanged.raiseEvent(this))}}});var $lt=new Q;Jd.prototype.getValue=function(e,t){l(e)||(e=Q.now($lt));let n=this._times,i=n.length;if(i===0)return;let o,r=this._innerType,a=this._values,s=_o(n,e,Q.compare);if(s<0){if(s=~s,s===0){let E=n[s];if(o=this._backwardExtrapolationDuration,this._backwardExtrapolationType===Nf.NONE||o!==0&&Q.secondsDifference(E,e)>o)return;if(this._backwardExtrapolationType===Nf.HOLD)return r.unpack(a,0,t)}if(s>=i){s=i-1;let E=n[s];if(o=this._forwardExtrapolationDuration,this._forwardExtrapolationType===Nf.NONE||o!==0&&Q.secondsDifference(e,E)>o)return;if(this._forwardExtrapolationType===Nf.HOLD)return s=i-1,r.unpack(a,s*r.packedLength,t)}let c=this._xTable,u=this._yTable,f=this._interpolationAlgorithm,d=this._packedInterpolationLength,p=this._inputOrder;if(this._updateTableLength){this._updateTableLength=!1;let E=Math.min(f.getRequiredDataPoints(this._interpolationDegree,p),i);E!==this._numberOfPoints&&(this._numberOfPoints=E,c.length=E,u.length=E*d)}let g=this._numberOfPoints-1;if(g<1)return;let m=0,A=i-1;if(A-m+1>=g+1){let E=s-(g/2|0)-1;E<m&&(E=m);let S=E+g;S>A&&(S=A,E=S-g,E<m&&(E=m)),m=E,A=S}let x=A-m+1;for(let E=0;E<x;++E)c[E]=Q.secondsDifference(n[m+E],n[A]);if(l(r.convertPackedArrayForInterpolation))r.convertPackedArrayForInterpolation(a,m,A,u);else{let E=0,S=this._packedLength,w=m*S,P=(A+1)*S;for(;w<P;)u[E]=a[w],w++,E++}let b=Q.secondsDifference(e,n[A]),C;if(p===0||!l(f.interpolate))C=f.interpolateOrderZero(b,c,u,d,this._interpolationResult);else{let E=Math.floor(d/(p+1));C=f.interpolate(b,c,u,E,p,p,this._interpolationResult)}return l(r.unpackInterpolationResult)?r.unpackInterpolationResult(C,a,m,A,t):r.unpack(C,0,t)}return r.unpack(a,s*this._packedLength,t)};Jd.prototype.setInterpolationOptions=function(e){if(!l(e))return;let t=!1,n=e.interpolationAlgorithm,i=e.interpolationDegree;l(n)&&this._interpolationAlgorithm!==n&&(this._interpolationAlgorithm=n,t=!0),l(i)&&this._interpolationDegree!==i&&(this._interpolationDegree=i,t=!0),t&&(this._updateTableLength=!0,this._definitionChanged.raiseEvent(this))};Jd.prototype.addSample=function(e,t,n){let i=this._innerDerivativeTypes,o=l(i),r=this._innerType,a=[];if(a.push(e),r.pack(t,a,a.length),o){let s=i.length;for(let c=0;c<s;c++)i[c].pack(n[c],a,a.length)}OG(void 0,this._times,this._values,a,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)};Jd.prototype.addSamples=function(e,t,n){let i=this._innerDerivativeTypes,o=l(i),r=this._innerType,a=e.length,s=[];for(let c=0;c<a;c++)if(s.push(e[c]),r.pack(t[c],s,s.length),o){let u=n[c],f=i.length;for(let d=0;d<f;d++)i[d].pack(u[d],s,s.length)}OG(void 0,this._times,this._values,s,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)};Jd.prototype.getSample=function(e){let t=this._times,n=t.length;if(l(n))return e<0&&(e+=n),t[e]};Jd.prototype.addSamplesPackedArray=function(e,t){OG(t,this._times,this._values,e,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)};Jd.prototype.removeSample=function(e){let t=_o(this._times,e,Q.compare);return t<0?!1:(cxe(this,t,1),!0)};function cxe(e,t,n){let i=e._packedLength;e._times.splice(t,n),e._values.splice(t*i,n*i),e._updateTableLength=!0,e._definitionChanged.raiseEvent(e)}Jd.prototype.removeSamples=function(e){let t=this._times,n=_o(t,e.start,Q.compare);n<0?n=~n:e.isStartIncluded||++n;let i=_o(t,e.stop,Q.compare);i<0?i=~i:e.isStopIncluded&&++i,cxe(this,n,i-n)};Jd.prototype.equals=function(e){if(this===e)return!0;if(!l(e)||this._type!==e._type||this._interpolationDegree!==e._interpolationDegree||this._interpolationAlgorithm!==e._interpolationAlgorithm)return!1;let t=this._derivativeTypes,n=l(t),i=e._derivativeTypes,o=l(i);if(n!==o)return!1;let r,a;if(n){if(a=t.length,a!==i.length)return!1;for(r=0;r<a;r++)if(t[r]!==i[r])return!1}let s=this._times,c=e._times;if(a=s.length,a!==c.length)return!1;for(r=0;r<a;r++)if(!Q.equals(s[r],c[r]))return!1;let u=this._values,f=e._values;for(a=u.length,r=0;r<a;r++)if(u[r]!==f[r])return!1;return!0};Jd._mergeNewSamples=OG;var kf=Jd;function Zd(e,t){t=t??0;let n;if(t>0){n=new Array(t);for(let i=0;i<t;i++)n[i]=h}this._numberOfDerivatives=t,this._property=new kf(h,n),this._definitionChanged=new ye,this._referenceFrame=e??Bi.FIXED,this._property._definitionChanged.addEventListener(function(){this._definitionChanged.raiseEvent(this)},this)}Object.defineProperties(Zd.prototype,{isConstant:{get:function(){return this._property.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}},interpolationDegree:{get:function(){return this._property.interpolationDegree}},interpolationAlgorithm:{get:function(){return this._property.interpolationAlgorithm}},numberOfDerivatives:{get:function(){return this._numberOfDerivatives}},forwardExtrapolationType:{get:function(){return this._property.forwardExtrapolationType},set:function(e){this._property.forwardExtrapolationType=e}},forwardExtrapolationDuration:{get:function(){return this._property.forwardExtrapolationDuration},set:function(e){this._property.forwardExtrapolationDuration=e}},backwardExtrapolationType:{get:function(){return this._property.backwardExtrapolationType},set:function(e){this._property.backwardExtrapolationType=e}},backwardExtrapolationDuration:{get:function(){return this._property.backwardExtrapolationDuration},set:function(e){this._property.backwardExtrapolationDuration=e}}});var Jlt=new Q;Zd.prototype.getValue=function(e,t){return l(e)||(e=Q.now(Jlt)),this.getValueInReferenceFrame(e,Bi.FIXED,t)};Zd.prototype.getValueInReferenceFrame=function(e,t,n){if(n=this._property.getValue(e,n),l(n))return kh.convertToReferenceFrame(e,n,this._referenceFrame,t,n)};Zd.prototype.setInterpolationOptions=function(e){this._property.setInterpolationOptions(e)};Zd.prototype.addSample=function(e,t,n){let i=this._numberOfDerivatives;this._property.addSample(e,t,n)};Zd.prototype.addSamples=function(e,t,n){this._property.addSamples(e,t,n)};Zd.prototype.addSamplesPackedArray=function(e,t){this._property.addSamplesPackedArray(e,t)};Zd.prototype.removeSample=function(e){return this._property.removeSample(e)};Zd.prototype.removeSamples=function(e){this._property.removeSamples(e)};Zd.prototype.equals=function(e){return this===e||e instanceof Zd&&X.equals(this._property,e._property)&&this._referenceFrame===e._referenceFrame};var uc=Zd;var lxe={HORIZONTAL:0,VERTICAL:1};Object.freeze(lxe);var vm=lxe;var Zlt=vm.HORIZONTAL,eut=V.WHITE,tut=V.BLACK,nut=0,iut=1;function YS(e){e=e??G.EMPTY_OBJECT,this._definitionChanged=new ye,this._orientation=void 0,this._orientationSubscription=void 0,this._evenColor=void 0,this._evenColorSubscription=void 0,this._oddColor=void 0,this._oddColorSubscription=void 0,this._offset=void 0,this._offsetSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.orientation=e.orientation,this.evenColor=e.evenColor,this.oddColor=e.oddColor,this.offset=e.offset,this.repeat=e.repeat}Object.defineProperties(YS.prototype,{isConstant:{get:function(){return X.isConstant(this._orientation)&&X.isConstant(this._evenColor)&&X.isConstant(this._oddColor)&&X.isConstant(this._offset)&&X.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},orientation:pe("orientation"),evenColor:pe("evenColor"),oddColor:pe("oddColor"),offset:pe("offset"),repeat:pe("repeat")});YS.prototype.getType=function(e){return"Stripe"};var out=new Q;YS.prototype.getValue=function(e,t){return l(e)||(e=Q.now(out)),l(t)||(t={}),t.horizontal=X.getValueOrDefault(this._orientation,e,Zlt)===vm.HORIZONTAL,t.evenColor=X.getValueOrClonedDefault(this._evenColor,e,eut,t.evenColor),t.oddColor=X.getValueOrClonedDefault(this._oddColor,e,tut,t.oddColor),t.offset=X.getValueOrDefault(this._offset,e,nut),t.repeat=X.getValueOrDefault(this._repeat,e,iut),t};YS.prototype.equals=function(e){return this===e||e instanceof YS&&X.equals(this._orientation,e._orientation)&&X.equals(this._evenColor,e._evenColor)&&X.equals(this._oddColor,e._oddColor)&&X.equals(this._offset,e._offset)&&X.equals(this._repeat,e._repeat)};var XS=YS;function hy(e){this._definitionChanged=new ye,this._intervals=new Ta,this._intervals.changedEvent.addEventListener(hy.prototype._intervalsChanged,this),this._referenceFrame=e??Bi.FIXED}Object.defineProperties(hy.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}},referenceFrame:{get:function(){return this._referenceFrame}}});var rut=new Q;hy.prototype.getValue=function(e,t){return l(e)||(e=Q.now(rut)),this.getValueInReferenceFrame(e,Bi.FIXED,t)};hy.prototype.getValueInReferenceFrame=function(e,t,n){let i=this._intervals.findDataForIntervalContainingDate(e);if(l(i))return kh.convertToReferenceFrame(e,i,this._referenceFrame,t,n)};hy.prototype.equals=function(e){return this===e||e instanceof hy&&this._intervals.equals(e._intervals,X.equals)&&this._referenceFrame===e._referenceFrame};hy.prototype._intervalsChanged=function(){this._definitionChanged.raiseEvent(this)};var o_=hy;function EC(){this._definitionChanged=new ye,this._intervals=new Ta,this._intervals.changedEvent.addEventListener(EC.prototype._intervalsChanged,this)}Object.defineProperties(EC.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}}});var aut=new Q;EC.prototype.getValue=function(e,t){l(e)||(e=Q.now(aut));let n=this._intervals.findDataForIntervalContainingDate(e);return l(n)&&typeof n.clone=="function"?n.clone(t):n};EC.prototype.equals=function(e){return this===e||e instanceof EC&&this._intervals.equals(e._intervals,X.equals)};EC.prototype._intervalsChanged=function(){this._definitionChanged.raiseEvent(this)};var r_=EC;function KS(e,t){this._position=void 0,this._subscription=void 0,this._definitionChanged=new ye,this._normalize=t??!0,this.position=e}Object.defineProperties(KS.prototype,{isConstant:{get:function(){return X.isConstant(this._position)}},definitionChanged:{get:function(){return this._definitionChanged}},position:{get:function(){return this._position},set:function(e){let t=this._position;t!==e&&(l(t)&&this._subscription(),this._position=e,l(e)&&(this._subscription=e._definitionChanged.addEventListener(function(){this._definitionChanged.raiseEvent(this)},this)),this._definitionChanged.raiseEvent(this))}},normalize:{get:function(){return this._normalize},set:function(e){this._normalize!==e&&(this._normalize=e,this._definitionChanged.raiseEvent(this))}}});var sut=new h,uxe=new h,fxe=new Q,cut=new Q,q$=1/60;KS.prototype.getValue=function(e,t){return this._getValue(e,t)};KS.prototype._getValue=function(e,t,n){l(e)||(e=Q.now(cut)),l(t)||(t=new h);let i=this._position;if(X.isConstant(i))return this._normalize?void 0:h.clone(h.ZERO,t);let o=i.getValue(e,sut),r=i.getValue(Q.addSeconds(e,q$,fxe),uxe);if(!l(o)||!l(r)&&(r=o,o=i.getValue(Q.addSeconds(e,-q$,fxe),uxe),!l(o)))return;if(h.equals(o,r))return this._normalize?void 0:h.clone(h.ZERO,t);l(n)&&o.clone(n);let a=h.subtract(r,o,t);return this._normalize?h.normalize(a,t):h.divideByScalar(a,q$,t)};KS.prototype.equals=function(e){return this===e||e instanceof KS&&X.equals(this._position,e._position)};var a_=KS;function r2(e,t){this._velocityVectorProperty=new a_(e,!0),this._subscription=void 0,this._ellipsoid=void 0,this._definitionChanged=new ye,this.ellipsoid=t??te.default;let n=this;this._velocityVectorProperty.definitionChanged.addEventListener(function(){n._definitionChanged.raiseEvent(n)})}Object.defineProperties(r2.prototype,{isConstant:{get:function(){return X.isConstant(this._velocityVectorProperty)}},definitionChanged:{get:function(){return this._definitionChanged}},position:{get:function(){return this._velocityVectorProperty.position},set:function(e){this._velocityVectorProperty.position=e}},ellipsoid:{get:function(){return this._ellipsoid},set:function(e){this._ellipsoid!==e&&(this._ellipsoid=e,this._definitionChanged.raiseEvent(this))}}});var dxe=new h,lut=new h,hxe=new $,uut=new Q;r2.prototype.getValue=function(e,t){l(e)||(e=Q.now(uut));let n=this._velocityVectorProperty._getValue(e,lut,dxe);if(l(n))return pt.rotationMatrixFromPositionVelocity(dxe,n,this._ellipsoid,hxe),Le.fromRotationMatrix(hxe,t)};r2.prototype.equals=function(e){return this===e||e instanceof r2&&X.equals(this._velocityVectorProperty,e._velocityVectorProperty)&&(this._ellipsoid===e._ellipsoid||this._ellipsoid.equals(e._ellipsoid))};var a2=r2;var s_={COMPLETE:0,BELOW_ELLIPSOID_HORIZON:1,ABOVE_ELLIPSOID_HORIZON:2};s_.validate=function(e){return e===s_.COMPLETE||e===s_.BELOW_ELLIPSOID_HORIZON||e===s_.ABOVE_ELLIPSOID_HORIZON};s_.toString=function(e){switch(e){case s_.COMPLETE:return"COMPLETE";case s_.BELOW_ELLIPSOID_HORIZON:return"BELOW_ELLIPSOID_HORIZON";case s_.ABOVE_ELLIPSOID_HORIZON:return"ABOVE_ELLIPSOID_HORIZON";default:throw new _e("SensorVolumePortionToDisplay value is not valid and cannot be converted to a String.")}};var QS=s_;function my(){}my.packedLength=h.packedLength;my.unpack=h.unpack;my.pack=h.pack;var Y$;function s2(e,t){return t[0]==="#"&&(t=Y$+t),i_.fromString(e,t)}function mxe(e,t,n){if(l(n.reference))return s2(t,n.reference);if(l(n.velocityReference)){let i=s2(t,n.velocityReference);switch(e){case h:case my:return new a_(i,e===my);case Le:return new a2(i)}}throw new re(`${JSON.stringify(n)} is not valid CZML.`)}function fut(e,t){return new jh(function(n,i){return t(e.getValue(n,i))},e.isConstant)}var io=new h,ru=new o2,gl=new de,vC=new wn,MG=new Le;function dut(e){let t=e.rgbaf;if(l(t))return t;let n=e.rgba;if(!l(n))return;let i=n.length;if(i===V.packedLength)return[V.byteToFloat(n[0]),V.byteToFloat(n[1]),V.byteToFloat(n[2]),V.byteToFloat(n[3])];t=new Array(i);for(let o=0;o<i;o+=5)t[o]=n[o],t[o+1]=V.byteToFloat(n[o+1]),t[o+2]=V.byteToFloat(n[o+2]),t[o+3]=V.byteToFloat(n[o+3]),t[o+4]=V.byteToFloat(n[o+4]);return t}function pxe(e,t){let n=e.uri??e;return l(t)?t.getDerivedResource({url:n}):De.createIfNeeded(n)}function hut(e){let t=e.wsen;if(l(t))return t;let n=e.wsenDegrees;if(!l(n))return;let i=n.length;if(i===oe.packedLength)return[D.toRadians(n[0]),D.toRadians(n[1]),D.toRadians(n[2]),D.toRadians(n[3])];t=new Array(i);for(let o=0;o<i;o+=5)t[o]=n[o],t[o+1]=D.toRadians(n[o+1]),t[o+2]=D.toRadians(n[o+2]),t[o+3]=D.toRadians(n[o+3]),t[o+4]=D.toRadians(n[o+4]);return t}function mut(e){let t=e.length;if(ru.magnitude=1,t===2)return ru.clock=e[0],ru.cone=e[1],h.fromSpherical(ru,io),[io.x,io.y,io.z];let n=new Array(t/3*4);for(let i=0,o=0;i<t;i+=3,o+=4)n[o]=e[i],ru.clock=e[i+1],ru.cone=e[i+2],h.fromSpherical(ru,io),n[o+1]=io.x,n[o+2]=io.y,n[o+3]=io.z;return n}function put(e){let t=e.length;if(t===3)return ru.clock=e[0],ru.cone=e[1],ru.magnitude=e[2],h.fromSpherical(ru,io),[io.x,io.y,io.z];let n=new Array(t);for(let i=0;i<t;i+=4)n[i]=e[i],ru.clock=e[i+1],ru.cone=e[i+2],ru.magnitude=e[i+3],h.fromSpherical(ru,io),n[i+1]=io.x,n[i+2]=io.y,n[i+3]=io.z;return n}function gut(e){let t=e.length;if(t===3)return gl.longitude=e[0],gl.latitude=e[1],gl.height=e[2],te.default.cartographicToCartesian(gl,io),[io.x,io.y,io.z];let n=new Array(t);for(let i=0;i<t;i+=4)n[i]=e[i],gl.longitude=e[i+1],gl.latitude=e[i+2],gl.height=e[i+3],te.default.cartographicToCartesian(gl,io),n[i+1]=io.x,n[i+2]=io.y,n[i+3]=io.z;return n}function _ut(e){let t=e.length;if(t===3)return gl.longitude=D.toRadians(e[0]),gl.latitude=D.toRadians(e[1]),gl.height=e[2],te.default.cartographicToCartesian(gl,io),[io.x,io.y,io.z];let n=new Array(t);for(let i=0;i<t;i+=4)n[i]=e[i],gl.longitude=D.toRadians(e[i+1]),gl.latitude=D.toRadians(e[i+2]),gl.height=e[i+3],te.default.cartographicToCartesian(gl,io),n[i+1]=io.x,n[i+2]=io.y,n[i+3]=io.z;return n}function X$(e){let t=e.cartesian;if(l(t))return t;let n=e.cartesianVelocity;if(l(n))return n;let i=e.unitCartesian;if(l(i))return i;let o=e.unitSpherical;if(l(o))return mut(o);let r=e.spherical;if(l(r))return put(r);let a=e.cartographicRadians;if(l(a))return gut(a);let s=e.cartographicDegrees;if(l(s))return _ut(s);throw new re(`${JSON.stringify(e)} is not a valid CZML interval.`)}function gxe(e,t){h.unpack(e,t,io),h.normalize(io,io),h.pack(io,e,t)}function Aut(e){let t=X$(e);if(t.length===3)return gxe(t,0),t;for(let n=1;n<t.length;n+=4)gxe(t,n);return t}function _xe(e,t){Le.unpack(e,t,MG),Le.normalize(MG,MG),Le.pack(MG,e,t)}function yut(e){let t=e.unitQuaternion;if(l(t)){if(t.length===4)return _xe(t,0),t;for(let n=1;n<t.length;n+=5)_xe(t,n)}return t}function Axe(e){return typeof e=="boolean"?Boolean:typeof e=="number"?Number:typeof e=="string"?String:e.hasOwnProperty("array")?Array:e.hasOwnProperty("boolean")?Boolean:e.hasOwnProperty("boundingRectangle")?Je:e.hasOwnProperty("cartesian2")?z:e.hasOwnProperty("cartesian")||e.hasOwnProperty("spherical")||e.hasOwnProperty("cartographicRadians")||e.hasOwnProperty("cartographicDegrees")?h:e.hasOwnProperty("unitCartesian")||e.hasOwnProperty("unitSpherical")?my:e.hasOwnProperty("rgba")||e.hasOwnProperty("rgbaf")?V:e.hasOwnProperty("arcType")?on:e.hasOwnProperty("classificationType")?Wn:e.hasOwnProperty("colorBlendMode")?sl:e.hasOwnProperty("cornerType")?Xi:e.hasOwnProperty("heightReference")?nt:e.hasOwnProperty("horizontalOrigin")?Oi:e.hasOwnProperty("date")?Q:e.hasOwnProperty("labelStyle")?sr:e.hasOwnProperty("number")?Number:e.hasOwnProperty("nearFarScalar")?zt:e.hasOwnProperty("distanceDisplayCondition")?kt:e.hasOwnProperty("object")||e.hasOwnProperty("value")?Object:e.hasOwnProperty("unitQuaternion")?Le:e.hasOwnProperty("shadowMode")?vn:e.hasOwnProperty("string")?String:e.hasOwnProperty("stripeOrientation")?vm:e.hasOwnProperty("wsen")||e.hasOwnProperty("wsenDegrees")?oe:e.hasOwnProperty("uri")?l2.default:e.hasOwnProperty("verticalOrigin")?zn:Object}function xut(e,t,n){switch(e){case on:return on[t.arcType??t];case Array:return t.array;case Boolean:return t.boolean??t;case Je:return t.boundingRectangle;case z:return t.cartesian2;case h:return X$(t);case my:return Aut(t);case V:return dut(t);case Wn:return Wn[t.classificationType??t];case sl:return sl[t.colorBlendMode??t];case Xi:return Xi[t.cornerType??t];case nt:return nt[t.heightReference??t];case Oi:return Oi[t.horizontalOrigin??t];case Image:return pxe(t,n);case Q:return Q.fromIso8601(t.date??t);case sr:return sr[t.labelStyle??t];case Number:return t.number??t;case zt:return t.nearFarScalar;case kt:return t.distanceDisplayCondition;case Object:return t.object??t.value??t;case Le:return yut(t);case $d:return t.number??t;case QS:return QS[t.portionToDisplay??t];case vn:return vn[t.shadowMode??t.shadows??t];case String:return t.string??t;case vm:return vm[t.stripeOrientation??t];case oe:return hut(t);case l2.default:return pxe(t,n);case zn:return zn[t.verticalOrigin??t];default:throw new re(`Unknown CzmlDataSource interval type: ${e}`)}}var but={HERMITE:n2,LAGRANGE:i2,LINEAR:bC};function BG(e,t){let n=e.interpolationAlgorithm,i=e.interpolationDegree;(l(n)||l(i))&&t.setInterpolationOptions({interpolationAlgorithm:but[n],interpolationDegree:i});let o=e.forwardExtrapolationType;l(o)&&(t.forwardExtrapolationType=Nf[o]);let r=e.forwardExtrapolationDuration;l(r)&&(t.forwardExtrapolationDuration=r);let a=e.backwardExtrapolationType;l(a)&&(t.backwardExtrapolationType=Nf[a]);let s=e.backwardExtrapolationDuration;l(s)&&(t.backwardExtrapolationDuration=s)}var yxe={iso8601:void 0};function Fr(e){if(l(e))return yxe.iso8601=e,wn.fromIso8601(yxe)}function K$(e){let t=Qe.MAXIMUM_INTERVAL.clone();return t.data=e,t}function xxe(e){let t=new hl;return t.intervals.addInterval(K$(e)),t}function bxe(e){let t=new cc(e.referenceFrame);return t.intervals.addInterval(K$(e)),t}function LG(e,t,n,i,o,r,a){let s=Fr(i.interval);l(o)&&(l(s)?s=wn.intersect(s,o,vC):s=o);let c,u,f,d=!l(i.reference)&&!l(i.velocityReference),p=l(s)&&!s.equals(Qe.MAXIMUM_INTERVAL);if(i.delete===!0){if(!p){t[n]=void 0;return}return Oxe(t[n],s)}let g=!1;if(d){if(u=xut(e,i,r),!l(u))return;c=e.packedLength??1,f=u.length??1,g=!l(i.array)&&typeof u!="string"&&f>c&&e!==Object}let m=typeof e.unpack=="function"&&e!==$d;if(!g&&!p){d?t[n]=new ci(m?e.unpack(u,0):u):t[n]=mxe(e,a,i);return}let A=t[n],y,x=i.epoch;if(l(x)&&(y=Q.fromIso8601(x)),g&&!p){A instanceof kf||(t[n]=A=new kf(e)),A.addSamplesPackedArray(u,y),BG(i,A);return}let b;if(!g&&p){s=s.clone(),d?s.data=m?e.unpack(u,0):u:s.data=mxe(e,a,i),l(A)||(t[n]=A=d?new r_:new hl),d&&A instanceof r_?A.intervals.addInterval(s):A instanceof hl?(d&&(s.data=new ci(s.data)),A.intervals.addInterval(s)):(t[n]=A=xxe(A),d&&(s.data=new ci(s.data)),A.intervals.addInterval(s));return}l(A)||(t[n]=A=new hl),A instanceof hl||(t[n]=A=xxe(A));let C=A.intervals;b=C.findInterval(s),(!l(b)||!(b.data instanceof kf))&&(b=s.clone(),b.data=new kf(e),C.addInterval(b)),b.data.addSamplesPackedArray(u,y),BG(i,b.data)}function Oxe(e,t){if(e instanceof kf){e.removeSamples(t);return}else if(e instanceof r_){e.intervals.removeInterval(t);return}else if(e instanceof hl){let n=e.intervals;for(let i=0;i<n.length;++i){let o=wn.intersect(n.get(i),t,vC);o.isEmpty||Oxe(o.data,t)}n.removeInterval(t);return}}function Ce(e,t,n,i,o,r,a){if(l(i))if(Array.isArray(i))for(let s=0,c=i.length;s<c;++s)LG(e,t,n,i[s],o,r,a);else LG(e,t,n,i,o,r,a)}function Cxe(e,t,n,i,o,r){let a=Fr(n.interval);l(i)&&(l(a)?a=wn.intersect(a,i,vC):a=i);let s=l(n.cartesianVelocity)?1:0,c=h.packedLength*(s+1),u,f,d=!l(n.reference),p=l(a)&&!a.equals(Qe.MAXIMUM_INTERVAL);if(n.delete===!0){if(!p){e[t]=void 0;return}return Mxe(e[t],a)}let g,m=!1;if(d&&(l(n.referenceFrame)&&(g=Bi[n.referenceFrame]),g=g??Bi.FIXED,u=X$(n),f=u.length??1,m=f>c),!m&&!p){d?e[t]=new zl(h.unpack(u),g):e[t]=s2(r,n.reference);return}let A=e[t],y,x=n.epoch;if(l(x)&&(y=Q.fromIso8601(x)),m&&!p){(!(A instanceof uc)||l(g)&&A.referenceFrame!==g)&&(e[t]=A=new uc(g,s)),A.addSamplesPackedArray(u,y),BG(n,A);return}let b;if(!m&&p){a=a.clone(),d?a.data=h.unpack(u):a.data=s2(r,n.reference),l(A)||(d?A=new o_(g):A=new cc(g),e[t]=A),d&&A instanceof o_&&l(g)&&A.referenceFrame===g?A.intervals.addInterval(a):A instanceof cc?(d&&(a.data=new zl(a.data,g)),A.intervals.addInterval(a)):(e[t]=A=bxe(A),d&&(a.data=new zl(a.data,g)),A.intervals.addInterval(a));return}l(A)?A instanceof cc||(e[t]=A=bxe(A)):e[t]=A=new cc(g);let C=A.intervals;b=C.findInterval(a),(!l(b)||!(b.data instanceof uc)||l(g)&&b.data.referenceFrame!==g)&&(b=a.clone(),b.data=new uc(g,s),C.addInterval(b)),b.data.addSamplesPackedArray(u,y),BG(n,b.data)}function Mxe(e,t){if(e instanceof uc){e.removeSamples(t);return}else if(e instanceof o_){e.intervals.removeInterval(t);return}else if(e instanceof cc){let n=e.intervals;for(let i=0;i<n.length;++i){let o=wn.intersect(n.get(i),t,vC);o.isEmpty||Mxe(o.data,t)}n.removeInterval(t);return}}function Bxe(e,t,n,i,o,r){if(l(n))if(Array.isArray(n))for(let a=0,s=n.length;a<s;++a)Cxe(e,t,n[a],i,o,r);else Cxe(e,t,n,i,o,r)}function Txe(e,t,n,i){l(n.references)?NG(e,t,n.references,n.interval,i,qS,hl):(l(n.cartesian2)?n.array=z.unpackArray(n.cartesian2):l(n.cartesian)&&(n.array=z.unpackArray(n.cartesian)),l(n.array)&&Ce(Array,e,t,n,void 0,void 0,i))}function Exe(e,t,n,i,o,r){let a=Fr(n.interval);l(i)&&(l(a)?a=wn.intersect(a,i,vC):a=i);let s=e[t],c,u;if(l(a)){s instanceof IS||(s=new IS,e[t]=s);let d=s.intervals;u=d.findInterval({start:a.start,stop:a.stop}),l(u)?c=u.data:(u=a.clone(),d.addInterval(u))}else c=s;let f;l(n.solidColor)?(c instanceof Wt||(c=new Wt),f=n.solidColor,Ce(V,c,"color",f.color,void 0,void 0,r)):l(n.grid)?(c instanceof kS||(c=new kS),f=n.grid,Ce(V,c,"color",f.color,void 0,o,r),Ce(Number,c,"cellAlpha",f.cellAlpha,void 0,o,r),Ce(z,c,"lineCount",f.lineCount,void 0,o,r),Ce(z,c,"lineThickness",f.lineThickness,void 0,o,r),Ce(z,c,"lineOffset",f.lineOffset,void 0,o,r)):l(n.image)?(c instanceof dA||(c=new dA),f=n.image,Ce(Image,c,"image",f.image,void 0,o,r),Ce(z,c,"repeat",f.repeat,void 0,o,r),Ce(V,c,"color",f.color,void 0,o,r),Ce(Boolean,c,"transparent",f.transparent,void 0,o,r)):l(n.stripe)?(c instanceof XS||(c=new XS),f=n.stripe,Ce(vm,c,"orientation",f.orientation,void 0,o,r),Ce(V,c,"evenColor",f.evenColor,void 0,o,r),Ce(V,c,"oddColor",f.oddColor,void 0,o,r),Ce(Number,c,"offset",f.offset,void 0,o,r),Ce(Number,c,"repeat",f.repeat,void 0,o,r)):l(n.polylineOutline)?(c instanceof fy||(c=new fy),f=n.polylineOutline,Ce(V,c,"color",f.color,void 0,o,r),Ce(V,c,"outlineColor",f.outlineColor,void 0,o,r),Ce(Number,c,"outlineWidth",f.outlineWidth,void 0,o,r)):l(n.polylineGlow)?(c instanceof HS||(c=new HS),f=n.polylineGlow,Ce(V,c,"color",f.color,void 0,o,r),Ce(Number,c,"glowPower",f.glowPower,void 0,o,r),Ce(Number,c,"taperPower",f.taperPower,void 0,o,r)):l(n.polylineArrow)?(c instanceof US||(c=new US),f=n.polylineArrow,Ce(V,c,"color",f.color,void 0,void 0,r)):l(n.polylineDash)?(c instanceof jS||(c=new jS),f=n.polylineDash,Ce(V,c,"color",f.color,void 0,void 0,r),Ce(V,c,"gapColor",f.gapColor,void 0,void 0,r),Ce(Number,c,"dashLength",f.dashLength,void 0,o,r),Ce(Number,c,"dashPattern",f.dashPattern,void 0,o,r)):l(n.checkerboard)&&(c instanceof SS||(c=new SS),f=n.checkerboard,Ce(V,c,"evenColor",f.evenColor,void 0,o,r),Ce(V,c,"oddColor",f.oddColor,void 0,o,r),Ce(z,c,"repeat",f.repeat,void 0,o,r)),l(u)?u.data=c:e[t]=c}function zf(e,t,n,i,o,r){if(l(n))if(Array.isArray(n))for(let a=0,s=n.length;a<s;++a)Exe(e,t,n[a],i,o,r);else Exe(e,t,n,i,o,r)}function Cut(e,t,n,i){let o=t.name;l(o)&&(e.name=t.name)}function Tut(e,t,n,i){let o=t.description;l(o)&&Ce(String,e,"description",o,void 0,i,n)}function Eut(e,t,n,i){let o=t.position;l(o)&&Bxe(e,"position",o,void 0,i,n)}function vut(e,t,n,i){let o=t.viewFrom;l(o)&&Ce(h,e,"viewFrom",o,void 0,i,n)}function Sut(e,t,n,i){let o=t.orientation;l(o)&&Ce(Le,e,"orientation",o,void 0,i,n)}function wut(e,t,n,i){let o=t.properties;if(l(o)){l(e.properties)||(e.properties=new Vl);for(let r in o)if(o.hasOwnProperty(r)){e.properties.hasProperty(r)||e.properties.addProperty(r);let a=o[r];if(Array.isArray(a))for(let s=0,c=a.length;s<c;++s)LG(Axe(a[s]),e.properties,r,a[s],void 0,i,n);else LG(Axe(a),e.properties,r,a,void 0,i,n)}}}function NG(e,t,n,i,o,r,a){let s=n.map(function(c){return s2(o,c)});if(l(i)){i=Fr(i);let c=e[t];if(!(c instanceof a)){let u=new a;u.intervals.addInterval(K$(c)),e[t]=c=u}i.data=new r(s),c.intervals.addInterval(i)}else e[t]=new r(s)}function vxe(e,t,n,i){let o=n.references;l(o)?NG(e,t,o,n.interval,i,qS,hl):Ce(Array,e,t,n,void 0,void 0,i)}function Sxe(e,t,n,i){if(l(n))if(Array.isArray(n))for(let o=0,r=n.length;o<r;++o)vxe(e,t,n[o],i);else vxe(e,t,n,i)}function wxe(e,t,n,i){let o=n.references;l(o)?NG(e,t,o,n.interval,i,n_,cc):(l(n.cartesian)?n.array=h.unpackArray(n.cartesian):l(n.cartographicRadians)?n.array=h.fromRadiansArrayHeights(n.cartographicRadians,te.default):l(n.cartographicDegrees)&&(n.array=h.fromDegreesArrayHeights(n.cartographicDegrees,te.default)),l(n.array)&&Ce(Array,e,t,n,void 0,void 0,i))}function u2(e,t,n,i){if(l(n))if(Array.isArray(n))for(let o=0,r=n.length;o<r;++o)wxe(e,t,n[o],i);else wxe(e,t,n,i)}function Iut(e){return h.unpackArray(e)}function Dut(e){return h.fromRadiansArrayHeights(e,te.default)}function Put(e){return h.fromDegreesArrayHeights(e,te.default)}function Ixe(e,t,n,i){let o=n.references;if(l(o)){let r=o.map(function(a){let s={};return NG(s,"positions",a,n.interval,i,n_,cc),s.positions});e[t]=new n_(r)}else l(n.cartesian)?n.array=n.cartesian.map(Iut):l(n.cartographicRadians)?n.array=n.cartographicRadians.map(Dut):l(n.cartographicDegrees)&&(n.array=n.cartographicDegrees.map(Put)),l(n.array)&&Ce(Array,e,t,n,void 0,void 0,i)}function Rut(e,t,n,i){if(l(n))if(Array.isArray(n))for(let o=0,r=n.length;o<r;++o)Ixe(e,t,n[o],i);else Ixe(e,t,n,i)}function Out(e,t,n,i){if(l(n))if(Array.isArray(n))for(let o=0,r=n.length;o<r;o++)Txe(e,t,n[o],i);else Txe(e,t,n,i)}function Mut(e,t,n,i){let o=t.availability;if(!l(o))return;let r;if(Array.isArray(o))for(let a=0,s=o.length;a<s;++a)l(r)||(r=new Ta),r.addInterval(Fr(o[a]));else r=new Ta,r.addInterval(Fr(o));e.availability=r}function But(e,t,n,i,o){l(t)&&Ce(my,e,"alignedAxis",t,n,i,o)}function Lut(e,t,n,i){let o=t.billboard;if(!l(o))return;let r=Fr(o.interval),a=e.billboard;l(a)||(e.billboard=a=new Jc),Ce(Boolean,a,"show",o.show,r,i,n),Ce(Image,a,"image",o.image,r,i,n),Ce(Number,a,"scale",o.scale,r,i,n),Ce(z,a,"pixelOffset",o.pixelOffset,r,i,n),Ce(h,a,"eyeOffset",o.eyeOffset,r,i,n),Ce(Oi,a,"horizontalOrigin",o.horizontalOrigin,r,i,n),Ce(zn,a,"verticalOrigin",o.verticalOrigin,r,i,n),Ce(nt,a,"heightReference",o.heightReference,r,i,n),Ce(V,a,"color",o.color,r,i,n),Ce($d,a,"rotation",o.rotation,r,i,n),But(a,o.alignedAxis,r,i,n),Ce(Boolean,a,"sizeInMeters",o.sizeInMeters,r,i,n),Ce(Number,a,"width",o.width,r,i,n),Ce(Number,a,"height",o.height,r,i,n),Ce(zt,a,"scaleByDistance",o.scaleByDistance,r,i,n),Ce(zt,a,"translucencyByDistance",o.translucencyByDistance,r,i,n),Ce(zt,a,"pixelOffsetScaleByDistance",o.pixelOffsetScaleByDistance,r,i,n),Ce(Je,a,"imageSubRegion",o.imageSubRegion,r,i,n),Ce(kt,a,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),Ce(Number,a,"disableDepthTestDistance",o.disableDepthTestDistance,r,i,n)}function Nut(e,t,n,i){let o=t.box;if(!l(o))return;let r=Fr(o.interval),a=e.box;l(a)||(e.box=a=new Gx),Ce(Boolean,a,"show",o.show,r,i,n),Ce(h,a,"dimensions",o.dimensions,r,i,n),Ce(nt,a,"heightReference",o.heightReference,r,i,n),Ce(Boolean,a,"fill",o.fill,r,i,n),zf(a,"material",o.material,r,i,n),Ce(Boolean,a,"outline",o.outline,r,i,n),Ce(V,a,"outlineColor",o.outlineColor,r,i,n),Ce(Number,a,"outlineWidth",o.outlineWidth,r,i,n),Ce(vn,a,"shadows",o.shadows,r,i,n),Ce(kt,a,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n)}function Fut(e,t,n,i){let o=t.corridor;if(!l(o))return;let r=Fr(o.interval),a=e.corridor;l(a)||(e.corridor=a=new Wx),Ce(Boolean,a,"show",o.show,r,i,n),u2(a,"positions",o.positions,n),Ce(Number,a,"width",o.width,r,i,n),Ce(Number,a,"height",o.height,r,i,n),Ce(nt,a,"heightReference",o.heightReference,r,i,n),Ce(Number,a,"extrudedHeight",o.extrudedHeight,r,i,n),Ce(nt,a,"extrudedHeightReference",o.extrudedHeightReference,r,i,n),Ce(Xi,a,"cornerType",o.cornerType,r,i,n),Ce(Number,a,"granularity",o.granularity,r,i,n),Ce(Boolean,a,"fill",o.fill,r,i,n),zf(a,"material",o.material,r,i,n),Ce(Boolean,a,"outline",o.outline,r,i,n),Ce(V,a,"outlineColor",o.outlineColor,r,i,n),Ce(Number,a,"outlineWidth",o.outlineWidth,r,i,n),Ce(vn,a,"shadows",o.shadows,r,i,n),Ce(kt,a,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),Ce(Wn,a,"classificationType",o.classificationType,r,i,n),Ce(Number,a,"zIndex",o.zIndex,r,i,n)}function kut(e,t,n,i){let o=t.cylinder;if(!l(o))return;let r=Fr(o.interval),a=e.cylinder;l(a)||(e.cylinder=a=new qx),Ce(Boolean,a,"show",o.show,r,i,n),Ce(Number,a,"length",o.length,r,i,n),Ce(Number,a,"topRadius",o.topRadius,r,i,n),Ce(Number,a,"bottomRadius",o.bottomRadius,r,i,n),Ce(nt,a,"heightReference",o.heightReference,r,i,n),Ce(Boolean,a,"fill",o.fill,r,i,n),zf(a,"material",o.material,r,i,n),Ce(Boolean,a,"outline",o.outline,r,i,n),Ce(V,a,"outlineColor",o.outlineColor,r,i,n),Ce(Number,a,"outlineWidth",o.outlineWidth,r,i,n),Ce(Number,a,"numberOfVerticalLines",o.numberOfVerticalLines,r,i,n),Ce(Number,a,"slices",o.slices,r,i,n),Ce(vn,a,"shadows",o.shadows,r,i,n),Ce(kt,a,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n)}function zut(e,t){let n=e.version;if(l(n)&&typeof n=="string"){let r=n.split(".");if(r.length===2){if(r[0]!=="1")throw new re("Cesium only supports CZML version 1.");t._version=n}}if(!l(t._version))throw new re("CZML version information invalid. It is expected to be a property on the document object in the <Major>.<Minor> version format.");let i=t._documentPacket;l(e.name)&&(i.name=e.name);let o=e.clock;if(l(o)){let r=i.clock;l(r)?(r.interval=o.interval??r.interval,r.currentTime=o.currentTime??r.currentTime,r.range=o.range??r.range,r.step=o.step??r.step,r.multiplier=o.multiplier??r.multiplier):i.clock={interval:o.interval,currentTime:o.currentTime,range:o.range,step:o.step,multiplier:o.multiplier}}}function Uut(e,t,n,i){let o=t.ellipse;if(!l(o))return;let r=Fr(o.interval),a=e.ellipse;l(a)||(e.ellipse=a=new Yx),Ce(Boolean,a,"show",o.show,r,i,n),Ce(Number,a,"semiMajorAxis",o.semiMajorAxis,r,i,n),Ce(Number,a,"semiMinorAxis",o.semiMinorAxis,r,i,n),Ce(Number,a,"height",o.height,r,i,n),Ce(nt,a,"heightReference",o.heightReference,r,i,n),Ce(Number,a,"extrudedHeight",o.extrudedHeight,r,i,n),Ce(nt,a,"extrudedHeightReference",o.extrudedHeightReference,r,i,n),Ce($d,a,"rotation",o.rotation,r,i,n),Ce($d,a,"stRotation",o.stRotation,r,i,n),Ce(Number,a,"granularity",o.granularity,r,i,n),Ce(Boolean,a,"fill",o.fill,r,i,n),zf(a,"material",o.material,r,i,n),Ce(Boolean,a,"outline",o.outline,r,i,n),Ce(V,a,"outlineColor",o.outlineColor,r,i,n),Ce(Number,a,"outlineWidth",o.outlineWidth,r,i,n),Ce(Number,a,"numberOfVerticalLines",o.numberOfVerticalLines,r,i,n),Ce(vn,a,"shadows",o.shadows,r,i,n),Ce(kt,a,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),Ce(Wn,a,"classificationType",o.classificationType,r,i,n),Ce(Number,a,"zIndex",o.zIndex,r,i,n)}function Vut(e,t,n,i){let o=t.ellipsoid;if(!l(o))return;let r=Fr(o.interval),a=e.ellipsoid;l(a)||(e.ellipsoid=a=new Xx),Ce(Boolean,a,"show",o.show,r,i,n),Ce(h,a,"radii",o.radii,r,i,n),Ce(h,a,"innerRadii",o.innerRadii,r,i,n),Ce(Number,a,"minimumClock",o.minimumClock,r,i,n),Ce(Number,a,"maximumClock",o.maximumClock,r,i,n),Ce(Number,a,"minimumCone",o.minimumCone,r,i,n),Ce(Number,a,"maximumCone",o.maximumCone,r,i,n),Ce(nt,a,"heightReference",o.heightReference,r,i,n),Ce(Boolean,a,"fill",o.fill,r,i,n),zf(a,"material",o.material,r,i,n),Ce(Boolean,a,"outline",o.outline,r,i,n),Ce(V,a,"outlineColor",o.outlineColor,r,i,n),Ce(Number,a,"outlineWidth",o.outlineWidth,r,i,n),Ce(Number,a,"stackPartitions",o.stackPartitions,r,i,n),Ce(Number,a,"slicePartitions",o.slicePartitions,r,i,n),Ce(Number,a,"subdivisions",o.subdivisions,r,i,n),Ce(vn,a,"shadows",o.shadows,r,i,n),Ce(kt,a,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n)}function jut(e,t,n,i){let o=t.label;if(!l(o))return;let r=Fr(o.interval),a=e.label;l(a)||(e.label=a=new zh),Ce(Boolean,a,"show",o.show,r,i,n),Ce(String,a,"text",o.text,r,i,n),Ce(String,a,"font",o.font,r,i,n),Ce(sr,a,"style",o.style,r,i,n),Ce(Number,a,"scale",o.scale,r,i,n),Ce(Boolean,a,"showBackground",o.showBackground,r,i,n),Ce(V,a,"backgroundColor",o.backgroundColor,r,i,n),Ce(z,a,"backgroundPadding",o.backgroundPadding,r,i,n),Ce(z,a,"pixelOffset",o.pixelOffset,r,i,n),Ce(h,a,"eyeOffset",o.eyeOffset,r,i,n),Ce(Oi,a,"horizontalOrigin",o.horizontalOrigin,r,i,n),Ce(zn,a,"verticalOrigin",o.verticalOrigin,r,i,n),Ce(nt,a,"heightReference",o.heightReference,r,i,n),Ce(V,a,"fillColor",o.fillColor,r,i,n),Ce(V,a,"outlineColor",o.outlineColor,r,i,n),Ce(Number,a,"outlineWidth",o.outlineWidth,r,i,n),Ce(zt,a,"translucencyByDistance",o.translucencyByDistance,r,i,n),Ce(zt,a,"pixelOffsetScaleByDistance",o.pixelOffsetScaleByDistance,r,i,n),Ce(zt,a,"scaleByDistance",o.scaleByDistance,r,i,n),Ce(kt,a,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),Ce(Number,a,"disableDepthTestDistance",o.disableDepthTestDistance,r,i,n)}function Gut(e,t,n,i){let o=t.model;if(!l(o))return;let r=Fr(o.interval),a=e.model;l(a)||(e.model=a=new J0),Ce(Boolean,a,"show",o.show,r,i,n),Ce(l2.default,a,"uri",o.gltf,r,i,n),Ce(Number,a,"scale",o.scale,r,i,n),Ce(Number,a,"minimumPixelSize",o.minimumPixelSize,r,i,n),Ce(Number,a,"maximumScale",o.maximumScale,r,i,n),Ce(Boolean,a,"incrementallyLoadTextures",o.incrementallyLoadTextures,r,i,n),Ce(Boolean,a,"runAnimations",o.runAnimations,r,i,n),Ce(Boolean,a,"clampAnimations",o.clampAnimations,r,i,n),Ce(vn,a,"shadows",o.shadows,r,i,n),Ce(nt,a,"heightReference",o.heightReference,r,i,n),Ce(V,a,"silhouetteColor",o.silhouetteColor,r,i,n),Ce(Number,a,"silhouetteSize",o.silhouetteSize,r,i,n),Ce(V,a,"color",o.color,r,i,n),Ce(sl,a,"colorBlendMode",o.colorBlendMode,r,i,n),Ce(Number,a,"colorBlendAmount",o.colorBlendAmount,r,i,n),Ce(kt,a,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n);let s,c,u=o.nodeTransformations;if(l(u))if(Array.isArray(u))for(s=0,c=u.length;s<c;++s)Dxe(a,u[s],r,i,n);else Dxe(a,u,r,i,n);let f=o.articulations;if(l(f))if(Array.isArray(f))for(s=0,c=f.length;s<c;++s)Pxe(a,f[s],r,i,n);else Pxe(a,f,r,i,n)}function Dxe(e,t,n,i,o){let r=Fr(t.interval);l(n)&&(l(r)?r=wn.intersect(r,n,vC):r=n);let a=e.nodeTransformations,s=Object.keys(t);for(let c=0,u=s.length;c<u;++c){let f=s[c];if(f==="interval")continue;let d=t[f];if(!l(d))continue;l(a)||(e.nodeTransformations=a=new Vl),a.hasProperty(f)||a.addProperty(f);let p=a[f];l(p)||(a[f]=p=new Kx),Ce(h,p,"translation",d.translation,r,i,o),Ce(Le,p,"rotation",d.rotation,r,i,o),Ce(h,p,"scale",d.scale,r,i,o)}}function Pxe(e,t,n,i,o){let r=Fr(t.interval);l(n)&&(l(r)?r=wn.intersect(r,n,vC):r=n);let a=e.articulations,s=Object.keys(t);for(let c=0,u=s.length;c<u;++c){let f=s[c];if(f==="interval")continue;let d=t[f];l(d)&&(l(a)||(e.articulations=a=new Vl),a.hasProperty(f)||a.addProperty(f),Ce(Number,a,f,d,r,i,o))}}function Hut(e,t,n,i){let o=t.path;if(!l(o))return;let r=Fr(o.interval),a=e.path;l(a)||(e.path=a=new Z0),Ce(Boolean,a,"show",o.show,r,i,n),Ce(Number,a,"leadTime",o.leadTime,r,i,n),Ce(Number,a,"trailTime",o.trailTime,r,i,n),Ce(Number,a,"width",o.width,r,i,n),Ce(Number,a,"resolution",o.resolution,r,i,n),zf(a,"material",o.material,r,i,n),Ce(kt,a,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),Ce(String,a,"relativeTo",o.relativeTo,r,i,n)}function Wut(e,t,n,i){let o=t.point;if(!l(o))return;let r=Fr(o.interval),a=e.point;l(a)||(e.point=a=new $x),Ce(Boolean,a,"show",o.show,r,i,n),Ce(Number,a,"pixelSize",o.pixelSize,r,i,n),Ce(nt,a,"heightReference",o.heightReference,r,i,n),Ce(V,a,"color",o.color,r,i,n),Ce(V,a,"outlineColor",o.outlineColor,r,i,n),Ce(Number,a,"outlineWidth",o.outlineWidth,r,i,n),Ce(zt,a,"scaleByDistance",o.scaleByDistance,r,i,n),Ce(zt,a,"translucencyByDistance",o.translucencyByDistance,r,i,n),Ce(kt,a,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),Ce(Number,a,"disableDepthTestDistance",o.disableDepthTestDistance,r,i,n)}function c2(e){this.polygon=e,this._definitionChanged=new ye}Object.defineProperties(c2.prototype,{isConstant:{get:function(){let e=this.polygon._positions,t=this.polygon._holes;return(!l(e)||e.isConstant)&&(!l(t)||t.isConstant)}},definitionChanged:{get:function(){return this._definitionChanged}}});c2.prototype.getValue=function(e,t){let n;l(this.polygon._positions)&&(n=this.polygon._positions.getValue(e));let i;return l(this.polygon._holes)&&(i=this.polygon._holes.getValue(e),l(i)&&(i=i.map(function(o){return new Ic(o)}))),l(t)?(t.positions=n,t.holes=i,t):new Ic(n,i)};c2.prototype.equals=function(e){return this===e||e instanceof c2&&X.equals(this.polygon._positions,e.polygon._positions)&&X.equals(this.polygon._holes,e.polygon._holes)};function qut(e,t,n,i){let o=t.polygon;if(!l(o))return;let r=Fr(o.interval),a=e.polygon;l(a)||(e.polygon=a=new Uh),Ce(Boolean,a,"show",o.show,r,i,n),u2(a,"_positions",o.positions,n),Rut(a,"_holes",o.holes,n),(l(a._positions)||l(a._holes))&&(a.hierarchy=new c2(a)),Ce(Number,a,"height",o.height,r,i,n),Ce(nt,a,"heightReference",o.heightReference,r,i,n),Ce(Number,a,"extrudedHeight",o.extrudedHeight,r,i,n),Ce(nt,a,"extrudedHeightReference",o.extrudedHeightReference,r,i,n),Ce($d,a,"stRotation",o.stRotation,r,i,n),Ce(Number,a,"granularity",o.granularity,r,i,n),Ce(Boolean,a,"fill",o.fill,r,i,n),zf(a,"material",o.material,r,i,n),Ce(Boolean,a,"outline",o.outline,r,i,n),Ce(V,a,"outlineColor",o.outlineColor,r,i,n),Ce(Number,a,"outlineWidth",o.outlineWidth,r,i,n),Ce(Boolean,a,"perPositionHeight",o.perPositionHeight,r,i,n),Ce(Boolean,a,"closeTop",o.closeTop,r,i,n),Ce(Boolean,a,"closeBottom",o.closeBottom,r,i,n),Ce(on,a,"arcType",o.arcType,r,i,n),Ce(vn,a,"shadows",o.shadows,r,i,n),Ce(kt,a,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),Ce(Wn,a,"classificationType",o.classificationType,r,i,n),Ce(Number,a,"zIndex",o.zIndex,r,i,n)}function Yut(e){return e?on.GEODESIC:on.NONE}function Xut(e,t,n,i){let o=t.polyline;if(!l(o))return;let r=Fr(o.interval),a=e.polyline;if(l(a)||(e.polyline=a=new el),Ce(Boolean,a,"show",o.show,r,i,n),u2(a,"positions",o.positions,n),Ce(Number,a,"width",o.width,r,i,n),Ce(Number,a,"granularity",o.granularity,r,i,n),zf(a,"material",o.material,r,i,n),zf(a,"depthFailMaterial",o.depthFailMaterial,r,i,n),Ce(on,a,"arcType",o.arcType,r,i,n),Ce(Boolean,a,"clampToGround",o.clampToGround,r,i,n),Ce(vn,a,"shadows",o.shadows,r,i,n),Ce(kt,a,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),Ce(Wn,a,"classificationType",o.classificationType,r,i,n),Ce(Number,a,"zIndex",o.zIndex,r,i,n),l(o.followSurface)&&!l(o.arcType)){let s={};Ce(Boolean,s,"followSurface",o.followSurface,r,i,n),a.arcType=fut(s.followSurface,Yut)}}function Kut(e,t,n,i){let o=t.polylineVolume;if(!l(o))return;let r=Fr(o.interval),a=e.polylineVolume;l(a)||(e.polylineVolume=a=new Jx),u2(a,"positions",o.positions,n),Out(a,"shape",o.shape,n),Ce(Boolean,a,"show",o.show,r,i,n),Ce(Xi,a,"cornerType",o.cornerType,r,i,n),Ce(Boolean,a,"fill",o.fill,r,i,n),zf(a,"material",o.material,r,i,n),Ce(Boolean,a,"outline",o.outline,r,i,n),Ce(V,a,"outlineColor",o.outlineColor,r,i,n),Ce(Number,a,"outlineWidth",o.outlineWidth,r,i,n),Ce(Number,a,"granularity",o.granularity,r,i,n),Ce(vn,a,"shadows",o.shadows,r,i,n),Ce(kt,a,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n)}function Qut(e,t,n,i){let o=t.rectangle;if(!l(o))return;let r=Fr(o.interval),a=e.rectangle;l(a)||(e.rectangle=a=new Vh),Ce(Boolean,a,"show",o.show,r,i,n),Ce(oe,a,"coordinates",o.coordinates,r,i,n),Ce(Number,a,"height",o.height,r,i,n),Ce(nt,a,"heightReference",o.heightReference,r,i,n),Ce(Number,a,"extrudedHeight",o.extrudedHeight,r,i,n),Ce(nt,a,"extrudedHeightReference",o.extrudedHeightReference,r,i,n),Ce($d,a,"rotation",o.rotation,r,i,n),Ce($d,a,"stRotation",o.stRotation,r,i,n),Ce(Number,a,"granularity",o.granularity,r,i,n),Ce(Boolean,a,"fill",o.fill,r,i,n),zf(a,"material",o.material,r,i,n),Ce(Boolean,a,"outline",o.outline,r,i,n),Ce(V,a,"outlineColor",o.outlineColor,r,i,n),Ce(Number,a,"outlineWidth",o.outlineWidth,r,i,n),Ce(vn,a,"shadows",o.shadows,r,i,n),Ce(kt,a,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),Ce(Wn,a,"classificationType",o.classificationType,r,i,n),Ce(Number,a,"zIndex",o.zIndex,r,i,n)}function $ut(e,t,n,i){let o=t.tileset;if(!l(o))return;let r=Fr(o.interval),a=e.tileset;l(a)||(e.tileset=a=new Qx),Ce(Boolean,a,"show",o.show,r,i,n),Ce(l2.default,a,"uri",o.uri,r,i,n),Ce(Number,a,"maximumScreenSpaceError",o.maximumScreenSpaceError,r,i,n)}function Jut(e,t,n,i){let o=t.wall;if(!l(o))return;let r=Fr(o.interval),a=e.wall;l(a)||(e.wall=a=new eg),Ce(Boolean,a,"show",o.show,r,i,n),u2(a,"positions",o.positions,n),Sxe(a,"minimumHeights",o.minimumHeights,n),Sxe(a,"maximumHeights",o.maximumHeights,n),Ce(Number,a,"granularity",o.granularity,r,i,n),Ce(Boolean,a,"fill",o.fill,r,i,n),zf(a,"material",o.material,r,i,n),Ce(Boolean,a,"outline",o.outline,r,i,n),Ce(V,a,"outlineColor",o.outlineColor,r,i,n),Ce(Number,a,"outlineWidth",o.outlineWidth,r,i,n),Ce(vn,a,"shadows",o.shadows,r,i,n),Ce(kt,a,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n)}function Rxe(e,t,n,i,o){let r=e.id;if(l(r)||(r=jn()),Y$=r,!l(o._version)&&r!=="document")throw new re("The first CZML packet is required to be the document object.");if(e.delete===!0)t.removeById(r);else if(r==="document")zut(e,o);else{let a=t.getOrCreateEntity(r),s=e.parent;l(s)&&(a.parent=t.getOrCreateEntity(s));for(let c=n.length-1;c>-1;c--)n[c](a,e,t,i)}Y$=void 0}function Zut(e){let t,n=e._documentPacket.clock;if(!l(n)){if(!l(e._clock)){let o=e._entityCollection.computeAvailability();if(!o.start.equals(Qe.MINIMUM_VALUE)){let r=o.start,a=o.stop,s=Q.secondsDifference(a,r),c=Math.round(s/120);return t=new Em,t.startTime=Q.clone(r),t.stopTime=Q.clone(a),t.clockRange=va.LOOP_STOP,t.multiplier=c,t.currentTime=Q.clone(r),t.clockStep=Oo.SYSTEM_CLOCK_MULTIPLIER,e._clock=t,!0}}return!1}l(e._clock)?t=e._clock.clone():(t=new Em,t.startTime=Qe.MINIMUM_VALUE.clone(),t.stopTime=Qe.MAXIMUM_VALUE.clone(),t.currentTime=Qe.MINIMUM_VALUE.clone(),t.clockRange=va.LOOP_STOP,t.clockStep=Oo.SYSTEM_CLOCK_MULTIPLIER,t.multiplier=1);let i=Fr(n.interval);return l(i)&&(t.startTime=i.start,t.stopTime=i.stop),l(n.currentTime)&&(t.currentTime=Q.fromIso8601(n.currentTime)),l(n.range)&&(t.clockRange=va[n.range]??va.LOOP_STOP),l(n.step)&&(t.clockStep=Oo[n.step]??Oo.SYSTEM_CLOCK_MULTIPLIER),l(n.multiplier)&&(t.multiplier=n.multiplier),t.equals(e._clock)?!1:(e._clock=t.clone(e._clock),!0)}function Lxe(e,t,n,i){n=n??G.EMPTY_OBJECT;let o=t,r=n.sourceUri,a=n.credit;if(typeof a=="string"&&(a=new yt(a)),e._credit=a,typeof t=="string"||t instanceof De){t=De.createIfNeeded(t),o=t.fetchJson(),r=r??t.clone();let s=e._resourceCredits,c=t.credits;if(l(c)){let u=c.length;for(let f=0;f<u;f++)s.push(c[f])}}return r=De.createIfNeeded(r),Ea.setLoading(e,!0),Promise.resolve(o).then(function(s){return eft(e,s,r,i)}).catch(function(s){return Ea.setLoading(e,!1),e._error.raiseEvent(e,s),console.log(s),Promise.reject(s)})}function eft(e,t,n,i){Ea.setLoading(e,!0);let o=e._entityCollection;i&&(e._version=void 0,e._documentPacket=new Nxe,o.removeAll()),es._processCzml(t,o,n,void 0,e);let r=Zut(e),a=e._documentPacket;return l(a.name)&&e._name!==a.name?(e._name=a.name,r=!0):!l(e._name)&&l(n)&&(e._name=e_(n.getUrlComponent()),r=!0),Ea.setLoading(e,!1),r&&e._changed.raiseEvent(e),e}function Nxe(){this.name=void 0,this.clock=void 0}function es(e){this._name=e,this._changed=new ye,this._error=new ye,this._isLoading=!1,this._loading=new ye,this._clock=void 0,this._documentPacket=new Nxe,this._version=void 0,this._entityCollection=new Vs(this),this._entityCluster=new Bf,this._credit=void 0,this._resourceCredits=[]}es.load=function(e,t){return new es().load(e,t)};Object.defineProperties(es.prototype,{name:{get:function(){return this._name}},clock:{get:function(){return this._clock}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){this._entityCluster=e}},credit:{get:function(){return this._credit}}});es.updaters=[Lut,Nut,Fut,kut,Uut,Vut,jut,Gut,Cut,Tut,Hut,Wut,qut,Xut,Kut,wut,Qut,Eut,$ut,vut,Jut,Sut,Mut];es.registerUpdater=function(e){es.updaters.includes(e)||es.updaters.push(e)};es.unregisterUpdater=function(e){if(es.updaters.includes(e)){let t=es.updaters.indexOf(e);es.updaters.splice(t,1)}};es.prototype.process=function(e,t){return Lxe(this,e,t,!1)};es.prototype.load=function(e,t){return Lxe(this,e,t,!0)};es.prototype.update=function(e){return!0};es.processPacketData=Ce;es.processPositionPacketData=Bxe;es.processMaterialPacketData=zf;es._processCzml=function(e,t,n,i,o){if(i=i??es.updaters,Array.isArray(e))for(let r=0,a=e.length;r<a;++r)Rxe(e[r],t,i,n,o);else Rxe(e,t,i,n,o)};var f2=es;function au(){this._dataSources=[],this._dataSourceAdded=new ye,this._dataSourceRemoved=new ye,this._dataSourceMoved=new ye}Object.defineProperties(au.prototype,{length:{get:function(){return this._dataSources.length}},dataSourceAdded:{get:function(){return this._dataSourceAdded}},dataSourceRemoved:{get:function(){return this._dataSourceRemoved}},dataSourceMoved:{get:function(){return this._dataSourceMoved}}});au.prototype.add=function(e){let t=this,n=this._dataSources;return Promise.resolve(e).then(function(i){return n===t._dataSources&&(t._dataSources.push(i),t._dataSourceAdded.raiseEvent(t,i)),i})};au.prototype.remove=function(e,t){t=t??!1;let n=this._dataSources.indexOf(e);return n!==-1?(this._dataSources.splice(n,1),this._dataSourceRemoved.raiseEvent(this,e),t&&typeof e.destroy=="function"&&e.destroy(),!0):!1};au.prototype.removeAll=function(e){e=e??!1;let t=this._dataSources;for(let n=0,i=t.length;n<i;++n){let o=t[n];this._dataSourceRemoved.raiseEvent(this,o),e&&typeof o.destroy=="function"&&o.destroy()}this._dataSources=[]};au.prototype.contains=function(e){return this.indexOf(e)!==-1};au.prototype.indexOf=function(e){return this._dataSources.indexOf(e)};au.prototype.get=function(e){return this._dataSources[e]};au.prototype.getByName=function(e){return this._dataSources.filter(function(t){return t.name===e})};function FG(e,t){return e.indexOf(t)}function Fxe(e,t,n){let i=e._dataSources,o=i.length-1;if(t=D.clamp(t,0,o),n=D.clamp(n,0,o),t===n)return;let r=i[t];i[t]=i[n],i[n]=r,e.dataSourceMoved.raiseEvent(r,n,t)}au.prototype.raise=function(e){let t=FG(this._dataSources,e);Fxe(this,t,t+1)};au.prototype.lower=function(e){let t=FG(this._dataSources,e);Fxe(this,t,t-1)};au.prototype.raiseToTop=function(e){let t=FG(this._dataSources,e);t!==this._dataSources.length-1&&(this._dataSources.splice(t,1),this._dataSources.push(e),this.dataSourceMoved.raiseEvent(e,this._dataSources.length-1,t))};au.prototype.lowerToBottom=function(e){let t=FG(this._dataSources,e);t!==0&&(this._dataSources.splice(t,1),this._dataSources.splice(0,0,e),this.dataSourceMoved.raiseEvent(e,0,t))};au.prototype.isDestroyed=function(){return!1};au.prototype.destroy=function(){return this.removeAll(!0),fe(this)};var d2=au;function fc(e){e=e??G.EMPTY_OBJECT,this._primitives=[],this._guid=jn(),this._primitiveAdded=new ye,this._primitiveRemoved=new ye,this._zIndex=void 0,this.show=e.show??!0,this.destroyPrimitives=e.destroyPrimitives??!0,this._countReferences=e.countReferences??!1}Object.defineProperties(fc.prototype,{length:{get:function(){return this._primitives.length}},primitiveAdded:{get:function(){return this._primitiveAdded}},primitiveRemoved:{get:function(){return this._primitiveRemoved}}});fc.prototype.add=function(e,t){let n=l(t),i=e._external=e._external||{},o=i._composites=i._composites||{};return o[this._guid]={collection:this},n?this._primitives.splice(t,0,e):this._primitives.push(e),this._countReferences&&(l(i._referenceCount)?++i._referenceCount:i._referenceCount=1),this._primitiveAdded.raiseEvent(e),e};fc.prototype.remove=function(e){if(this.contains(e)){let t=this._primitives.indexOf(e);if(t!==-1)return this._primitives.splice(t,1),delete e._external._composites[this._guid],this._countReferences&&e._external._referenceCount--,this.destroyPrimitives&&(!this._countReferences||e._external._referenceCount<=0)&&e.destroy(),this._primitiveRemoved.raiseEvent(e),!0}return!1};fc.prototype.removeAndDestroy=function(e){let t=this.remove(e);return t&&!this.destroyPrimitives&&e.destroy(),t};fc.prototype.removeAll=function(){let e=this._primitives,t=e.length;for(let n=0;n<t;++n){let i=e[n];delete i._external._composites[this._guid],this._countReferences&&i._external._referenceCount--,this.destroyPrimitives&&(!this._countReferences||i._external._referenceCount<=0)&&i.destroy(),this._primitiveRemoved.raiseEvent(i)}this._primitives=[]};fc.prototype.contains=function(e){return!!(l(e)&&e._external&&e._external._composites&&e._external._composites[this._guid])};function kG(e,t){return e._primitives.indexOf(t)}fc.prototype.raise=function(e){if(l(e)){let t=kG(this,e),n=this._primitives;if(t!==n.length-1){let i=n[t];n[t]=n[t+1],n[t+1]=i}}};fc.prototype.raiseToTop=function(e){if(l(e)){let t=kG(this,e),n=this._primitives;t!==n.length-1&&(n.splice(t,1),n.push(e))}};fc.prototype.lower=function(e){if(l(e)){let t=kG(this,e),n=this._primitives;if(t!==0){let i=n[t];n[t]=n[t-1],n[t-1]=i}}};fc.prototype.lowerToBottom=function(e){if(l(e)){let t=kG(this,e),n=this._primitives;t!==0&&(n.splice(t,1),n.unshift(e))}};fc.prototype.get=function(e){return this._primitives[e]};fc.prototype.update=function(e){if(!this.show)return;let t=this._primitives;for(let n=0;n<t.length;++n)t[n].update(e)};fc.prototype.prePassesUpdate=function(e){let t=this._primitives;for(let n=0;n<t.length;++n){let i=t[n];l(i.prePassesUpdate)&&i.prePassesUpdate(e)}};fc.prototype.updateForPass=function(e,t){let n=this._primitives;for(let i=0;i<n.length;++i){let o=n[i];l(o.updateForPass)&&o.updateForPass(e,t)}};fc.prototype.postPassesUpdate=function(e){let t=this._primitives;for(let n=0;n<t.length;++n){let i=t[n];l(i.postPassesUpdate)&&i.postPassesUpdate(e)}};fc.prototype.isDestroyed=function(){return!1};fc.prototype.destroy=function(){return this.removeAll(),fe(this)};var su=fc;function kp(){this._length=0,this._collections={},this._collectionsArray=[],this.show=!0}Object.defineProperties(kp.prototype,{length:{get:function(){return this._length}}});kp.prototype.add=function(e,t){t=t??0;let n=this._collections[t];if(!l(n)){n=new su({destroyPrimitives:!1}),n._zIndex=t,this._collections[t]=n;let i=this._collectionsArray,o=0;for(;o<i.length&&i[o]._zIndex<t;)o++;i.splice(o,0,n)}return n.add(e),this._length++,e._zIndex=t,e};kp.prototype.set=function(e,t){return t===e._zIndex||(this.remove(e,!0),this.add(e,t)),e};kp.prototype.remove=function(e,t){if(this.contains(e)){let n=e._zIndex,i=this._collections[n],o;return t?o=i.remove(e):o=i.removeAndDestroy(e),o&&this._length--,i.length===0&&(this._collectionsArray.splice(this._collectionsArray.indexOf(i),1),this._collections[n]=void 0,i.destroy()),o}return!1};kp.prototype.removeAll=function(){let e=this._collectionsArray;for(let t=0;t<e.length;t++){let n=e[t];n.destroyPrimitives=!0,n.destroy()}this._collections={},this._collectionsArray=[],this._length=0};kp.prototype.contains=function(e){if(!l(e))return!1;let t=this._collections[e._zIndex];return l(t)&&t.contains(e)};kp.prototype.update=function(e){if(!this.show)return;let t=this._collectionsArray;for(let n=0;n<t.length;n++)t[n].update(e)};kp.prototype.isDestroyed=function(){return!1};kp.prototype.destroy=function(){return this.removeAll(),fe(this)};var h2=kp;function $S(e,t){this._primitives=e,this._orderedGroundPrimitives=t,this._dynamicUpdaters=new Lt}$S.prototype.add=function(e,t){this._dynamicUpdaters.set(t.id,t.createDynamicUpdater(this._primitives,this._orderedGroundPrimitives))};$S.prototype.remove=function(e){let t=e.id,n=this._dynamicUpdaters.get(t);l(n)&&(this._dynamicUpdaters.remove(t),n.destroy())};$S.prototype.update=function(e){let t=this._dynamicUpdaters.values;for(let n=0,i=t.length;n<i;n++)t[n].update(e);return!0};$S.prototype.removeAllPrimitives=function(){let e=this._dynamicUpdaters.values;for(let t=0,n=e.length;t<n;t++)e[t].destroy();this._dynamicUpdaters.removeAll()};$S.prototype.getBoundingSphere=function(e,t){return e=this._dynamicUpdaters.get(e.id),l(e)&&l(e.getBoundingSphere)?e.getBoundingSphere(t):bt.FAILED};var SC=$S;var $$={},zG=new h,kxe=new h,zxe=new Le,Uxe=new $;function JS(e,t,n,i,o,r,a,s,c,u){let f=e+t;h.multiplyByScalar(i,Math.cos(f),zG),h.multiplyByScalar(n,Math.sin(f),kxe),h.add(zG,kxe,zG);let d=Math.cos(e);d=d*d;let p=Math.sin(e);p=p*p;let m=r/Math.sqrt(a*d+o*p)/s;return Le.fromAxisAngle(zG,m,zxe),$.fromQuaternion(zxe,Uxe),$.multiplyByVector(Uxe,c,u),h.normalize(u,u),h.multiplyByScalar(u,s,u),u}var Vxe=new h,jxe=new h,Q$=new h,tft=new h;$$.raisePositionsToHeight=function(e,t,n){let i=t.ellipsoid,o=t.height,r=t.extrudedHeight,a=n?e.length/3*2:e.length/3,s=new Float64Array(a*3),c=e.length,u=n?c:0;for(let f=0;f<c;f+=3){let d=f+1,p=f+2,g=h.fromArray(e,f,Vxe);i.scaleToGeodeticSurface(g,g);let m=h.clone(g,jxe),A=i.geodeticSurfaceNormal(g,tft),y=h.multiplyByScalar(A,o,Q$);h.add(g,y,g),n&&(h.multiplyByScalar(A,r,y),h.add(m,y,m),s[f+u]=m.x,s[d+u]=m.y,s[p+u]=m.z),s[f]=g.x,s[d]=g.y,s[p]=g.z}return s};var nft=new h,ift=new h,oft=new h;$$.computeEllipsePositions=function(e,t,n){let i=e.semiMinorAxis,o=e.semiMajorAxis,r=e.rotation,a=e.center,s=e.granularity*8,c=i*i,u=o*o,f=o*i,d=h.magnitude(a),p=h.normalize(a,nft),g=h.cross(h.UNIT_Z,a,ift);g=h.normalize(g,g);let m=h.cross(p,g,oft),A=1+Math.ceil(D.PI_OVER_TWO/s),y=D.PI_OVER_TWO/(A-1),x=D.PI_OVER_TWO-A*y;x<0&&(A-=Math.ceil(Math.abs(x)/y));let b=2*(A*(A+2)),C=t?new Array(b*3):void 0,E=0,S=Vxe,w=jxe,P=A*4*3,R=P-1,B=0,L=n?new Array(P):void 0,_,T,v,I,O;for(x=D.PI_OVER_TWO,S=JS(x,r,m,g,c,f,u,d,p,S),t&&(C[E++]=S.x,C[E++]=S.y,C[E++]=S.z),n&&(L[R--]=S.z,L[R--]=S.y,L[R--]=S.x),x=D.PI_OVER_TWO-y,_=1;_<A+1;++_){if(S=JS(x,r,m,g,c,f,u,d,p,S),w=JS(Math.PI-x,r,m,g,c,f,u,d,p,w),t){for(C[E++]=S.x,C[E++]=S.y,C[E++]=S.z,v=2*_+2,T=1;T<v-1;++T)I=T/(v-1),O=h.lerp(S,w,I,Q$),C[E++]=O.x,C[E++]=O.y,C[E++]=O.z;C[E++]=w.x,C[E++]=w.y,C[E++]=w.z}n&&(L[R--]=S.z,L[R--]=S.y,L[R--]=S.x,L[B++]=w.x,L[B++]=w.y,L[B++]=w.z),x=D.PI_OVER_TWO-(_+1)*y}for(_=A;_>1;--_){if(x=D.PI_OVER_TWO-(_-1)*y,S=JS(-x,r,m,g,c,f,u,d,p,S),w=JS(x+Math.PI,r,m,g,c,f,u,d,p,w),t){for(C[E++]=S.x,C[E++]=S.y,C[E++]=S.z,v=2*(_-1)+2,T=1;T<v-1;++T)I=T/(v-1),O=h.lerp(S,w,I,Q$),C[E++]=O.x,C[E++]=O.y,C[E++]=O.z;C[E++]=w.x,C[E++]=w.y,C[E++]=w.z}n&&(L[R--]=S.z,L[R--]=S.y,L[R--]=S.x,L[B++]=w.x,L[B++]=w.y,L[B++]=w.z)}x=D.PI_OVER_TWO,S=JS(-x,r,m,g,c,f,u,d,p,S);let N={};return t&&(C[E++]=S.x,C[E++]=S.y,C[E++]=S.z,N.positions=C,N.numPts=A),n&&(L[R--]=S.z,L[R--]=S.y,L[R--]=S.x,N.outerPositions=L),N};var Hu=$$;var ZS=new h,J$=new h,Z$=new h,Gxe=new h,Ts=new z,Hxe=new $,rft=new $,eJ=new Le,Wxe=new h,qxe=new h,Yxe=new h,jG=new de,Xxe=new h,Kxe=new z,Qxe=new z;function $xe(e,t,n){let i=t.vertexFormat,o=t.center,r=t.semiMajorAxis,a=t.semiMinorAxis,s=t.ellipsoid,c=t.stRotation,u=n?e.length/3*2:e.length/3,f=t.shadowVolume,d=i.st?new Float32Array(u*2):void 0,p=i.normal?new Float32Array(u*3):void 0,g=i.tangent?new Float32Array(u*3):void 0,m=i.bitangent?new Float32Array(u*3):void 0,A=f?new Float32Array(u*3):void 0,y=0,x=Wxe,b=qxe,C=Yxe,E=new ji(s),S=E.project(s.cartesianToCartographic(o,jG),Xxe),w=s.scaleToGeodeticSurface(o,ZS);s.geodeticSurfaceNormal(w,w);let P=Hxe,R=rft;if(c!==0){let O=Le.fromAxisAngle(w,c,eJ);P=$.fromQuaternion(O,P),O=Le.fromAxisAngle(w,-c,eJ),R=$.fromQuaternion(O,R)}else P=$.clone($.IDENTITY,P),R=$.clone($.IDENTITY,R);let B=z.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Kxe),L=z.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Qxe),_=e.length,T=n?_:0,v=T/3*2;for(let O=0;O<_;O+=3){let N=O+1,j=O+2,k=h.fromArray(e,O,ZS);if(i.st){let U=$.multiplyByVector(P,k,J$),F=E.project(s.cartesianToCartographic(U,jG),Z$);h.subtract(F,S,F),Ts.x=(F.x+r)/(2*r),Ts.y=(F.y+a)/(2*a),B.x=Math.min(Ts.x,B.x),B.y=Math.min(Ts.y,B.y),L.x=Math.max(Ts.x,L.x),L.y=Math.max(Ts.y,L.y),n&&(d[y+v]=Ts.x,d[y+1+v]=Ts.y),d[y++]=Ts.x,d[y++]=Ts.y}(i.normal||i.tangent||i.bitangent||f)&&(x=s.geodeticSurfaceNormal(k,x),f&&(A[O+T]=-x.x,A[N+T]=-x.y,A[j+T]=-x.z),(i.normal||i.tangent||i.bitangent)&&((i.tangent||i.bitangent)&&(b=h.normalize(h.cross(h.UNIT_Z,x,b),b),$.multiplyByVector(R,b,b)),i.normal&&(p[O]=x.x,p[N]=x.y,p[j]=x.z,n&&(p[O+T]=-x.x,p[N+T]=-x.y,p[j+T]=-x.z)),i.tangent&&(g[O]=b.x,g[N]=b.y,g[j]=b.z,n&&(g[O+T]=-b.x,g[N+T]=-b.y,g[j+T]=-b.z)),i.bitangent&&(C=h.normalize(h.cross(x,b,C),C),m[O]=C.x,m[N]=C.y,m[j]=C.z,n&&(m[O+T]=C.x,m[N+T]=C.y,m[j+T]=C.z))))}if(i.st){_=d.length;for(let O=0;O<_;O+=2)d[O]=(d[O]-B.x)/(L.x-B.x),d[O+1]=(d[O+1]-B.y)/(L.y-B.y)}let I=new pn;if(i.position){let O=Hu.raisePositionsToHeight(e,t,n);I.position=new Me({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:O})}if(i.st&&(I.st=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:d})),i.normal&&(I.normal=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:p})),i.tangent&&(I.tangent=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:g})),i.bitangent&&(I.bitangent=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:m})),f&&(I.extrudeDirection=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:A})),n&&l(t.offsetAttribute)){let O=new Uint8Array(u);if(t.offsetAttribute===ln.TOP)O=O.fill(1,0,u/2);else{let N=t.offsetAttribute===ln.NONE?0:1;O=O.fill(N)}I.applyOffset=new Me({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:O})}return I}function Jxe(e){let t=new Array(12*(e*(e+1))-6),n=0,i,o,r,a,s;for(i=0,r=1,a=0;a<3;a++)t[n++]=r++,t[n++]=i,t[n++]=r;for(a=2;a<e+1;++a){for(r=a*(a+1)-1,i=(a-1)*a-1,t[n++]=r++,t[n++]=i,t[n++]=r,o=2*a,s=0;s<o-1;++s)t[n++]=r,t[n++]=i++,t[n++]=i,t[n++]=r++,t[n++]=i,t[n++]=r;t[n++]=r++,t[n++]=i,t[n++]=r}for(o=e*2,++r,++i,a=0;a<o-1;++a)t[n++]=r,t[n++]=i++,t[n++]=i,t[n++]=r++,t[n++]=i,t[n++]=r;for(t[n++]=r,t[n++]=i++,t[n++]=i,t[n++]=r++,t[n++]=i++,t[n++]=i,++i,a=e-1;a>1;--a){for(t[n++]=i++,t[n++]=i,t[n++]=r,o=2*a,s=0;s<o-1;++s)t[n++]=r,t[n++]=i++,t[n++]=i,t[n++]=r++,t[n++]=i,t[n++]=r;t[n++]=i++,t[n++]=i++,t[n++]=r++}for(a=0;a<3;a++)t[n++]=i++,t[n++]=i,t[n++]=r;return t}var wC=new h;function aft(e){let t=e.center;wC=h.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,wC),e.height,wC),wC=h.add(t,wC,wC);let n=new ce(wC,e.semiMajorAxis),i=Hu.computeEllipsePositions(e,!0,!1),o=i.positions,r=i.numPts,a=$xe(o,e,!1),s=Jxe(r);return s=Ue.createTypedArray(o.length/3,s),{boundingSphere:n,attributes:a,indices:s}}function sft(e,t){let n=t.vertexFormat,i=t.center,o=t.semiMajorAxis,r=t.semiMinorAxis,a=t.ellipsoid,s=t.height,c=t.extrudedHeight,u=t.stRotation,f=e.length/3*2,d=new Float64Array(f*3),p=n.st?new Float32Array(f*2):void 0,g=n.normal?new Float32Array(f*3):void 0,m=n.tangent?new Float32Array(f*3):void 0,A=n.bitangent?new Float32Array(f*3):void 0,y=t.shadowVolume,x=y?new Float32Array(f*3):void 0,b=0,C=Wxe,E=qxe,S=Yxe,w=new ji(a),P=w.project(a.cartesianToCartographic(i,jG),Xxe),R=a.scaleToGeodeticSurface(i,ZS);a.geodeticSurfaceNormal(R,R);let B=Le.fromAxisAngle(R,u,eJ),L=$.fromQuaternion(B,Hxe),_=z.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Kxe),T=z.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Qxe),v=e.length,I=v/3*2;for(let N=0;N<v;N+=3){let j=N+1,k=N+2,U=h.fromArray(e,N,ZS),F;if(n.st){let q=$.multiplyByVector(L,U,J$),J=w.project(a.cartesianToCartographic(q,jG),Z$);h.subtract(J,P,J),Ts.x=(J.x+o)/(2*o),Ts.y=(J.y+r)/(2*r),_.x=Math.min(Ts.x,_.x),_.y=Math.min(Ts.y,_.y),T.x=Math.max(Ts.x,T.x),T.y=Math.max(Ts.y,T.y),p[b+I]=Ts.x,p[b+1+I]=Ts.y,p[b++]=Ts.x,p[b++]=Ts.y}U=a.scaleToGeodeticSurface(U,U),F=h.clone(U,J$),C=a.geodeticSurfaceNormal(U,C),y&&(x[N+v]=-C.x,x[j+v]=-C.y,x[k+v]=-C.z);let H=h.multiplyByScalar(C,s,Gxe);if(U=h.add(U,H,U),H=h.multiplyByScalar(C,c,H),F=h.add(F,H,F),n.position&&(d[N+v]=F.x,d[j+v]=F.y,d[k+v]=F.z,d[N]=U.x,d[j]=U.y,d[k]=U.z),n.normal||n.tangent||n.bitangent){S=h.clone(C,S);let q=h.fromArray(e,(N+3)%v,Gxe);h.subtract(q,U,q);let J=h.subtract(F,U,Z$);C=h.normalize(h.cross(J,q,C),C),n.normal&&(g[N]=C.x,g[j]=C.y,g[k]=C.z,g[N+v]=C.x,g[j+v]=C.y,g[k+v]=C.z),n.tangent&&(E=h.normalize(h.cross(S,C,E),E),m[N]=E.x,m[j]=E.y,m[k]=E.z,m[N+v]=E.x,m[N+1+v]=E.y,m[N+2+v]=E.z),n.bitangent&&(A[N]=S.x,A[j]=S.y,A[k]=S.z,A[N+v]=S.x,A[j+v]=S.y,A[k+v]=S.z)}}if(n.st){v=p.length;for(let N=0;N<v;N+=2)p[N]=(p[N]-_.x)/(T.x-_.x),p[N+1]=(p[N+1]-_.y)/(T.y-_.y)}let O=new pn;if(n.position&&(O.position=new Me({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:d})),n.st&&(O.st=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:p})),n.normal&&(O.normal=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:g})),n.tangent&&(O.tangent=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:m})),n.bitangent&&(O.bitangent=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:A})),y&&(O.extrudeDirection=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:x})),l(t.offsetAttribute)){let N=new Uint8Array(f);if(t.offsetAttribute===ln.TOP)N=N.fill(1,0,f/2);else{let j=t.offsetAttribute===ln.NONE?0:1;N=N.fill(j)}O.applyOffset=new Me({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:N})}return O}function cft(e){let t=e.length/3,n=Ue.createTypedArray(t,t*6),i=0;for(let o=0;o<t;o++){let r=o,a=o+t,s=(r+1)%t,c=s+t;n[i++]=r,n[i++]=a,n[i++]=s,n[i++]=s,n[i++]=a,n[i++]=c}return n}var UG=new ce,VG=new ce;function lft(e){let t=e.center,n=e.ellipsoid,i=e.semiMajorAxis,o=h.multiplyByScalar(n.geodeticSurfaceNormal(t,ZS),e.height,ZS);UG.center=h.add(t,o,UG.center),UG.radius=i,o=h.multiplyByScalar(n.geodeticSurfaceNormal(t,o),e.extrudedHeight,o),VG.center=h.add(t,o,VG.center),VG.radius=i;let r=Hu.computeEllipsePositions(e,!0,!0),a=r.positions,s=r.numPts,c=r.outerPositions,u=ce.union(UG,VG),f=$xe(a,e,!0),d=Jxe(s),p=d.length;d.length=p*2;let g=a.length/3;for(let E=0;E<p;E+=3)d[E+p]=d[E+2]+g,d[E+1+p]=d[E+1]+g,d[E+2+p]=d[E]+g;let m=Ue.createTypedArray(g*2/3,d),A=new At({attributes:f,indices:m,primitiveType:Re.TRIANGLES}),y=sft(c,e);d=cft(c);let x=Ue.createTypedArray(c.length*2/3,d),b=new At({attributes:y,indices:x,primitiveType:Re.TRIANGLES}),C=kn.combineInstances([new Ot({geometry:A}),new Ot({geometry:b})]);return{boundingSphere:u,attributes:C[0].attributes,indices:C[0].indices}}function Zxe(e,t,n,i,o,r,a){let c=Hu.computeEllipsePositions({center:e,semiMajorAxis:t,semiMinorAxis:n,rotation:i,granularity:o},!1,!0).outerPositions,u=c.length/3,f=new Array(u);for(let p=0;p<u;++p)f[p]=h.fromArray(c,p*3);let d=oe.fromCartesianArray(f,r,a);return d.width>D.PI&&(d.north=d.north>0?D.PI_OVER_TWO-D.EPSILON7:d.north,d.south=d.south<0?D.EPSILON7-D.PI_OVER_TWO:d.south,d.east=D.PI,d.west=-D.PI),d}function Up(e){e=e??G.EMPTY_OBJECT;let t=e.center,n=e.ellipsoid??te.default,i=e.semiMajorAxis,o=e.semiMinorAxis,r=e.granularity??D.RADIANS_PER_DEGREE,a=e.vertexFormat??Ne.DEFAULT,s=e.height??0,c=e.extrudedHeight??s;this._center=h.clone(t),this._semiMajorAxis=i,this._semiMinorAxis=o,this._ellipsoid=te.clone(n),this._rotation=e.rotation??0,this._stRotation=e.stRotation??0,this._height=Math.max(c,s),this._granularity=r,this._vertexFormat=Ne.clone(a),this._extrudedHeight=Math.min(c,s),this._shadowVolume=e.shadowVolume??!1,this._workerName="createEllipseGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}Up.packedLength=h.packedLength+te.packedLength+Ne.packedLength+9;Up.pack=function(e,t,n){return n=n??0,h.pack(e._center,t,n),n+=h.packedLength,te.pack(e._ellipsoid,t,n),n+=te.packedLength,Ne.pack(e._vertexFormat,t,n),n+=Ne.packedLength,t[n++]=e._semiMajorAxis,t[n++]=e._semiMinorAxis,t[n++]=e._rotation,t[n++]=e._stRotation,t[n++]=e._height,t[n++]=e._granularity,t[n++]=e._extrudedHeight,t[n++]=e._shadowVolume?1:0,t[n]=e._offsetAttribute??-1,t};var ebe=new h,tbe=new te,nbe=new Ne,zp={center:ebe,ellipsoid:tbe,vertexFormat:nbe,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,stRotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};Up.unpack=function(e,t,n){t=t??0;let i=h.unpack(e,t,ebe);t+=h.packedLength;let o=te.unpack(e,t,tbe);t+=te.packedLength;let r=Ne.unpack(e,t,nbe);t+=Ne.packedLength;let a=e[t++],s=e[t++],c=e[t++],u=e[t++],f=e[t++],d=e[t++],p=e[t++],g=e[t++]===1,m=e[t];return l(n)?(n._center=h.clone(i,n._center),n._ellipsoid=te.clone(o,n._ellipsoid),n._vertexFormat=Ne.clone(r,n._vertexFormat),n._semiMajorAxis=a,n._semiMinorAxis=s,n._rotation=c,n._stRotation=u,n._height=f,n._granularity=d,n._extrudedHeight=p,n._shadowVolume=g,n._offsetAttribute=m===-1?void 0:m,n):(zp.height=f,zp.extrudedHeight=p,zp.granularity=d,zp.stRotation=u,zp.rotation=c,zp.semiMajorAxis=a,zp.semiMinorAxis=s,zp.shadowVolume=g,zp.offsetAttribute=m===-1?void 0:m,new Up(zp))};Up.computeRectangle=function(e,t){e=e??G.EMPTY_OBJECT;let n=e.center,i=e.ellipsoid??te.default,o=e.semiMajorAxis,r=e.semiMinorAxis,a=e.granularity??D.RADIANS_PER_DEGREE,s=e.rotation??0;return Zxe(n,o,r,s,a,i,t)};Up.createGeometry=function(e){if(e._semiMajorAxis<=0||e._semiMinorAxis<=0)return;let t=e._height,n=e._extrudedHeight,i=!D.equalsEpsilon(t,n,0,D.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);let o={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:t,granularity:e._granularity,vertexFormat:e._vertexFormat,stRotation:e._stRotation},r;if(i)o.extrudedHeight=n,o.shadowVolume=e._shadowVolume,o.offsetAttribute=e._offsetAttribute,r=lft(o);else if(r=aft(o),l(e._offsetAttribute)){let a=r.attributes.position.values.length,s=e._offsetAttribute===ln.NONE?0:1,c=new Uint8Array(a/3).fill(s);r.attributes.applyOffset=new Me({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:c})}return new At({attributes:r.attributes,indices:r.indices,primitiveType:Re.TRIANGLES,boundingSphere:r.boundingSphere,offsetAttribute:e._offsetAttribute})};Up.createShadowVolume=function(e,t,n){let i=e._granularity,o=e._ellipsoid,r=t(i,o),a=n(i,o);return new Up({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:o,rotation:e._rotation,stRotation:e._stRotation,granularity:i,extrudedHeight:r,height:a,vertexFormat:Ne.POSITION_ONLY,shadowVolume:!0})};function uft(e){let t=-e._stRotation;if(t===0)return[0,0,0,1,1,0];let i=Hu.computeEllipsePositions({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,rotation:e._rotation,granularity:e._granularity},!1,!0).outerPositions,o=i.length/3,r=new Array(o);for(let c=0;c<o;++c)r[c]=h.fromArray(i,c*3);let a=e._ellipsoid,s=e.rectangle;return At._textureCoordinateRotationPoints(r,t,a,s)}Object.defineProperties(Up.prototype,{rectangle:{get:function(){return l(this._rectangle)||(this._rectangle=Zxe(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return l(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=uft(this)),this._textureCoordinateRotationPoints}}});var cu=Up;var ibe=new h,IC=new h;function fft(e){let t=e.center;IC=h.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,IC),e.height,IC),IC=h.add(t,IC,IC);let n=new ce(IC,e.semiMajorAxis),i=Hu.computeEllipsePositions(e,!1,!0).outerPositions,o=new pn({position:new Me({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:Hu.raisePositionsToHeight(i,e,!1)})}),r=i.length/3,a=Ue.createTypedArray(r,r*2),s=0;for(let c=0;c<r;++c)a[s++]=c,a[s++]=(c+1)%r;return{boundingSphere:n,attributes:o,indices:a}}var GG=new ce,HG=new ce;function dft(e){let t=e.center,n=e.ellipsoid,i=e.semiMajorAxis,o=h.multiplyByScalar(n.geodeticSurfaceNormal(t,ibe),e.height,ibe);GG.center=h.add(t,o,GG.center),GG.radius=i,o=h.multiplyByScalar(n.geodeticSurfaceNormal(t,o),e.extrudedHeight,o),HG.center=h.add(t,o,HG.center),HG.radius=i;let r=Hu.computeEllipsePositions(e,!1,!0).outerPositions,a=new pn({position:new Me({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:Hu.raisePositionsToHeight(r,e,!0)})});r=a.position.values;let s=ce.union(GG,HG),c=r.length/3;if(l(e.offsetAttribute)){let m=new Uint8Array(c);if(e.offsetAttribute===ln.TOP)m=m.fill(1,0,c/2);else{let A=e.offsetAttribute===ln.NONE?0:1;m=m.fill(A)}a.applyOffset=new Me({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:m})}let u=e.numberOfVerticalLines??16;u=D.clamp(u,0,c/2);let f=Ue.createTypedArray(c,c*2+u*2);c/=2;let d=0,p;for(p=0;p<c;++p)f[d++]=p,f[d++]=(p+1)%c,f[d++]=p+c,f[d++]=(p+1)%c+c;let g;if(u>0){let m=Math.min(u,c);g=Math.round(c/m);let A=Math.min(g*u,c);for(p=0;p<A;p+=g)f[d++]=p,f[d++]=p+c}return{boundingSphere:s,attributes:a,indices:f}}function ew(e){e=e??G.EMPTY_OBJECT;let t=e.center,n=e.ellipsoid??te.default,i=e.semiMajorAxis,o=e.semiMinorAxis,r=e.granularity??D.RADIANS_PER_DEGREE,a=e.height??0,s=e.extrudedHeight??a;this._center=h.clone(t),this._semiMajorAxis=i,this._semiMinorAxis=o,this._ellipsoid=te.clone(n),this._rotation=e.rotation??0,this._height=Math.max(s,a),this._granularity=r,this._extrudedHeight=Math.min(s,a),this._numberOfVerticalLines=Math.max(e.numberOfVerticalLines??16,0),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipseOutlineGeometry"}ew.packedLength=h.packedLength+te.packedLength+8;ew.pack=function(e,t,n){return n=n??0,h.pack(e._center,t,n),n+=h.packedLength,te.pack(e._ellipsoid,t,n),n+=te.packedLength,t[n++]=e._semiMajorAxis,t[n++]=e._semiMinorAxis,t[n++]=e._rotation,t[n++]=e._height,t[n++]=e._granularity,t[n++]=e._extrudedHeight,t[n++]=e._numberOfVerticalLines,t[n]=e._offsetAttribute??-1,t};var obe=new h,rbe=new te,c_={center:obe,ellipsoid:rbe,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};ew.unpack=function(e,t,n){t=t??0;let i=h.unpack(e,t,obe);t+=h.packedLength;let o=te.unpack(e,t,rbe);t+=te.packedLength;let r=e[t++],a=e[t++],s=e[t++],c=e[t++],u=e[t++],f=e[t++],d=e[t++],p=e[t];return l(n)?(n._center=h.clone(i,n._center),n._ellipsoid=te.clone(o,n._ellipsoid),n._semiMajorAxis=r,n._semiMinorAxis=a,n._rotation=s,n._height=c,n._granularity=u,n._extrudedHeight=f,n._numberOfVerticalLines=d,n._offsetAttribute=p===-1?void 0:p,n):(c_.height=c,c_.extrudedHeight=f,c_.granularity=u,c_.rotation=s,c_.semiMajorAxis=r,c_.semiMinorAxis=a,c_.numberOfVerticalLines=d,c_.offsetAttribute=p===-1?void 0:p,new ew(c_))};ew.createGeometry=function(e){if(e._semiMajorAxis<=0||e._semiMinorAxis<=0)return;let t=e._height,n=e._extrudedHeight,i=!D.equalsEpsilon(t,n,0,D.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);let o={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:t,granularity:e._granularity,numberOfVerticalLines:e._numberOfVerticalLines},r;if(i)o.extrudedHeight=n,o.offsetAttribute=e._offsetAttribute,r=dft(o);else if(r=fft(o),l(e._offsetAttribute)){let a=r.attributes.position.values.length,s=e._offsetAttribute===ln.NONE?0:1,c=new Uint8Array(a/3).fill(s);r.attributes.applyOffset=new Me({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:c})}return new At({attributes:r.attributes,indices:r.indices,primitiveType:Re.LINES,boundingSphere:r.boundingSphere,offsetAttribute:e._offsetAttribute})};var Uf=ew;var abe=new V,sbe=h.ZERO,cbe=new h,lbe=new oe;function hft(e){this.id=e,this.vertexFormat=void 0,this.center=void 0,this.semiMajorAxis=void 0,this.semiMinorAxis=void 0,this.rotation=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.numberOfVerticalLines=void 0,this.offsetAttribute=void 0}function Sm(e,t){$n.call(this,{entity:e,scene:t,geometryOptions:new hft(e),geometryPropertyName:"ellipse",observedPropertyNames:["availability","position","ellipse"]}),this._onEntityPropertyChanged(e,"ellipse",e.ellipse,void 0)}l(Object.create)&&(Sm.prototype=Object.create($n.prototype),Sm.prototype.constructor=Sm);Sm.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i={show:new En(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:Hn.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};if(this._materialProperty instanceof Wt){let o;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(o=this._materialProperty.color.getValue(e,abe)),l(o)||(o=V.WHITE),i.color=Yt.fromColor(o)}return l(this._options.offsetAttribute)&&(i.offset=po.fromCartesian3(X.getValueOrDefault(this._terrainOffsetProperty,e,sbe,cbe))),new Ot({id:t,geometry:new cu(this._options),attributes:i})};Sm.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=X.getValueOrDefault(this._outlineColorProperty,e,V.BLACK,abe),o=this._distanceDisplayConditionProperty.getValue(e),r={show:new En(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Yt.fromColor(i),distanceDisplayCondition:Hn.fromDistanceDisplayCondition(o),offset:void 0};return l(this._options.offsetAttribute)&&(r.offset=po.fromCartesian3(X.getValueOrDefault(this._terrainOffsetProperty,e,sbe,cbe))),new Ot({id:t,geometry:new Uf(this._options),attributes:r})};Sm.prototype._computeCenter=function(e,t){return X.getValueOrUndefined(this._entity.position,e,t)};Sm.prototype._isHidden=function(e,t){let n=e.position;return!l(n)||!l(t.semiMajorAxis)||!l(t.semiMinorAxis)||bi.prototype._isHidden.call(this,e,t)};Sm.prototype._isDynamic=function(e,t){return!e.position.isConstant||!t.semiMajorAxis.isConstant||!t.semiMinorAxis.isConstant||!X.isConstant(t.rotation)||!X.isConstant(t.height)||!X.isConstant(t.extrudedHeight)||!X.isConstant(t.granularity)||!X.isConstant(t.stRotation)||!X.isConstant(t.outlineWidth)||!X.isConstant(t.numberOfVerticalLines)||!X.isConstant(t.zIndex)||this._onTerrain&&!X.isConstant(this._materialProperty)&&!(this._materialProperty instanceof Wt)};Sm.prototype._setStaticOptions=function(e,t){let n=X.getValueOrUndefined(t.height,Qe.MINIMUM_VALUE),i=X.getValueOrDefault(t.heightReference,Qe.MINIMUM_VALUE,nt.NONE),o=X.getValueOrUndefined(t.extrudedHeight,Qe.MINIMUM_VALUE),r=X.getValueOrDefault(t.extrudedHeightReference,Qe.MINIMUM_VALUE,nt.NONE);l(o)&&!l(n)&&(n=0);let a=this._options;a.vertexFormat=this._materialProperty instanceof Wt?dn.VERTEX_FORMAT:go.MaterialSupport.TEXTURED.vertexFormat,a.center=e.position.getValue(Qe.MINIMUM_VALUE,a.center),a.semiMajorAxis=t.semiMajorAxis.getValue(Qe.MINIMUM_VALUE,a.semiMajorAxis),a.semiMinorAxis=t.semiMinorAxis.getValue(Qe.MINIMUM_VALUE,a.semiMinorAxis),a.rotation=X.getValueOrUndefined(t.rotation,Qe.MINIMUM_VALUE),a.granularity=X.getValueOrUndefined(t.granularity,Qe.MINIMUM_VALUE),a.stRotation=X.getValueOrUndefined(t.stRotation,Qe.MINIMUM_VALUE),a.numberOfVerticalLines=X.getValueOrUndefined(t.numberOfVerticalLines,Qe.MINIMUM_VALUE),a.offsetAttribute=$n.computeGeometryOffsetAttribute(n,i,o,r),a.height=$n.getGeometryHeight(n,i),o=$n.getGeometryExtrudedHeight(o,r),o===$n.CLAMP_TO_GROUND&&(o=vi.getMinimumMaximumHeights(cu.computeRectangle(a,lbe)).minimumTerrainHeight),a.extrudedHeight=o};Sm.DynamicGeometryUpdater=tw;function tw(e,t,n){xi.call(this,e,t,n)}l(Object.create)&&(tw.prototype=Object.create(xi.prototype),tw.prototype.constructor=tw);tw.prototype._isHidden=function(e,t,n){let i=this._options;return!l(i.center)||!l(i.semiMajorAxis)||!l(i.semiMinorAxis)||xi.prototype._isHidden.call(this,e,t,n)};tw.prototype._setOptions=function(e,t,n){let i=this._options,o=X.getValueOrUndefined(t.height,n),r=X.getValueOrDefault(t.heightReference,n,nt.NONE),a=X.getValueOrUndefined(t.extrudedHeight,n),s=X.getValueOrDefault(t.extrudedHeightReference,n,nt.NONE);l(a)&&!l(o)&&(o=0),i.center=X.getValueOrUndefined(e.position,n,i.center),i.semiMajorAxis=X.getValueOrUndefined(t.semiMajorAxis,n),i.semiMinorAxis=X.getValueOrUndefined(t.semiMinorAxis,n),i.rotation=X.getValueOrUndefined(t.rotation,n),i.granularity=X.getValueOrUndefined(t.granularity,n),i.stRotation=X.getValueOrUndefined(t.stRotation,n),i.numberOfVerticalLines=X.getValueOrUndefined(t.numberOfVerticalLines,n),i.offsetAttribute=$n.computeGeometryOffsetAttribute(o,r,a,s),i.height=$n.getGeometryHeight(o,r),a=$n.getGeometryExtrudedHeight(a,s),a===$n.CLAMP_TO_GROUND&&(a=vi.getMinimumMaximumHeights(cu.computeRectangle(i,lbe)).minimumTerrainHeight),i.extrudedHeight=a};var m2=Sm;var mft=new h,pft=new h,gft=new h,_ft=new h,Aft=new h,yft=new h(1,1,1),ube=Math.cos,fbe=Math.sin;function l_(e){e=e??G.EMPTY_OBJECT;let t=e.radii??yft,n=e.innerRadii??t,i=e.minimumClock??0,o=e.maximumClock??D.TWO_PI,r=e.minimumCone??0,a=e.maximumCone??D.PI,s=Math.round(e.stackPartitions??64),c=Math.round(e.slicePartitions??64),u=e.vertexFormat??Ne.DEFAULT;this._radii=h.clone(t),this._innerRadii=h.clone(n),this._minimumClock=i,this._maximumClock=o,this._minimumCone=r,this._maximumCone=a,this._stackPartitions=s,this._slicePartitions=c,this._vertexFormat=Ne.clone(u),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidGeometry"}l_.packedLength=2*h.packedLength+Ne.packedLength+7;l_.pack=function(e,t,n){return n=n??0,h.pack(e._radii,t,n),n+=h.packedLength,h.pack(e._innerRadii,t,n),n+=h.packedLength,Ne.pack(e._vertexFormat,t,n),n+=Ne.packedLength,t[n++]=e._minimumClock,t[n++]=e._maximumClock,t[n++]=e._minimumCone,t[n++]=e._maximumCone,t[n++]=e._stackPartitions,t[n++]=e._slicePartitions,t[n]=e._offsetAttribute??-1,t};var dbe=new h,hbe=new h,mbe=new Ne,py={radii:dbe,innerRadii:hbe,vertexFormat:mbe,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,offsetAttribute:void 0};l_.unpack=function(e,t,n){t=t??0;let i=h.unpack(e,t,dbe);t+=h.packedLength;let o=h.unpack(e,t,hbe);t+=h.packedLength;let r=Ne.unpack(e,t,mbe);t+=Ne.packedLength;let a=e[t++],s=e[t++],c=e[t++],u=e[t++],f=e[t++],d=e[t++],p=e[t];return l(n)?(n._radii=h.clone(i,n._radii),n._innerRadii=h.clone(o,n._innerRadii),n._vertexFormat=Ne.clone(r,n._vertexFormat),n._minimumClock=a,n._maximumClock=s,n._minimumCone=c,n._maximumCone=u,n._stackPartitions=f,n._slicePartitions=d,n._offsetAttribute=p===-1?void 0:p,n):(py.minimumClock=a,py.maximumClock=s,py.minimumCone=c,py.maximumCone=u,py.stackPartitions=f,py.slicePartitions=d,py.offsetAttribute=p===-1?void 0:p,new l_(py))};l_.createGeometry=function(e){let t=e._radii;if(t.x<=0||t.y<=0||t.z<=0)return;let n=e._innerRadii;if(n.x<=0||n.y<=0||n.z<=0)return;let i=e._minimumClock,o=e._maximumClock,r=e._minimumCone,a=e._maximumCone,s=e._vertexFormat,c=e._slicePartitions+1,u=e._stackPartitions+1;c=Math.round(c*Math.abs(o-i)/D.TWO_PI),u=Math.round(u*Math.abs(a-r)/D.PI),c<2&&(c=2),u<2&&(u=2);let f,d,p=0,g=[r],m=[i];for(f=0;f<u;f++)g.push(r+f*(a-r)/(u-1));for(g.push(a),d=0;d<c;d++)m.push(i+d*(o-i)/(c-1));m.push(o);let A=g.length,y=m.length,x=0,b=1,C=n.x!==t.x||n.y!==t.y||n.z!==t.z,E=!1,S=!1,w=!1;C&&(b=2,r>0&&(E=!0,x+=c-1),a<Math.PI&&(S=!0,x+=c-1),(o-i)%D.TWO_PI?(w=!0,x+=(u-1)*2+1):x+=1);let P=y*A*b,R=new Float64Array(P*3),B=new Array(P).fill(!1),L=new Array(P).fill(!1),_=c*u*b,T=6*(_+x+1-(c+u)*b),v=Ue.createTypedArray(_,T),I=s.normal?new Float32Array(P*3):void 0,O=s.tangent?new Float32Array(P*3):void 0,N=s.bitangent?new Float32Array(P*3):void 0,j=s.st?new Float32Array(P*2):void 0,k=new Array(A),U=new Array(A);for(f=0;f<A;f++)k[f]=fbe(g[f]),U[f]=ube(g[f]);let F=new Array(y),H=new Array(y);for(d=0;d<y;d++)H[d]=ube(m[d]),F[d]=fbe(m[d]);for(f=0;f<A;f++)for(d=0;d<y;d++)R[p++]=t.x*k[f]*H[d],R[p++]=t.y*k[f]*F[d],R[p++]=t.z*U[f];let q=P/2;if(C)for(f=0;f<A;f++)for(d=0;d<y;d++)R[p++]=n.x*k[f]*H[d],R[p++]=n.y*k[f]*F[d],R[p++]=n.z*U[f],B[q]=!0,f>0&&f!==A-1&&d!==0&&d!==y-1&&(L[q]=!0),q++;p=0;let J,W;for(f=1;f<A-2;f++)for(J=f*y,W=(f+1)*y,d=1;d<y-2;d++)v[p++]=W+d,v[p++]=W+d+1,v[p++]=J+d+1,v[p++]=W+d,v[p++]=J+d+1,v[p++]=J+d;if(C){let Ge=A*y;for(f=1;f<A-2;f++)for(J=Ge+f*y,W=Ge+(f+1)*y,d=1;d<y-2;d++)v[p++]=W+d,v[p++]=J+d,v[p++]=J+d+1,v[p++]=W+d,v[p++]=J+d+1,v[p++]=W+d+1}let Z,K;if(C){if(E)for(K=A*y,f=1;f<y-2;f++)v[p++]=f,v[p++]=f+1,v[p++]=K+f+1,v[p++]=f,v[p++]=K+f+1,v[p++]=K+f;if(S)for(Z=A*y-y,K=A*y*b-y,f=1;f<y-2;f++)v[p++]=Z+f+1,v[p++]=Z+f,v[p++]=K+f,v[p++]=Z+f+1,v[p++]=K+f,v[p++]=K+f+1}if(w){for(f=1;f<A-2;f++)K=y*A+y*f,Z=y*f,v[p++]=K,v[p++]=Z+y,v[p++]=Z,v[p++]=K,v[p++]=K+y,v[p++]=Z+y;for(f=1;f<A-2;f++)K=y*A+y*(f+1)-1,Z=y*(f+1)-1,v[p++]=Z+y,v[p++]=K,v[p++]=Z,v[p++]=Z+y,v[p++]=K+y,v[p++]=K}let le=new pn;s.position&&(le.position=new Me({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:R}));let me=0,ae=0,be=0,ge=0,we=P/2,Ee,Be=te.fromCartesian3(t),ke=te.fromCartesian3(n);if(s.st||s.normal||s.tangent||s.bitangent){for(f=0;f<P;f++){Ee=B[f]?ke:Be;let Ge=h.fromArray(R,f*3,mft),rt=Ee.geodeticSurfaceNormal(Ge,pft);if(L[f]&&h.negate(rt,rt),s.st){let et=z.negate(rt,Aft);j[me++]=Math.atan2(et.y,et.x)/D.TWO_PI+.5,j[me++]=Math.asin(rt.z)/Math.PI+.5}if(s.normal&&(I[ae++]=rt.x,I[ae++]=rt.y,I[ae++]=rt.z),s.tangent||s.bitangent){let et=gft,Pe=0,Ye;if(B[f]&&(Pe=we),!E&&f>=Pe&&f<Pe+y*2?Ye=h.UNIT_X:Ye=h.UNIT_Z,h.cross(Ye,rt,et),h.normalize(et,et),s.tangent&&(O[be++]=et.x,O[be++]=et.y,O[be++]=et.z),s.bitangent){let ut=h.cross(rt,et,_ft);h.normalize(ut,ut),N[ge++]=ut.x,N[ge++]=ut.y,N[ge++]=ut.z}}}s.st&&(le.st=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:j})),s.normal&&(le.normal=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:I})),s.tangent&&(le.tangent=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:O})),s.bitangent&&(le.bitangent=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:N}))}if(l(e._offsetAttribute)){let Ge=R.length,rt=e._offsetAttribute===ln.NONE?0:1,et=new Uint8Array(Ge/3).fill(rt);le.applyOffset=new Me({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:et})}return new At({attributes:le,indices:v,primitiveType:Re.TRIANGLES,boundingSphere:ce.fromEllipsoid(Be),offsetAttribute:e._offsetAttribute})};var tJ;l_.getUnitEllipsoid=function(){return l(tJ)||(tJ=l_.createGeometry(new l_({radii:new h(1,1,1),vertexFormat:Ne.POSITION_ONLY}))),tJ};var js=l_;var xft=new Wt(V.WHITE),nJ=h.ZERO,iJ=new h,bft=new h,Cft=new h,oJ=new V,Tft=new h(1,1,1);function Eft(e){this.id=e,this.vertexFormat=void 0,this.radii=void 0,this.innerRadii=void 0,this.minimumClock=void 0,this.maximumClock=void 0,this.minimumCone=void 0,this.maximumCone=void 0,this.stackPartitions=void 0,this.slicePartitions=void 0,this.subdivisions=void 0,this.offsetAttribute=void 0}function Vf(e,t){bi.call(this,{entity:e,scene:t,geometryOptions:new Eft(e),geometryPropertyName:"ellipsoid",observedPropertyNames:["availability","position","orientation","ellipsoid"]}),this._onEntityPropertyChanged(e,"ellipsoid",e.ellipsoid,void 0)}l(Object.create)&&(Vf.prototype=Object.create(bi.prototype),Vf.prototype.constructor=Vf);Object.defineProperties(Vf.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}});Vf.prototype.createFillGeometryInstance=function(e,t,n){let i=this._entity,o=i.isAvailable(e),r,a=new En(o&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),s=this._distanceDisplayConditionProperty.getValue(e),c=Hn.fromDistanceDisplayCondition(s),u={show:a,distanceDisplayCondition:c,color:void 0,offset:void 0};if(this._materialProperty instanceof Wt){let f;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||o)&&(f=this._materialProperty.color.getValue(e,oJ)),l(f)||(f=V.WHITE),r=Yt.fromColor(f),u.color=r}return l(this._options.offsetAttribute)&&(u.offset=po.fromCartesian3(X.getValueOrDefault(this._terrainOffsetProperty,e,nJ,iJ))),new Ot({id:i,geometry:new js(this._options),modelMatrix:t?void 0:i.computeModelMatrixForHeightReference(e,i.ellipsoid.heightReference,this._options.radii.z*.5,this._scene.ellipsoid,n),attributes:u})};Vf.prototype.createOutlineGeometryInstance=function(e,t,n){let i=this._entity,o=i.isAvailable(e),r=X.getValueOrDefault(this._outlineColorProperty,e,V.BLACK,oJ),a=this._distanceDisplayConditionProperty.getValue(e),s={show:new En(o&&i.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Yt.fromColor(r),distanceDisplayCondition:Hn.fromDistanceDisplayCondition(a),offset:void 0};return l(this._options.offsetAttribute)&&(s.offset=po.fromCartesian3(X.getValueOrDefault(this._terrainOffsetProperty,e,nJ,iJ))),new Ot({id:i,geometry:new Of(this._options),modelMatrix:t?void 0:i.computeModelMatrixForHeightReference(e,i.ellipsoid.heightReference,this._options.radii.z*.5,this._scene.ellipsoid,n),attributes:s})};Vf.prototype._computeCenter=function(e,t){return X.getValueOrUndefined(this._entity.position,e,t)};Vf.prototype._isHidden=function(e,t){return!l(e.position)||!l(t.radii)||bi.prototype._isHidden.call(this,e,t)};Vf.prototype._isDynamic=function(e,t){return!e.position.isConstant||!X.isConstant(e.orientation)||!t.radii.isConstant||!X.isConstant(t.innerRadii)||!X.isConstant(t.stackPartitions)||!X.isConstant(t.slicePartitions)||!X.isConstant(t.outlineWidth)||!X.isConstant(t.minimumClock)||!X.isConstant(t.maximumClock)||!X.isConstant(t.minimumCone)||!X.isConstant(t.maximumCone)||!X.isConstant(t.subdivisions)};Vf.prototype._setStaticOptions=function(e,t){let n=X.getValueOrDefault(t.heightReference,Qe.MINIMUM_VALUE,nt.NONE),i=this._options;i.vertexFormat=this._materialProperty instanceof Wt?dn.VERTEX_FORMAT:go.MaterialSupport.TEXTURED.vertexFormat,i.radii=t.radii.getValue(Qe.MINIMUM_VALUE,i.radii),i.innerRadii=X.getValueOrUndefined(t.innerRadii,i.radii),i.minimumClock=X.getValueOrUndefined(t.minimumClock,Qe.MINIMUM_VALUE),i.maximumClock=X.getValueOrUndefined(t.maximumClock,Qe.MINIMUM_VALUE),i.minimumCone=X.getValueOrUndefined(t.minimumCone,Qe.MINIMUM_VALUE),i.maximumCone=X.getValueOrUndefined(t.maximumCone,Qe.MINIMUM_VALUE),i.stackPartitions=X.getValueOrUndefined(t.stackPartitions,Qe.MINIMUM_VALUE),i.slicePartitions=X.getValueOrUndefined(t.slicePartitions,Qe.MINIMUM_VALUE),i.subdivisions=X.getValueOrUndefined(t.subdivisions,Qe.MINIMUM_VALUE),i.offsetAttribute=n!==nt.NONE?ln.ALL:void 0};Vf.prototype._onEntityPropertyChanged=tg;Vf.DynamicGeometryUpdater=p2;function p2(e,t,n){xi.call(this,e,t,n),this._scene=e._scene,this._modelMatrix=new M,this._attributes=void 0,this._outlineAttributes=void 0,this._lastSceneMode=void 0,this._lastShow=void 0,this._lastOutlineShow=void 0,this._lastOutlineWidth=void 0,this._lastOutlineColor=void 0,this._lastOffset=new h,this._material={}}l(Object.create)&&(p2.prototype=Object.create(xi.prototype),p2.prototype.constructor=p2);p2.prototype.update=function(e){let t=this._entity,n=t.ellipsoid;if(!t.isShowing||!t.isAvailable(e)||!X.getValueOrDefault(n.show,e,!0)){l(this._primitive)&&(this._primitive.show=!1),l(this._outlinePrimitive)&&(this._outlinePrimitive.show=!1);return}let i=X.getValueOrUndefined(n.radii,e,bft),o=l(i)?t.computeModelMatrixForHeightReference(e,n.heightReference,i.z*.5,this._scene.ellipsoid,this._modelMatrix):void 0;if(!l(o)||!l(i)){l(this._primitive)&&(this._primitive.show=!1),l(this._outlinePrimitive)&&(this._outlinePrimitive.show=!1);return}let r=X.getValueOrDefault(n.fill,e,!0),a=X.getValueOrDefault(n.outline,e,!1),s=X.getValueOrClonedDefault(n.outlineColor,e,V.BLACK,oJ),c=br.getValue(e,n.material??xft,this._material),u=X.getValueOrUndefined(n.innerRadii,e,Cft),f=X.getValueOrUndefined(n.minimumClock,e),d=X.getValueOrUndefined(n.maximumClock,e),p=X.getValueOrUndefined(n.minimumCone,e),g=X.getValueOrUndefined(n.maximumCone,e),m=X.getValueOrUndefined(n.stackPartitions,e),A=X.getValueOrUndefined(n.slicePartitions,e),y=X.getValueOrUndefined(n.subdivisions,e),x=X.getValueOrDefault(n.outlineWidth,e,1),b=X.getValueOrDefault(n.heightReference,e,nt.NONE),C=b!==nt.NONE?ln.ALL:void 0,E=this._scene.mode,S=E===ie.SCENE3D&&b===nt.NONE,w=this._options,P=this._geometryUpdater.shadowsProperty.getValue(e),B=this._geometryUpdater.distanceDisplayConditionProperty.getValue(e),L=X.getValueOrDefault(this._geometryUpdater.terrainOffsetProperty,e,nJ,iJ);if(!S||this._lastSceneMode!==E||!l(this._primitive)||w.stackPartitions!==m||w.slicePartitions!==A||l(u)&&!h.equals(w.innerRadii!==u)||w.minimumClock!==f||w.maximumClock!==d||w.minimumCone!==p||w.maximumCone!==g||w.subdivisions!==y||this._lastOutlineWidth!==x||w.offsetAttribute!==C){let T=this._primitives;T.removeAndDestroy(this._primitive),T.removeAndDestroy(this._outlinePrimitive),this._primitive=void 0,this._outlinePrimitive=void 0,this._lastSceneMode=E,this._lastOutlineWidth=x,w.stackPartitions=m,w.slicePartitions=A,w.subdivisions=y,w.offsetAttribute=C,w.radii=h.clone(S?Tft:i,w.radii),l(u)?S?w.innerRadii=h.fromElements(u.x/i.x,u.y/i.y,u.z/i.z,w.innerRadii):w.innerRadii=h.clone(u,w.innerRadii):w.innerRadii=void 0,w.minimumClock=f,w.maximumClock=d,w.minimumCone=p,w.maximumCone=g;let v=new go({material:c,translucent:c.isTranslucent(),closed:!0});w.vertexFormat=v.vertexFormat;let I=this._geometryUpdater.createFillGeometryInstance(e,S,this._modelMatrix);this._primitive=T.add(new Dn({geometryInstances:I,appearance:v,asynchronous:!1,shadows:P}));let O=this._geometryUpdater.createOutlineGeometryInstance(e,S,this._modelMatrix);this._outlinePrimitive=T.add(new Dn({geometryInstances:O,appearance:new dn({flat:!0,translucent:O.attributes.color.value[3]!==255,renderState:{lineWidth:this._geometryUpdater._scene.clampLineWidth(x)}}),asynchronous:!1,shadows:P})),this._lastShow=r,this._lastOutlineShow=a,this._lastOutlineColor=V.clone(s,this._lastOutlineColor),this._lastDistanceDisplayCondition=B,this._lastOffset=h.clone(L,this._lastOffset)}else if(this._primitive.ready){let T=this._primitive,v=this._outlinePrimitive;T.show=!0,v.show=!0,T.appearance.material=c;let I=this._attributes;l(I)||(I=T.getGeometryInstanceAttributes(t),this._attributes=I),r!==this._lastShow&&(I.show=En.toValue(r,I.show),this._lastShow=r);let O=this._outlineAttributes;l(O)||(O=v.getGeometryInstanceAttributes(t),this._outlineAttributes=O),a!==this._lastOutlineShow&&(O.show=En.toValue(a,O.show),this._lastOutlineShow=a),V.equals(s,this._lastOutlineColor)||(O.color=Yt.toValue(s,O.color),V.clone(s,this._lastOutlineColor)),kt.equals(B,this._lastDistanceDisplayCondition)||(I.distanceDisplayCondition=Hn.toValue(B,I.distanceDisplayCondition),O.distanceDisplayCondition=Hn.toValue(B,O.distanceDisplayCondition),kt.clone(B,this._lastDistanceDisplayCondition)),h.equals(L,this._lastOffset)||(I.offset=po.toValue(L,I.offset),O.offset=po.toValue(L,I.offset),h.clone(L,this._lastOffset))}S&&(i.x=Math.max(i.x,.001),i.y=Math.max(i.y,.001),i.z=Math.max(i.z,.001),o=M.multiplyByScale(o,i,o),this._primitive.modelMatrix=o,this._outlinePrimitive.modelMatrix=o)};var g2=Vf;function nw(e){e=e??G.EMPTY_OBJECT;let t=e.vertexFormat??Ne.DEFAULT;this._vertexFormat=t,this._workerName="createPlaneGeometry"}nw.packedLength=Ne.packedLength;nw.pack=function(e,t,n){return n=n??0,Ne.pack(e._vertexFormat,t,n),t};var pbe=new Ne,vft={vertexFormat:pbe};nw.unpack=function(e,t,n){t=t??0;let i=Ne.unpack(e,t,pbe);return l(n)?(n._vertexFormat=Ne.clone(i,n._vertexFormat),n):new nw(vft)};var WG=new h(-.5,-.5,0),qG=new h(.5,.5,0);nw.createGeometry=function(e){let t=e._vertexFormat,n=new pn,i,o;if(t.position){if(o=new Float64Array(12),o[0]=WG.x,o[1]=WG.y,o[2]=0,o[3]=qG.x,o[4]=WG.y,o[5]=0,o[6]=qG.x,o[7]=qG.y,o[8]=0,o[9]=WG.x,o[10]=qG.y,o[11]=0,n.position=new Me({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:o}),t.normal){let r=new Float32Array(12);r[0]=0,r[1]=0,r[2]=1,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=1,r[9]=0,r[10]=0,r[11]=1,n.normal=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:r})}if(t.st){let r=new Float32Array(8);r[0]=0,r[1]=0,r[2]=1,r[3]=0,r[4]=1,r[5]=1,r[6]=0,r[7]=1,n.st=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:r})}if(t.tangent){let r=new Float32Array(12);r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r[6]=1,r[7]=0,r[8]=0,r[9]=1,r[10]=0,r[11]=0,n.tangent=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:r})}if(t.bitangent){let r=new Float32Array(12);r[0]=0,r[1]=1,r[2]=0,r[3]=0,r[4]=1,r[5]=0,r[6]=0,r[7]=1,r[8]=0,r[9]=0,r[10]=1,r[11]=0,n.bitangent=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:r})}i=new Uint16Array(6),i[0]=0,i[1]=1,i[2]=2,i[3]=0,i[4]=2,i[5]=3}return new At({attributes:n,indices:i,primitiveType:Re.TRIANGLES,boundingSphere:new ce(h.ZERO,Math.sqrt(2))})};var _2=nw;function iw(){this._workerName="createPlaneOutlineGeometry"}iw.packedLength=0;iw.pack=function(e,t){return t};iw.unpack=function(e,t,n){return l(n)?n:new iw};var gy=new h(-.5,-.5,0),YG=new h(.5,.5,0);iw.createGeometry=function(){let e=new pn,t=new Uint16Array(8),n=new Float64Array(12);return n[0]=gy.x,n[1]=gy.y,n[2]=gy.z,n[3]=YG.x,n[4]=gy.y,n[5]=gy.z,n[6]=YG.x,n[7]=YG.y,n[8]=gy.z,n[9]=gy.x,n[10]=YG.y,n[11]=gy.z,e.position=new Me({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:n}),t[0]=0,t[1]=1,t[2]=1,t[3]=2,t[4]=2,t[5]=3,t[6]=3,t[7]=0,new At({attributes:e,indices:t,primitiveType:Re.LINES,boundingSphere:new ce(h.ZERO,Math.sqrt(2))})};var A2=iw;var Sft=new h,gbe=new V;function wft(e){this.id=e,this.vertexFormat=void 0,this.plane=void 0,this.dimensions=void 0}function eh(e,t){bi.call(this,{entity:e,scene:t,geometryOptions:new wft(e),geometryPropertyName:"plane",observedPropertyNames:["availability","position","orientation","plane"]}),this._onEntityPropertyChanged(e,"plane",e.plane,void 0)}l(Object.create)&&(eh.prototype=Object.create(bi.prototype),eh.prototype.constructor=eh);eh.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i,o,r=new En(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),a=this._distanceDisplayConditionProperty.getValue(e),s=Hn.fromDistanceDisplayCondition(a);if(this._materialProperty instanceof Wt){let g;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(g=this._materialProperty.color.getValue(e,gbe)),l(g)||(g=V.WHITE),o=Yt.fromColor(g),i={show:r,distanceDisplayCondition:s,color:o}}else i={show:r,distanceDisplayCondition:s};let c=t.plane,u=this._options,f=t.computeModelMatrix(e),d=X.getValueOrDefault(c.plane,e,u.plane),p=X.getValueOrUndefined(c.dimensions,e,u.dimensions);return u.plane=d,u.dimensions=p,f=rJ(d,p,f,f),new Ot({id:t,geometry:new _2(this._options),modelMatrix:f,attributes:i})};eh.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=X.getValueOrDefault(this._outlineColorProperty,e,V.BLACK,gbe),o=this._distanceDisplayConditionProperty.getValue(e),r=t.plane,a=this._options,s=t.computeModelMatrix(e),c=X.getValueOrDefault(r.plane,e,a.plane),u=X.getValueOrUndefined(r.dimensions,e,a.dimensions);return a.plane=c,a.dimensions=u,s=rJ(c,u,s,s),new Ot({id:t,geometry:new A2,modelMatrix:s,attributes:{show:new En(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Yt.fromColor(i),distanceDisplayCondition:Hn.fromDistanceDisplayCondition(o)}})};eh.prototype._isHidden=function(e,t){return!l(t.plane)||!l(t.dimensions)||!l(e.position)||bi.prototype._isHidden.call(this,e,t)};eh.prototype._getIsClosed=function(e){return!1};eh.prototype._isDynamic=function(e,t){return!e.position.isConstant||!X.isConstant(e.orientation)||!t.plane.isConstant||!t.dimensions.isConstant||!X.isConstant(t.outlineWidth)};eh.prototype._setStaticOptions=function(e,t){let n=this._materialProperty instanceof Wt,i=this._options;i.vertexFormat=n?dn.VERTEX_FORMAT:go.MaterialSupport.TEXTURED.vertexFormat,i.plane=t.plane.getValue(Qe.MINIMUM_VALUE,i.plane),i.dimensions=t.dimensions.getValue(Qe.MINIMUM_VALUE,i.dimensions)};eh.DynamicGeometryUpdater=ow;function ow(e,t,n){xi.call(this,e,t,n)}l(Object.create)&&(ow.prototype=Object.create(xi.prototype),ow.prototype.constructor=ow);ow.prototype._isHidden=function(e,t,n){let i=this._options,o=X.getValueOrUndefined(e.position,n,Sft);return!l(o)||!l(i.plane)||!l(i.dimensions)||xi.prototype._isHidden.call(this,e,t,n)};ow.prototype._setOptions=function(e,t,n){let i=this._options;i.plane=X.getValueOrDefault(t.plane,n,i.plane),i.dimensions=X.getValueOrUndefined(t.dimensions,n,i.dimensions)};var Ift=new h,Dft=new h,Pft=new h,Rft=new h,Oft=new $,Mft=new $,Bft=new M;function rJ(e,t,n,i){let o=e.normal,r=e.distance,a=h.multiplyByScalar(o,-r,Pft),s=h.clone(h.UNIT_Z,Dft);D.equalsEpsilon(Math.abs(h.dot(s,o)),1,D.EPSILON8)&&(s=h.clone(h.UNIT_Y,s));let c=h.cross(s,o,Ift);s=h.cross(o,c,s),h.normalize(c,c),h.normalize(s,s);let u=Oft;$.setColumn(u,0,c,u),$.setColumn(u,1,s,u),$.setColumn(u,2,o,u);let f=h.fromElements(t.x,t.y,1,Rft),d=$.multiplyByScale(u,f,Mft),p=M.fromRotationTranslation(d,a,Bft);return M.multiplyTransformation(n,p,i)}eh.createPrimitiveMatrix=rJ;var y2=eh;var Lft=new h,Nft=new Je,Fft=new z,kft=new z,zft=new h,Uft=new h,Vft=new h,x2=new h,jft=new h,Gft=new h,_be=new Le,Hft=new $,Wft=new $,qft=new h;function Yft(e,t,n,i,o,r,a,s,c){let u=e.positions,f=ni.triangulate(e.positions2D,e.holes);f.length<3&&(f=[0,1,2]);let d=Ue.createTypedArray(u.length,f.length);d.set(f);let p=Hft;if(i!==0){let _=Le.fromAxisAngle(a,i,_be);if(p=$.fromQuaternion(_,p),t.tangent||t.bitangent){_=Le.fromAxisAngle(a,-i,_be);let T=$.fromQuaternion(_,Wft);s=h.normalize($.multiplyByVector(T,s,s),s),t.bitangent&&(c=h.normalize(h.cross(a,s,c),c))}}else p=$.clone($.IDENTITY,p);let g=kft;t.st&&(g.x=n.x,g.y=n.y);let m=u.length,A=m*3,y=new Float64Array(A),x=t.normal?new Float32Array(A):void 0,b=t.tangent?new Float32Array(A):void 0,C=t.bitangent?new Float32Array(A):void 0,E=t.st?new Float32Array(m*2):void 0,S=0,w=0,P=0,R=0,B=0;for(let _=0;_<m;_++){let T=u[_];if(y[S++]=T.x,y[S++]=T.y,y[S++]=T.z,t.st)if(l(o)&&o.positions.length===m)E[B++]=o.positions[_].x,E[B++]=o.positions[_].y;else{let v=$.multiplyByVector(p,T,Lft),I=r(v,Fft);z.subtract(I,g,I);let O=D.clamp(I.x/n.width,0,1),N=D.clamp(I.y/n.height,0,1);E[B++]=O,E[B++]=N}t.normal&&(x[w++]=a.x,x[w++]=a.y,x[w++]=a.z),t.tangent&&(b[R++]=s.x,b[R++]=s.y,b[R++]=s.z),t.bitangent&&(C[P++]=c.x,C[P++]=c.y,C[P++]=c.z)}let L=new pn;return t.position&&(L.position=new Me({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:y})),t.normal&&(L.normal=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:x})),t.tangent&&(L.tangent=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:b})),t.bitangent&&(L.bitangent=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:C})),t.st&&(L.st=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:E})),new At({attributes:L,indices:d,primitiveType:Re.TRIANGLES})}function DC(e){e=e??G.EMPTY_OBJECT;let t=e.polygonHierarchy,n=e.textureCoordinates,i=e.vertexFormat??Ne.DEFAULT;this._vertexFormat=Ne.clone(i),this._polygonHierarchy=t,this._stRotation=e.stRotation??0,this._ellipsoid=te.clone(e.ellipsoid??te.default),this._workerName="createCoplanarPolygonGeometry",this._textureCoordinates=n,this.packedLength=Yn.computeHierarchyPackedLength(t,h)+Ne.packedLength+te.packedLength+(l(n)?Yn.computeHierarchyPackedLength(n,z):1)+2}DC.fromPositions=function(e){e=e??G.EMPTY_OBJECT;let t={polygonHierarchy:{positions:e.positions},vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,textureCoordinates:e.textureCoordinates};return new DC(t)};DC.pack=function(e,t,n){return n=n??0,n=Yn.packPolygonHierarchy(e._polygonHierarchy,t,n,h),te.pack(e._ellipsoid,t,n),n+=te.packedLength,Ne.pack(e._vertexFormat,t,n),n+=Ne.packedLength,t[n++]=e._stRotation,l(e._textureCoordinates)?n=Yn.packPolygonHierarchy(e._textureCoordinates,t,n,z):t[n++]=-1,t[n++]=e.packedLength,t};var Xft=te.clone(te.UNIT_SPHERE),Kft=new Ne,Qft={polygonHierarchy:{}};DC.unpack=function(e,t,n){t=t??0;let i=Yn.unpackPolygonHierarchy(e,t,h);t=i.startingIndex,delete i.startingIndex;let o=te.unpack(e,t,Xft);t+=te.packedLength;let r=Ne.unpack(e,t,Kft);t+=Ne.packedLength;let a=e[t++],s=e[t]===-1?void 0:Yn.unpackPolygonHierarchy(e,t,z);l(s)?(t=s.startingIndex,delete s.startingIndex):t++;let c=e[t++];return l(n)||(n=new DC(Qft)),n._polygonHierarchy=i,n._ellipsoid=te.clone(o,n._ellipsoid),n._vertexFormat=Ne.clone(r,n._vertexFormat),n._stRotation=a,n._textureCoordinates=s,n.packedLength=c,n};DC.createGeometry=function(e){let t=e._vertexFormat,n=e._polygonHierarchy,i=e._stRotation,o=e._textureCoordinates,r=l(o),a=n.positions;if(a=Fo(a,h.equalsEpsilon,!0),a.length<3)return;let s=zft,c=Uft,u=Vft,f=jft,d=Gft;if(!jg.computeProjectTo2DArguments(a,x2,f,d))return;if(s=h.cross(f,d,s),s=h.normalize(s,s),!h.equalsEpsilon(x2,h.ZERO,D.EPSILON6)){let B=e._ellipsoid.geodeticSurfaceNormal(x2,qft);h.dot(s,B)<0&&(s=h.negate(s,s),f=h.negate(f,f))}let g=jg.createProjectPointsTo2DFunction(x2,f,d),m=jg.createProjectPointTo2DFunction(x2,f,d);t.tangent&&(c=h.clone(f,c)),t.bitangent&&(u=h.clone(d,u));let A=Yn.polygonsFromHierarchy(n,r,g,!1),y=A.hierarchy,x=A.polygons,b=function(B){return B},C=r?Yn.polygonsFromHierarchy(o,!0,b,!1).polygons:void 0;if(y.length===0)return;a=y[0].outerRing;let E=ce.fromPoints(a),S=Yn.computeBoundingRectangle(s,m,a,i,Nft),w=[];for(let B=0;B<x.length;B++){let L=new Ot({geometry:Yft(x[B],t,S,i,r?C[B]:void 0,m,s,c,u)});w.push(L)}let P=kn.combineInstances(w)[0];P.attributes.position.values=new Float64Array(P.attributes.position.values),P.indices=Ue.createTypedArray(P.attributes.position.values.length/3,P.indices);let R=P.attributes;return t.position||delete R.position,new At({attributes:R,indices:P.indices,primitiveType:P.primitiveType,boundingSphere:E})};var b2=DC;var Abe=[],XG=[];function $ft(e,t,n,i,o){let a=Ra.fromPoints(t,e).projectPointsOntoPlane(t,Abe);ni.computeWindingOrder2D(a)===Ya.CLOCKWISE&&(a.reverse(),t=t.slice().reverse());let c,u,f=t.length,d=0;if(i)for(c=new Float64Array(f*2*3),u=0;u<f;u++){let m=t[u],A=t[(u+1)%f];c[d++]=m.x,c[d++]=m.y,c[d++]=m.z,c[d++]=A.x,c[d++]=A.y,c[d++]=A.z}else{let m=0;if(o===on.GEODESIC)for(u=0;u<f;u++)m+=Yn.subdivideLineCount(t[u],t[(u+1)%f],n);else if(o===on.RHUMB)for(u=0;u<f;u++)m+=Yn.subdivideRhumbLineCount(e,t[u],t[(u+1)%f],n);for(c=new Float64Array(m*3),u=0;u<f;u++){let A;o===on.GEODESIC?A=Yn.subdivideLine(t[u],t[(u+1)%f],n,XG):o===on.RHUMB&&(A=Yn.subdivideRhumbLine(e,t[u],t[(u+1)%f],n,XG));let y=A.length;for(let x=0;x<y;++x)c[d++]=A[x]}}f=c.length/3;let p=f*2,g=Ue.createTypedArray(f,p);for(d=0,u=0;u<f-1;u++)g[d++]=u,g[d++]=u+1;return g[d++]=f-1,g[d++]=0,new Ot({geometry:new At({attributes:new pn({position:new Me({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:c})}),indices:g,primitiveType:Re.LINES})})}function Jft(e,t,n,i,o){let a=Ra.fromPoints(t,e).projectPointsOntoPlane(t,Abe);ni.computeWindingOrder2D(a)===Ya.CLOCKWISE&&(a.reverse(),t=t.slice().reverse());let c,u,f=t.length,d=new Array(f),p=0;if(i)for(c=new Float64Array(f*2*3*2),u=0;u<f;++u){d[u]=p/3;let y=t[u],x=t[(u+1)%f];c[p++]=y.x,c[p++]=y.y,c[p++]=y.z,c[p++]=x.x,c[p++]=x.y,c[p++]=x.z}else{let y=0;if(o===on.GEODESIC)for(u=0;u<f;u++)y+=Yn.subdivideLineCount(t[u],t[(u+1)%f],n);else if(o===on.RHUMB)for(u=0;u<f;u++)y+=Yn.subdivideRhumbLineCount(e,t[u],t[(u+1)%f],n);for(c=new Float64Array(y*3*2),u=0;u<f;++u){d[u]=p/3;let x;o===on.GEODESIC?x=Yn.subdivideLine(t[u],t[(u+1)%f],n,XG):o===on.RHUMB&&(x=Yn.subdivideRhumbLine(e,t[u],t[(u+1)%f],n,XG));let b=x.length;for(let C=0;C<b;++C)c[p++]=x[C]}}f=c.length/6;let g=d.length,m=(f*2+g)*2,A=Ue.createTypedArray(f+g,m);for(p=0,u=0;u<f;++u)A[p++]=u,A[p++]=(u+1)%f,A[p++]=u+f,A[p++]=(u+1)%f+f;for(u=0;u<g;u++){let y=d[u];A[p++]=y,A[p++]=y+f}return new Ot({geometry:new At({attributes:new pn({position:new Me({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:c})}),indices:A,primitiveType:Re.LINES})})}function PC(e){let t=e.polygonHierarchy,n=e.ellipsoid??te.default,i=e.granularity??D.RADIANS_PER_DEGREE,o=e.perPositionHeight??!1,r=o&&l(e.extrudedHeight),a=e.arcType??on.GEODESIC,s=e.height??0,c=e.extrudedHeight??s;if(!r){let u=Math.max(s,c);c=Math.min(s,c),s=u}this._ellipsoid=te.clone(n),this._granularity=i,this._height=s,this._extrudedHeight=c,this._arcType=a,this._polygonHierarchy=t,this._perPositionHeight=o,this._perPositionHeightExtrude=r,this._offsetAttribute=e.offsetAttribute,this._workerName="createPolygonOutlineGeometry",this.packedLength=Yn.computeHierarchyPackedLength(t,h)+te.packedLength+8}PC.pack=function(e,t,n){return n=n??0,n=Yn.packPolygonHierarchy(e._polygonHierarchy,t,n,h),te.pack(e._ellipsoid,t,n),n+=te.packedLength,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._granularity,t[n++]=e._perPositionHeightExtrude?1:0,t[n++]=e._perPositionHeight?1:0,t[n++]=e._arcType,t[n++]=e._offsetAttribute??-1,t[n]=e.packedLength,t};var Zft=te.clone(te.UNIT_SPHERE),edt={polygonHierarchy:{}};PC.unpack=function(e,t,n){t=t??0;let i=Yn.unpackPolygonHierarchy(e,t,h);t=i.startingIndex,delete i.startingIndex;let o=te.unpack(e,t,Zft);t+=te.packedLength;let r=e[t++],a=e[t++],s=e[t++],c=e[t++]===1,u=e[t++]===1,f=e[t++],d=e[t++],p=e[t];return l(n)||(n=new PC(edt)),n._polygonHierarchy=i,n._ellipsoid=te.clone(o,n._ellipsoid),n._height=r,n._extrudedHeight=a,n._granularity=s,n._perPositionHeight=u,n._perPositionHeightExtrude=c,n._arcType=f,n._offsetAttribute=d===-1?void 0:d,n.packedLength=p,n};PC.fromPositions=function(e){e=e??G.EMPTY_OBJECT;let t={polygonHierarchy:{positions:e.positions},height:e.height,extrudedHeight:e.extrudedHeight,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight,arcType:e.arcType,offsetAttribute:e.offsetAttribute};return new PC(t)};PC.createGeometry=function(e){let t=e._ellipsoid,n=e._granularity,i=e._polygonHierarchy,o=e._perPositionHeight,r=e._arcType,a=Yn.polygonOutlinesFromHierarchy(i,!o,t);if(a.length===0)return;let s,c=[],u=D.chordLength(n,t.maximumRadius),f=e._height,d=e._extrudedHeight,p=e._perPositionHeightExtrude||!D.equalsEpsilon(f,d,0,D.EPSILON2),g,m;if(p)for(m=0;m<a.length;m++){if(s=Jft(t,a[m],u,o,r),s.geometry=Yn.scaleToGeodeticHeightExtruded(s.geometry,f,d,t,o),l(e._offsetAttribute)){let x=s.geometry.attributes.position.values.length/3,b=new Uint8Array(x);e._offsetAttribute===ln.TOP?b=b.fill(1,0,x/2):(g=e._offsetAttribute===ln.NONE?0:1,b=b.fill(g)),s.geometry.attributes.applyOffset=new Me({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:b})}c.push(s)}else for(m=0;m<a.length;m++){if(s=$ft(t,a[m],u,o,r),s.geometry.attributes.position.values=ni.scaleToGeodeticHeight(s.geometry.attributes.position.values,f,t,!o),l(e._offsetAttribute)){let x=s.geometry.attributes.position.values.length;g=e._offsetAttribute===ln.NONE?0:1;let b=new Uint8Array(x/3).fill(g);s.geometry.attributes.applyOffset=new Me({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:b})}c.push(s)}let A=kn.combineInstances(c)[0],y=ce.fromVertices(A.attributes.position.values);return new At({attributes:A.attributes,indices:A.indices,primitiveType:A.primitiveType,boundingSphere:y,offsetAttribute:e._offsetAttribute})};var C2=PC;var ybe="Entity polygons cannot have both height and perPositionHeight. height will be ignored",xbe="heightReference is not supported for entity polygons with perPositionHeight. heightReference will be ignored",bbe=new V,Cbe=h.ZERO,Tbe=new h,Ebe=new oe,tdt=[],ndt=new z;function idt(e){this.id=e,this.vertexFormat=void 0,this.polygonHierarchy=void 0,this.perPositionHeight=void 0,this.closeTop=void 0,this.closeBottom=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.offsetAttribute=void 0,this.arcType=void 0,this.textureCoordinates=void 0}function jf(e,t){$n.call(this,{entity:e,scene:t,geometryOptions:new idt(e),geometryPropertyName:"polygon",observedPropertyNames:["availability","polygon"]}),this._onEntityPropertyChanged(e,"polygon",e.polygon,void 0)}l(Object.create)&&(jf.prototype=Object.create($n.prototype),jf.prototype.constructor=jf);jf.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=this._options,o={show:new En(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:Hn.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};if(this._materialProperty instanceof Wt){let a;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(a=this._materialProperty.color.getValue(e,bbe)),l(a)||(a=V.WHITE),o.color=Yt.fromColor(a)}l(i.offsetAttribute)&&(o.offset=po.fromCartesian3(X.getValueOrDefault(this._terrainOffsetProperty,e,Cbe,Tbe)));let r;return i.perPositionHeight&&!l(i.extrudedHeight)?r=new b2(i):r=new hg(i),new Ot({id:t,geometry:r,attributes:o})};jf.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=this._options,o=X.getValueOrDefault(this._outlineColorProperty,e,V.BLACK,bbe),r=this._distanceDisplayConditionProperty.getValue(e),a={show:new En(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Yt.fromColor(o),distanceDisplayCondition:Hn.fromDistanceDisplayCondition(r),offset:void 0};l(i.offsetAttribute)&&(a.offset=po.fromCartesian3(X.getValueOrDefault(this._terrainOffsetProperty,e,Cbe,Tbe)));let s;return i.perPositionHeight&&!l(i.extrudedHeight)?s=new qd(i):s=new C2(i),new Ot({id:t,geometry:s,attributes:a})};jf.prototype._computeCenter=function(e,t){let n=X.getValueOrUndefined(this._entity.polygon.hierarchy,e);if(!l(n))return;let i=n.positions;if(i.length===0)return;let o=this._scene.ellipsoid,r=Ra.fromPoints(i,o),a=r.projectPointsOntoPlane(i,tdt),s=a.length,c=0,u=s-1,f=new z;for(let p=0;p<s;u=p++){let g=a[p],m=a[u],A=g.x*m.y-m.x*g.y,y=z.add(g,m,ndt);y=z.multiplyByScalar(y,A,y),f=z.add(f,y,f),c+=A}let d=1/(c*3);return f=z.multiplyByScalar(f,d,f),r.projectPointOntoEllipsoid(f,t)};jf.prototype._isHidden=function(e,t){return!l(t.hierarchy)||bi.prototype._isHidden.call(this,e,t)};jf.prototype._isOnTerrain=function(e,t){let n=$n.prototype._isOnTerrain.call(this,e,t),i=t.perPositionHeight,o=l(i)&&(i.isConstant?i.getValue(Qe.MINIMUM_VALUE):!0);return n&&!o};jf.prototype._isDynamic=function(e,t){return!t.hierarchy.isConstant||!X.isConstant(t.height)||!X.isConstant(t.extrudedHeight)||!X.isConstant(t.granularity)||!X.isConstant(t.stRotation)||!X.isConstant(t.textureCoordinates)||!X.isConstant(t.outlineWidth)||!X.isConstant(t.perPositionHeight)||!X.isConstant(t.closeTop)||!X.isConstant(t.closeBottom)||!X.isConstant(t.zIndex)||!X.isConstant(t.arcType)||this._onTerrain&&!X.isConstant(this._materialProperty)&&!(this._materialProperty instanceof Wt)};jf.prototype._setStaticOptions=function(e,t){let n=this._materialProperty instanceof Wt,i=this._options;i.vertexFormat=n?dn.VERTEX_FORMAT:go.MaterialSupport.TEXTURED.vertexFormat;let o=t.hierarchy.getValue(Qe.MINIMUM_VALUE),r=X.getValueOrUndefined(t.height,Qe.MINIMUM_VALUE),a=X.getValueOrDefault(t.heightReference,Qe.MINIMUM_VALUE,nt.NONE),s=X.getValueOrUndefined(t.extrudedHeight,Qe.MINIMUM_VALUE),c=X.getValueOrDefault(t.extrudedHeightReference,Qe.MINIMUM_VALUE,nt.NONE),u=X.getValueOrDefault(t.perPositionHeight,Qe.MINIMUM_VALUE,!1);r=$n.getGeometryHeight(r,a);let f;if(u?(l(r)&&(r=void 0,_t(ybe)),a!==nt.NONE&&u&&(r=void 0,_t(xbe))):(l(s)&&!l(r)&&(r=0),f=$n.computeGeometryOffsetAttribute(r,a,s,c)),i.polygonHierarchy=o,i.granularity=X.getValueOrUndefined(t.granularity,Qe.MINIMUM_VALUE),i.stRotation=X.getValueOrUndefined(t.stRotation,Qe.MINIMUM_VALUE),i.perPositionHeight=u,i.closeTop=X.getValueOrDefault(t.closeTop,Qe.MINIMUM_VALUE,!0),i.closeBottom=X.getValueOrDefault(t.closeBottom,Qe.MINIMUM_VALUE,!0),i.offsetAttribute=f,i.height=r,i.arcType=X.getValueOrDefault(t.arcType,Qe.MINIMUM_VALUE,on.GEODESIC),i.textureCoordinates=X.getValueOrUndefined(t.textureCoordinates,Qe.MINIMUM_VALUE),s=$n.getGeometryExtrudedHeight(s,c),s===$n.CLAMP_TO_GROUND){let d=hg.computeRectangleFromPositions(i.polygonHierarchy.positions,i.ellipsoid,i.arcType,Ebe);s=vi.getMinimumMaximumHeights(d).minimumTerrainHeight}i.extrudedHeight=s};jf.prototype._getIsClosed=function(e){let t=e.height,n=e.extrudedHeight,i=l(n)&&n!==t;return!e.perPositionHeight&&(!i&&t===0||i&&e.closeTop&&e.closeBottom)};jf.DynamicGeometryUpdater=rw;function rw(e,t,n){xi.call(this,e,t,n)}l(Object.create)&&(rw.prototype=Object.create(xi.prototype),rw.prototype.constructor=rw);rw.prototype._isHidden=function(e,t,n){return!l(this._options.polygonHierarchy)||xi.prototype._isHidden.call(this,e,t,n)};rw.prototype._setOptions=function(e,t,n){let i=this._options;i.polygonHierarchy=X.getValueOrUndefined(t.hierarchy,n);let o=X.getValueOrUndefined(t.height,n),r=X.getValueOrDefault(t.heightReference,n,nt.NONE),a=X.getValueOrDefault(t.extrudedHeightReference,n,nt.NONE),s=X.getValueOrUndefined(t.extrudedHeight,n),c=X.getValueOrUndefined(t.perPositionHeight,n);o=$n.getGeometryHeight(o,a);let u;if(c?(l(o)&&(o=void 0,_t(ybe)),r!==nt.NONE&&c&&(o=void 0,_t(xbe))):(l(s)&&!l(o)&&(o=0),u=$n.computeGeometryOffsetAttribute(o,r,s,a)),i.granularity=X.getValueOrUndefined(t.granularity,n),i.stRotation=X.getValueOrUndefined(t.stRotation,n),i.textureCoordinates=X.getValueOrUndefined(t.textureCoordinates,n),i.perPositionHeight=X.getValueOrUndefined(t.perPositionHeight,n),i.closeTop=X.getValueOrDefault(t.closeTop,n,!0),i.closeBottom=X.getValueOrDefault(t.closeBottom,n,!0),i.offsetAttribute=u,i.height=o,i.arcType=X.getValueOrDefault(t.arcType,n,on.GEODESIC),s=$n.getGeometryExtrudedHeight(s,a),s===$n.CLAMP_TO_GROUND){let f=hg.computeRectangleFromPositions(i.polygonHierarchy.positions,i.ellipsoid,i.arcType,Ebe);s=vi.getMinimumMaximumHeights(f).minimumTerrainHeight}i.extrudedHeight=s};var T2=jf;function odt(e,t,n,i){let o=new pn;i.position&&(o.position=new Me({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:e}));let r=t.length,a=e.length/3,s=(a-r*2)/(r*2),c=ni.triangulate(t),u=(s-1)*r*6+c.length*2,f=Ue.createTypedArray(a,u),d,p,g,m,A,y,x=r*2,b=0;for(d=0;d<s-1;d++){for(p=0;p<r-1;p++)g=p*2+d*r*2,y=g+x,m=g+1,A=m+x,f[b++]=m,f[b++]=g,f[b++]=A,f[b++]=A,f[b++]=g,f[b++]=y;g=r*2-2+d*r*2,m=g+1,A=m+x,y=g+x,f[b++]=m,f[b++]=g,f[b++]=A,f[b++]=A,f[b++]=g,f[b++]=y}if(i.st||i.tangent||i.bitangent){let S=new Float32Array(a*2),w=1/(s-1),P=1/n.height,R=n.height/2,B,L,_=0;for(d=0;d<s;d++){for(B=d*w,L=P*(t[0].y+R),S[_++]=B,S[_++]=L,p=1;p<r;p++)L=P*(t[p].y+R),S[_++]=B,S[_++]=L,S[_++]=B,S[_++]=L;L=P*(t[0].y+R),S[_++]=B,S[_++]=L}for(p=0;p<r;p++)B=0,L=P*(t[p].y+R),S[_++]=B,S[_++]=L;for(p=0;p<r;p++)B=(s-1)*w,L=P*(t[p].y+R),S[_++]=B,S[_++]=L;o.st=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:new Float32Array(S)})}let C=a-r*2;for(d=0;d<c.length;d+=3){let S=c[d]+C,w=c[d+1]+C,P=c[d+2]+C;f[b++]=S,f[b++]=w,f[b++]=P,f[b++]=P+r,f[b++]=w+r,f[b++]=S+r}let E=new At({attributes:o,indices:f,boundingSphere:ce.fromVertices(e),primitiveType:Re.TRIANGLES});if(i.normal&&(E=kn.computeNormal(E)),i.tangent||i.bitangent){try{E=kn.computeTangentAndBitangent(E)}catch{_t("polyline-volume-tangent-bitangent","Unable to compute tangents and bitangents for polyline volume geometry")}i.tangent||(E.attributes.tangent=void 0),i.bitangent||(E.attributes.bitangent=void 0),i.st||(E.attributes.st=void 0)}return E}function v2(e){e=e??G.EMPTY_OBJECT;let t=e.polylinePositions,n=e.shapePositions;this._positions=t,this._shape=n,this._ellipsoid=te.clone(e.ellipsoid??te.default),this._cornerType=e.cornerType??Xi.ROUNDED,this._vertexFormat=Ne.clone(e.vertexFormat??Ne.DEFAULT),this._granularity=e.granularity??D.RADIANS_PER_DEGREE,this._workerName="createPolylineVolumeGeometry";let i=1+t.length*h.packedLength;i+=1+n.length*z.packedLength,this.packedLength=i+te.packedLength+Ne.packedLength+2}v2.pack=function(e,t,n){n=n??0;let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=h.packedLength)h.pack(o[i],t,n);let a=e._shape;for(r=a.length,t[n++]=r,i=0;i<r;++i,n+=z.packedLength)z.pack(a[i],t,n);return te.pack(e._ellipsoid,t,n),n+=te.packedLength,Ne.pack(e._vertexFormat,t,n),n+=Ne.packedLength,t[n++]=e._cornerType,t[n]=e._granularity,t};var vbe=te.clone(te.UNIT_SPHERE),Sbe=new Ne,E2={polylinePositions:void 0,shapePositions:void 0,ellipsoid:vbe,vertexFormat:Sbe,cornerType:void 0,granularity:void 0};v2.unpack=function(e,t,n){t=t??0;let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=h.packedLength)r[i]=h.unpack(e,t);o=e[t++];let a=new Array(o);for(i=0;i<o;++i,t+=z.packedLength)a[i]=z.unpack(e,t);let s=te.unpack(e,t,vbe);t+=te.packedLength;let c=Ne.unpack(e,t,Sbe);t+=Ne.packedLength;let u=e[t++],f=e[t];return l(n)?(n._positions=r,n._shape=a,n._ellipsoid=te.clone(s,n._ellipsoid),n._vertexFormat=Ne.clone(c,n._vertexFormat),n._cornerType=u,n._granularity=f,n):(E2.polylinePositions=r,E2.shapePositions=a,E2.cornerType=u,E2.granularity=f,new v2(E2))};var rdt=new Je;v2.createGeometry=function(e){let t=e._positions,n=Fo(t,h.equalsEpsilon),i=e._shape;if(i=Am.removeDuplicatesFromShape(i),n.length<2||i.length<3)return;ni.computeWindingOrder2D(i)===Ya.CLOCKWISE&&i.reverse();let o=Je.fromPoints(i,rdt),r=Am.computePositions(n,i,o,e,!0);return odt(r,i,o,e._vertexFormat)};var S2=v2;function adt(e,t){let n=new pn;n.position=new Me({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:e});let i=t.length,o=n.position.values.length/3,a=e.length/3/i,s=Ue.createTypedArray(o,2*i*(a+1)),c,u,f=0;c=0;let d=c*i;for(u=0;u<i-1;u++)s[f++]=u+d,s[f++]=u+d+1;for(s[f++]=i-1+d,s[f++]=d,c=a-1,d=c*i,u=0;u<i-1;u++)s[f++]=u+d,s[f++]=u+d+1;for(s[f++]=i-1+d,s[f++]=d,c=0;c<a-1;c++){let g=i*c,m=g+i;for(u=0;u<i;u++)s[f++]=u+g,s[f++]=u+m}return new At({attributes:n,indices:Ue.createTypedArray(o,s),boundingSphere:ce.fromVertices(e),primitiveType:Re.LINES})}function I2(e){e=e??G.EMPTY_OBJECT;let t=e.polylinePositions,n=e.shapePositions;this._positions=t,this._shape=n,this._ellipsoid=te.clone(e.ellipsoid??te.default),this._cornerType=e.cornerType??Xi.ROUNDED,this._granularity=e.granularity??D.RADIANS_PER_DEGREE,this._workerName="createPolylineVolumeOutlineGeometry";let i=1+t.length*h.packedLength;i+=1+n.length*z.packedLength,this.packedLength=i+te.packedLength+2}I2.pack=function(e,t,n){n=n??0;let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=h.packedLength)h.pack(o[i],t,n);let a=e._shape;for(r=a.length,t[n++]=r,i=0;i<r;++i,n+=z.packedLength)z.pack(a[i],t,n);return te.pack(e._ellipsoid,t,n),n+=te.packedLength,t[n++]=e._cornerType,t[n]=e._granularity,t};var wbe=te.clone(te.UNIT_SPHERE),w2={polylinePositions:void 0,shapePositions:void 0,ellipsoid:wbe,height:void 0,cornerType:void 0,granularity:void 0};I2.unpack=function(e,t,n){t=t??0;let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=h.packedLength)r[i]=h.unpack(e,t);o=e[t++];let a=new Array(o);for(i=0;i<o;++i,t+=z.packedLength)a[i]=z.unpack(e,t);let s=te.unpack(e,t,wbe);t+=te.packedLength;let c=e[t++],u=e[t];return l(n)?(n._positions=r,n._shape=a,n._ellipsoid=te.clone(s,n._ellipsoid),n._cornerType=c,n._granularity=u,n):(w2.polylinePositions=r,w2.shapePositions=a,w2.cornerType=c,w2.granularity=u,new I2(w2))};var sdt=new Je;I2.createGeometry=function(e){let t=e._positions,n=Fo(t,h.equalsEpsilon),i=e._shape;if(i=Am.removeDuplicatesFromShape(i),n.length<2||i.length<3)return;ni.computeWindingOrder2D(i)===Ya.CLOCKWISE&&i.reverse();let o=Je.fromPoints(i,sdt),r=Am.computePositions(n,i,o,e,!1);return adt(r,i)};var D2=I2;var Ibe=new V;function cdt(e){this.id=e,this.vertexFormat=void 0,this.polylinePositions=void 0,this.shapePositions=void 0,this.cornerType=void 0,this.granularity=void 0}function Vp(e,t){bi.call(this,{entity:e,scene:t,geometryOptions:new cdt(e),geometryPropertyName:"polylineVolume",observedPropertyNames:["availability","polylineVolume"]}),this._onEntityPropertyChanged(e,"polylineVolume",e.polylineVolume,void 0)}l(Object.create)&&(Vp.prototype=Object.create(bi.prototype),Vp.prototype.constructor=Vp);Vp.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i,o,r=new En(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),a=this._distanceDisplayConditionProperty.getValue(e),s=Hn.fromDistanceDisplayCondition(a);if(this._materialProperty instanceof Wt){let c;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(c=this._materialProperty.color.getValue(e,Ibe)),l(c)||(c=V.WHITE),o=Yt.fromColor(c),i={show:r,distanceDisplayCondition:s,color:o}}else i={show:r,distanceDisplayCondition:s};return new Ot({id:t,geometry:new S2(this._options),attributes:i})};Vp.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=X.getValueOrDefault(this._outlineColorProperty,e,V.BLACK,Ibe),o=this._distanceDisplayConditionProperty.getValue(e);return new Ot({id:t,geometry:new D2(this._options),attributes:{show:new En(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Yt.fromColor(i),distanceDisplayCondition:Hn.fromDistanceDisplayCondition(o)}})};Vp.prototype._isHidden=function(e,t){return!l(t.positions)||!l(t.shape)||bi.prototype._isHidden.call(this,e,t)};Vp.prototype._isDynamic=function(e,t){return!t.positions.isConstant||!t.shape.isConstant||!X.isConstant(t.granularity)||!X.isConstant(t.outlineWidth)||!X.isConstant(t.cornerType)};Vp.prototype._setStaticOptions=function(e,t){let n=t.granularity,i=t.cornerType,o=this._options,r=this._materialProperty instanceof Wt;o.vertexFormat=r?dn.VERTEX_FORMAT:go.MaterialSupport.TEXTURED.vertexFormat,o.polylinePositions=t.positions.getValue(Qe.MINIMUM_VALUE,o.polylinePositions),o.shapePositions=t.shape.getValue(Qe.MINIMUM_VALUE,o.shape),o.granularity=l(n)?n.getValue(Qe.MINIMUM_VALUE):void 0,o.cornerType=l(i)?i.getValue(Qe.MINIMUM_VALUE):void 0};Vp.DynamicGeometryUpdater=aw;function aw(e,t,n){xi.call(this,e,t,n)}l(Object.create)&&(aw.prototype=Object.create(xi.prototype),aw.prototype.constructor=aw);aw.prototype._isHidden=function(e,t,n){let i=this._options;return!l(i.polylinePositions)||!l(i.shapePositions)||xi.prototype._isHidden.call(this,e,t,n)};aw.prototype._setOptions=function(e,t,n){let i=this._options;i.polylinePositions=X.getValueOrUndefined(t.positions,n,i.polylinePositions),i.shapePositions=X.getValueOrUndefined(t.shape,n),i.granularity=X.getValueOrUndefined(t.granularity,n),i.cornerType=X.getValueOrUndefined(t.cornerType,n)};var P2=Vp;var aJ=new h,Rbe=new h,Obe=new h,Mbe=new h,Bbe=new oe,ldt=new z,udt=new ce,fdt=new ce;function Lbe(e,t){let n=new At({attributes:new pn,primitiveType:Re.TRIANGLES});return n.attributes.position=new Me({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:t.positions}),e.normal&&(n.attributes.normal=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:t.normals})),e.tangent&&(n.attributes.tangent=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:t.tangents})),e.bitangent&&(n.attributes.bitangent=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:t.bitangents})),n}function ddt(e,t,n,i){let o=e.length,r=t.normal?new Float32Array(o):void 0,a=t.tangent?new Float32Array(o):void 0,s=t.bitangent?new Float32Array(o):void 0,c=0,u=Mbe,f=Obe,d=Rbe;if(t.normal||t.tangent||t.bitangent)for(let p=0;p<o;p+=3){let g=h.fromArray(e,p,aJ),m=c+1,A=c+2;d=n.geodeticSurfaceNormal(g,d),(t.tangent||t.bitangent)&&(h.cross(h.UNIT_Z,d,f),$.multiplyByVector(i,f,f),h.normalize(f,f),t.bitangent&&h.normalize(h.cross(d,f,u),u)),t.normal&&(r[c]=d.x,r[m]=d.y,r[A]=d.z),t.tangent&&(a[c]=f.x,a[m]=f.y,a[A]=f.z),t.bitangent&&(s[c]=u.x,s[m]=u.y,s[A]=u.z),c+=3}return Lbe(t,{positions:e,normals:r,tangents:a,bitangents:s})}var sJ=new h,Nbe=new h;function hdt(e,t,n){let i=e.length,o=t.normal?new Float32Array(i):void 0,r=t.tangent?new Float32Array(i):void 0,a=t.bitangent?new Float32Array(i):void 0,s=0,c=0,u=0,f=!0,d=Mbe,p=Obe,g=Rbe;if(t.normal||t.tangent||t.bitangent)for(let m=0;m<i;m+=6){let A=h.fromArray(e,m,aJ),y=h.fromArray(e,(m+6)%i,sJ);if(f){let x=h.fromArray(e,(m+3)%i,Nbe);h.subtract(y,A,y),h.subtract(x,A,x),g=h.normalize(h.cross(x,y,g),g),f=!1}h.equalsEpsilon(y,A,D.EPSILON10)&&(f=!0),(t.tangent||t.bitangent)&&(d=n.geodeticSurfaceNormal(A,d),t.tangent&&(p=h.normalize(h.cross(d,g,p),p))),t.normal&&(o[s++]=g.x,o[s++]=g.y,o[s++]=g.z,o[s++]=g.x,o[s++]=g.y,o[s++]=g.z),t.tangent&&(r[c++]=p.x,r[c++]=p.y,r[c++]=p.z,r[c++]=p.x,r[c++]=p.y,r[c++]=p.z),t.bitangent&&(a[u++]=d.x,a[u++]=d.y,a[u++]=d.z,a[u++]=d.x,a[u++]=d.y,a[u++]=d.z)}return Lbe(t,{positions:e,normals:o,tangents:r,bitangents:a})}function Fbe(e,t){let n=e._vertexFormat,i=e._ellipsoid,o=t.height,r=t.width,a=t.northCap,s=t.southCap,c=0,u=o,f=o,d=0;a&&(c=1,f-=1,d+=1),s&&(u-=1,f-=1,d+=1),d+=r*f;let p=n.position?new Float64Array(d*3):void 0,g=n.st?new Float32Array(d*2):void 0,m=0,A=0,y=aJ,x=ldt,b=Number.MAX_VALUE,C=Number.MAX_VALUE,E=-Number.MAX_VALUE,S=-Number.MAX_VALUE;for(let T=c;T<u;++T)for(let v=0;v<r;++v)xs.computePosition(t,i,n.st,T,v,y,x),p[m++]=y.x,p[m++]=y.y,p[m++]=y.z,n.st&&(g[A++]=x.x,g[A++]=x.y,b=Math.min(b,x.x),C=Math.min(C,x.y),E=Math.max(E,x.x),S=Math.max(S,x.y));if(a&&(xs.computePosition(t,i,n.st,0,0,y,x),p[m++]=y.x,p[m++]=y.y,p[m++]=y.z,n.st&&(g[A++]=x.x,g[A++]=x.y,b=x.x,C=x.y,E=x.x,S=x.y)),s&&(xs.computePosition(t,i,n.st,o-1,0,y,x),p[m++]=y.x,p[m++]=y.y,p[m]=y.z,n.st&&(g[A++]=x.x,g[A]=x.y,b=Math.min(b,x.x),C=Math.min(C,x.y),E=Math.max(E,x.x),S=Math.max(S,x.y))),n.st&&(b<0||C<0||E>1||S>1))for(let T=0;T<g.length;T+=2)g[T]=(g[T]-b)/(E-b),g[T+1]=(g[T+1]-C)/(S-C);let w=ddt(p,n,i,t.tangentRotationMatrix),P=6*(r-1)*(f-1);a&&(P+=3*(r-1)),s&&(P+=3*(r-1));let R=Ue.createTypedArray(d,P),B=0,L=0,_;for(_=0;_<f-1;++_){for(let T=0;T<r-1;++T){let v=B,I=v+r,O=I+1,N=v+1;R[L++]=v,R[L++]=I,R[L++]=N,R[L++]=N,R[L++]=I,R[L++]=O,++B}++B}if(a||s){let T=d-1,v=d-1;a&&s&&(T=d-2);let I,O;if(B=0,a)for(_=0;_<r-1;_++)I=B,O=I+1,R[L++]=T,R[L++]=I,R[L++]=O,++B;if(s)for(B=(f-1)*r,_=0;_<r-1;_++)I=B,O=I+1,R[L++]=I,R[L++]=v,R[L++]=O,++B}return w.indices=R,n.st&&(w.attributes.st=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:g})),w}function sw(e,t,n,i,o){return e[t++]=i[n],e[t++]=i[n+1],e[t++]=i[n+2],e[t++]=o[n],e[t++]=o[n+1],e[t]=o[n+2],e}function cw(e,t,n,i){return e[t++]=i[n],e[t++]=i[n+1],e[t++]=i[n],e[t]=i[n+1],e}var cJ=new Ne;function mdt(e,t){let n=e._shadowVolume,i=e._offsetAttribute,o=e._vertexFormat,r=e._extrudedHeight,a=e._surfaceHeight,s=e._ellipsoid,c=t.height,u=t.width,f;if(n){let Pe=Ne.clone(o,cJ);Pe.normal=!0,e._vertexFormat=Pe}let d=Fbe(e,t);n&&(e._vertexFormat=o);let p=ni.scaleToGeodeticHeight(d.attributes.position.values,a,s,!1);p=new Float64Array(p);let g=p.length,m=g*2,A=new Float64Array(m);A.set(p);let y=ni.scaleToGeodeticHeight(d.attributes.position.values,r,s);A.set(y,g),d.attributes.position.values=A;let x=o.normal?new Float32Array(m):void 0,b=o.tangent?new Float32Array(m):void 0,C=o.bitangent?new Float32Array(m):void 0,E=o.st?new Float32Array(m/3*2):void 0,S,w;if(o.normal){for(w=d.attributes.normal.values,x.set(w),f=0;f<g;f++)w[f]=-w[f];x.set(w,g),d.attributes.normal.values=x}if(n){w=d.attributes.normal.values,o.normal||(d.attributes.normal=void 0);let Pe=new Float32Array(m);for(f=0;f<g;f++)w[f]=-w[f];Pe.set(w,g),d.attributes.extrudeDirection=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:Pe})}let P,R=l(i);if(R){let Pe=g/3*2,Ye=new Uint8Array(Pe);i===ln.TOP?Ye=Ye.fill(1,0,Pe/2):(P=i===ln.NONE?0:1,Ye=Ye.fill(P)),d.attributes.applyOffset=new Me({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:Ye})}if(o.tangent){let Pe=d.attributes.tangent.values;for(b.set(Pe),f=0;f<g;f++)Pe[f]=-Pe[f];b.set(Pe,g),d.attributes.tangent.values=b}if(o.bitangent){let Pe=d.attributes.bitangent.values;C.set(Pe),C.set(Pe,g),d.attributes.bitangent.values=C}o.st&&(S=d.attributes.st.values,E.set(S),E.set(S,g/3*2),d.attributes.st.values=E);let B=d.indices,L=B.length,_=g/3,T=Ue.createTypedArray(m/3,L*2);for(T.set(B),f=0;f<L;f+=3)T[f+L]=B[f+2]+_,T[f+1+L]=B[f+1]+_,T[f+2+L]=B[f]+_;d.indices=T;let v=t.northCap,I=t.southCap,O=c,N=2,j=0,k=4,U=4;v&&(N-=1,O-=1,j+=1,k-=2,U-=1),I&&(N-=1,O-=1,j+=1,k-=2,U-=1),j+=N*u+2*O-k;let F=(j+U)*2,H=new Float64Array(F*3),q=n?new Float32Array(F*3):void 0,J=R?new Uint8Array(F):void 0,W=o.st?new Float32Array(F*2):void 0,Z=i===ln.TOP;R&&!Z&&(P=i===ln.ALL?1:0,J=J.fill(P));let K=0,le=0,me=0,ae=0,be=u*O,ge;for(f=0;f<be;f+=u)ge=f*3,H=sw(H,K,ge,p,y),K+=6,o.st&&(W=cw(W,le,f*2,S),le+=4),n&&(me+=3,q[me++]=w[ge],q[me++]=w[ge+1],q[me++]=w[ge+2]),Z&&(J[ae++]=1,ae+=1);if(I){let Pe=v?be+1:be;for(ge=Pe*3,f=0;f<2;f++)H=sw(H,K,ge,p,y),K+=6,o.st&&(W=cw(W,le,Pe*2,S),le+=4),n&&(me+=3,q[me++]=w[ge],q[me++]=w[ge+1],q[me++]=w[ge+2]),Z&&(J[ae++]=1,ae+=1)}else for(f=be-u;f<be;f++)ge=f*3,H=sw(H,K,ge,p,y),K+=6,o.st&&(W=cw(W,le,f*2,S),le+=4),n&&(me+=3,q[me++]=w[ge],q[me++]=w[ge+1],q[me++]=w[ge+2]),Z&&(J[ae++]=1,ae+=1);for(f=be-1;f>0;f-=u)ge=f*3,H=sw(H,K,ge,p,y),K+=6,o.st&&(W=cw(W,le,f*2,S),le+=4),n&&(me+=3,q[me++]=w[ge],q[me++]=w[ge+1],q[me++]=w[ge+2]),Z&&(J[ae++]=1,ae+=1);if(v){let Pe=be;for(ge=Pe*3,f=0;f<2;f++)H=sw(H,K,ge,p,y),K+=6,o.st&&(W=cw(W,le,Pe*2,S),le+=4),n&&(me+=3,q[me++]=w[ge],q[me++]=w[ge+1],q[me++]=w[ge+2]),Z&&(J[ae++]=1,ae+=1)}else for(f=u-1;f>=0;f--)ge=f*3,H=sw(H,K,ge,p,y),K+=6,o.st&&(W=cw(W,le,f*2,S),le+=4),n&&(me+=3,q[me++]=w[ge],q[me++]=w[ge+1],q[me++]=w[ge+2]),Z&&(J[ae++]=1,ae+=1);let we=hdt(H,o,s);o.st&&(we.attributes.st=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:W})),n&&(we.attributes.extrudeDirection=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:q})),R&&(we.attributes.applyOffset=new Me({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:J}));let Ee=Ue.createTypedArray(F,j*6),Be,ke,Ge,rt;g=H.length/3;let et=0;for(f=0;f<g-1;f+=2){Be=f,rt=(Be+2)%g;let Pe=h.fromArray(H,Be*3,sJ),Ye=h.fromArray(H,rt*3,Nbe);h.equalsEpsilon(Pe,Ye,D.EPSILON10)||(ke=(Be+1)%g,Ge=(ke+2)%g,Ee[et++]=Be,Ee[et++]=ke,Ee[et++]=rt,Ee[et++]=rt,Ee[et++]=ke,Ee[et++]=Ge)}return we.indices=Ee,we=kn.combineInstances([new Ot({geometry:d}),new Ot({geometry:we})]),we[0]}var pdt=[new h,new h,new h,new h],kbe=new de,gdt=new de;function lJ(e,t,n,i,o){if(n===0)return oe.clone(e,o);let r=xs.computeOptions(e,t,n,0,Bbe,kbe),a=r.height,s=r.width,c=pdt;return xs.computePosition(r,i,!1,0,0,c[0]),xs.computePosition(r,i,!1,0,s-1,c[1]),xs.computePosition(r,i,!1,a-1,0,c[2]),xs.computePosition(r,i,!1,a-1,s-1,c[3]),oe.fromCartesianArray(c,i,o)}function jp(e){e=e??G.EMPTY_OBJECT;let t=e.rectangle,n=e.height??0,i=e.extrudedHeight??n;this._rectangle=oe.clone(t),this._granularity=e.granularity??D.RADIANS_PER_DEGREE,this._ellipsoid=te.clone(e.ellipsoid??te.default),this._surfaceHeight=Math.max(n,i),this._rotation=e.rotation??0,this._stRotation=e.stRotation??0,this._vertexFormat=Ne.clone(e.vertexFormat??Ne.DEFAULT),this._extrudedHeight=Math.min(n,i),this._shadowVolume=e.shadowVolume??!1,this._workerName="createRectangleGeometry",this._offsetAttribute=e.offsetAttribute,this._rotatedRectangle=void 0,this._textureCoordinateRotationPoints=void 0}jp.packedLength=oe.packedLength+te.packedLength+Ne.packedLength+7;jp.pack=function(e,t,n){return n=n??0,oe.pack(e._rectangle,t,n),n+=oe.packedLength,te.pack(e._ellipsoid,t,n),n+=te.packedLength,Ne.pack(e._vertexFormat,t,n),n+=Ne.packedLength,t[n++]=e._granularity,t[n++]=e._surfaceHeight,t[n++]=e._rotation,t[n++]=e._stRotation,t[n++]=e._extrudedHeight,t[n++]=e._shadowVolume?1:0,t[n]=e._offsetAttribute??-1,t};var zbe=new oe,Ube=te.clone(te.UNIT_SPHERE),_y={rectangle:zbe,ellipsoid:Ube,vertexFormat:cJ,granularity:void 0,height:void 0,rotation:void 0,stRotation:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};jp.unpack=function(e,t,n){t=t??0;let i=oe.unpack(e,t,zbe);t+=oe.packedLength;let o=te.unpack(e,t,Ube);t+=te.packedLength;let r=Ne.unpack(e,t,cJ);t+=Ne.packedLength;let a=e[t++],s=e[t++],c=e[t++],u=e[t++],f=e[t++],d=e[t++]===1,p=e[t];return l(n)?(n._rectangle=oe.clone(i,n._rectangle),n._ellipsoid=te.clone(o,n._ellipsoid),n._vertexFormat=Ne.clone(r,n._vertexFormat),n._granularity=a,n._surfaceHeight=s,n._rotation=c,n._stRotation=u,n._extrudedHeight=f,n._shadowVolume=d,n._offsetAttribute=p===-1?void 0:p,n):(_y.granularity=a,_y.height=s,_y.rotation=c,_y.stRotation=u,_y.extrudedHeight=f,_y.shadowVolume=d,_y.offsetAttribute=p===-1?void 0:p,new jp(_y))};jp.computeRectangle=function(e,t){e=e??G.EMPTY_OBJECT;let n=e.rectangle,i=e.granularity??D.RADIANS_PER_DEGREE,o=e.ellipsoid??te.default,r=e.rotation??0;return lJ(n,i,r,o,t)};var _dt=new $,Dbe=new Le,Adt=new de;jp.createGeometry=function(e){if(D.equalsEpsilon(e._rectangle.north,e._rectangle.south,D.EPSILON10)||D.equalsEpsilon(e._rectangle.east,e._rectangle.west,D.EPSILON10))return;let t=e._rectangle,n=e._ellipsoid,i=e._rotation,o=e._stRotation,r=e._vertexFormat,a=xs.computeOptions(t,e._granularity,i,o,Bbe,kbe,gdt),s=_dt;if(o!==0||i!==0){let g=oe.center(t,Adt),m=n.geodeticSurfaceNormalCartographic(g,sJ);Le.fromAxisAngle(m,-o,Dbe),$.fromQuaternion(Dbe,s)}else $.clone($.IDENTITY,s);let c=e._surfaceHeight,u=e._extrudedHeight,f=!D.equalsEpsilon(c,u,0,D.EPSILON2);a.lonScalar=1/e._rectangle.width,a.latScalar=1/e._rectangle.height,a.tangentRotationMatrix=s;let d,p;if(t=e._rectangle,f){d=mdt(e,a);let g=ce.fromRectangle3D(t,n,c,fdt),m=ce.fromRectangle3D(t,n,u,udt);p=ce.union(g,m)}else{if(d=Fbe(e,a),d.attributes.position.values=ni.scaleToGeodeticHeight(d.attributes.position.values,c,n,!1),l(e._offsetAttribute)){let g=d.attributes.position.values.length,m=e._offsetAttribute===ln.NONE?0:1,A=new Uint8Array(g/3).fill(m);d.attributes.applyOffset=new Me({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:A})}p=ce.fromRectangle3D(t,n,c)}return r.position||delete d.attributes.position,new At({attributes:d.attributes,indices:d.indices,primitiveType:d.primitiveType,boundingSphere:p,offsetAttribute:e._offsetAttribute})};jp.createShadowVolume=function(e,t,n){let i=e._granularity,o=e._ellipsoid,r=t(i,o),a=n(i,o);return new jp({rectangle:e._rectangle,rotation:e._rotation,ellipsoid:o,stRotation:e._stRotation,granularity:i,extrudedHeight:a,height:r,vertexFormat:Ne.POSITION_ONLY,shadowVolume:!0})};var Pbe=new oe,ydt=[new z,new z,new z],xdt=new Gi,bdt=new de;function Cdt(e){if(e._stRotation===0)return[0,0,0,1,1,0];let t=oe.clone(e._rectangle,Pbe),n=e._granularity,i=e._ellipsoid,o=e._rotation-e._stRotation,r=lJ(t,n,o,i,Pbe),a=ydt;a[0].x=r.west,a[0].y=r.south,a[1].x=r.west,a[1].y=r.north,a[2].x=r.east,a[2].y=r.south;let s=e.rectangle,c=Gi.fromRotation(e._stRotation,xdt),u=oe.center(s,bdt);for(let m=0;m<3;++m){let A=a[m];A.x-=u.longitude,A.y-=u.latitude,Gi.multiplyByVector(c,A,A),A.x+=u.longitude,A.y+=u.latitude,A.x=(A.x-s.west)/s.width,A.y=(A.y-s.south)/s.height}let f=a[0],d=a[1],p=a[2],g=new Array(6);return z.pack(f,g),z.pack(d,g,2),z.pack(p,g,4),g}Object.defineProperties(jp.prototype,{rectangle:{get:function(){return l(this._rotatedRectangle)||(this._rotatedRectangle=lJ(this._rectangle,this._granularity,this._rotation,this._ellipsoid)),this._rotatedRectangle}},textureCoordinateRotationPoints:{get:function(){return l(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=Cdt(this)),this._textureCoordinateRotationPoints}}});var RC=jp;var Vbe=new V,jbe=h.ZERO,Gbe=new h,Hbe=new oe,Tdt=new oe,Edt=new de;function vdt(e){this.id=e,this.vertexFormat=void 0,this.rectangle=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.rotation=void 0,this.offsetAttribute=void 0}function wm(e,t){$n.call(this,{entity:e,scene:t,geometryOptions:new vdt(e),geometryPropertyName:"rectangle",observedPropertyNames:["availability","rectangle"]}),this._onEntityPropertyChanged(e,"rectangle",e.rectangle,void 0)}l(Object.create)&&(wm.prototype=Object.create($n.prototype),wm.prototype.constructor=wm);wm.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i={show:new En(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:Hn.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};if(this._materialProperty instanceof Wt){let o;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(o=this._materialProperty.color.getValue(e,Vbe)),l(o)||(o=V.WHITE),i.color=Yt.fromColor(o)}return l(this._options.offsetAttribute)&&(i.offset=po.fromCartesian3(X.getValueOrDefault(this._terrainOffsetProperty,e,jbe,Gbe))),new Ot({id:t,geometry:new RC(this._options),attributes:i})};wm.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=X.getValueOrDefault(this._outlineColorProperty,e,V.BLACK,Vbe),o=this._distanceDisplayConditionProperty.getValue(e),r={show:new En(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Yt.fromColor(i),distanceDisplayCondition:Hn.fromDistanceDisplayCondition(o),offset:void 0};return l(this._options.offsetAttribute)&&(r.offset=po.fromCartesian3(X.getValueOrDefault(this._terrainOffsetProperty,e,jbe,Gbe))),new Ot({id:t,geometry:new aC(this._options),attributes:r})};wm.prototype._computeCenter=function(e,t){let n=X.getValueOrUndefined(this._entity.rectangle.coordinates,e,Tdt);if(!l(n))return;let i=oe.center(n,Edt);return de.toCartesian(i,te.default,t)};wm.prototype._isHidden=function(e,t){return!l(t.coordinates)||bi.prototype._isHidden.call(this,e,t)};wm.prototype._isDynamic=function(e,t){return!t.coordinates.isConstant||!X.isConstant(t.height)||!X.isConstant(t.extrudedHeight)||!X.isConstant(t.granularity)||!X.isConstant(t.stRotation)||!X.isConstant(t.rotation)||!X.isConstant(t.outlineWidth)||!X.isConstant(t.zIndex)||this._onTerrain&&!X.isConstant(this._materialProperty)&&!(this._materialProperty instanceof Wt)};wm.prototype._setStaticOptions=function(e,t){let n=this._materialProperty instanceof Wt,i=X.getValueOrUndefined(t.height,Qe.MINIMUM_VALUE),o=X.getValueOrDefault(t.heightReference,Qe.MINIMUM_VALUE,nt.NONE),r=X.getValueOrUndefined(t.extrudedHeight,Qe.MINIMUM_VALUE),a=X.getValueOrDefault(t.extrudedHeightReference,Qe.MINIMUM_VALUE,nt.NONE);l(r)&&!l(i)&&(i=0);let s=this._options;s.vertexFormat=n?dn.VERTEX_FORMAT:go.MaterialSupport.TEXTURED.vertexFormat,s.rectangle=t.coordinates.getValue(Qe.MINIMUM_VALUE,s.rectangle),s.granularity=X.getValueOrUndefined(t.granularity,Qe.MINIMUM_VALUE),s.stRotation=X.getValueOrUndefined(t.stRotation,Qe.MINIMUM_VALUE),s.rotation=X.getValueOrUndefined(t.rotation,Qe.MINIMUM_VALUE),s.offsetAttribute=$n.computeGeometryOffsetAttribute(i,o,r,a),s.height=$n.getGeometryHeight(i,o),r=$n.getGeometryExtrudedHeight(r,a),r===$n.CLAMP_TO_GROUND&&(r=vi.getMinimumMaximumHeights(RC.computeRectangle(s,Hbe)).minimumTerrainHeight),s.extrudedHeight=r};wm.DynamicGeometryUpdater=lw;function lw(e,t,n){xi.call(this,e,t,n)}l(Object.create)&&(lw.prototype=Object.create(xi.prototype),lw.prototype.constructor=lw);lw.prototype._isHidden=function(e,t,n){return!l(this._options.rectangle)||xi.prototype._isHidden.call(this,e,t,n)};lw.prototype._setOptions=function(e,t,n){let i=this._options,o=X.getValueOrUndefined(t.height,n),r=X.getValueOrDefault(t.heightReference,n,nt.NONE),a=X.getValueOrUndefined(t.extrudedHeight,n),s=X.getValueOrDefault(t.extrudedHeightReference,n,nt.NONE);l(a)&&!l(o)&&(o=0),i.rectangle=X.getValueOrUndefined(t.coordinates,n,i.rectangle),i.granularity=X.getValueOrUndefined(t.granularity,n),i.stRotation=X.getValueOrUndefined(t.stRotation,n),i.rotation=X.getValueOrUndefined(t.rotation,n),i.offsetAttribute=$n.computeGeometryOffsetAttribute(o,r,a,s),i.height=$n.getGeometryHeight(o,r),a=$n.getGeometryExtrudedHeight(a,s),a===$n.CLAMP_TO_GROUND&&(a=vi.getMinimumMaximumHeights(RC.computeRectangle(i,Hbe)).minimumTerrainHeight),i.extrudedHeight=a};var R2=wm;var Wbe={};function Sdt(e,t){return D.equalsEpsilon(e.latitude,t.latitude,D.EPSILON10)&&D.equalsEpsilon(e.longitude,t.longitude,D.EPSILON10)}var wdt=new de,Idt=new de;function Ddt(e,t,n,i){t=Fo(t,h.equalsEpsilon);let o=t.length;if(o<2)return;let r=l(i),a=l(n),s=new Array(o),c=new Array(o),u=new Array(o),f=t[0];s[0]=f;let d=e.cartesianToCartographic(f,wdt);a&&(d.height=n[0]),c[0]=d.height,r?u[0]=i[0]:u[0]=0;let p=c[0],g=u[0],m=p===g,A=1;for(let y=1;y<o;++y){let x=t[y],b=e.cartesianToCartographic(x,Idt);a&&(b.height=n[y]),m=m&&b.height===0,Sdt(d,b)?d.height<b.height&&(c[A-1]=b.height):(s[A]=x,c[A]=b.height,r?u[A]=i[y]:u[A]=0,m=m&&c[A]===u[A],de.clone(b,d),++A)}if(!(m||A<2))return s.length=A,c.length=A,u.length=A,{positions:s,topHeights:c,bottomHeights:u}}var Pdt=new Array(2),Rdt=new Array(2),Odt={positions:void 0,height:void 0,granularity:void 0,ellipsoid:void 0};Wbe.computePositions=function(e,t,n,i,o,r){let a=Ddt(e,t,n,i);if(!l(a))return;t=a.positions,n=a.topHeights,i=a.bottomHeights;let s=t.length,c=s-2,u,f,d=D.chordLength(o,e.maximumRadius),p=Odt;if(p.minDistance=d,p.ellipsoid=e,r){let g=0,m;for(m=0;m<s-1;m++)g+=Yi.numberOfPoints(t[m],t[m+1],d)+1;u=new Float64Array(g*3),f=new Float64Array(g*3);let A=Pdt,y=Rdt;p.positions=A,p.height=y;let x=0;for(m=0;m<s-1;m++){A[0]=t[m],A[1]=t[m+1],y[0]=n[m],y[1]=n[m+1];let b=Yi.generateArc(p);u.set(b,x),y[0]=i[m],y[1]=i[m+1],f.set(Yi.generateArc(p),x),x+=b.length}}else p.positions=t,p.height=n,u=new Float64Array(Yi.generateArc(p)),p.height=i,f=new Float64Array(Yi.generateArc(p));return{bottomPositions:f,topPositions:u,numCorners:c}};var OC=Wbe;var uJ=new h,KG=new h,Mdt=new h,qbe=new h,Bdt=new h,Ldt=new h,Ndt=new h;function MC(e){e=e??G.EMPTY_OBJECT;let t=e.positions,n=e.maximumHeights,i=e.minimumHeights,o=e.vertexFormat??Ne.DEFAULT,r=e.granularity??D.RADIANS_PER_DEGREE,a=e.ellipsoid??te.default;this._positions=t,this._minimumHeights=i,this._maximumHeights=n,this._vertexFormat=Ne.clone(o),this._granularity=r,this._ellipsoid=te.clone(a),this._workerName="createWallGeometry";let s=1+t.length*h.packedLength+2;l(i)&&(s+=i.length),l(n)&&(s+=n.length),this.packedLength=s+te.packedLength+Ne.packedLength+1}MC.pack=function(e,t,n){n=n??0;let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=h.packedLength)h.pack(o[i],t,n);let a=e._minimumHeights;if(r=l(a)?a.length:0,t[n++]=r,l(a))for(i=0;i<r;++i)t[n++]=a[i];let s=e._maximumHeights;if(r=l(s)?s.length:0,t[n++]=r,l(s))for(i=0;i<r;++i)t[n++]=s[i];return te.pack(e._ellipsoid,t,n),n+=te.packedLength,Ne.pack(e._vertexFormat,t,n),n+=Ne.packedLength,t[n]=e._granularity,t};var Ybe=te.clone(te.UNIT_SPHERE),Xbe=new Ne,O2={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:Ybe,vertexFormat:Xbe,granularity:void 0};MC.unpack=function(e,t,n){t=t??0;let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=h.packedLength)r[i]=h.unpack(e,t);o=e[t++];let a;if(o>0)for(a=new Array(o),i=0;i<o;++i)a[i]=e[t++];o=e[t++];let s;if(o>0)for(s=new Array(o),i=0;i<o;++i)s[i]=e[t++];let c=te.unpack(e,t,Ybe);t+=te.packedLength;let u=Ne.unpack(e,t,Xbe);t+=Ne.packedLength;let f=e[t];return l(n)?(n._positions=r,n._minimumHeights=a,n._maximumHeights=s,n._ellipsoid=te.clone(c,n._ellipsoid),n._vertexFormat=Ne.clone(u,n._vertexFormat),n._granularity=f,n):(O2.positions=r,O2.minimumHeights=a,O2.maximumHeights=s,O2.granularity=f,new MC(O2))};MC.fromConstantHeights=function(e){e=e??G.EMPTY_OBJECT;let t=e.positions,n,i,o=e.minimumHeight,r=e.maximumHeight,a=l(o),s=l(r);if(a||s){let u=t.length;n=a?new Array(u):void 0,i=s?new Array(u):void 0;for(let f=0;f<u;++f)a&&(n[f]=o),s&&(i[f]=r)}let c={positions:t,maximumHeights:i,minimumHeights:n,ellipsoid:e.ellipsoid,vertexFormat:e.vertexFormat};return new MC(c)};MC.createGeometry=function(e){let t=e._positions,n=e._minimumHeights,i=e._maximumHeights,o=e._vertexFormat,r=e._granularity,a=e._ellipsoid,s=OC.computePositions(a,t,i,n,r,!0);if(!l(s))return;let c=s.bottomPositions,u=s.topPositions,f=s.numCorners,d=u.length,p=d*2,g=o.position?new Float64Array(p):void 0,m=o.normal?new Float32Array(p):void 0,A=o.tangent?new Float32Array(p):void 0,y=o.bitangent?new Float32Array(p):void 0,x=o.st?new Float32Array(p/3*2):void 0,b=0,C=0,E=0,S=0,w=0,P=Ndt,R=Ldt,B=Bdt,L=!0;d/=3;let _,T=0,v=1/(d-f-1);for(_=0;_<d;++_){let k=_*3,U=h.fromArray(u,k,uJ),F=h.fromArray(c,k,KG);if(o.position&&(g[b++]=F.x,g[b++]=F.y,g[b++]=F.z,g[b++]=U.x,g[b++]=U.y,g[b++]=U.z),o.st&&(x[w++]=T,x[w++]=0,x[w++]=T,x[w++]=1),o.normal||o.tangent||o.bitangent){let H=h.clone(h.ZERO,qbe),q=h.subtract(U,a.geodeticSurfaceNormal(U,KG),KG);if(_+1<d&&(H=h.fromArray(u,k+3,qbe)),L){let J=h.subtract(H,U,Mdt),W=h.subtract(q,U,uJ);P=h.normalize(h.cross(W,J,P),P),L=!1}h.equalsEpsilon(U,H,D.EPSILON10)?L=!0:(T+=v,o.tangent&&(R=h.normalize(h.subtract(H,U,R),R)),o.bitangent&&(B=h.normalize(h.cross(P,R,B),B))),o.normal&&(m[C++]=P.x,m[C++]=P.y,m[C++]=P.z,m[C++]=P.x,m[C++]=P.y,m[C++]=P.z),o.tangent&&(A[S++]=R.x,A[S++]=R.y,A[S++]=R.z,A[S++]=R.x,A[S++]=R.y,A[S++]=R.z),o.bitangent&&(y[E++]=B.x,y[E++]=B.y,y[E++]=B.z,y[E++]=B.x,y[E++]=B.y,y[E++]=B.z)}}let I=new pn;o.position&&(I.position=new Me({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:g})),o.normal&&(I.normal=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:m})),o.tangent&&(I.tangent=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:A})),o.bitangent&&(I.bitangent=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:y})),o.st&&(I.st=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:x}));let O=p/3;p-=6*(f+1);let N=Ue.createTypedArray(O,p),j=0;for(_=0;_<O-2;_+=2){let k=_,U=_+2,F=h.fromArray(g,k*3,uJ),H=h.fromArray(g,U*3,KG);if(h.equalsEpsilon(F,H,D.EPSILON10))continue;let q=_+1,J=_+3;N[j++]=q,N[j++]=k,N[j++]=J,N[j++]=J,N[j++]=k,N[j++]=U}return new At({attributes:I,indices:N,primitiveType:Re.TRIANGLES,boundingSphere:ce.fromVertices(g)})};var M2=MC;var Kbe=new h,Qbe=new h;function BC(e){e=e??G.EMPTY_OBJECT;let t=e.positions,n=e.maximumHeights,i=e.minimumHeights,o=e.granularity??D.RADIANS_PER_DEGREE,r=e.ellipsoid??te.default;this._positions=t,this._minimumHeights=i,this._maximumHeights=n,this._granularity=o,this._ellipsoid=te.clone(r),this._workerName="createWallOutlineGeometry";let a=1+t.length*h.packedLength+2;l(i)&&(a+=i.length),l(n)&&(a+=n.length),this.packedLength=a+te.packedLength+1}BC.pack=function(e,t,n){n=n??0;let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=h.packedLength)h.pack(o[i],t,n);let a=e._minimumHeights;if(r=l(a)?a.length:0,t[n++]=r,l(a))for(i=0;i<r;++i)t[n++]=a[i];let s=e._maximumHeights;if(r=l(s)?s.length:0,t[n++]=r,l(s))for(i=0;i<r;++i)t[n++]=s[i];return te.pack(e._ellipsoid,t,n),n+=te.packedLength,t[n]=e._granularity,t};var $be=te.clone(te.UNIT_SPHERE),B2={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:$be,granularity:void 0};BC.unpack=function(e,t,n){t=t??0;let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=h.packedLength)r[i]=h.unpack(e,t);o=e[t++];let a;if(o>0)for(a=new Array(o),i=0;i<o;++i)a[i]=e[t++];o=e[t++];let s;if(o>0)for(s=new Array(o),i=0;i<o;++i)s[i]=e[t++];let c=te.unpack(e,t,$be);t+=te.packedLength;let u=e[t];return l(n)?(n._positions=r,n._minimumHeights=a,n._maximumHeights=s,n._ellipsoid=te.clone(c,n._ellipsoid),n._granularity=u,n):(B2.positions=r,B2.minimumHeights=a,B2.maximumHeights=s,B2.granularity=u,new BC(B2))};BC.fromConstantHeights=function(e){e=e??G.EMPTY_OBJECT;let t=e.positions,n,i,o=e.minimumHeight,r=e.maximumHeight,a=l(o),s=l(r);if(a||s){let u=t.length;n=a?new Array(u):void 0,i=s?new Array(u):void 0;for(let f=0;f<u;++f)a&&(n[f]=o),s&&(i[f]=r)}let c={positions:t,maximumHeights:i,minimumHeights:n,ellipsoid:e.ellipsoid};return new BC(c)};BC.createGeometry=function(e){let t=e._positions,n=e._minimumHeights,i=e._maximumHeights,o=e._granularity,r=e._ellipsoid,a=OC.computePositions(r,t,i,n,o,!1);if(!l(a))return;let s=a.bottomPositions,c=a.topPositions,u=c.length,f=u*2,d=new Float64Array(f),p=0;u/=3;let g;for(g=0;g<u;++g){let b=g*3,C=h.fromArray(c,b,Kbe),E=h.fromArray(s,b,Qbe);d[p++]=E.x,d[p++]=E.y,d[p++]=E.z,d[p++]=C.x,d[p++]=C.y,d[p++]=C.z}let m=new pn({position:new Me({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:d})}),A=f/3;f=2*A-4+A;let y=Ue.createTypedArray(A,f),x=0;for(g=0;g<A-2;g+=2){let b=g,C=g+2,E=h.fromArray(d,b*3,Kbe),S=h.fromArray(d,C*3,Qbe);if(h.equalsEpsilon(E,S,D.EPSILON10))continue;let w=g+1,P=g+3;y[x++]=w,y[x++]=b,y[x++]=w,y[x++]=P,y[x++]=b,y[x++]=C}return y[x++]=A-2,y[x++]=A-1,new At({attributes:m,indices:y,primitiveType:Re.LINES,boundingSphere:ce.fromVertices(d)})};var L2=BC;var Jbe=new V;function Fdt(e){this.id=e,this.vertexFormat=void 0,this.positions=void 0,this.minimumHeights=void 0,this.maximumHeights=void 0,this.granularity=void 0}function Im(e,t){bi.call(this,{entity:e,scene:t,geometryOptions:new Fdt(e),geometryPropertyName:"wall",observedPropertyNames:["availability","wall"]}),this._onEntityPropertyChanged(e,"wall",e.wall,void 0)}l(Object.create)&&(Im.prototype=Object.create(bi.prototype),Im.prototype.constructor=Im);Im.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i,o,r=new En(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),a=this._distanceDisplayConditionProperty.getValue(e),s=Hn.fromDistanceDisplayCondition(a);if(this._materialProperty instanceof Wt){let c;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(c=this._materialProperty.color.getValue(e,Jbe)),l(c)||(c=V.WHITE),o=Yt.fromColor(c),i={show:r,distanceDisplayCondition:s,color:o}}else i={show:r,distanceDisplayCondition:s};return new Ot({id:t,geometry:new M2(this._options),attributes:i})};Im.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=X.getValueOrDefault(this._outlineColorProperty,e,V.BLACK,Jbe),o=this._distanceDisplayConditionProperty.getValue(e);return new Ot({id:t,geometry:new L2(this._options),attributes:{show:new En(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Yt.fromColor(i),distanceDisplayCondition:Hn.fromDistanceDisplayCondition(o)}})};Im.prototype._isHidden=function(e,t){return!l(t.positions)||bi.prototype._isHidden.call(this,e,t)};Im.prototype._getIsClosed=function(e){return!1};Im.prototype._isDynamic=function(e,t){return!t.positions.isConstant||!X.isConstant(t.minimumHeights)||!X.isConstant(t.maximumHeights)||!X.isConstant(t.outlineWidth)||!X.isConstant(t.granularity)};Im.prototype._setStaticOptions=function(e,t){let n=t.minimumHeights,i=t.maximumHeights,o=t.granularity,r=this._materialProperty instanceof Wt,a=this._options;a.vertexFormat=r?dn.VERTEX_FORMAT:go.MaterialSupport.TEXTURED.vertexFormat,a.positions=t.positions.getValue(Qe.MINIMUM_VALUE,a.positions),a.minimumHeights=l(n)?n.getValue(Qe.MINIMUM_VALUE,a.minimumHeights):void 0,a.maximumHeights=l(i)?i.getValue(Qe.MINIMUM_VALUE,a.maximumHeights):void 0,a.granularity=l(o)?o.getValue(Qe.MINIMUM_VALUE):void 0};Im.DynamicGeometryUpdater=uw;function uw(e,t,n){xi.call(this,e,t,n)}l(Object.create)&&(uw.prototype=Object.create(xi.prototype),uw.prototype.constructor=uw);uw.prototype._isHidden=function(e,t,n){return!l(this._options.positions)||xi.prototype._isHidden.call(this,e,t,n)};uw.prototype._setOptions=function(e,t,n){let i=this._options;i.positions=X.getValueOrUndefined(t.positions,n,i.positions),i.minimumHeights=X.getValueOrUndefined(t.minimumHeights,n,i.minimumHeights),i.maximumHeights=X.getValueOrUndefined(t.maximumHeights,n,i.maximumHeights),i.granularity=X.getValueOrUndefined(t.granularity,n)};var N2=Im;var LC=[VO,t2,YF,m2,g2,y2,T2,P2,R2,N2];function NC(e,t){this.entity=e,this.scene=t;let n=new Array(LC.length),i=new ye,o=new Nr;for(let r=0;r<n.length;r++){let a=new LC[r](e,t);o.add(a.geometryChanged,s=>{i.raiseEvent(s)}),n[r]=a}this.updaters=n,this.geometryChanged=i,this.eventHelper=o,this._removeEntitySubscription=e.definitionChanged.addEventListener(NC.prototype._onEntityPropertyChanged,this)}NC.prototype._onEntityPropertyChanged=function(e,t,n,i){let o=this.updaters;for(let r=0;r<o.length;r++)o[r]._onEntityPropertyChanged(e,t,n,i)};NC.prototype.forEach=function(e){let t=this.updaters;for(let n=0;n<t.length;n++)e(t[n])};NC.prototype.destroy=function(){this.eventHelper.removeAll();let e=this.updaters;for(let t=0;t<e.length;t++)e[t].destroy();this._removeEntitySubscription(),fe(this)};NC.registerUpdater=function(e){LC.includes(e)||LC.push(e)};NC.unregisterUpdater=function(e){if(LC.includes(e)){let t=LC.indexOf(e);LC.splice(t,1)}};var FC=NC;var Zbe=new V,kdt=new kt,zdt=new kt,Udt=h.ZERO,Vdt=new h;function Dm(e,t,n,i,o,r,a){this.translucent=t,this.appearanceType=n,this.depthFailAppearanceType=i,this.depthFailMaterialProperty=o,this.depthFailMaterial=void 0,this.closed=r,this.shadows=a,this.primitives=e,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new Lt,this.updaters=new Lt,this.updatersWithAttributes=new Lt,this.attributes=new Lt,this.subscriptions=new Lt,this.showsUpdated=new Lt,this.itemsToRemove=[],this.invalidated=!1;let s;l(o)&&(s=o.definitionChanged.addEventListener(Dm.prototype.onMaterialChanged,this)),this.removeMaterialSubscription=s}Dm.prototype.onMaterialChanged=function(){this.invalidated=!0};Dm.prototype.isMaterial=function(e){let t=this.depthFailMaterialProperty,n=e.depthFailMaterialProperty;return n===t?!0:l(t)?t.equals(n):!1};Dm.prototype.add=function(e,t){let n=e.id;if(this.createPrimitive=!0,this.geometry.set(n,t),this.updaters.set(n,e),!e.hasConstantFill||!e.fillMaterialProperty.isConstant||!X.isConstant(e.distanceDisplayConditionProperty)||!X.isConstant(e.terrainOffsetProperty))this.updatersWithAttributes.set(n,e);else{let i=this;this.subscriptions.set(n,e.entity.definitionChanged.addEventListener(function(o,r,a,s){r==="isShowing"&&i.showsUpdated.set(e.id,e)}))}};Dm.prototype.remove=function(e){let t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);let n=this.subscriptions.get(t);return l(n)&&(n(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1};Dm.prototype.update=function(e){let t=!0,n=0,i=this.primitive,o=this.primitives,r;if(this.createPrimitive){let a=this.geometry.values;if(a.length>0){l(i)&&(l(this.oldPrimitive)?o.remove(i):this.oldPrimitive=i);let c;if(l(this.depthFailAppearanceType)){l(this.depthFailMaterialProperty)&&(this.depthFailMaterial=br.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial));let f=this.depthFailAppearanceType;c=new f({material:this.depthFailMaterial,translucent:this.translucent,closed:this.closed})}let u=this.appearanceType;i=new Dn({show:!1,asynchronous:!0,geometryInstances:a.slice(),appearance:new u({translucent:this.translucent,closed:this.closed}),depthFailAppearance:c,shadows:this.shadows}),o.add(i),t=!1}else{l(i)&&(o.remove(i),i=void 0);let c=this.oldPrimitive;l(c)&&(o.remove(c),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=i,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(l(i)&&i.ready){i.show=!0,l(this.oldPrimitive)&&(o.remove(this.oldPrimitive),this.oldPrimitive=void 0),l(this.depthFailAppearanceType)&&!(this.depthFailMaterialProperty instanceof Wt)&&(this.depthFailMaterial=br.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),this.primitive.depthFailAppearance.material=this.depthFailMaterial);let a=this.updatersWithAttributes.values,s=a.length,c=this.waitingOnCreate;for(r=0;r<s;r++){let u=a[r],f=this.geometry.get(u.id),d=this.attributes.get(f.id.id);if(l(d)||(d=i.getGeometryInstanceAttributes(f.id),this.attributes.set(f.id.id,d)),!u.fillMaterialProperty.isConstant||c){let y=u.fillMaterialProperty.color,x=X.getValueOrDefault(y,e,V.WHITE,Zbe);V.equals(d._lastColor,x)||(d._lastColor=V.clone(x,d._lastColor),d.color=Yt.toValue(x,d.color),(this.translucent&&d.color[3]===255||!this.translucent&&d.color[3]!==255)&&(this.itemsToRemove[n++]=u))}if(l(this.depthFailAppearanceType)&&u.depthFailMaterialProperty instanceof Wt&&(!u.depthFailMaterialProperty.isConstant||c)){let y=u.depthFailMaterialProperty.color,x=X.getValueOrDefault(y,e,V.WHITE,Zbe);V.equals(d._lastDepthFailColor,x)||(d._lastDepthFailColor=V.clone(x,d._lastDepthFailColor),d.depthFailColor=Yt.toValue(x,d.depthFailColor))}let p=u.entity.isShowing&&(u.hasConstantFill||u.isFilled(e)),g=d.show[0]===1;p!==g&&(d.show=En.toValue(p,d.show));let m=u.distanceDisplayConditionProperty;if(!X.isConstant(m)){let y=X.getValueOrDefault(m,e,zdt,kdt);kt.equals(y,d._lastDistanceDisplayCondition)||(d._lastDistanceDisplayCondition=kt.clone(y,d._lastDistanceDisplayCondition),d.distanceDisplayCondition=Hn.toValue(y,d.distanceDisplayCondition))}let A=u.terrainOffsetProperty;if(!X.isConstant(A)){let y=X.getValueOrDefault(A,e,Udt,Vdt);h.equals(y,d._lastOffset)||(d._lastOffset=h.clone(y,d._lastOffset),d.offset=po.toValue(y,d.offset))}}this.updateShows(i),this.waitingOnCreate=!1}else l(i)&&!i.ready&&(t=!1);return this.itemsToRemove.length=n,t};Dm.prototype.updateShows=function(e){let t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){let o=t[i],r=this.geometry.get(o.id),a=this.attributes.get(r.id.id);l(a)||(a=e.getGeometryInstanceAttributes(r.id),this.attributes.set(r.id.id,a));let s=o.entity.isShowing,c=a.show[0]===1;s!==c&&(a.show=En.toValue(s,a.show),r.attributes.show.value[0]=a.show[0])}this.showsUpdated.removeAll()};Dm.prototype.contains=function(e){return this.updaters.contains(e.id)};Dm.prototype.getBoundingSphere=function(e,t){let n=this.primitive;if(!n.ready)return bt.PENDING;let i=n.getGeometryInstanceAttributes(e.entity);return!l(i)||!l(i.boundingSphere)||l(i.show)&&i.show[0]===0?bt.FAILED:(i.boundingSphere.clone(t),bt.DONE)};Dm.prototype.destroy=function(){let e=this.primitive,t=this.primitives;l(e)&&t.remove(e);let n=this.oldPrimitive;l(n)&&t.remove(n),l(this.removeMaterialSubscription)&&this.removeMaterialSubscription()};function fw(e,t,n,i,o){this._solidItems=[],this._translucentItems=[],this._primitives=e,this._appearanceType=t,this._depthFailAppearanceType=n,this._closed=i,this._shadows=o}fw.prototype.add=function(e,t){let n,i,o=t.createFillGeometryInstance(e);o.attributes.color.value[3]===255?(n=this._solidItems,i=!1):(n=this._translucentItems,i=!0);let r=n.length;for(let s=0;s<r;s++){let c=n[s];if(c.isMaterial(t)){c.add(t,o);return}}let a=new Dm(this._primitives,i,this._appearanceType,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows);a.add(t,o),n.push(a)};function eCe(e,t){let n=e.length;for(let i=n-1;i>=0;i--){let o=e[i];if(o.remove(t))return o.updaters.length===0&&(e.splice(i,1),o.destroy()),!0}return!1}fw.prototype.remove=function(e){eCe(this._solidItems,e)||eCe(this._translucentItems,e)};function tCe(e,t,n){let i=!1,o=t.length;for(let r=0;r<o;++r){let a=t[r],s=a.itemsToRemove,c=s.length;if(c>0)for(r=0;r<c;r++){let u=s[r];a.remove(u),e.add(n,u),i=!0}}return i}function QG(e,t,n,i){let o=t.length,r;for(r=o-1;r>=0;r--){let a=t[r];if(a.invalidated){t.splice(r,1);let s=a.updaters.values,c=s.length;for(let u=0;u<c;u++)e.add(n,s[u]);a.destroy()}}for(o=t.length,r=0;r<o;++r)i=t[r].update(n)&&i;return i}fw.prototype.update=function(e){let t=QG(this,this._solidItems,e,!0);t=QG(this,this._translucentItems,e,t)&&t;let n=tCe(this,this._solidItems,e),i=tCe(this,this._translucentItems,e);return(n||i)&&(t=QG(this,this._solidItems,e,t)&&t,t=QG(this,this._translucentItems,e,t)&&t),t};function nCe(e,t,n){let i=e.length;for(let o=0;o<i;o++){let r=e[o];if(r.contains(t))return r.getBoundingSphere(t,n)}return bt.FAILED}fw.prototype.getBoundingSphere=function(e,t){let n=nCe(this._solidItems,e,t);return n===bt.FAILED?nCe(this._translucentItems,e,t):n};function iCe(e){let t=e.length;for(let n=0;n<t;n++)e[n].destroy();e.length=0}fw.prototype.removeAllPrimitives=function(){iCe(this._solidItems),iCe(this._translucentItems)};var th=fw;var jdt=new kt,Gdt=new kt,Hdt=h.ZERO,Wdt=new h;function Pm(e,t,n,i,o,r,a){this.primitives=e,this.appearanceType=t,this.materialProperty=n,this.depthFailAppearanceType=i,this.depthFailMaterialProperty=o,this.closed=r,this.shadows=a,this.updaters=new Lt,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new Lt,this.material=void 0,this.depthFailMaterial=void 0,this.updatersWithAttributes=new Lt,this.attributes=new Lt,this.invalidated=!1,this.removeMaterialSubscription=n.definitionChanged.addEventListener(Pm.prototype.onMaterialChanged,this),this.subscriptions=new Lt,this.showsUpdated=new Lt}Pm.prototype.onMaterialChanged=function(){this.invalidated=!0};Pm.prototype.isMaterial=function(e){let t=this.materialProperty,n=e.fillMaterialProperty,i=this.depthFailMaterialProperty,o=e.depthFailMaterialProperty;if(n===t&&o===i)return!0;let r=l(t)&&t.equals(n);return r=(!l(i)&&!l(o)||l(i)&&i.equals(o))&&r,r};Pm.prototype.add=function(e,t){let n=t.id;if(this.updaters.set(n,t),this.geometry.set(n,t.createFillGeometryInstance(e)),!t.hasConstantFill||!t.fillMaterialProperty.isConstant||!X.isConstant(t.distanceDisplayConditionProperty)||!X.isConstant(t.terrainOffsetProperty))this.updatersWithAttributes.set(n,t);else{let i=this;this.subscriptions.set(n,t.entity.definitionChanged.addEventListener(function(o,r,a,s){r==="isShowing"&&i.showsUpdated.set(t.id,t)}))}this.createPrimitive=!0};Pm.prototype.remove=function(e){let t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);let n=this.subscriptions.get(t);return l(n)&&(n(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1};var qdt=new V;Pm.prototype.update=function(e){let t=!0,n=this.primitive,i=this.primitives,o=this.geometry.values,r;if(this.createPrimitive){if(o.length>0){l(n)&&(l(this.oldPrimitive)?i.remove(n):this.oldPrimitive=n),this.material=br.getValue(e,this.materialProperty,this.material);let s;if(l(this.depthFailMaterialProperty)){this.depthFailMaterial=br.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial);let u=this.depthFailAppearanceType;s=new u({material:this.depthFailMaterial,translucent:this.depthFailMaterial.isTranslucent(),closed:this.closed})}let c=this.appearanceType;n=new Dn({show:!1,asynchronous:!0,geometryInstances:o.slice(),appearance:new c({material:this.material,translucent:this.material.isTranslucent(),closed:this.closed}),depthFailAppearance:s,shadows:this.shadows}),i.add(n),t=!1}else{l(n)&&(i.remove(n),n=void 0);let s=this.oldPrimitive;l(s)&&(i.remove(s),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1}else if(l(n)&&n.ready){n.show=!0,l(this.oldPrimitive)&&(i.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.material=br.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material,l(this.depthFailAppearanceType)&&!(this.depthFailMaterialProperty instanceof Wt)&&(this.depthFailMaterial=br.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),this.primitive.depthFailAppearance.material=this.depthFailMaterial);let a=this.updatersWithAttributes.values,s=a.length;for(r=0;r<s;r++){let c=a[r],u=c.entity,f=this.geometry.get(c.id),d=this.attributes.get(f.id.id);if(l(d)||(d=n.getGeometryInstanceAttributes(f.id),this.attributes.set(f.id.id,d)),l(this.depthFailAppearanceType)&&this.depthFailMaterialProperty instanceof Wt&&!c.depthFailMaterialProperty.isConstant){let y=c.depthFailMaterialProperty.color,x=X.getValueOrDefault(y,e,V.WHITE,qdt);V.equals(d._lastDepthFailColor,x)||(d._lastDepthFailColor=V.clone(x,d._lastDepthFailColor),d.depthFailColor=Yt.toValue(x,d.depthFailColor))}let p=u.isShowing&&(c.hasConstantFill||c.isFilled(e)),g=d.show[0]===1;p!==g&&(d.show=En.toValue(p,d.show));let m=c.distanceDisplayConditionProperty;if(!X.isConstant(m)){let y=X.getValueOrDefault(m,e,Gdt,jdt);kt.equals(y,d._lastDistanceDisplayCondition)||(d._lastDistanceDisplayCondition=kt.clone(y,d._lastDistanceDisplayCondition),d.distanceDisplayCondition=Hn.toValue(y,d.distanceDisplayCondition))}let A=c.terrainOffsetProperty;if(!X.isConstant(A)){let y=X.getValueOrDefault(A,e,Hdt,Wdt);h.equals(y,d._lastOffset)||(d._lastOffset=h.clone(y,d._lastOffset),d.offset=po.toValue(y,d.offset))}}this.updateShows(n)}else l(n)&&!n.ready&&(t=!1);return t};Pm.prototype.updateShows=function(e){let t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){let o=t[i],r=o.entity,a=this.geometry.get(o.id),s=this.attributes.get(a.id.id);l(s)||(s=e.getGeometryInstanceAttributes(a.id),this.attributes.set(a.id.id,s));let c=r.isShowing,u=s.show[0]===1;c!==u&&(s.show=En.toValue(c,s.show),a.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()};Pm.prototype.contains=function(e){return this.updaters.contains(e.id)};Pm.prototype.getBoundingSphere=function(e,t){let n=this.primitive;if(!n.ready)return bt.PENDING;let i=n.getGeometryInstanceAttributes(e.entity);return!l(i)||!l(i.boundingSphere)||l(i.show)&&i.show[0]===0?bt.FAILED:(i.boundingSphere.clone(t),bt.DONE)};Pm.prototype.destroy=function(){let e=this.primitive,t=this.primitives;l(e)&&t.remove(e);let n=this.oldPrimitive;l(n)&&t.remove(n),this.removeMaterialSubscription()};function dw(e,t,n,i,o){this._items=[],this._primitives=e,this._appearanceType=t,this._depthFailAppearanceType=n,this._closed=i,this._shadows=o}dw.prototype.add=function(e,t){let n=this._items,i=n.length;for(let r=0;r<i;r++){let a=n[r];if(a.isMaterial(t)){a.add(e,t);return}}let o=new Pm(this._primitives,this._appearanceType,t.fillMaterialProperty,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows);o.add(e,t),n.push(o)};dw.prototype.remove=function(e){let t=this._items,n=t.length;for(let i=n-1;i>=0;i--){let o=t[i];if(o.remove(e)){o.updaters.length===0&&(t.splice(i,1),o.destroy());break}}};dw.prototype.update=function(e){let t,n=this._items,i=n.length;for(t=i-1;t>=0;t--){let r=n[t];if(r.invalidated){n.splice(t,1);let a=r.updaters.values,s=a.length;for(let c=0;c<s;c++)this.add(e,a[c]);r.destroy()}}let o=!0;for(t=0;t<n.length;t++)o=n[t].update(e)&&o;return o};dw.prototype.getBoundingSphere=function(e,t){let n=this._items,i=n.length;for(let o=0;o<i;o++){let r=n[o];if(r.contains(e))return r.getBoundingSphere(e,t)}return bt.FAILED};dw.prototype.removeAllPrimitives=function(){let e=this._items,t=e.length;for(let n=0;n<t;n++)e[n].destroy();this._items.length=0};var nh=dw;function $G(e,t,n=0,i=e.length-1,o=Ydt){for(;i>n;){if(i-n>600){let c=i-n+1,u=t-n+1,f=Math.log(c),d=.5*Math.exp(2*f/3),p=.5*Math.sqrt(f*d*(c-d)/c)*(u-c/2<0?-1:1),g=Math.max(n,Math.floor(t-u*d/c+p)),m=Math.min(i,Math.floor(t+(c-u)*d/c+p));$G(e,t,g,m,o)}let r=e[t],a=n,s=i;for(F2(e,n,t),o(e[i],r)>0&&F2(e,n,i);a<s;){for(F2(e,a,s),a++,s--;o(e[a],r)<0;)a++;for(;o(e[s],r)>0;)s--}o(e[n],r)===0?F2(e,n,s):(s++,F2(e,s,i)),s<=t&&(n=s+1),t<=s&&(i=s-1)}}function F2(e,t,n){let i=e[t];e[t]=e[n],e[n]=i}function Ydt(e,t){return e<t?-1:e>t?1:0}var U2=class{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(t){let n=this.data,i=[];if(!ZG(t,n))return i;let o=this.toBBox,r=[];for(;n;){for(let a=0;a<n.children.length;a++){let s=n.children[a],c=n.leaf?o(s):s;ZG(t,c)&&(n.leaf?i.push(s):dJ(t,c)?this._all(s,i):r.push(s))}n=r.pop()}return i}collides(t){let n=this.data;if(!ZG(t,n))return!1;let i=[];for(;n;){for(let o=0;o<n.children.length;o++){let r=n.children[o],a=n.leaf?this.toBBox(r):r;if(ZG(t,a)){if(n.leaf||dJ(t,a))return!0;i.push(r)}}n=i.pop()}return!1}load(t){if(!(t&&t.length))return this;if(t.length<this._minEntries){for(let i=0;i<t.length;i++)this.insert(t[i]);return this}let n=this._build(t.slice(),0,t.length-1,0);if(!this.data.children.length)this.data=n;else if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){let i=this.data;this.data=n,n=i}this._insert(n,this.data.height-n.height-1,!0)}return this}insert(t){return t&&this._insert(t,this.data.height-1),this}clear(){return this.data=mw([]),this}remove(t,n){if(!t)return this;let i=this.data,o=this.toBBox(t),r=[],a=[],s,c,u;for(;i||r.length;){if(i||(i=r.pop(),c=r[r.length-1],s=a.pop(),u=!0),i.leaf){let f=Xdt(t,i.children,n);if(f!==-1)return i.children.splice(f,1),r.push(i),this._condense(r),this}!u&&!i.leaf&&dJ(i,o)?(r.push(i),a.push(s),s=0,c=i,i=i.children[0]):c?(s++,i=c.children[s],u=!1):i=null}return this}toBBox(t){return t}compareMinX(t,n){return t.minX-n.minX}compareMinY(t,n){return t.minY-n.minY}toJSON(){return this.data}fromJSON(t){return this.data=t,this}_all(t,n){let i=[];for(;t;)t.leaf?n.push(...t.children):i.push(...t.children),t=i.pop();return n}_build(t,n,i,o){let r=i-n+1,a=this._maxEntries,s;if(r<=a)return s=mw(t.slice(n,i+1)),hw(s,this.toBBox),s;o||(o=Math.ceil(Math.log(r)/Math.log(a)),a=Math.ceil(r/Math.pow(a,o-1))),s=mw([]),s.leaf=!1,s.height=o;let c=Math.ceil(r/a),u=c*Math.ceil(Math.sqrt(a));oCe(t,n,i,u,this.compareMinX);for(let f=n;f<=i;f+=u){let d=Math.min(f+u-1,i);oCe(t,f,d,c,this.compareMinY);for(let p=f;p<=d;p+=c){let g=Math.min(p+c-1,d);s.children.push(this._build(t,p,g,o-1))}}return hw(s,this.toBBox),s}_chooseSubtree(t,n,i,o){for(;o.push(n),!(n.leaf||o.length-1===i);){let r=1/0,a=1/0,s;for(let c=0;c<n.children.length;c++){let u=n.children[c],f=fJ(u),d=$dt(t,u)-f;d<a?(a=d,r=f<r?f:r,s=u):d===a&&f<r&&(r=f,s=u)}n=s||n.children[0]}return n}_insert(t,n,i){let o=i?t:this.toBBox(t),r=[],a=this._chooseSubtree(o,this.data,n,r);for(a.children.push(t),z2(a,o);n>=0&&r[n].children.length>this._maxEntries;)this._split(r,n),n--;this._adjustParentBBoxes(o,r,n)}_split(t,n){let i=t[n],o=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,o);let a=this._chooseSplitIndex(i,r,o),s=mw(i.children.splice(a,i.children.length-a));s.height=i.height,s.leaf=i.leaf,hw(i,this.toBBox),hw(s,this.toBBox),n?t[n-1].children.push(s):this._splitRoot(i,s)}_splitRoot(t,n){this.data=mw([t,n]),this.data.height=t.height+1,this.data.leaf=!1,hw(this.data,this.toBBox)}_chooseSplitIndex(t,n,i){let o,r=1/0,a=1/0;for(let s=n;s<=i-n;s++){let c=k2(t,0,s,this.toBBox),u=k2(t,s,i,this.toBBox),f=Jdt(c,u),d=fJ(c)+fJ(u);f<r?(r=f,o=s,a=d<a?d:a):f===r&&d<a&&(a=d,o=s)}return o||i-n}_chooseSplitAxis(t,n,i){let o=t.leaf?this.compareMinX:Kdt,r=t.leaf?this.compareMinY:Qdt,a=this._allDistMargin(t,n,i,o),s=this._allDistMargin(t,n,i,r);a<s&&t.children.sort(o)}_allDistMargin(t,n,i,o){t.children.sort(o);let r=this.toBBox,a=k2(t,0,n,r),s=k2(t,i-n,i,r),c=JG(a)+JG(s);for(let u=n;u<i-n;u++){let f=t.children[u];z2(a,t.leaf?r(f):f),c+=JG(a)}for(let u=i-n-1;u>=n;u--){let f=t.children[u];z2(s,t.leaf?r(f):f),c+=JG(s)}return c}_adjustParentBBoxes(t,n,i){for(let o=i;o>=0;o--)z2(n[o],t)}_condense(t){for(let n=t.length-1,i;n>=0;n--)t[n].children.length===0?n>0?(i=t[n-1].children,i.splice(i.indexOf(t[n]),1)):this.clear():hw(t[n],this.toBBox)}};function Xdt(e,t,n){if(!n)return t.indexOf(e);for(let i=0;i<t.length;i++)if(n(e,t[i]))return i;return-1}function hw(e,t){k2(e,0,e.children.length,t,e)}function k2(e,t,n,i,o){o||(o=mw(null)),o.minX=1/0,o.minY=1/0,o.maxX=-1/0,o.maxY=-1/0;for(let r=t;r<n;r++){let a=e.children[r];z2(o,e.leaf?i(a):a)}return o}function z2(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function Kdt(e,t){return e.minX-t.minX}function Qdt(e,t){return e.minY-t.minY}function fJ(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function JG(e){return e.maxX-e.minX+(e.maxY-e.minY)}function $dt(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function Jdt(e,t){let n=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),o=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,o-n)*Math.max(0,r-i)}function dJ(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function ZG(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function mw(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function oCe(e,t,n,i,o){let r=[t,n];for(;r.length;){if(n=r.pop(),t=r.pop(),n-t<=i)continue;let a=t+Math.ceil((n-t)/i/2)*i;$G(e,a,t,n,o),r.push(t,a,a,n)}}function eH(){this._tree=new U2}function kC(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.id=""}kC.fromRectangleAndId=function(e,t,n){return n.minX=t.west,n.minY=t.south,n.maxX=t.east,n.maxY=t.north,n.id=e,n};eH.prototype.insert=function(e,t){let n=kC.fromRectangleAndId(e,t,new kC);this._tree.insert(n)};function Zdt(e,t){return e.id===t.id}var eht=new kC;eH.prototype.remove=function(e,t){let n=kC.fromRectangleAndId(e,t,eht);this._tree.remove(n,Zdt)};var tht=new kC;eH.prototype.collides=function(e){let t=kC.fromRectangleAndId("",e,tht);return this._tree.collides(t)};var zC=eH;var nht=new V,iht=new kt,oht=new kt;function u_(e,t,n,i){this.primitives=e,this.zIndex=i,this.classificationType=t,this.color=n,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new Lt,this.updaters=new Lt,this.updatersWithAttributes=new Lt,this.attributes=new Lt,this.subscriptions=new Lt,this.showsUpdated=new Lt,this.itemsToRemove=[],this.isDirty=!1,this.rectangleCollisionCheck=new zC}u_.prototype.overlapping=function(e){return this.rectangleCollisionCheck.collides(e)};u_.prototype.add=function(e,t){let n=e.id;if(this.createPrimitive=!0,this.geometry.set(n,t),this.updaters.set(n,e),this.rectangleCollisionCheck.insert(n,t.geometry.rectangle),!e.hasConstantFill||!e.fillMaterialProperty.isConstant||!X.isConstant(e.distanceDisplayConditionProperty))this.updatersWithAttributes.set(n,e);else{let i=this;this.subscriptions.set(n,e.entity.definitionChanged.addEventListener(function(o,r,a,s){r==="isShowing"&&i.showsUpdated.set(e.id,e)}))}};u_.prototype.remove=function(e){let t=e.id,n=this.geometry.get(t);if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.rectangleCollisionCheck.remove(t,n.geometry.rectangle),this.updatersWithAttributes.remove(t);let i=this.subscriptions.get(t);return l(i)&&(i(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1};u_.prototype.update=function(e){let t=!0,n=0,i=this.primitive,o=this.primitives,r;if(this.createPrimitive){let a=this.geometry.values;if(a.length>0)l(i)&&(l(this.oldPrimitive)?o.remove(i):this.oldPrimitive=i),i=new Nl({show:!1,asynchronous:!0,geometryInstances:a.slice(),classificationType:this.classificationType}),o.add(i,this.zIndex),t=!1;else{l(i)&&(o.remove(i),i=void 0);let c=this.oldPrimitive;l(c)&&(o.remove(c),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=i,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(l(i)&&i.ready){i.show=!0,l(this.oldPrimitive)&&(o.remove(this.oldPrimitive),this.oldPrimitive=void 0);let a=this.updatersWithAttributes.values,s=a.length,c=this.waitingOnCreate;for(r=0;r<s;r++){let u=a[r],f=this.geometry.get(u.id),d=this.attributes.get(f.id.id);if(l(d)||(d=i.getGeometryInstanceAttributes(f.id),this.attributes.set(f.id.id,d)),!u.fillMaterialProperty.isConstant||c){let A=u.fillMaterialProperty.color,y=X.getValueOrDefault(A,e,V.WHITE,nht);V.equals(d._lastColor,y)||(d._lastColor=V.clone(y,d._lastColor),d.color=Yt.toValue(y,d.color))}let p=u.entity.isShowing&&(u.hasConstantFill||u.isFilled(e)),g=d.show[0]===1;p!==g&&(d.show=En.toValue(p,d.show));let m=u.distanceDisplayConditionProperty;if(!X.isConstant(m)){let A=X.getValueOrDefault(m,e,oht,iht);kt.equals(A,d._lastDistanceDisplayCondition)||(d._lastDistanceDisplayCondition=kt.clone(A,d._lastDistanceDisplayCondition),d.distanceDisplayCondition=Hn.toValue(A,d.distanceDisplayCondition))}}this.updateShows(i),this.waitingOnCreate=!1}else l(i)&&!i.ready&&(t=!1);return this.itemsToRemove.length=n,t};u_.prototype.updateShows=function(e){let t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){let o=t[i],r=this.geometry.get(o.id),a=this.attributes.get(r.id.id);l(a)||(a=e.getGeometryInstanceAttributes(r.id),this.attributes.set(r.id.id,a));let s=o.entity.isShowing,c=a.show[0]===1;s!==c&&(a.show=En.toValue(s,a.show),r.attributes.show.value[0]=a.show[0])}this.showsUpdated.removeAll()};u_.prototype.contains=function(e){return this.updaters.contains(e.id)};u_.prototype.getBoundingSphere=function(e,t){let n=this.primitive;if(!n.ready)return bt.PENDING;let i=n.getBoundingSphere(e.entity);return l(i)?(i.clone(t),bt.DONE):bt.FAILED};u_.prototype.removeAllPrimitives=function(){let e=this.primitives,t=this.primitive;l(t)&&(e.remove(t),this.primitive=void 0,this.geometry.removeAll(),this.updaters.removeAll());let n=this.oldPrimitive;l(n)&&(e.remove(n),this.oldPrimitive=void 0)};function pw(e,t){this._batches=[],this._primitives=e,this._classificationType=t}pw.prototype.add=function(e,t){let n=t.createFillGeometryInstance(e),i=this._batches,o=X.getValueOrDefault(t.zIndex,0),r,a=i.length;for(let s=0;s<a;++s){let c=i[s];if(c.zIndex===o&&!c.overlapping(n.geometry.rectangle)){r=c;break}}return l(r)||(r=new u_(this._primitives,this._classificationType,n.attributes.color.value,o),i.push(r)),r.add(t,n),r};pw.prototype.remove=function(e){let t=this._batches,n=t.length;for(let i=0;i<n;++i)if(t[i].remove(e))return};pw.prototype.update=function(e){let t,n,i=!0,o=this._batches,r=o.length;for(t=0;t<r;++t)i=o[t].update(e)&&i;for(t=0;t<r;++t){let a=o[t],s=a.itemsToRemove,c=s.length;for(let u=0;u<c;u++){n=s[u],a.remove(n);let f=this.add(e,n);a.isDirty=!0,f.isDirty=!0}}for(t=r-1;t>=0;--t){let a=o[t];a.isDirty&&(i=o[t].update(e)&&i,a.isDirty=!1),a.geometry.length===0&&o.splice(t,1)}return i};pw.prototype.getBoundingSphere=function(e,t){let n=this._batches,i=n.length;for(let o=0;o<i;++o){let r=n[o];if(r.contains(e))return r.getBoundingSphere(e,t)}return bt.FAILED};pw.prototype.removeAllPrimitives=function(){let e=this._batches,t=e.length;for(let n=0;n<t;++n)e[n].removeAllPrimitives()};var gw=pw;var rht=new kt,aht=new kt;function Gp(e,t,n,i,o,r){this.primitives=e,this.classificationType=t,this.appearanceType=n,this.materialProperty=i,this.updaters=new Lt,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new Lt,this.material=void 0,this.updatersWithAttributes=new Lt,this.attributes=new Lt,this.subscriptions=new Lt,this.showsUpdated=new Lt,this.usingSphericalTextureCoordinates=o,this.zIndex=r,this.rectangleCollisionCheck=new zC}Gp.prototype.overlapping=function(e){return this.rectangleCollisionCheck.collides(e)};Gp.prototype.isMaterial=function(e){let t=this.materialProperty,n=e.fillMaterialProperty;return n===t||n instanceof Wt&&t instanceof Wt?!0:l(t)&&t.equals(n)};Gp.prototype.add=function(e,t,n){let i=t.id;if(this.updaters.set(i,t),this.geometry.set(i,n),this.rectangleCollisionCheck.insert(i,n.geometry.rectangle),!t.hasConstantFill||!t.fillMaterialProperty.isConstant||!X.isConstant(t.distanceDisplayConditionProperty))this.updatersWithAttributes.set(i,t);else{let o=this;this.subscriptions.set(i,t.entity.definitionChanged.addEventListener(function(r,a,s,c){a==="isShowing"&&o.showsUpdated.set(t.id,t)}))}this.createPrimitive=!0};Gp.prototype.remove=function(e){let t=e.id,n=this.geometry.get(t);if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.rectangleCollisionCheck.remove(t,n.geometry.rectangle),this.updatersWithAttributes.remove(t);let i=this.subscriptions.get(t);return l(i)&&(i(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1};Gp.prototype.update=function(e){let t=!0,n=this.primitive,i=this.primitives,o=this.geometry.values,r;if(this.createPrimitive){if(o.length>0){l(n)&&(l(this.oldPrimitive)?i.remove(n):this.oldPrimitive=n),this.material=br.getValue(e,this.materialProperty,this.material);let s=this.appearanceType;n=new Nl({show:!1,asynchronous:!0,geometryInstances:o.slice(),appearance:new s({material:this.material}),classificationType:this.classificationType}),i.add(n,this.zIndex),t=!1}else{l(n)&&(i.remove(n),n=void 0);let s=this.oldPrimitive;l(s)&&(i.remove(s),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1}else if(l(n)&&n.ready){n.show=!0,l(this.oldPrimitive)&&(i.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.material=br.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material;let a=this.updatersWithAttributes.values,s=a.length;for(r=0;r<s;r++){let c=a[r],u=c.entity,f=this.geometry.get(c.id),d=this.attributes.get(f.id.id);l(d)||(d=n.getGeometryInstanceAttributes(f.id),this.attributes.set(f.id.id,d));let p=u.isShowing&&(c.hasConstantFill||c.isFilled(e)),g=d.show[0]===1;p!==g&&(d.show=En.toValue(p,d.show));let m=c.distanceDisplayConditionProperty;if(!X.isConstant(m)){let A=X.getValueOrDefault(m,e,aht,rht);kt.equals(A,d._lastDistanceDisplayCondition)||(d._lastDistanceDisplayCondition=kt.clone(A,d._lastDistanceDisplayCondition),d.distanceDisplayCondition=Hn.toValue(A,d.distanceDisplayCondition))}}this.updateShows(n)}else l(n)&&!n.ready&&(t=!1);return t};Gp.prototype.updateShows=function(e){let t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){let o=t[i],r=o.entity,a=this.geometry.get(o.id),s=this.attributes.get(a.id.id);l(s)||(s=e.getGeometryInstanceAttributes(a.id),this.attributes.set(a.id.id,s));let c=r.isShowing,u=s.show[0]===1;c!==u&&(s.show=En.toValue(c,s.show),a.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()};Gp.prototype.contains=function(e){return this.updaters.contains(e.id)};Gp.prototype.getBoundingSphere=function(e,t){let n=this.primitive;if(!n.ready)return bt.PENDING;let i=n.getGeometryInstanceAttributes(e.entity);return!l(i)||!l(i.boundingSphere)||l(i.show)&&i.show[0]===0?bt.FAILED:(i.boundingSphere.clone(t),bt.DONE)};Gp.prototype.destroy=function(){let e=this.primitive,t=this.primitives;l(e)&&t.remove(e);let n=this.oldPrimitive;l(n)&&t.remove(n)};function _w(e,t,n){this._items=[],this._primitives=e,this._classificationType=t,this._appearanceType=n}_w.prototype.add=function(e,t){let n=this._items,i=n.length,o=t.createFillGeometryInstance(e),r=_f.shouldUseSphericalCoordinates(o.geometry.rectangle),a=X.getValueOrDefault(t.zIndex,0);for(let c=0;c<i;++c){let u=n[c];if(u.isMaterial(t)&&u.usingSphericalTextureCoordinates===r&&u.zIndex===a&&!u.overlapping(o.geometry.rectangle)){u.add(e,t,o);return}}let s=new Gp(this._primitives,this._classificationType,this._appearanceType,t.fillMaterialProperty,r,a);s.add(e,t,o),n.push(s)};_w.prototype.remove=function(e){let t=this._items,n=t.length;for(let i=n-1;i>=0&&!t[i].remove(e);i--);};_w.prototype.update=function(e){let t,n=this._items,i=n.length;for(t=i-1;t>=0;t--){let r=n[t];r.updaters.length===0&&(n.splice(t,1),r.destroy())}let o=!0;for(t=0;t<n.length;t++)o=n[t].update(e)&&o;return o};_w.prototype.getBoundingSphere=function(e,t){let n=this._items,i=n.length;for(let o=0;o<i;o++){let r=n[o];if(r.contains(e))return r.getBoundingSphere(e,t)}return bt.FAILED};_w.prototype.removeAllPrimitives=function(){let e=this._items,t=e.length;for(let n=0;n<t;n++)e[n].destroy();this._items.length=0};var V2=_w;var sht=new V,cht=new kt,lht=new kt,uht=h.ZERO,fht=new h;function f_(e,t,n,i){this.translucent=t,this.width=n,this.shadows=i,this.primitives=e,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new Lt,this.updaters=new Lt,this.updatersWithAttributes=new Lt,this.attributes=new Lt,this.itemsToRemove=[],this.subscriptions=new Lt,this.showsUpdated=new Lt}f_.prototype.add=function(e,t){let n=e.id;if(this.createPrimitive=!0,this.geometry.set(n,t),this.updaters.set(n,e),!e.hasConstantOutline||!e.outlineColorProperty.isConstant||!X.isConstant(e.distanceDisplayConditionProperty)||!X.isConstant(e.terrainOffsetProperty))this.updatersWithAttributes.set(n,e);else{let i=this;this.subscriptions.set(n,e.entity.definitionChanged.addEventListener(function(o,r,a,s){r==="isShowing"&&i.showsUpdated.set(e.id,e)}))}};f_.prototype.remove=function(e){let t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);let n=this.subscriptions.get(t);return l(n)&&(n(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1};f_.prototype.update=function(e){let t=!0,n=0,i=this.primitive,o=this.primitives,r;if(this.createPrimitive){let a=this.geometry.values;if(a.length>0)l(i)&&(l(this.oldPrimitive)?o.remove(i):this.oldPrimitive=i),i=new Dn({show:!1,asynchronous:!0,geometryInstances:a.slice(),appearance:new dn({flat:!0,translucent:this.translucent,renderState:{lineWidth:this.width}}),shadows:this.shadows}),o.add(i),t=!1;else{l(i)&&(o.remove(i),i=void 0);let c=this.oldPrimitive;l(c)&&(o.remove(c),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=i,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(l(i)&&i.ready){i.show=!0,l(this.oldPrimitive)&&(o.remove(this.oldPrimitive),this.oldPrimitive=void 0);let a=this.updatersWithAttributes.values,s=a.length,c=this.waitingOnCreate;for(r=0;r<s;r++){let u=a[r],f=this.geometry.get(u.id),d=this.attributes.get(f.id.id);if(l(d)||(d=i.getGeometryInstanceAttributes(f.id),this.attributes.set(f.id.id,d)),!u.outlineColorProperty.isConstant||c){let y=u.outlineColorProperty,x=X.getValueOrDefault(y,e,V.WHITE,sht);V.equals(d._lastColor,x)||(d._lastColor=V.clone(x,d._lastColor),d.color=Yt.toValue(x,d.color),(this.translucent&&d.color[3]===255||!this.translucent&&d.color[3]!==255)&&(this.itemsToRemove[n++]=u))}let p=u.entity.isShowing&&(u.hasConstantOutline||u.isOutlineVisible(e)),g=d.show[0]===1;p!==g&&(d.show=En.toValue(p,d.show));let m=u.distanceDisplayConditionProperty;if(!X.isConstant(m)){let y=X.getValueOrDefault(m,e,lht,cht);kt.equals(y,d._lastDistanceDisplayCondition)||(d._lastDistanceDisplayCondition=kt.clone(y,d._lastDistanceDisplayCondition),d.distanceDisplayCondition=Hn.toValue(y,d.distanceDisplayCondition))}let A=u.terrainOffsetProperty;if(!X.isConstant(A)){let y=X.getValueOrDefault(A,e,uht,fht);h.equals(y,d._lastOffset)||(d._lastOffset=h.clone(y,d._lastOffset),d.offset=po.toValue(y,d.offset))}}this.updateShows(i),this.waitingOnCreate=!1}else l(i)&&!i.ready&&(t=!1);return this.itemsToRemove.length=n,t};f_.prototype.updateShows=function(e){let t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){let o=t[i],r=this.geometry.get(o.id),a=this.attributes.get(r.id.id);l(a)||(a=e.getGeometryInstanceAttributes(r.id),this.attributes.set(r.id.id,a));let s=o.entity.isShowing,c=a.show[0]===1;s!==c&&(a.show=En.toValue(s,a.show),r.attributes.show.value[0]=a.show[0])}this.showsUpdated.removeAll()};f_.prototype.contains=function(e){return this.updaters.contains(e.id)};f_.prototype.getBoundingSphere=function(e,t){let n=this.primitive;if(!n.ready)return bt.PENDING;let i=n.getGeometryInstanceAttributes(e.entity);return!l(i)||!l(i.boundingSphere)||l(i.show)&&i.show[0]===0?bt.FAILED:(i.boundingSphere.clone(t),bt.DONE)};f_.prototype.removeAllPrimitives=function(){let e=this.primitives,t=this.primitive;l(t)&&(e.remove(t),this.primitive=void 0,this.geometry.removeAll(),this.updaters.removeAll());let n=this.oldPrimitive;l(n)&&(e.remove(n),this.oldPrimitive=void 0)};function Aw(e,t,n){this._primitives=e,this._scene=t,this._shadows=n,this._solidBatches=new Lt,this._translucentBatches=new Lt}Aw.prototype.add=function(e,t){let n=t.createOutlineGeometryInstance(e),i=this._scene.clampLineWidth(t.outlineWidth),o,r;n.attributes.color.value[3]===255?(o=this._solidBatches,r=o.get(i),l(r)||(r=new f_(this._primitives,!1,i,this._shadows),o.set(i,r)),r.add(t,n)):(o=this._translucentBatches,r=o.get(i),l(r)||(r=new f_(this._primitives,!0,i,this._shadows),o.set(i,r)),r.add(t,n))};Aw.prototype.remove=function(e){let t,n=this._solidBatches.values,i=n.length;for(t=0;t<i;t++)if(n[t].remove(e))return;let o=this._translucentBatches.values,r=o.length;for(t=0;t<r;t++)if(o[t].remove(e))return};Aw.prototype.update=function(e){let t,n,i,o,r=this._solidBatches.values,a=r.length,s=this._translucentBatches.values,c=s.length,u,f=!0,d=!1;do{for(d=!1,n=0;n<a;n++){o=r[n],f=o.update(e),u=o.itemsToRemove;let p=u.length;if(p>0)for(d=!0,t=0;t<p;t++)i=u[t],o.remove(i),this.add(e,i)}for(n=0;n<c;n++){o=s[n],f=o.update(e),u=o.itemsToRemove;let p=u.length;if(p>0)for(d=!0,t=0;t<p;t++)i=u[t],o.remove(i),this.add(e,i)}}while(d);return f};Aw.prototype.getBoundingSphere=function(e,t){let n,i=this._solidBatches.values,o=i.length;for(n=0;n<o;n++){let s=i[n];if(s.contains(e))return s.getBoundingSphere(e,t)}let r=this._translucentBatches.values,a=r.length;for(n=0;n<a;n++){let s=r[n];if(s.contains(e))return s.getBoundingSphere(e,t)}return bt.FAILED};Aw.prototype.removeAllPrimitives=function(){let e,t=this._solidBatches.values,n=t.length;for(e=0;e<n;e++)t[e].removeAllPrimitives();let i=this._translucentBatches.values,o=i.length;for(e=0;e<o;e++)i[e].removeAllPrimitives()};var yw=Aw;var dht=[];function Wu(e,t,n,i){n=n??e.primitives,i=i??e.groundPrimitives,this._scene=e,this._primitives=n,this._groundPrimitives=i,this._entityCollection=void 0,this._addedObjects=new Lt,this._removedObjects=new Lt,this._changedObjects=new Lt;let o=vn.NUMBER_OF_SHADOW_MODES;this._outlineBatches=new Array(o*2),this._closedColorBatches=new Array(o*2),this._closedMaterialBatches=new Array(o*2),this._openColorBatches=new Array(o*2),this._openMaterialBatches=new Array(o*2);let r=jo.supportsMaterialsforEntitiesOnTerrain(e);this._supportsMaterialsforEntitiesOnTerrain=r;let a;for(a=0;a<o;++a)this._outlineBatches[a]=new yw(n,e,a,!1),this._outlineBatches[o+a]=new yw(n,e,a,!0),this._closedColorBatches[a]=new th(n,dn,void 0,!0,a,!0),this._closedColorBatches[o+a]=new th(n,dn,void 0,!0,a,!1),this._closedMaterialBatches[a]=new nh(n,go,void 0,!0,a,!0),this._closedMaterialBatches[o+a]=new nh(n,go,void 0,!0,a,!1),this._openColorBatches[a]=new th(n,dn,void 0,!1,a,!0),this._openColorBatches[o+a]=new th(n,dn,void 0,!1,a,!1),this._openMaterialBatches[a]=new nh(n,go,void 0,!1,a,!0),this._openMaterialBatches[o+a]=new nh(n,go,void 0,!1,a,!1);let s=Wn.NUMBER_OF_CLASSIFICATION_TYPES,c=new Array(s),u=[];if(r)for(a=0;a<s;++a)u.push(new V2(i,a,go)),c[a]=new gw(i,a);else for(a=0;a<s;++a)c[a]=new gw(i,a);this._groundColorBatches=c,this._groundMaterialBatches=u,this._dynamicBatch=new SC(n,i),this._batches=this._outlineBatches.concat(this._closedColorBatches,this._closedMaterialBatches,this._openColorBatches,this._openMaterialBatches,this._groundColorBatches,this._groundMaterialBatches,this._dynamicBatch),this._subscriptions=new Lt,this._updaterSets=new Lt,this._entityCollection=t,t.collectionChanged.addEventListener(Wu.prototype._onCollectionChanged,this),this._onCollectionChanged(t,t.values,dht)}Wu.registerUpdater=function(e){FC.registerUpdater(e)};Wu.unregisterUpdater=function(e){FC.unregisterUpdater(e)};Wu.prototype.update=function(e){let t=this._addedObjects,n=t.values,i=this._removedObjects,o=i.values,r=this._changedObjects,a=r.values,s,c,u,f,d=this;for(s=a.length-1;s>-1;s--)c=a[s],u=c.id,f=this._updaterSets.get(u),f.entity===c?f.forEach(function(A){d._removeUpdater(A),d._insertUpdaterIntoBatch(e,A)}):(o.push(c),n.push(c));for(s=o.length-1;s>-1;s--)c=o[s],u=c.id,f=this._updaterSets.get(u),f.forEach(this._removeUpdater.bind(this)),f.destroy(),this._updaterSets.remove(u),this._subscriptions.get(u)(),this._subscriptions.remove(u);for(s=n.length-1;s>-1;s--)c=n[s],u=c.id,f=new FC(c,this._scene),this._updaterSets.set(u,f),f.forEach(function(A){d._insertUpdaterIntoBatch(e,A)}),this._subscriptions.set(u,f.geometryChanged.addEventListener(Wu._onGeometryChanged,this));t.removeAll(),i.removeAll(),r.removeAll();let p=!0,g=this._batches,m=g.length;for(s=0;s<m;s++)p=g[s].update(e)&&p;return p};var hht=[],mht=new ce;Wu.prototype.getBoundingSphere=function(e,t){let n=hht,i=mht,o=0,r=bt.DONE,a=this._batches,s=a.length,c=e.id,u=this._updaterSets.get(c).updaters;for(let f=0;f<u.length;f++){let d=u[f];for(let p=0;p<s;p++){if(r=a[p].getBoundingSphere(d,i),r===bt.PENDING)return bt.PENDING;r===bt.DONE&&(n[o]=ce.clone(i,n[o]),o++)}}return o===0?bt.FAILED:(n.length=o,ce.fromBoundingSpheres(n,t),bt.DONE)};Wu.prototype.isDestroyed=function(){return!1};Wu.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(Wu.prototype._onCollectionChanged,this),this._addedObjects.removeAll(),this._removedObjects.removeAll();let e,t=this._batches,n=t.length;for(e=0;e<n;e++)t[e].removeAllPrimitives();let i=this._subscriptions.values;for(n=i.length,e=0;e<n;e++)i[e]();this._subscriptions.removeAll();let o=this._updaterSets.values;for(n=o.length,e=0;e<n;e++)o[e].destroy();return this._updaterSets.removeAll(),fe(this)};Wu.prototype._removeUpdater=function(e){let t=this._batches,n=t.length;for(let i=0;i<n;i++)t[i].remove(e)};Wu.prototype._insertUpdaterIntoBatch=function(e,t){if(t.isDynamic){this._dynamicBatch.add(e,t);return}let n;(t.outlineEnabled||t.fillEnabled)&&(n=t.shadowsProperty.getValue(e));let i=vn.NUMBER_OF_SHADOW_MODES;if(t.outlineEnabled&&(l(t.terrainOffsetProperty)?this._outlineBatches[i+n].add(e,t):this._outlineBatches[n].add(e,t)),t.fillEnabled)if(t.onTerrain){let o=t.classificationTypeProperty.getValue(e);t.fillMaterialProperty instanceof Wt?this._groundColorBatches[o].add(e,t):this._groundMaterialBatches[o].add(e,t)}else t.isClosed?t.fillMaterialProperty instanceof Wt?l(t.terrainOffsetProperty)?this._closedColorBatches[i+n].add(e,t):this._closedColorBatches[n].add(e,t):l(t.terrainOffsetProperty)?this._closedMaterialBatches[i+n].add(e,t):this._closedMaterialBatches[n].add(e,t):t.fillMaterialProperty instanceof Wt?l(t.terrainOffsetProperty)?this._openColorBatches[i+n].add(e,t):this._openColorBatches[n].add(e,t):l(t.terrainOffsetProperty)?this._openMaterialBatches[i+n].add(e,t):this._openMaterialBatches[n].add(e,t)};Wu._onGeometryChanged=function(e){let t=this._removedObjects,n=this._changedObjects,i=e.entity,o=i.id;!l(t.get(o))&&!l(n.get(o))&&n.set(o,i)};Wu.prototype._onCollectionChanged=function(e,t,n){let i=this._addedObjects,o=this._removedObjects,r=this._changedObjects,a,s,c;for(a=n.length-1;a>-1;a--)c=n[a],s=c.id,i.remove(s)||(o.set(s,c),r.remove(s));for(a=t.length-1;a>-1;a--)c=t[a],s=c.id,o.remove(s)?r.set(s,c):i.set(s,c)};var j2=Wu;var pht=1,ght="30px sans-serif",_ht=sr.FILL,Aht=V.WHITE,yht=V.BLACK,xht=1,bht=!1,Cht=new V(.165,.165,.165,.8),Tht=new z(7,5),Eht=z.ZERO,vht=h.ZERO,Sht=nt.NONE,wht=Oi.CENTER,Iht=zn.CENTER,Dht=new h,Pht=new V,Rht=new V,Oht=new V,Mht=new z,Bht=new h,Lht=new z,Nht=new zt,Fht=new zt,kht=new zt,zht=new kt;function rCe(e){this.entity=e,this.label=void 0,this.index=void 0}function Ay(e,t){t.collectionChanged.addEventListener(Ay.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new Lt,this._onCollectionChanged(t,t.values,[],[])}Ay.prototype.update=function(e){let t=this._items.values,n=this._cluster;for(let i=0,o=t.length;i<o;i++){let r=t[i],a=r.entity,s=a._label,c,u=r.label,f=a.isShowing&&a.isAvailable(e)&&X.getValueOrDefault(s._show,e,!0),d;if(f&&(d=X.getValueOrUndefined(a._position,e,Dht),c=X.getValueOrUndefined(s._text,e),f=l(d)&&l(c)),!f){hJ(r,a,n);continue}X.isConstant(a._position)||(n._clusterDirty=!0);let p=!1,g=X.getValueOrDefault(s._heightReference,e,Sht);l(u)||(u=n.getLabel(a),u.id=a,r.label=u,p=h.equals(u.position,d)&&u.heightReference===g),u.show=!0,u.position=d,u.text=c,u.scale=X.getValueOrDefault(s._scale,e,pht),u.font=X.getValueOrDefault(s._font,e,ght),u.style=X.getValueOrDefault(s._style,e,_ht),u.fillColor=X.getValueOrDefault(s._fillColor,e,Aht,Pht),u.outlineColor=X.getValueOrDefault(s._outlineColor,e,yht,Rht),u.outlineWidth=X.getValueOrDefault(s._outlineWidth,e,xht),u.showBackground=X.getValueOrDefault(s._showBackground,e,bht),u.backgroundColor=X.getValueOrDefault(s._backgroundColor,e,Cht,Oht),u.backgroundPadding=X.getValueOrDefault(s._backgroundPadding,e,Tht,Mht),u.pixelOffset=X.getValueOrDefault(s._pixelOffset,e,Eht,Lht),u.eyeOffset=X.getValueOrDefault(s._eyeOffset,e,vht,Bht),u.heightReference=g,u.horizontalOrigin=X.getValueOrDefault(s._horizontalOrigin,e,wht),u.verticalOrigin=X.getValueOrDefault(s._verticalOrigin,e,Iht),u.translucencyByDistance=X.getValueOrUndefined(s._translucencyByDistance,e,Nht),u.pixelOffsetScaleByDistance=X.getValueOrUndefined(s._pixelOffsetScaleByDistance,e,Fht),u.scaleByDistance=X.getValueOrUndefined(s._scaleByDistance,e,kht),u.distanceDisplayCondition=X.getValueOrUndefined(s._distanceDisplayCondition,e,zht),u.disableDepthTestDistance=X.getValueOrUndefined(s._disableDepthTestDistance,e),p&&u._updateClamping()}return!0};Ay.prototype.getBoundingSphere=function(e,t){let n=this._items.get(e.id);if(!l(n)||!l(n.label))return bt.FAILED;let i=n.label;return t.center=h.clone(i._clampedPosition??i.position,t.center),t.radius=0,bt.DONE};Ay.prototype.isDestroyed=function(){return!1};Ay.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(Ay.prototype._onCollectionChanged,this);let e=this._entityCollection.values;for(let t=0;t<e.length;t++)this._cluster.removeLabel(e[t]);return fe(this)};Ay.prototype._onCollectionChanged=function(e,t,n,i){let o,r,a=this._items,s=this._cluster;for(o=t.length-1;o>-1;o--)r=t[o],l(r._label)&&l(r._position)&&a.set(r.id,new rCe(r));for(o=i.length-1;o>-1;o--)r=i[o],l(r._label)&&l(r._position)?a.contains(r.id)||a.set(r.id,new rCe(r)):(hJ(a.get(r.id),r,s),a.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],hJ(a.get(r.id),r,s),a.remove(r.id)};function hJ(e,t,n){l(e)&&(e.label=void 0,n.removeLabel(t))}var G2=Ay;var Uht=1,Vht=!0,jht=0,Ght=!0,Hht=!0,Wht=vn.ENABLED,qht=nt.NONE,Yht=V.RED,Xht=0,Kht=V.WHITE,Qht=sl.HIGHLIGHT,$ht=.5,Jht=new z(1,1),aCe={maximumPositionEpsilon:Number.POSITIVE_INFINITY},Zht=new M,emt=new M,sCe=new V,cCe=new Array(4),tmt=new h;function yy(e,t){t.collectionChanged.addEventListener(yy.prototype._onCollectionChanged,this),this._scene=e,this._primitives=e.primitives,this._entityCollection=t,this._modelHash={},this._entitiesToVisualize=new Lt,this._onCollectionChanged(t,t.values,[],[])}async function nmt(e,t,n,i,o){let r=e._primitives,a=e._modelHash;try{let s=await wf.fromGltfAsync({url:n,incrementallyLoadTextures:i,scene:e._scene,environmentMapOptions:o});if(e.isDestroyed()||!l(a[t.id]))return;s.id=t,r.add(s),a[t.id].modelPrimitive=s,s.errorEvent.addEventListener(c=>{l(a[t.id])&&(console.log(c),c.name!=="TextureError"&&s.incrementallyLoadTextures&&(a[t.id].loadFailed=!0))})}catch(s){if(e.isDestroyed()||!l(a[t.id]))return;console.log(s),a[t.id].loadFailed=!0}}yy.prototype.update=function(e){let t=this._entitiesToVisualize.values,n=this._modelHash,i=this._primitives;for(let o=0,r=t.length;o<r;o++){let a=t[o],s=a._model,c,u=n[a.id],f=a.isShowing&&a.isAvailable(e)&&X.getValueOrDefault(s._show,e,!0),d;if(f&&(d=a.computeModelMatrix(e,Zht),c=De.createIfNeeded(X.getValueOrUndefined(s._uri,e)),f=l(d)&&l(c)),!f){l(u)&&u.modelPrimitive&&(u.modelPrimitive.show=!1);continue}if(!l(u)||c.url!==u.url){l(u?.modelPrimitive)&&(i.removeAndDestroy(u.modelPrimitive),delete n[a.id]),u={modelPrimitive:void 0,url:c.url,animationsRunning:!1,nodeTransformationsScratch:{},articulationsScratch:{},loadFailed:!1,modelUpdated:!1,environmentMapOptionsScratch:{...aCe}},n[a.id]=u;let m=X.getValueOrDefault(s._incrementallyLoadTextures,e,Ght),A=X.getValueOrDefault(s._environmentMapOptions,e,aCe,u.environmentMapOptionsScratch);nmt(this,a,c,m,A)}let p=u.modelPrimitive;if(!l(p))continue;p.show=!0,p.scale=X.getValueOrDefault(s._scale,e,Uht),p.enableVerticalExaggeration=X.getValueOrDefault(s._enableVerticalExaggeration,e,Vht),p.minimumPixelSize=X.getValueOrDefault(s._minimumPixelSize,e,jht),p.maximumScale=X.getValueOrUndefined(s._maximumScale,e),p.modelMatrix=M.clone(d,p.modelMatrix),p.shadows=X.getValueOrDefault(s._shadows,e,Wht),p.heightReference=X.getValueOrDefault(s._heightReference,e,qht),p.distanceDisplayCondition=X.getValueOrUndefined(s._distanceDisplayCondition,e),p.silhouetteColor=X.getValueOrDefault(s._silhouetteColor,e,Yht,sCe),p.silhouetteSize=X.getValueOrDefault(s._silhouetteSize,e,Xht),p.color=X.getValueOrDefault(s._color,e,Kht,sCe),p.colorBlendMode=X.getValueOrDefault(s._colorBlendMode,e,Qht),p.colorBlendAmount=X.getValueOrDefault(s._colorBlendAmount,e,$ht),p.clippingPlanes=X.getValueOrUndefined(s._clippingPlanes,e),p.clampAnimations=X.getValueOrDefault(s._clampAnimations,e,Hht),p.imageBasedLighting.imageBasedLightingFactor=X.getValueOrDefault(s._imageBasedLightingFactor,e,Jht);let g=X.getValueOrUndefined(s._lightColor,e);if(l(g)&&(V.pack(g,cCe,0),g=h.unpack(cCe,0,tmt)),p.lightColor=g,p.customShader=X.getValueOrUndefined(s._customShader,e),n[a.id].modelUpdated=!0,p.ready){let m=X.getValueOrDefault(s._runAnimations,e,!0);u.animationsRunning!==m&&(m?p.activeAnimations.addAll({loop:Ou.REPEAT}):p.activeAnimations.removeAll(),u.animationsRunning=m);let A=X.getValueOrUndefined(s._nodeTransformations,e,u.nodeTransformationsScratch);if(l(A)){let b=Object.keys(A);for(let C=0,E=b.length;C<E;++C){let S=b[C],w=A[S];if(!l(w))continue;let P=p.getNode(S);if(!l(P))continue;let R=M.fromTranslationRotationScale(w,emt);P.matrix=M.multiply(P.originalMatrix,R,R)}}let y=!1,x=X.getValueOrUndefined(s._articulations,e,u.articulationsScratch);if(l(x)){let b=Object.keys(x);for(let C=0,E=b.length;C<E;++C){let S=b[C],w=x[S];l(w)&&(y=!0,p.setArticulationStage(S,w))}}y&&p.applyArticulations()}}return!0};yy.prototype.isDestroyed=function(){return!1};yy.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(yy.prototype._onCollectionChanged,this);let e=this._entitiesToVisualize.values,t=this._modelHash,n=this._primitives;for(let i=e.length-1;i>-1;i--)mJ(this,e[i],t,n);return fe(this)};var tH=new h,imt=new de;yy.prototype.getBoundingSphere=function(e,t){let n=this._modelHash[e.id];if(!l(n))return bt.FAILED;if(n.loadFailed)return bt.FAILED;let i=n.modelPrimitive;if(!l(i)||!i.show)return bt.PENDING;if(!i.ready||!n.modelUpdated)return bt.PENDING;let o=this._scene,r=o.ellipsoid??te.default;if(i.heightReference!==nt.NONE){let s=i.modelMatrix;tH.x=s[12],tH.y=s[13],tH.z=s[14];let c=r.cartesianToCartographic(tH,imt),u=o.getHeight(c,i.heightReference);return l(u)&&(bd(i.heightReference)?c.height=u:c.height+=u),ce.clone(i.boundingSphere,t),t.center=r.cartographicToCartesian(c),bt.DONE}return ce.clone(i.boundingSphere,t),bt.DONE};yy.prototype._onCollectionChanged=function(e,t,n,i){let o,r,a=this._entitiesToVisualize,s=this._modelHash,c=this._primitives;for(o=t.length-1;o>-1;o--)r=t[o],l(r._model)&&l(r._position)&&a.set(r.id,r);for(o=i.length-1;o>-1;o--)r=i[o],l(r._model)&&l(r._position)?(omt(r,s),a.set(r.id,r)):(mJ(this,r,s,c),a.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],mJ(this,r,s,c),a.remove(r.id)};function mJ(e,t,n,i){let o=n[t.id];l(o)&&(i.removeAndDestroy(o.modelPrimitive),delete n[t.id])}function omt(e,t){let n=t[e.id];l(n)&&(n.nodeTransformationsScratch={},n.articulationsScratch={})}var H2=yy;function xy(e){this._definitionChanged=new ye,this._value=void 0,this._removeSubscription=void 0,this.setValue(e)}Object.defineProperties(xy.prototype,{isConstant:{get:function(){return X.isConstant(this._value)}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return l(this._value)?this._value.referenceFrame:Bi.FIXED}}});var rmt=new Q;xy.prototype.getValue=function(e,t){return l(e)||(e=Q.now(rmt)),this.getValueInReferenceFrame(e,Bi.FIXED,t)};xy.prototype.setValue=function(e){this._value!==e&&(this._value=e,l(this._removeSubscription)&&(this._removeSubscription(),this._removeSubscription=void 0),l(e)&&(this._removeSubscription=e.definitionChanged.addEventListener(this._raiseDefinitionChanged,this)),this._definitionChanged.raiseEvent(this))};xy.prototype.getValueInReferenceFrame=function(e,t,n){if(l(this._value))return n=this._value.getValueInReferenceFrame(e,t,n),l(n)?te.default.scaleToGeodeticSurface(n,n):void 0};xy.prototype.equals=function(e){return this===e||e instanceof xy&&this._value===e._value};xy.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var Hp=xy;var lCe=new $,uCe=new $,fCe=new $,amt=new h,dCe=new h,smt=new h,cmt=new h,nH=new Le,iH=new M,oH=new $;function W2(e,t,n,i,o){if(!(!l(t)||!l(n))){if(h.subtract(t,n,o),l(i.orientation))i.orientation.getValue(e,nH)&&(Le.conjugate(nH,nH),$.fromQuaternion(nH,oH),$.multiplyByVector(oH,o,o));else if(l(_J(e,i.position,iH)))M.inverse(iH,iH),M.getRotation(iH,oH),$.multiplyByVector(oH,o,o);else return;return o}}function _J(e,t,n){let i=t.getValue(e,amt);if(l(i)){let o=Q.addSeconds(e,.01,new Q),r=t.getValue(o,dCe);if(l(r)&&!h.equalsEpsilon(i,r,D.EPSILON16)){let a=pt.computeFixedToIcrfMatrix(e,lCe),s=pt.computeFixedToIcrfMatrix(o,uCe),c;!l(a)||!l(s)?(c=pt.computeTemeToPseudoFixedMatrix(e,fCe),a=$.transpose(c,lCe),s=pt.computeTemeToPseudoFixedMatrix(o,uCe),$.transpose(s,s)):c=$.transpose(a,fCe);let u=smt;h.normalize(i,u),h.normalize(r,r),$.multiplyByVector(a,u,u),$.multiplyByVector(s,r,r);let f=h.cross(u,r,cmt);if(!h.equalsEpsilon(f,h.ZERO,D.EPSILON16)){let d=h.cross(f,u,dCe);return $.multiplyByVector(c,d,d),$.multiplyByVector(c,f,f),$.multiplyByVector(c,u,u),h.normalize(d,d),h.normalize(f,f),h.normalize(u,u),l(n)||(n=new M),n[0]=d.x,n[1]=d.y,n[2]=d.z,n[3]=0,n[4]=f.x,n[5]=f.y,n[6]=f.z,n[7]=0,n[8]=u.x,n[9]=u.y,n[10]=u.z,n[11]=0,n[12]=i.x,n[13]=i.y,n[14]=i.z,n[15]=1,n}}}}var lmt=60,umt=1,_Ce=new wn,pJ=new wn,gJ=new wn;function hCe(e){this.entity=e,this.polyline=void 0,this.index=void 0,this.updater=void 0}var rH=new h;function fmt(e,t,n,i,o,r,a,s,c){let u,f,d=!1;r instanceof jo&&(u=r,f=u.position,r=Bi.FIXED,d=!0);let p=s,g,m;g=e.getValueInReferenceFrame(t,r,c[p]),d?(m=f.getValueInReferenceFrame(t,r,rH),g=W2(t,g,m,u,g),l(g)&&(c[p++]=g)):l(g)&&(c[p++]=g);let A=!l(o)||Q.lessThanOrEquals(o,t)||Q.greaterThanOrEquals(o,n),y=0,x=i.length,b=i[y],C=n,E=!1,S,w,P;for(;y<x;){if(!A&&Q.greaterThanOrEquals(b,o)&&(g=e.getValueInReferenceFrame(o,r,c[p]),d?(m=f.getValueInReferenceFrame(o,r,rH),l(g)&&l(m)&&(g=W2(o,g,m,u,g),l(g)&&(c[p++]=g))):l(g)&&(c[p++]=g),A=!0),Q.greaterThan(b,t)&&Q.lessThan(b,C)&&!b.equals(o)&&(g=e.getValueInReferenceFrame(b,r,c[p]),d?(m=f.getValueInReferenceFrame(b,r,rH),l(g)&&l(m)&&(g=W2(b,g,m,u,g),l(g)&&(c[p++]=g))):l(g)&&(c[p++]=g)),y<x-1){if(a>0&&!E){let R=i[y+1],B=Q.secondsDifference(R,b);E=B>a,E&&(S=Math.ceil(B/a),w=0,P=B/Math.max(S,2),S=Math.max(S-1,1))}if(E&&w<S){b=Q.addSeconds(b,P,new Q),w++;continue}}E=!1,y++,b=i[y]}return g=e.getValueInReferenceFrame(n,r,c[p]),d?(m=f.getValueInReferenceFrame(n,r,rH),l(g)&&l(m)&&(g=W2(n,g,m,u,g),l(g)&&(c[p++]=g))):l(g)&&(c[p++]=g),p}function dmt(e,t,n,i,o,r,a,s){let c,u=0,f=a,d=t,p=!l(i)||Q.lessThanOrEquals(i,t)||Q.greaterThanOrEquals(i,n);for(;Q.lessThan(d,n);)!p&&Q.greaterThanOrEquals(d,i)&&(p=!0,c=e.getValueInReferenceFrame(i,o,s[f]),l(c)&&(s[f]=c,f++)),c=e.getValueInReferenceFrame(d,o,s[f]),l(c)&&(s[f]=c,f++),u++,d=Q.addSeconds(t,r*u,new Q);return c=e.getValueInReferenceFrame(n,o,s[f]),l(c)&&(s[f]=c,f++),f}function hmt(e,t,n,i,o,r,a,s){let c,u=0,f=a,d=t,p=Math.max(r,60),g=!l(i)||Q.lessThanOrEquals(i,t)||Q.greaterThanOrEquals(i,n);for(;Q.lessThan(d,n);)!g&&Q.greaterThanOrEquals(d,i)&&(g=!0,c=e.getValueInReferenceFrame(i,o,s[f]),l(c)&&(s[f]=c,f++)),c=e.getValueInReferenceFrame(d,o,s[f]),l(c)&&(s[f]=c,f++),u++,d=Q.addSeconds(t,p*u,new Q);return c=e.getValueInReferenceFrame(n,o,s[f]),l(c)&&(s[f]=c,f++),f}function mmt(e,t,n,i,o,r,a,s){gJ.start=t,gJ.stop=n;let c=a,u=e.intervals;for(let f=0;f<u.length;f++){let d=u.get(f);if(!wn.intersect(d,gJ,_Ce).isEmpty){let p=d.start;d.isStartIncluded||(d.isStopIncluded?p=d.stop:p=Q.addSeconds(d.start,Q.secondsDifference(d.stop,d.start)/2,new Q));let g=e.getValueInReferenceFrame(p,o,s[c]);l(g)&&(s[c]=g,c++)}}return c}function pmt(e,t,n,i,o,r,a,s){let c=e.getValueInReferenceFrame(t,o,s[a]);return l(c)&&(s[a++]=c),a}function gmt(e,t,n,i,o,r,a,s){pJ.start=t,pJ.stop=n;let c=a,u=e.intervals;for(let f=0;f<u.length;f++){let d=u.get(f);if(!wn.intersect(d,pJ,_Ce).isEmpty){let p=d.start,g=d.stop,m=t;Q.greaterThan(p,m)&&(m=p);let A=n;Q.lessThan(g,A)&&(A=g),c=ACe(d.data,m,A,i,o,r,c,s)}}return c}function ACe(e,t,n,i,o,r,a,s){for(;e instanceof i_;)e=e.resolvedProperty;if(e instanceof uc){let c=e._property._times;a=fmt(e,t,n,c,i,o,r,a,s)}else e instanceof jO?a=dmt(e,t,n,i,o,r,a,s):e instanceof cc?a=gmt(e,t,n,i,o,r,a,s):e instanceof o_?a=mmt(e,t,n,i,o,r,a,s):e instanceof zl||e instanceof Hp&&X.isConstant(e)?a=pmt(e,t,n,i,o,r,a,s):a=hmt(e,t,n,i,o,r,a,s);return a}function yCe(e,t,n,i,o,r,a){l(a)||(a=[]);let s=ACe(e,t,n,i,o,r,0,a);return a.length=s,a}var mCe=new $,pCe=new Le,gCe=new $;function q2(e,t){this._unusedIndexes=[],this._polylineCollection=new um,this._scene=e,this._referenceFrame=t,e.primitives.add(this._polylineCollection)}q2.prototype.update=function(e){let t=this._referenceFrame;if(t===Bi.INERTIAL){let n=pt.computeIcrfToFixedMatrix(e,mCe);l(n)||(n=pt.computeTemeToPseudoFixedMatrix(e,mCe)),M.fromRotationTranslation(n,h.ZERO,this._polylineCollection.modelMatrix)}else if(t instanceof jo){let n=t.position.getValue(e);l(t.orientation)?l(t.orientation.getValue(e,pCe))&&($.fromQuaternion(pCe,gCe),M.fromRotationTranslation(gCe,n,this._polylineCollection.modelMatrix)):_J(e,t.position,this._polylineCollection.modelMatrix)}};q2.prototype.updateObject=function(e,t){let n=t.entity,i=n._path,o=n._position,r,a,s=i._show,c=t.polyline,u=n.isShowing&&n.isAvailable(e)&&(!l(s)||s.getValue(e));if(u){let p=X.getValueOrUndefined(i._leadTime,e),g=X.getValueOrUndefined(i._trailTime,e),m=n._availability,A=l(m),y=l(p),x=l(g);if(u=A||y&&x,u){if(x&&(r=Q.addSeconds(e,-g,new Q)),y&&(a=Q.addSeconds(e,p,new Q)),A){let b=m.start,C=m.stop;(!x||Q.greaterThan(b,r))&&(r=b),(!y||Q.lessThan(C,a))&&(a=C)}u=Q.lessThan(r,a)}}if(!u){l(c)&&(this._unusedIndexes.push(t.index),t.polyline=void 0,c.show=!1,t.index=void 0);return}if(!l(c)){let p=this._unusedIndexes;if(p.length>0){let m=p.pop();c=this._polylineCollection.get(m),t.index=m}else t.index=this._polylineCollection.length,c=this._polylineCollection.add();c.id=n,t.polyline=c}let f=X.getValueOrDefault(i._resolution,e,lmt),d=yCe(o,r,a,e,this._referenceFrame,f,c.positions.slice());if(d.length<2){c.show=!1;return}c.show=!0,c.positions=d,c.material=br.getValue(e,i._material,c.material),c.width=X.getValueOrDefault(i._width,e,umt),c.distanceDisplayCondition=X.getValueOrUndefined(i._distanceDisplayCondition,e,c.distanceDisplayCondition)};q2.prototype.removeObject=function(e){let t=e.polyline;l(t)&&(this._unusedIndexes.push(e.index),e.polyline=void 0,t.show=!1,t.id=void 0,e.index=void 0)};q2.prototype.destroy=function(){return this._scene.primitives.remove(this._polylineCollection),fe(this)};function Wp(e,t){t.collectionChanged.addEventListener(Wp.prototype._onCollectionChanged,this),this._scene=e,this._updaters={},this._entityCollection=t,this._items=new Lt,this._onCollectionChanged(t,t.values,[],[])}Wp.prototype.update=function(e){let t=this._updaters;for(let i in t)t.hasOwnProperty(i)&&t[i].update(e);let n=this._items.values;if(n.length===0&&l(this._updaters)&&Object.keys(this._updaters).length>0){for(let i in t)t.hasOwnProperty(i)&&t[i].destroy();this._updaters={}}for(let i=0,o=n.length;i<o;i++){let r=n[i],a=r.entity,s=a._position,c=a._path,u=r.updater,f=!1,d=Bi.FIXED,p=d.toString();if(this._scene.mode===ie.SCENE3D){let m=X.getValueOrUndefined(c.relativeTo,e);l(m)?m==="FIXED"?(d=Bi.FIXED,p=d.toString()):m==="INERTIAL"?(d=Bi.INERTIAL,p=d.toString()):(f=!0,d=this._entityCollection.getById(m),p=m):(d=s.referenceFrame,p=d.toString())}let g=this._updaters[p];if(u===g&&l(g)){g.updateObject(e,r);continue}l(u)&&u.removeObject(r),!(f&&!l(d))&&(l(g)||(g=new q2(this._scene,d),g.update(e),this._updaters[p]=g),r.updater=g,l(g)&&g.updateObject(e,r))}return!0};Wp.prototype.isDestroyed=function(){return!1};Wp.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(Wp.prototype._onCollectionChanged,this);let e=this._updaters;for(let t in e)e.hasOwnProperty(t)&&e[t].destroy();return fe(this)};Wp.prototype._onCollectionChanged=function(e,t,n,i){let o,r,a,s=this._items;for(o=t.length-1;o>-1;o--)r=t[o],l(r._path)&&l(r._position)&&s.set(r.id,new hCe(r));for(o=i.length-1;o>-1;o--)r=i[o],l(r._path)&&l(r._position)?s.contains(r.id)||s.set(r.id,new hCe(r)):(a=s.get(r.id),l(a)&&(l(a.updater)&&a.updater.removeObject(a),s.remove(r.id)));for(o=n.length-1;o>-1;o--)r=n[o],a=s.get(r.id),l(a)&&(l(a.updater)&&a.updater.removeObject(a),s.remove(r.id))};Wp._subSample=yCe;Wp._computeVvlhTransform=_J;Wp._transformToEntityFrame=W2;var Y2=Wp;var xCe=V.WHITE,bCe=V.BLACK,CCe=0,TCe=1,ECe=0,vCe=Or.NONE,SCe=new V,_mt=new h,wCe=new V,ICe=new zt,DCe=new zt,PCe=new kt;function RCe(e){this.entity=e,this.pointPrimitive=void 0,this.billboard=void 0,this.color=void 0,this.outlineColor=void 0,this.pixelSize=void 0,this.outlineWidth=void 0}function by(e,t){t.collectionChanged.addEventListener(by.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new Lt,this._onCollectionChanged(t,t.values,[],[])}by.prototype.update=function(e){let t=this._items.values,n=this._cluster;for(let i=0,o=t.length;i<o;i++){let r=t[i],a=r.entity,s=a._point,c=r.pointPrimitive,u=r.billboard,f=X.getValueOrDefault(s._heightReference,e,nt.NONE),d=a.isShowing&&a.isAvailable(e)&&X.getValueOrDefault(s._show,e,!0),p;if(d&&(p=X.getValueOrUndefined(a._position,e,_mt),d=l(p)),!d){X2(r,a,n);continue}X.isConstant(a._position)||(n._clusterDirty=!0);let g=!1,m=!1;if(f!==nt.NONE&&!l(u)?(l(c)&&(X2(r,a,n),c=void 0),u=n.getBillboard(a),u.id=a,u.image=void 0,r.billboard=u,g=!0,m=h.equals(u.position,p)&&u.heightReference===f):f===nt.NONE&&!l(c)&&(l(u)&&(X2(r,a,n),u=void 0),c=n.getPoint(a),c.id=a,r.pointPrimitive=c),l(c))c.show=!0,c.position=p,c.scaleByDistance=X.getValueOrUndefined(s._scaleByDistance,e,ICe),c.translucencyByDistance=X.getValueOrUndefined(s._translucencyByDistance,e,DCe),c.color=X.getValueOrDefault(s._color,e,xCe,SCe),c.outlineColor=X.getValueOrDefault(s._outlineColor,e,bCe,wCe),c.outlineWidth=X.getValueOrDefault(s._outlineWidth,e,CCe),c.pixelSize=X.getValueOrDefault(s._pixelSize,e,TCe),c.distanceDisplayCondition=X.getValueOrUndefined(s._distanceDisplayCondition,e,PCe),c.disableDepthTestDistance=X.getValueOrDefault(s._disableDepthTestDistance,e,ECe),c.splitDirection=X.getValueOrDefault(s._splitDirection,e,vCe);else if(l(u)){u.show=!0,u.position=p,u.scaleByDistance=X.getValueOrUndefined(s._scaleByDistance,e,ICe),u.translucencyByDistance=X.getValueOrUndefined(s._translucencyByDistance,e,DCe),u.distanceDisplayCondition=X.getValueOrUndefined(s._distanceDisplayCondition,e,PCe),u.disableDepthTestDistance=X.getValueOrDefault(s._disableDepthTestDistance,e,ECe),u.splitDirection=X.getValueOrDefault(s._splitDirection,e,vCe),u.heightReference=f;let A=X.getValueOrDefault(s._color,e,xCe,SCe),y=X.getValueOrDefault(s._outlineColor,e,bCe,wCe),x=Math.round(X.getValueOrDefault(s._outlineWidth,e,CCe)),b=Math.max(1,Math.round(X.getValueOrDefault(s._pixelSize,e,TCe)));if(x>0?(u.scale=1,g=g||x!==r.outlineWidth||b!==r.pixelSize||!V.equals(A,r.color)||!V.equals(y,r.outlineColor)):(u.scale=b/50,b=50,g=g||x!==r.outlineWidth||!V.equals(A,r.color)||!V.equals(y,r.outlineColor)),g){r.color=V.clone(A,r.color),r.outlineColor=V.clone(y,r.outlineColor),r.pixelSize=b,r.outlineWidth=x;let C=A.alpha,E=A.toCssColorString(),S=y.toCssColorString(),w=JSON.stringify([E,b,S,x]);u.setImage(w,zb(C,E,S,x,b))}m&&u._updateClamping()}}return!0};by.prototype.getBoundingSphere=function(e,t){let n=this._items.get(e.id);if(!l(n)||!(l(n.pointPrimitive)||l(n.billboard)))return bt.FAILED;if(l(n.pointPrimitive))t.center=h.clone(n.pointPrimitive.position,t.center);else{let i=n.billboard;if(!l(i._clampedPosition))return bt.PENDING;t.center=h.clone(i._clampedPosition,t.center)}return t.radius=0,bt.DONE};by.prototype.isDestroyed=function(){return!1};by.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(by.prototype._onCollectionChanged,this);let e=this._entityCollection.values;for(let t=0;t<e.length;t++)this._cluster.removePoint(e[t]);return fe(this)};by.prototype._onCollectionChanged=function(e,t,n,i){let o,r,a=this._items,s=this._cluster;for(o=t.length-1;o>-1;o--)r=t[o],l(r._point)&&l(r._position)&&a.set(r.id,new RCe(r));for(o=i.length-1;o>-1;o--)r=i[o],l(r._point)&&l(r._position)?a.contains(r.id)||a.set(r.id,new RCe(r)):(X2(a.get(r.id),r,s),a.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],X2(a.get(r.id),r,s),a.remove(r.id)};function X2(e,t,n){if(l(e)){let i=e.pointPrimitive;if(l(i)){e.pointPrimitive=void 0,n.removePoint(t);return}let o=e.billboard;l(o)&&(e.billboard=void 0,n.removeBillboard(t))}}var K2=by;var NCe=[];function Amt(e,t,n,i,o){let r=NCe;r.length=o;let a,s=n.red,c=n.green,u=n.blue,f=n.alpha,d=i.red,p=i.green,g=i.blue,m=i.alpha;if(V.equals(n,i)){for(a=0;a<o;a++)r[a]=V.clone(n);return r}let A=(d-s)/o,y=(p-c)/o,x=(g-u)/o,b=(m-f)/o;for(a=0;a<o;a++)r[a]=new V(s+a*A,c+a*y,u+a*x,f+a*b);return r}function Q2(e){e=e??G.EMPTY_OBJECT;let t=e.positions,n=e.colors,i=e.width??1,o=e.colorsPerVertex??!1;this._positions=t,this._colors=n,this._width=i,this._colorsPerVertex=o,this._vertexFormat=Ne.clone(e.vertexFormat??Ne.DEFAULT),this._arcType=e.arcType??on.GEODESIC,this._granularity=e.granularity??D.RADIANS_PER_DEGREE,this._ellipsoid=te.clone(e.ellipsoid??te.default),this._workerName="createPolylineGeometry";let r=1+t.length*h.packedLength;r+=l(n)?1+n.length*V.packedLength:1,this.packedLength=r+te.packedLength+Ne.packedLength+4}Q2.pack=function(e,t,n){n=n??0;let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=h.packedLength)h.pack(o[i],t,n);let a=e._colors;for(r=l(a)?a.length:0,t[n++]=r,i=0;i<r;++i,n+=V.packedLength)V.pack(a[i],t,n);return te.pack(e._ellipsoid,t,n),n+=te.packedLength,Ne.pack(e._vertexFormat,t,n),n+=Ne.packedLength,t[n++]=e._width,t[n++]=e._colorsPerVertex?1:0,t[n++]=e._arcType,t[n]=e._granularity,t};var FCe=te.clone(te.UNIT_SPHERE),kCe=new Ne,UC={positions:void 0,colors:void 0,ellipsoid:FCe,vertexFormat:kCe,width:void 0,colorsPerVertex:void 0,arcType:void 0,granularity:void 0};Q2.unpack=function(e,t,n){t=t??0;let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=h.packedLength)r[i]=h.unpack(e,t);o=e[t++];let a=o>0?new Array(o):void 0;for(i=0;i<o;++i,t+=V.packedLength)a[i]=V.unpack(e,t);let s=te.unpack(e,t,FCe);t+=te.packedLength;let c=Ne.unpack(e,t,kCe);t+=Ne.packedLength;let u=e[t++],f=e[t++]===1,d=e[t++],p=e[t];return l(n)?(n._positions=r,n._colors=a,n._ellipsoid=te.clone(s,n._ellipsoid),n._vertexFormat=Ne.clone(c,n._vertexFormat),n._width=u,n._colorsPerVertex=f,n._arcType=d,n._granularity=p,n):(UC.positions=r,UC.colors=a,UC.width=u,UC.colorsPerVertex=f,UC.arcType=d,UC.granularity=p,new Q2(UC))};var OCe=new h,MCe=new h,BCe=new h,LCe=new h;Q2.createGeometry=function(e){let t=e._width,n=e._vertexFormat,i=e._colors,o=e._colorsPerVertex,r=e._arcType,a=e._granularity,s=e._ellipsoid,c,u,f,d=[],p=Fo(e._positions,h.equalsEpsilon,!1,d);if(l(i)&&d.length>0){let O=0,N=d[0];i=i.filter(function(j,k){let U=!1;return o?U=k===N||k===0&&N===1:U=k+1===N,U?(O++,N=d[O],!1):!0})}let g=p.length;if(g<2||t<=0)return;if(r===on.GEODESIC||r===on.RHUMB){let O,N;r===on.GEODESIC?(O=D.chordLength(a,s.maximumRadius),N=Yi.numberOfPoints):(O=a,N=Yi.numberOfPointsRhumbLine);let j=Yi.extractHeights(p,s);if(l(i)){let k=1;for(c=0;c<g-1;++c)k+=N(p[c],p[c+1],O);let U=new Array(k),F=0;for(c=0;c<g-1;++c){let H=p[c],q=p[c+1],J=i[c],W=N(H,q,O);if(o&&c<k){let Z=i[c+1],K=Amt(H,q,J,Z,W),le=K.length;for(u=0;u<le;++u)U[F++]=K[u]}else for(u=0;u<W;++u)U[F++]=V.clone(J)}U[F]=V.clone(i[i.length-1]),i=U,NCe.length=0}r===on.GEODESIC?p=Yi.generateCartesianArc({positions:p,minDistance:O,ellipsoid:s,height:j}):p=Yi.generateCartesianRhumbArc({positions:p,granularity:O,ellipsoid:s,height:j})}g=p.length;let m=g*4-4,A=new Float64Array(m*3),y=new Float64Array(m*3),x=new Float64Array(m*3),b=new Float32Array(m*2),C=n.st?new Float32Array(m*2):void 0,E=l(i)?new Uint8Array(m*4):void 0,S=0,w=0,P=0,R=0,B;for(u=0;u<g;++u){u===0?(B=OCe,h.subtract(p[0],p[1],B),h.add(p[0],B,B)):B=p[u-1],h.clone(B,BCe),h.clone(p[u],MCe),u===g-1?(B=OCe,h.subtract(p[g-1],p[g-2],B),h.add(p[g-1],B,B)):B=p[u+1],h.clone(B,LCe);let O,N;l(E)&&(u!==0&&!o?O=i[u-1]:O=i[u],u!==g-1&&(N=i[u]));let j=u===0?2:0,k=u===g-1?2:4;for(f=j;f<k;++f){h.pack(MCe,A,S),h.pack(BCe,y,S),h.pack(LCe,x,S),S+=3;let U=f-2<0?-1:1;if(b[w++]=2*(f%2)-1,b[w++]=U*t,n.st&&(C[P++]=u/(g-1),C[P++]=Math.max(b[w-2],0)),l(E)){let F=f<2?O:N;E[R++]=V.floatToByte(F.red),E[R++]=V.floatToByte(F.green),E[R++]=V.floatToByte(F.blue),E[R++]=V.floatToByte(F.alpha)}}}let L=new pn;L.position=new Me({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:A}),L.prevPosition=new Me({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:y}),L.nextPosition=new Me({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:x}),L.expandAndWidth=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:b}),n.st&&(L.st=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:C})),l(E)&&(L.color=new Me({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:4,values:E,normalize:!0}));let _=Ue.createTypedArray(m,g*6-6),T=0,v=0,I=g-1;for(u=0;u<I;++u)_[v++]=T,_[v++]=T+2,_[v++]=T+1,_[v++]=T+1,_[v++]=T+2,_[v++]=T+3,T+=4;return new At({attributes:L,indices:_,primitiveType:Re.TRIANGLES,boundingSphere:ce.fromPoints(p),geometryType:md.POLYLINES})};var d_=Q2;var ymt=new ci(0),aH={},zCe=new V,xmt=new Wt(V.WHITE),bmt=new ci(!0),Cmt=new ci(vn.DISABLED),Tmt=new ci(new kt),Emt=new ci(Wn.BOTH);function vmt(){this.vertexFormat=void 0,this.positions=void 0,this.width=void 0,this.arcType=void 0,this.granularity=void 0}function Smt(){this.positions=void 0,this.width=void 0,this.arcType=void 0,this.granularity=void 0}function Rm(e,t){this._entity=e,this._scene=t,this._entitySubscription=e.definitionChanged.addEventListener(Rm.prototype._onEntityPropertyChanged,this),this._fillEnabled=!1,this._dynamic=!1,this._geometryChanged=new ye,this._showProperty=void 0,this._materialProperty=void 0,this._shadowsProperty=void 0,this._distanceDisplayConditionProperty=void 0,this._classificationTypeProperty=void 0,this._depthFailMaterialProperty=void 0,this._geometryOptions=new vmt,this._groundGeometryOptions=new Smt,this._id=`polyline-${e.id}`,this._clampToGround=!1,this._supportsPolylinesOnTerrain=jo.supportsPolylinesOnTerrain(t),this._zIndex=0,this._onEntityPropertyChanged(e,"polyline",e.polyline,void 0)}Object.defineProperties(Rm.prototype,{id:{get:function(){return this._id}},entity:{get:function(){return this._entity}},fillEnabled:{get:function(){return this._fillEnabled}},hasConstantFill:{get:function(){return!this._fillEnabled||!l(this._entity.availability)&&X.isConstant(this._showProperty)}},fillMaterialProperty:{get:function(){return this._materialProperty}},depthFailMaterialProperty:{get:function(){return this._depthFailMaterialProperty}},outlineEnabled:{value:!1},hasConstantOutline:{value:!0},outlineColorProperty:{value:void 0},shadowsProperty:{get:function(){return this._shadowsProperty}},distanceDisplayConditionProperty:{get:function(){return this._distanceDisplayConditionProperty}},classificationTypeProperty:{get:function(){return this._classificationTypeProperty}},isDynamic:{get:function(){return this._dynamic}},isClosed:{value:!1},geometryChanged:{get:function(){return this._geometryChanged}},arcType:{get:function(){return this._arcType}},clampToGround:{get:function(){return this._clampToGround&&this._supportsPolylinesOnTerrain}},zIndex:{get:function(){return this._zIndex}}});Rm.prototype.isOutlineVisible=function(e){return!1};Rm.prototype.isFilled=function(e){let t=this._entity;return(this._fillEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e))??!1};Rm.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=new En(n&&t.isShowing&&this._showProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),r=Hn.fromDistanceDisplayCondition(o),a={show:i,distanceDisplayCondition:r},s;return this._materialProperty instanceof Wt&&(l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(s=this._materialProperty.color.getValue(e,zCe)),l(s)||(s=V.WHITE),a.color=Yt.fromColor(s)),this.clampToGround?new Ot({id:t,geometry:new zx(this._groundGeometryOptions),attributes:a}):(l(this._depthFailMaterialProperty)&&this._depthFailMaterialProperty instanceof Wt&&(l(this._depthFailMaterialProperty.color)&&(this._depthFailMaterialProperty.color.isConstant||n)&&(s=this._depthFailMaterialProperty.color.getValue(e,zCe)),l(s)||(s=V.WHITE),a.depthFailColor=Yt.fromColor(s)),new Ot({id:t,geometry:new d_(this._geometryOptions),attributes:a}))};Rm.prototype.createOutlineGeometryInstance=function(e){};Rm.prototype.isDestroyed=function(){return!1};Rm.prototype.destroy=function(){this._entitySubscription(),fe(this)};Rm.prototype._onEntityPropertyChanged=function(e,t,n,i){if(!(t==="availability"||t==="polyline"))return;let o=this._entity.polyline;if(!l(o)){this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this));return}let r=o.positions,a=o.show;if(l(a)&&a.isConstant&&!a.getValue(Qe.MINIMUM_VALUE)||!l(r)){this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this));return}let s=o.zIndex,c=o.material??xmt,u=c instanceof Wt;this._materialProperty=c,this._depthFailMaterialProperty=o.depthFailMaterial,this._showProperty=a??bmt,this._shadowsProperty=o.shadows??Cmt,this._distanceDisplayConditionProperty=o.distanceDisplayCondition??Tmt,this._classificationTypeProperty=o.classificationType??Emt,this._fillEnabled=!0,this._zIndex=s??ymt;let f=o.width,d=o.arcType,p=o.clampToGround,g=o.granularity;if(!r.isConstant||!X.isConstant(f)||!X.isConstant(d)||!X.isConstant(g)||!X.isConstant(p)||!X.isConstant(s))this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this));else{let m=this._geometryOptions,A=r.getValue(Qe.MINIMUM_VALUE,m.positions);if(!l(A)||A.length<2){this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this));return}let y;u&&(!l(this._depthFailMaterialProperty)||this._depthFailMaterialProperty instanceof Wt)?y=Oa.VERTEX_FORMAT:y=nc.VERTEX_FORMAT,m.vertexFormat=y,m.positions=A,m.width=l(f)?f.getValue(Qe.MINIMUM_VALUE):void 0,m.arcType=l(d)?d.getValue(Qe.MINIMUM_VALUE):void 0,m.granularity=l(g)?g.getValue(Qe.MINIMUM_VALUE):void 0;let x=this._groundGeometryOptions;x.positions=A,x.width=m.width,x.arcType=m.arcType,x.granularity=m.granularity,this._clampToGround=l(p)?p.getValue(Qe.MINIMUM_VALUE):!1,!this._clampToGround&&l(s)&&_t("Entity polylines must have clampToGround: true when using zIndex. zIndex will be ignored."),this._dynamic=!1,this._geometryChanged.raiseEvent(this)}};Rm.prototype.createDynamicUpdater=function(e,t){return new $2(e,t,this)};var xw={positions:void 0,granularity:void 0,height:void 0,ellipsoid:void 0};function $2(e,t,n){this._line=void 0,this._primitives=e,this._groundPrimitives=t,this._groundPolylinePrimitive=void 0,this._material=void 0,this._geometryUpdater=n,this._positions=[]}function UCe(e){if(l(e._line))return e._line;let t=e._primitives,n=e._geometryUpdater._scene.id+t._guid,i=aH[n];!l(i)||i.isDestroyed()?(i=new um,aH[n]=i,t.add(i)):t.contains(i)||t.add(i);let o=i.add();return o.id=e._geometryUpdater._entity,e._line=o,o}$2.prototype.update=function(e){let t=this._geometryUpdater,n=t._entity,i=n.polyline,o=i.positions,r=X.getValueOrUndefined(o,e,this._positions);t._clampToGround=X.getValueOrDefault(i._clampToGround,e,!1),t._groundGeometryOptions.positions=r,t._groundGeometryOptions.width=X.getValueOrDefault(i._width,e,1),t._groundGeometryOptions.arcType=X.getValueOrDefault(i._arcType,e,on.GEODESIC),t._groundGeometryOptions.granularity=X.getValueOrDefault(i._granularity,e,9999);let a=this._groundPrimitives;if(l(this._groundPolylinePrimitive)&&(a.remove(this._groundPolylinePrimitive),this._groundPolylinePrimitive=void 0),t.clampToGround){if(!n.isShowing||!n.isAvailable(e)||!X.getValueOrDefault(i._show,e,!0)||!l(r)||r.length<2)return;let d=t.fillMaterialProperty,p;if(d instanceof Wt)p=new Oa;else{let g=br.getValue(e,d,this._material);p=new nc({material:g,translucent:g.isTranslucent()}),this._material=g}this._groundPolylinePrimitive=a.add(new Fh({geometryInstances:t.createFillGeometryInstance(e),appearance:p,classificationType:t.classificationTypeProperty.getValue(e),asynchronous:!1}),X.getValueOrUndefined(t.zIndex,e)),l(this._line)&&(this._line.show=!1);return}let s=UCe(this);if(!n.isShowing||!n.isAvailable(e)||!X.getValueOrDefault(i._show,e,!0)){s.show=!1;return}if(!l(r)||r.length<2){s.show=!1;return}let c=on.GEODESIC;c=X.getValueOrDefault(i._arcType,e,c);let u=t._scene.globe,f=t._scene.ellipsoid;c!==on.NONE&&l(u)&&(xw.ellipsoid=f,xw.positions=r,xw.granularity=X.getValueOrUndefined(i._granularity,e),xw.height=Yi.extractHeights(r,f),c===on.GEODESIC?r=Yi.generateCartesianArc(xw):r=Yi.generateCartesianRhumbArc(xw)),s.show=!0,s.positions=r.slice(),s.material=br.getValue(e,t.fillMaterialProperty,s.material),s.width=X.getValueOrDefault(i._width,e,1),s.distanceDisplayCondition=X.getValueOrUndefined(i._distanceDisplayCondition,e,s.distanceDisplayCondition)};$2.prototype.getBoundingSphere=function(e){if(this._geometryUpdater.clampToGround){let t=this._groundPolylinePrimitive;if(l(t)&&t.show&&t.ready){let n=t.getGeometryInstanceAttributes(this._geometryUpdater._entity);if(l(n)&&l(n.boundingSphere))return ce.clone(n.boundingSphere,e),bt.DONE}return l(t)&&!t.ready?bt.PENDING:bt.DONE}else{let t=UCe(this);if(t.show&&t.positions.length>0)return ce.fromPoints(t.positions,e),bt.DONE}return bt.FAILED};$2.prototype.isDestroyed=function(){return!1};$2.prototype.destroy=function(){let t=this._geometryUpdater._scene.id+this._primitives._guid,n=aH[t];l(n)&&(n.remove(this._line),n.length===0&&(this._primitives.removeAndDestroy(n),delete aH[t])),l(this._groundPolylinePrimitive)&&this._groundPrimitives.remove(this._groundPolylinePrimitive),fe(this)};var J2=Rm;var wmt=new V,Imt=new kt,Dmt=new kt;function Om(e,t,n,i,o){let r;n instanceof Wt?r=Oa:r=nc,this.orderedGroundPrimitives=e,this.classificationType=t,this.appearanceType=r,this.materialProperty=n,this.updaters=new Lt,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new Lt,this.material=void 0,this.updatersWithAttributes=new Lt,this.attributes=new Lt,this.invalidated=!1,this.removeMaterialSubscription=n.definitionChanged.addEventListener(Om.prototype.onMaterialChanged,this),this.subscriptions=new Lt,this.showsUpdated=new Lt,this.zIndex=i,this._asynchronous=o}Om.prototype.onMaterialChanged=function(){this.invalidated=!0};Om.prototype.isMaterial=function(e){let t=this.materialProperty,n=e.fillMaterialProperty;return n===t||n instanceof Wt&&t instanceof Wt?!0:l(t)&&t.equals(n)};Om.prototype.add=function(e,t,n){let i=t.id;if(this.updaters.set(i,t),this.geometry.set(i,n),!t.hasConstantFill||!t.fillMaterialProperty.isConstant||!X.isConstant(t.distanceDisplayConditionProperty))this.updatersWithAttributes.set(i,t);else{let o=this;this.subscriptions.set(i,t.entity.definitionChanged.addEventListener(function(r,a,s,c){a==="isShowing"&&o.showsUpdated.set(t.id,t)}))}this.createPrimitive=!0};Om.prototype.remove=function(e){let t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);let n=this.subscriptions.get(t);return l(n)&&(n(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1};Om.prototype.update=function(e){let t=!0,n=this.primitive,i=this.orderedGroundPrimitives,o=this.geometry.values,r;if(this.createPrimitive){if(o.length>0){l(n)&&(l(this.oldPrimitive)?i.remove(n):this.oldPrimitive=n);let s=this.appearanceType;n=new Fh({show:!1,asynchronous:this._asynchronous,geometryInstances:o.slice(),appearance:new s,classificationType:this.classificationType}),this.appearanceType===nc&&(this.material=br.getValue(e,this.materialProperty,this.material),n.appearance.material=this.material),i.add(n,this.zIndex),t=!1}else{l(n)&&(i.remove(n),n=void 0);let s=this.oldPrimitive;l(s)&&(i.remove(s),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1}else if(l(n)&&n.ready){n.show=!0,l(this.oldPrimitive)&&(i.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.appearanceType===nc&&(this.material=br.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material);let a=this.updatersWithAttributes.values,s=a.length;for(r=0;r<s;r++){let c=a[r],u=c.entity,f=this.geometry.get(c.id),d=this.attributes.get(f.id.id);if(l(d)||(d=n.getGeometryInstanceAttributes(f.id),this.attributes.set(f.id.id,d)),!c.fillMaterialProperty.isConstant){let A=c.fillMaterialProperty.color,y=X.getValueOrDefault(A,e,V.WHITE,wmt);V.equals(d._lastColor,y)||(d._lastColor=V.clone(y,d._lastColor),d.color=Yt.toValue(y,d.color))}let p=u.isShowing&&(c.hasConstantFill||c.isFilled(e)),g=d.show[0]===1;p!==g&&(d.show=En.toValue(p,d.show));let m=c.distanceDisplayConditionProperty;if(!X.isConstant(m)){let A=X.getValueOrDefault(m,e,Dmt,Imt);kt.equals(A,d._lastDistanceDisplayCondition)||(d._lastDistanceDisplayCondition=kt.clone(A,d._lastDistanceDisplayCondition),d.distanceDisplayCondition=Hn.toValue(A,d.distanceDisplayCondition))}}this.updateShows(n)}else l(n)&&!n.ready&&(t=!1);return t};Om.prototype.updateShows=function(e){let t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){let o=t[i],r=o.entity,a=this.geometry.get(o.id),s=this.attributes.get(a.id.id);l(s)||(s=e.getGeometryInstanceAttributes(a.id),this.attributes.set(a.id.id,s));let c=r.isShowing,u=s.show[0]===1;c!==u&&(s.show=En.toValue(c,s.show),a.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()};Om.prototype.contains=function(e){return this.updaters.contains(e.id)};Om.prototype.getBoundingSphere=function(e,t){let n=this.primitive;if(!n.ready)return bt.PENDING;let i=n.getGeometryInstanceAttributes(e.entity);return!l(i)||!l(i.boundingSphere)||l(i.show)&&i.show[0]===0?bt.FAILED:(i.boundingSphere.clone(t),bt.DONE)};Om.prototype.destroy=function(){let e=this.primitive,t=this.orderedGroundPrimitives;l(e)&&t.remove(e);let n=this.oldPrimitive;l(n)&&t.remove(n),this.removeMaterialSubscription()};function bw(e,t,n){this._items=[],this._orderedGroundPrimitives=e,this._classificationType=t,this._asynchronous=n??!0}bw.prototype.add=function(e,t){let n=this._items,i=n.length,o=t.createFillGeometryInstance(e),r=X.getValueOrDefault(t.zIndex,0);for(let s=0;s<i;++s){let c=n[s];if(c.isMaterial(t)&&c.zIndex===r){c.add(e,t,o);return}}let a=new Om(this._orderedGroundPrimitives,this._classificationType,t.fillMaterialProperty,r,this._asynchronous);a.add(e,t,o),n.push(a)};bw.prototype.remove=function(e){let t=this._items,n=t.length;for(let i=n-1;i>=0;i--){let o=t[i];if(o.remove(e)){o.updaters.length===0&&(t.splice(i,1),o.destroy());break}}};bw.prototype.update=function(e){let t,n=this._items,i=n.length;for(t=i-1;t>=0;t--){let r=n[t];if(r.invalidated){n.splice(t,1);let a=r.updaters.values,s=a.length;for(let c=0;c<s;c++)this.add(e,a[c]);r.destroy()}}let o=!0;for(t=0;t<n.length;t++)o=n[t].update(e)&&o;return o};bw.prototype.getBoundingSphere=function(e,t){let n=this._items,i=n.length;for(let o=0;o<i;o++){let r=n[o];if(r.contains(e))return r.getBoundingSphere(e,t)}return bt.FAILED};bw.prototype.removeAllPrimitives=function(){let e=this._items,t=e.length;for(let n=0;n<t;n++)e[n].destroy();this._items.length=0};var Z2=bw;var Pmt=[];function VCe(e,t){let n=e._batches,i=n.length;for(let o=0;o<i;o++)n[o].remove(t)}function jCe(e,t,n){if(n.isDynamic){e._dynamicBatch.add(t,n);return}if(n.clampToGround&&n.fillEnabled){let a=n.classificationTypeProperty.getValue(t);e._groundBatches[a].add(t,n);return}let i;n.fillEnabled&&(i=n.shadowsProperty.getValue(t));let o=0;l(n.depthFailMaterialProperty)&&(o=n.depthFailMaterialProperty instanceof Wt?1:2);let r;l(i)&&(r=i+o*vn.NUMBER_OF_SHADOW_MODES),n.fillEnabled&&(n.fillMaterialProperty instanceof Wt?e._colorBatches[r].add(t,n):e._materialBatches[r].add(t,n))}function qp(e,t,n,i){i=i??e.groundPrimitives,n=n??e.primitives,this._scene=e,this._primitives=n,this._entityCollection=void 0,this._addedObjects=new Lt,this._removedObjects=new Lt,this._changedObjects=new Lt;let o,r=vn.NUMBER_OF_SHADOW_MODES;for(this._colorBatches=new Array(r*3),this._materialBatches=new Array(r*3),o=0;o<r;++o)this._colorBatches[o]=new th(n,Oa,void 0,!1,o),this._materialBatches[o]=new nh(n,nc,void 0,!1,o),this._colorBatches[o+r]=new th(n,Oa,Oa,!1,o),this._materialBatches[o+r]=new nh(n,nc,Oa,!1,o),this._colorBatches[o+r*2]=new th(n,Oa,nc,!1,o),this._materialBatches[o+r*2]=new nh(n,nc,nc,!1,o);this._dynamicBatch=new SC(n,i);let a=Wn.NUMBER_OF_CLASSIFICATION_TYPES;for(this._groundBatches=new Array(a),o=0;o<a;++o)this._groundBatches[o]=new Z2(i,o);this._batches=this._colorBatches.concat(this._materialBatches,this._dynamicBatch,this._groundBatches),this._subscriptions=new Lt,this._updaters=new Lt,this._entityCollection=t,t.collectionChanged.addEventListener(qp.prototype._onCollectionChanged,this),this._onCollectionChanged(t,t.values,Pmt)}qp.prototype.update=function(e){let t=this._addedObjects,n=t.values,i=this._removedObjects,o=i.values,r=this._changedObjects,a=r.values,s,c,u,f;for(s=a.length-1;s>-1;s--)c=a[s],u=c.id,f=this._updaters.get(u),f.entity===c?(VCe(this,f),jCe(this,e,f)):(o.push(c),n.push(c));for(s=o.length-1;s>-1;s--)c=o[s],u=c.id,f=this._updaters.get(u),VCe(this,f),f.destroy(),this._updaters.remove(u),this._subscriptions.get(u)(),this._subscriptions.remove(u);for(s=n.length-1;s>-1;s--)c=n[s],u=c.id,f=new J2(c,this._scene),this._updaters.set(u,f),jCe(this,e,f),this._subscriptions.set(u,f.geometryChanged.addEventListener(qp._onGeometryChanged,this));t.removeAll(),i.removeAll(),r.removeAll();let d=!0,p=this._batches,g=p.length;for(s=0;s<g;s++)d=p[s].update(e)&&d;return d};var Rmt=[],Omt=new ce;qp.prototype.getBoundingSphere=function(e,t){let n=Rmt,i=Omt,o=0,r=bt.DONE,a=this._batches,s=a.length,c=this._updaters.get(e.id);for(let u=0;u<s;u++){if(r=a[u].getBoundingSphere(c,i),r===bt.PENDING)return bt.PENDING;r===bt.DONE&&(n[o]=ce.clone(i,n[o]),o++)}return o===0?bt.FAILED:(n.length=o,ce.fromBoundingSpheres(n,t),bt.DONE)};qp.prototype.isDestroyed=function(){return!1};qp.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(qp.prototype._onCollectionChanged,this),this._addedObjects.removeAll(),this._removedObjects.removeAll();let e,t=this._batches,n=t.length;for(e=0;e<n;e++)t[e].removeAllPrimitives();let i=this._subscriptions.values;for(n=i.length,e=0;e<n;e++)i[e]();return this._subscriptions.removeAll(),fe(this)};qp._onGeometryChanged=function(e){let t=this._removedObjects,n=this._changedObjects,i=e.entity,o=i.id;!l(t.get(o))&&!l(n.get(o))&&n.set(o,i)};qp.prototype._onCollectionChanged=function(e,t,n){let i=this._addedObjects,o=this._removedObjects,r=this._changedObjects,a,s,c;for(a=n.length-1;a>-1;a--)c=n[a],s=c.id,i.remove(s)||(o.set(s,c),r.remove(s));for(a=t.length-1;a>-1;a--)c=t[a],s=c.id,o.remove(s)?r.set(s,c):i.set(s,c)};var ek=qp;function qu(e){Nl.initializeTerrainHeights(),Fh.initializeTerrainHeights();let t=e.scene,n=e.dataSourceCollection;this._eventHelper=new Nr,this._eventHelper.add(n.dataSourceAdded,this._onDataSourceAdded,this),this._eventHelper.add(n.dataSourceRemoved,this._onDataSourceRemoved,this),this._eventHelper.add(n.dataSourceMoved,this._onDataSourceMoved,this),this._eventHelper.add(t.postRender,this._postRender,this),this._dataSourceCollection=n,this._scene=t,this._visualizersCallback=e.visualizersCallback??qu.defaultVisualizersCallback;let i=!1,o=new su,r=new su;n.length>0&&(t.primitives.add(o),t.groundPrimitives.add(r),i=!0),this._primitives=o,this._groundPrimitives=r;for(let u=0,f=n.length;u<f;u++)this._onDataSourceAdded(n,n.get(u));let a=new JF;this._onDataSourceAdded(void 0,a),this._defaultDataSource=a;let s,c;if(!i){let u=this,f=function(){t.primitives.add(o),t.groundPrimitives.add(r),s(),c(),u._removeDefaultDataSourceListener=void 0,u._removeDataSourceCollectionListener=void 0};s=a.entities.collectionChanged.addEventListener(f),c=n.dataSourceAdded.addEventListener(f)}this._removeDefaultDataSourceListener=s,this._removeDataSourceCollectionListener=c,this._ready=!1}var Cw=[];qu.registerVisualizer=function(e){Cw.includes(e)||Cw.push(e)};qu.unregisterVisualizer=function(e){if(Cw.includes(e)){let t=Cw.indexOf(e);Cw.splice(t,1)}};qu.defaultVisualizersCallback=function(e,t,n){let i=n.entities;return[new IR(t,i),new j2(e,i,n._primitives,n._groundPrimitives),new G2(t,i),new H2(e,i),new kF(e,i),new K2(t,i),new Y2(e,i),new ek(e,i,n._primitives,n._groundPrimitives),...Cw.map(o=>new o(e,i))]};Object.defineProperties(qu.prototype,{scene:{get:function(){return this._scene}},dataSources:{get:function(){return this._dataSourceCollection}},defaultDataSource:{get:function(){return this._defaultDataSource}},ready:{get:function(){return this._ready}}});qu.prototype.isDestroyed=function(){return!1};qu.prototype.destroy=function(){this._eventHelper.removeAll();let e=this._dataSourceCollection;for(let t=0,n=e.length;t<n;++t)this._onDataSourceRemoved(this._dataSourceCollection,e.get(t));return this._onDataSourceRemoved(void 0,this._defaultDataSource),l(this._removeDefaultDataSourceListener)?(this._removeDefaultDataSourceListener(),this._removeDataSourceCollectionListener()):(this._scene.primitives.remove(this._primitives),this._scene.groundPrimitives.remove(this._groundPrimitives)),fe(this)};qu.prototype.update=function(e){if(!vi.initialized)return this._ready=!1,!1;let t=!0,n,i,o,r,a=this._dataSourceCollection,s=a.length;for(n=0;n<s;n++){let c=a.get(n);for(l(c.update)&&(t=c.update(e)&&t),o=c._visualizers,r=o.length,i=0;i<r;i++)t=o[i].update(e)&&t}for(o=this._defaultDataSource._visualizers,r=o.length,i=0;i<r;i++)t=o[i].update(e)&&t;return!this._ready&&t&&this._scene.requestRender(),this._ready=this._ready||t,t};qu.prototype._postRender=function(){let e=this._scene.frameState,t=this._dataSourceCollection,n=t.length;for(let i=0;i<n;i++){let o=t.get(i),r=o.credit;l(r)&&e.creditDisplay.addCreditToNextFrame(r);let a=o._resourceCredits;if(l(a)){let s=a.length;for(let c=0;c<s;c++)e.creditDisplay.addCreditToNextFrame(a[c])}}};var Mmt=[],Bmt=new ce;qu.prototype.getBoundingSphere=function(e,t,n){if(!this._ready)return bt.PENDING;let i,o,r=this._defaultDataSource;if(!r.entities.contains(e)){r=void 0;let p=this._dataSourceCollection;for(o=p.length,i=0;i<o;i++){let g=p.get(i);if(g.entities.contains(e)){r=g;break}}}if(!l(r))return bt.FAILED;let a=Mmt,s=Bmt,c=0,u=bt.DONE,f=r._visualizers,d=f.length;for(i=0;i<d;i++){let p=f[i];if(l(p.getBoundingSphere)){if(u=f[i].getBoundingSphere(e,s),!t&&u===bt.PENDING)return bt.PENDING;u===bt.DONE&&(a[c]=ce.clone(s,a[c]),c++)}}return c===0?bt.FAILED:(a.length=c,ce.fromBoundingSpheres(a,n),bt.DONE)};qu.prototype._onDataSourceAdded=function(e,t){let n=this._scene,i=this._primitives,o=this._groundPrimitives,r=i.add(new su),a=o.add(new h2);t._primitives=r,t._groundPrimitives=a;let s=t.clustering;s._initialize(n),r.add(s),t._visualizers=this._visualizersCallback(n,s,t)};qu.prototype._onDataSourceRemoved=function(e,t){let n=this._primitives,i=this._groundPrimitives,o=t._primitives,r=t._groundPrimitives,a=t.clustering;o.remove(a);let s=t._visualizers,c=s.length;for(let u=0;u<c;u++)s[u].destroy();n.remove(o),i.remove(r),t._visualizers=void 0};qu.prototype._onDataSourceMoved=function(e,t,n){let i=this._primitives,o=this._groundPrimitives,r=e._primitives,a=e._groundPrimitives;t===n+1?(i.raise(r),o.raise(a)):t===n-1?(i.lower(r),o.lower(a)):t===0?(i.lowerToBottom(r),o.lowerToBottom(a),i.raise(r),o.raise(a)):(i.raiseToTop(r),o.raiseToTop(a))};var tk=qu;function AJ(e,t,n){this.heading=e??0,this.pitch=t??0,this.range=n??0}AJ.clone=function(e,t){if(l(e))return l(t)||(t=new AJ),t.heading=e.heading,t.pitch=e.pitch,t.range=e.range,t};var ih=AJ;var GCe=new $,HCe=new $,WCe=new $,Lmt=new M,sH=new h,qCe=new h,yJ=new h,xJ=new h,YCe=new h,XCe=new h,Nmt=new Le,Fmt=new h,kmt=new $,Tw=new Q,zmt=1.25;function Umt(e,t,n,i,o,r,a,s,c,u){let f=e.scene.mode,d=o.getValue(c,e._lastCartesian);if(l(d)){let p=!1,g=!1,m,A,y;if(f===ie.SCENE3D){Q.addSeconds(c,.001,Tw);let P=o.getValue(Tw,sH);if(l(P)||(Q.addSeconds(c,-.001,Tw),P=o.getValue(Tw,sH),g=!0),l(P)){let R=pt.computeFixedToIcrfMatrix(c,GCe),B=pt.computeFixedToIcrfMatrix(Tw,HCe),L;!l(R)||!l(B)?(L=pt.computeTemeToPseudoFixedMatrix(c,WCe),R=$.transpose(L,GCe),B=pt.computeTemeToPseudoFixedMatrix(Tw,HCe),$.transpose(B,B)):L=$.transpose(R,WCe);let _=$.multiplyByVector(R,d,YCe),T=$.multiplyByVector(B,P,XCe);h.subtract(_,T,xJ);let v=h.magnitude(xJ)*1e3,I=D.GRAVITATIONALPARAMETER,O=-I/(v*v-2*I/h.magnitude(_));O<0||O>zmt*u.maximumRadius?(m=qCe,h.normalize(d,m),h.negate(m,m),y=h.clone(h.UNIT_Z,yJ),A=h.cross(y,m,sH),h.magnitude(A)>D.EPSILON7&&(h.normalize(m,m),h.normalize(A,A),y=h.cross(m,A,yJ),h.normalize(y,y),p=!0)):h.equalsEpsilon(d,P,D.EPSILON7)||(y=qCe,h.normalize(_,y),h.normalize(T,T),A=h.cross(y,T,yJ),g&&(A=h.multiplyByScalar(A,-1,A)),h.equalsEpsilon(A,h.ZERO,D.EPSILON7)||(m=h.cross(A,y,sH),$.multiplyByVector(L,m,m),$.multiplyByVector(L,A,A),$.multiplyByVector(L,y,y),h.normalize(m,m),h.normalize(A,A),h.normalize(y,y),p=!0))}}l(e.boundingSphere)&&(d=e.boundingSphere.center);let x,b,C;i&&(x=h.clone(t.position,xJ),b=h.clone(t.direction,YCe),C=h.clone(t.up,XCe));let E=Lmt,S;l(a)&&(S=a.getValue(c,Nmt));let w=r.getValue(c,Fmt);if(s===q0.INERTIAL&&l(S))M.fromTranslationQuaternionRotationScale(d,S,h.ONE,E);else if(s===q0.VELOCITY&&l(w)){let P=pt.rotationMatrixFromPositionVelocity(d,w,u,kmt);M.fromRotationTranslation(P,d,E)}else s===q0.ENU||!p?pt.eastNorthUpToFixedFrame(d,u,E):(E[0]=m.x,E[1]=m.y,E[2]=m.z,E[3]=0,E[4]=A.x,E[5]=A.y,E[6]=A.z,E[7]=0,E[8]=y.x,E[9]=y.y,E[10]=y.z,E[11]=0,E[12]=d.x,E[13]=d.y,E[14]=d.z,E[15]=0);t._setTransform(E),i&&(h.clone(x,t.position),h.clone(b,t.direction),h.clone(C,t.up),h.cross(b,C,t.right))}if(n){let p=f===ie.SCENE2D||h.equals(e._offset3D,h.ZERO)?void 0:e._offset3D;t.lookAtTransform(t.transform,p)}}function nk(e,t,n){this.entity=e,this.scene=t,this.ellipsoid=n??te.default,this.boundingSphere=void 0,this._lastEntity=void 0,this._mode=void 0,this._lastCartesian=new h,this._defaultOffset3D=void 0,this._velocityProperty=new a_(e.position,!0),this._offset3D=new h}Object.defineProperties(nk,{defaultOffset3D:{get:function(){return this._defaultOffset3D},set:function(e){this._defaultOffset3D=h.clone(e,new h)}}});nk.defaultOffset3D=new h(-14e3,3500,3500);var cH=new ih,Vmt=new h;nk.prototype.update=function(e,t){let n=this.scene,i=this.ellipsoid,o=n.mode;if(o===ie.MORPHING)return;let r=this.entity,a=r.trackingReferenceFrame,s=r.position;if(!l(s))return;let c=this._velocityProperty,u=r.orientation,f=r!==this._lastEntity,d=o!==this._mode,p=n.camera,g=f||d,m=!0;if(f){let A=r.viewFrom,y=l(A);if(!y&&l(t)){cH.pitch=-D.PI_OVER_FOUR,cH.range=0;let x=s.getValue(e,Vmt);if(l(x)){let b=2-1/Math.max(1,h.magnitude(x)/i.maximumRadius);cH.pitch*=b}p.viewBoundingSphere(t,cH),this.boundingSphere=t,g=!1,m=!1}else(!y||!l(A.getValue(e,this._offset3D)))&&h.clone(nk._defaultOffset3D,this._offset3D)}else!d&&this._mode!==ie.SCENE2D&&h.clone(p.position,this._offset3D);this._lastEntity=r,this._mode=o,Umt(this,p,g,m,s,c,u,a,e,i)};var ik=nk;function rk(){this._cache={}}rk.prototype.fromColor=function(e,t){return lH(void 0,void 0,e,t,this._cache)};rk.prototype.fromUrl=function(e,t,n){return lH(e,void 0,t,n,this._cache)};rk.prototype.fromMakiIconId=function(e,t,n){return lH(Xt(`Assets/Textures/maki/${encodeURIComponent(e)}.png`),void 0,t,n,this._cache)};rk.prototype.fromText=function(e,t,n){return lH(void 0,e,t,n,this._cache)};var jmt=new V;function Gmt(e,t,n){e.save(),e.scale(n/24,n/24),e.fillStyle=t.toCssColorString(),e.strokeStyle=t.brighten(.6,jmt).toCssColorString(),e.lineWidth=.846,e.beginPath(),e.moveTo(6.72,.422),e.lineTo(17.28,.422),e.bezierCurveTo(18.553,.422,19.577,1.758,19.577,3.415),e.lineTo(19.577,10.973),e.bezierCurveTo(19.577,12.63,18.553,13.966,17.282,13.966),e.lineTo(14.386,14.008),e.lineTo(11.826,23.578),e.lineTo(9.614,14.008),e.lineTo(6.719,13.965),e.bezierCurveTo(5.446,13.983,4.422,12.629,4.422,10.972),e.lineTo(4.422,3.416),e.bezierCurveTo(4.423,1.76,5.447,.423,6.718,.423),e.closePath(),e.fill(),e.stroke(),e.restore()}function KCe(e,t,n){let i=n/2.5,o=i,r=i;t.width>t.height?r=i*(t.height/t.width):t.width<t.height&&(o=i*(t.width/t.height));let a=Math.round((n-o)/2),s=Math.round(7/24*n-r/2);e.globalCompositeOperation="destination-out",e.drawImage(t,a-1,s,o,r),e.drawImage(t,a,s-1,o,r),e.drawImage(t,a+1,s,o,r),e.drawImage(t,a,s+1,o,r),e.globalCompositeOperation="destination-over",e.fillStyle=V.BLACK.toCssColorString(),e.fillRect(a-1,s-1,o+2,r+2),e.globalCompositeOperation="destination-out",e.drawImage(t,a,s,o,r),e.globalCompositeOperation="destination-over",e.fillStyle=V.WHITE.toCssColorString(),e.fillRect(a-1,s-2,o+2,r+2)}var ok=new Array(4);function lH(e,t,n,i,o){ok[0]=e,ok[1]=t,ok[2]=n,ok[3]=i;let r=JSON.stringify(ok),a=o[r];if(l(a))return a;let s=document.createElement("canvas");s.width=i,s.height=i;let c=s.getContext("2d");if(Gmt(c,n,i),l(e)){let f=De.createIfNeeded(e).fetchImage().then(function(d){return KCe(c,d,i),o[r]=s,s});return o[r]=f,f}else if(l(t)){let u=Vb(t,{font:`bold ${i}px sans-serif`});KCe(c,u,i)}return o[r]=s,s}var h_=rk;var JCe=Yr($Ce(),1);function fH(e){return h.fromDegrees(e[0],e[1],e[2])}var bJ={"urn:ogc:def:crs:OGC:1.3:CRS84":fH,"EPSG:4326":fH,"urn:ogc:def:crs:EPSG::4326":fH},ZCe={},eTe={},CJ=48,TJ,EJ=V.ROYALBLUE,vJ=V.YELLOW,SJ=2,wJ=V.fromBytes(255,255,0,100),IJ=!1,Hmt={small:24,medium:48,large:64},Wmt=["title","description","marker-size","marker-symbol","marker-color","stroke","stroke-opacity","stroke-width","fill","fill-opacity"];function tTe(e,t){let n="";for(let i in e)if(e.hasOwnProperty(i)){if(i===t||Wmt.indexOf(i)!==-1)continue;let o=e[i];l(o)&&(typeof o=="object"?n+=`<tr><th>${i}</th><td>${tTe(o)}</td></tr>`:n+=`<tr><th>${i}</th><td>${o}</td></tr>`)}return n.length>0&&(n=`<table class="cesium-infoBox-defaultTable"><tbody>${n}</tbody></table>`),n}function qmt(e,t,n){let i;return function(o,r){return l(i)||(i=e(t,n)),i}}function Ymt(e,t){return new jh(qmt(tTe,e,t),!0)}function dH(e,t,n){let i=e.id;if(!l(i)||e.type!=="Feature")i=jn();else{let a=2,s=i;for(;l(t.getById(s));)s=`${i}_${a}`,a++;i=s}let o=t.getOrCreateEntity(i),r=e.properties;if(l(r)){o.properties=r;let a,s=r.title;if(l(s))o.name=s,a="title";else{let u=Number.MAX_VALUE;for(let f in r)if(r.hasOwnProperty(f)&&r[f]){let d=f.toLowerCase();if(u>1&&d==="title"){u=1,a=f;break}else u>2&&d==="name"?(u=2,a=f):u>3&&/title/i.test(f)?(u=3,a=f):u>4&&/name/i.test(f)&&(u=4,a=f)}l(a)&&(o.name=r[a])}let c=r.description;c!==null&&(o.description=l(c)?new ci(c):n(r,a))}return o}function DJ(e,t){let n=new Array(e.length);for(let i=0;i<e.length;i++)n[i]=t(e[i]);return n}var nTe={Feature:oTe,FeatureCollection:Xmt,GeometryCollection:rTe,LineString:uTe,MultiLineString:fTe,MultiPoint:cTe,MultiPolygon:mTe,Point:sTe,Polygon:hTe,Topology:pTe},iTe={GeometryCollection:rTe,LineString:uTe,MultiLineString:fTe,MultiPoint:cTe,MultiPolygon:mTe,Point:sTe,Polygon:hTe,Topology:pTe};function oTe(e,t,n,i,o){if(t.geometry===null){dH(t,e._entityCollection,o.describe);return}if(!l(t.geometry))throw new re("feature.geometry is required.");let r=t.geometry.type,a=iTe[r];if(!l(a))throw new re(`Unknown geometry type: ${r}`);a(e,t,t.geometry,i,o)}function Xmt(e,t,n,i,o){let r=t.features;for(let a=0,s=r.length;a<s;a++)oTe(e,r[a],void 0,i,o)}function rTe(e,t,n,i,o){let r=n.geometries;for(let a=0,s=r.length;a<s;a++){let c=r[a],u=c.type,f=iTe[u];if(!l(f))throw new re(`Unknown geometry type: ${u}`);f(e,t,c,i,o)}}function aTe(e,t,n,i,o){let r=o.markerSymbol,a=o.markerColor,s=o.markerSize,c=t.properties;if(l(c)){let g=c["marker-color"];l(g)&&(a=V.fromCssColorString(g)),s=Hmt[c["marker-size"]]??s;let m=c["marker-symbol"];l(m)&&(r=m)}let u;l(r)?r.length===1?u=e._pinBuilder.fromText(r.toUpperCase(),a,s):u=e._pinBuilder.fromMakiIconId(r,a,s):u=e._pinBuilder.fromColor(a,s);let f=new Jc;f.verticalOrigin=new ci(zn.BOTTOM),i.length===2&&o.clampToGround&&(f.heightReference=nt.CLAMP_TO_GROUND);let d=dH(t,e._entityCollection,o.describe);d.billboard=f,d.position=new zl(n(i));let p=Promise.resolve(u).then(function(g){f.image=new ci(g)}).catch(function(){f.image=new ci(e._pinBuilder.fromColor(a,s))});e._promises.push(p)}function sTe(e,t,n,i,o){aTe(e,t,i,n.coordinates,o)}function cTe(e,t,n,i,o){let r=n.coordinates;for(let a=0;a<r.length;a++)aTe(e,t,i,r[a],o)}function lTe(e,t,n,i,o){let r=o.strokeMaterialProperty,a=o.strokeWidthProperty,s=t.properties;if(l(s)){let f=s["stroke-width"];l(f)&&(a=new ci(f));let d,p=s.stroke;l(p)&&(d=V.fromCssColorString(p));let g=s["stroke-opacity"];l(g)&&g!==1&&(l(d)||(d=r.color.getValue().clone()),d.alpha=g),l(d)&&(r=new Wt(d))}let c=dH(t,e._entityCollection,o.describe),u=new el;c.polyline=u,u.clampToGround=o.clampToGround,u.material=r,u.width=a,u.positions=new ci(DJ(i,n)),u.arcType=on.RHUMB}function uTe(e,t,n,i,o){lTe(e,t,i,n.coordinates,o)}function fTe(e,t,n,i,o){let r=n.coordinates;for(let a=0;a<r.length;a++)lTe(e,t,i,r[a],o)}function dTe(e,t,n,i,o){if(i.length===0||i[0].length===0)return;let r=o.strokeMaterialProperty.color,a=o.fillMaterialProperty,s=o.strokeWidthProperty,c=t.properties;if(l(c)){let g=c["stroke-width"];l(g)&&(s=new ci(g));let m,A=c.stroke;l(A)&&(m=V.fromCssColorString(A));let y=c["stroke-opacity"];l(y)&&y!==1&&(l(m)||(m=r.getValue().clone()),m.alpha=y),l(m)&&(r=new ci(m));let x,b=c.fill,C=a.color.getValue();l(b)&&(x=V.fromCssColorString(b),x.alpha=C.alpha),y=c["fill-opacity"],l(y)&&y!==C.alpha&&(l(x)||(x=C.clone()),x.alpha=y),l(x)&&(a=new Wt(x))}let u=new Uh;u.outline=new ci(!0),u.outlineColor=r,u.outlineWidth=s,u.material=a,u.arcType=on.RHUMB;let f=[];for(let g=1,m=i.length;g<m;g++)f.push(new Ic(DJ(i[g],n)));let d=i[0];u.hierarchy=new ci(new Ic(DJ(d,n),f)),d[0].length>2?u.perPositionHeight=new ci(!0):o.clampToGround||(u.height=0);let p=dH(t,e._entityCollection,o.describe);p.polygon=u}function hTe(e,t,n,i,o){dTe(e,t,i,n.coordinates,o)}function mTe(e,t,n,i,o){let r=n.coordinates;for(let a=0;a<r.length;a++)dTe(e,t,i,r[a],o)}function pTe(e,t,n,i,o){for(let r in n.objects)if(n.objects.hasOwnProperty(r)){let a=JCe.feature(n,n.objects[r]),s=nTe[a.type];s(e,a,a,i,o)}}function Cy(e){this._name=e,this._changed=new ye,this._error=new ye,this._isLoading=!1,this._loading=new ye,this._entityCollection=new Vs(this),this._promises=[],this._pinBuilder=new h_,this._entityCluster=new Bf,this._credit=void 0,this._resourceCredits=[]}Cy.load=function(e,t){return new Cy().load(e,t)};Object.defineProperties(Cy,{markerSize:{get:function(){return CJ},set:function(e){CJ=e}},markerSymbol:{get:function(){return TJ},set:function(e){TJ=e}},markerColor:{get:function(){return EJ},set:function(e){EJ=e}},stroke:{get:function(){return vJ},set:function(e){vJ=e}},strokeWidth:{get:function(){return SJ},set:function(e){SJ=e}},fill:{get:function(){return wJ},set:function(e){wJ=e}},clampToGround:{get:function(){return IJ},set:function(e){IJ=e}},crsNames:{get:function(){return bJ}},crsLinkHrefs:{get:function(){return ZCe}},crsLinkTypes:{get:function(){return eTe}}});Object.defineProperties(Cy.prototype,{name:{get:function(){return this._name},set:function(e){this._name!==e&&(this._name=e,this._changed.raiseEvent(this))}},clock:{value:void 0,writable:!1},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){this._entityCluster=e}},credit:{get:function(){return this._credit}}});Cy.prototype.load=function(e,t){return gTe(this,e,t,!0)};Cy.prototype.process=function(e,t){return gTe(this,e,t,!1)};function gTe(e,t,n,i){Ea.setLoading(e,!0),n=n??G.EMPTY_OBJECT;let o=n.credit;typeof o=="string"&&(o=new yt(o)),e._credit=o;let r=t,a=n.sourceUri;if(typeof t=="string"||t instanceof De){t=De.createIfNeeded(t),r=t.fetchJson(),a=a??t.getUrlComponent();let s=e._resourceCredits,c=t.credits;if(l(c)){let u=c.length;for(let f=0;f<u;f++)s.push(c[f])}}return n={describe:n.describe??Ymt,markerSize:n.markerSize??CJ,markerSymbol:n.markerSymbol??TJ,markerColor:n.markerColor??EJ,strokeWidthProperty:new ci(n.strokeWidth??SJ),strokeMaterialProperty:new Wt(n.stroke??vJ),fillMaterialProperty:new Wt(n.fill??wJ),clampToGround:n.clampToGround??IJ},Promise.resolve(r).then(function(s){return Kmt(e,s,n,a,i)}).catch(function(s){throw Ea.setLoading(e,!1),e._error.raiseEvent(e,s),s})}Cy.prototype.update=function(e){return!0};function Kmt(e,t,n,i,o){let r;l(i)&&(r=e_(i)),l(r)&&e._name!==r&&(e._name=r,e._changed.raiseEvent(e));let a=nTe[t.type];if(!l(a))throw new re(`Unsupported GeoJSON object type: ${t.type}`);let s=t.crs,c=s!==null?fH:null;if(l(s)){if(!l(s.properties))throw new re("crs.properties is undefined.");let u=s.properties;if(s.type==="name"){if(c=bJ[u.name],!l(c))throw new re(`Unknown crs name: ${u.name}`)}else if(s.type==="link"){let f=ZCe[u.href];if(l(f)||(f=eTe[u.type]),!l(f))throw new re(`Unable to resolve crs link: ${JSON.stringify(u)}`);c=f(u)}else if(s.type==="EPSG"){if(c=bJ[`EPSG:${u.code}`],!l(c))throw new re(`Unknown crs EPSG code: ${u.code}`)}else throw new re(`Unknown crs type: ${s.type}`)}return Promise.resolve(c).then(function(u){return o&&e._entityCollection.removeAll(),u!==null&&a(e,t,t,u,n),Promise.all(e._promises).then(function(){return e._promises.length=0,Ea.setLoading(e,!1),e})})}var Ty=Cy;var yEe=Yr(nZ(),1);var xEe;typeof DOMParser<"u"&&(xEe=new DOMParser);var c_t=new yEe.default({stripPrefix:!1,email:!1,replaceFn:function(e,t){return t.urlMatchType==="scheme"||t.urlMatchType==="www"}}),OH=32,fEe=2414016,dEe=1,hEe=16093e3,mEe=.1,l_t=[null,void 0,"http://www.topografix.com/GPX/1/1"],Wo={gpx:l_t};function u_t(e){return new Promise((t,n)=>{let i=new FileReader;i.addEventListener("load",function(){t(i.result)}),i.addEventListener("error",function(){n(i.error)}),i.readAsText(e)})}function iZ(e,t){let n=lk(e,"id");return n=l(n)?n:jn(),t.getOrCreateEntity(n)}function oZ(e){let t=pEe(e,"lon"),n=pEe(e,"lat"),i=sk(e,"ele",Wo.gpx);return h.fromDegrees(t,n,i)}function pEe(e,t){if(!l(e))return;let n=e.getAttribute(t);if(n!==null){let i=parseFloat(n);return isNaN(i)?void 0:i}}function lk(e,t){if(!l(e))return;let n=e.getAttribute(t);return n!==null?n:void 0}function Sy(e,t,n){if(!l(e))return;let i=e.childNodes,o=i.length;for(let r=0;r<o;r++){let a=i[r];if(a.localName===t&&n.indexOf(a.namespaceURI)!==-1)return a}}function rZ(e,t,n){if(!l(e))return;let i=[],o=e.getElementsByTagName(t),r=o.length;for(let a=0;a<r;a++){let s=o[a];s.localName===t&&n.indexOf(s.namespaceURI)!==-1&&i.push(s)}return i}function sk(e,t,n){let i=Sy(e,t,n);if(l(i)){let o=parseFloat(i.textContent);return isNaN(o)?void 0:o}}function Yu(e,t,n){let i=Sy(e,t,n);if(l(i))return i.textContent.trim()}function bEe(e){let t=new Jc;return t.width=OH,t.height=OH,t.scaleByDistance=new zt(fEe,dEe,hEe,mEe),t.pixelOffsetScaleByDistance=new zt(fEe,dEe,hEe,mEe),t.verticalOrigin=new ci(zn.BOTTOM),t.image=e,t}function f_t(){let e=new zh;return e.translucencyByDistance=new zt(3e6,1,5e6,0),e.pixelOffset=new z(17,0),e.horizontalOrigin=Oi.LEFT,e.font="16px sans-serif",e.style=sr.FILL_AND_OUTLINE,e}function CEe(e){let t=new el;return t.width=4,t.material=new fy,t.material.color=l(e)?e:V.RED,t.material.outlineWidth=2,t.material.outlineColor=V.BLACK,t}var gEe={time:{text:"Time",tag:"time"},comment:{text:"Comment",tag:"cmt"},description:{text:"Description",tag:"desc"},source:{text:"Source",tag:"src"},number:{text:"GPS track/route number",tag:"number"},type:{text:"Type",tag:"type"}},ck;typeof document<"u"&&(ck=document.createElement("div"));function aZ(e,t){let n,i="",o=Object.keys(gEe),r=o.length;for(n=0;n<r;n++){let f=o[n],d=gEe[f];d.value=Yu(e,d.tag,Wo.gpx)??"",l(d.value)&&d.value!==""&&(i=`${i}<p>${d.text}: ${d.value}</p>`)}if(!l(i)||i==="")return;i=c_t.link(i),ck.innerHTML=i;let a=ck.querySelectorAll("a");for(n=0;n<a.length;n++)a[n].setAttribute("target","_blank");let s=V.WHITE,c=V.BLACK,u='<div class="cesium-infoBox-description-lighter" style="';return u+="overflow:auto;",u+="word-wrap:break-word;",u+=`background-color:${s.toCssColorString()};`,u+=`color:${c.toCssColorString()};`,u+='">',u+=`${ck.innerHTML}</div>`,ck.innerHTML="",u}function TEe(e,t,n,i){let o=oZ(t),r=iZ(t,n);r.position=o;let a=l(i.waypointImage)?i.waypointImage:e._pinBuilder.fromMakiIconId("marker",V.RED,OH);r.billboard=bEe(a);let s=Yu(t,"name",Wo.gpx);r.name=s,r.label=f_t(),r.label.text=s,r.description=aZ(t,r),i.clampToGround&&(r.billboard.heightReference=nt.CLAMP_TO_GROUND,r.label.heightReference=nt.CLAMP_TO_GROUND)}function d_t(e,t,n,i){let o=iZ(t,n);o.description=aZ(t,o);let r=rZ(t,"rtept",Wo.gpx),a=new Array(r.length);for(let s=0;s<r.length;s++)TEe(e,r[s],n,i),a[s]=oZ(r[s]);o.polyline=CEe(i.routeColor),i.clampToGround&&(o.polyline.clampToGround=!0),o.polyline.positions=a}function h_t(e,t,n,i){let o=iZ(t,n);o.description=aZ(t,o);let r=rZ(t,"trkseg",Wo.gpx),a=[],s=[],c,u=!0,f=new uc;for(let d=0;d<r.length;d++)c=m_t(r[d]),a=a.concat(c.positions),c.times.length>0?(s=s.concat(c.times),f.addSamples(s,a),u=u&&!0):u=!1;if(u){let d=l(i.waypointImage)?i.waypointImage:e._pinBuilder.fromMakiIconId("marker",V.RED,OH);o.billboard=bEe(d),o.position=f,i.clampToGround&&(o.billboard.heightReference=nt.CLAMP_TO_GROUND),o.availability=new Ta,o.availability.addInterval(new wn({start:s[0],stop:s[s.length-1]}))}o.polyline=CEe(i.trackColor),o.polyline.positions=a,i.clampToGround&&(o.polyline.clampToGround=!0)}function m_t(e){let t={positions:[],times:[]},n=rZ(e,"trkpt",Wo.gpx),i;for(let o=0;o<n.length;o++){let r=oZ(n[o]);t.positions.push(r),i=Yu(n[o],"time",Wo.gpx),l(i)&&t.times.push(Q.fromIso8601(i))}return t}function p_t(e){let t=Sy(e,"metadata",Wo.gpx);if(l(t)){let n={name:Yu(t,"name",Wo.gpx),desc:Yu(t,"desc",Wo.gpx),author:g_t(t),copyright:A_t(t),link:EEe(t),time:Yu(t,"time",Wo.gpx),keywords:Yu(t,"keywords",Wo.gpx),bounds:y_t(t)};if(l(n.name)||l(n.desc)||l(n.author)||l(n.copyright)||l(n.link)||l(n.time)||l(n.keywords)||l(n.bounds))return n}}function g_t(e){let t=Sy(e,"author",Wo.gpx);if(l(t)){let n={name:Yu(t,"name",Wo.gpx),email:__t(t),link:EEe(t)};if(l(n.name)||l(n.email)||l(n.link))return n}}function __t(e){let t=Sy(e,"email",Wo.gpx);if(l(t)){let n=Yu(t,"id",Wo.gpx),i=Yu(t,"domain",Wo.gpx);return`${n}@${i}`}}function EEe(e){let t=Sy(e,"link",Wo.gpx);if(l(t)){let n={href:lk(t,"href"),text:Yu(t,"text",Wo.gpx),mimeType:Yu(t,"type",Wo.gpx)};if(l(n.href)||l(n.text)||l(n.mimeType))return n}}function A_t(e){let t=Sy(e,"copyright",Wo.gpx);if(l(t)){let n={author:lk(t,"author"),year:Yu(t,"year",Wo.gpx),license:Yu(t,"license",Wo.gpx)};if(l(n.author)||l(n.year)||l(n.license))return n}}function y_t(e){let t=Sy(e,"bounds",Wo.gpx);if(l(t)){let n={minLat:sk(t,"minlat",Wo.gpx),maxLat:sk(t,"maxlat",Wo.gpx),minLon:sk(t,"minlon",Wo.gpx),maxLon:sk(t,"maxlon",Wo.gpx)};if(l(n.minLat)||l(n.maxLat)||l(n.minLon)||l(n.maxLon))return n}}var _Ee={wpt:TEe,rte:d_t,trk:h_t};function x_t(e,t,n,i){let o=Object.keys(_Ee),r=o.length;for(let a=0;a<r;a++){let s=o[a],c=_Ee[s],u=t.childNodes,f=u.length;for(let d=0;d<f;d++){let p=u[d];p.localName===s&&Wo.gpx.indexOf(p.namespaceURI)!==-1&&c(e,p,n,i)}}}function AEe(e,t,n){let i=e._entityCollection;i.removeAll();let o=t.documentElement,r=lk(o,"version"),a=lk(o,"creator"),s,c=p_t(o);l(c)&&(s=c.name),o.localName==="gpx"?x_t(e,o,i,n):console.log(`GPX - Unsupported node: ${o.localName}`);let u,f=i.computeAvailability(),d=f.start,p=f.stop,g=Q.equals(d,Qe.MINIMUM_VALUE),m=Q.equals(p,Qe.MAXIMUM_VALUE);if(!g||!m){let y;g&&(y=new Date,y.setHours(0,0,0,0),d=Q.fromDate(y)),m&&(y=new Date,y.setHours(24,0,0,0),p=Q.fromDate(y)),u=new Em,u.startTime=d,u.stopTime=p,u.currentTime=Q.clone(d),u.clockRange=va.LOOP_STOP,u.clockStep=Oo.SYSTEM_CLOCK_MULTIPLIER,u.multiplier=Math.round(Math.min(Math.max(Q.secondsDifference(p,d)/60,1),31556900))}let A=!1;return e._name!==s&&(e._name=s,A=!0),e._creator!==a&&(e._creator=a,A=!0),b_t(e._metadata,c)&&(e._metadata=c,A=!0),e._version!==r&&(e._version=r,A=!0),u!==e._clock&&(A=!0,e._clock=u),A&&e._changed.raiseEvent(e),Ea.setLoading(e,!1),e}function b_t(e,t){return!l(e)&&!l(t)?!1:l(e)&&l(t)?e.name!==t.name||e.dec!==t.desc||e.src!==t.src||e.author!==t.author||e.copyright!==t.copyright||e.link!==t.link||e.time!==t.time||e.bounds!==t.bounds:!0}function C_t(e,t,n,i){i=i??G.EMPTY_OBJECT;let o=n;if(typeof n=="string"||n instanceof De){n=De.createIfNeeded(n),o=n.fetchBlob();let r=e._resourceCredits,a=n.credits;if(l(a)){let s=a.length;for(let c=0;c<s;c++)r.push(a[c])}}return Promise.resolve(o).then(function(r){return r instanceof Blob?u_t(r).then(function(a){let s,c;try{s=xEe.parseFromString(a,"application/xml")}catch(u){c=u.toString()}if(l(c)||s.body||s.documentElement.tagName==="parsererror"){let u=l(c)?c:s.documentElement.firstChild.nodeValue;throw u||(u=s.body.innerText),new re(u)}return AEe(e,s,i)}):AEe(e,r,i)}).catch(function(r){return e._error.raiseEvent(e,r),console.log(r),Promise.reject(r)})}function Pw(){this._changed=new ye,this._error=new ye,this._loading=new ye,this._clock=void 0,this._entityCollection=new Vs(this),this._entityCluster=new Bf,this._name=void 0,this._version=void 0,this._creator=void 0,this._metadata=void 0,this._isLoading=!1,this._pinBuilder=new h_}Pw.load=function(e,t){return new Pw().load(e,t)};Object.defineProperties(Pw.prototype,{name:{get:function(){return this._name}},version:{get:function(){return this._version}},creator:{get:function(){return this._creator}},metadata:{get:function(){return this._metadata}},clock:{get:function(){return this._clock}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){this._entityCluster=e}}});Pw.prototype.update=function(e){return!0};Pw.prototype.load=function(e,t){if(!l(e))throw new _e("data is required.");t=t??G.EMPTY_OBJECT,Ea.setLoading(this,!0);let n=this._name,i=this;return C_t(this,this._entityCollection,e,t).then(function(){let o,r=i._entityCollection.computeAvailability(),a=r.start,s=r.stop,c=Q.equals(a,Qe.MINIMUM_VALUE),u=Q.equals(s,Qe.MAXIMUM_VALUE);if(!c||!u){let d;c&&(d=new Date,d.setHours(0,0,0,0),a=Q.fromDate(d)),u&&(d=new Date,d.setHours(24,0,0,0),s=Q.fromDate(d)),o=new Em,o.startTime=a,o.stopTime=s,o.currentTime=Q.clone(a),o.clockRange=va.LOOP_STOP,o.clockStep=Oo.SYSTEM_CLOCK_MULTIPLIER,o.multiplier=Math.round(Math.min(Math.max(Q.secondsDifference(s,a)/60,1),31556900))}let f=!1;return o!==i._clock&&(i._clock=o,f=!0),n!==i._name&&(f=!0),f&&i._changed.raiseEvent(i),Ea.setLoading(i,!1),i}).catch(function(o){return Ea.setLoading(i,!1),i._error.raiseEvent(i,o),console.log(o),Promise.reject(o)})};var uk=Pw;function T_t(e,t){this.position=e,this.headingPitchRoll=t}var fk=T_t;var vSe=Yr(nZ(),1),Qk=Yr(uf(),1);var sZ=new Date(2107,11,31),cZ=new Date(1980,0,1),Ut=void 0,qC=1/0,Hf="undefined",Wf="function",vEe="object";var E_t=64,SEe=2;try{typeof navigator!=Hf&&navigator.hardwareConcurrency&&(SEe=navigator.hardwareConcurrency)}catch{}var v_t={workerURI:"./core/web-worker-wasm.js",wasmURI:"./core/streams/zlib-wasm/zlib-streams.wasm",chunkSize:64*1024,maxWorkers:SEe,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,CompressionStream:typeof CompressionStream!=Hf&&CompressionStream,DecompressionStream:typeof DecompressionStream!=Hf&&DecompressionStream},wEe=Object.assign({},v_t);function dk(){return wEe}function MH(e){return Math.max(e.chunkSize,E_t)}function $p(e){let{baseURI:t,chunkSize:n,maxWorkers:i,terminateWorkerTimeout:o,useCompressionStream:r,useWebWorkers:a,CompressionStream:s,DecompressionStream:c,CompressionStreamZlib:u,DecompressionStreamZlib:f,workerURI:d,wasmURI:p}=e;rh("baseURI",t),rh("wasmURI",p),rh("workerURI",d),rh("chunkSize",n),rh("maxWorkers",i),rh("terminateWorkerTimeout",o),rh("useCompressionStream",r),rh("useWebWorkers",a),rh("CompressionStream",s),rh("DecompressionStream",c),rh("CompressionStreamZlib",u),rh("DecompressionStreamZlib",f)}function rh(e,t){t!==Ut&&(wEe[e]=t)}var IEe=[];for(let e=0;e<256;e++){let t=e;for(let n=0;n<8;n++)t&1?t=t>>>1^3988292384:t=t>>>1;IEe[e]=t}var g_=class{constructor(t){this.crc=t||-1}append(t){let n=this.crc|0;for(let i=0,o=t.length|0;i<o;i++)n=n>>>8^IEe[(n^t[i])&255];this.crc=n}get(){return~this.crc}};var hk=class extends null{constructor(){let t,n=new g_;super({transform(i,o){n.append(i),o.enqueue(i)},flush(){let i=new Uint8Array(4);new DataView(i.buffer).setUint32(0,n.get()),t.value=i}}),t=this}};function Rw(e){if(typeof TextEncoder==Hf){e=unescape(encodeURIComponent(e));let t=new Uint8Array(e.length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}else return new TextEncoder().encode(e)}var uu={concat(e,t){if(e.length===0||t.length===0)return e.concat(t);let n=e[e.length-1],i=uu.getPartial(n);return i===32?e.concat(t):uu._shiftRight(t,i,n|0,e.slice(0,e.length-1))},bitLength(e){let t=e.length;if(t===0)return 0;let n=e[t-1];return(t-1)*32+uu.getPartial(n)},clamp(e,t){if(e.length*32<t)return e;e=e.slice(0,Math.ceil(t/32));let n=e.length;return t=t&31,n>0&&t&&(e[n-1]=uu.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial(e,t,n){return e===32?t:(n?t|0:t<<32-e)+e*1099511627776},getPartial(e){return Math.round(e/1099511627776)||32},_shiftRight(e,t,n,i){for(i===void 0&&(i=[]);t>=32;t-=32)i.push(n),n=0;if(t===0)return i.concat(e);for(let a=0;a<e.length;a++)i.push(n|e[a]>>>t),n=e[a]<<32-t;let o=e.length?e[e.length-1]:0,r=uu.getPartial(o);return i.push(uu.partial(t+r&31,t+r>32?n:i.pop(),1)),i}},mk={bytes:{fromBits(e){let n=uu.bitLength(e)/8,i=new Uint8Array(n),o;for(let r=0;r<n;r++)(r&3)===0&&(o=e[r/4]),i[r]=o>>>24,o<<=8;return i},toBits(e){let t=[],n,i=0;for(n=0;n<e.length;n++)i=i<<8|e[n],(n&3)===3&&(t.push(i),i=0);return n&3&&t.push(uu.partial(8*(n&3),i)),t}}},DEe={};DEe.sha1=class{constructor(e){let t=this;t.blockSize=512,t._init=[1732584193,4023233417,2562383102,271733878,3285377520],t._key=[1518500249,1859775393,2400959708,3395469782],e?(t._h=e._h.slice(0),t._buffer=e._buffer.slice(0),t._length=e._length):t.reset()}reset(){let e=this;return e._h=e._init.slice(0),e._buffer=[],e._length=0,e}update(e){let t=this;typeof e=="string"&&(e=mk.utf8String.toBits(e));let n=t._buffer=uu.concat(t._buffer,e),i=t._length,o=t._length=i+uu.bitLength(e);if(o>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");let r=new Uint32Array(n),a=0;for(let s=t.blockSize+i-(t.blockSize+i&t.blockSize-1);s<=o;s+=t.blockSize)t._block(r.subarray(16*a,16*(a+1))),a+=1;return n.splice(0,16*a),t}finalize(){let e=this,t=e._buffer,n=e._h;t=uu.concat(t,[uu.partial(1,1)]);for(let i=t.length+2;i&15;i++)t.push(0);for(t.push(Math.floor(e._length/4294967296)),t.push(e._length|0);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,i){if(e<=19)return t&n|~t&i;if(e<=39)return t^n^i;if(e<=59)return t&n|t&i|n&i;if(e<=79)return t^n^i}_S(e,t){return t<<e|t>>>32-e}_block(e){let t=this,n=t._h,i=Array(80);for(let u=0;u<16;u++)i[u]=e[u];let o=n[0],r=n[1],a=n[2],s=n[3],c=n[4];for(let u=0;u<=79;u++){u>=16&&(i[u]=t._S(1,i[u-3]^i[u-8]^i[u-14]^i[u-16]));let f=t._S(5,o)+t._f(u,r,a,s)+c+i[u]+t._key[Math.floor(u/20)]|0;c=s,s=a,a=t._S(30,r),r=o,o=f}n[0]=n[0]+o|0,n[1]=n[1]+r|0,n[2]=n[2]+a|0,n[3]=n[3]+s|0,n[4]=n[4]+c|0}};var lZ={};lZ.aes=class{constructor(e){let t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();let n=t._tables[0][4],i=t._tables[1],o=e.length,r,a,s,c=1;if(o!==4&&o!==6&&o!==8)throw new Error("invalid aes key size");for(t._key=[a=e.slice(0),s=[]],r=o;r<4*o+28;r++){let u=a[r-1];(r%o===0||o===8&&r%o===4)&&(u=n[u>>>24]<<24^n[u>>16&255]<<16^n[u>>8&255]<<8^n[u&255],r%o===0&&(u=u<<8^u>>>24^c<<24,c=c<<1^(c>>7)*283)),a[r]=a[r-o]^u}for(let u=0;r;u++,r--){let f=a[u&3?r:r-4];r<=4||u<4?s[u]=f:s[u]=i[0][n[f>>>24]]^i[1][n[f>>16&255]]^i[2][n[f>>8&255]]^i[3][n[f&255]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){let e=this._tables[0],t=this._tables[1],n=e[4],i=t[4],o=[],r=[],a,s,c,u;for(let f=0;f<256;f++)r[(o[f]=f<<1^(f>>7)*283)^f]=f;for(let f=a=0;!n[f];f^=s||1,a=r[a]||1){let d=a^a<<1^a<<2^a<<3^a<<4;d=d>>8^d&255^99,n[f]=d,i[d]=f,u=o[c=o[s=o[f]]];let p=u*16843009^c*65537^s*257^f*16843008,g=o[d]*257^d*16843008;for(let m=0;m<4;m++)e[m][f]=g=g<<24^g>>>8,t[m][d]=p=p<<24^p>>>8}for(let f=0;f<5;f++)e[f]=e[f].slice(0),t[f]=t[f].slice(0)}_crypt(e,t){if(e.length!==4)throw new Error("invalid aes block size");let n=this._key[t],i=n.length/4-2,o=[0,0,0,0],r=this._tables[t],a=r[0],s=r[1],c=r[2],u=r[3],f=r[4],d=e[0]^n[0],p=e[t?3:1]^n[1],g=e[2]^n[2],m=e[t?1:3]^n[3],A=4,y,x,b;for(let C=0;C<i;C++)y=a[d>>>24]^s[p>>16&255]^c[g>>8&255]^u[m&255]^n[A],x=a[p>>>24]^s[g>>16&255]^c[m>>8&255]^u[d&255]^n[A+1],b=a[g>>>24]^s[m>>16&255]^c[d>>8&255]^u[p&255]^n[A+2],m=a[m>>>24]^s[d>>16&255]^c[p>>8&255]^u[g&255]^n[A+3],A+=4,d=y,p=x,g=b;for(let C=0;C<4;C++)o[t?3&-C:C]=f[d>>>24]<<24^f[p>>16&255]<<16^f[g>>8&255]<<8^f[m&255]^n[A++],y=d,d=p,p=g,g=m,m=y;return o}};var PEe={getRandomValues(e){let t=new Uint32Array(e.buffer),n=i=>{let o=987654321,r=4294967295;return function(){return o=36969*(o&65535)+(o>>16)&r,i=18e3*(i&65535)+(i>>16)&r,(((o<<16)+i&r)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let i=0,o;i<e.length;i+=4){let r=n((o||Math.random())*4294967296);o=r()*987654071,t[i/4]=r()*4294967296|0}return e}},uZ={};uZ.ctrGladman=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if((e>>24&255)===255){let t=e>>16&255,n=e>>8&255,i=e&255;t===255?(t=0,n===255?(n=0,i===255?i=0:++i):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=i}else e+=1<<24;return e}incCounter(e){(e[0]=this.incWord(e[0]))===0&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let i;if(!(i=t.length))return[];let o=uu.bitLength(t);for(let r=0;r<i;r+=4){this.incCounter(n);let a=e.encrypt(n);t[r]^=a[0],t[r+1]^=a[1],t[r+2]^=a[2],t[r+3]^=a[3]}return uu.clamp(t,o)}};var wy={importKey(e){return new wy.hmacSha1(mk.bytes.toBits(e))},pbkdf2(e,t,n,i){if(n=n||1e4,i<0||n<0)throw new Error("invalid params to pbkdf2");let o=(i>>5)+1<<2,r,a,s,c,u,f=new ArrayBuffer(o),d=new DataView(f),p=0,g=uu;for(t=mk.bytes.toBits(t),u=1;p<(o||1);u++){for(r=a=e.encrypt(g.concat(t,[u])),s=1;s<n;s++)for(a=e.encrypt(a),c=0;c<a.length;c++)r[c]^=a[c];for(s=0;p<(o||1)&&s<r.length;s++)d.setInt32(p,r[s]),p+=4}return f.slice(0,i/8)}};wy.hmacSha1=class{constructor(e){let t=this,n=t._hash=DEe.sha1,i=[[],[]];t._baseHash=[new n,new n];let o=t._baseHash[0].blockSize/32;e.length>o&&(e=new n().update(e).finalize());for(let r=0;r<o;r++)i[0][r]=e[r]^909522486,i[1][r]=e[r]^1549556828;t._baseHash[0].update(i[0]),t._baseHash[1].update(i[1]),t._resultHash=new n(t._baseHash[0])}reset(){let e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){let t=this;t._updated=!0,t._resultHash.update(e)}digest(){let e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new Error("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}};var S_t=typeof crypto!=Hf&&typeof crypto.getRandomValues==Wf,__="Invalid password",Iy="Invalid signature",A_="zipjs-abort-check-password";function BH(e){return S_t?crypto.getRandomValues(e):PEe.getRandomValues(e)}var Ow=16,w_t="raw",MEe={name:"PBKDF2"},I_t={name:"HMAC"},D_t="SHA-1",P_t=Object.assign({hash:I_t},MEe),fZ=Object.assign({iterations:1e3,hash:{name:D_t}},MEe),R_t=["deriveBits"],gk=[8,12,16],pk=[16,24,32],Dy=10,O_t=[0,0,0,0],FH=typeof crypto!=Hf,yk=FH&&crypto.subtle,BEe=FH&&typeof yk!=Hf,Jp=mk.bytes,M_t=lZ.aes,B_t=uZ.ctrGladman,L_t=wy.hmacSha1,REe=FH&&BEe&&typeof yk.importKey==Wf,OEe=FH&&BEe&&typeof yk.deriveBits==Wf,LH=class extends null{constructor({password:t,rawPassword:n,signed:i,encryptionStrength:o,checkPasswordOnly:r}){super({start(){Object.assign(this,{ready:new Promise(a=>this.resolveReady=a),password:FEe(t,n),signed:i,strength:o-1,pending:new Uint8Array})},async transform(a,s){let c=this,{password:u,strength:f,resolveReady:d,ready:p}=c;u?(await N_t(c,f,u,ah(a,0,gk[f]+2)),a=ah(a,gk[f]+2),r?s.error(new Error(A_)):d()):await p;let g=new Uint8Array(a.length-Dy-(a.length-Dy)%Ow);s.enqueue(LEe(c,a,g,0,Dy,!0))},async flush(a){let{signed:s,ctr:c,hmac:u,pending:f,ready:d}=this;if(u&&c){await d;let p=ah(f,0,f.length-Dy),g=ah(f,f.length-Dy),m=new Uint8Array;if(p.length){let A=Ak(Jp,p);u.update(A);let y=c.update(A);m=_k(Jp,y)}if(s){let A=ah(_k(Jp,u.digest()),0,Dy);for(let y=0;y<Dy;y++)if(A[y]!=g[y])throw new Error(Iy)}a.enqueue(m)}}})}},NH=class extends null{constructor({password:t,rawPassword:n,encryptionStrength:i}){let o;super({start(){Object.assign(this,{ready:new Promise(r=>this.resolveReady=r),password:FEe(t,n),strength:i-1,pending:new Uint8Array})},async transform(r,a){let s=this,{password:c,strength:u,resolveReady:f,ready:d}=s,p=new Uint8Array;c?(p=await F_t(s,u,c),f()):await d;let g=new Uint8Array(p.length+r.length-r.length%Ow);g.set(p,0),a.enqueue(LEe(s,r,g,p.length,0))},async flush(r){let{ctr:a,hmac:s,pending:c,ready:u}=this;if(s&&a){await u;let f=new Uint8Array;if(c.length){let d=a.update(Ak(Jp,c));s.update(d),f=_k(Jp,d)}o.signature=_k(Jp,s.digest()).slice(0,Dy),r.enqueue(dZ(f,o.signature))}}}),o=this}};function LEe(e,t,n,i,o,r){let{ctr:a,hmac:s,pending:c}=e,u=t.length-o;c.length&&(t=dZ(c,t),n=U_t(n,u-u%Ow));let f;for(f=0;f<=u-Ow;f+=Ow){let d=Ak(Jp,ah(t,f,f+Ow));r&&s.update(d);let p=a.update(d);r||s.update(p),n.set(_k(Jp,p),f+i)}return e.pending=ah(t,f),n}async function N_t(e,t,n,i){let o=await NEe(e,t,n,ah(i,0,gk[t])),r=ah(i,gk[t]);if(o[0]!=r[0]||o[1]!=r[1])throw new Error(__)}async function F_t(e,t,n){let i=BH(new Uint8Array(gk[t])),o=await NEe(e,t,n,i);return dZ(i,o)}async function NEe(e,t,n,i){e.password=null;let o=await k_t(w_t,n,P_t,!1,R_t),r=await z_t(Object.assign({salt:i},fZ),o,8*(pk[t]*2+2)),a=new Uint8Array(r),s=Ak(Jp,ah(a,0,pk[t])),c=Ak(Jp,ah(a,pk[t],pk[t]*2)),u=ah(a,pk[t]*2);return Object.assign(e,{keys:{key:s,authentication:c,passwordVerification:u},ctr:new B_t(new M_t(s),Array.from(O_t)),hmac:new L_t(c)}),u}async function k_t(e,t,n,i,o){if(REe)try{return await yk.importKey(e,t,n,i,o)}catch{return REe=!1,wy.importKey(t)}else return wy.importKey(t)}async function z_t(e,t,n){if(OEe)try{return await yk.deriveBits(e,t,n)}catch{return OEe=!1,wy.pbkdf2(t,e.salt,fZ.iterations,n)}else return wy.pbkdf2(t,e.salt,fZ.iterations,n)}function FEe(e,t){return t===Ut?Rw(e):t}function dZ(e,t){let n=e;return e.length+t.length&&(n=new Uint8Array(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function U_t(e,t){if(t&&t>e.length){let n=e;e=new Uint8Array(t),e.set(n,0)}return e}function ah(e,t,n){return e.subarray(t,n)}function _k(e,t){return e.fromBits(t)}function Ak(e,t){return e.toBits(t)}var xk=12,kH=class extends null{constructor({password:t,passwordVerification:n,checkPasswordOnly:i}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),VEe(this,t)},transform(o,r){let a=this;if(a.password){let s=kEe(a,o.subarray(0,xk));if(a.password=null,s.at(-1)!=a.passwordVerification)throw new Error(__);o=o.subarray(xk)}i?r.error(new Error(A_)):r.enqueue(kEe(a,o))}})}},zH=class extends null{constructor({password:t,passwordVerification:n}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),VEe(this,t)},transform(i,o){let r=this,a,s;if(r.password){r.password=null;let c=BH(new Uint8Array(xk));c[xk-1]=r.passwordVerification,a=new Uint8Array(i.length+c.length),a.set(zEe(r,c),0),s=xk}else a=new Uint8Array(i.length),s=0;a.set(zEe(r,i),s),o.enqueue(a)}})}};function kEe(e,t){let n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=jEe(e)^t[i],hZ(e,n[i]);return n}function zEe(e,t){let n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=jEe(e)^t[i],hZ(e,t[i]);return n}function VEe(e,t){let n=[305419896,591751049,878082192];Object.assign(e,{keys:n,crcKey0:new g_(n[0]),crcKey2:new g_(n[2])});for(let i=0;i<t.length;i++)hZ(e,t.charCodeAt(i))}function hZ(e,t){let[n,i,o]=e.keys;e.crcKey0.append([t]),n=~e.crcKey0.get(),i=UEe(Math.imul(UEe(i+GEe(n)),134775813)+1),e.crcKey2.append([i>>>24]),o=~e.crcKey2.get(),e.keys=[n,i,o]}function jEe(e){let t=e.keys[2]|2;return GEe(Math.imul(t,t^1)>>>8)}function GEe(e){return e&255}function UEe(e){return e&4294967295}var Mw="Invalid uncompressed size",V_t="deflate-raw",j_t="deflate64-raw",UH=class extends null{constructor(t,{chunkSize:n,CompressionStreamZlib:i,CompressionStream:o}){super({});let{compressed:r,encrypted:a,useCompressionStream:s,zipCrypto:c,signed:u,level:f}=t,d=this,p,g,m=super.readable;(!a||c)&&u&&(p=new hk,m=Zp(m,p)),r&&(m=WEe(m,s,{level:f,chunkSize:n},o,i,o)),a&&(c?m=Zp(m,new zH(t)):(g=new NH(t),m=Zp(m,g))),HEe(d,m,()=>{let A;a&&!c&&(A=g.signature),(!a||c)&&u&&(A=new DataView(p.value.buffer).getUint32(0)),d.signature=A})}},VH=class extends null{constructor(t,{chunkSize:n,DecompressionStreamZlib:i,DecompressionStream:o}){super({});let{zipCrypto:r,encrypted:a,signed:s,signature:c,compressed:u,useCompressionStream:f,deflate64:d}=t,p,g,m=super.readable;a&&(r?m=Zp(m,new kH(t)):(g=new LH(t),m=Zp(m,g))),u&&(m=WEe(m,f,{chunkSize:n,deflate64:d},o,i,o)),(!a||r)&&s&&(p=new hk,m=Zp(m,p)),HEe(this,m,()=>{if((!a||r)&&s){let A=new DataView(p.value.buffer);if(c!=A.getUint32(0,!1))throw new Error(Iy)}})}};function HEe(e,t,n){t=Zp(t,new null({flush:n})),Object.defineProperty(e,"readable",{get(){return t}})}function WEe(e,t,n,i,o,r){let a=t&&i?i:o||r,s=n.deflate64?j_t:V_t;try{e=Zp(e,new a(s,n))}catch(c){if(t)if(o)e=Zp(e,new o(s,n));else if(r)e=Zp(e,new r(s,n));else throw c;else throw c}return e}function Zp(e,t){return e.pipeThrough(t)}var qEe="message",YEe="start",XEe="pull",mZ="data",KEe="ack",pZ="close",HH="deflate",WH="inflate";var jH=class extends null{constructor(t,n){super({});let i=this,{codecType:o}=t,r;o.startsWith(HH)?r=UH:o.startsWith(WH)&&(r=VH),i.outputSize=0;let a=0,s=new r(t,n),c=super.readable,u=new null({transform(d,p){d&&d.length&&(a+=d.length,p.enqueue(d))},flush(){Object.assign(i,{inputSize:a})}}),f=new null({transform(d,p){if(d&&d.length&&(p.enqueue(d),i.outputSize+=d.length,t.outputSize!==Ut&&i.outputSize>t.outputSize))throw new Error(Mw)},flush(){let{signature:d}=s;Object.assign(i,{signature:d,inputSize:a})}});Object.defineProperty(i,"readable",{get(){return c.pipeThrough(u).pipeThrough(s).pipeThrough(f)}})}},GH=class extends null{constructor(t){let n;super({transform:i,flush(o){n&&n.length&&o.enqueue(n)}});function i(o,r){if(n){let a=new Uint8Array(n.length+o.length);a.set(n),a.set(o,n.length),o=a,n=null}o.length>t?(r.enqueue(o.slice(0,t)),i(o.slice(t),r)):n=o}}};var QEe={type:"module"},qH,gZ,$Ee,AZ=!0;try{AZ=typeof structuredClone==Wf&&structuredClone(new DOMException("","AbortError")).code!==Ut}catch{}var JEe=()=>{};function ZEe({initModule:e}){JEe=e}var Bw=class{constructor(t,{readable:n,writable:i},{options:o,config:r,streamOptions:a,useWebWorkers:s,transferStreams:c,workerURI:u},f){let{signal:d}=a;return Object.assign(t,{busy:!0,readable:n.pipeThrough(new GH(r.chunkSize)).pipeThrough(new yZ(a),{signal:d}),writable:i,options:Object.assign({},o),workerURI:u,transferStreams:c,terminate(){return new Promise(p=>{let{worker:g,busy:m}=t;g?(m?t.resolveTerminated=p:(g.terminate(),p()),t.interface=null):p()})},onTaskFinished(){let{resolveTerminated:p}=t;p&&(t.resolveTerminated=null,t.terminated=!0,t.worker.terminate(),p()),t.busy=!1,f(t)}}),qH===Ut&&(qH=typeof Worker!=Hf),(s&&qH?G_t:eve)(t,r)}},yZ=class extends null{constructor({onstart:t,onprogress:n,size:i,onend:o}){let r=0;super({async start(){t&&await _Z(t,i)},async transform(a,s){r+=a.length,n&&await _Z(n,r,i),s.enqueue(a)},async flush(){o&&await _Z(o,r)}})}};async function _Z(e,...t){try{await e(...t)}catch{}}function eve(e,t){return{run:()=>H_t(e,t)}}function G_t(e,t){let{baseURI:n,chunkSize:i}=t,{wasmURI:o}=t;if(!e.interface){typeof o==Wf&&(o=o());let r;try{r=YH(e.workerURI,n,e)}catch{return qH=!1,eve(e,t)}Object.assign(e,{worker:r,interface:{run:()=>W_t(e,{chunkSize:i,wasmURI:o,baseURI:n})}})}return e.interface}async function H_t({options:e,readable:t,writable:n,onTaskFinished:i},o){let r;try{if(!e.useCompressionStream)try{await JEe(o)}catch{e.useCompressionStream=!0}r=new jH(e,o),await t.pipeThrough(r).pipeTo(n,{preventClose:!0,preventAbort:!0});let{signature:a,inputSize:s,outputSize:c}=r;return{signature:a,inputSize:s,outputSize:c}}catch(a){throw r&&(a.outputSize=r.outputSize),a}finally{i()}}async function W_t(e,t){let n,i,o=new Promise((d,p)=>{n=d,i=p});Object.assign(e,{reader:null,writer:null,resolveResult:n,rejectResult:i,result:o});let{readable:r,options:a}=e,{writable:s,closed:c}=q_t(e.writable),u=XH({type:YEe,options:a,config:t,readable:r,writable:s},e);u||Object.assign(e,{reader:r.getReader(),writer:s.getWriter()});let f=await o;return u||await s.getWriter().close(),await c,f}function q_t(e){let{writable:t,readable:n}=new null,i=n.pipeTo(e,{preventClose:!0});return{writable:t,closed:i}}function YH(e,t,n,i,o=!0){let r,a,s;if(gZ===Ut){let c=typeof e==Wf;c?a=e(o):a=e;let u=a.startsWith("data:"),f=a.startsWith("blob:");if(u||f){i===Ut&&(i=!1),i&&(s=QEe);try{r=new Worker(a,s)}catch(d){if(f)try{URL.revokeObjectURL(a)}catch{}if(c&&f)return YH(e,t,n,i,!1);if(i)throw d;return YH(e,t,n,!0,!1)}}else{i===Ut&&(i=!0),i&&(s=QEe);try{a=new URL(a,t)}catch{}try{r=new Worker(a,s)}catch(d){if(i)throw d;return YH(e,t,n,!1,o)}}gZ=a,$Ee=s}else r=new Worker(gZ,$Ee);return r.addEventListener(qEe,c=>Y_t(c,n)),r}function XH(e,{worker:t,writer:n,onTaskFinished:i,transferStreams:o}){try{let{value:r,readable:a,writable:s}=e,c=[];if(r&&(e.value=r,c.push(e.value.buffer)),o&&AZ?(a&&c.push(a),s&&c.push(s)):e.readable=e.writable=null,c.length)try{return t.postMessage(e,c),!0}catch{AZ=!1,e.readable=e.writable=null,t.postMessage(e)}else t.postMessage(e)}catch(r){throw n&&n.releaseLock(),i(),r}}async function Y_t({data:e},t){let{type:n,value:i,messageId:o,result:r,error:a}=e,{reader:s,writer:c,resolveResult:u,rejectResult:f,onTaskFinished:d}=t;try{if(a){let{message:g,stack:m,code:A,name:y,outputSize:x}=a,b=new Error(g);Object.assign(b,{stack:m,code:A,name:y,outputSize:x}),p(b)}else{if(n==XEe){let{value:g,done:m}=await s.read();XH({type:mZ,value:g,done:m,messageId:o},t)}n==mZ&&(await c.ready,await c.write(new Uint8Array(i)),XH({type:KEe,messageId:o},t)),n==pZ&&p(null,r)}}catch(g){XH({type:pZ,messageId:o},t),p(g)}function p(g,m){g?f(g):u(m),c&&c.releaseLock(),d()}}var YC=[],xZ=[];var tve=0;async function KH(e,t){let{options:n,config:i}=t,{transferStreams:o,useWebWorkers:r,useCompressionStream:a,compressed:s,signed:c,encrypted:u}=n,{workerURI:f,maxWorkers:d}=i;t.transferStreams=o||o===Ut;let p=!s&&!c&&!u&&!t.transferStreams;return t.useWebWorkers=!p&&(r||r===Ut&&i.useWebWorkers),t.workerURI=t.useWebWorkers&&f?f:Ut,n.useCompressionStream=a||a===Ut&&i.useCompressionStream,(await g()).run();async function g(){let A=YC.find(y=>!y.busy);if(A)return nve(A),new Bw(A,e,t,m);if(YC.length<d){let y={indexWorker:tve};return tve++,YC.push(y),new Bw(y,e,t,m)}else return new Promise(y=>xZ.push({resolve:y,stream:e,workerOptions:t}))}function m(A){if(xZ.length){let[{resolve:y,stream:x,workerOptions:b}]=xZ.splice(0,1);y(new Bw(A,x,b,m))}else A.worker?(nve(A),X_t(A,t)):YC=YC.filter(y=>y!=A)}}function X_t(e,t){let{config:n}=t,{terminateWorkerTimeout:i}=n;Number.isFinite(i)&&i>=0&&(e.terminated?e.terminated=!1:e.terminateTimeout=setTimeout(async()=>{YC=YC.filter(o=>o!=e);try{await e.terminate()}catch{}},i))}function nve(e){let{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}var K_t="Writer iterator completed too soon",Q_t="Writer not initialized",$_t="text/plain";var J_t="Content-Type";var Z_t=64*1024,iwi=256*1024,bZ="writable",Lw=class{constructor(){this.size=0}init(){this.initialized=!0}},bk=class extends Lw{get readable(){let t=this,{chunkSize:n=Z_t}=t,i=new ReadableStream({start(){this.chunkOffset=0},async pull(o){let{offset:r=0,size:a,diskNumberStart:s}=i,{chunkOffset:c}=this,u=a===Ut?n:Math.min(n,a-c),f=await dc(t,r+c,u,s);o.enqueue(f),c+n>a||a===Ut&&!f.length&&u?o.close():this.chunkOffset+=n}});return i}},QH=class extends Lw{constructor(){super();let t=this,n=new WritableStream({write(i){if(!t.initialized)throw new Error(Q_t);return t.writeUint8Array(i)}});Object.defineProperty(t,bZ,{get(){return n}})}writeUint8Array(){}};var Ck=class extends QH{constructor(t){super(),Object.assign(this,{data:"data:"+(t||"")+";base64,",pending:[]})}writeUint8Array(t){let n=this,i=0,o=n.pending,r=n.pending.length;for(n.pending="",i=0;i<Math.floor((r+t.length)/3)*3-r;i++)o+=String.fromCharCode(t[i]);for(;i<t.length;i++)n.pending+=String.fromCharCode(t[i]);o.length&&(o.length>2?n.data+=btoa(o):n.pending+=o)}getData(){return this.data+btoa(this.pending)}},e0=class extends bk{constructor(t){super(),Object.assign(this,{blob:t,size:t.size})}async readUint8Array(t,n){let i=this,o=t+n,a=await(t||o<i.size?i.blob.slice(t,o):i.blob).arrayBuffer();return a.byteLength>n&&(a=a.slice(t,o)),new Uint8Array(a)}},Nw=class extends Lw{constructor(t){super();let n=this,i=new null,o=[];t&&o.push([J_t,t]),Object.defineProperty(n,bZ,{get(){return i.writable}}),n.blob=new Response(i.readable,{headers:o}).blob()}getData(){return this.blob}},Tk=class extends e0{constructor(t){super(new Blob([t],{type:$_t}))}},Ek=class extends Nw{constructor(t){super(t),Object.assign(this,{encoding:t,utf8:!t||t.toLowerCase()=="utf-8"})}async getData(){let{encoding:t,utf8:n}=this,i=await super.getData();if(i.text&&n)return i.text();{let o=new FileReader;return new Promise((r,a)=>{Object.assign(o,{onload:({target:s})=>r(s.result),onerror:()=>a(o.error)}),o.readAsText(i,t)})}}};var $H=class extends bk{constructor(t){super(),this.readers=t}async init(){let t=this,{readers:n}=t;t.lastDiskNumber=0,t.lastDiskOffset=0,await Promise.all(n.map(async(i,o)=>{await i.init(),o!=n.length-1&&(t.lastDiskOffset+=i.size),t.size+=i.size})),super.init()}async readUint8Array(t,n,i=0){let o=this,{readers:r}=this,a,s=i;s==-1&&(s=r.length-1);let c=t;for(;r[s]&&c>=r[s].size;)c-=r[s].size,s++;let u=r[s];if(u){let f=u.size;if(c+n<=f)a=await dc(u,c,n);else{let d=f-c;a=new Uint8Array(n);let p=await dc(u,c,d);a.set(p,0);let g=await o.readUint8Array(t+d,n-d,i);a.set(g,d),p.length+g.length<n&&(a=a.subarray(0,p.length+g.length))}}else a=new Uint8Array;return o.lastDiskNumber=Math.max(s,o.lastDiskNumber),a}},vk=class extends Lw{constructor(t,n=4294967295){super();let i=this;Object.assign(i,{diskNumber:0,diskOffset:0,size:0,maxSize:n,availableSize:n});let o,r,a,s=new WritableStream({async write(f){let{availableSize:d}=i;if(a)f.length>=d?(await c(f.subarray(0,d)),await u(),i.diskOffset+=o.size,i.diskNumber++,a=null,await this.write(f.subarray(d))):await c(f);else{let{value:p,done:g}=await t.next();if(g&&!p)throw new Error(K_t);o=p,o.size=0,o.maxSize&&(i.maxSize=o.maxSize),i.availableSize=i.maxSize,await n0(o),r=p.writable,a=r.getWriter(),await this.write(f)}},async close(){await a.ready,await u()}});Object.defineProperty(i,bZ,{get(){return s}});async function c(f){let d=f.length;d&&(await a.ready,await a.write(f),o.size+=d,i.size+=d,i.availableSize-=d)}async function u(){await a.close()}}},XC=class{constructor(t){return Array.isArray(t)&&(t=new $H(t)),t instanceof ReadableStream&&(t={readable:t}),t}},Fw=class{constructor(t){return t.writable===Ut&&typeof t.next==Wf&&(t=new vk(t)),t instanceof WritableStream&&(t={writable:t}),t.size===Ut&&(t.size=0),t instanceof vk||Object.assign(t,{diskNumber:0,diskOffset:0,availableSize:qC,maxSize:qC}),t}};async function n0(e,t){if(e.init&&!e.initialized)await e.init(t);else return Promise.resolve()}function dc(e,t,n,i){return e.readUint8Array(t,n,i)}var ive="\0\u263A\u263B\u2665\u2666\u2663\u2660\u2022\u25D8\u25CB\u25D9\u2642\u2640\u266A\u266B\u263C\u25BA\u25C4\u2195\u203C\xB6\xA7\u25AC\u21A8\u2191\u2193\u2192\u2190\u221F\u2194\u25B2\u25BC !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0 ".split(""),eAt=ive.length==256;function ove(e){if(eAt){let t="";for(let n=0;n<e.length;n++)t+=ive[e[n]];return t}else return new TextDecoder().decode(e)}function Sk(e,t){return t&&t.trim().toLowerCase()=="cp437"?ove(e):new TextDecoder(t).decode(e)}var CZ="filename",TZ="rawFilename",wk="comment",EZ="rawComment",Ik="uncompressedSize",vZ="compressedSize",SZ="offset",wZ="diskNumberStart",kw="lastModDate",JH="rawLastModDate",Dk="lastAccessDate",rve="rawLastAccessDate",Pk="creationDate",IZ="rawCreationDate",DZ="internalFileAttributes",PZ="externalFileAttributes",RZ="msdosAttributesRaw",OZ="msdosAttributes",MZ="msDosCompatible",ZH="zip64",BZ="encrypted",LZ="version",NZ="versionMadeBy",FZ="zipCrypto",Rk="directory",kZ="executable",zZ="compressionMethod",UZ="signature",VZ="extraField",tAt="extraFieldInfoZip",nAt="extraFieldUnix";var jZ="unixMode",GZ="setuid",HZ="setgid",WZ="sticky",iAt="bitFlag",oAt="filenameUTF8",rAt="commentUTF8",aAt="rawExtraField",sAt="extraFieldZip64",cAt="extraFieldUnicodePath",lAt="extraFieldUnicodeComment",uAt="extraFieldAES",fAt="extraFieldNTFS",dAt="extraFieldExtendedTimestamp",hAt=[CZ,TZ,Ik,vZ,kw,JH,wk,EZ,Dk,Pk,IZ,SZ,wZ,DZ,PZ,RZ,OZ,MZ,ZH,BZ,LZ,NZ,FZ,Rk,kZ,zZ,UZ,VZ,nAt,tAt,"uid","gid",jZ,GZ,HZ,WZ,iAt,oAt,rAt,aAt,sAt,cAt,lAt,uAt,fAt,dAt],Py=class{constructor(t){hAt.forEach(n=>this[n]=t[n])}};var ave="filenameEncoding",sve="commentEncoding",cve="decodeText",lve="extractPrependedData",uve="extractAppendedData",e6="password",t6="rawPassword",n6="passThrough",i6="signal",fve="checkPasswordOnly",dve="checkOverlappingEntryOnly",hve="checkOverlappingEntry",mve="checkSignature",o6="useWebWorkers",r6="useCompressionStream",a6="transferStreams",s6="preventClose",pve="encryptionStrength",gve="extendedTimestamp",_ve="keepOrder",Ave="level",yve="bufferedWrite",xve="createTempStream",bve="dataDescriptorSignature",Cve="useUnicodeFileNames",Tve="dataDescriptor",Eve="supportZip64SplitFile",vve="encodeText",qZ="offset",YZ="usdz",Sve="unixExtraFieldType";var c6="File format is not recognized",Mve="End of central directory not found",Bve="End of Zip64 central directory locator not found",Lve="Central directory header not found",Nve="Local file header not found",Fve="Zip64 extra field not found",kve="File contains encrypted entry",zve="Encryption method not supported",KZ="Compression method not supported",QZ="Split zip file",Uve="Overlapping entry found",Ive="utf-8",_At="UTF8",Dve="cp437",AAt=[[Ik,4294967295],[vZ,4294967295],[SZ,4294967295],[wZ,65535]],yAt={65535:{getValue:kr,bytes:4},4294967295:{getValue:Vw,bytes:8}},KC=class{constructor(t,n={}){Object.assign(this,{reader:new XC(t),options:n,config:dk(),readRanges:[]})}async*getEntriesGenerator(t={}){let n=this,{reader:i}=n,{config:o}=n;if(await n0(i),(i.size===Ut||!i.readUint8Array)&&(i=new e0(await new Response(i.readable).blob()),await n0(i)),i.size<22)throw new Error(c6);i.chunkSize=MH(o);let r=await vAt(i,101010256,i.size,22,65535*16);if(!r){let L=await dc(i,0,4),_=zr(L);throw kr(_)==134695760?new Error(QZ):new Error(Mve)}let a=zr(r),s=kr(a,12),c=kr(a,16),u=r.offset,f=hc(a,20),d=u+22+f,p=hc(a,4),g=i.lastDiskNumber||0,m=hc(a,6),A=hc(a,8),y=0,x=0;if(c==4294967295||s==4294967295||A==65535||m==65535){let L=await dc(i,r.offset-20,20),_=zr(L);if(kr(_,0)==117853008){c=Vw(_,8);let T=await dc(i,c,56,-1),v=zr(T),I=r.offset-20-56;if(kr(v,0)!=101075792&&c!=I){let O=c;c=I,c>O&&(y=c-O),T=await dc(i,c,56,-1),v=zr(T)}if(kr(v,0)!=101075792)throw new Error(Bve);p==65535&&(p=kr(v,16)),m==65535&&(m=kr(v,20)),A==65535&&(A=Vw(v,32)),s==4294967295&&(s=Vw(v,40)),c-=s}}if(c>=i.size&&(y=i.size-c-s-22,c=i.size-s-22),g!=p)throw new Error(QZ);if(c<0)throw new Error(c6);let b=0,C=await dc(i,c,s,m),E=zr(C);if(s){let L=r.offset-s;if(kr(E,b)!=33639248&&c!=L){let _=c;c=L,c>_&&(y+=c-_),C=await dc(i,c,s,m),E=zr(C)}}let S=r.offset-c-(i.lastDiskOffset||0);if(s!=S&&S>=0&&(s=S,C=await dc(i,c,s,m),E=zr(C)),c<0||c>=i.size)throw new Error(c6);let w=Nc(n,t,ave),P=Nc(n,t,sve);for(let L=0;L<A;L++){let _=new $Z(i,o,n.options);if(kr(E,b)!=33639248)throw new Error(Lve);Vve(_,E,b+6);let T=!!_.bitFlag.languageEncodingFlag,v=b+46,I=v+_.filenameLength,O=I+_.extraFieldLength,N=hc(E,b+4),j=N>>8==0,k=N>>8==3,U=C.subarray(v,I),F=hc(E,b+32),H=O+F,q=C.subarray(O,H),J=T,W=T,Z=kr(E,b+38),K=Z&255,le={readOnly:!!(K&1),hidden:!!(K&2),system:!!(K&4),directory:!!(K&16),archive:!!(K&32)},me=kr(E,b+42)+y,ae=Nc(n,t,cve)||Sk,be=J?Ive:w||Dve,ge=W?Ive:P||Dve,we=ae(U,be);we===Ut&&(we=Sk(U,be));let Ee=ae(q,ge);Ee===Ut&&(Ee=Sk(q,ge)),Object.assign(_,{versionMadeBy:N,msDosCompatible:j,compressedSize:0,uncompressedSize:0,commentLength:F,offset:me,diskNumberStart:hc(E,b+34),internalFileAttributes:hc(E,b+36),externalFileAttributes:Z,msdosAttributesRaw:K,msdosAttributes:le,rawFilename:U,filenameUTF8:J,commentUTF8:W,rawExtraField:C.subarray(I,O),rawComment:q,filename:we,comment:Ee}),x=Math.max(me,x),jve(_,_,E,b+6);let Be=_.externalFileAttributes>>16&65535;_.unixMode===Ut&&(Be&16877)!=0&&(_.unixMode=Be);let ke=!!(_.unixMode&2048),Ge=!!(_.unixMode&1024),rt=!!(_.unixMode&512),et=_.unixMode!==Ut?(_.unixMode&73)!=0:k&&(Be&73)!=0,Pe=_.unixMode!==Ut&&(_.unixMode&61440)==16384,Ye=(Be&61440)==16384;Object.assign(_,{setuid:ke,setgid:Ge,sticky:rt,unixExternalUpper:Be,internalFileAttribute:_.internalFileAttributes,externalFileAttribute:_.externalFileAttributes,executable:et,directory:Pe||Ye||j&&le.directory||we.endsWith("/")&&!_.uncompressedSize,zipCrypto:_.encrypted&&!_.extraFieldAES});let ut=new Py(_);ut.getData=(tn,Ht)=>_.getData(tn,ut,n.readRanges,Ht),ut.arrayBuffer=async tn=>{let Ht=new null,[xt]=await Promise.all([new Response(Ht.readable).arrayBuffer(),_.getData(Ht,ut,n.readRanges,tn)]);return xt},b=H;let{onprogress:Tt}=t;if(Tt)try{await Tt(L+1,A,new Py(_))}catch{}yield ut}let R=Nc(n,t,lve),B=Nc(n,t,uve);return R&&(n.prependedData=x>0?await dc(i,0,x):new Uint8Array),n.comment=f?await dc(i,u+22,f):new Uint8Array,B&&(n.appendedData=d<i.size?await dc(i,d,i.size-d):new Uint8Array),!0}async getEntries(t={}){let n=[];for await(let i of this.getEntriesGenerator(t))n.push(i);return n}async close(){}};var $Z=class{constructor(t,n,i){Object.assign(this,{reader:t,config:n,options:i})}async getData(t,n,i,o={}){let r=this,{reader:a,offset:s,diskNumberStart:c,extraFieldAES:u,extraFieldZip64:f,compressionMethod:d,config:p,bitFlag:g,signature:m,rawLastModDate:A,uncompressedSize:y,compressedSize:x}=r,{dataDescriptor:b}=g,C=n.localDirectory={},E=await dc(a,s,30,c),S=zr(E),w=Nc(r,o,e6),P=Nc(r,o,t6),R=Nc(r,o,n6);if(w=w&&w.length&&w,P=P&&P.length&&P,u&&u.originalCompressionMethod!=99)throw new Error(KZ);if(d!=0&&d!=8&&d!=9&&!R)throw new Error(KZ);if(kr(S,0)!=67324752)throw new Error(Nve);Vve(C,S,4);let{extraFieldLength:B,filenameLength:L,lastAccessDate:_,creationDate:T}=C;C.rawExtraField=B?await dc(a,s+30+L,B,c):new Uint8Array,jve(r,C,S,4,!0),Object.assign(n,{lastAccessDate:_,creationDate:T});let v=r.encrypted&&C.encrypted&&!R,I=v&&!u;if(R||(n.zipCrypto=I),v){if(!I&&u.strength===Ut)throw new Error(zve);if(!w&&!P)throw new Error(kve)}let O=s+30+L+B,N=x,j=a.readable;Object.assign(j,{diskNumberStart:c,offset:O,size:N});let k=Nc(r,o,i6),U=Nc(r,o,fve),F=Nc(r,o,hve),H=Nc(r,o,dve);H&&(F=!0);let{onstart:q,onprogress:J,onend:W}=o,Z=d==9,K=Nc(r,o,r6);Z&&(K=!1);let le={options:{codecType:WH,password:w,rawPassword:P,zipCrypto:I,encryptionStrength:u&&u.strength,signed:Nc(r,o,mve)&&!R,passwordVerification:I&&(b?A>>>8&255:m>>>24&255),outputSize:R?x:y,signature:m,compressed:d!=0&&!R,encrypted:r.encrypted&&!R,useWebWorkers:Nc(r,o,o6),useCompressionStream:K,transferStreams:Nc(r,o,a6),deflate64:Z,checkPasswordOnly:U},config:p,streamOptions:{signal:k,size:N,onstart:q,onprogress:J,onend:W}};F&&await EAt({reader:a,fileEntry:n,offset:s,diskNumberStart:c,signature:m,compressedSize:x,uncompressedSize:y,dataOffset:O,dataDescriptor:b||C.bitFlag.dataDescriptor,extraFieldZip64:f||C.extraFieldZip64,readRanges:i});let me;try{if(!H){U&&(t=new WritableStream),t=new Fw(t),await n0(t,R?x:y),{writable:me}=t;let{outputSize:ae}=await KH({readable:j,writable:me},le);if(t.size+=ae,ae!=(R?x:y))throw new Error(Mw)}}catch(ae){if(ae.outputSize!==Ut&&(t.size+=ae.outputSize),!U||ae.message!=A_)throw ae}finally{!Nc(r,o,s6)&&me&&!me.locked&&await me.getWriter().close()}return U||H?Ut:t.getData?t.getData():me}};function Vve(e,t,n){let i=e.rawBitFlag=hc(t,n+2),o=(i&1)==1,r=kr(t,n+6);Object.assign(e,{encrypted:o,version:hc(t,n),bitFlag:{level:(i&6)>>1,dataDescriptor:(i&8)==8,languageEncodingFlag:(i&2048)==2048},rawLastModDate:r,lastModDate:SAt(r),filenameLength:hc(t,n+22),extraFieldLength:hc(t,n+24)})}function jve(e,t,n,i,o){let{rawExtraField:r}=t,a=t.extraField=new Map,s=zr(new Uint8Array(r)),c=0;try{for(;c<r.length;){let b=hc(s,c),C=hc(s,c+2);a.set(b,{type:b,data:r.slice(c+4,c+4+C)}),c+=4+C}}catch{}let u=hc(n,i+4);Object.assign(t,{signature:kr(n,i+10),compressedSize:kr(n,i+14),uncompressedSize:kr(n,i+18)});let f=a.get(1);f&&(xAt(f,t),t.extraFieldZip64=f);let d=a.get(28789);d&&(Pve(d,CZ,TZ,t,e),t.extraFieldUnicodePath=d);let p=a.get(25461);p&&(Pve(p,wk,EZ,t,e),t.extraFieldUnicodeComment=p);let g=a.get(39169);g?(bAt(g,t,u),t.extraFieldAES=g):t.compressionMethod=u;let m=a.get(10);m&&(CAt(m,t),t.extraFieldNTFS=m);let A=a.get(30805);if(A)Rve(A,t,!1),t.extraFieldUnix=A;else{let b=a.get(30837);b&&(Rve(b,t,!0),t.extraFieldInfoZip=b)}let y=a.get(21589);y&&(TAt(y,t,o),t.extraFieldExtendedTimestamp=y);let x=a.get(6534);x&&(t.extraFieldUSDZ=x)}function xAt(e,t){t.zip64=!0;let n=zr(e.data),i=AAt.filter(([o,r])=>t[o]==r);for(let o=0,r=0;o<i.length;o++){let[a,s]=i[o];if(t[a]==s){let c=yAt[s];t[a]=e[a]=c.getValue(n,r),r+=c.bytes}else if(e[a])throw new Error(Fve)}}function Pve(e,t,n,i,o){let r=zr(e.data),a=new g_;a.append(o[n]);let s=zr(new Uint8Array(4));s.setUint32(0,a.get(),!0);let c=kr(r,1);Object.assign(e,{version:Oy(r,0),[t]:Sk(e.data.subarray(5)),valid:!o.bitFlag.languageEncodingFlag&&c==kr(s,0)}),e.valid&&(i[t]=e[t],i[t+_At]=!0)}function bAt(e,t,n){let i=zr(e.data),o=Oy(i,4);Object.assign(e,{vendorVersion:Oy(i,0),vendorId:Oy(i,2),strength:o,originalCompressionMethod:n,compressionMethod:hc(i,5)}),t.compressionMethod=e.compressionMethod}function CAt(e,t){let n=zr(e.data),i=4,o;try{for(;i<e.data.length&&!o;){let r=hc(n,i),a=hc(n,i+2);r==1&&(o=e.data.slice(i+4,i+4+a)),i+=4+a}}catch{}try{if(o&&o.length==24){let r=zr(o),a=r.getBigUint64(0,!0),s=r.getBigUint64(8,!0),c=r.getBigUint64(16,!0);Object.assign(e,{rawLastModDate:a,rawLastAccessDate:s,rawCreationDate:c});let u=XZ(a),f=XZ(s),d=XZ(c),p={lastModDate:u,lastAccessDate:f,creationDate:d};Object.assign(e,p),Object.assign(t,p)}}catch{}}function Rve(e,t,n){try{let i=zr(new Uint8Array(e.data)),o=0,r=Oy(i,o++),a=Oy(i,o++),s=e.data.subarray(o,o+a);o+=a;let c=Ove(s),u=Oy(i,o++),f=e.data.subarray(o,o+u);o+=u;let d=Ove(f),p=Ut;if(!n&&o+2<=e.data.length){let g=e.data;p=new DataView(g.buffer,g.byteOffset+o,2).getUint16(0,!0)}Object.assign(e,{version:r,uid:c,gid:d,unixMode:p}),c!==Ut&&(t.uid=c),d!==Ut&&(t.gid=d),p!==Ut&&(t.unixMode=p)}catch{}}function Ove(e){let t=new Uint8Array(4);return t.set(e,0),new DataView(t.buffer,t.byteOffset,4).getUint32(0,!0)}function TAt(e,t,n){let i=zr(e.data),o=Oy(i,0),r=[],a=[];n?((o&1)==1&&(r.push(kw),a.push(JH)),(o&2)==2&&(r.push(Dk),a.push(rve)),(o&4)==4&&(r.push(Pk),a.push(IZ))):e.data.length>=5&&(r.push(kw),a.push(JH));let s=1;r.forEach((c,u)=>{if(e.data.length>=s+4){let f=kr(i,s);t[c]=e[c]=new Date(f*1e3);let d=a[u];e[d]=f}s+=4})}async function EAt({reader:e,fileEntry:t,offset:n,diskNumberStart:i,signature:o,compressedSize:r,uncompressedSize:a,dataOffset:s,dataDescriptor:c,extraFieldZip64:u,readRanges:f}){let d=0;if(i)for(let m=0;m<i;m++){let A=e.readers[m];d+=A.size}let p=0;if(c&&(u?p=20:p=12),p){let m=await dc(e,s+r,p+4,i);if(kr(zr(m),0)==134695760){let y=kr(zr(m),4),x,b;u?(x=Vw(zr(m),8),b=Vw(zr(m),16)):(x=kr(zr(m),8),b=kr(zr(m),12)),(t.encrypted&&!t.zipCrypto||y==o)&&x==r&&b==a&&(p+=4)}}let g={start:d+n,end:d+s+r+p,fileEntry:t};for(let m of f)if(m.fileEntry!=t&&g.start>=m.start&&g.start<m.end){let A=new Error(Uve);throw A.overlappingEntry=m.fileEntry,A}f.push(g)}async function vAt(e,t,n,i,o){let r=new Uint8Array(4),a=zr(r);wAt(a,0,t);let s=i+o;return await c(i)||await c(Math.min(s,n));async function c(u){let f=n-u,d=await dc(e,f,u);for(let p=d.length-i;p>=0;p--)if(d[p]==r[0]&&d[p+1]==r[1]&&d[p+2]==r[2]&&d[p+3]==r[3])return{offset:f+p,buffer:d.slice(p,p+i).buffer}}}function Nc(e,t,n){return t[n]===Ut?e.options[n]:t[n]}function SAt(e){let t=(e&4294901760)>>16,n=e&65535;try{return new Date(1980+((t&65024)>>9),((t&480)>>5)-1,t&31,(n&63488)>>11,(n&2016)>>5,(n&31)*2,0)}catch{}}function XZ(e){return new Date(Number(e/BigInt(1e4)-BigInt(116444736e5)))}function Oy(e,t){return e.getUint8(t)}function hc(e,t){return e.getUint16(t,!0)}function kr(e,t){return e.getUint32(t,!0)}function Vw(e,t){return Number(e.getBigUint64(t,!0))}function wAt(e,t,n){e.setUint32(t,n,!0)}function zr(e){return new DataView(e.buffer)}var Kve="File already exists",Qve="Zip file comment exceeds 64KB",$ve="File entry comment exceeds 64KB",Jve="File entry name exceeds 64KB",pee="Version exceeds 65535",Zve="The strength must equal 1, 2, or 3",eSe="Extra field type exceeds 65535",tSe="Extra field data exceeds 64KB",gee="Zip64 is not supported (set the 'zip64' option to 'true')",nSe="Undefined uncompressed size",iSe="Zip file not empty",LAt="Invalid uid (must be integer 0..2^32-1)",NAt="Invalid gid (must be integer 0..2^32-1)",FAt="Invalid UNIX mode (must be integer 0..65535)",kAt="Invalid unixExtraFieldType (must be 'infozip' or 'unix')",zAt="Invalid msdosAttributesRaw (must be integer 0..255)",UAt="Invalid msdosAttributes (must be an object with boolean flags)",Wve=new Uint8Array([7,0,2,0,65,69,3,0,0]),oSe="infozip",rSe="unix",hee=0,qve=[],Vk=class{constructor(t,n={}){t=new Fw(t);let i=t.availableSize!==Ut&&t.availableSize>0&&t.availableSize!==qC&&t.maxSize!==Ut&&t.maxSize>0&&t.maxSize!==qC;Object.assign(this,{writer:t,addSplitZipSignature:i,options:n,config:dk(),files:new Map,filenames:new Set,offset:n[qZ]===Ut?t.size||t.writable.size||0:n[qZ],pendingEntriesSize:0,pendingAddFileCalls:new Set,bufferedWrites:0})}async prependZip(t){if(this.filenames.size)throw new Error(iSe);t=new XC(t);let n=new KC(t.readable),i=await n.getEntries();await n.close(),await t.readable.pipeTo(this.writer.writable,{preventClose:!0,preventAbort:!0}),this.writer.size=this.offset=t.size,this.filenames=new Set(i.map(o=>o.filename)),this.files=new Map(i.map(o=>{let{version:r,compressionMethod:a,lastModDate:s,lastAccessDate:c,creationDate:u,rawFilename:f,bitFlag:d,encrypted:p,uncompressedSize:g,compressedSize:m,diskOffset:A,diskNumber:y,zip64:x}=o,{rawExtraFieldZip64:b,rawExtraFieldAES:C,rawExtraFieldExtendedTimestamp:E,rawExtraFieldNTFS:S,rawExtraFieldUnix:w,rawExtraField:P}=o,{level:R,languageEncodingFlag:B,dataDescriptor:L}=d;b=b||new Uint8Array,C=C||new Uint8Array,E=E||new Uint8Array,S=S||new Uint8Array,w=o.rawExtraFieldUnix||new Uint8Array,P=P||new Uint8Array;let _=Pi(b,C,E,S,w,P),T=x&&g>4294967295,v=x&&m>4294967295,{headerArray:I,headerView:O}=aSe({version:r,bitFlag:sSe(R,B,L,p,a),compressionMethod:a,uncompressedSize:g,compressedSize:m,lastModDate:s,rawFilename:f,zip64CompressedSize:v,zip64UncompressedSize:T,extraFieldLength:_});return Object.assign(o,{zip64UncompressedSize:T,zip64CompressedSize:v,zip64Offset:x&&this.offset-A>4294967295,zip64DiskNumberStart:x&&y>65535,rawExtraFieldZip64:b,rawExtraFieldAES:C,rawExtraFieldExtendedTimestamp:E,rawExtraFieldNTFS:S,rawExtraFieldUnix:w,rawExtraField:P,extendedTimestamp:E.length>0||S.length>0,extraFieldExtendedTimestampFlag:1+(c?2:0)+(u?4:0),headerArray:I,headerView:O}),[o.filename,o]}))}async add(t="",n,i={}){let o=this,{pendingAddFileCalls:r,config:a}=o;hee<a.maxWorkers?hee++:await new Promise(c=>qve.push(c));let s;try{if(t=t.trim(),o.filenames.has(t))throw new Error(Kve);return o.filenames.add(t),s=VAt(o,t,n,i),r.add(s),await s}catch(c){throw o.filenames.delete(t),c}finally{r.delete(s);let c=qve.shift();c?c():hee--}}remove(t){let{filenames:n,files:i}=this;if(typeof t=="string"&&(t=i.get(t)),t&&t.filename!==Ut){let{filename:o}=t;if(n.has(o)&&i.has(o))return n.delete(o),i.delete(o),!0}return!1}async close(t=new Uint8Array,n={}){let i=this,{pendingAddFileCalls:o,writer:r}=this,{writable:a}=r;for(;o.size;)await Promise.allSettled(Array.from(o));return await QAt(i,t,n),gi(i,n,s6)||await a.getWriter().close(),r.getData?r.getData():a}};async function VAt(e,t,n,i){t=t.trim();let o=gi(e,i,MZ),r=gi(e,i,NZ,o?20:768),a=gi(e,i,kZ),s=gi(e,i,"uid"),c=gi(e,i,"gid"),u=gi(e,i,jZ),f=gi(e,i,Sve),d=gi(e,i,GZ),p=gi(e,i,HZ),g=gi(e,i,WZ);if(s!==Ut&&(s<0||s>4294967295))throw new Error(LAt);if(c!==Ut&&(c<0||c>4294967295))throw new Error(NAt);if(u!==Ut&&(u<0||u>65535))throw new Error(FAt);if(f!==Ut&&f!==oSe&&f!==rSe)throw new Error(kAt);let m=gi(e,i,RZ),A=gi(e,i,OZ),y=s!==Ut||c!==Ut||u!==Ut||f,x=m!==Ut||A!==Ut;if(y?(o=!1,r=r&65535|768):x&&(o=!0,r=r&255),m!==Ut&&(m<0||m>255))throw new Error(zAt);if(A&&typeof A!==vEe)throw new Error(UAt);if(r>65535)throw new Error(pee);let b=gi(e,i,PZ,0);!i[Rk]&&t.endsWith("/")&&(i[Rk]=!0);let C=gi(e,i,Rk);C?(t.endsWith("/")||(t+="/"),b===0&&(b=16,o||(b|=16877<<16))):!o&&b===0&&(a?b=493<<16:b=420<<16);let E;o||(E=b>>16&65535,u=u===Ut?E:u&65535,d?u|=2048:d=!!(u&2048),p?u|=1024:p=!!(u&1024),g?u|=512:g=!!(u&512),C&&(u|=16384),b=(u&65535)<<16|b&255),{msdosAttributesRaw:m,msdosAttributes:A}=qAt(m,A),x&&(b=b&4294967295|m&255);let S=gi(e,i,vve,Rw),w=S(t);if(w===Ut&&(w=Rw(t)),Pi(w)>65535)throw new Error(Jve);let P=i[wk]||"",R=S(P);if(R===Ut&&(R=Rw(P)),Pi(R)>65535)throw new Error($ve);let B=gi(e,i,LZ,20);if(B>65535)throw new Error(pee);let L=gi(e,i,kw,new Date),_=gi(e,i,Dk),T=gi(e,i,Pk),v=gi(e,i,DZ,0),I=gi(e,i,n6),O,N;I||(O=gi(e,i,e6),N=gi(e,i,t6));let j=gi(e,i,pve,3),k=gi(e,i,FZ),U=gi(e,i,gve,!0),F=gi(e,i,_ve,!0),H=gi(e,i,o6),q=gi(e,i,a6,!0),J=gi(e,i,yve),W=gi(e,i,xve),Z=gi(e,i,bve,!1),K=gi(e,i,i6),le=gi(e,i,Cve,!0),me=gi(e,i,zZ),ae=gi(e,i,Ave),be=gi(e,i,r6),ge=gi(e,i,Tve);J&&ge===Ut&&(ge=!1),(ge===Ut||k)&&(ge=!0),ae!==Ut&&ae!=6&&(be=!1),!be&&e.config.CompressionStream===Ut&&e.config.CompressionStreamZlib===Ut&&(ae=0);let we=gi(e,i,ZH);if(!k&&(O!==Ut||N!==Ut)&&!(j>=1&&j<=3))throw new Error(Zve);let Ee=new Uint8Array,Be=i[VZ];if(Be){let at=0,st=0;Be.forEach(Ln=>at+=4+Pi(Ln)),Ee=new Uint8Array(at),Be.forEach((Ln,Nn)=>{if(Nn>65535)throw new Error(eSe);if(Pi(Ln)>65535)throw new Error(tSe);Ir(Ee,new Uint16Array([Nn]),st),Ir(Ee,new Uint16Array([Pi(Ln)]),st+2),Ir(Ee,Ln,st+4),st+=4+Pi(Ln)})}let ke=0,Ge=0,rt=0;if(I&&(rt=i[Ik],rt===Ut))throw new Error(nSe);let et=we===!0;n&&(n=new XC(n),await n0(n),I?(i.uncompressedSize=rt,ke=Xve(rt)):n.size===Ut?(ge=!0,(we||we===Ut)&&(we=!0,rt=ke=4294967296)):(i.uncompressedSize=rt=n.size,ke=Xve(rt)));let{diskOffset:Pe,diskNumber:Ye}=e.writer,ut=et||rt>4294967295,Tt=et||ke>4294967295;if(ut||Tt){if(we===!1)throw new Error(gee);we=!0}we=we||!1;let tn=gi(e,i,BZ);i=Object.assign({},i,{rawFilename:w,rawComment:R,version:B,versionMadeBy:r,lastModDate:L,lastAccessDate:_,creationDate:T,rawExtraField:Ee,zip64:we,zip64UncompressedSize:ut,zip64CompressedSize:Tt,password:O,rawPassword:N,level:ae,useWebWorkers:H,transferStreams:q,encryptionStrength:j,extendedTimestamp:U,zipCrypto:k,bufferedWrite:J,createTempStream:W,keepOrder:F,useUnicodeFileNames:le,dataDescriptor:ge,dataDescriptorSignature:Z,signal:K,msDosCompatible:o,internalFileAttribute:v,internalFileAttributes:v,externalFileAttribute:b,externalFileAttributes:b,useCompressionStream:be,passThrough:I,encrypted:!!(O&&Pi(O)||N&&Pi(N))||I&&tn,signature:i[UZ],compressionMethod:me,uncompressedSize:rt,offset:e.offset-Pe,diskNumberStart:Ye,uid:s,gid:c,setuid:d,setgid:p,sticky:g,unixMode:u,msdosAttributesRaw:m,msdosAttributes:A,unixExternalUpper:E});let Ht=HAt(i),xt=YAt(i),Pt=Pi(Ht.localHeaderArray,xt.dataDescriptorArray);Ge=Pt+ke,e.options[YZ]&&(Ge+=Ge+64),e.pendingEntriesSize+=Ge;let bn;try{bn=await jAt(e,t,n,{headerInfo:Ht,dataDescriptorInfo:xt,metadataSize:Pt},i)}finally{e.pendingEntriesSize-=Ge}return Object.assign(bn,{name:t,comment:P,extraField:Be}),new Py(bn)}async function jAt(e,t,n,i,o){let{files:r,writer:a}=e,{keepOrder:s,dataDescriptor:c,signal:u}=o,{headerInfo:f}=i,d=e.options[YZ],p=Array.from(r.values()).pop(),g={},m,A,y,x,b,C;r.set(t,g);try{let P;s&&(P=p&&p.lock,E()),(o.bufferedWrite||!s||e.writerLocked||e.bufferedWrites||!c)&&!d?(o.createTempStream?C=await o.createTempStream():C=new null(Ut,Ut,{highWaterMark:qC}),C.size=0,m=!0,e.bufferedWrites++,await n0(a)):(C=a,await S()),await n0(C);let{writable:R,diskOffset:B}=a;if(e.addSplitZipSignature){delete e.addSplitZipSignature;let v=new Uint8Array(4),I=Hs(v);co(I,0,134695760),await y_(a,v),e.offset+=4}d&&WAt(i,e.offset-B);let{localHeaderView:L,localHeaderArray:_}=f;m||(await P,await w(R));let{diskNumber:T}=a;return g.diskNumberStart=T,m||(b=!0,await y_(C,_)),g=await GAt(n,C,g,i,e.config,o),m||(b=!1),r.set(t,g),g.filename=t,m?(await Promise.all([C.writable.getWriter().close(),P]),await S(),x=!0,g.diskNumberStart=a.diskNumber,g.offset=e.offset-a.diskOffset,KAt(g,L,o),await w(R),await y_(a,_),await C.readable.pipeTo(R,{preventClose:!0,preventAbort:!0,signal:u}),a.size+=C.size,x=!1):g.offset=e.offset-B,e.offset+=g.size,g}catch(P){if(x||b){if(e.hasCorruptedEntries=!0,P)try{P.corruptedEntry=!0}catch{}m?e.offset+=C.size:e.offset=C.size}throw r.delete(t),P}finally{m&&e.bufferedWrites--,y&&y(),A&&A()}function E(){g.lock=new Promise(P=>y=P)}async function S(){e.writerLocked=!0;let{lockWriter:P}=e;e.lockWriter=new Promise(R=>A=()=>{e.writerLocked=!1,R()}),await P}async function w(P){Pi(f.localHeaderArray)>a.availableSize&&(a.availableSize=0,await y_(P,new Uint8Array))}}async function GAt(e,t,{diskNumberStart:n,lock:i},o,r,a){let{headerInfo:s,dataDescriptorInfo:c,metadataSize:u}=o,{headerArray:f,headerView:d,lastModDate:p,rawLastModDate:g,encrypted:m,compressed:A,version:y,compressionMethod:x,rawExtraFieldZip64:b,localExtraFieldZip64Length:C,rawExtraFieldExtendedTimestamp:E,extraFieldExtendedTimestampFlag:S,rawExtraFieldNTFS:w,rawExtraFieldUnix:P,rawExtraFieldAES:R}=s,{dataDescriptorArray:B}=c,{rawFilename:L,lastAccessDate:_,creationDate:T,password:v,rawPassword:I,level:O,zip64:N,zip64UncompressedSize:j,zip64CompressedSize:k,zipCrypto:U,dataDescriptor:F,directory:H,executable:q,versionMadeBy:J,rawComment:W,rawExtraField:Z,useWebWorkers:K,transferStreams:le,onstart:me,onprogress:ae,onend:be,signal:ge,encryptionStrength:we,extendedTimestamp:Ee,msDosCompatible:Be,internalFileAttributes:ke,externalFileAttributes:Ge,uid:rt,gid:et,unixMode:Pe,setuid:Ye,setgid:ut,sticky:Tt,unixExternalUpper:tn,msdosAttributesRaw:Ht,msdosAttributes:xt,useCompressionStream:Pt,passThrough:bn}=a,at={lock:i,versionMadeBy:J,zip64:N,directory:!!H,executable:!!q,filenameUTF8:!0,rawFilename:L,commentUTF8:!0,rawComment:W,rawExtraFieldZip64:b,localExtraFieldZip64Length:C,rawExtraFieldExtendedTimestamp:E,rawExtraFieldNTFS:w,rawExtraFieldUnix:P,rawExtraFieldAES:R,rawExtraField:Z,extendedTimestamp:Ee,msDosCompatible:Be,internalFileAttributes:ke,externalFileAttributes:Ge,diskNumberStart:n,uid:rt,gid:et,unixMode:Pe,setuid:Ye,setgid:ut,sticky:Tt,unixExternalUpper:tn,msdosAttributesRaw:Ht,msdosAttributes:xt},{signature:st,uncompressedSize:Ln}=a,Nn=0;bn||(Ln=0);let{writable:uo}=t;if(e){e.chunkSize=MH(r);let Yo=e.readable,oo=e.size,ro={options:{codecType:HH,level:O,rawPassword:I,password:v,encryptionStrength:we,zipCrypto:m&&U,passwordVerification:m&&U&&g>>8&255,signed:!bn,compressed:A&&!bn,encrypted:m&&!bn,useWebWorkers:K,useCompressionStream:Pt,transferStreams:le},config:r,streamOptions:{signal:ge,size:oo,onstart:me,onprogress:ae,onend:be}};try{let Xn=await KH({readable:Yo,writable:uo},ro);Nn=Xn.outputSize,t.size+=Nn,bn||(Ln=Xn.inputSize,st=Xn.signature)}catch(Xn){throw Xn.outputSize!==Ut&&(t.size+=Xn.outputSize),Xn}}return XAt({signature:st,compressedSize:Nn,uncompressedSize:Ln,headerInfo:s,dataDescriptorInfo:c},a),F&&await y_(t,B),Object.assign(at,{uncompressedSize:Ln,compressedSize:Nn,lastModDate:p,rawLastModDate:g,creationDate:T,lastAccessDate:_,encrypted:m,zipCrypto:U,size:u+Nn,compressionMethod:x,version:y,headerArray:f,headerView:d,signature:st,extraFieldExtendedTimestampFlag:S,zip64UncompressedSize:j,zip64CompressedSize:k}),at}function HAt(e){let{rawFilename:t,lastModDate:n,lastAccessDate:i,creationDate:o,level:r,zip64:a,zipCrypto:s,useUnicodeFileNames:c,dataDescriptor:u,directory:f,rawExtraField:d,encryptionStrength:p,extendedTimestamp:g,passThrough:m,encrypted:A,zip64UncompressedSize:y,zip64CompressedSize:x,uncompressedSize:b}=e,{version:C,compressionMethod:E}=e,S=!f&&(r>0||r===Ut&&E!==0),w,P=m||!S,R=a&&(e.bufferedWrite||!y&&!x||P);if(a){let q=4;y&&(q+=8),x&&(q+=8),w=new Uint8Array(q);let J=Hs(w);if(Ki(J,0,1),Ki(J,2,Pi(w)-4),R){let W=Hs(w),Z=4;y&&(mc(W,Z,BigInt(b)),Z+=8),x&&P&&(mc(W,Z,BigInt(b)),Z+=8),Z==4&&(w=new Uint8Array)}}else w=new Uint8Array;let B;if(A&&!s){B=new Uint8Array(Pi(Wve)+2);let q=Hs(B);Ki(q,0,39169),Ir(B,Wve,2),jw(q,8,p)}else B=new Uint8Array;let L,_,T;if(g){_=new Uint8Array(9+(i?4:0)+(o?4:0));let q=Hs(_);Ki(q,0,21589),Ki(q,2,Pi(_)-4),T=1+(i?2:0)+(o?4:0),jw(q,4,T);let J=5;co(q,J,Math.floor(n.getTime()/1e3)),J+=4,i&&(co(q,J,Math.floor(i.getTime()/1e3)),J+=4),o&&co(q,J,Math.floor(o.getTime()/1e3));try{L=new Uint8Array(36);let W=Hs(L),Z=mee(n);Ki(W,0,10),Ki(W,2,32),Ki(W,8,1),Ki(W,10,24),mc(W,12,Z),mc(W,20,mee(i)||Z),mc(W,28,mee(o)||Z)}catch{L=new Uint8Array}}else L=_=new Uint8Array;let v;try{let{uid:q,gid:J,unixMode:W,setuid:Z,setgid:K,sticky:le,unixExtraFieldType:me}=e;if(me&&(q!==Ut||J!==Ut||W!==Ut)){let ae=Yve(q),be=Yve(J),ge=new Uint8Array;if(me==rSe&&W!==Ut){let ke=W&65535;Z&&(ke|=2048),K&&(ke|=1024),le&&(ke|=512),ge=new Uint8Array(2),new DataView(ge.buffer).setUint16(0,ke,!0)}let we=3+ae.length+be.length+ge.length;v=new Uint8Array(4+we);let Ee=Hs(v);Ki(Ee,0,me==oSe?30837:30805),Ki(Ee,2,we),jw(Ee,4,1),jw(Ee,5,ae.length);let Be=6;Ir(v,ae,Be),Be+=ae.length,jw(Ee,Be,be.length),Be++,Ir(v,be,Be),Be+=be.length,Ir(v,ge,Be)}else v=new Uint8Array}catch{v=new Uint8Array}E===Ut&&(E=S?8:0),a&&(C=C>45?C:45),A&&!s&&(C=C>51?C:51,B[9]=E,E=99);let I=R?Pi(w):0,O=I+Pi(B,_,L,v,d),{headerArray:N,headerView:j,rawLastModDate:k}=aSe({version:C,bitFlag:sSe(r,c,u,A,E),compressionMethod:E,uncompressedSize:b,lastModDate:n<cZ?cZ:n>sZ?sZ:n,rawFilename:t,zip64CompressedSize:x,zip64UncompressedSize:y,extraFieldLength:O}),U=30,F=new Uint8Array(U+Pi(t)+O),H=Hs(F);return co(H,0,67324752),Ir(F,N,4),Ir(F,t,U),U+=Pi(t),R&&Ir(F,w,U),U+=I,Ir(F,B,U),U+=Pi(B),Ir(F,_,U),U+=Pi(_),Ir(F,L,U),U+=Pi(L),Ir(F,v,U),U+=Pi(v),Ir(F,d,U),u&&(co(H,18,0),co(H,22,0)),{localHeaderArray:F,localHeaderView:H,headerArray:N,headerView:j,lastModDate:n,rawLastModDate:k,encrypted:A,compressed:S,version:C,compressionMethod:E,extraFieldExtendedTimestampFlag:T,rawExtraFieldZip64:new Uint8Array,localExtraFieldZip64Length:I,rawExtraFieldExtendedTimestamp:_,rawExtraFieldNTFS:L,rawExtraFieldUnix:v,rawExtraFieldAES:B,extraFieldLength:O}}function WAt(e,t){let{headerInfo:n}=e,{localHeaderArray:i,extraFieldLength:o}=n,r=Hs(i),a=64-(t+Pi(i))%64;a<4&&(a+=64);let s=new Uint8Array(a),c=Hs(s);Ki(c,0,6534),Ki(c,2,a-2);let u=i;n.localHeaderArray=i=new Uint8Array(Pi(u)+a),Ir(i,u),Ir(i,s,Pi(u)),r=Hs(i),Ki(r,28,o+a),e.metadataSize+=a}function Yve(e){if(e===Ut)return new Uint8Array;{let t=new Uint8Array(4);Hs(t).setUint32(0,e,!0);let i=4;for(;i>1&&t[i-1]===0;)i--;return t.subarray(0,i)}}function qAt(e,t){if(e!==Ut)e=e&255;else if(t!==Ut){let{readOnly:n,hidden:i,system:o,directory:r,archive:a}=t,s=0;n&&(s|=1),i&&(s|=2),o&&(s|=4),r&&(s|=16),a&&(s|=32),e=s&255}return t===Ut&&(t={readOnly:!!(e&1),hidden:!!(e&2),system:!!(e&4),directory:!!(e&16),archive:!!(e&32)}),{msdosAttributesRaw:e,msdosAttributes:t}}function YAt({zip64:e,dataDescriptor:t,dataDescriptorSignature:n}){let i=new Uint8Array,o,r=0,a=e?20:12;return n&&(a+=4),t&&(i=new Uint8Array(a),o=Hs(i),n&&(r=4,co(o,0,134695760))),{dataDescriptorArray:i,dataDescriptorView:o,dataDescriptorOffset:r}}function XAt({signature:e,compressedSize:t,uncompressedSize:n,headerInfo:i,dataDescriptorInfo:o},{zip64:r,zipCrypto:a,dataDescriptor:s}){let{headerView:c,encrypted:u}=i,{dataDescriptorView:f,dataDescriptorOffset:d}=o;(!u||a)&&e!==Ut&&(co(c,10,e),s&&co(f,d,e)),r?s&&(mc(f,d+4,BigInt(t)),mc(f,d+12,BigInt(n))):(co(c,14,t),co(c,18,n),s&&(co(f,d+4,t),co(f,d+8,n)))}function KAt({rawFilename:e,encrypted:t,zip64:n,localExtraFieldZip64Length:i,signature:o,compressedSize:r,uncompressedSize:a,zip64UncompressedSize:s,zip64CompressedSize:c},u,{dataDescriptor:f}){if(f||(t||co(u,14,o),c||co(u,18,r),s||co(u,22,a)),n&&i){let d=30+Pi(e)+4;s&&(mc(u,d,BigInt(a)),d+=8),c&&(mc(u,d,BigInt(r)),d+=8)}}async function QAt(e,t,n){let{files:i,writer:o}=e,{diskOffset:r}=o,{diskNumber:a}=o,s=0,c=0,u=e.offset-r,f=i.size;for(let[,E]of i){let{rawFilename:S,rawExtraFieldAES:w,rawComment:P,rawExtraFieldNTFS:R,rawExtraFieldUnix:B,rawExtraField:L,extendedTimestamp:_,extraFieldExtendedTimestampFlag:T,lastModDate:v,zip64UncompressedSize:I,zip64CompressedSize:O,uncompressedSize:N,compressedSize:j}=E,k=E.offset>4294967295,U=E.diskNumberStart>65535,F;if(k||U||I||O){let q=4;I&&(q+=8),O&&(q+=8),k&&(q+=8),U&&(q+=4),F=new Uint8Array(q);let J=Hs(F);Ki(J,0,1),Ki(J,2,q-4);let W=4;I&&(mc(J,W,BigInt(N)),W+=8),O&&(mc(J,W,BigInt(j)),W+=8),k&&(mc(J,W,BigInt(E.offset)),W+=8),U&&co(J,W,E.diskNumberStart)}else F=new Uint8Array;E.rawExtraFieldZip64=F,E.zip64Offset=k,E.zip64DiskNumberStart=U;let H;if(_){H=new Uint8Array(9);let q=Hs(H);Ki(q,0,21589),Ki(q,2,5),jw(q,4,T),co(q,5,Math.floor(v.getTime()/1e3))}else H=new Uint8Array;E.rawExtraFieldExtendedTimestamp=H,c+=46+Pi(S,P,F,w,R,B,H,L)}let d=new Uint8Array(c),p=Hs(d);await n0(o);let g=0;for(let[E,S]of Array.from(i.values()).entries()){let{offset:w,rawFilename:P,rawExtraFieldZip64:R,rawExtraFieldAES:B,rawExtraFieldExtendedTimestamp:L,rawExtraFieldNTFS:_,rawExtraFieldUnix:T,rawExtraField:v,rawComment:I,versionMadeBy:O,headerArray:N,headerView:j,zip64UncompressedSize:k,zip64CompressedSize:U,zip64DiskNumberStart:F,zip64Offset:H,internalFileAttributes:q,externalFileAttributes:J,diskNumberStart:W,uncompressedSize:Z,compressedSize:K}=S,le=Pi(R,B,L,_,T,v);co(p,s,33639248),Ki(p,s+4,O),k||co(j,18,Z),U||co(j,14,K),Ir(d,N,s+6);let me=s+30;if(Ki(p,me,le),me+=2,Ki(p,me,Pi(I)),me+=2,Ki(p,me,F?65535:W),me+=2,Ki(p,me,q),me+=2,J&&co(p,me,J),me+=4,co(p,me,H?4294967295:w),me+=4,Ir(d,P,me),me+=Pi(P),Ir(d,R,me),me+=Pi(R),Ir(d,B,me),me+=Pi(B),Ir(d,L,me),me+=Pi(L),Ir(d,_,me),me+=Pi(_),Ir(d,T,me),me+=Pi(T),Ir(d,v,me),me+=Pi(v),Ir(d,I,me),me+=Pi(I),s-g>o.availableSize&&(o.availableSize=0,await y_(o,d.slice(g,s)),g=s),s=me,n.onprogress)try{await n.onprogress(E+1,i.size,new Py(S))}catch{}}await y_(o,g?d.slice(g):d);let m=o.diskNumber,{availableSize:A}=o;A<22&&m++;let y=gi(e,n,ZH);if(u>4294967295||c>4294967295||f>65535||m>65535){if(y===!1)throw new Error(gee);y=!0}let x=new Uint8Array(y?98:22),b=Hs(x);s=0,y&&(co(b,0,101075792),mc(b,4,BigInt(44)),Ki(b,12,45),Ki(b,14,45),co(b,16,m),co(b,20,a),mc(b,24,BigInt(f)),mc(b,32,BigInt(f)),mc(b,40,BigInt(c)),mc(b,48,BigInt(u)),co(b,56,117853008),mc(b,64,BigInt(u)+BigInt(c)),co(b,72,m+1),gi(e,n,Eve,!0)&&(m=65535,a=65535),f=65535,u=4294967295,c=4294967295,s+=76),co(b,s,101010256),Ki(b,s+4,m),Ki(b,s+6,a),Ki(b,s+8,f),Ki(b,s+10,f),co(b,s+12,c),co(b,s+16,u);let C=Pi(t);if(C)if(C<=65535)Ki(b,s+20,C);else throw new Error(Qve);await y_(o,x),C&&await y_(o,t)}async function y_(e,t){let{writable:n}=e,i=n.getWriter();try{await i.ready,e.size+=Pi(t),await i.write(t)}finally{i.releaseLock()}}function mee(e){if(e)return(BigInt(e.getTime())+BigInt(116444736e5))*BigInt(1e4)}function gi(e,t,n,i){let o=t[n]===Ut?e.options[n]:t[n];return o===Ut?i:o}function Xve(e){return e+5*(Math.floor(e/16383)+1)}function jw(e,t,n){e.setUint8(t,n)}function Ki(e,t,n){e.setUint16(t,n,!0)}function co(e,t,n){e.setUint32(t,n,!0)}function mc(e,t,n){e.setBigUint64(t,n,!0)}function Ir(e,t,n){e.set(t,n)}function Hs(e){return new DataView(e.buffer)}function Pi(...e){let t=0;return e.forEach(n=>n&&(t+=n.length)),t}function aSe({version:e,bitFlag:t,compressionMethod:n,uncompressedSize:i,compressedSize:o,lastModDate:r,rawFilename:a,zip64CompressedSize:s,zip64UncompressedSize:c,extraFieldLength:u}){let f=new Uint8Array(26),d=Hs(f);Ki(d,0,e),Ki(d,2,t),Ki(d,4,n);let p=new Uint32Array(1),g=Hs(p);Ki(g,0,(r.getHours()<<6|r.getMinutes())<<5|r.getSeconds()/2),Ki(g,2,(r.getFullYear()-1980<<4|r.getMonth()+1)<<5|r.getDate());let m=p[0];return co(d,6,m),(s||o!==Ut)&&co(d,14,s?4294967295:o),(c||i!==Ut)&&co(d,18,c?4294967295:i),Ki(d,22,Pi(a)),Ki(d,24,u),{headerArray:f,headerView:d,rawLastModDate:m}}function sSe(e,t,n,i,o){let r=0;return t&&(r=r|2048),n&&(r=r|8),(o==8||o==9)&&(e>=0&&e<=3&&(r=r|6),e>3&&e<=5&&(r=r|4),e==9&&(r=r|2)),i&&(r=r|1),r}var $At={};try{$p({baseURI:$At.url})}catch{}var qf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function cSe(e){let t;e({wasmURI:()=>(t||(t="data:application/wasm;base64,"+(n=>{n=(a=>{let s=(a=(a+"").replace(/[^A-Za-z0-9+/=]/g,"")).length,c=[];for(let u=0;s>u;u+=4){let f=qf.indexOf(a[u])<<18|qf.indexOf(a[u+1])<<12|(63&qf.indexOf(a[u+2]))<<6|63&qf.indexOf(a[u+3]);c.push(f>>16&255),a[u+2]!=="="&&c.push(f>>8&255),a[u+3]!=="="&&c.push(255&f)}return new Uint8Array(c)})(n);let i=new Uint8Array(1024),o=0;for(let a=0;a<n.length;){let s=n[a++];if(128&s){let c=3+(127&s),u=n[a++]<<8|n[a++],f=o-u;r(o+c);for(let d=0;c>d;d++)i[o++]=i[f+d]}else{let c=s;r(o+c);for(let u=0;c>u&&a<n.length;u++)i[o++]=n[a++]}}return(a=>{let s="",c=a.length,u=0;for(;c>u+2;u+=3){let d=a[u]<<16|a[u+1]<<8|a[u+2];s+=qf[d>>18&63]+qf[d>>12&63]+qf[d>>6&63]+qf[63&d]}let f=c-u;if(f===1){let d=a[u]<<16;s+=qf[d>>18&63]+qf[d>>12&63]+"=="}else if(f===2){let d=a[u]<<16|a[u+1]<<8;s+=qf[d>>18&63]+qf[d>>12&63]+qf[d>>6&63]+"="}return s})(new Uint8Array(i.buffer.slice(0,o)));function r(a){if(i.length<a){let s=2*i.length;for(;a>s;)s*=2;let c=new Uint8Array(s);c.set(i.subarray(0,o)),i=c}}})("FQBhc20BAAAAAUULYAF/AX9gAn9/AIEABYAACwIDf4IABwEBgAARAQaAAAuDAA6BABUDAGAAgAADgAANAQSBABUDAGAHgwAegAAfEgNCQQcABAEABAgIAAIABQIKAIAAB4EAAwEFgQAHAgICgQAHEAEDAAUGAAMDBQQJBAQJAQaAAAEeAAIEAwIEAgIBBAcDAwQFAXABDQ0FBgEBggKCAgYIgACYIkHQ1QQLB4oEHAZtZW1vcnkCAAxpbmZsYXRlOV9uZXcABw2GAA8HaW5pdAAIEYoAEAdfcmF3AAoQhgAUCXByb2Nlc3MAC4cARgZlbmQADhaGAA8QbGFzdF9jb25zdW1lZAARC4QAGYMAbYUANoMAbAEShQBYhwBrARSFAH+DABMHZ3ppcAAVD4UAFIUAfgEWhgBWgQB9AhgVhQAOjQB8AmRliQB8hQAOggB8AhoQiQAPggB8AhsRigATggB8AhwPhQAUhQB8AR2GAFaBAHwJHwRmcmVlAAIVhQAVjACDCgZtYWxsb2MAAQuCAFUKaWFsaXplAAAZX4AADxZkaXJlY3RfZnVuY3Rpb25fdGFibGUBgAAcG2Vtc2NyaXB0ZW5fc3RhY2tfcmVzdG9yZQAFHI4AGwJnZYAAbw51cnJlbnQABiJfX2N4YYAAWwRjcmVtgAASBl9leGNlcIIAXQZyZWZjb3WAACUtPQkSAQBBAQsMACEiDA8XGR4+NTg7CqHlAkECAAu/JwELfyMAQRBrIgokAAJAjwACEiAAQfQBTQRAQaQnKAIAIgNBEIAAEgYLakH4A3GBAAkQSRsiBkEDdiIAdiIBQQNxBIEAMgYBQX9zQQGAAB8GaiICQQN0gAAZDMwnaiIAIAEoAtQnIoAABgQIIgVGggBSCSADQX4gAndxNoACphEBCyAFIAA2AgwgACAFNgIIC4AASAMIaiGAADcBIIIARoAABQRyNgIEgQAPA2oiAYEATQMEQQGBABIHDAsLIAZBrIIAnwMITQ2AABuBAIYEQQIgAIEANQUAIAJrcoAANQQAdHFogQCjA3QiAIIAj4AAH4IAj4AABosAjwUBd3EiA4YAkQECgQCRAQKEAJEBAIAAaIMAhYAACgJqIoAAjIIA3wUgBmsiBYMAjIAAGQIBaoEALgoAIAgEQCAIQXhxgQBuBCEBQbiBAKAEIQICf4AAZQEBgAAZBwN2dCIHcUWEAHgCIAeAAD6AADyBAHWBASEDCyEDgQDpgAB2gAAchACEAQGDAAeAAJyBAIuCARyAAFYCIASAADmAAP6CAHWAAQsCQaiCAQkCC0WAAQkFC2hBAnSAAOYDKSICgQEuAnhxgACqByEEIAIhAQOCAagFKAIQIgCAAIOBAAoBFIAACgENgAB+gAEQhAAqgADZgQFuBQRJIgEbgAA2gAFJASCAAAmAATgBIYEApwILIIAAVAMYIQmAABaAAAkEDCIAR4AASIAACgEIgAA3hAHGgACxAwgMCoIAKQUUIgEEf4AByAIUaoABU4EAdwMBRQ2AANkOQRBqCyEFA0AgBSEHIAGAAZoDFGohgAIFggAwAg0AgADlARCEABCAADEGDQALIAdBgABbCAAMCQtBfyEGgAAfA79/S4IAJwELgAISgAC1AiEGhAD+CAdFDQBBHyEIgAH+ggDygALEA///B4ACxoABwQEmgQJYBnZnIgBrdoICpQpBAXRrQT5qIQgLhALxAQiFATUBAYEBngIAIYECCoEAB4AAPAEZgAAdAwF2a4AAVwgIQR9HG3QhAoUBSYUBNAQDIARPgACTAQGAALcDAyIEgACGAQCAAH8BAYAARAEDgQI/ggFoAQOAAdOBAtQGHXZBBHFqggDcAkYbgAAdAgMbgABkAQKAAI+AAWSBAO6BADECBXKDAIQBBYACzwEIgQK7gADugALPAgdxgQGuAwMgAIUB4QEhgAEdggHAgAFMiAHCAQKAAb4BIYAAbIEByYMBxAEFgQAJhQFTgAGTAQGDAW8DCyIAggByAQWAATkCIASDA02AAEGBAMsBBYEB5wEIgAA5gAAJhAHngAAKjQHngAKTgAAWgwHnAQWCAeeAAA+EAecBBYIB54ABK4ACeoAA+4MB54IDgIgB54IAEIQB5wEDgwHnAQeHA9gBBYEEgoMDQ4AEpoAAjYECnwNBEE+AAI2CA4uAATKGA4ECBWqBAJOAAFeFA66BA1WAABeGA7sBBYsEQIABX4AEJwEhgAHlgANGgQA6gQNWgAN0gQCZgQNlgAJvgABKAbCCAIgCAkmAAIgBsIAAH4IAgYEALAK8J4AAA4EAG4MAiIEAN4kAjYYEMYUAS4QCSgEvgAQ/BQJ/QfwqgAA7gABTAoQrgAAIgQJoBYgrQn83gABXBoArQoCggIAAAQEEgQAOEfwqIApBDGpBcHFB2KrVqgVzgQB6ApArggEnA0HgKoMACAaAIAsiAWqABaKAAZMBa4AEXIEEmQVNDQhB3IEAZAIiBYAAZgHUggAKAQiABKMFIgkgCE2AAUcFCUlyDQmAAvmAAEUDLQAAgAKQgAJvhQX6hADYgQA5BOQqIQCDAlqBAD+BAY2AADwBCIICagNqSQ2BAtuBAhKCAkMEQQAQBIAFdwJ/RoAB+QMBIQOAAMmCAR0BQYAAk4AD+4AGIYEC/AFrgQVTAWqCAs0DcWohgABAAQOBAKsBA4QAq4EBEYMAq4ADRQNqIgeAAHGAAUoBB4AAqwEEgAAqgABfgAFjBUcNAQwFgQA4gABMgADrgQAWggJCgABTgQCVAUaABP4BAoIDFYEAioABCQVBMGogA4EAuIAB7QMMBAuDAXGBAyADIANrgQCJBwJrcSICEASDAC6ABWWAAJaCACuAAJyAAM0ERw0CC4EBaAHggQCWAkEEgQWsgAWohADpggDygQBoAXKBBSQDTXINgANTgABQgAPoCAZBKGpNDQULgADOgwDRgQDPggGsAdiCAA4BAIECTgLYKoEDSQEAgQGFgwFxAQSHAXGDANOBA2uAANUCIgWAANeCABKDAWuBAMcBtIMCe4EBSoAAewEbgQQtAbSDAr2CAmkDQegqgQYwAQCAAFCCABUFQcQnQX+BAAgCyCeDAnuBAAwB8IMCQIEB4IMGz4MHsIAGUAHUgAMQgQZYAtgngQUngAC7A0EgR4AAeYEDAQQDQShrgAAQAXiAAOkBQYECa4AB3oMDDoQHoIIGzoADdIUDCAQCakEogQNsBMAnQYyBAXuBA+CAAc6AAYEBTYEGZAJLcoMA2gQMQQhxgQAKgAHZAgVqgQAwgABRgATNAiAEggBmgAhRggN0ArAngwOPgQFPgAAtgACJgwBvgAClggBvgABWkABvAQOCARMCDAaDAAeFAT0DIAJLiAE1gwH7AQWCAYACAkCBBpmEAYKBBPeEAXoDAQwCgQWcAi0AgQCtgATgAQuEAa6BCSyDAa4BBIECaYEHPIICjAMiBUmEB1kBCIIGTJQBQAEHkAFAAQeZAUCAAGICBUGAB/iBAEEDakEvgABPgAAoAQSABUyACZQDAUEbggksCUHsKikCADcCEIAACwHkgwALAQiAABSCCVuBAHCNAiCEAgyAACABGIAEr4ICE4AAmIMEv4AABQEEgQmQgADPgQL+AyAERoEG6YMFSQF+gAnDAQSDCC+ABnaEALaCCMEBAIAI8gMCQf+BCkOAAAiECQ+AABWEClCABSqBCd+ACQ0BAoUJDYAAEYIJDYIJgoEBNgELgAbDgADagQkNgABggAZ1AkEMgAWyAQiBBS8BH4IHMwH/hAfdAQKAB92AABmQB92AALGAAMUGNgIcIARCggEPAQCABzkDQdQpgAmaggTrgwg3gAKvgQo1AQOCAIoBqIEJlwEFgwmXggllgQCPAQKACAOAAFWCCAOACGKBCAOCB9aAB6KBAi2BCt2CB3wBAoIDqoAH44EHbIEH04MDDoAH8AIiA4EG5wEFggbngQBXARCBAJqAAe8DGEEIgAcEAgQigAgsAkEMhQoHgAHTgQDwgwCBAQiDAMOACNWAACMBGIABAgEMgAA7hAbsgQLygwRHhAapgAZkAU2ACH6AAmqBB8ixBquAAyEEoCdBMIEAOYEDMIIIwIMHFoIC14ADKIIDa4UCwwFqgAYZhQBCgAmMgAaDggAVgAUFAiAIgAbsA2shB4UE4QIgA4ELboED2YoDzAEHgwUbgQDlhAvYgAHgggfzgwAxhwrrhAifjgAxgQIlgwEGgQFAgAFogQWXBANxQQGAAD+AACSACiABCYEAFoACPYIM14MClIAAEYEIzAECgwwCgwKWgAwGgAA5AXaDDJgBAoEC7IcLg4ECd4EANQMYIQaAAEaABC+BBBqCAEWCAR+BACaBAaWAACaAAB+AABiAC1iACRMBA4IJE4IB+4EJp4AAEIEJE4ALh4IKKoAGiYEJE4IEMIAAMIADV4ELGoEJuYIAMYECLAEFgwkTggqKgACSAQaACaiDAGABHIAA5AECgAW2gQoGggEpgAF+gALYgwGrAwINAYACyIMC3oEA1YUA0oEAOwIgBoAAXYEAMAEGgQAsARCBANeCAAoBFIAC5oIMCoAI5IACl4QAtYEDXoEA2YADOoEAJQEYggEEggw0gQJFgAAZARSGABkEByAJaoALzwEDgAAHgQLtAQSBA32AB02GBCSFBNWAAAoCaiCBBPaAABKDAYwBB5MEIAEHrQQggwMpgQAHhAGxgAQoAQKBAGaEBCgBB4AEKAEHkgQogAFbgALUiAQogA8mgwQogg8dhAQoggS1A3QiBYUEKIAD24MAkoYEKAEHgAQogAUHggQoAQKEDCuCBh6DAfSBDnaCBCgBB4EEKIEMC4EB7YML+4EFfYEEKIMLQIIB/IYEKIAA1gEYgAAHhADkgQDyhQEEgQZ2gwuPgwQqgQIvgQAriAEIAQuADLWCA9qCAgABCIMCQoAAZgEcgADQgADOgAJsgAJCgQ8KgACKgQJCggNdgAbvgQDiAQeEDxmBAa+DAECACgCEAkCACgiEAkCCAAqAAkCEDkoCIAiBAISDAMiCC6mAAIaABomCAMaFDC+BAkCCABkBFIUAGYAAXAMEQQ+DCmMBBIEEqYADi4cLuYMEfYYEIYEMCoQAH4AACoEEb4QAHIEFXQFqggGPgAASgwJegQFxkAJeAQSiAl6BD3aAAByAAAcBDIECzYMAB4cCXoIAZoQCXgEEgAJeAQSVBoaCADwDHCADkQaGgQMaghC1hQJYgAK0hAaAgQelgwBxARiBAJgBBJYGh4MCX4UP74AHo4QGh4IJHYEAJoEF8oECXwEHhw9VgQBeARCDEGiBA9iFAOWBAPOCBvSDBN2CABaDEH+DDaGABBuDBPKCANSBDgGDAl+CBPoBCYMCX4AAPIQCX4AB74ACX4EFZ4AAKI0CXwELgwJfhgJdAwIgCYQCXQEJhgJdggAKiAJdAQmBAIKDEEyPAl2DEHOZAl2BC/uKAl2ACXaNAl2ABQKEAB+AAAqAA5KGAl2AAm6EAl2KEeaBDjqCAYWAAmGGEeQBIIMIT4gR5ogCW4ABO4ICRoMB3IEH6YICW4IB8QEIgQb/ghHXgQ6ZgQBugQiAgQFjAQuADg4DEGokgABKBgveCwEIf4EGz4IA7AJBCIEMd4AJqAFrgwLeAXiBCzQCIQWCE5QCAXGBCa8BQYACXYEGgIEFv4AAIoAAL4MLB4AKo4ISvIME6IAE6oQHeoQG3oAHNIAAPIQJxoMG7wEEgA0ViQcygBMMhAcygQ2YggchigcfiwdFgQ3KhRAwiAcdghAwgwcdAQSAAsoBBIISF4IHHYABhIUQMIIHHYIAEIsSF4AIo4ACZoAJQ4EH9QIDR4AOUIABOIICZ4AQ9oQGf4EBHoMBxIIUbQIAD4QF8YEAmYIFUIAN6Y4HYoICwQEEhwdiAQSWB2KJAsWrB2KBAsWCARyBAsWIB2KCAsWCABmBAsWFA6MBBYQRmoEA7QEBgAHShhW7gwHigglggQHAghTZgAlrggvlhglrgA1IggEXhwENAQODAfACRw2BEXGDEE8BuIMACAEPhAmFgQ/4hAmHggBNhgmHjwBNgQ2YhQFdgQKEgAAjgQw3iwJGghJEgAF7jAl4igJGiwGagAIzghKMgQJXAQWIEoeJAleDAgOREoeAADS0AleAAg2RAkCGAOaDDlmHAjOHB1ODAjOCB1OjAjOABsSjAjOGB1WMAjOHB1WOAjOOALiAABQBCIAPz4UDJYABrYULFIELLIMWt4YHKoAE+oILFIAUhIUEz4AG9I0WtYQGq4AICIUGRYIE1oMGIYACSoEJh4AAZYQHKQEAgAcpgASzgAcpAQGDBymAAsyGCYeCBlyGBymGCYeAEzWAAucBf4sJiYMXSIIJiYMFYoABqIECpIENJYMJIpEJj4ABnoAVnYECD4YNtwEAhgmPgQzagxWKgAG7hgcwgBXRhQcwgQBdgAu9gAfpgQD3AgMihgEGgALVggD8gwEKgAAngADjgRRhAQuAAnWBEF6DBjiEARqCAY2CD/qAEZoBxIICEoAFlIASTQIgAIAPwYATTwSMCwEHgAANgQWagAXHgxBjgRJ3ggXOgAEWggXOghB3gACOhAhIgQAmgRKBhAaPhBC7AQyABm2FD4mAAZGRBcOBD4mGA32AACKBA2yEBgSCADCCB/6BAc+BGJmBA5CCDLABBIADbIEV04QWVgEEghaZiBXzAQeAAWGBBeOAATCCBNKAAUWCBeODABCFAVWLBcOAAIqHBcOCDuKAFD2EA4OBBsaFBcOBABuCBcOEAJmHBcOAAEqEA5CAAJYBHIAAUYYDkAEAhwOQgwlXiwOQhBqPggOQgA8VhgOQgQH1gwOQgAAKgAOQAQOCA5CABeWBA5CCAPoBAoIBWoEDuIMJKIADd4IBIYADuoEB8YEDx4UAGYYFr4QA7pEFtIIFhoYFtIATf4QW1oYPsqkFtIIAH4YFtJAATYEauIQBToERp4ICTYMFtIcCN4QFtIIPj5UCN4sBi4cFtIAGtIYFtIsCSIUFtIECSIgFtIACSIUFtK8CSIIFtI8CMYYA5oMFtIcCJIIFtIgCJIgFtJ0CJIkFtJoCJIIA1pACJIIA/ZACJJEAuIENVYQFtIQBrYUHUIEHaYIFtIAcY4YdrIEVzIEFtIAII4UM3oEK0IAEHoUL2YEM3oMQsoUKfIQQx4MKmIIFtIAErIYFtAEBhhtAAQKDBbSBBSeCBbSCEiGAALkDHCAAgwW0AQOFBbSAEW+GDzuBBkiAFmWGBbKAEAWDAJGEDBCCBq+CBUuABbOAAMGCBbMBA4MFs4ABH4EFs4ICDoEBqIIFswEBgQWzAQOBBbOBAAeABbOAAnqAAJWGBbMBAoMFs4QQu4AClYIBWYQA6oMGl4EGCoYa0IMTZIADXYIM4oQTgIMBDQMLC0mBBxEBkIMGe4EVGwFqgQtiAQKCCzWAAHSCA1CCF4UDIAA/gAUCAXSAHo2HE0UBf4ABTAGQhAqQAwELBoAALQYkAAsEACOAE7MCAQGABtUEQcQAEIAQGYMLyAIEa4EZj4AMOoIADoAGHgMA/AuBGM6CBWuAASMBJIEHjQU2AiAgAIASGQMLCxGAACaBAVEBfoIHxQsQEAkL2QIBA39BeoAHMARAQZQIgQBNATGBAjgBfoEcBYQAVYQEuAEggwJ8gAAKASSEAAgKKEEBQdg3IAIRA4AGVoEAVwF8gQBXgweQgADmAzYCOIUBrwQCQb/+gAAJgABlBCAAECODFg8GQR91IgNzgBlXgQKAgBQFgBYugwLSASiDDnwCdkGCGfoEAUEAToAeWYEfa4ABYIIAPYIAXAM0IAKBAj8BLIkAFIAA54EAB4ABloEAG4AI1YIN8YAAX4ADhgEwgALIgQAWATyDACsBJIAAB4AbNYIOHAFCgRtAAXCCCD8BQoAAqAE3gQ3IAkKBgwAUAcyAAOCAACsCtAqCCr4BcIMA0QFUgwAHAlBBggkNgAEJgxmBAyQRAYQBMQEcgAIsjAFtAXCAAW0BEoIB+oEA5oIXlAgEEA0L/SQBIoQhWQIUJIEBeAEZhgEkgQeMAiIShAFsAwQhE4QbV4ECNwETgARnAwAhE4IAfYEEkAHcgAs6AR+AAKcF9AVqIRWAAAgB2IAAEAEbgAAIAfCAAAgBGoMAvwIhFoEAIIAAEAMRQZyBGBkEIRxBmIIACAQdQZQrgAH4AiEegQM2A0AhCoEABwE8gQr5AUGAGDIIAkkhIEF9IQ2AAA4GBkchISATgQIYgQMvAxchEIEY+JEiCpIAAoEJjpEiNoEQgoAiGoABdxdrDhMEBQYHCAkDAgwNARkAGw8iIhQhIoIEfwVMIQYMGYYACoAW0IAACgFsgR5MgQAIASKAC9YDKAJggh8wAwxJG4AAIQQGCyAggR/agABWgAZSBA4hDQyAAZGBBMYCDQ+ADxICCHKAFeABCIEEAIIXjQMKQQKCBrQDRQ0OgRqIAWuBH5KAARADIAp0gBR4gRSggBrSgAAtAwkhCoMgzoERfoACUAMIQcGAAF6AAtKGAMuAABgBdoIWRwZrDgMAAQKABOgBHoENdIIfmAUIA0BBkIAKBoAP7QGQghokARGBICIFdGpBCDuAAjSAAAuAIFiBAF+AACcCgAKAH0YBBIAAB4MAJ4AFCYAAJwEJgQAngAALgArZhAAnApgCggBOAZiEACeDAE4BB40AToAANAGgigBJggBwhwBJgSB3gAIIA0GgK4EEewKgPIMACQMgFEGAETYBDIAFgwERgAA/gAAXgAARBwxqIBUQJBqCAFMBIIkAUgEFjABSAZyAAE4BPIECqgEcgwBKgBCZAQyAIJYDEUEgigBJgAJ2A0EBOoAEcASgKyEdgQFXAR2AA1GAA3gBiYADeAHQgAOEAViAABOAAEKAA2sCQceCBDwCQQGAAqMBIYAKNAQKQQNrgAKngRXuAiEHgQAdgQg2gSB6gAERgQHsBB8LQcSBAZuDC9ECwguBGTQB0YEAEYIcR4AASoERF4gAQ4UAPQIMGoEAGYAX/gEFgAYIAQqAGJaAAByBGa0CQR+CE66CB+mAAh+AAXaBAh8BBYQCH4MBboMS1AMFDAKABWeAAVKBAhsBBoAAVAEKggCRAR2ABZOBCHID//8DgB6CgAAJgCT3AhB2ggsuAkHdgxKfgQChggqqgAJmBBoLQcKCAEABAoEACIMSVoAE/gFEgABagAi2gABUgQOMgAQWgQBbgACzAwJBw4IAJoIC4gNEIgOCCDmCFNiAG+ACAyCBE7EBEIEACoECiYAAKoQDEYAAOQESgBWIAwMQJYMjmQFEgAWJgABkgAAtBBJqIRKBADYCayGBADuAANaBGlCAAA4CBAyBEzCEBckCDBeACNOCAz0CDUuADFmNAR2FAzyEAR2AA3QBaoMDP4IBHoEBnoMAhoEAUoABEAEfgAEXA0GBAoAaKQFkggAQAgV2gAATgAA7AzYCaIIAEAUKdkEPcYAcVQEigAkgAWCAAE4BDoMBvQEOggG9AkEegiHeAkGhigFKgAChgAAMAcWDAjoCACGABCOBBZgBbIADE4ADqgMGIAyBCpsBE4AACQcGQRNNGyEJgADLAwYgCYIN1oAAE4EhHoAALYAC44AADAV0LwGwDoIC6gEAgQLqAQOABGABAIEHZJgESQEKowRJgANhgBrygwBpgAAMhgBpgADbAgdxgQBsiwKnAQSAAMaFAquDAEEBFoMGi4AAB4AGmYEdgYEDNYAADoAGmYADcAUTIBogG4EDbAIiDoIBIQG/ghdnhgEhARaBASEBxoQCYYIBHYABKAEOgQ6AggJKA2QiD4EABwRoaiEMgADcAQuABVqAATKAHaMEKAJYdIACwQEhghVUA1AhIoABAQEJgACbgAOXggEFASKAAzwCGHGACdIHaiIjLQABIoADBoAfOIEK4YEWDoABFYABAYkDPwEJgQEVAQmFAz+AANeAAZ8GIy8BAiIIhRV/gAj3hgEmgAAMgAEfggTEgSPbgQEcAiAGgwEcAQuBFlABf4UGaIACegQQaw4CgAWHgSOUgAl6gg/AhgCMgBAwoQCMigBlAwUgC4IJsgJBh4sDswEJgAGTAQOAAvmAJpuBBmeAAgaBADOAJYmBAJiAJE2ADqCBJp2BALsDIBFqgAAeAi8Bgg7AgBYzjQCXARuoAJeEAhuAAJqACyyDAiCAAjaAAFSCDFiACnOMAFwBGqkAXAEHiABcAQeDAFwD/wBxgCc/gCeGgQIiAwQgDIAAKQILaoACFJYBEYAD3YEFPoIGKoMBuAEEgQG4gQHPgAJigwMhhALIgAWjAWyAF7mEADiCABQELwH0BIMBbwKUCooCtwEVgQK3gABxhQLrhAMAgQasAiAPjALyAaOLAvKCADuABEMBXIME8wFwgAM+gQaZggLuggChgQLwgABDAR+IAEMB8Y0AQ4QGcYYGloADNIQFkYAACwENgwBkAciFBZGBA1cC0DeJAzeCA1UBUIADyosDNwEMgAFugATjgQM3AQuLAzeBJuahAbgBC4ADNQIhD4AC+oAAQIAp14ELUwX/AXFBDoEARwMGIQyAAJ0BBoECGgMMIA+BAGYCIRiAAJUBBoABwoIAlYIBqQIgGIAAhAELgCgPAXaCAIcBD4EAhwEMgBjPgQHkgACIgAR8pwMzgQdCggOYgABGAQCAAe4BD4IAnYEB6wEPgQZlgAVkAiAMgAXeAtA3gAAvAQyDAmwBDIEALwELgQC0gA/SgQP5AkHNgwFzARGBGscBIIEmEYUGfYAACYAknQLQN4MAGwLAAIEAHAMAQdWBB+mHAaqAABwDAkHJhQdAgBnNAXGBBj4BTIUCZoIP0oAGoYoBhoAAvIQA7oAIUqIA7oICSYAAxwEGgwDOhAdLgAfiAiAGgQFagA5dAQyBAPGLBK2FAumAKDABEIMKHwEQgQDthAcUARKBB5qBAEeACR2GAkwCIBCBAI8DECASgQCCAhIMgh3lggebAQqBHJiAAdABCoIHWoAFz4QARoYAIoIAGIAHCIQAGIITBYUAGIIAEgEOlABMgAE8hAA0AQ2AAk6AAAeBC3cCQdCDAI+GCSGDCTIBCoQrvwJEIYIik5IAUIAAyYQAUIAA+AMCQcqFAZuAASEC1DeAK6mBAEABXIMCj4EACwFUkgMkAQuDAySCAp2HAySAB2miAa6CAoeBBmKBApcCIg+DKhiCAcGCB5SAAGIBC4gDHQEPgwMdAQ+GAx0BD4YDHYIDpIgDHaUCL4sDHYUCO4ACGoEDtYAEHIIDxYAAiAEhgAzCgQMlAQqFAyWJAj8BD4YC8wHxigLzhgJYgCsQAwJBy4UBYAEPhgL7ggVpAUiHAwKIAV8DIAYEgybGhQMBgRnrtQMBAUiJAwGBAHKSAv+BAKUBzIQFKYYDB4AAEYQCJQEGgAfOggBNgArEAhcggA8fAQmAAe2CGy4BCYEcvIAAGgEwgCS5gQAIAsw3gxCpAfyLBikBB4QAQQE0gCrEAQOBANaAAAyAEJEBKIAQM4MARAFrggcrggAWgAAiAWuBBtyBE1qBC0WBFIcDBkkbgQAgARKBCvyCLo2AABeBHYmBAZiHC1cBCYILNgMJIQOAAT4DEiAFgAEtgQO3gwOngQblgQf7gQFKAiIDgRJgARCAAHmAA8aBAE2AAWKFA92BFP6SAzOAAcSEAQ6BDLSFABuJA9mAA0aEACKACFKIB0GIBA6BABaEDIqBEZ4BEIMS4QEShiIFgRQ2gAblgRF9gAFBgQlygApJATyHD58BLIABXQQQIBdGgAhVgAP9gCmBgRG8gBgSgSYJgAARgCsIhBCHgBVdATiDBbyCGDeAEh6BFXACKHSBGhKAEj+BEiaAAG8COCCBFbGCHLUDLCIFggAugRGXATCCMO+CADCBKiICLAuDAfWAALuBA6QBBIEBXANrIAWADK6CIFMBNIMemQEsgBHXgwRwgAANgAHoAWqBDNSAACeBAd+AASWBASkGSSIJGyIEgAA4AQmBAGqBAeyBDPeAKH0DBGsggQAXghaAjABPggANATSAIhiACoWAARyDAKsCCUeAGWmAACmAAniAAJYBCYEdWIENZ4EpH4ASW4IRpAIIIIIRpAEEgABcgAAWgRrdAReDES2AEuSCLQUBFIAAF4EVt4ABVgEgggA6gBKxghF2gAPSgRpygABDBBtqQYCAEdyDERiCEMIBRoEAE4ASrYIUOIEOEoEwBYEIfoAAGYABKQcgDUF7IA0bginVAQ2AAJMBF4AAHwENgACZAROAAAiAAagERhshGYMokQHSgwiwAnwhgBFJARSDIBcGGQuUCQEMgBQrhhKngAEhgAjQgAAHgBMngAM0gANCAQ6CB40BEIIatwMCQUCAAY6HJ++CC3OAM+kBAoEz6YEozoEz6IAEwAEOgSBggCGaAQSABWSABh4BDYEFcoEUpYAASgELgADJgSBEAQuADc8CIA2BC+IBCYAEEwQNIAtrgy1rgAmIAU2BLUWCF5sDCSANgAx/gQjUgwArgQAngAGUARCBAEEBCYAAFQEPgBFgAnJBgSOIgAT9gAjNgCFFgCFNggAPAwwgDIYho4AEeQMIEAOBI4GDGTmCDf2DGS4DDWoigABVgABykwBQAQiDAHOEJoqBKSaFK36BAzKBAFKDIP+CAFKDGTOAAFIFCCALSQ2BKDyAAAmBAD2CBmeSAGABDYYm5YACU4EAOYIm5wEIgSUzhCssgyLSgQA5AiAIhQA7ggAsAgcggBa3hzCagRAagAeogBnCAQ2EIgmCJYOBBtWBAYiAMqwBcYABNYEigoEAooALkoEBRIAABwFrgASngAAiAwwhCoINNYMYJIAAEQEIgABhAQqMGcCBIqmGKOyAAB+BBEOABdaEI/+AADUBGIEUFYAAEwEMgRDchQBFigAmgAAfgAAYAxQiB4AWoQEMghnEgAAPARCBM4gBAYAAEIEZxAENgAVJAQ2ABLMDByIKgRnEgAEiggAwgANvgSLMgAAQAQqCADGBBU6AA56EAYaAERaBBkWCGaOAAFEBHIEA8IAYPYIZo4EBnIABZ4EZo4AAjIAAR4sZowEIiBmjAwwgEIQZowEQgQAsghmjggAKgBmjAQqCGaMBCoEFQAEYhAC1gAAoggDZARCDAQ2AEM2DANyBBo+CABkBFIYAGQESgw7OhAHKARGHAgUBEYsByoMB75ICigEShALajgA0gAIQAhIQggX/gAf5AgcLggCYgCi2gQbegQRJgBgtgSVlAxpBfIArbgEOhCPzgBBTAnEbgilIgQBMgRD2AwdLG4IAOgYJIA4gB/yAOmaAA8cBEIADFwILIoEEAocX2wE8gAAHAQ6ABceABA6AAC6ADPwCIAKDAC6CBk2BBluDF6qBACyBBluBBFODGbKACAYBEYEk9YEAHIIFKIAHO4EF24EFI4AMrYAaOYEf2gUYdHILCIEE6gUFEBALS4AZSIEXDgQEf0F+gh43gCExgQZmgQB7jRd4gAAdgDOcgwAXggZyiBePgRj8AR2JF48DIAERgAengQCcgADkBQAQAgsQhAAehBfSAUCMF74FDxATC9KBGSuHJUObGRiBCQyhGRgBtIcZGAEmgQ5DgC0QgAEFgApqgAYFA0giBIATuANBD0uCGwwDQYH+gAVDAXKIGSaCGR6CGSgBIIEAKYMZIYAARo4ZIYYAFI4ZIYAZXZ0ZJIEbaYsZJIAAtIoZJAHEtBkkAkF+jAFmAXGAAWaLABIBH4AAEowZNgEGgBk2BIBEASOEGTYBEIIZNgEXhQFCgxk2AQyEAYqEGS+BAm2GCKeCB1oBA4IHWoIOVAHAgwcYgAAHgRybgRj2AiEdgAAXgRlTgBkTghlTgAe0khlTgRlrghlTgxk7gBAWgxk7gggFARyFGSsDDiESiRjzgRSCgBlTgiGmpRknwwACgAHmgAG7A2sOH4IZZxszNDU2CgsMDQ4PEBEDAhQVASQAJhcYBD4/QEGEGWoDCwwkhgAKgSRZgBlsgw5aghl2ghopgxl2AQqBB/aBDkmAABIBDIAMGQEygwAKghZ0hgFiAgwzgRBnAQaDBQmACgQBN4oWMgEGixYyAQaBDGKBELGBEP+AIPWABKsEn5YCR4E45oEAWwEogwBZgBBNASiBBf2ABMKAHPyAAAICECeBAwcBHIAPLoAALgI7AYEpLwEQgABKBEECECeCIJ8BtYgXUIAEFYAAYgEzggCrASSBNr6AAlyAEFeAAwSABT0DdEGAgANugi39BWpBH3BFggMhggjBAwBBuYsMaIAAQgEHgRafAQiDF9EBh4AO0I0AHgIEdoEDxwNxIgmCDTiADUYCB02CAMYCIgqABwcBCoAMXYEpvgIoIIAhFgQFT3ENgBaXgAWmgjq4Aa6LDeEBA4AUYwEyiwFGATakAUaCC9aABpCCEhWTAKuAAbYEB0GAwIE9nYAAHQHYixL5gwHTASSEGF+BARiCBDKBNo+BADaAOBGBBGSBNOyDAAuAAXcDOgAIgAc+gQArAjoAhDv/gQGagwGPgh0kAwJBtoUTRYEIwAEGgwDbgxlvA0UNNaUA24gAmIEOToEMtwMtABWCJPSLAJSCCIaKAIoBBIYAigG3kACKhQFlgAwMrgCKgAD3gyK8ggFzgSAWmQCYgQKskwEiAbiLAJiBACSAPBsDQYAIgQGnAQeCERmFAKmBAASLAKiABLyAL4CKAKiDGqKCFq4BNoIamIICfYATlIEAvIENJYAP34EI8YIDV4AAaIEAo4AFvIUArgEogACugBvykQCuAgwohQECgQAngg2oARCAABSKAdQBMqcCr4AICoECWoADh4ADj4A8y4ECc4QDlQQYdnJygwPpgghuATCAAScBvo8BJ4EQVYMIrYEIloAC7I8O8YARF4UO8QRBAiEXgAEShgRKASiMAGGDFHsDCyAdgB8UAg0vhB5PgRohjBoGgBhuhBoGAQ+KGgaFAOyGGgaHAOmkHk+BHkeABjsCpDyAAE+BDG+BHWWCD+7/HlyXHlwFqDxBsDyCJqEBzYAABIEACoACM4keXYAAGIAAEoAeFQMUECmgHl4BrIAAUAHNggfagikfARCJHl+KAEuAASiCHmCBAdIBqIEBK48eX4AAQoceX4MXxYE7jIAR8AEGjR4bATKfHlSTADkBKoEAGYQeVIAZlrceVIAATgMGDDCpHkoBBoEAfZMeRAEGhBizAgwtnh5AAQ6AAAoBDoIeQAINLIANIZIeMwEMgA+mgQApAWuAEDyLHjOBBBOFHjMBJ4MEC4IPyoAECwErqAQLkh4hgTmHjx4jgAGbAWCAAD+AHiOBAYyCHiMEBUEeSYEl+wFNhQfBix4qASeKHiqACNeIHiqAFZqDHiqAGWGCHiqDGCcBC4MeKoIcm4QeKoEa440eKoBFTIEeKpgEJIAbR6EEJAEKgQBpgAS0gQBpgAAMjx4qiwJ9AQiAAMaLHioBFYMLkYAAB4geKoAADoALnwIhDYgeLoADOgIiFoIBJYweLgEmkR4ugR5DiR4qgQHhgBGrgT0piBrzARODGvMBGIYWcAEGggEFgRdSARODF88BGYEXT4AdNIQXz4AAvaQeKgEZgR4qhjOpAQ2IASaAAAyFHHIDBSAKggEcAiAKgwEcAQ2LHiqAPQqFHiqAHbyAAn2CAeIBCIQXCIEUcaMX2ocAZQMFIA2eHiqAFOGAAgaBADOMHioBBIIAu4oeKoAgB40AlwEkqACXhAIbgACagBEXgwIghx4qgBnHjQBcASOpAFyAHiqGAFyCHiqAEkSEHiqAA04BC4AA8oEVnwENmx4qggglgQUNhQG4ggZKgQHPgBHwgwQmhALIgBLdph4qASWIHiqBAuuEAwCIHiqHAu6MHiqCADugHioBHogAQ4weKoIAQ4YeJAEWhx4kAwUMK4keJAQEQQZJgBGXA4ICSYIM3aYIsIAFjAIOaoAFFAFrgBo3gQV9AhJrgSgDgRaRgQ7CghaJAxwiDYEXF4ADkoEWwQQgaiEhgAOXgAAMgxtmASKDAA2DA6QBI4EACwFUgAOkgAAHA1AhGYEABwFAgQLIgQ7QAQOBAAeBFheAAAcDMCEkgga/AQ6BA3KFBrSAMJuAAAuBPrgCCGqAGKGCRckBcoIKeYEDTwILIIAroQIgI4ID6oE9DIRBLwEGgQP0gAzngRl0AgR2gQQWgRuUggHKgBtZAy0AAoEZSIEjIoAcU4ADBIADpoEK8QEGgRshAQmAEhWCHdGCAC6CBO2CA9OBEB+CAJiBIYCBAt2CBk0BCogAqIIAnAIIaoAAT4IAeYABAgEEghqmgTyKgBoEgACJgTF+hADfAQqGAv+BAAuGAN+BHPOAANiBIeOBAOYBC4IEyQEihADfhwDbAQiDG+kBCIEDFIIA24AWuIFK9wF/gACWgQC7hEUegRt/ggOIiQNsgQXvghDsgD8SAQOAGuYBGoMAgQEDhAAfgS7tgQA4gACHgQNhgAC3gwBsgwFHgAEighuAgwDaAWqABVgDDCAfgBjwgxs/gBo+gRkcASSBGzyAAdABxIEbPIAbOoAGaoEdGYEXa4EBVAMOICCAACiDB4KAAIkBC4EFmQMOICGDABSBABGAAESBIhaBGQiBLWeCAbKCGvqDAbKCJUSCBpCBQrGBFawBDoEaioEAfIAUzgIiB4AXcaIANoAWOoEEYIAANANrIQmBFnYBDoEET4EAhYAAB4AUuYEZh6sASYABKwEJgQRuAwlBA4EXlogAOoIBtwE6gAFnhQJ/gBT9gQU7AQmAAFWAAjqBAFWAAAeDB5KAFVGAIMKGADwCCUGAQciAFsuDAq6AAJyCAG+BI4ABDIAcS4AAqYQAKIAADIQAZIIACoIAZIIAVoAuT4MF/IEAcoAQJwECgEqvggBmgAJNgQAqgAA+gAWPAUGCC26AEB2EAGaAAOEFLQAEOgCAOqGAFASAABSAAo0BCIMeHYAeG4EBAIId3QMIDB+BHsCBAhmBAqWCAh2AEOGAAh2DArSAANKCCKeCIUuBAf4BGYcALIcDI4YALAELgQnQgiGTAw0cGoAhdoAAFQEbgQDyhgE/gQMegCAsgBsOAU+AJNKAInGBRAiDKKqABPMByJEjD4ADpIoIHIEeLIQjDwENgQNNgAZtqwgcAiANhSMPgABAAgAigAZLiCMPAQuCHV+BJjGAAGmDIw8BE4AAlYAANYMf8oEYgwEFgBvMgBqYA3EgC4gjD4AKDoUf8qUAiIAKLIMDnQELhiMPAQ2PIw+BAFmBARuMCKwBDYIjD4IUw4YjD4Ao2AEIkSMPAsg3gwAblCMPgikPhiMPggSDgAAhiCMPgE4JgQqjiQGGgAC8hADuggqTpSAOgADHhADOiCMPAQuFBI6DIw+AARWBAOaCARWFB86AAjQBDoEPNoItz4si/oAK7YEMXIQDYYABqoIUX4EePoIHUQEKixBlASSkDFqAHwYCIA6CPQmMHZuBRLMBIIJFh4AZO4EHXAFGggecgBHOgSDHgRD4giJGgRGLgQJPgAG/AQODFGGCAJaAADeABK2AAl2DABkBKIEWV4MUcoQQToID2oARQoERQIAZyZwQ6YIAZwIbRoAAMQMAQeeKCOKABVUBEoEs7oMmkIAAEoEWqAGAgAS3AXSDACaTEMkCvf6CHleCE+wCAHGBR/+BDhUCDB6GIISABHKCIGkBBoEBaYMAFIAAZo8AHpEAMoAtyo4AFIISxwHOhSQ4hA8Fgw8WAQaCLAKBJDgBCoM3joMOnYAA2IEANAHPgwK7gRZ7hyQvgAECAcyLJC+CAZIBVIADV4sCvoAcOgIgCogkL4cERKQqioMDp4EdGIwkLwLIN4MHGYAcjIgEPYokL4EEPYAZxYQEPYEHvoEeaIUEPaUAgYsEPYUDW4ABIYEILoAFPAEKggChgB0vggN7gSfPhARFiQNfniQvggFgiyQvggQbgQ53gRBpkiQ0gAFkAiALhCQ0hQQmqic1jAQmgyQ0hAQmgyQ0iQDFgQ03gACEiSQ0AQ6BNTWAKX6AAMCHJCqCA9GBAeiCJCoBBYwkKoII7o8kKgEShiQqgAoUjSQqgQBEiCQqgAAiiiQqgSIugCD1gyY+hyQqAQuDJCqBAB6FEUGJJCqAD/eLCLGOJCoBDoEkKgEOggBNgAUThiQqhie/iANggSkGjQAUhyghhwAUgAA8hQHzggT9gThtgQEDgSvPgA1nggFVhgx4gRJ+AgN2gCFugx28gAWWAWuBEYEBIoQMngETgCNogAh0gROFgQA9AQWBTJyAE4qBA3aBCDMBBYIByIEMposbGYAABwEEgQR9AUeBBP+EBraAQr+BEt+DJKcBBoFUmoMVwQJBuYcSlwEUgAkUgxbyggFegUXxgSzagBKWggHqghZ2gB+hgB93gRtxAQ2EAAoBGIABnoAABwEUgQHEAQWBAgOADNGADKuAAZaAJEyBGriAHTkDC0sbgRLQgAAmgAoYgUSQkBjMhBbrgRL7hBeWhRL/gQD0AUSEEuyEEvqAAF2AUSqAAL8BuogRLQFEhhf9gQDFgQa0gQaohA93AWqBA80BA4UAx4EfrIFE1gEcgVWbggK2AUSACHiAABEBIIEkc4MSC4EAdYEIMwIgA4IU4YFRyoECQYEBGAJJG4ACPpYYaoYAygEFhADKgQB/ghOugA40gADCgCDkgimehBfGgR4Ygh2qgADGAbuSAM+BDNOFAM+CFNmVAM8BJI0AzwEo5ADPgzYliQDPgRzVAkG8iQJdAQWBAfWCBM2HGfSBLvSgCEWDAJyFAJGAAuIDLwEcgU7wAwBBmosJgYIXwIcYnYQaKAFBgDowgCb7gADwAQmDG1GAEhiMHMyMGIKBBGqAFDmCBGgBFIAACIoI+oJGeqAI+oEIpIEjc4IDkgEggVLLAwBB0IoFFYIApYAF6YQXyYIAuYMHo4AAGwEWgRaWgQCpgywOgSwfgUAJpRC7hBN5gQVhgTTHgAlfgVNMgySngShjhyhiAQiBCvaAABCJKGKCCw+WKGKAAG4BOIFKtIUoYoMokI0oYoAAmwEsgQG7ggYvgAbRgQfZAQiABZaFKBWQKGSCKAcENCIGaoAAJwEJgAAngU8ugCWJgSWNAUmBIagBCIAAOIESw4IoZIAAI4AFIYAQBIAmeYEoZIAAlpMoZIFO84AC74IowYsoZIIPXIsoZIAE3IMnnQEEgQGFhChzgEyChShuggDOlShphQKmhwrPgSEqgACmgwq4ARyBWaKDBweBCtSBEQ0DCBAngySPgQALAigLgQFbgQKOgAAHgijxgQXauSi4AQWAKLgBBYMouAEFggCVARuCS8kBHIYouAEXgwJkgyi4AQuAKLmADMQBEIMouQEXgyQjAQeHJCMBJsEkIwEKg0DqAw8QP4UACwFxhwALAR+AAAuMIosBCIAiiwLXJIApQoEhuoFPOAIQNIEiQYArJAIAGoIC44EBY4QiiwEcg03ZgFWegwCZg0qfgQDqgwE0BQRBmgVHgCtdgRpgAYeBA4uFKZGAJteCAx6ADEiAAHmABDCAAXiHA0KBAa0DABA2ggApgwcfgAIdgwE5gAdfASiFRpUBBIBWdYFFNgJBd4MkNQJLG4EP3IQAEAcDQQRKG2pKgAC2gBBCmCI/AwRBKoEQgYIAqoNEToAEcwELgTCxgAB3ARiDDqYB8YIEpIMwDgMwQQyAIUgB8IEY4IEEOIMAsQGIgACHAUqDBgoChAGAGdYCAkiAEoEBwIEIAgEDgBUKgAAMgAJHAcCBUPkBBoACA4MbX4BPNoAAKQIgcoMJdAFsgSUUAh9wgEChBEEfcxCCCGIBbIIX/wQALwEygQAQgQAJAzAQPIEBSYQNAoMFQIIAm4IBLYEBOIQEc4EAYwMEQTmDUfqEBXiCAC+DBhqBGYqBA0uCAHqAFVsBH4IOl5MAHAGLgRxvlQAdgCEOhkzogyMXkwAoggoV7AAcgB77gkjPggGQAQmAAeMBQYBGy4MDzIIBroE2lwICSIQBjpEARgEggBKFlgBigQfVjgF+ggLUgwKigALmgATxASSBCv6BAyaADEWBHtiAC/OABRKBCq+BBPaBAvqECgeCAF2CALKABLGCAH2ABpwCR0GBBGYDCBtyggC4AQOAAAiCXdOAAAgBEIEITQIbcoIAhIAAX4IG1IUATYMcQIAKH4QASYMAqp4AJoIi0YMAKQMvAQagAE8CLQCBE4mcACa9AX2CALeCRYWcAI6CVlmBTU6BCvShAQyZACaIAQyAAcABC4ABs4IYxIAEG4ADQ4EGn4EAN4IDUoIdZYcKQwEgglsygwOBggRbAcWAJpkGBQIJCQkDghSLAduAMFmBUaUB54EMLIJaAoICLoIoTocAxoAHbwIvAYAG6YAG54EOLYEAbYEEaIFD+YImgIJPvAFPgwPrgAoXghm4gADSgjGCASCAAL+BFpGGHtCAEbuCBzaCACMCLEWBBHgBT4QZlIcA0IAARIAGpgFrhQDTggBJhBIwhgLcgRWlgQwTAQaBBPaDDvKDAuuDQLmQAIkBBoUAhAEUglKdigCHgAClAU2RAIeBAL2GAVqBAVKCE+KGCbyAAD0BHIMGEQEUgiBzgQAThAEjgU1PgADvgkaLhADqAQePAGOAGPeAABiFAGOGBTeCAfuAAEqEChWBIPmBC4SDAQqEAiGAEzyDDAaBBb6EAjOGALeBAjCBDuOEBQ6BAIGDBg+BYPKAGBqBB2OKAIaAABaPAOkB24IA6YYARIIre+MA7IArFq4A7LEA6gHniQHLgQNXgQDIhADUgBdjgh1RhQCpgRPDg0tnATCXAImGAB6aA8uJBwaBAIeNBbiBKUeCAs2CNmaCAAqCD66CAAqADAaEAAqDAI6CK3aAADgBdIFF84FJqIED8oAIP4E0NYQIV4IKc4EE/YMHFQMBEDWCMCeFCOCABQQBAoUfnwMCQZSBESaDRHaFAFcDAhA5iABihBUJArQtgwxCgQmrgAAdAVyBYO0BToFkWYELnQIDaoE8xIEADAFsgAOmBEEBEC6DACYBbIId8IAGfQMQNkGABXSCAAuAA6MBG4MA1oAAVgFggwBAgQArhgHzgAANAqAtgUiugAFNAqAtgUhTBCgCmC2JB3SwAB+DAbCBEg+BFD6ADCuAIAmAACSBHxWCADSADPGAEk0BdIQAt4EPK4I/IIIAToEABgKkLZsA+4EQsYAB448A+IUA9IJhNYIBIwKgLYIObJ4BRpkAToACNYMBRIEBv4IjWIMhfYIAy4BF/QKDAoIVWYYBYwFsgyVogQHaAgFFhwAlAklxgA+VgDioiwAqgSFHgQ4ygQCVgBbHggInhgICgi3iwAICgQLsgwEMhCrJuAEMAQeEEWKAAK6AD7OCET+CAO+BWueAMvQBAYFJ0oANxoEV44IPA4Id/IYACoBi0YEzCgGCgRtkgAkGgBFoiQACgAT8gBvygBE6gR4vAQiDWXWAAAyAADWAGfSBAAqBTyuDAAqAAx6BMjqAAAqAC82BY6WAAAqAIKKAXYaBAAoCB0eBPR2BGMCBHoSAE+mBFdOBE7YFA0H6AUmBHreCEVuCP8iAFd6BBAOAIsiBAAqBLMWBHMwBCYJN1IEcrAEJgk26gRyigh3DgC/CgQAKgRDHgSJ8gQENgAnLgBRfgADUgl4Hgjl7gQcFggHjgAMggQMJAQOANLCAL3eCAHCCAyyCAyqBZB2HC3aBACuFAB+CBNeOA2qOAB+BAFqACAOCBaiBG20ELQCQIYADdYASjQJBhIEffYoDe4Au74IuRoMCfoER6wKIE4IAHAGIgCTjggKogicSgQOYgwyqgwOYggKUgQB/gRYUgQHmgQQ8gQNUgwnJhgDMAQOMAK2GAB+CAE2OAMyOAB8CIAWBAB+CAYmoBDaEAJyFBDeEACy0BDeAHeiBAO2BTj8GQQxsQZgggGi3AQCAM/UBC4AATwF+gBmMgzFyAZqACWiBV9gCQX2ANpSBNKSCADwBBoExVoYJ5IAA3oAExIUGCYALCYAKHgUAAQEBAoJU3IABewK4LYMDoQG8gAEKBXRyIgY7gAASghDCAwNBDoEy1JQLLQEGlwyqgREjArktgwyugFXkhQBdAmt2hABdBANBDWuCEbuAAt+AANEBNoAAHoQAcQEKvwBxgCgygQDAgQBzAkEJhABnAgdqgBRDgQBlAhAtggUQhAeaASuBT62CAaqAMZuBD8SCZkSAAA2AFxmFKHuBIluBDQqCTg6BAfyFNAKABRiCAAiAAbuDKOeGED6CACKCB7yDEJiBJK6CBVcBGIECDARMDQMagwhCgQHcgWdXlQDVggOQhAAqlQAjhQhsgA+ymAAmggAjAy0AM50AI4AAC7sAI4cAjwEKnwCPg1EKlgAjghUlgh/cgGp4AXaLEJCDAyoBGIFniAFKgwbIgGaVhlyIAkULgjTzAfqBJyQEQXsLHIBP7og1CwEQgAxhhzavArsBgDaMgRJwixL3gQ63glZcmBL+gAAgAUScACABQJwAILATXgF9ghJoAfGAE/0BC4FQ1AEBgADEAQmCE0sCbBCBcHOAACcBbYET6gcQQAu6CQEVgTXcAUCAJWSCBtICBkGBOZODDdYCIAeBEoICCkGADTSCZvYCdGqCBOWABPCAScuHBPCAABqAFvmCDXuCV76AF9cCIQmAbgwBDoEj+oFA3YIAQoAQTYIAQIEKeoAADIEkY4EAMoEkJ4AABIFOSoAW2YEZpYAlu4EsBgEQgB8JgiomgAA8gi8UgAA8gjtVgi8UgSNEgCG/gQAdgUo2hAOKgySKhABYgRuOBAhLGyGAOd6ADFEBAYImL4A8H4EA04EAzIE67YIAuYIAQYIeXwIgaoEAZQFrgAkAAgBOhGhRgAALgAIXgQCxAkdygBkegjGogCLQATuAI7KDAFKAAO2AAK6HAS6HASkBIoEJPgEKgwCfhAExgABagwEzgWEhgixSgAANgS5jhQFBAkETgUDJgE+KARWEBYwDAA4CgAuPgT3IDCESQe4IIRVBrgghFIE6bQF/gAARAvANgAARA7ANIYAyQQEBgBatBA9BCUuBaXuAZVyBYOABAoAU7QFxgGnDgARZAw90IoAHPQNrIReDEfCAKZOCDWSABIOBCiOBY84DdCEYgAosAX+BEcECIBaFAMKARQOAFDEBGoAyhgISTIRCNAHggjznARSBRSOACimBACaAQWMDBiAVgQdoAwshGoEk7oAIXwIiDoEBYIApw4BGaoMkzAIgGIIOLYEeZIA9EwEHgyyKAiAQgAFJgCUCAQ6BJMsDGSAagQP1gSZCgl+oAwFrdIMBYoE+EgF2glxhAQeAWWCJAhOGAoiAAbSEAoqAbMWAIcyBUswBB4FxF4AAy4FRjQEGgh9cgijBgEx5gwGwghzNAQyDChSCRUkDAiAXgCBFgRpQgwElgQAYBSAPIgkhgDdshwDLgQRQgQC2gBlMgQC2gRVPgRPWgD8kiACygWIHglmngD4JgmzwgwCYAQCCbV6AAJiCAqODX+8CIBOBAFaDWyCAJKGBAmMBDoEJ4oApA4YBiYQAB4Ifk4AApYEg3gFGgADKAQ+AbNeBPZqDGRkBS4Il/wQgDBsigEflAQeAALIBGIIBegERgQFNgQGTBAZ0IRCCL2eBA3EBDIAvvIEhoYA9cYEBToJKM4IC/IAFUAFKgW2bgDzfggJUgQJNggIgAyATaoACRAPTBkuEAlsFE0HRBEuAAl+CFEqAAtqAJUCCRa0CIA+BAReAAtWDCSCAM7WAUtkBdoEBMoAhOoED0oEAbIECNIMDrIEDyQEAgwMPgT5vg04QgwMdhwOTgAAYAQ2BAAiBAzyFJ0EDDgsrgAFfggHLgATbhB/hgQSTgVzwgQAHgmW8gGr4gW8AgwT1A2BB1IIE9QLEA4JxZYQ8goFV5QHVgRgkgRcbAdWABnSCAAeDUS8BAYEdcoMAHoMlpYAQVIEmy4ADNIEOkoFRBYAcz4EoKoEMDYM364AOYYAIxQdBoIbi7X5zgiASAgFxgXHngzBohBwSgAoagAoQAcCAb+6BABaCIaqBAGiBHKKDbyABc4Agu4FrpIAuKAF/gwKuggDlAyADc4InW4FyYYAAPoEQSIAAKokA8YUCXYAAQ4AYjJQAM4ACoQIIdoEAHoACwYkAHocAGYAC4ZMAGYAcDZMAGYAQuJMAGYAHMpMAGYADIZMAGYA71YoAGYIA4oAdUIEA4oAbRIIA4gMLvQWCB5aCA9qAACGAPKCEXiGBCviAADGAAPuBA60E8f8Da4ER+wRB8P8DgCDEgWqOgXKlgXaGA4CAPIAKF4AAW4IAGwMgAHKBWbqCdRKBHpiEAXaDAVSGAFGBZsKBdD2CAXGDBvSBAGMBcIAAUoEHc4EAbYFjLIIAUoAAUIACKQLbAoEMgANBsCuBD3iAbEmCDjeBAmeDAE2DAA2BMtuEAAuBDZmEAAuAb0qFAAuAALaFAAuADiGFAAuBFMCEAAuADtCFAAuBDUyEAAuBae6EAAuADqqFAAuAQOOFAAuABAmFAAuABZiFAAsBDocACwEPgQALgnWugC0IgiAsgCGJgQR3gwD4ggLZggAJgQGkArArgwGlArArhQKIAQKAAr+BAVIBEIcCyKQBUoYAWoEj/4QBzoJsS4ICuIAADYQAC4FmI4QAC4FxyYQAC4ABMIUAC4FooYQAC4FmXIQAC4FsqYQAC4ABMIUAC4ABMIUAC4E/YYQAC4ABMIUAC4ABMIUAC4ABMIUAC4ABMIUAC4UBMIACZIMBDAEQhAELgRezgS9aAnRygAFEAwsLkYkJeoARooMInocJfAEGiAl8ggUQhQl8gCjFhwl8iAjyhwl8ggBCgTpeigl5gUV3hwl4hGZsgXA+giR1BEHAAjaBDMySABeCTJKBFZGPCa2CB0+BJFCjCa2CCR2DCa2ICjeHCa2ALDyCAFyAbpiECo2CdCiABh2BCYyFLmiAEDOICa+ACMoBToEINYBbzAEggENVgWGnhAmyAg0CgFXfgSjkhgmzgQiEgD5BjAFnhwFihURoiAFqgQh/hAm1ggAXASCBCGuFAI6CBbkBFIAGzwUFIhMhFIwJtQKBAoAJMQmgDyEUQeAOIROBCbWBCUICoBCBABEBD4BaUYAHWAENkgmzAgQagQAbAnQigEraAWuAMiCECbQBDYIXHIEJtIBUJYAAIYAH0QEWhAm0gACAAiAVhQDDgCvAAWqALtMBGoAf6IADdoEGqgEOhAm3AROBABOAE4OFCboBDoABdgEUiQm6BA9rIheBAWuBCO8BD4MJugEHgCKBggs7gijzgAbZgQfmAxggDoEH0gMYIBeBB+0BGIMJugEGiQm6ggFpgQfJgilNAiAGjQm6hQLGgAG/hALIggkiAQaBCSIBBoEJuoAAz4FB9IM5f4UJuoF2v4gA64oJGAEZgClKgEaAgAAoAQ2NCRgBD4AITAQPGyIPgRq3ARGACVaHCRiAAPGACvuADKqCCRiAKcCAUESDMYCCAKyBVimDAmWAUdSBCRgBB4AkUoJldYIJFoAj9AISaoABpgHUhgkWAxJB0IIJFgEHgFQCgkX7g07lgE6/AQ2EMO6DMP8BEYAYfYQJFwELgAp+gAM8gQBrgAGRhAMWggkXgAM1ggyqgSzbgQAYgQKKgAKAhwL8giXJhwkYgQVugTXXgjBOhwqoggGkhAqohgp2ARKECnaCNjGCCncDCwuqgBHygQdSgRY6gTIzAwFBnoISRQQAQYgTgAASgAJJgmzJAkEegwAVAfyBYfaGABUBE4J8a4AACYAAWIMD4YgF0oABMAM7AZSAbC2BDqACsC2DRRIBqIAACIEAEAKgLYEToJIAOZYAGQMLrwKCAKyBD++BEi6BDwKAEkABBIASnYA8xYAAEoF04gEEgxKdgg8ugRnIgxBAgkQpgBBAghPBlAAcgAb4gxIsgmLNhABdgBKdihKbgTJGgxI0AgAQgEX5gwBKhxCmgwBKgjValQAchRELlQAfgAL7AXODFTCUAKiGHhODECKEJI+BD+oBEIA3E4MANYBtRIFAYwGngBPQgkdRggDMAwFBCYgBG4EBWIRtkIUA/wG4hAD/lQAgggEfgxK9gBKvmQAqggBKgiIggwGZgQCAgm76gAH7gQE8ghRwgTkkgQA6BMAtC6aFAKmBAeCEAK2CSie8AK2FAIKCTUqBClABSIJtXp4AVIEAP4cAuoAKgIIB9AQLC/wKgGgFgwarhQX4gRtcgxJugQwyASKAKw8BLIETvoEKnYEDVAcJQf+A/59/gjSsAQaDP3qBDB2BB0CBGVmDBzaCIyOABTaBGWyGBmKABxWCAuoBAYFwOgMvAbyEAAgByIAACAJBIINYfIAMh4E9KIAcroAMW4EAOoAhtIIRcIUWKIEYFIQpGoAOX4ANaoIpAIEBFwWYFmoQL4IACgGkhgAKgACwgQDFBJwWEDCCABCABAKBABABqIUAEAGwgwAqAkH+gYAdAkESgQYjgAECgDVggQZyAQKDL7OCN50B8IBBxIMA2oMF5oYyD4EATgEtgQAygBe6AwVBEYABgIEEEQYoAqwtQQqAIsmAWQ6ACm2AJteAAAqCLFCAABuAHKCBeOCCEYaADXyBHpKBGrSBTt6Aeq2DHmiCJjECECuBAICCBByDdcGAAnOAGA2EACGAFVOABCeANWsCciKARriSBC2NAhGJA8eXAmGBOC2FArSEBC0BAY8ELQJBoIBBjAMaEDGCAoeBJhCEAI2CdwKGAIeEAJq5AI+EAz0BDYEqpIEAmoAAlIIKi4Q3AIRMRoEAk4EB6YEt9gH+gls+ggHogUlaggEXAQyEAJCBIYuHATK4AJgBBYIH04kBKoJuggELggEohABngWwKgAKxgH88gwChgACKAQGHAIqAYzDCAIqDCF2WAIqCAGeCABKHAIoEBkH9/4MBJYIAkwENhwEdwwCTkQEfASKAPaKCAksBDIIAmYcAb4UAGAEEgACfgwHKggQ0AQqGA5iAA+uCE3UBCoJCtoEcbooDk4F/a4YAR58DBYEnV6AAwYEZz48AvIgDB4kArIYEDoEEcoAAkAMJEDKFBHCAZ84BB4IADoEgqQExgReWgH0YgiGJBywLC5YLARKBDT8EIGsiD4AqpIJ1Z4BhrYIXj4INCYEX5oElogEAgk1NAtDHgAhxAdCCRymBAAQBSoKDbwNB2CiDDtoC3BaBVeMBf4MVFIIMF4Fqa4ESWoBXbwEogW3ZgBT/ggDagQCkgFd8ASiAAUuFOeCBLzyBFG+AJjmBVP+CcE6BQtiAH0mAgh2ACPiBAMGAfvuDEqGDBPeCHB2ABO+BNG8CCRuBFoSCbjKDBP+CE5+ANG2AACMBrIEajAELgXQrgwBSgB4bgAG3hQGiAdCALZSAChWEAJCCFVSEcM2GAHCAa6GCLFeCCgyBBgWBCduCAXOAAV2DJiCABmyCAPSAB8iDBrkC0CiCABGCAO+AAISAAF2AABUB4IAMBoICQoIAh4JF4gLgFoAAEYAfRAIQM4MAjwHUgACPgjGlAdSFADKCHwiCAJeABm2EAP2JACaFAB6EATSCIYKGAOoBBYMK4YMMcYEA94INhYN4QoAMKIEfuYEWFAEEggAKgBokgR7JgADfhCHNgQr7gC1NgwsCgBw/iACthEPxhgHcgCshhAaQgwCcgACOggCcgwHhggDKgw8MAbyAAieARc2BGfqAcEqBAmYBCYYCcgEQg3wZAQiDW1ABBINOpoJD74I0hIAKRoI8T4IsCIUcOIYUEYIx1YEMrYMAhIMBYYUK94AxP4IJ7wHUgACtgACUBrwETBshEoIHboIBzoEjGIAv1IAx+IEvNoQAPIEktYAX84A0QoAB6IBSZYQ8YoFDwYEANYEHJQVMIgIbIoIXgIGD9oEqEYEFdAIgDIIV/oIX34se14IU8YA+jYEEIIBIMIFWRIMAbINsZIMHzoAAaYAAfIABpQMQamyDB9GANB+HAtmAQN2AFkeAAIaAAcOBACCDAt+AAMqChuKBRyiAAHaCRNkBAYICg4AB4IEK84KAvYE8noIO3oEI0YAASIE6poIOOoNIvIEBHIEArAECggImgl+igQ5egg+4A0ECSoEABYAtGoAAO4EAXYEAlIQAboEOP4IC/4ID8IM4LIEtKYQBR4EBEIE+HYIJWIAfxIEBQoAFfIMFT4MA9IAAFIEIVQIFa4QA8oAR+4UDbIUTBYEK4oAMuIIWuAMAQbqAAkeBAU+BEJCEAhyBGvEBf4I6nwIASIECxYIEioINWIQbhIMNBoMAgIEFBAEPgwJJgS/RggXIhgGkgoIfgQB8AXGABdiBDj2CAmgBS4QD6IQ4NIITv4JD+IIAnIUNpgEPgA5XASSAFa+DAF2AhreBHHGAbuWBA3yBABGABt6JAraBhVKAA62AA1KHAOsFC7YCAQmABxmBOSyCgmyCAsaABtECOwGAP0sBQYACQoAE7gRBB0GKgGbHARuALHGDDkaBHC4BCoE6ZoEEhoMBAYJ1voEK2ICGroADHoNCyIIaBYAZooF5K4IW7oGMzIQC2IAv24EET4EFjgFLgRBtgAbOgAVegSe5gAQHggE9gxotgALtggDHgh/2ghYqggcdhQAlgHDohgLzggLYgAtugRCLATuAAAeDQvqBCuYBCYJ1KoEAHQHAgwAdAsAVgweagAASAcSDABIBxIBivoARWAIKQYA7hIEEtgRGIgMbhQD3gCTwgAMlARuEAQ+CATgC0AiAATiDDESAJPqBAF6CCr2CCY2ACr2BAHqDBpCAIryAEYeBQNGCekOCB7YBL4EFDIEANYFDOIIikIMBgIIAkIEOsoIcfIQHlYEhwYIPJIAHp4AzgwIDSIcH8Y0OgokPI40AHIgH8YATp4UAXIAH8YMPgIEFqIAU+4EMeoEAC4MK7IAk7AKQIYFBcgJ0IoEWpAQvAYYIiwCmAoQIgDawgwBLAQeAAKeAAjaDCJmDAKsBB4gAq4EHeIEAj4JUAIUtQ58Aq4BY14UAYIAAq4MAYIEkJoEAq4QmF4UInwYJQRxrQWyBF7WCf1YCkB6BOnCDAIyAAA8BoIA0hYA0mYMAkoAaCoIJSYBJAocJ/40AhoIuOoQAHJYQcIwJ/QEEgAqSgzSVhAChhABqhAAVhQCrgACCgQB6gQq0gQ1jgCbRgUgggA4SgR8eBIECSRuAAXgBI4MBeIAW94AC4YANoYMAt4ECGYBEpokRN4AAfQEGhgDakgCupBE6hwFsgADHhABggQe6hgFsAQaGI9oDCUEEgVsjgAjFgAFpAR+ADLCAADuAAAsDoBwigACLhAKigTSwgQK8hAIVgwB/hytZqgIHgYAYiwFnjwCghwByhQLShgCwgRzFgBhsgiF/AqAtgUNygALeAy8BgoGGLYJ82AMvAYCBcryBAD2EAhSDXbubA2+iAiKBETCFALiAgMuEAQ2AiIqDALaBeM2DEKEFswsBCn+DBWuBBY8BIoAfEIEw7YAs9wEbghsvhAV5iwV1gI/CghzcgA6LgQcVgALygU2VgTgkg00Xgj+EgmoygIMmgStDggWEgwVxgQs4gj3SgBVJghVjgABmggTFggDEgATFgR1CggSagQJ9gAFbgQJ9gD2OjAElgAHyAQWIASWNAeKJASWNAByIASWAXOCEASUBBYAB3YMAYIGCjYQBJ4EACwELgQqGgSXyhR4ngRXehxA4hBRUgXrdgRA6gQX4gAD0gRTlgh2whQDmASKCSSaDix6DIeSCA0+CAqaAHluCAfWZA02iArKCI/mBBWCBAMCCEhuBbjSABByDAfOBG0GGD86CfFeBBraDAIqBKraBAQwELwG+FYB2H4YEs4kDRsAAlIEEeo0AlIAF/IAAJ4IBZAEFhQ83gB1chFsFgSoXjQ8zgQ4TgQBtggasjA8zgQJrgi9njwHtjAU2gHcFgyfhgVCZgA/HgQaFhgBxhAAagCs/gQAagkrKgDwQhHuAgQfQjQE3AcL6ATcB/oUBN4QPmeIBN4APrJABM4NOxIIBJgHEjgEmAcb6ASYB9oUBJoIqHeQBJoMqOo0BJoAIQYN+WYIj/4IDkYIKA4At4gFGgA1zgQWPAQiBBYqBCgOAAA+ALiGBBY8BCIQKBwL/AYCX+4MQmoEJsYEQmoGRooUMkIBNOoAMC4FKnYMNKIMOBYCNHYEAnYAOzgEEgAyugkONAQSAHRKCGyuAAWKABV+FAECCBLKBBKWBelmEMPOBABiALt6DABgBDYM9nQENgSpzgATvgQ9cghCPgAAIgj4agAuPgw1cgBraigBCggBjggBagXhbgQDtgQy3gQA/hA+tgXl3gQEpgg9Vg39uhA0ehQAVgCmLAwALg4EahIANGYKMDoQ7zoF2X4EACIVf84ApfoEACoEPggEggS+3gRYHgz0KAduAG6oEAUEWTYAru4AGs4BfxgSggAJxgCe4gQBNgzb1AQGAm8aCC9oDQSpGgUA4AgVGgV/lAwBBOYEtAYEG+YACXwML3AmCAYaBkPqAQs6CAhQBLIEr9oAG34Byv4EAD4AAA4BUXoIruoMpOYMXo4J74YJ64YMCLgJBKoAWwAJ1IoB5b4EBtYACSIEAFwFsgwg5AVyAJaiAAYiBi42BmLaABI6BAGuAAtyBYhyDFJsBT4ASTwFLgRbjgBwAAUWAZfIFIARHcnKBZFuCLJyEPNCADFuAanOALKmBArqCAs6AW2qAHU2EFgOFABOAIpmGGnCHABaBk/WAJCqEGmWHABiAHY6GNKSDLnaAHKKEgHOBARiBAAgBOIIAxoFD5IEAt4AfvoI33oIBBIBEMoEAJYE3q4KLFIE3fYEvroALx4EADYAD8YIDboIAXQFcggANgVH9gDfGgQF/hRk/ghyqgDWFAhA3gi0NhwARggBWggANgQdeg4kngTlhhBrqgn4/ggFjgBCcghjugQMTgn/Tg35DgQGEggJ8gRB6gYGUggSbAiwigjMagnvKgRyjgi+MgQJjgQEkgQDZhAAlgi3XggPbAWyDAEOAABeAY6iBAdiAAWQBBIKY/IAAkYEuKIE0KIEASIEDw4FFAIQBIAGwgARGAUGDg9SCCUGBAHCCALCAAEKBAAcCtC2BQI2CErcBtIMAGYEwFoQBe4ADUYNBOIIAkAFsgSTPgQCLgglSgQChgwBBgWkGgQq/AgVJgDrTgABhggBIgQC0AVyBBT+AACMCxC2BHueCABMCxC2CDtUBBIM0JwEBgAMkgZ9RhAFCgTZXgSIAgQL+gQGtgBpkhgD0gi8LhAAlggCygQLVggmMgEILgCo5gQBfgpJ7gwCggTnLgQHphAESgomvggFZmAESgEgVhBOsAWyDA1SFARyCAYeCBo6CAnCCP+yBBYqBMs2BG1iDATaADQEBA4ICP4MBLIGUmoMAjIIAOIUBLIAAo4QAPIABToMAWJABJIQBAYAMkoAKeIQDy4IDCIUD54EBDoAy2IIDt4QCUoFG+IAD0IMhhoAQtAFFhQO0AQaAYV6ElV6CAWODgx6DAKgBOIAFMYIMfINHdoGAO4ID7IAE6gEagzHAgwGWARqCOzWAGJmBA/yDA0qBAwGCAWGBA7KBEucBQYBa0AEDgorSAUGAQkuAHV6AJIUBi4Muz4JjnwEQgAqkgy9fghfJgGs+gRqTgZSshAVsgjkFgBo7hQJxgBT5ggN/gi+VgAAYgAANgUSGgQQ2ggANhAPVgRptg4FPggBdgWVqgwAcgjVdggAWgACQBBALC4SBHe6BADKAZCeCBEiBJ6WCBAOCA0SCXCyCANGBAiuHHWiAOaYBGIEyp4M4rIIAcwEwgh73gUB/hBGLhQAThDpohABGgACkhAf2gAS4gAANgSI8BQuECQEPgQd3gSDogRk+gR2ugiSDhwByA3RBhYJaSAEAgTcpggARgAKzAoYCgjy1gzCEgzmvgTU8hABuAVSDAriDAoyABwSCAe8BSIEABQNYdHOAgKOBS3qAAA2EAq4BNIAfAoMWcIBQpYMU04EHUIAJTIIDR4IStYQBlQEsgAB5gUUWAgNrgQdtggQrAhA6gjXFggD7gjU7ggT1g1N4ggA0gDTFgwNagTR/gQARgTTFggMWgAAFAXCABQSGCQ6SACqBjzybACKCNd2CBnaBhJqGNd2AEVyBNd2EFZ+DJUqBb16BUiSBXVmBDn+EEKyBRMCAF8QCkCOBCDCCDVyKADaCAHsBdIIA34EE34ABP4IADQKkLYEUSIEAlYFFVoABgIMD3QKAAYUeEoIV04AN6wFgggGIgRz7ggEkAUiDB7EBbIMEXwE0gBfTgQGMgCyFgQGCg0X7AVSATfeBAa6BLTmBAEmCAPaEBdeBFIqECR8DEHRzgE6AgXH3AUiCbhYBDIMByoAlXoIBx4EWIYJfWYELGIMKUoUAkYIpSYI1A4QAV4AksIA4K4ILfoM2+ocEuoQAd4IEIYAAD4FUqYQCQ4MCbIFU7oMBjoECXoEAGYIATYILMoIANYEASYQ7S5YBxogaprAAH4ML3IFSwJQBvYQ3FYMA1YcBTII3FIIBy4Kb1IFEoIQGToALSoE3GYIAwAECgzcZgQQXgjcZgwBGiATxgQAHgztQgpoMgaJtgwY4gAFgAU+AR+2HOqeEAF6CaZKEAF4BAYQ6V4GXJIE6pI0AXoI6pIQAYgEbg0YtAqAtgzpRnQBPmQCtgUaZgAdfgSH2Awu+BYARsoID4IALqYAD4oMKa4Kg0IEACYI03oIEUQFqgRSLggAdASyAA5qCBJaBB1SBEaaBlb6AGIyFBa8BcIAKVoFeh4QCR4AKY4I8vYQGL4EAHAFcgwR+ArQtgj7kgQuahAh0AUSBAAUBTIEd6YMRy4FEIoEAioABCIIG6oMQ7IAADIJD/gQgCE8bhCWjgAuDhAmAgwyeghqkghjOpQA7gBe5gA3PhAhogIXWgkb8gQJEgwV5gwFiAgRqgAcmAhA3ggASggfYAXSDADCBB9GBExCABYmEAneBCG6CAP+BQoGAHleCHDuHAzqBDQ2BAzyCBA8BWIAxKIAFnIAf7YBRFoEQJoEStYAAfoKUb4NAfoEqL4AD8gEIhAAmggDogAAFgEpLiAXCggE3ASKAUjSCA/uAHNyDAwWCGs6CAWSFHIeCHayCWIOBGjMBhYEACoQCHIE/0IUJbIMJaQHEgB9TgiMLgyUbggEJgCM+gAJlgWAGAYKCOwqBpCIBAYAADIAIhYEjHICKGIVKgIEDQoEISoI4p4Gc0YIPTII8CoAAQoGlpIECroGKCIEAB4QM74AHjIAUI4UAQQEBgp+Wg4b2gQCPgA0CgABDgRRxgAkhAwurBIAflIEAGQF8gRlHgCjfgQAMAXiDAX0CjAGFDTuECuUCLGuAAuOBGcCBBUoBA4Bh7YIFgAGQgJACggDbgAGVgAxUgAA0ggWQATiAHMmBoHWBURaABZQBB4I9k4Eq9YEu9oEE04NYIoEACoIAmgE0gB2AgQGYgx0pgQrWgF3AgQv/gwAvgBnzgk6gggAyAiALggiTgQAKgVo7hAANgANKgz4KgT34gxIwiGYwhj3/gACAggAtgQV9gT3QgAANgAHRgj4FgAv0gTEugAANgDpAgAKSgTEigAANgAnHgABQgTEWgAANgD4OgASegTEKgAANgD4RgAGDgTD+gAANghRqgQVKgQc8gBAMgg9KgC6rgT4XgAeMgSC4gz4egACfhD4egRB8g4WQgF9PgQAKgkAHgB3cAQaDRdOAETUBBoOhO4JbW4Ico4AA14IU84IeS4Ja5oBt5oMCFIAC7oMn2YAC5oBKAQEggiLrAQODTo2BAPmDAXeALCiCAAqAABSBTpcBDIBNGIBf84IDCYED5gEBgQuugS53AiIJgQLOgRlLgQAEBUkbC6ALgRwpgwlzgSoZhAlzhQl1ggIFiQlzAUWDAheBCXSAQJyAAV2AQuKCBX2RCXOCAmKaCXODB/WTCXOCCWyAApWFHAOCCHEDNgJ4hAVTgGUYgAIVgSJAgABPAWCBToiFAFABgIIA74EC3YIJoYQEdIUJpAEEgAmkgwf2gEy2hibRgh5MgAulgAH9AUGAAUODADWBAGeAVAMBIIEA2YgAbIIC3AF4gqObgwjoAQWFYMiAABiJB5GCBjeBA0KAAAmFCeiDCogBZIAP7oACT5sHx4BQvccJ7YEo3LQJ7QF4gR3fggkrhAF8gD9QgAeegACMgCjkgRsVglojgQDdgwahAaSCAPoCoC2OCa6AHeWEHbKEAiOBBQyCNMyJAh6ABZiVBc+DIGSLCcqCGiOECcsBeIQJy4MCE4IJvAFohQnZgQ5zgZHUhgl5AVyBUIeGCCoBBIUIKoCjT5oI14Kk+IAACgFohQWOggX+hAT38gnUhwm4iAlVkAmzggLUlAm2hANigQoOhgiahgoohgD6AQSCobKDAVWUAC6ABJiCqZ//ASGHASGCAgjoCouGAmG4CouBBF6AjxYDAAs/gg+agQAejxcghj/GlAAfgAAcglI2AgRAgAGUAQOAAA0CgweBN1qFP2KAENOAIiWBLjyATW2Al8aCULCOdeuFDu+BFfgBQYAjsIAAMAF/gFCoAQaCpL0CAEiAP46BE52BFj+CMuiAVRiCesqCBTGBNXiBF4mCBtyAF3qCkRUCCEmBIbwCS3KAFfOAUuKCBRCBdj8ByIAJjYFUz4MAcINePYNXjIEFY4KaDQJBKoEQioABX4IWuQRC//+BgmzZAVSAAAwDgICCgFF3ATeAW8SATlOBAWaACXmCVmiCFoOBAAyBWtqBCt2DVJiBAHWBI8+CAOSAAHeBVUSEABaBT4aJABmCAseCABcBTIcAF4JCFIAAHQHEgR6TgABegFkbgDjKgAAJAZyEMQgBKIEAD4AYXoQAMIEEgIFkuIAARgGcgSwPAQKAXrGAe+eDFRQBOIJXqYAE84QACAFEgks1gpMgg0Q6gAGRAYCCZ2yAQRSAeNaCB/2BAH4BiIEjhIALRQGEgQCOgCoZgGkkggpUATaCRV2BQzUBbIAFngE2gAQbg5DfAhA0ggHdgACMgBN2incXgACngY9Wg19ShRIZg0G7gAUngRpRgQokgWVJg0G9BEE5QSqBJY+AAdSCp0+CK4mBAv6DS0qCNWeDUoqACpeAS++BAGaAE6ODCCuEQ/oGQYgRNgK4gI+lgAALgB8IgBRvgo+xgHpvAayDABWACJaAALyBABUB4IAAFQGggwAVgAijgADfgQAVAX6CeBOAKpCDAL2BAK4BLIAGIoRbhIVEKIIoEgFEgDgahDK+ghZehQuBhkQhgiqgAiA3gQbcgQCrgG1ihQAShEQ3AUiDAReAMFsCDGyAGOQClCCBCVoBNoALK4EDbwJBkIQADwGMgwAPAZKEAA8BgIMADwGWhAAPAXyBDmACC0ODGVyBWjCXGVyCDWuBOE2CGVyBAAqAATmAeSgBSYIEGgMLC+OAjWKAAhQEC6EEaYCzYAVmZmljaYCy5QEgg7TZEwAxLjMuMS4xLW1vdGxleQBpbnaAs20VZCBsaXRlcmFsL2xlbmd0aHMgc2V0hgAcBWNvZGUgiQAZD3Vua25vd24gaGVhZGVyIICz0wFniwAyAmRpgLN3AW6AtAmKABYDYml0hABHECByZXBlYXQAdG9vIG1hbnmFABcHc3ltYm9sc44AGAJvcoYAU4YAJIUAVoKz9IAAXYC0QAFrhQCmAgBigAD4gACaDGVycm9yAHN0cmVhbYQADYoA1QstLSBtaXNzaW5nIIC0pwQtb2YtggBHgAAlAmNvgLQtAmN0hQDjA2NoZYoAF4QAmI0AFwRkYXRhhgAViwELASCBANQFZmFyIGKAtJABAIUAVwJyY4EAgQVtYXRjaIYAMgF3gLT0BG93IHOBtQOGATuCAN4DdHlwhwATiwGyggDQjwB1ggAWhQGvBGNvbXCAtSQBc4C06YACDgR0aG9kgDInEwwLpQIDAAQABQAGAAcACAAJAAqAKQcNDQAPABEAEwAXABsAH4CVbhYrADMAOwBDAFMAYwBzAIMAowDDAOMAgAY4ggABAYCMAAIBgYQAAgGChAACAYOEAAIBhIQAAgGFhAACBZAASQDIghjMgK1JggCEAQeAAIABDYAAegEZgCkpATGAA4wBYYAARgHBgEjqAYGBSOyAQBYEAQYBCIApDAMQARiABbwJMAFAAWABgAHAiQB4hQBwhQBoAYaAAAIBh4AAAgGIgAACAYmAAAIBioAAAgGLgAACAYyAAAIBjYAAAgGOgAACARCAAHIBEoAAiAEIggCAAQaAAQIBBYABBAMEAAyAAJaAHJwCAA6AAKIBD4CwMwQOC7cMtQEsgBzVggABARCMAAIBEYQAAgEShAACAROEAAIBFIQAAgEVhAACARDAASyJAICFAHSFAGyBAGQBFoAAAgEXgAACARiAAAIBGYAAAgEagAACARuAAAIBHIAAAgEdgAACAUCAAAIGoAgAAKANgACIgADQAR6AAAQBD4AAVAEggAAQAiAOgwDgAR6AAASBABSBAAEBoIQAFAETgAAEAQeEABQBDIABOAGMgAAEAUyAAAQBzIAABAEsgAAEAayAAAQBbIAABAHsgAAEARyAAAQBnIAABAFcgAAEAdyAAAQBPIAABAG8gAAEAXyAAAQB/IAABAECgAAEAYKAAAQBQoAABAHCgAAEASKAAAQBooAABAFigAAEAeKAAAQBEoAABAGSgAAEAVKAAAQB0oAABAEygAAEAbKAAAQBcoAABAHygAAEAQqAAAQBioAABAFKgAAEAcqAAAQBKoAABAGqgAAEAWqAAAQB6oAABAEagAAEAZqAAAQBWoAABAHagAAEgHm4AgC6gAAEAXqAAAQB+oAABAEGgAAEAYaAAAQBRoAABAHGgAAEASaAAAQBpoAABAFmgAAEAeaAAAQBFoAABAGWgAAEAVaAAAQB1oAABAE2gAAEAbaAAAQBdoAABAH2gAAEAQ6AAAQBjoAABAFOgAAEAc6AAAQBLoAABAGugAAEAW6AAAQB7oAABAEegAAEAZ6AAAQBXoAABAHegAAEAT6AAAQBvoAABAF+gAAEAf6AAAQBAYAABAGBgAAEAUGAAAQBwYAABAEhgAAEAaGAAAQBYYAABAHhgAAEARGAAAQBkYAABAFRgAAEAdGAAAQBMYAABAGxgAAEAXGAAAQB8YAABAEJgAAEAYmAAAQBSYAABAHJgAAEASmAAAQBqYAABAFpgAAEAemAAAQBGYAABAGZgAAEAVmAAAQB2YAABAE5gAAEAbmAAAQBeYAABAH5gAAEAQWAAAQBhYAABAFFgAAEAcWAAAQBJYAABAGlgAAEAWWAAAQB5YAABAEVgAAEAZWAAAQBVYAABAHVgAAEATWAAAQBtYAABAF1gAAEAfWAAAQBDYAABAGNgAAEAU2AAAQBzYAABIARMwIArYAABAFtgAAEAe2AAAQBHYAABAGdgAAEAV2AAAQB3YAABAE9gAAEAb2AAAQBfYAABAH9gAAEAROAAMIFEwEJAJOAAAgBk4AACAFTgAAIAVOAAAgB04AACAHTgAAIATOAAAgBM4AACAGzgAAIAbOAAAgBc4AACAFzgAAIAfOAAAgB84AACAELgAAIgBDagAQCgAAEgAAIAUuAAAgBS4AACAHLgAAIAcuAAAgBK4AACAErgAAIAauAAAgBq4AACAFrgAAIAWuAAAgB64AACAHrgAAIARuAAAgBG4AACAGbgAAIAZuAAAgBW4AACAFbgAAIAduAAAgB24AACAE7gAAIATuAAAgBu4AACAG7gAAIAXuAAAgBe4AACAH7gAAIAfuAAAiBA7YBB4AACAGHgAAIAYeAAAgBR4AACAFHgAAIAceAAAgBx4AACAEngAAIASeAAAgBp4AACAGngAAIAWeAAAgBZ4AACAHngAAIAeeAAAgBF4AACAEXgAAIAZeAAAgBl4AACAFXgAAIAVeAAAgB14AACAHXgAAIATeAAAgBN4AACAG3gAAIAbeAAAgBd4AACAF3gAAIAfeAAAgB94AACAEPgAAIAQ+AAAgBj4AACAGPgAAIAU+AAAgBT4AACAHPgAAIAc+AAAgBL4AACAEvgAAIAa+AAAgBr4AACAFvgAAIAW+AAAgB74AACAHvgAAIAR+AAAgBH4AACAGfgAAIAZ+AAAgBX4AACAFfgAAIAd+AAAgB34AACAE/gAAIAT+AAAgBv4AACAG/gAAIAX+AAAgBf4AACAH/gAAIAf+AAAiBBAoBQIAABAEggAAEAWCAAAQBEIAABAFQgAAEATCAAAQBcIIFVgMHAEiAAAQBKIAABAFogAAEARiAAAQBWIAABAE4gAAEAXiAAAQBBIAABAFEgAAEASSAAAQBZIAABAEUgAAEAVSAAAQBNIAABAF0gAAEAQOAAEIBg4AABAFDgAAEAcOAAAQBI4AABAGjgAAEAWOAAAQB44AABIC+K4AAdIECxgEFgABcAQWCBUoBFIAABAEMgAAEARyAAASAvlaABEQBBYIGBAEaggXqAQWAA9QBBYADuAEFgAOcgE92gAAEARGAAAQBCYAABAEZgAAEgQACARWAAAQBDYAABAEdgAAEgL59gAKkgQZAAQWAAiyBBaYBBYABtAEFgD3fAxsLTYMfuYcABIC+rooABIEHUYkABAEEjAAEAQWKAAQEQbAcC4C9CosAS40AO4UALwEGhAAEgQWIgQAEgQEKgQAEgQGSgQAEgIS2ggAEAQuEAAQBDIQABIAF24FHeQTgHQsjhQBfhQXLAhARgAVtBgcJBgoFC4A6uAQNAg4BgAclBJQeC2mFAJCFAIiFAICFAHiBAGiBAFyBBh8BEIAABAEUgAAEARiAAAQBHIAABAEggAAEASiAAAQBMIAABAE4gAAEAUCAAAQBUIAABIEGvQFwgAAEAYCAAAQBoIAABAHAgAAEAeCAAG8DHwtyjQBvgQBrgQBngQBjgQBfgQBbgQBXgQBTgQBPgQBLgQBHgQBDgQE8AYCvAEGAUc0CC22BAMcBBIAAAgEIgAAEgQEzgQJLARCAAA6DAAyBnqyAqmuEACSBB3OBAE8BCIAACIEAGIUADIEIt4MADAEggQCUgDKEgQBrAYCBCC8BBIMADIA/SAoBABAMAEGRIQv/gCUfgMDAgIKxBQgJCQoKgEk3gAABAQ2AAAEBDoAAAQEPgAABARCEAAEBEYQAAQEShAABAROEAAEBFIwAAQEVjAABARaMAAEBF4wAAQEYnAABARmcAAEBGpwAAQEbmwABARyBffsEBAQFBYHB1QEHgAABAQiEAAGAXSqCAAEBCowAAYAnsooAAYEBMJkAAYEBTJkAAYEBaLkAAYEBpLkAAYIDdYABzoUBvI0BqJ0BkLwBgAIbHLwAAQEdvAABgA9PgH05A9AqAQ==")),t)})}var Va,Gw,Yf,jk;function _ee(e){if(Va=e,{malloc:Gw,free:Yf,memory:jk}=Va,typeof Gw!="function"||typeof Yf!="function"||!jk)throw Va=Gw=Yf=jk=null,new Error("Invalid WASM module")}function lSe(e,t,n={}){let i=typeof n.level=="number"?n.level:-1,o=typeof n.outBuffer=="number"?n.outBuffer:64*1024,r=typeof n.inBufferSize=="number"?n.inBufferSize:64*1024;return new null({start(){let a;if(this.out=Gw(o),this.in=Gw(r),this.inBufferSize=r,this._scratch=new Uint8Array(o),e?(this._process=Va.deflate_process,this._last_consumed=Va.deflate_last_consumed,this._end=Va.deflate_end,this.streamHandle=Va.deflate_new(),t==="gzip"?a=Va.deflate_init_gzip(this.streamHandle,i):t==="deflate-raw"?a=Va.deflate_init_raw(this.streamHandle,i):a=Va.deflate_init(this.streamHandle,i)):t==="deflate64-raw"?(this._process=Va.inflate9_process,this._last_consumed=Va.inflate9_last_consumed,this._end=Va.inflate9_end,this.streamHandle=Va.inflate9_new(),a=Va.inflate9_init_raw(this.streamHandle)):(this._process=Va.inflate_process,this._last_consumed=Va.inflate_last_consumed,this._end=Va.inflate_end,this.streamHandle=Va.inflate_new(),t==="deflate-raw"?a=Va.inflate_init_raw(this.streamHandle):t==="gzip"?a=Va.inflate_init_gzip(this.streamHandle):a=Va.inflate_init(this.streamHandle)),a!==0)throw new Error("init failed:"+a)},transform(a,s){try{let c=a,u=new Uint8Array(jk.buffer),f=this._process,d=this._last_consumed,p=this.out,g=this._scratch,m=0;for(;m<c.length;){let A=Math.min(c.length-m,32768);(!this.in||this.inBufferSize<A)&&(this.in&&Yf&&Yf(this.in),this.in=Gw(A),this.inBufferSize=A),u.set(c.subarray(m,m+A),this.in);let y=f(this.streamHandle,this.in,A,p,o,0),x=y&16777215;if(x&&(g.set(u.subarray(p,p+x),0),s.enqueue(g.slice(0,x))),!e){let C=y>>24&255,E=C&128?C-256:C;if(E<0)throw new Error("process error:"+E)}let b=d(this.streamHandle);if(b===0)break;m+=b}}catch(c){this._end&&this.streamHandle&&this._end(this.streamHandle),this.in&&Yf&&Yf(this.in),this.out&&Yf&&Yf(this.out),s.error(c)}},flush(a){try{let s=new Uint8Array(jk.buffer),c=this._process,u=this.out,f=this._scratch;for(;;){let d=c(this.streamHandle,0,0,u,o,4),p=d&16777215,g=d>>24&255;if(!e){let m=g&128?g-256:g;if(m<0)throw new Error("process error:"+m)}if(p&&(f.set(s.subarray(u,u+p),0),a.enqueue(f.slice(0,p))),g===1||p===0)break}}catch(s){a.error(s)}finally{if(this._end&&this.streamHandle){let s=this._end(this.streamHandle);s!==0&&a.error(new Error("end error:"+s))}this.in&&Yf&&Yf(this.in),this.out&&Yf&&Yf(this.out)}}})}var Gk=class{constructor(t="deflate",n){return lSe(!0,t,n)}},Hk=class{constructor(t="deflate",n){return lSe(!1,t,n)}};var uSe=!1;async function fSe(e,{baseURI:t}){if(!uSe){let n,i;try{try{i=new URL(e,t)}catch{}n=await(await fetch(i)).arrayBuffer()}catch(r){if(e.startsWith("data:application/wasm;base64,"))n=JAt(e);else throw r}let o=await WebAssembly.instantiate(n);_ee(o.instance.exports),uSe=!0}}function JAt(e){let t=e.split(",")[1],n=atob(t),i=n.length,o=new Uint8Array(i);for(let r=0;r<i;++r)o[r]=n.charCodeAt(r);return o.buffer}var Aee;cSe($p);ZEe({initModule:e=>{if(!Aee){let{wasmURI:t}=e;typeof t==Wf&&(t=t()),Aee=fSe(t,e)}return Aee}});$p({CompressionStreamZlib:Gk,DecompressionStreamZlib:Hk});function ZAt(e){return typeof e=="string"&&(e=document.getElementById(e)),e}var On=ZAt;function eyt(e,t){this.position=e,this.headingPitchRange=t}var Wk=eyt;function T6(e,t){this.id=t,this.name=e,this.playlistIndex=0,this.playlist=[],this.tourStart=new ye,this.tourEnd=new ye,this.entryStart=new ye,this.entryEnd=new ye,this._activeEntries=[]}T6.prototype.addPlaylistEntry=function(e){this.playlist.push(e)};T6.prototype.play=function(e,t){this.tourStart.raiseEvent();let n=this;hSe.call(this,e,t,function(i){n.playlistIndex=0,i||dSe(n._activeEntries),n.tourEnd.raiseEvent(i)})};T6.prototype.stop=function(){dSe(this._activeEntries)};function dSe(e){for(let t=e.pop();t!==void 0;t=e.pop())t.stop()}function hSe(e,t,n){let i=this.playlist[this.playlistIndex];if(i){let o=tyt.bind(this,e,t,n);if(this._activeEntries.push(i),this.entryStart.raiseEvent(i),i.blocking)i.play(o,e.scene.camera,t);else{let r=this;i.play(function(){r.entryEnd.raiseEvent(i);let a=r._activeEntries.indexOf(i);a>=0&&r._activeEntries.splice(a,1)}),o(e,t,n)}}else l(n)&&n(!1)}function tyt(e,t,n,i){let o=this.playlist[this.playlistIndex];if(this.entryEnd.raiseEvent(o,i),i)n(i);else{let r=this._activeEntries.indexOf(o);r>=0&&this._activeEntries.splice(r,1),this.playlistIndex++,hSe.call(this,e,t,n)}}var qk=T6;var Qi=Object.freeze({Linear:Object.freeze({None:function(e){return e},In:function(e){return e},Out:function(e){return e},InOut:function(e){return e}}),Quadratic:Object.freeze({In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}}),Cubic:Object.freeze({In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}}),Quartic:Object.freeze({In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}}),Quintic:Object.freeze({In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}}),Sinusoidal:Object.freeze({In:function(e){return 1-Math.sin((1-e)*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return .5*(1-Math.sin(Math.PI*(.5-e)))}}),Exponential:Object.freeze({In:function(e){return e===0?0:Math.pow(1024,e-1)},Out:function(e){return e===1?1:1-Math.pow(2,-10*e)},InOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)}}),Circular:Object.freeze({In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}}),Elastic:Object.freeze({In:function(e){return e===0?0:e===1?1:-Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI)},Out:function(e){return e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e-.1)*5*Math.PI)+1},InOut:function(e){return e===0?0:e===1?1:(e*=2,e<1?-.5*Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin((e-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(e){var t=1.70158;return e===1?1:e*e*((t+1)*e-t)},Out:function(e){var t=1.70158;return e===0?0:--e*e*((t+1)*e+t)+1},InOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)}}),Bounce:Object.freeze({In:function(e){return 1-Qi.Bounce.Out(1-e)},Out:function(e){return e<.36363636363636365?7.5625*e*e:e<.7272727272727273?7.5625*(e-=.5454545454545454)*e+.75:e<.9090909090909091?7.5625*(e-=.8181818181818182)*e+.9375:7.5625*(e-=.9545454545454546)*e+.984375},InOut:function(e){return e<.5?Qi.Bounce.In(e*2)*.5:Qi.Bounce.Out(e*2-1)*.5+.5}}),generatePow:function(e){return e===void 0&&(e=4),e=e<Number.EPSILON?Number.EPSILON:e,e=e>1e4?1e4:e,{In:function(t){return Math.pow(t,e)},Out:function(t){return 1-Math.pow(1-t,e)},InOut:function(t){return t<.5?Math.pow(t*2,e)/2:(1-Math.pow(2-t*2,e))/2+.5}}}}),Yk=function(){return performance.now()},nyt=(function(){function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,t)}return e.prototype.getAll=function(){var t=this;return Object.keys(this._tweens).map(function(n){return t._tweens[n]})},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(){for(var t,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];for(var o=0,r=n;o<r.length;o++){var a=r[o];(t=a._group)===null||t===void 0||t.remove(a),a._group=this,this._tweens[a.getId()]=a,this._tweensAddedDuringUpdate[a.getId()]=a}},e.prototype.remove=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var i=0,o=t;i<o.length;i++){var r=o[i];r._group=void 0,delete this._tweens[r.getId()],delete this._tweensAddedDuringUpdate[r.getId()]}},e.prototype.allStopped=function(){return this.getAll().every(function(t){return!t.isPlaying()})},e.prototype.update=function(t,n){t===void 0&&(t=Yk()),n===void 0&&(n=!0);var i=Object.keys(this._tweens);if(i.length!==0)for(;i.length>0;){this._tweensAddedDuringUpdate={};for(var o=0;o<i.length;o++){var r=this._tweens[i[o]],a=!n;r&&r.update(t,a)===!1&&!n&&this.remove(r)}i=Object.keys(this._tweensAddedDuringUpdate)}},e})(),Hw={Linear:function(e,t){var n=e.length-1,i=n*t,o=Math.floor(i),r=Hw.Utils.Linear;return t<0?r(e[0],e[1],i):t>1?r(e[n],e[n-1],n-i):r(e[o],e[o+1>n?n:o+1],i-o)},Bezier:function(e,t){for(var n=0,i=e.length-1,o=Math.pow,r=Hw.Utils.Bernstein,a=0;a<=i;a++)n+=o(1-t,i-a)*o(t,a)*e[a]*r(i,a);return n},CatmullRom:function(e,t){var n=e.length-1,i=n*t,o=Math.floor(i),r=Hw.Utils.CatmullRom;return e[0]===e[n]?(t<0&&(o=Math.floor(i=n*(1+t))),r(e[(o-1+n)%n],e[o],e[(o+1)%n],e[(o+2)%n],i-o)):t<0?e[0]-(r(e[0],e[0],e[1],e[1],-i)-e[0]):t>1?e[n]-(r(e[n],e[n],e[n-1],e[n-1],i-n)-e[n]):r(e[o?o-1:0],e[o],e[n<o+1?n:o+1],e[n<o+2?n:o+2],i-o)},Utils:{Linear:function(e,t,n){return(t-e)*n+e},Bernstein:function(e,t){var n=Hw.Utils.Factorial;return n(e)/n(t)/n(e-t)},Factorial:(function(){var e=[1];return function(t){var n=1;if(e[t])return e[t];for(var i=t;i>1;i--)n*=i;return e[t]=n,n}})(),CatmullRom:function(e,t,n,i,o){var r=(n-e)*.5,a=(i-t)*.5,s=o*o,c=o*s;return(2*t-2*n+r+a)*c+(-3*t+3*n-2*r-a)*s+r*o+t}}},mSe=(function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e})(),yee=new nyt,pSe=(function(){function e(t,n){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=Qi.Linear.None,this._interpolationFunction=Hw.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=mSe.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=t,typeof n=="object"?(this._group=n,n.add(this)):n===!0&&(this._group=yee,yee.add(this))}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.getDuration=function(){return this._duration},e.prototype.to=function(t,n){if(n===void 0&&(n=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=t,this._propertiesAreSetUp=!1,this._duration=n<0?0:n,this},e.prototype.duration=function(t){return t===void 0&&(t=1e3),this._duration=t<0?0:t,this},e.prototype.dynamic=function(t){return t===void 0&&(t=!1),this._isDynamic=t,this},e.prototype.start=function(t,n){if(t===void 0&&(t=Yk()),n===void 0&&(n=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var i in this._valuesStartRepeat)this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=t,this._startTime+=this._delayTime,!this._propertiesAreSetUp||n){if(this._propertiesAreSetUp=!0,!this._isDynamic){var o={};for(var r in this._valuesEnd)o[r]=this._valuesEnd[r];this._valuesEnd=o}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,n)}return this},e.prototype.startFromCurrentValues=function(t){return this.start(t,!0)},e.prototype._setupProperties=function(t,n,i,o,r){for(var a in i){var s=t[a],c=Array.isArray(s),u=c?"array":typeof s,f=!c&&Array.isArray(i[a]);if(!(u==="undefined"||u==="function")){if(f){var d=i[a];if(d.length===0)continue;for(var p=[s],g=0,m=d.length;g<m;g+=1){var A=this._handleRelativeValue(s,d[g]);if(isNaN(A)){f=!1,console.warn("Found invalid interpolation list. Skipping.");break}p.push(A)}f&&(i[a]=p)}if((u==="object"||c)&&s&&!f){n[a]=c?[]:{};var y=s;for(var x in y)n[a][x]=y[x];o[a]=c?[]:{};var d=i[a];if(!this._isDynamic){var b={};for(var x in d)b[x]=d[x];i[a]=d=b}this._setupProperties(y,n[a],d,o[a],r)}else(typeof n[a]>"u"||r)&&(n[a]=s),c||(n[a]*=1),f?o[a]=i[a].slice().reverse():o[a]=n[a]||0}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},e.prototype.pause=function(t){return t===void 0&&(t=Yk()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=t,this)},e.prototype.resume=function(t){return t===void 0&&(t=Yk()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=t-this._pauseStart,this._pauseStart=0,this)},e.prototype.stopChainedTweens=function(){for(var t=0,n=this._chainedTweens.length;t<n;t++)this._chainedTweens[t].stop();return this},e.prototype.group=function(t){return t?(t.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},e.prototype.remove=function(){var t;return(t=this._group)===null||t===void 0||t.remove(this),this},e.prototype.delay=function(t){return t===void 0&&(t=0),this._delayTime=t,this},e.prototype.repeat=function(t){return t===void 0&&(t=0),this._initialRepeat=t,this._repeat=t,this},e.prototype.repeatDelay=function(t){return this._repeatDelayTime=t,this},e.prototype.yoyo=function(t){return t===void 0&&(t=!1),this._yoyo=t,this},e.prototype.easing=function(t){return t===void 0&&(t=Qi.Linear.None),this._easingFunction=t,this},e.prototype.interpolation=function(t){return t===void 0&&(t=Hw.Linear),this._interpolationFunction=t,this},e.prototype.chain=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return this._chainedTweens=t,this},e.prototype.onStart=function(t){return this._onStartCallback=t,this},e.prototype.onEveryStart=function(t){return this._onEveryStartCallback=t,this},e.prototype.onUpdate=function(t){return this._onUpdateCallback=t,this},e.prototype.onRepeat=function(t){return this._onRepeatCallback=t,this},e.prototype.onComplete=function(t){return this._onCompleteCallback=t,this},e.prototype.onStop=function(t){return this._onStopCallback=t,this},e.prototype.update=function(t,n){var i=this,o;if(t===void 0&&(t=Yk()),n===void 0&&(n=e.autoStartOnUpdate),this._isPaused)return!0;var r;if(!this._goToEnd&&!this._isPlaying)if(n)this.start(t,!0);else return!1;if(this._goToEnd=!1,t<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var a=t-this._startTime,s=this._duration+((o=this._repeatDelayTime)!==null&&o!==void 0?o:this._delayTime),c=this._duration+this._repeat*s,u=function(){if(i._duration===0||a>c)return 1;var A=Math.trunc(a/s),y=a-A*s,x=Math.min(y/i._duration,1);return x===0&&a===i._duration?1:x},f=u(),d=this._easingFunction(f);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,d),this._onUpdateCallback&&this._onUpdateCallback(this._object,f),this._duration===0||a>=this._duration)if(this._repeat>0){var p=Math.min(Math.trunc((a-this._duration)/s)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=p);for(r in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[r]=="string"&&(this._valuesStartRepeat[r]=this._valuesStartRepeat[r]+parseFloat(this._valuesEnd[r])),this._yoyo&&this._swapEndStartRepeatValues(r),this._valuesStart[r]=this._valuesStartRepeat[r];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=s*p,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var g=0,m=this._chainedTweens.length;g<m;g++)this._chainedTweens[g].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(t,n,i,o){for(var r in i)if(n[r]!==void 0){var a=n[r]||0,s=i[r],c=Array.isArray(t[r]),u=Array.isArray(s),f=!c&&u;f?t[r]=this._interpolationFunction(s,o):typeof s=="object"&&s?this._updateProperties(t[r],a,s,o):(s=this._handleRelativeValue(a,s),typeof s=="number"&&(t[r]=a+(s-a)*o))}},e.prototype._handleRelativeValue=function(t,n){return typeof n!="string"?n:n.charAt(0)==="+"||n.charAt(0)==="-"?t+parseFloat(n):parseFloat(n)},e.prototype._swapEndStartRepeatValues=function(t){var n=this._valuesStartRepeat[t],i=this._valuesEnd[t];typeof i=="string"?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(i):this._valuesStartRepeat[t]=this._valuesEnd[t],this._valuesEnd[t]=n},e.autoStartOnUpdate=!1,e})();var _Ii=mSe.nextId,i0=yee,AIi=i0.getAll.bind(i0),yIi=i0.removeAll.bind(i0),xIi=i0.add.bind(i0),bIi=i0.remove.bind(i0),CIi=i0.update.bind(i0);var iyt={LINEAR_NONE:Qi.Linear.None,QUADRATIC_IN:Qi.Quadratic.In,QUADRATIC_OUT:Qi.Quadratic.Out,QUADRATIC_IN_OUT:Qi.Quadratic.InOut,CUBIC_IN:Qi.Cubic.In,CUBIC_OUT:Qi.Cubic.Out,CUBIC_IN_OUT:Qi.Cubic.InOut,QUARTIC_IN:Qi.Quartic.In,QUARTIC_OUT:Qi.Quartic.Out,QUARTIC_IN_OUT:Qi.Quartic.InOut,QUINTIC_IN:Qi.Quintic.In,QUINTIC_OUT:Qi.Quintic.Out,QUINTIC_IN_OUT:Qi.Quintic.InOut,SINUSOIDAL_IN:Qi.Sinusoidal.In,SINUSOIDAL_OUT:Qi.Sinusoidal.Out,SINUSOIDAL_IN_OUT:Qi.Sinusoidal.InOut,EXPONENTIAL_IN:Qi.Exponential.In,EXPONENTIAL_OUT:Qi.Exponential.Out,EXPONENTIAL_IN_OUT:Qi.Exponential.InOut,CIRCULAR_IN:Qi.Circular.In,CIRCULAR_OUT:Qi.Circular.Out,CIRCULAR_IN_OUT:Qi.Circular.InOut,ELASTIC_IN:Qi.Elastic.In,ELASTIC_OUT:Qi.Elastic.Out,ELASTIC_IN_OUT:Qi.Elastic.InOut,BACK_IN:Qi.Back.In,BACK_OUT:Qi.Back.Out,BACK_IN_OUT:Qi.Back.InOut,BOUNCE_IN:Qi.Bounce.In,BOUNCE_OUT:Qi.Bounce.Out,BOUNCE_IN_OUT:Qi.Bounce.InOut},wa=Object.freeze(iyt);function E6(e,t,n){this.type="KmlTourFlyTo",this.blocking=!0,this.activeCamera=null,this.activeCallback=null,this.duration=e,this.view=n,this.flyToMode=t}E6.prototype.play=function(e,t,n){if(this.activeCamera=t,l(e)&&e!==null){let o=this;this.activeCallback=function(r){delete o.activeCallback,delete o.activeCamera,e(l(r)?!1:r)}}let i=this.getCameraOptions(n);if(this.view.headingPitchRoll)t.flyTo(i);else if(this.view.headingPitchRange){let o=new ce(this.view.position);t.flyToBoundingSphere(o,i)}};E6.prototype.stop=function(){l(this.activeCamera)&&this.activeCamera.cancelFlight(),l(this.activeCallback)&&this.activeCallback(!0)};E6.prototype.getCameraOptions=function(e){let t={duration:this.duration};return l(this.activeCallback)&&(t.complete=this.activeCallback),this.flyToMode==="smooth"&&(t.easingFunction=wa.LINEAR_NONE),this.view.headingPitchRoll?(t.destination=this.view.position,t.orientation=this.view.headingPitchRoll):this.view.headingPitchRange&&(t.offset=this.view.headingPitchRange),l(e)&&(t=wt(t,e)),t};var Xk=E6;function xee(e){this.type="KmlTourWait",this.blocking=!0,this.duration=e,this.timeout=null}xee.prototype.play=function(e){let t=this;this.activeCallback=e,this.timeout=setTimeout(function(){delete t.activeCallback,e(!1)},this.duration*1e3)};xee.prototype.stop=function(){clearTimeout(this.timeout),l(this.activeCallback)&&this.activeCallback(!0)};var Kk=xee;var SSe={avi:"video/x-msvideo",bmp:"image/bmp",bz2:"application/x-bzip2",chm:"application/vnd.ms-htmlhelp",css:"text/css",csv:"text/csv",doc:"application/msword",dvi:"application/x-dvi",eps:"application/postscript",flv:"video/x-flv",gif:"image/gif",gz:"application/x-gzip",htm:"text/html",html:"text/html",ico:"image/vnd.microsoft.icon",jnlp:"application/x-java-jnlp-file",jpeg:"image/jpeg",jpg:"image/jpeg",m3u:"audio/x-mpegurl",m4v:"video/mp4",mathml:"application/mathml+xml",mid:"audio/midi",midi:"audio/midi",mov:"video/quicktime",mp3:"audio/mpeg",mp4:"video/mp4",mp4v:"video/mp4",mpeg:"video/mpeg",mpg:"video/mpeg",odp:"application/vnd.oasis.opendocument.presentation",ods:"application/vnd.oasis.opendocument.spreadsheet",odt:"application/vnd.oasis.opendocument.text",ogg:"application/ogg",pdf:"application/pdf",png:"image/png",pps:"application/vnd.ms-powerpoint",ppt:"application/vnd.ms-powerpoint",ps:"application/postscript",qt:"video/quicktime",rdf:"application/rdf+xml",rss:"application/rss+xml",rtf:"application/rtf",svg:"image/svg+xml",swf:"application/x-shockwave-flash",text:"text/plain",tif:"image/tiff",tiff:"image/tiff",txt:"text/plain",wav:"audio/x-wav",wma:"audio/x-ms-wma",wmv:"video/x-ms-wmv",xml:"application/xml",zip:"application/zip",detectFromFilename:function(e){let t=e.toLowerCase();return t=O0(t),SSe[t]}},wee;typeof DOMParser<"u"&&(wee=new DOMParser);var oyt=new vSe.default({stripPrefix:!1,email:!1,replaceFn:function(e){return e.urlMatchType==="scheme"||e.urlMatchType==="www"}}),My=32,gSe=2414016,_Se=1,ASe=16093e3,ySe=.1,xSe=[null,void 0,"http://www.opengis.net/kml/2.2","http://earth.google.com/kml/2.2","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.0"],bSe=["http://www.google.com/kml/ext/2.2"],ryt=["http://www.w3.org/2005/Atom"],ze={kml:xSe,gx:bSe,atom:ryt,kmlgx:xSe.concat(bSe)},Iee={Document:NSe,Folder:Eyt,Placemark:vyt,NetworkLink:Byt,GroundOverlay:Ryt,PhotoOverlay:zSe,ScreenOverlay:Pyt,Tour:wyt};function o0(e){this._dataSource=e,this._deferred=yu(),this._stack=[],this._promises=[],this._timeoutSet=!1,this._used=!1,this._started=0,this._timeThreshold=1e3}Object.defineProperties(o0.prototype,{dataSource:{get:function(){return this._dataSource}}});o0.prototype.addNodes=function(e,t){this._stack.push({nodes:e,index:0,processingData:t}),this._used=!0};o0.prototype.addPromise=function(e){this._promises.push(e)};o0.prototype.wait=function(){let e=this._deferred;return this._used||e.resolve(),Promise.all([e.promise,Promise.all(this._promises)])};o0.prototype.process=function(){let e=this._stack.length===1;return e&&(this._started=Qf._getTimestamp()),this._process(e)};o0.prototype._giveUpTime=function(){if(this._timeoutSet)return;this._timeoutSet=!0,this._timeThreshold=50;let e=this;setTimeout(function(){e._timeoutSet=!1,e._started=Qf._getTimestamp(),e._process(!0)},0)};o0.prototype._nextNode=function(){let e=this._stack,t=e[e.length-1],n=t.index,i=t.nodes;if(n!==i.length)return++t.index,i[n]};o0.prototype._pop=function(){let e=this._stack;return e.pop(),e.length===0?(this._deferred.resolve(),!1):!0};o0.prototype._process=function(e){let t=this.dataSource,n=this._stack[this._stack.length-1].processingData,i=this._nextNode();for(;l(i);){let o=Iee[i.localName];if(l(o)&&(ze.kml.indexOf(i.namespaceURI)!==-1||ze.gx.indexOf(i.namespaceURI)!==-1)&&(o(t,i,n,this),this._timeoutSet||Qf._getTimestamp()>this._started+this._timeThreshold)){this._giveUpTime();return}i=this._nextNode()}this._pop()&&e&&this._process(!0)};function ayt(e){let t=e.slice(0,Math.min(4,e.size)),n=yu(),i=new FileReader;return i.addEventListener("load",function(){n.resolve(new DataView(i.result).getUint32(0,!1)===1347093252)}),i.addEventListener("error",function(){n.reject(i.error)}),i.readAsArrayBuffer(t),n.promise}function syt(e){let t=yu(),n=new FileReader;return n.addEventListener("load",function(){t.resolve(n.result)}),n.addEventListener("error",function(){t.reject(n.error)}),n.readAsText(e),t.promise}function wSe(e){let t={xsi:"http://www.w3.org/2001/XMLSchema-instance"},n,i,o,r;for(let a in t)t.hasOwnProperty(a)&&(o=RegExp(`[< ]${a}:`),r=`xmlns:${a}=`,o.test(e)&&e.indexOf(r)===-1&&(l(n)||(n=e.substr(0,e.indexOf("<kml")+4),i=e.substr(n.length)),n+=` ${r}"${t[a]}"`));return l(n)&&(e=n+i),e}function ISe(e){let t=e.indexOf("xmlns:"),n=e.indexOf(">",t),i,o,r;for(;t!==-1&&t<n;)i=e.slice(t,e.indexOf('"',t)),o=t,t=e.indexOf(i,t+1),t!==-1?(r=e.indexOf('"',e.indexOf('"',t)+1),e=e.slice(0,t-1)+e.slice(r+1,e.length),t=e.indexOf("xmlns:",o-1)):t=e.indexOf("xmlns:",o+1);return e}async function cyt(e,t){let n=await e.getData(new Ek);n=wSe(n),n=ISe(n),t.kml=wee.parseFromString(n,"application/xml")}async function bee(e,t){let n=SSe.detectFromFilename(e.filename)??"application/octet-stream",i=await e.getData(new Ck(n));t[e.filename]=i}function Xf(e,t,n,i){let o=i.keys,r=new Qk.default("."),a=e.querySelectorAll(t);for(let s=0;s<a.length;s++){let c=a[s],u=c.getAttribute(n);if(l(u)){let d=new Qk.default(u).absoluteTo(r).toString(),p=o.indexOf(d);if(p!==-1){let g=o[p];c.setAttribute(n,i[g]),t==="a"&&c.getAttribute("download")===null&&c.setAttribute("download",g)}}}}function Kf(e,t,n,i){let o=e.querySelectorAll(t);for(let r=0;r<o.length;r++){let a=o[r],s=a.getAttribute(n),c=Dee(s,i);l(c)&&a.setAttribute(n,c.url)}}function DSe(e,t,n){let i=Es(e,"id");i=l(i)&&i.length!==0?i:jn(),l(n)&&(i=n+i);let o=t.getById(i);return l(o)&&(i=jn(),l(n)&&(i=n+i)),o=t.add(new jo({id:i})),l(o.kml)||(o.addProperty("kml"),o.kml=new kyt),o}function $k(e,t){return e==="absolute"||e==="relativeToGround"||t==="relativeToSeaFloor"}function I6(e,t){if(!l(e))return h.fromDegrees(0,0,0,t);let n=e.match(/[^\s,\n]+/g);if(!l(n))return h.fromDegrees(0,0,0,t);let i=parseFloat(n[0]),o=parseFloat(n[1]),r=parseFloat(n[2]);return i=isNaN(i)?0:i,o=isNaN(o)?0:o,r=isNaN(r)?0:r,h.fromDegrees(i,o,r,t)}function v6(e,t){if(!l(e))return;let n=e.textContent.match(/[^\s\n]+/g);if(!l(n))return;let i=n.length,o=new Array(i),r=0;for(let a=0;a<i;a++)o[r++]=I6(n[a],t);return o}function By(e,t){if(!l(e))return;let n=e.getAttribute(t);if(n!==null){let i=parseFloat(n);return isNaN(i)?void 0:i}}function Es(e,t){if(!l(e))return;let n=e.getAttribute(t);return n!==null?n:void 0}function $i(e,t,n){if(!l(e))return;let i=e.childNodes,o=i.length;for(let r=0;r<o;r++){let a=i[r];if(a.localName===t&&n.indexOf(a.namespaceURI)!==-1)return a}}function CSe(e,t,n){if(!l(e))return;let i=[],o=e.getElementsByTagNameNS("*",t),r=o.length;for(let a=0;a<r;a++){let s=o[a];s.localName===t&&n.indexOf(s.namespaceURI)!==-1&&i.push(s)}return i}function Fm(e,t,n){if(!l(e))return[];let i=[],o=e.childNodes,r=o.length;for(let a=0;a<r;a++){let s=o[a];s.localName===t&&n.indexOf(s.namespaceURI)!==-1&&i.push(s)}return i}function _i(e,t,n){let i=$i(e,t,n);if(l(i)){let o=parseFloat(i.textContent);return isNaN(o)?void 0:o}}function Mn(e,t,n){let i=$i(e,t,n);if(l(i))return i.textContent.trim()}function km(e,t,n){let i=$i(e,t,n);if(l(i)){let o=i.textContent.trim();return o==="1"||/^true$/i.test(o)}}function Dee(e,t,n){if(!l(e))return;let i;if(l(n)){e=e.replace(/\\/g,"/");let o=n[e];if(l(o))i=new De({url:o});else{let r=new Qk.default(t.getUrlComponent()),a=new Qk.default(e);o=n[a.absoluteTo(r)],l(o)&&(i=new De({url:o}))}}return l(i)||(i=t.getDerivedResource({url:e})),i}var Xu={maximumRed:void 0,red:void 0,maximumGreen:void 0,green:void 0,maximumBlue:void 0,blue:void 0};function vee(e,t){if(!l(e)||/^\s*$/gm.test(e))return;e[0]==="#"&&(e=e.substring(1));let n=parseInt(e.substring(0,2),16)/255,i=parseInt(e.substring(2,4),16)/255,o=parseInt(e.substring(4,6),16)/255,r=parseInt(e.substring(6,8),16)/255;return t?(r>0?(Xu.maximumRed=r,Xu.red=void 0):(Xu.maximumRed=void 0,Xu.red=0),o>0?(Xu.maximumGreen=o,Xu.green=void 0):(Xu.maximumGreen=void 0,Xu.green=0),i>0?(Xu.maximumBlue=i,Xu.blue=void 0):(Xu.maximumBlue=void 0,Xu.blue=0),Xu.alpha=n,V.fromRandom(Xu)):new V(r,o,i,n)}function JC(e,t,n){let i=Mn(e,t,n);if(l(i))return vee(i,Mn(e,"colorMode",n)==="random")}function lyt(e){let t=$i(e,"TimeStamp",ze.kmlgx),n=Mn(t,"when",ze.kmlgx);if(!l(t)||!l(n)||n.length===0)return;let i=Q.fromIso8601(n),o=new Ta;return o.addInterval(new wn({start:i,stop:Qe.MAXIMUM_VALUE})),o}function uyt(e){let t=$i(e,"TimeSpan",ze.kmlgx);if(!l(t))return;let n,i=$i(t,"begin",ze.kmlgx),o=l(i)?Q.fromIso8601(i.textContent):void 0,r=$i(t,"end",ze.kmlgx),a=l(r)?Q.fromIso8601(r.textContent):void 0;if(l(o)&&l(a)){if(Q.lessThan(a,o)){let s=o;o=a,a=s}n=new Ta,n.addInterval(new wn({start:o,stop:a}))}else l(o)?(n=new Ta,n.addInterval(new wn({start:o,stop:Qe.MAXIMUM_VALUE}))):l(a)&&(n=new Ta,n.addInterval(new wn({start:Qe.MINIMUM_VALUE,stop:a})));return n}function PSe(){let e=new Jc;return e.width=My,e.height=My,e.scaleByDistance=new zt(gSe,_Se,ASe,ySe),e.pixelOffsetScaleByDistance=new zt(gSe,_Se,ASe,ySe),e}function Pee(){let e=new Uh;return e.outline=!0,e.outlineColor=V.WHITE,e}function RSe(){let e=new zh;return e.translucencyByDistance=new zt(3e6,1,5e6,0),e.pixelOffset=new z(17,0),e.horizontalOrigin=Oi.LEFT,e.font="16px sans-serif",e.style=sr.FILL_AND_OUTLINE,e}function Ree(e,t,n,i,o){let r=Mn(e,"href",ze.kml);if(!l(r)||r.length===0)return;if(r.indexOf("root://icons/palette-")===0){let s=r.charAt(21),c=_i(e,"x",ze.gx)??0,u=_i(e,"y",ze.gx)??0;c=Math.min(c/32,7),u=7-Math.min(u/32,7);let f=8*u+c;r=`https://maps.google.com/mapfiles/kml/pal${s}/icon${f}.png`}let a=Dee(r,n,i);if(o){let s=Mn(e,"refreshMode",ze.kml),c=Mn(e,"viewRefreshMode",ze.kml);s==="onInterval"||s==="onExpire"?_t(`kml-refreshMode-${s}`,`KML - Unsupported Icon refreshMode: ${s}`):(c==="onStop"||c==="onRegion")&&_t(`kml-refreshMode-${c}`,`KML - Unsupported Icon viewRefreshMode: ${c}`);let u=Mn(e,"viewBoundScale",ze.kml)??1,f=c==="onStop"?"BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]":"",d=Mn(e,"viewFormat",ze.kml)??f,p=Mn(e,"httpQuery",ze.kml);l(d)&&a.setQueryParameters(ff(w6(d))),l(p)&&a.setQueryParameters(ff(w6(p)));let g=t._ellipsoid;return Mee(a,t.camera,t.canvas,u,t._lastCameraView.bbox,g),a}return a}function fyt(e,t,n,i,o){let r=_i(t,"scale",ze.kml),a=_i(t,"heading",ze.kml),s=JC(t,"color",ze.kml),c=$i(t,"Icon",ze.kml),u=Ree(c,e,i,o,!1);l(c)&&!l(u)&&(u=!1);let f=_i(c,"x",ze.gx),d=_i(c,"y",ze.gx),p=_i(c,"w",ze.gx),g=_i(c,"h",ze.gx),m=$i(t,"hotSpot",ze.kml),A=By(m,"x"),y=By(m,"y"),x=Es(m,"xunits"),b=Es(m,"yunits"),C=n.billboard;l(C)||(C=PSe(),n.billboard=C),C.image=u,C.scale=r,C.color=s,(l(f)||l(d)||l(p)||l(g))&&(C.imageSubRegion=new Je(f,d,p,g)),l(a)&&a!==0&&(C.rotation=D.toRadians(-a),C.alignedAxis=h.UNIT_Z),r=r??1;let E,S;l(A)&&(x==="pixels"?E=-A*r:x==="insetPixels"?E=(A-My)*r:x==="fraction"&&(E=-A*My*r),E+=My*.5*r),l(y)&&(b==="pixels"?S=y*r:b==="insetPixels"?S=(-y+My)*r:b==="fraction"&&(S=y*My*r),S-=My*.5*r),(l(E)||l(S))&&(C.pixelOffset=new z(E,S))}function S6(e,t,n,i,o){for(let r=0,a=t.childNodes.length;r<a;r++){let s=t.childNodes.item(r);if(s.localName==="IconStyle")fyt(e,s,n,i,o);else if(s.localName==="LabelStyle"){let c=n.label;l(c)||(c=RSe(),n.label=c),c.scale=_i(s,"scale",ze.kml)??c.scale,c.fillColor=JC(s,"color",ze.kml)??c.fillColor,c.text=n.name}else if(s.localName==="LineStyle"){let c=n.polyline;l(c)||(c=new el,n.polyline=c),c.width=_i(s,"width",ze.kml),c.material=JC(s,"color",ze.kml),l(JC(s,"outerColor",ze.gx))&&_t("kml-gx:outerColor","KML - gx:outerColor is not supported in a LineStyle"),l(_i(s,"outerWidth",ze.gx))&&_t("kml-gx:outerWidth","KML - gx:outerWidth is not supported in a LineStyle"),l(_i(s,"physicalWidth",ze.gx))&&_t("kml-gx:physicalWidth","KML - gx:physicalWidth is not supported in a LineStyle"),l(km(s,"labelVisibility",ze.gx))&&_t("kml-gx:labelVisibility","KML - gx:labelVisibility is not supported in a LineStyle")}else if(s.localName==="PolyStyle"){let c=n.polygon;l(c)||(c=Pee(),n.polygon=c),c.material=JC(s,"color",ze.kml)??c.material,c.fill=km(s,"fill",ze.kml)??c.fill,c.outline=km(s,"outline",ze.kml)??c.outline}else if(s.localName==="BalloonStyle"){let c=vee(Mn(s,"bgColor",ze.kml))??V.WHITE,u=vee(Mn(s,"textColor",ze.kml))??V.BLACK,f=Mn(s,"text",ze.kml);n.addProperty("balloonStyle"),n.balloonStyle={bgColor:c,textColor:u,text:f}}else if(s.localName==="ListStyle"){let c=Mn(s,"listItemType",ze.kml);(c==="radioFolder"||c==="checkOffOnly")&&_t(`kml-listStyle-${c}`,`KML - Unsupported ListStyle with listItemType: ${c}`)}}}function dyt(e,t,n,i,o){let r=new jo,a,s=-1,c=t.childNodes,u=c.length;for(let d=0;d<u;d++){let p=c[d];(p.localName==="Style"||p.localName==="StyleMap")&&(s=d)}if(s!==-1){let d=c[s];if(d.localName==="Style")S6(e,d,r,i,o);else{let p=Fm(d,"Pair",ze.kml);for(let g=0;g<p.length;g++){let m=p[g],A=Mn(m,"key",ze.kml);if(A==="normal"){let y=Mn(m,"styleUrl",ze.kml);if(l(y))a=n.getById(y),l(a)||(a=n.getById(`#${y}`)),l(a)&&r.merge(a);else{let x=$i(m,"Style",ze.kml);S6(e,x,r,i,o)}}else _t(`kml-styleMap-${A}`,`KML - Unsupported StyleMap key: ${A}`)}}}let f=Mn(t,"styleUrl",ze.kml);if(l(f)){let d=f;if(f[0]!=="#"&&f.indexOf("#")!==-1){let p=f.split("#"),g=p[0];d=`${i.getDerivedResource({url:g}).getUrlComponent()}#${p[1]}`}a=n.getById(d),l(a)||(a=n.getById(`#${d}`)),l(a)&&r.merge(a)}return r}function hyt(e,t,n){return t.fetchXML().then(function(i){return OSe(e,i,n,t,!0)})}function OSe(e,t,n,i,o,r){let a,s,c,u,f=CSe(t,"Style",ze.kml);if(l(f)){let A=f.length;for(a=0;a<A;a++)u=f[a],s=Es(u,"id"),l(s)&&(s=`#${s}`,o&&l(i)&&(s=i.getUrlComponent()+s),l(n.getById(s))||(c=new jo({id:s}),n.add(c),S6(e,u,c,i,r)))}let d=CSe(t,"StyleMap",ze.kml);if(l(d)){let A=d.length;for(a=0;a<A;a++){let y=d[a];if(s=Es(y,"id"),l(s)){let x=Fm(y,"Pair",ze.kml);for(let b=0;b<x.length;b++){let C=x[b],E=Mn(C,"key",ze.kml);if(E==="normal"){if(s=`#${s}`,o&&l(i)&&(s=i.getUrlComponent()+s),!l(n.getById(s))){c=n.getOrCreateEntity(s);let S=Mn(C,"styleUrl",ze.kml);if(l(S)){S[0]!=="#"&&(S=`#${S}`),o&&l(i)&&(S=i.getUrlComponent()+S);let w=n.getById(S);l(w)&&c.merge(w)}else u=$i(C,"Style",ze.kml),S6(e,u,c,i,r)}}else _t(`kml-styleMap-${E}`,`KML - Unsupported StyleMap key: ${E}`)}}}}let p=[],g=t.getElementsByTagName("styleUrl"),m=g.length;for(a=0;a<m;a++){let A=g[a].textContent;if(A[0]!=="#"){let y=A.split("#");if(y.length===2){let x=y[0],b=i.getDerivedResource({url:x});p.push(hyt(e,b,n))}}}return p}function Oee(e,t,n){let i=new i_(e,t.id,["position"]),o=new Hp(t.position);t.polyline=l(n.polyline)?n.polyline.clone():new el,t.polyline.positions=new n_([i,o])}function MSe(e,t){return!l(e)&&!l(t)||e==="clampToGround"?nt.CLAMP_TO_GROUND:e==="relativeToGround"?nt.RELATIVE_TO_GROUND:e==="absolute"?nt.NONE:t==="clampToSeaFloor"?(_t("kml-gx:altitudeMode-clampToSeaFloor","KML - <gx:altitudeMode>:clampToSeaFloor is currently not supported, using <kml:altitudeMode>:clampToGround."),nt.CLAMP_TO_GROUND):t==="relativeToSeaFloor"?(_t("kml-gx:altitudeMode-relativeToSeaFloor","KML - <gx:altitudeMode>:relativeToSeaFloor is currently not supported, using <kml:altitudeMode>:relativeToGround."),nt.RELATIVE_TO_GROUND):(l(e)?_t("kml-altitudeMode-unknown",`KML - Unknown <kml:altitudeMode>:${e}, using <kml:altitudeMode>:CLAMP_TO_GROUND.`):_t("kml-gx:altitudeMode-unknown",`KML - Unknown <gx:altitudeMode>:${t}, using <kml:altitudeMode>:CLAMP_TO_GROUND.`),nt.CLAMP_TO_GROUND)}function myt(e,t,n){return n==="relativeToSeaFloor"||t==="absolute"||t==="relativeToGround"?e:((l(t)&&t!=="clampToGround"||l(n)&&n!=="clampToSeaFloor")&&_t("kml-altitudeMode-unknown",`KML - Unknown altitudeMode: ${t??n}`),new Hp(e))}function pyt(e,t,n,i){if(!l(e))return;if(n==="relativeToSeaFloor"||t==="absolute"||t==="relativeToGround")return e;(l(t)&&t!=="clampToGround"||l(n)&&n!=="clampToSeaFloor")&&_t("kml-altitudeMode-unknown",`KML - Unknown altitudeMode: ${t??n}`);let o=e.length;for(let r=0;r<o;r++){let a=e[r];i.scaleToGeodeticSurface(a,a)}return e}function D6(e,t,n,i){let o=t.label;l(o)||(o=l(n.label)?n.label.clone():RSe(),t.label=o),o.text=t.name;let r=t.billboard;l(r)||(r=l(n.billboard)?n.billboard.clone():PSe(),t.billboard=r),l(r.image)?r.image.getValue()||(r.image=void 0):r.image=e._pinBuilder.fromColor(V.YELLOW,64);let a=1;l(r.scale)&&(a=r.scale.getValue(),a!==0?o.pixelOffset=new z(a*16+1,0):(o.pixelOffset=void 0,o.horizontalOrigin=void 0)),l(i)&&e._clampToGround&&(r.heightReference=i,o.heightReference=i)}function BSe(e,t){let n=e.path;l(n)||(n=new Z0,n.leadTime=0,e.path=n);let i=t.polyline;l(i)&&(n.material=i.material,n.width=i.width)}function gyt(e,t,n,i,o){let r=Mn(n,"coordinates",ze.kml),a=Mn(n,"altitudeMode",ze.kml),s=Mn(n,"altitudeMode",ze.gx),c=km(n,"extrude",ze.kml),u=e._ellipsoid,f=I6(r,u);return i.position=f,D6(e,i,o,MSe(a,s)),c&&$k(a,s)&&Oee(t,i,o),!0}function TSe(e,t,n,i,o){let r=$i(n,"coordinates",ze.kml),a=Mn(n,"altitudeMode",ze.kml),s=Mn(n,"altitudeMode",ze.gx),c=km(n,"extrude",ze.kml),u=km(n,"tessellate",ze.kml),f=$k(a,s),d=_i(n,"drawOrder",ze.gx),p=e._ellipsoid,g=v6(r,p),m=o.polyline;if(f&&c){let A=new eg;i.wall=A,A.positions=g;let y=o.polygon;l(y)&&(A.fill=y.fill,A.material=y.material),A.outline=!0,l(m)?(A.outlineColor=l(m.material)?m.material.color:V.WHITE,A.outlineWidth=m.width):l(y)&&(A.outlineColor=l(y.material)?y.material.color:V.WHITE)}else if(e._clampToGround&&!f&&u){let A=new el;A.clampToGround=!0,i.polyline=A,A.positions=g,l(m)?(A.material=l(m.material)?m.material.color.getValue(Qe.MINIMUM_VALUE):V.WHITE,A.width=m.width??1):(A.material=V.WHITE,A.width=1),A.zIndex=d}else l(d)&&_t("kml-gx:drawOrder","KML - gx:drawOrder is not supported in LineStrings when clampToGround is false"),e._clampToGround&&!u&&_t("kml-line-tesselate","Ignoring clampToGround for KML lines without the tessellate flag."),m=l(m)?m.clone():new el,i.polyline=m,m.positions=pyt(g,a,s,p),(!u||f)&&(m.arcType=on.NONE);return!0}function _yt(e,t,n,i,o){let r=$i(n,"outerBoundaryIs",ze.kml),a=$i(r,"LinearRing",ze.kml),s=$i(a,"coordinates",ze.kml),c=e._ellipsoid,u=v6(s,c),f=km(n,"extrude",ze.kml),d=Mn(n,"altitudeMode",ze.kml),p=Mn(n,"altitudeMode",ze.gx),g=$k(d,p),m=l(o.polygon)?o.polygon.clone():Pee(),A=o.polyline;if(l(A)&&(m.outlineColor=l(A.material)?A.material.color:V.WHITE,m.outlineWidth=A.width),i.polygon=m,g?(m.perPositionHeight=!0,m.extrudedHeight=f?0:void 0):e._clampToGround||(m.height=0),l(u)){let y=new Ic(u),x=Fm(n,"innerBoundaryIs",ze.kml);for(let b=0;b<x.length;b++){a=Fm(x[b],"LinearRing",ze.kml);for(let C=0;C<a.length;C++)s=$i(a[C],"coordinates",ze.kml),u=v6(s,c),l(u)&&y.holes.push(new Ic(u))}m.hierarchy=y}return!0}function Ayt(e,t,n,i,o){let r=Mn(n,"altitudeMode",ze.kml),a=Mn(n,"altitudeMode",ze.gx),s=Fm(n,"coord",ze.gx),c=Fm(n,"angles",ze.gx),u=Fm(n,"when",ze.kml),f=km(n,"extrude",ze.kml),d=$k(r,a),p=e._ellipsoid;c.length>0&&_t("kml-gx:angles","KML - gx:angles are not supported in gx:Tracks");let g=Math.min(s.length,u.length),m=[],A=[];for(let x=0;x<g;x++){let b=I6(s[x].textContent,p);m.push(b),A.push(Q.fromIso8601(u[x].textContent))}let y=new uc;return y.addSamples(A,m),i.position=y,D6(e,i,o,MSe(r,a)),BSe(i,o),i.availability=new Ta,u.length>0&&i.availability.addInterval(new wn({start:A[0],stop:A[A.length-1]})),d&&f&&Oee(t,i,o),!0}function ESe(e,t,n,i,o,r,a,s,c){let u=e[0],f=e[e.length-1],d=new uc;d.addSamples(e,t),n.intervals.addInterval(new wn({start:u,stop:f,isStartIncluded:c,isStopIncluded:c,data:myt(d,a,s)})),i.addInterval(new wn({start:u,stop:f,isStartIncluded:c,isStopIncluded:c})),o.intervals.addInterval(new wn({start:u,stop:f,isStartIncluded:c,isStopIncluded:c,data:r}))}function yyt(e,t,n,i,o){let r=km(n,"interpolate",ze.gx),a=Fm(n,"Track",ze.gx),s,c,u,f=!1,d=new r_,p=new Ta,g=new cc,m=e._ellipsoid;for(let A=0,y=a.length;A<y;A++){let x=a[A],b=Fm(x,"when",ze.kml),C=Fm(x,"coord",ze.gx),E=Mn(x,"altitudeMode",ze.kml),S=Mn(x,"altitudeMode",ze.gx),w=$k(E,S),P=km(x,"extrude",ze.kml),R=Math.min(C.length,b.length),B=[];s=[];for(let L=0;L<R;L++){let _=I6(C[L].textContent,m);B.push(_),s.push(Q.fromIso8601(b[L].textContent))}r&&(l(c)&&ESe([c,s[0]],[u,B[0]],g,p,d,!1,"absolute",void 0,!1),c=s[R-1],u=B[B.length-1]),ESe(s,B,g,p,d,w&&P,E,S,!0),f=f||w&&P}return i.availability=p,i.position=g,D6(e,i,o),BSe(i,o),f&&(Oee(t,i,o),i.polyline.show=d),!0}var LSe={Point:gyt,LineString:TSe,LinearRing:TSe,Polygon:_yt,Track:Ayt,MultiTrack:yyt,MultiGeometry:xyt,Model:byt};function xyt(e,t,n,i,o,r){let a=n.childNodes,s=!1;for(let c=0,u=a.length;c<u;c++){let f=a.item(c),d=LSe[f.localName];if(l(d)){let p=DSe(f,t,r);p.parent=i,p.name=i.name,p.availability=i.availability,p.description=i.description,p.kml=i.kml,d(e,t,f,p,o)&&(s=!0)}}return s}function byt(e,t,n,i,o){return _t("kml-unsupportedGeometry",`KML - Unsupported geometry: ${n.localName}`),!1}function Cyt(e,t){let n=$i(e,"ExtendedData",ze.kml);if(!l(n))return;l($i(n,"SchemaData",ze.kml))&&_t("kml-schemaData","KML - SchemaData is unsupported"),l(Es(n,"xmlns:prefix"))&&_t("kml-extendedData","KML - ExtendedData with xmlns:prefix is unsupported");let i={},o=Fm(n,"Data",ze.kml);if(l(o)){let r=o.length;for(let a=0;a<r;a++){let s=o[a],c=Es(s,"name");l(c)&&(i[c]={displayName:Mn(s,"displayName",ze.kml),value:Mn(s,"value",ze.kml)})}}t.kml.extendedData=i}var Mo;typeof document<"u"&&(Mo=document.createElement("div"));function Tyt(e,t,n,i,o){let r,a,s,c=t.kml,u=c.extendedData,f=Mn(e,"description",ze.kml),d=t.balloonStyle??n.balloonStyle,p=V.WHITE,g=V.BLACK,m=f;l(d)&&(p=d.bgColor??V.WHITE,g=d.textColor??V.BLACK,m=d.text??f);let A;if(l(m)){if(m=m.replace("$[name]",t.name??""),m=m.replace("$[description]",f??""),m=m.replace("$[address]",c.address??""),m=m.replace("$[Snippet]",c.snippet??""),m=m.replace("$[id]",t.id),m=m.replace("$[geDirections]",""),l(u)){let b=m.match(/\$\[.+?\]/g);if(b!==null)for(r=0;r<b.length;r++){let C=b[r],E=C.substr(2,C.length-3),S=/\/displayName$/.test(E);E=E.replace(/\/displayName$/,""),A=u[E],l(A)&&(A=S?A.displayName:A.value),l(A)&&(m=m.replace(C,A??""))}}}else if(l(u)&&(s=Object.keys(u),s.length>0)){for(m='<table class="cesium-infoBox-defaultTable cesium-infoBox-defaultTable-lighter"><tbody>',r=0;r<s.length;r++)a=s[r],A=u[a],m+=`<tr><th>${A.displayName??a}</th><td>${A.value??""}</td></tr>`;m+="</tbody></table>"}if(!l(m))return;m=oyt.link(m),Mo.innerHTML=m;let y=Mo.querySelectorAll("a");for(r=0;r<y.length;r++)y[r].setAttribute("target","_blank");l(i)&&i.keys.length>1&&(Xf(Mo,"a","href",i),Xf(Mo,"link","href",i),Xf(Mo,"area","href",i),Xf(Mo,"img","src",i),Xf(Mo,"iframe","src",i),Xf(Mo,"video","src",i),Xf(Mo,"audio","src",i),Xf(Mo,"source","src",i),Xf(Mo,"track","src",i),Xf(Mo,"input","src",i),Xf(Mo,"embed","src",i),Xf(Mo,"script","src",i),Xf(Mo,"video","poster",i)),Kf(Mo,"a","href",o),Kf(Mo,"link","href",o),Kf(Mo,"area","href",o),Kf(Mo,"img","src",o),Kf(Mo,"iframe","src",o),Kf(Mo,"video","src",o),Kf(Mo,"audio","src",o),Kf(Mo,"source","src",o),Kf(Mo,"track","src",o),Kf(Mo,"input","src",o),Kf(Mo,"embed","src",o),Kf(Mo,"script","src",o),Kf(Mo,"video","poster",o);let x='<div class="cesium-infoBox-description-lighter" style="';x+="overflow:auto;",x+="word-wrap:break-word;",x+=`background-color:${p.toCssColorString()};`,x+=`color:${g.toCssColorString()};`,x+='">',x+=`${Mo.innerHTML}</div>`,Mo.innerHTML="",t.description=x}function P6(e,t,n){let i=n.entityCollection,o=n.parentEntity,r=n.sourceResource,a=n.uriResolver,s=DSe(t,i,n.context),c=s.kml,u=dyt(e,t,n.styleCollection,r,a),f=Mn(t,"name",ze.kml);s.name=f,s.parent=o;let d=uyt(t);l(d)||(d=lyt(t)),s.availability=d,Lee(s);function p(C){return C?C.show&&p(C.parent):!0}let g=km(t,"visibility",ze.kml);s.show=p(o)&&(g??!0);let m=$i(t,"author",ze.atom),A=c.author;A.name=Mn(m,"name",ze.atom),A.uri=Mn(m,"uri",ze.atom),A.email=Mn(m,"email",ze.atom);let y=$i(t,"link",ze.atom),x=c.link;x.href=Es(y,"href"),x.hreflang=Es(y,"hreflang"),x.rel=Es(y,"rel"),x.type=Es(y,"type"),x.title=Es(y,"title"),x.length=Es(y,"length"),c.address=Mn(t,"address",ze.kml),c.phoneNumber=Mn(t,"phoneNumber",ze.kml),c.snippet=Mn(t,"Snippet",ze.kml),Cyt(t,s),Tyt(t,s,u,a,r);let b=e._ellipsoid;return kSe(t,s,b),FSe(t,s,b),l($i(t,"Region",ze.kml))&&_t("kml-region","KML - Placemark Regions are unsupported"),{entity:s,styleEntity:u}}function NSe(e,t,n,i){i.addNodes(t.childNodes,n),i.process()}function Eyt(e,t,n,i){let o=P6(e,t,n),r=We(n);r.parentEntity=o.entity,NSe(e,t,r,i)}function vyt(e,t,n,i){let o=P6(e,t,n),r=o.entity,a=o.styleEntity,s=!1,c=t.childNodes;for(let u=0,f=c.length;u<f&&!s;u++){let d=c.item(u),p=LSe[d.localName];l(p)&&(p(e,n.entityCollection,d,r,a,r.id),s=!0)}s||(r.merge(a),D6(e,r,a))}var Syt={FlyTo:Dyt,Wait:Iyt,SoundCue:Cee,AnimatedUpdate:Cee,TourControl:Cee};function wyt(e,t,n,i){let o=Mn(t,"name",ze.kml),r=Es(t,"id"),a=new qk(o,r),s=$i(t,"Playlist",ze.gx);if(s){let c=e._ellipsoid,u=s.childNodes;for(let f=0;f<u.length;f++){let d=u[f];if(d.localName){let p=Syt[d.localName];p?p(a,d,c):console.log(`Unknown KML Tour playlist entry type ${d.localName}`)}}}e._kmlTours.push(a)}function Cee(e,t){_t(`KML Tour unsupported node ${t.localName}`)}function Iyt(e,t){let n=_i(t,"duration",ze.gx);e.addPlaylistEntry(new Kk(n))}function Dyt(e,t,n){let i=_i(t,"duration",ze.gx),o=Mn(t,"flyToMode",ze.gx),r={kml:{}};kSe(t,r,n),FSe(t,r,n);let a=r.kml.lookAt||r.kml.camera,s=new Xk(i,o,a);e.addPlaylistEntry(s)}function FSe(e,t,n){let i=$i(e,"Camera",ze.kml);if(l(i)){let o=_i(i,"longitude",ze.kml)??0,r=_i(i,"latitude",ze.kml)??0,a=_i(i,"altitude",ze.kml)??0,s=_i(i,"heading",ze.kml)??0,c=_i(i,"tilt",ze.kml)??0,u=_i(i,"roll",ze.kml)??0,f=h.fromDegrees(o,r,a,n),d=Tc.fromDegrees(s,c-90,u);t.kml.camera=new fk(f,d)}}function kSe(e,t,n){let i=$i(e,"LookAt",ze.kml);if(l(i)){let o=_i(i,"longitude",ze.kml)??0,r=_i(i,"latitude",ze.kml)??0,a=_i(i,"altitude",ze.kml)??0,s=_i(i,"heading",ze.kml),c=_i(i,"tilt",ze.kml),u=_i(i,"range",ze.kml)??0;c=D.toRadians(c??0),s=D.toRadians(s??0);let f=new ih(s,c-D.PI_OVER_TWO,u),d=h.fromDegrees(o,r,a,n);t.kml.lookAt=new Wk(d,f)}}function Pyt(e,t,n,i){let o=n.screenOverlayContainer;if(!l(o))return;let r=n.sourceResource,a=n.uriResolver,s=$i(t,"Icon",ze.kml),c=Ree(s,e,r,a,!1);if(!l(c))return;let u=document.createElement("img");e._screenOverlays.push(u),u.src=c.url,u.onload=function(){let f=["position: absolute"],d=$i(t,"screenXY",ze.kml),p=$i(t,"overlayXY",ze.kml),g=$i(t,"size",ze.kml),m,A,y,x,b,C;l(g)&&(m=By(g,"x"),A=By(g,"y"),y=Es(g,"xunits"),x=Es(g,"yunits"),l(m)&&m!==-1&&m!==0&&(y==="fraction"?b=`width: ${Math.floor(m*100)}%`:y==="pixels"&&(b=`width: ${m}px`),f.push(b)),l(A)&&A!==-1&&A!==0&&(x==="fraction"?C=`height: ${Math.floor(A*100)}%`:x==="pixels"&&(C=`height: ${A}px`),f.push(C))),u.style=f.join(";");let E=0,S=u.height;l(p)&&(m=By(p,"x"),A=By(p,"y"),y=Es(p,"xunits"),x=Es(p,"yunits"),l(m)&&(y==="fraction"?E=m*u.width:(y==="pixels"||y==="insetPixels")&&(E=m)),l(A)&&(x==="fraction"?S=A*u.height:(x==="pixels"||x==="insetPixels")&&(S=A))),l(d)&&(m=By(d,"x"),A=By(d,"y"),y=Es(d,"xunits"),x=Es(d,"yunits"),l(m)&&(y==="fraction"?b=`left: calc(${Math.floor(m*100)}% - ${E}px)`:y==="pixels"?b=`left: ${m-E}px`:y==="insetPixels"&&(b=`right: ${m-E}px`),f.push(b)),l(A)&&(x==="fraction"?C=`bottom: calc(${Math.floor(A*100)}% - ${S}px)`:x==="pixels"?C=`bottom: ${A-S}px`:x==="insetPixels"&&(C=`top: ${A-S}px`),f.push(C))),u.style=f.join(";")},o.appendChild(u)}function Ryt(e,t,n,i){let r=P6(e,t,n).entity,a,s=!1,c=e._ellipsoid,u=v6($i(t,"LatLonQuad",ze.gx),c),f=_i(t,"drawOrder",ze.kml);if(l(u))a=Pee(),a.hierarchy=new Ic(u),a.zIndex=f,r.polygon=a,s=!0;else{a=new Vh,a.zIndex=f,r.rectangle=a;let m=$i(t,"LatLonBox",ze.kml);if(l(m)){let A=_i(m,"west",ze.kml),y=_i(m,"south",ze.kml),x=_i(m,"east",ze.kml),b=_i(m,"north",ze.kml);l(A)&&(A=D.negativePiToPi(D.toRadians(A))),l(y)&&(y=D.clampToLatitudeRange(D.toRadians(y))),l(x)&&(x=D.negativePiToPi(D.toRadians(x))),l(b)&&(b=D.clampToLatitudeRange(D.toRadians(b))),a.coordinates=new oe(A,y,x,b);let C=_i(m,"rotation",ze.kml);if(l(C)){let E=D.toRadians(C);a.rotation=E,a.stRotation=E}}}let d=$i(t,"Icon",ze.kml),p=Ree(d,e,n.sourceResource,n.uriResolver,!0);if(l(p)){s&&_t("kml-gx:LatLonQuad","KML - gx:LatLonQuad Icon does not support texture projection.");let m=_i(d,"x",ze.gx),A=_i(d,"y",ze.gx),y=_i(d,"w",ze.gx),x=_i(d,"h",ze.gx);(l(m)||l(A)||l(y)||l(x))&&_t("kml-groundOverlay-xywh","KML - gx:x, gx:y, gx:w, gx:h aren't supported for GroundOverlays"),a.material=p,a.material.color=JC(t,"color",ze.kml),a.material.transparent=!0}else a.material=JC(t,"color",ze.kml);let g=Mn(t,"altitudeMode",ze.kml);l(g)?g==="absolute"?(a.height=_i(t,"altitude",ze.kml),a.zIndex=void 0):g!=="clampToGround"&&_t("kml-altitudeMode-unknown",`KML - Unknown altitudeMode: ${g}`):(g=Mn(t,"altitudeMode",ze.gx),g==="relativeToSeaFloor"?(_t("kml-altitudeMode-relativeToSeaFloor","KML - altitudeMode relativeToSeaFloor is currently not supported, treating as absolute."),a.height=_i(t,"altitude",ze.kml),a.zIndex=void 0):g==="clampToSeaFloor"?_t("kml-altitudeMode-clampToSeaFloor","KML - altitudeMode clampToSeaFloor is currently not supported, treating as clampToGround."):l(g)&&_t("kml-altitudeMode-unknown",`KML - Unknown altitudeMode: ${g}`))}function zSe(e,t,n,i){e._unsupportedNode.raiseEvent(e,n.parentEntity,t,n.entityCollection,n.styleCollection,n.sourceResource,n.uriResolver),_t(`kml-unsupportedFeature-${t.nodeName}`,`KML - Unsupported feature: ${t.nodeName}`)}var Ly={INTERVAL:0,EXPIRE:1,STOP:2};function w6(e){if(!l(e)||e.length===0)return"";let t=e[0];return(t==="&"||t==="?")&&(e=e.substring(1)),e}var Oyt=new oe,Ww=new de,Tee=new z,Myt=new h;function Mee(e,t,n,i,o,r){function a(u){return u<-D.PI_OVER_TWO?-D.PI_OVER_TWO:u>D.PI_OVER_TWO?D.PI_OVER_TWO:u}function s(u){return u>D.PI?u-D.TWO_PI:u<-D.PI?u+D.TWO_PI:u}let c=hx(e.queryParameters);if(c=c.replace(/%5B/g,"[").replace(/%5D/g,"]"),l(t)&&t._mode!==ie.MORPHING){let u,f;if(o=o??Oyt,l(n)&&(Tee.x=n.clientWidth*.5,Tee.y=n.clientHeight*.5,u=t.pickEllipsoid(Tee,r,Myt)),l(u)?f=r.cartesianToCartographic(u,Ww):(f=oe.center(o,Ww),u=r.cartographicToCartesian(f)),l(i)&&!D.equalsEpsilon(i,1,D.EPSILON9)){let x=o.width*i*.5,b=o.height*i*.5;o=new oe(s(f.longitude-x),a(f.latitude-b),s(f.longitude+x),a(f.latitude+b))}c=c.replace("[bboxWest]",D.toDegrees(o.west).toString()),c=c.replace("[bboxSouth]",D.toDegrees(o.south).toString()),c=c.replace("[bboxEast]",D.toDegrees(o.east).toString()),c=c.replace("[bboxNorth]",D.toDegrees(o.north).toString());let d=D.toDegrees(f.longitude).toString(),p=D.toDegrees(f.latitude).toString();c=c.replace("[lookatLon]",d),c=c.replace("[lookatLat]",p),c=c.replace("[lookatTilt]",D.toDegrees(t.pitch).toString()),c=c.replace("[lookatHeading]",D.toDegrees(t.heading).toString()),c=c.replace("[lookatRange]",h.distance(t.positionWC,u)),c=c.replace("[lookatTerrainLon]",d),c=c.replace("[lookatTerrainLat]",p),c=c.replace("[lookatTerrainAlt]",f.height.toString()),r.cartesianToCartographic(t.positionWC,Ww),c=c.replace("[cameraLon]",D.toDegrees(Ww.longitude).toString()),c=c.replace("[cameraLat]",D.toDegrees(Ww.latitude).toString()),c=c.replace("[cameraAlt]",D.toDegrees(Ww.height).toString());let g=t.frustum,m=g.aspectRatio,A="",y="";if(l(m)){let x=D.toDegrees(g.fov);m>1?(A=x,y=x/m):(y=x,A=x*m)}c=c.replace("[horizFov]",A.toString()),c=c.replace("[vertFov]",y.toString())}else c=c.replace("[bboxWest]","-180"),c=c.replace("[bboxSouth]","-90"),c=c.replace("[bboxEast]","180"),c=c.replace("[bboxNorth]","90"),c=c.replace("[lookatLon]",""),c=c.replace("[lookatLat]",""),c=c.replace("[lookatRange]",""),c=c.replace("[lookatTilt]",""),c=c.replace("[lookatHeading]",""),c=c.replace("[lookatTerrainLon]",""),c=c.replace("[lookatTerrainLat]",""),c=c.replace("[lookatTerrainAlt]",""),c=c.replace("[cameraLon]",""),c=c.replace("[cameraLat]",""),c=c.replace("[cameraAlt]",""),c=c.replace("[horizFov]",""),c=c.replace("[vertFov]","");l(n)?(c=c.replace("[horizPixels]",n.clientWidth),c=c.replace("[vertPixels]",n.clientHeight)):(c=c.replace("[horizPixels]",""),c=c.replace("[vertPixels]","")),c=c.replace("[terrainEnabled]","1"),c=c.replace("[clientVersion]","1"),c=c.replace("[kmlVersion]","2.2"),c=c.replace("[clientName]","Cesium"),c=c.replace("[language]","English"),e.setQueryParameters(ff(c))}function Byt(e,t,n,i){let r=P6(e,t,n).entity,a=n.sourceResource,s=n.uriResolver,c=$i(t,"Link",ze.kml);if(l(c)||(c=$i(t,"Url",ze.kml)),l(c)){let u=Mn(c,"href",ze.kml),f,d;if(l(u)){let p=u;if(u=Dee(u,a,n.uriResolver),/^data:/.test(u.getUrlComponent()))/\.kmz/i.test(a.getUrlComponent())||(p=a.getDerivedResource({url:p}));else{if(p=u.clone(),f=Mn(c,"viewRefreshMode",ze.kml),f==="onRegion"){_t("kml-refrehMode-onRegion","KML - Unsupported viewRefreshMode: onRegion");return}d=Mn(c,"viewBoundScale",ze.kml)??1;let y=f==="onStop"?"BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]":"",x=Mn(c,"viewFormat",ze.kml)??y,b=Mn(c,"httpQuery",ze.kml);l(x)&&u.setQueryParameters(ff(w6(x))),l(b)&&u.setQueryParameters(ff(w6(b)));let C=e._ellipsoid;Mee(u,e.camera,e.canvas,d,e._lastCameraView.bbox,C)}let g={sourceUri:p,uriResolver:s,context:r.id,screenOverlayContainer:n.screenOverlayContainer},m=new Vs,A=Bee(e,m,u,g).then(function(y){let x=e._entityCollection,b=m.values;x.suspendEvents();for(let S=0;S<b.length;S++){let w=b[S];l(w.parent)||(w.parent=r,Lee(w)),x.add(w)}x.resumeEvents();let C=Mn(c,"refreshMode",ze.kml),E=_i(c,"refreshInterval",ze.kml)??0;if(C==="onInterval"&&E>0||C==="onExpire"||f==="onStop"){let S=$i(y,"NetworkLinkControl",ze.kml),w=l(S),P=Q.now(),R={id:jn(),href:u,cookie:{},lastUpdated:P,updating:!1,entity:r,viewBoundScale:d,needsUpdate:!1,cameraUpdateTime:P},B=0;if(w&&(R.cookie=ff(Mn(S,"cookie",ze.kml)??""),B=_i(S,"minRefreshPeriod",ze.kml)??0),C==="onInterval")w&&(E=Math.max(B,E)),R.refreshMode=Ly.INTERVAL,R.time=E;else if(C==="onExpire"){let L;if(w&&(L=Mn(S,"expires",ze.kml)),l(L))try{let _=Q.fromIso8601(L),T=Q.secondsDifference(_,P);T>0&&T<B&&Q.addSeconds(P,B,_),R.refreshMode=Ly.EXPIRE,R.time=_}catch{_t("kml-refreshMode-onInterval-onExpire","KML - NetworkLinkControl expires is not a valid date")}else _t("kml-refreshMode-onExpire","KML - refreshMode of onExpire requires the NetworkLinkControl to have an expires element")}else l(e.camera)?(R.refreshMode=Ly.STOP,R.time=_i(c,"viewRefreshTime",ze.kml)??0):_t("kml-refrehMode-onStop-noCamera","A NetworkLink with viewRefreshMode=onStop requires the `camera` property to be defined.");l(R.refreshMode)&&e._networkLinks.set(R.id,R)}}).catch(function(y){_t(`An error occured during loading ${u.url}`),e._error.raiseEvent(e,y)});i.addPromise(A)}}}function Lyt(e,t,n,i){let o=Iee[t.localName];return l(o)?o(e,t,n,i):zSe(e,t,n,i)}function See(e,t,n,i,o,r,a){t.removeAll();let s=n.documentElement,c=s.localName==="Document"?s:$i(s,"Document",ze.kml),u=Mn(c,"name",ze.kml);l(u)||(u=e_(i.getUrlComponent())),l(e._name)||(e._name=u);let f=new Qf._DeferredLoading(e),d=new Vs(e);return Promise.all(OSe(e,n,d,i,!1,o)).then(function(){let p=n.documentElement;if(p.localName==="kml"){let m=p.childNodes;for(let A=0;A<m.length;A++){let y=m[A];if(l(Iee[y.localName])){p=y;break}}}let g={parentEntity:void 0,entityCollection:t,styleCollection:d,sourceResource:i,uriResolver:o,context:a,screenOverlayContainer:r};return t.suspendEvents(),Lyt(e,p,g,f),t.resumeEvents(),f.wait().then(function(){return n.documentElement})})}async function Nyt(e,t,n,i,o){let r=Xt("ThirdParty/Workers/zip-web-worker.js"),a=Xt("ThirdParty/zip-module.wasm");$p({workerURI:r,wasmURI:a});let s=new KC(new e0(n)),c=await s.getEntries(),u=[],f={},d;for(let p=0;p<c.length;p++){let g=c[p];g.directory||(/\.kml$/i.test(g.filename)&&(!l(d)||!/\//i.test(g.filename))?(l(d)&&u.push(bee(d,f)),d=g):u.push(bee(g,f)))}if(l(d)&&u.push(cyt(d,f)),await Promise.all(u),s.close(),!l(f.kml))throw new re("KMZ file does not contain a KML document.");return f.keys=Object.keys(f),See(e,t,f.kml,i,f,o)}function Bee(e,t,n,i){i=i??G.EMPTY_OBJECT;let o=i.sourceUri,r=i.uriResolver,a=i.context,s=i.screenOverlayContainer,c=n;if(typeof n=="string"||n instanceof De){n=De.createIfNeeded(n),c=n.fetchBlob(),o=o??n.clone();let u=e._resourceCredits,f=n.credits;if(l(f)){let d=f.length;for(let p=0;p<d;p++)u.push(f[p])}}else o=o??De.DEFAULT.clone();return o=De.createIfNeeded(o),l(s)&&(s=On(s)),Promise.resolve(c).then(function(u){return u instanceof Blob?ayt(u).then(function(f){return f?Nyt(e,t,u,o,s):syt(u).then(function(d){d=wSe(d),d=ISe(d);let p,g;try{p=wee.parseFromString(d,"application/xml")}catch(m){g=m.toString()}if(l(g)||p.body||p.documentElement.tagName==="parsererror"){let m=l(g)?g:p.documentElement.firstChild.nodeValue;throw m||(m=p.body.innerText),new re(m)}return See(e,t,p,o,r,s,a)})}):See(e,t,u,o,r,s,a)}).catch(function(u){return e._error.raiseEvent(e,u),console.log(u),Promise.reject(u)})}function Qf(e){e=e??G.EMPTY_OBJECT;let t=e.camera,n=e.canvas;this._changed=new ye,this._error=new ye,this._loading=new ye,this._refresh=new ye,this._unsupportedNode=new ye,this._clock=void 0,this._entityCollection=new Vs(this),this._name=void 0,this._isLoading=!1,this._pinBuilder=new h_,this._networkLinks=new Lt,this._entityCluster=new Bf,this.canvas=n,this.camera=t,this._lastCameraView={position:l(t)?h.clone(t.positionWC):void 0,direction:l(t)?h.clone(t.directionWC):void 0,up:l(t)?h.clone(t.upWC):void 0,bbox:l(t)?t.computeViewRectangle():oe.clone(oe.MAX_VALUE)},this._ellipsoid=e.ellipsoid??te.default;let i=e.credit;typeof i=="string"&&(i=new yt(i)),this._credit=i,this._resourceCredits=[],this._kmlTours=[],this._screenOverlays=[]}Qf.load=function(e,t){return t=t??G.EMPTY_OBJECT,new Qf(t).load(e,t)};Object.defineProperties(Qf.prototype,{name:{get:function(){return this._name},set:function(e){this._name!==e&&(this._name=e,this._changed.raiseEvent(this))}},clock:{get:function(){return this._clock}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},refreshEvent:{get:function(){return this._refresh}},unsupportedNodeEvent:{get:function(){return this._unsupportedNode}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){this._entityCluster=e}},credit:{get:function(){return this._credit}},kmlTours:{get:function(){return this._kmlTours}}});Qf.prototype.load=function(e,t){t=t??G.EMPTY_OBJECT,Ea.setLoading(this,!0);let n=this._name;this._name=void 0,this._clampToGround=t.clampToGround??!1;let i=this;return Bee(this,this._entityCollection,e,t).then(function(){let o,r=i._entityCollection.computeAvailability(),a=r.start,s=r.stop,c=Q.equals(a,Qe.MINIMUM_VALUE),u=Q.equals(s,Qe.MAXIMUM_VALUE);if(!c||!u){let d;c&&(d=new Date,d.setHours(0,0,0,0),a=Q.fromDate(d)),u&&(d=new Date,d.setHours(24,0,0,0),s=Q.fromDate(d)),o=new Em,o.startTime=a,o.stopTime=s,o.currentTime=Q.clone(a),o.clockRange=va.LOOP_STOP,o.clockStep=Oo.SYSTEM_CLOCK_MULTIPLIER,o.multiplier=Math.round(Math.min(Math.max(Q.secondsDifference(s,a)/60,1),31556900))}let f=!1;return o!==i._clock&&(i._clock=o,f=!0),n!==i._name&&(f=!0),f&&i._changed.raiseEvent(i),Ea.setLoading(i,!1),i}).catch(function(o){return Ea.setLoading(i,!1),i._error.raiseEvent(i,o),console.log(o),Promise.reject(o)})};Qf.prototype.destroy=function(){for(;this._screenOverlays.length>0;)this._screenOverlays.pop().remove()};function Lee(e){let t=e.parent;if(l(t)){let n=t.availability;if(l(n)){let i=e.availability;l(i)?i.intersect(n):e.availability=n}}}function Fyt(e,t,n,i,o){return function(r){if(!i.contains(t.id))return;let a=!1,s=$i(r,"NetworkLinkControl",ze.kml),c=l(s),u=0;if(c){if(l($i(s,"Update",ze.kml))){_t("kml-networkLinkControl-update","KML - NetworkLinkControl updates aren't supported."),t.updating=!1,i.remove(t.id);return}t.cookie=ff(Mn(s,"cookie",ze.kml)??""),u=_i(s,"minRefreshPeriod",ze.kml)??0}let f=Q.now(),d=t.refreshMode;if(d===Ly.INTERVAL)l(s)&&(t.time=Math.max(u,t.time));else if(d===Ly.EXPIRE){let P;if(l(s)&&(P=Mn(s,"expires",ze.kml)),l(P))try{let R=Q.fromIso8601(P),B=Q.secondsDifference(R,f);B>0&&B<u&&Q.addSeconds(f,u,R),t.time=R}catch{_t("kml-networkLinkControl-expires","KML - NetworkLinkControl expires is not a valid date"),a=!0}else _t("kml-refreshMode-onExpire","KML - refreshMode of onExpire requires the NetworkLinkControl to have an expires element"),a=!0}let p=t.entity,g=e._entityCollection,m=n.values;function A(P){g.remove(P);let R=P._children,B=R.length;for(let L=0;L<B;++L)A(R[L])}g.suspendEvents();let y=g.values.slice(),x;for(x=0;x<y.length;++x){let P=y[x];P.parent===p&&(P.parent=void 0,A(P))}for(g.resumeEvents(),g.suspendEvents(),x=0;x<m.length;x++){let P=m[x];l(P.parent)||(P.parent=p,Lee(P)),g.add(P)}g.resumeEvents(),a?i.remove(t.id):t.lastUpdated=f;let b=g.computeAvailability(),C=b.start,E=b.stop,S=Q.equals(C,Qe.MINIMUM_VALUE),w=Q.equals(E,Qe.MAXIMUM_VALUE);if(!S||!w){let P=e._clock;(P.startTime!==C||P.stopTime!==E)&&(P.startTime=C,P.stopTime=E,e._changed.raiseEvent(e))}t.updating=!1,t.needsUpdate=!1,e._refresh.raiseEvent(e,o.getUrlComponent(!0))}}var Eee=new Lt;Qf.prototype.update=function(e){let t=this._networkLinks;if(t.length===0)return!0;let n=Q.now(),i=this;Eee.removeAll();function o(f){let d=f._children,p=d.length;for(let g=0;g<p;++g){let m=d[g];Eee.set(m.id,m),o(m)}}let r=!1,a=this._lastCameraView,s=this.camera;l(s)&&!(s.positionWC.equalsEpsilon(a.position,D.EPSILON7)&&s.directionWC.equalsEpsilon(a.direction,D.EPSILON7)&&s.upWC.equalsEpsilon(a.up,D.EPSILON7))&&(a.position=h.clone(s.positionWC),a.direction=h.clone(s.directionWC),a.up=h.clone(s.upWC),a.bbox=s.computeViewRectangle(),r=!0);let c=new Lt,u=!1;return t.values.forEach(function(f){let d=f.entity;if(!Eee.contains(d.id)){if(!f.updating){let p=!1;if(f.refreshMode===Ly.INTERVAL?Q.secondsDifference(n,f.lastUpdated)>f.time&&(p=!0):f.refreshMode===Ly.EXPIRE?Q.greaterThan(n,f.time)&&(p=!0):f.refreshMode===Ly.STOP&&(r&&(f.needsUpdate=!0,f.cameraUpdateTime=n),f.needsUpdate&&Q.secondsDifference(n,f.cameraUpdateTime)>=f.time&&(p=!0)),p){o(d),f.updating=!0;let g=new Vs,m=f.href.clone();m.setQueryParameters(f.cookie);let A=i._ellipsoid??te.default;Mee(m,i.camera,i.canvas,f.viewBoundScale,a.bbox,A),Bee(i,g,m,{context:d.id}).then(Fyt(i,f,g,c,m)).catch(function(y){let x=`NetworkLink ${f.href} refresh failed: ${y}`;console.log(x),i._error.raiseEvent(i,x)}),u=!0}}c.set(f.id,f)}}),u&&(this._networkLinks=c,this._changed.raiseEvent(this)),!0};function kyt(){this.author={name:void 0,uri:void 0,email:void 0},this.link={href:void 0,hreflang:void 0,rel:void 0,type:void 0,title:void 0,length:void 0},this.address=void 0,this.phoneNumber=void 0,this.snippet=void 0,this.extendedData=void 0}Qf._DeferredLoading=o0;Qf._getTimestamp=Fi;var ZC=Qf;function Jk(){_e.throwInstantiationError()}Jk.prototype.update=_e.throwInstantiationError;Jk.prototype.getBoundingSphere=_e.throwInstantiationError;Jk.prototype.isDestroyed=_e.throwInstantiationError;Jk.prototype.destroy=_e.throwInstantiationError;var Nee=Jk;var Fee=32,zyt="http://www.opengis.net/kml/2.2",Um="http://www.google.com/kml/ext/2.2",Uyt="http://www.w3.org/2000/xmlns/";function R6(e){this._files={},this._promises=[],this._count=0,this._modelCallback=e}var Vyt=/^data:image\/([^,;]+)/;R6.prototype.texture=function(e){let t=this,n;if(typeof e=="string"||e instanceof De){if(e=De.createIfNeeded(e),!e.isDataUri)return e.url;let i=e.url.match(Vyt);n=`texture_${++this._count}`,l(i)&&(n+=`.${i[1]}`);let o=e.fetchBlob().then(function(r){t._files[n]=r});return this._promises.push(o),n}if(e instanceof HTMLCanvasElement){n=`texture_${++this._count}.png`;let i=new Promise(o=>{e.toBlob(function(r){t._files[n]=r,o()})});return this._promises.push(i),n}return""};function jyt(e,t){return function(n){e._files[t]=n}}R6.prototype.model=function(e,t){let n=this._modelCallback;if(!l(n))throw new re("Encountered a model entity while exporting to KML, but no model callback was supplied.");let i={},o=n(e,t,i);for(let r in i)if(i.hasOwnProperty(r)){let a=Promise.resolve(i[r]);this._promises.push(a),a.then(jyt(this,r))}return o};Object.defineProperties(R6.prototype,{promise:{get:function(){return Promise.all(this._promises)}},files:{get:function(){return this._files}}});function O6(e){this._time=e}O6.prototype.get=function(e,t,n){let i;return l(e)&&(i=l(e.getValue)?e.getValue(this._time,n):e),i??t};O6.prototype.getColor=function(e,t){let n=this.get(e,t);if(l(n))return tT(n)};O6.prototype.getMaterialType=function(e){if(l(e))return e.getType(this._time)};function kee(){this._ids={},this._styles={},this._count=0}kee.prototype.get=function(e){let t=this._ids,n=e.innerHTML;if(l(t[n]))return t[n];let i=`style-${++this._count}`;return e.setAttribute("id",i),i=`#${i}`,t[n]=i,this._styles[n]=e,i};kee.prototype.save=function(e){let t=this._styles,n=e.childNodes[0];for(let i in t)t.hasOwnProperty(i)&&e.insertBefore(t[i],n)};function jSe(){this._ids={}}jSe.prototype.get=function(e){if(!l(e))return this.get(jn());let t=this._ids;return l(t[e])?`${e.toString()}-${++t[e]}`:(t[e]=0,e)};function zee(e){e=e??G.EMPTY_OBJECT;let t=e.entities,n=e.kmz??!1,i=zee._createState(e),o=t.values.filter(function(u){return!l(u.parent)}),r=i.kmlDoc,a=r.documentElement;a.setAttributeNS(Uyt,"xmlns:gx",Um);let s=r.createElement("Document");a.appendChild(s),HSe(i,s,o),i.styleCache.save(s);let c=i.externalFileHandler;return c.promise.then(function(){let f=new XMLSerializer().serializeToString(i.kmlDoc);return n?Gyt(f,c.files):{kml:f,externalFiles:c.files}})}async function Gyt(e,t){let n=Xt("ThirdParty/Workers/zip-web-worker.js"),i=Xt("ThirdParty/zip-module.wasm");$p({workerURI:n,wasmURI:i});let o=new Nw("application/vnd.google-earth.kmz"),r=new Vk(o);await r.add("doc.kml",new Tk(e));let a=Object.keys(t);return await GSe(r,a,t,0),await r.close(),{kmz:await o.getData()}}async function GSe(e,t,n,i){if(t.length===i)return;let o=t[i];return await e.add(o,new e0(n[o])),GSe(e,t,n,i+1)}zee._createState=function(e){let t=e.entities,n=new kee,i=t.computeAvailability(),o=l(e.time)?e.time:i.start,r=e.defaultAvailability??i,a=e.sampleDuration??60;r.start===Qe.MINIMUM_VALUE?r.stop===Qe.MAXIMUM_VALUE?r=new wn:Q.addSeconds(r.stop,-10*a,r.start):r.stop===Qe.MAXIMUM_VALUE&&Q.addSeconds(r.start,10*a,r.stop);let s=new R6(e.modelCallback);return{kmlDoc:document.implementation.createDocument(zyt,"kml"),ellipsoid:e.ellipsoid??te.default,idManager:new jSe,styleCache:n,externalFileHandler:s,time:o,valueGetter:new O6(o),sampleDuration:a,defaultAvailability:new Ta([r])}};function HSe(e,t,n){let i=e.kmlDoc,o=e.styleCache,r=e.valueGetter,a=e.idManager,s=n.length,c,u,f;for(let d=0;d<s;++d){let p=n[d];c=[],u=[],f=[],Hyt(e,p,u,f),Wyt(e,p.polyline,u,f),VSe(e,p.rectangle,u,f,c),VSe(e,p.polygon,u,f,c),Kyt(e,p,p.model,u,f);let g,m=p.availability;l(m)&&(g=i.createElement("TimeSpan"),Q.equals(m.start,Qe.MINIMUM_VALUE)||g.appendChild(An(i,"begin",Q.toIso8601(m.start))),Q.equals(m.stop,Qe.MAXIMUM_VALUE)||g.appendChild(An(i,"end",Q.toIso8601(m.stop))));for(let x=0;x<c.length;++x){let b=c[x];b.setAttribute("id",a.get(p.id)),b.appendChild(An(i,"name",p.name)),b.appendChild(An(i,"visibility",p.show)),b.appendChild(An(i,"description",p.description)),l(g)&&b.appendChild(g),t.appendChild(b)}let A=u.length;if(A>0){let x=i.createElement("Placemark");x.setAttribute("id",a.get(p.id));let b=p.name,C=p.label;if(l(C)){let S=i.createElement("LabelStyle"),w=r.get(C.text);b=l(w)&&w.length>0?w:b;let P=r.getColor(C.fillColor);l(P)&&(S.appendChild(An(i,"color",P)),S.appendChild(An(i,"colorMode","normal")));let R=r.get(C.scale);l(R)&&S.appendChild(An(i,"scale",R)),f.push(S)}x.appendChild(An(i,"name",b)),x.appendChild(An(i,"visibility",p.show)),x.appendChild(An(i,"description",p.description)),l(g)&&x.appendChild(g),t.appendChild(x);let E=f.length;if(E>0){let S=i.createElement("Style");for(let w=0;w<E;++w)S.appendChild(f[w]);x.appendChild(An(i,"styleUrl",o.get(S)))}if(u.length===1)x.appendChild(u[0]);else if(u.length>1){let S=i.createElement("MultiGeometry");for(let w=0;w<A;++w)S.appendChild(u[w]);x.appendChild(S)}}let y=p._children;if(y.length>0){let x=i.createElement("Folder");x.setAttribute("id",a.get(p.id)),x.appendChild(An(i,"name",p.name)),x.appendChild(An(i,"visibility",p.show)),x.appendChild(An(i,"description",p.description)),t.appendChild(x),HSe(e,x,y)}}}var Ku=new h,fu=new de,zm=new Q;function Hyt(e,t,n,i){let o=e.kmlDoc,r=e.ellipsoid,a=e.valueGetter,s=t.billboard??t.point;if(!l(s)&&!l(t.path))return;let c=t.position;if(!c.isConstant){WSe(e,t,s,n,i);return}a.get(c,void 0,Ku);let u=An(o,"coordinates",eT(Ku,r)),f=o.createElement("Point"),d=o.createElement("altitudeMode");d.appendChild(nT(e,s.heightReference)),f.appendChild(d),f.appendChild(u),n.push(f);let p=s instanceof Jc?YSe(e,s):qSe(e,s);i.push(p)}function WSe(e,t,n,i,o){let r=e.kmlDoc,a=e.ellipsoid,s=e.valueGetter,c,u=t.position,f=!0;u instanceof cc?(c=u.intervals,f=!1):c=t.availability??e.defaultAvailability;let d=n instanceof J0,p,g,m,A=[];for(p=0;p<c.length;++p){let x=c.get(p),b=f?u:x.data,C=r.createElement("altitudeMode");b instanceof Hp?(b=b._value,C.appendChild(nT(e,nt.CLAMP_TO_GROUND))):l(n)?C.appendChild(nT(e,n.heightReference)):C.appendChild(nT(e,nt.NONE));let E=[],S=[];if(b.isConstant){s.get(b,void 0,Ku);let P=An(r,"coordinates",eT(Ku,a));E.push(Q.toIso8601(x.start)),S.push(P),E.push(Q.toIso8601(x.stop)),S.push(P)}else if(b instanceof uc)for(m=b._property._times,g=0;g<m.length;++g)E.push(Q.toIso8601(m[g])),b.getValueInReferenceFrame(m[g],Bi.FIXED,Ku),S.push(eT(Ku,a));else if(b instanceof kf){m=b._times;let P=b._values;for(g=0;g<m.length;++g)E.push(Q.toIso8601(m[g])),h.fromArray(P,g*3,Ku),S.push(eT(Ku,a))}else{let P=e.sampleDuration;x.start.clone(zm),x.isStartIncluded||Q.addSeconds(zm,P,zm);let R=x.stop;for(;Q.lessThan(zm,R);)b.getValue(zm,Ku),E.push(Q.toIso8601(zm)),S.push(eT(Ku,a)),Q.addSeconds(zm,P,zm);x.isStopIncluded&&Q.equals(zm,R)&&(b.getValue(zm,Ku),E.push(Q.toIso8601(zm)),S.push(eT(Ku,a)))}let w=r.createElementNS(Um,"Track");w.appendChild(C);for(let P=0;P<E.length;++P){let R=An(r,"when",E[P]),B=An(r,"coord",S[P],Um);w.appendChild(R),w.appendChild(B)}d&&w.appendChild(XSe(e,n)),A.push(w)}if(A.length===1)i.push(A[0]);else if(A.length>1){let x=r.createElementNS(Um,"MultiTrack");for(p=0;p<A.length;++p)x.appendChild(A[p]);i.push(x)}if(l(n)&&!d){let x=n instanceof Jc?YSe(e,n):qSe(e,n);o.push(x)}let y=t.path;if(l(y)){let x=s.get(y.width),b=y.material;if(l(b)||l(x)){let C=r.createElement("LineStyle");l(x)&&C.appendChild(An(r,"width",x)),Uee(e,b,C),o.push(C)}}}function qSe(e,t){let n=e.kmlDoc,i=e.valueGetter,o=n.createElement("IconStyle"),r=i.getColor(t.color);l(r)&&(o.appendChild(An(n,"color",r)),o.appendChild(An(n,"colorMode","normal")));let a=i.get(t.pixelSize);return l(a)&&o.appendChild(An(n,"scale",a/Fee)),o}function YSe(e,t){let n=e.kmlDoc,i=e.valueGetter,o=e.externalFileHandler,r=n.createElement("IconStyle"),a=i.get(t.image);if(l(a)){a=o.texture(a);let p=n.createElement("Icon");p.appendChild(An(n,"href",a));let g=i.get(t.imageSubRegion);l(g)&&(p.appendChild(An(n,"x",g.x,Um)),p.appendChild(An(n,"y",g.y,Um)),p.appendChild(An(n,"w",g.width,Um)),p.appendChild(An(n,"h",g.height,Um))),r.appendChild(p)}let s=i.getColor(t.color);l(s)&&(r.appendChild(An(n,"color",s)),r.appendChild(An(n,"colorMode","normal")));let c=i.get(t.scale);l(c)&&r.appendChild(An(n,"scale",c));let u=i.get(t.pixelOffset);if(l(u)){c=c??1,z.divideByScalar(u,c,u);let p=i.get(t.width,Fee),g=i.get(t.height,Fee),m=i.get(t.horizontalOrigin,Oi.CENTER);m===Oi.CENTER?u.x-=p*.5:m===Oi.RIGHT&&(u.x-=p);let A=i.get(t.verticalOrigin,zn.CENTER);A===zn.TOP?u.y+=g:A===zn.CENTER&&(u.y+=g*.5);let y=n.createElement("hotSpot");y.setAttribute("x",-u.x),y.setAttribute("y",u.y),y.setAttribute("xunits","pixels"),y.setAttribute("yunits","pixels"),r.appendChild(y)}let f=i.get(t.rotation),d=i.get(t.alignedAxis);return l(f)&&h.equals(h.UNIT_Z,d)&&(f=D.toDegrees(-f),f===0&&(f=360),r.appendChild(An(n,"heading",f))),r}function Wyt(e,t,n,i){let o=e.kmlDoc,r=e.ellipsoid,a=e.valueGetter;if(!l(t))return;let s=o.createElement("LineString"),c=o.createElement("altitudeMode"),u=a.get(t.clampToGround,!1),f;u?(s.appendChild(An(o,"tessellate",!0)),f=o.createTextNode("clampToGround")):f=o.createTextNode("absolute"),c.appendChild(f),s.appendChild(c);let d=t.positions,p=a.get(d),g=An(o,"coordinates",eT(p,r));s.appendChild(g);let m=a.get(t.zIndex);u&&l(m)&&s.appendChild(An(o,"drawOrder",m,Um)),n.push(s);let A=o.createElement("LineStyle"),y=a.get(t.width);l(y)&&A.appendChild(An(o,"width",y)),Uee(e,t.material,A),i.push(A)}function qyt(e,t,n){let i=e.kmlDoc,o=e.valueGetter,r=o.get(t.height,0);n>0&&(r=n);let a=t.coordinates,s=o.get(a),c=[],u=[oe.northeast,oe.southeast,oe.southwest,oe.northwest];for(let g=0;g<4;++g)u[g](s,fu),c.push(`${D.toDegrees(fu.longitude)},${D.toDegrees(fu.latitude)},${r}`);let f=An(i,"coordinates",c.join(" ")),d=i.createElement("outerBoundaryIs"),p=i.createElement("LinearRing");return p.appendChild(f),d.appendChild(p),[d]}function USe(e,t,n,i){let o=e.kmlDoc,r=e.ellipsoid,a=[],s=t.length;for(let f=0;f<s;++f)de.fromCartesian(t[f],r,fu),a.push(`${D.toDegrees(fu.longitude)},${D.toDegrees(fu.latitude)},${i?fu.height:n}`);let c=An(o,"coordinates",a.join(" ")),u=o.createElement("LinearRing");return u.appendChild(c),u}function Yyt(e,t,n){let i=e.kmlDoc,o=e.valueGetter,r=o.get(t.height,0),a=o.get(t.perPositionHeight,!1);!a&&n>0&&(r=n);let s=[],c=t.hierarchy,u=o.get(c),f=Array.isArray(u)?u:u.positions,d=i.createElement("outerBoundaryIs");d.appendChild(USe(e,f,r,a)),s.push(d);let p=u.holes;if(l(p)){let g=p.length;for(let m=0;m<g;++m){let A=i.createElement("innerBoundaryIs");A.appendChild(USe(e,p[m].positions,r,a)),s.push(A)}}return s}function VSe(e,t,n,i,o){let r=e.kmlDoc,a=e.valueGetter;if(!l(t))return;let s=t instanceof Vh;if(s&&a.getMaterialType(t.material)==="Image"){Xyt(e,t,o);return}let c=r.createElement("Polygon"),u=a.get(t.extrudedHeight,0);u>0&&c.appendChild(An(r,"extrude",!0));let f=s?qyt(e,t,u):Yyt(e,t,u),d=f.length;for(let y=0;y<d;++y)c.appendChild(f[y]);let p=r.createElement("altitudeMode");p.appendChild(nT(e,t.heightReference)),c.appendChild(p),n.push(c);let g=r.createElement("PolyStyle"),m=a.get(t.fill,!1);m&&g.appendChild(An(r,"fill",m)),Uee(e,t.material,g);let A=a.get(t.outline,!1);if(A){g.appendChild(An(r,"outline",A));let y=r.createElement("LineStyle"),x=a.get(t.outlineWidth,1);y.appendChild(An(r,"width",x));let b=a.getColor(t.outlineColor,V.BLACK);y.appendChild(An(r,"color",b)),y.appendChild(An(r,"colorMode","normal")),i.push(y)}i.push(g)}function Xyt(e,t,n){let i=e.kmlDoc,o=e.valueGetter,r=e.externalFileHandler,a=i.createElement("GroundOverlay"),s=i.createElement("altitudeMode");s.appendChild(nT(e,t.heightReference)),a.appendChild(s);let c=o.get(t.height);l(c)&&a.appendChild(An(i,"altitude",c));let u=o.get(t.coordinates),f=i.createElement("LatLonBox");f.appendChild(An(i,"north",D.toDegrees(u.north))),f.appendChild(An(i,"south",D.toDegrees(u.south))),f.appendChild(An(i,"east",D.toDegrees(u.east))),f.appendChild(An(i,"west",D.toDegrees(u.west))),a.appendChild(f);let d=o.get(t.material),p=r.texture(d.image),g=i.createElement("Icon");g.appendChild(An(i,"href",p)),a.appendChild(g);let m=d.color;l(m)&&a.appendChild(An(i,"color",tT(d.color))),n.push(a)}function XSe(e,t){let n=e.kmlDoc,i=e.valueGetter,o=e.externalFileHandler,r=n.createElement("Model"),a=i.get(t.scale);if(l(a)){let u=n.createElement("scale");u.appendChild(An(n,"x",a)),u.appendChild(An(n,"y",a)),u.appendChild(An(n,"z",a)),r.appendChild(u)}let s=n.createElement("Link"),c=o.model(t,e.time);return s.appendChild(An(n,"href",c)),r.appendChild(s),r}function Kyt(e,t,n,i,o){let r=e.kmlDoc,a=e.ellipsoid,s=e.valueGetter;if(!l(n))return;let c=t.position;if(!c.isConstant){WSe(e,t,n,i,o);return}let u=XSe(e,n),f=r.createElement("altitudeMode");f.appendChild(nT(e,n.heightReference)),u.appendChild(f),s.get(c,void 0,Ku),de.fromCartesian(Ku,a,fu);let d=r.createElement("Location");d.appendChild(An(r,"longitude",D.toDegrees(fu.longitude))),d.appendChild(An(r,"latitude",D.toDegrees(fu.latitude))),d.appendChild(An(r,"altitude",fu.height)),u.appendChild(d),i.push(u)}function Uee(e,t,n){let i=e.kmlDoc,o=e.valueGetter;if(!l(t))return;let r=o.get(t);if(!l(r))return;let a,s=o.getMaterialType(t),c,u;switch(s){case"Image":a=tT(V.WHITE);break;case"Color":case"Grid":case"PolylineGlow":case"PolylineArrow":case"PolylineDash":a=tT(r.color);break;case"PolylineOutline":a=tT(r.color),c=tT(r.outlineColor),u=r.outlineWidth,n.appendChild(An(i,"outerColor",c,Um)),n.appendChild(An(i,"outerWidth",u,Um));break;case"Stripe":a=tT(r.oddColor);break}l(a)&&(n.appendChild(An(i,"color",a)),n.appendChild(An(i,"colorMode","normal")))}function nT(e,t){let n=e.kmlDoc,o=e.valueGetter.get(t,nt.NONE),r;switch(o){case nt.NONE:r=n.createTextNode("absolute");break;case nt.CLAMP_TO_GROUND:r=n.createTextNode("clampToGround");break;case nt.RELATIVE_TO_GROUND:r=n.createTextNode("relativeToGround");break}return r}function eT(e,t){Array.isArray(e)||(e=[e]);let n=e.length,i=[];for(let o=0;o<n;++o)de.fromCartesian(e[o],t,fu),i.push(`${D.toDegrees(fu.longitude)},${D.toDegrees(fu.latitude)},${fu.height}`);return i.join(" ")}function An(e,t,n,i){n=n??"",typeof n=="boolean"&&(n=n?"1":"0");let o=l(i)?e.createElementNS(i,t):e.createElement(t),r=n==="string"&&n.indexOf("<")!==-1?e.createCDATASection(n):e.createTextNode(n);return o.appendChild(r),o}function tT(e){let t="",n=e.toBytes();for(let i=3;i>=0;--i)t+=n[i]<16?`0${n[i].toString(16)}`:n[i].toString(16);return t}var Vee=zee;async function Qyt(e,t,n,i){return l(i)||(i=!1),Zyt(e,t,n,i)}function $yt(e,t,n){let i=e[0],o=i.terrainProvider.requestTileGeometry(i.x,i.y,i.level);if(!o)return!1;let r;return n?r=o.then(QSe(i)):r=o.then(QSe(i)).catch(ext(i)),e.shift(),t.push(r),!0}function Jyt(e){return new Promise(function(t){setTimeout(t,e)})}function jee(e,t,n){return e.length?$yt(e,t,n)?jee(e,t,n):Jyt(100).then(()=>jee(e,t,n)):Promise.resolve()}function Zyt(e,t,n,i){let o=e.tilingScheme,r,a=[],s={};for(r=0;r<n.length;++r){let u=o.positionToTileXY(n[r],t);if(!l(u))continue;let f=u.toString();if(!s.hasOwnProperty(f)){let d={x:u.x,y:u.y,level:t,tilingScheme:o,terrainProvider:e,positions:[]};s[f]=d,a.push(d)}s[f].positions.push(n[r])}let c=[];return jee(a,c,i).then(function(){return Promise.all(c).then(function(){return n})})}function KSe(e,t,n){let i=t.interpolateHeight(n,e.longitude,e.latitude);return i===void 0?!1:(e.height=i,!0)}function QSe(e){let t=e.positions,n=e.tilingScheme.tileXYToRectangle(e.x,e.y,e.level);return function(i){let o=!1;for(let r=0;r<t.length;++r){let a=t[r];if(!KSe(a,i,n)){o=!0;break}}return o?i.createMesh({tilingScheme:e.tilingScheme,x:e.x,y:e.y,level:e.level,throttle:!1}).then(function(){for(let r=0;r<t.length;++r){let a=t[r];KSe(a,i,n)}}):Promise.resolve()}}function ext(e){let t=e.positions;return function(){for(let n=0;n<t.length;++n){let i=t[n];i.height=void 0}}}var Zk=Qyt;var Gee=new z;async function $Se(e,t,n){l(n)||(n=!1);let i=[],o=[],r=e.availability,a=[];for(let c=0;c<t.length;++c){let u=t[c],f=r.computeMaximumLevelAtPosition(u);if(o[c]=f,f===0){e.tilingScheme.positionToTileXY(u,1,Gee);let p=e.loadTileDataAvailability(Gee.x,Gee.y,1);l(p)&&a.push(p)}let d=i[f];l(d)||(i[f]=d=[]),d.push(u)}await Promise.all(a),await Promise.all(i.map(function(c,u){if(l(c))return Zk(e,u,c,n)}));let s=[];for(let c=0;c<t.length;++c){let u=t[c];r.computeMaximumLevelAtPosition(u)!==o[c]&&s.push(u)}return s.length>0&&await $Se(e,s,n),t}var iT=$Se;async function Hee(e,t){let n=t.terrainProvider,i=t.mapProjection,o=i.ellipsoid,r,a=t.camera.getRectangleCameraCoordinates(e);if(t.mode===ie.SCENE3D?r=o.cartesianToCartographic(a):r=i.unproject(a),!l(n))return r;let s=n.availability;if(!l(s)||t.mode===ie.SCENE2D)return r;let c=[oe.center(e),oe.southeast(e),oe.southwest(e),oe.northeast(e),oe.northwest(e)],u=await Hee._sampleTerrainMostDetailed(n,c),f=!1,d=u.reduce(function(g,m){return l(m.height)?(f=!0,Math.max(m.height,g)):g},-Number.MAX_VALUE),p=r;return f&&(p.height+=d),p}Hee._sampleTerrainMostDetailed=iT;var oT=Hee;var JSe={NONE:0,LERC:1};Object.freeze(JSe);var sh=JSe;var ZSe={NONE:0,BITS12:1};Object.freeze(ZSe);var Ws=ZSe;var e3=new h,txt=new h,ch=new z,nxt=new M,ixt=new M,oxt=Math.pow(2,12);function Fc(e,t,n,i,o,r,a,s,c,u){let f=Ws.NONE,d,p;if(l(t)&&l(n)&&l(i)&&l(o)){let g=t.minimum,m=t.maximum,A=h.subtract(m,g,txt),y=i-n;Math.max(h.maximumComponent(A),y)<oxt-1?f=Ws.BITS12:f=Ws.NONE;let b=M.fromScale(A,nxt);b=M.setTranslation(b,g,b);let C=M.fromScale(h.fromElements(1/A.x,1/A.y,1/A.z,e3),ixt);C=M.multiplyByTranslation(C,h.negate(g,e3),C),p=M.clone(o,new M);let E=M.getTranslation(o,e3);E=h.subtract(E,e,e3),p=M.setTranslation(p,E,p),p=M.multiply(p,b,p),d=M.inverseTransformation(o,new M),d=M.multiply(C,d,d),o=M.multiply(o,b,new M)}this.quantization=f,this.minimumHeight=n,this.maximumHeight=i,this.center=h.clone(e),this.toScaledENU=d,this.fromScaledENU=o,this.matrix=p,this.hasVertexNormals=r??!1,this.hasWebMercatorT=a??!1,this.hasGeodeticSurfaceNormals=s??!1,this.exaggeration=c??1,this.exaggerationRelativeHeight=u??0,this.stride=0,this._offsetGeodeticSurfaceNormal=0,this._offsetVertexNormal=0,this._calculateStrideAndOffsets()}Fc.prototype.encode=function(e,t,n,i,o,r,a,s){let c=i.x,u=i.y;if(this.quantization===Ws.BITS12){n=M.multiplyByPoint(this.toScaledENU,n,e3),n.x=D.clamp(n.x,0,1),n.y=D.clamp(n.y,0,1),n.z=D.clamp(n.z,0,1);let f=this.maximumHeight-this.minimumHeight,d=D.clamp((o-this.minimumHeight)/f,0,1);z.fromElements(n.x,n.y,ch);let p=nn.compressTextureCoordinates(ch);z.fromElements(n.z,d,ch);let g=nn.compressTextureCoordinates(ch);z.fromElements(c,u,ch);let m=nn.compressTextureCoordinates(ch);if(e[t++]=p,e[t++]=g,e[t++]=m,this.hasWebMercatorT){z.fromElements(a,0,ch);let A=nn.compressTextureCoordinates(ch);e[t++]=A}}else e[t++]=n.x-this.center.x,e[t++]=n.y-this.center.y,e[t++]=n.z-this.center.z,e[t++]=o,e[t++]=c,e[t++]=u,this.hasWebMercatorT&&(e[t++]=a);return this.hasVertexNormals&&(e[t++]=nn.octPackFloat(r)),this.hasGeodeticSurfaceNormals&&(e[t++]=s.x,e[t++]=s.y,e[t++]=s.z),t};var rxt=new h,ewe=new h;Fc.prototype.addGeodeticSurfaceNormals=function(e,t,n){if(this.hasGeodeticSurfaceNormals)return;let i=this.stride,o=e.length/i;this.hasGeodeticSurfaceNormals=!0,this._calculateStrideAndOffsets();let r=this.stride;for(let a=0;a<o;a++){for(let f=0;f<i;f++){let d=a*i+f,p=a*r+f;t[p]=e[d]}let s=this.decodePosition(t,a,rxt),c=n.geodeticSurfaceNormal(s,ewe),u=a*r+this._offsetGeodeticSurfaceNormal;t[u]=c.x,t[u+1]=c.y,t[u+2]=c.z}};Fc.prototype.removeGeodeticSurfaceNormals=function(e,t){if(!this.hasGeodeticSurfaceNormals)return;let n=this.stride,i=e.length/n;this.hasGeodeticSurfaceNormals=!1,this._calculateStrideAndOffsets();let o=this.stride;for(let r=0;r<i;r++)for(let a=0;a<o;a++){let s=r*n+a,c=r*o+a;t[c]=e[s]}};Fc.prototype.decodePosition=function(e,t,n){if(l(n)||(n=new h),t*=this.stride,this.quantization===Ws.BITS12){let i=nn.decompressTextureCoordinates(e[t],ch);n.x=i.x,n.y=i.y;let o=nn.decompressTextureCoordinates(e[t+1],ch);return n.z=o.x,M.multiplyByPoint(this.fromScaledENU,n,n)}return n.x=e[t],n.y=e[t+1],n.z=e[t+2],h.add(n,this.center,n)};Fc.prototype.getExaggeratedPosition=function(e,t,n){n=this.decodePosition(e,t,n);let i=this.exaggeration,o=this.exaggerationRelativeHeight;if(i!==1&&this.hasGeodeticSurfaceNormals){let a=this.decodeGeodeticSurfaceNormal(e,t,ewe),s=this.decodeHeight(e,t),c=so.getHeight(s,i,o)-s;n.x+=a.x*c,n.y+=a.y*c,n.z+=a.z*c}return n};Fc.prototype.decodeTextureCoordinates=function(e,t,n){return l(n)||(n=new z),t*=this.stride,this.quantization===Ws.BITS12?nn.decompressTextureCoordinates(e[t+2],n):z.fromElements(e[t+4],e[t+5],n)};Fc.prototype.decodeHeight=function(e,t){return t*=this.stride,this.quantization===Ws.BITS12?nn.decompressTextureCoordinates(e[t+1],ch).y*(this.maximumHeight-this.minimumHeight)+this.minimumHeight:e[t+3]};Fc.prototype.decodeWebMercatorT=function(e,t){return t*=this.stride,this.quantization===Ws.BITS12?nn.decompressTextureCoordinates(e[t+3],ch).x:e[t+6]};Fc.prototype.getOctEncodedNormal=function(e,t,n){t=t*this.stride+this._offsetVertexNormal;let i=e[t]/256,o=Math.floor(i),r=(i-o)*256;return z.fromElements(o,r,n)};Fc.prototype.decodeNormal=function(e,t,n){let i=t=t*this.stride+this._offsetVertexNormal;return nn.octDecodeFloat(e[i],n)};Fc.prototype.decodeGeodeticSurfaceNormal=function(e,t,n){return t=t*this.stride+this._offsetGeodeticSurfaceNormal,n.x=e[t],n.y=e[t+1],n.z=e[t+2],n};Fc.prototype._calculateStrideAndOffsets=function(){let e=0;this.quantization===Ws.BITS12?e+=3:e+=6,this.hasWebMercatorT&&(e+=1),this.hasVertexNormals&&(this._offsetVertexNormal=e,e+=1),this.hasGeodeticSurfaceNormals&&(this._offsetGeodeticSurfaceNormal=e,e+=3),this.stride=e};var M6={position3DAndHeight:0,textureCoordAndEncodedNormals:1,geodeticSurfaceNormal:2},B6={compressed0:0,compressed1:1,geodeticSurfaceNormal:2};Fc.prototype.getAttributes=function(e){let t=Y.FLOAT,n=Y.getSizeInBytes(t),i=this.stride*n,o=0,r=[];function a(s,c){r.push({index:s,vertexBuffer:e,componentDatatype:t,componentsPerAttribute:c,offsetInBytes:o,strideInBytes:i}),o+=c*n}if(this.quantization===Ws.NONE){a(M6.position3DAndHeight,4);let s=2;s+=this.hasWebMercatorT?1:0,s+=this.hasVertexNormals?1:0,a(M6.textureCoordAndEncodedNormals,s),this.hasGeodeticSurfaceNormals&&a(M6.geodeticSurfaceNormal,3)}else{let s=this.hasWebMercatorT||this.hasVertexNormals,c=this.hasWebMercatorT&&this.hasVertexNormals;a(B6.compressed0,s?4:3),c&&a(B6.compressed1,1),this.hasGeodeticSurfaceNormals&&a(B6.geodeticSurfaceNormal,3)}return r};Fc.prototype.getAttributeLocations=function(){return this.quantization===Ws.NONE?M6:B6};Fc.clone=function(e,t){if(l(e))return l(t)||(t=new Fc),t.quantization=e.quantization,t.minimumHeight=e.minimumHeight,t.maximumHeight=e.maximumHeight,t.center=h.clone(e.center),t.toScaledENU=M.clone(e.toScaledENU),t.fromScaledENU=M.clone(e.fromScaledENU),t.matrix=M.clone(e.matrix),t.hasVertexNormals=e.hasVertexNormals,t.hasWebMercatorT=e.hasWebMercatorT,t.hasGeodeticSurfaceNormals=e.hasGeodeticSurfaceNormals,t.exaggeration=e.exaggeration,t.exaggerationRelativeHeight=e.exaggerationRelativeHeight,t._calculateStrideAndOffsets(),t};var dr=Fc;var r0={};r0.DEFAULT_STRUCTURE=Object.freeze({heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1});var Wee=new h,axt=new M,sxt=new h,cxt=new h;r0.computeVertices=function(e){let t=Math.cos,n=Math.sin,i=Math.sqrt,o=Math.atan,r=Math.exp,a=D.PI_OVER_TWO,s=D.toRadians,c=e.heightmap,u=e.width,f=e.height,d=e.skirtHeight,p=d>0,g=e.isGeographic??!0,m=e.ellipsoid??te.default,A=1/m.maximumRadius,y=oe.clone(e.nativeRectangle),x=oe.clone(e.rectangle),b,C,E,S;l(x)?(b=x.west,C=x.south,E=x.east,S=x.north):g?(b=s(y.west),C=s(y.south),E=s(y.east),S=s(y.north)):(b=y.west*A,C=a-2*o(r(-y.south*A)),E=y.east*A,S=a-2*o(r(-y.north*A)));let w=e.relativeToCenter,P=l(w);w=P?w:h.ZERO;let R=e.includeWebMercatorT??!1,B=e.exaggeration??1,L=e.exaggerationRelativeHeight??0,T=B!==1,v=e.structure??r0.DEFAULT_STRUCTURE,I=v.heightScale??r0.DEFAULT_STRUCTURE.heightScale,O=v.heightOffset??r0.DEFAULT_STRUCTURE.heightOffset,N=v.elementsPerHeight??r0.DEFAULT_STRUCTURE.elementsPerHeight,j=v.stride??r0.DEFAULT_STRUCTURE.stride,k=v.elementMultiplier??r0.DEFAULT_STRUCTURE.elementMultiplier,U=v.isBigEndian??r0.DEFAULT_STRUCTURE.isBigEndian,F=oe.computeWidth(y),H=oe.computeHeight(y),q=F/(u-1),J=H/(f-1);g||(F*=A,H*=A);let W=m.radiiSquared,Z=W.x,K=W.y,le=W.z,me=65536,ae=-65536,be=pt.eastNorthUpToFixedFrame(w,m),ge=M.inverseTransformation(be,axt),we,Ee;R&&(we=li.geodeticLatitudeToMercatorAngle(C),Ee=1/(li.geodeticLatitudeToMercatorAngle(S)-we));let Be=sxt;Be.x=Number.POSITIVE_INFINITY,Be.y=Number.POSITIVE_INFINITY,Be.z=Number.POSITIVE_INFINITY;let ke=cxt;ke.x=Number.NEGATIVE_INFINITY,ke.y=Number.NEGATIVE_INFINITY,ke.z=Number.NEGATIVE_INFINITY;let Ge=Number.POSITIVE_INFINITY,rt=u*f,et=d>0?u*2+f*2:0,Pe=rt+et,Ye=new Array(Pe),ut=new Array(Pe),Tt=new Array(Pe),tn=R?new Array(Pe):[],Ht=T?new Array(Pe):[],xt=0,Pt=f,bn=0,at=u;p&&(--xt,++Pt,--bn,++at);let st=1e-5;for(let Kn=xt;Kn<Pt;++Kn){let cn=Kn;cn<0&&(cn=0),cn>=f&&(cn=f-1);let Jn=y.north-J*cn;g?Jn=s(Jn):Jn=a-2*o(r(-Jn*A));let Pr=(Jn-C)/(S-C);Pr=D.clamp(Pr,0,1);let Da=Kn===xt,rs=Kn===Pt-1;d>0&&(Da?Jn+=st*H:rs&&(Jn-=st*H));let Ga=t(Jn),as=n(Jn),pr=le*as,ri;R&&(ri=(li.geodeticLatitudeToMercatorAngle(Jn)-we)*Ee);for(let Gr=bn;Gr<at;++Gr){let Po=Gr;Po<0&&(Po=0),Po>=u&&(Po=u-1);let Ri=cn*(u*j)+Po*j,ui;if(N===1)ui=c[Ri];else{ui=0;let Co;if(U)for(Co=0;Co<N;++Co)ui=ui*k+c[Ri+Co];else for(Co=N-1;Co>=0;--Co)ui=ui*k+c[Ri+Co]}ui=ui*I+O,ae=Math.max(ae,ui),me=Math.min(me,ui);let Lo=y.west+q*Po;g?Lo=s(Lo):Lo=Lo*A;let bc=(Lo-b)/(E-b);bc=D.clamp(bc,0,1);let sa=cn*u+Po;if(d>0){let Co=Gr===bn,Ha=Gr===at-1,H_=Da||rs||Co||Ha;if((Da||rs)&&(Co||Ha))continue;H_&&(ui-=d,Co?(sa=rt+(f-cn-1),Lo-=st*F):rs?sa=rt+f+(u-Po-1):Ha?(sa=rt+f+u+cn,Lo+=st*F):Da&&(sa=rt+f+u+f+Po))}let cf=Ga*t(Lo),Ks=Ga*n(Lo),G_=Z*cf,Xo=K*Ks,Ch=1/i(G_*cf+Xo*Ks+pr*as),Hr=G_*Ch,Vc=Xo*Ch,jc=pr*Ch,Cc=new h;Cc.x=Hr+cf*ui,Cc.y=Vc+Ks*ui,Cc.z=jc+as*ui,M.multiplyByPoint(ge,Cc,Wee),h.minimumByComponent(Wee,Be,Be),h.maximumByComponent(Wee,ke,ke),Ge=Math.min(Ge,ui),Ye[sa]=Cc,Tt[sa]=new z(bc,Pr),ut[sa]=ui,R&&(tn[sa]=ri),T&&(Ht[sa]=m.geodeticSurfaceNormal(Cc))}}let Ln=ce.fromPoints(Ye),Nn;l(x)&&(Nn=Qt.fromRectangle(x,me,ae,m));let uo;P&&(uo=new bm(m).computeHorizonCullingPointPossiblyUnderEllipsoid(w,Ye,me));let Yo=new gf(Be,ke,w),oo=new dr(w,Yo,Ge,ae,be,!1,R,T,B,L),ro=new Float32Array(Pe*oo.stride),Xn=0;for(let Kn=0;Kn<Pe;++Kn)Xn=oo.encode(ro,Xn,Ye[Kn],Tt[Kn],ut[Kn],void 0,tn[Kn],Ht[Kn]);return{vertices:ro,maximumHeight:ae,minimumHeight:me,encoding:oo,boundingSphere3D:Ln,orientedBoundingBox:Nn,occludeePointInScaledSpace:uo}};var qw=r0;function Ny(){_e.throwInstantiationError()}Object.defineProperties(Ny.prototype,{credits:{get:_e.throwInstantiationError},waterMask:{get:_e.throwInstantiationError}});Ny.prototype.interpolateHeight=_e.throwInstantiationError;Ny.prototype.isChildAvailable=_e.throwInstantiationError;Ny.prototype.createMesh=_e.throwInstantiationError;Ny.prototype.upsample=_e.throwInstantiationError;Ny.prototype.wasCreatedByUpsampling=_e.throwInstantiationError;Ny.maximumAsynchronousTasks=5;var Qu=Ny;var lxt=3;function Xee(e,t,n){this._vertices=e,this._indices=t,this._encoding=n,this._inverseTransform=new M,this._needsRebuild=!0,this._rootNode=new Yee}var uxt=new Gn("incrementallyBuildTerrainPicker");Object.defineProperties(Xee.prototype,{needsRebuild:{get:function(){return this._needsRebuild},set:function(e){this._needsRebuild=e}}});function Yee(){this.x=0,this.y=0,this.level=0,this.aabb=twe(this.x,this.y,this.level),this.intersectingTriangles=new Uint32Array(0),this.children=[],this.buildingChildren=!1}Yee.prototype.addChild=function(e){let t=new Yee;t.x=this.x*2+(e&1),t.y=this.y*2+(e>>1&1),t.level=this.level+1,t.aabb=twe(t.x,t.y,t.level),this.children[e]=t};var fxt=new gn,L6=[new h,new h,new h];Xee.prototype.rayIntersect=function(e,t,n,i,o){this._needsRebuild&&dxt(this,t);let r=this._inverseTransform,a=fxt;a.origin=M.multiplyByPoint(r,e.origin,a.origin),a.direction=M.multiplyByPointAsVector(r,e.direction,a.direction);let s=[];return nwe(this._rootNode,a,s),_xt(this,s,e,n,i,o)};function dxt(e,t){M.inverse(t,e._inverseTransform),e._needsRebuild=!1;let n=e._indices.length/3,i=new Uint32Array(n);for(let o=0;o<n;++o)i[o]=o;e._rootNode.intersectingTriangles=i,e._rootNode.children.length=0}var hxt=new h,mxt=new h;function twe(e,t,n){let i=1/Math.pow(2,n),o=h.fromElements(e*i-.5,t*i-.5,-.5,hxt),r=h.fromElements((e+1)*i-.5,(t+1)*i-.5,.5,mxt);return gf.fromCorners(o,r)}function pxt(e,t,n,i,o){h.pack(n[0],e,9*o),h.pack(n[1],e,9*o+3),h.pack(n[2],e,9*o+6),t[o]=i}var gxt=new Qr;function nwe(e,t,n){let i=si.rayAxisAlignedBoundingBox(t,e.aabb,gxt);if(!l(i))return;if(!e.children.length||e.buildingChildren){n.push({node:e,interval:new Qr(i.start,i.stop)});return}for(let r=0;r<e.children.length;r++)nwe(e.children[r],t,n)}function _xt(e,t,n,i,o,r){let a=t.sort(function(c,u){return c.interval.start-u.interval.start}),s=Number.MAX_VALUE;for(let c=0;c<a.length;c++){let u=a[c],f=Axt(e,n,u.node,i,o,r);if(s=Math.min(f,s),s!==Number.MAX_VALUE)break}if(s!==Number.MAX_VALUE)return gn.getPoint(n,s)}function Axt(e,t,n,i,o,r){let a=Number.MAX_VALUE,s=e._encoding,c=e._indices,u=e._vertices,f=n.intersectingTriangles.length,p=!(n.level>=lxt)&&!n.buildingChildren,g,m;p&&(g=new Float64Array(f*9),m=new Uint32Array(f));for(let A=0;A<f;A++){let y=n.intersectingTriangles[A],x=qee(s,o,r,t,u,c[3*y],L6[0]),b=qee(s,o,r,t,u,c[3*y+1],L6[1]),C=qee(s,o,r,t,u,c[3*y+2],L6[2]),E=si.rayTriangleParametric(t,x,b,C,i);l(E)&&E<a&&E>=0&&(a=E),p&&pxt(g,m,L6,y,A)}if(p){for(let A=0;A<4;A++)n.addChild(A);xxt(e._inverseTransform,n,m,g)}return a}var yxt=new de;function qee(e,t,n,i,o,r,a){let s=e.getExaggeratedPosition(o,r,a);if(t===ie.SCENE3D)return s;let u=n.ellipsoid.cartesianToCartographic(s,yxt);s=n.project(u,a),s=h.fromElements(s.z,s.x,s.y,a);let f=D.TWO_PI*n.ellipsoid.maximumRadius,d=Math.round((i.origin.y-s.y)/f);return s.y+=d*f,s}async function xxt(e,t,n,i){t.buildingChildren=!0;let o=new Float64Array(16);M.pack(e,o,0);let r=new Float64Array(24);for(let f=0;f<4;f++)h.pack(t.children[f].aabb.minimum,r,f*6),h.pack(t.children[f].aabb.maximum,r,f*6+3);let a={aabbs:r,inverseTransform:o,triangleIndices:n,trianglePositions:i},s=[r.buffer,o.buffer,n.buffer,i.buffer],c=uxt.scheduleTask(a,s);if(!l(c)){t.buildingChildren=!1;return}(await c).intersectingTrianglesArrays.forEach((f,d)=>{l(t.children[d])&&(t.children[d].intersectingTriangles=new Uint32Array(f))}),t.intersectingTriangles=new Uint32Array(0),t.buildingChildren=!1}var t3=Xee;function n3(e,t,n,i,o,r,a,s,c,u,f,d,p,g,m,A,y){this.center=e,this.vertices=t,this.stride=f??6,this.indices=n,this.indexCountWithoutSkirts=i,this.vertexCountWithoutSkirts=o,this.minimumHeight=r,this.maximumHeight=a,this.rectangle=s,this.boundingSphere3D=c,this.occludeePointInScaledSpace=u,this.orientedBoundingBox=d,this.encoding=p,this.westIndicesSouthToNorth=g,this.southIndicesEastToWest=m,this.eastIndicesNorthToSouth=A,this.northIndicesWestToEast=y,this._transform=new M,this._lastPickSceneMode=void 0,this._terrainPicker=new t3(t,n,p)}n3.prototype.getTransform=function(e,t){return this._lastPickSceneMode===e?this._transform:(this._terrainPicker.needsRebuild=!0,!l(e)||e===ie.SCENE3D?bxt(this,this._transform):Ixt(this,t,this._transform))};function bxt(e,t){let n=e.encoding.exaggeration,i=e.encoding.exaggerationRelativeHeight,o=so.getHeight(e.minimumHeight,n,i),r=so.getHeight(e.maximumHeight,n,i),a=Qt.fromRectangle(e.rectangle,o,r,te.default,e.orientedBoundingBox);return Qt.computeTransformation(a,t),M.getScale(t,Kee).z<=D.EPSILON16&&(Kee.z=1,M.setScale(t,Kee,t)),t}var Cxt=new h,Txt=new h,Ext=new de,vxt=new de,Sxt=new h,wxt=new h,Kee=new h;function Ixt(e,t,n){let i=e.encoding.exaggeration,o=e.encoding.exaggerationRelativeHeight,r=so.getHeight(e.minimumHeight,i,o),a=so.getHeight(e.maximumHeight,i,o),s=t.project(de.fromRadians(e.rectangle.west,e.rectangle.south,0,Ext),Cxt),c=t.project(de.fromRadians(e.rectangle.east,e.rectangle.north,0,vxt),Txt),u=a-r,f=h.fromElements(c.x-s.x,c.y-s.y,u>0?u:1,Sxt),d=h.fromElements(s.x+f.x*.5,s.y+f.y*.5,r+f.z*.5,wxt);return M.fromTranslation(d,n),M.setScale(n,f,n),M.multiply(pt.SWIZZLE_3D_TO_2D_MATRIX,n,n),n}n3.prototype.pick=function(e,t,n,i){let o=this._terrainPicker.rayIntersect(e,this.getTransform(n,i),t,n,i);return this._lastPickSceneMode=n,o};n3.prototype.updateExaggeration=function(e,t){this._terrainPicker._vertices=this.vertices,this._terrainPicker.needsRebuild=!0,this._lastPickSceneMode=void 0};n3.prototype.updateSceneMode=function(e){this._terrainPicker.needsRebuild=!0,this._lastPickSceneMode=void 0};var pc=n3;function x_(e){e=e??G.EMPTY_OBJECT,this._buffer=e.buffer,this._width=e.width,this._height=e.height,this._childTileMask=e.childTileMask??15,this._encoding=e.encoding??sh.NONE;let t=qw.DEFAULT_STRUCTURE,n=e.structure;l(n)?n!==t&&(n.heightScale=n.heightScale??t.heightScale,n.heightOffset=n.heightOffset??t.heightOffset,n.elementsPerHeight=n.elementsPerHeight??t.elementsPerHeight,n.stride=n.stride??t.stride,n.elementMultiplier=n.elementMultiplier??t.elementMultiplier,n.isBigEndian=n.isBigEndian??t.isBigEndian):n=t,this._structure=n,this._createdByUpsampling=e.createdByUpsampling??!1,this._waterMask=e.waterMask,this._skirtHeight=void 0,this._bufferType=this._encoding===sh.LERC?Float32Array:this._buffer.constructor,this._mesh=void 0}Object.defineProperties(x_.prototype,{credits:{get:function(){}},waterMask:{get:function(){return this._waterMask}},childTileMask:{get:function(){return this._childTileMask}}});var iwe="createVerticesFromHeightmap",Dxt=new Gn(iwe),Pxt=new Gn(iwe,Qu.maximumAsynchronousTasks);x_.prototype.createMesh=function(e){e=e??G.EMPTY_OBJECT;let t=e.tilingScheme,n=e.x,i=e.y,o=e.level,r=e.exaggeration??1,a=e.exaggerationRelativeHeight??0,s=e.throttle??!0,c=t.ellipsoid,u=t.tileXYToNativeRectangle(n,i,o),f=t.tileXYToRectangle(n,i,o),d=c.cartographicToCartesian(oe.center(f)),p=this._structure,m=Uo.getEstimatedLevelZeroGeometricErrorForAHeightmap(c,this._width,t.getNumberOfXTilesAtLevel(0))/(1<<o);this._skirtHeight=Math.min(m*4,1e3);let y=(s?Pxt:Dxt).scheduleTask({heightmap:this._buffer,structure:p,includeWebMercatorT:!0,width:this._width,height:this._height,nativeRectangle:u,rectangle:f,relativeToCenter:d,ellipsoid:c,skirtHeight:this._skirtHeight,isGeographic:t.projection instanceof ji,exaggeration:r,exaggerationRelativeHeight:a,encoding:this._encoding});if(!l(y))return;let x=this;return Promise.resolve(y).then(function(b){let C;x._skirtHeight>0?C=Uo.getRegularGridAndSkirtIndicesAndEdgeIndices(b.gridWidth,b.gridHeight):C=Uo.getRegularGridIndicesAndEdgeIndices(b.gridWidth,b.gridHeight);let E=b.gridWidth*b.gridHeight;return x._mesh=new pc(d,new Float32Array(b.vertices),C.indices,C.indexCountWithoutSkirts,E,b.minimumHeight,b.maximumHeight,f,ce.clone(b.boundingSphere3D),h.clone(b.occludeePointInScaledSpace),b.numberOfAttributes,Qt.clone(b.orientedBoundingBox),dr.clone(b.encoding),C.westIndicesSouthToNorth,C.southIndicesEastToWest,C.eastIndicesNorthToSouth,C.northIndicesWestToEast),x._buffer=void 0,x._mesh})};x_.prototype._createMeshSync=function(e){let t=e.tilingScheme,n=e.x,i=e.y,o=e.level,r=e.exaggeration??1,a=e.exaggerationRelativeHeight??0,s=t.ellipsoid,c=t.tileXYToNativeRectangle(n,i,o),u=t.tileXYToRectangle(n,i,o),f=s.cartographicToCartesian(oe.center(u)),d=this._structure,g=Uo.getEstimatedLevelZeroGeometricErrorForAHeightmap(s,this._width,t.getNumberOfXTilesAtLevel(0))/(1<<o);this._skirtHeight=Math.min(g*4,1e3);let m=qw.computeVertices({heightmap:this._buffer,structure:d,includeWebMercatorT:!0,width:this._width,height:this._height,nativeRectangle:c,rectangle:u,relativeToCenter:f,ellipsoid:s,skirtHeight:this._skirtHeight,isGeographic:t.projection instanceof ji,exaggeration:r,exaggerationRelativeHeight:a});this._buffer=void 0;let A;this._skirtHeight>0?A=Uo.getRegularGridAndSkirtIndicesAndEdgeIndices(this._width,this._height):A=Uo.getRegularGridIndicesAndEdgeIndices(this._width,this._height);let y=m.gridWidth*m.gridHeight;return this._mesh=new pc(f,m.vertices,A.indices,A.indexCountWithoutSkirts,y,m.minimumHeight,m.maximumHeight,u,m.boundingSphere3D,m.occludeePointInScaledSpace,m.encoding.stride,m.orientedBoundingBox,m.encoding,A.westIndicesSouthToNorth,A.southIndicesEastToWest,A.eastIndicesNorthToSouth,A.northIndicesWestToEast),this._mesh};x_.prototype.interpolateHeight=function(e,t,n){let i=this._width,o=this._height,r=this._structure,a=r.stride,s=r.elementsPerHeight,c=r.elementMultiplier,u=r.isBigEndian,f=r.heightOffset,d=r.heightScale,p=l(this._mesh),g=this._encoding===sh.LERC;if(!p&&g)return;let A;if(p){let y=this._mesh.vertices,x=this._mesh.encoding;A=owe(y,x,f,d,e,i,o,t,n)}else A=Rxt(this._buffer,s,c,a,u,e,i,o,t,n),A=A*d+f;return A};x_.prototype.upsample=function(e,t,n,i,o,r,a){let s=this._mesh;if(!l(s))return;let c=this._width,u=this._height,f=this._structure,d=f.stride,p=new this._bufferType(c*u*d),g=s.vertices,m=s.encoding,A=e.tileXYToRectangle(t,n,i),y=e.tileXYToRectangle(o,r,a),x=f.heightOffset,b=f.heightScale,C=f.elementsPerHeight,E=f.elementMultiplier,S=f.isBigEndian,w=Math.pow(E,C-1);for(let P=0;P<u;++P){let R=D.lerp(y.north,y.south,P/(u-1));for(let B=0;B<c;++B){let L=D.lerp(y.west,y.east,B/(c-1)),_=owe(g,m,x,b,A,c,u,L,R);_=_<f.lowestEncodedHeight?f.lowestEncodedHeight:_,_=_>f.highestEncodedHeight?f.highestEncodedHeight:_,Oxt(p,C,E,w,d,S,P*c+B,_)}}return Promise.resolve(new x_({buffer:p,width:c,height:u,childTileMask:0,structure:this._structure,createdByUpsampling:!0}))};x_.prototype.isChildAvailable=function(e,t,n,i){let o=2;return n!==e*2&&++o,i!==t*2&&(o-=2),(this._childTileMask&1<<o)!==0};x_.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};function Rxt(e,t,n,i,o,r,a,s,c,u){let f=(c-r.west)*(a-1)/(r.east-r.west),d=(u-r.south)*(s-1)/(r.north-r.south),p=f|0,g=p+1;g>=a&&(g=a-1,p=a-2);let m=d|0,A=m+1;A>=s&&(A=s-1,m=s-2);let y=f-p,x=d-m;m=s-1-m,A=s-1-A;let b=N6(e,t,n,i,o,m*a+p),C=N6(e,t,n,i,o,m*a+g),E=N6(e,t,n,i,o,A*a+p),S=N6(e,t,n,i,o,A*a+g);return rwe(y,x,b,C,E,S)}function owe(e,t,n,i,o,r,a,s,c){let u=(s-o.west)*(r-1)/(o.east-o.west),f=(c-o.south)*(a-1)/(o.north-o.south),d=u|0,p=d+1;p>=r&&(p=r-1,d=r-2);let g=f|0,m=g+1;m>=a&&(m=a-1,g=a-2);let A=u-d,y=f-g;g=a-1-g,m=a-1-m;let x=(t.decodeHeight(e,g*r+d)-n)/i,b=(t.decodeHeight(e,g*r+p)-n)/i,C=(t.decodeHeight(e,m*r+d)-n)/i,E=(t.decodeHeight(e,m*r+p)-n)/i;return rwe(A,y,x,b,C,E)}function rwe(e,t,n,i,o,r){return t<e?n+e*(i-n)+t*(r-i):n+e*(r-o)+t*(o-n)}function N6(e,t,n,i,o,r){r*=i;let a=0,s;if(o)for(s=0;s<t;++s)a=a*n+e[r+s];else for(s=t-1;s>=0;--s)a=a*n+e[r+s];return a}function Oxt(e,t,n,i,o,r,a,s){a*=o;let c;if(r)for(c=0;c<t-1;++c)e[a+c]=s/i|0,s-=e[a+c]*i,i/=n;else for(c=t-1;c>0;--c)e[a+c]=s/i|0,s-=e[a+c]*i,i/=n;e[a+c]=s}var kc=x_;function Yw(e){e=e??G.EMPTY_OBJECT,this._tilingScheme=e.tilingScheme,l(this._tilingScheme)||(this._tilingScheme=new Wi({ellipsoid:e.ellipsoid??te.default})),this._levelZeroMaximumGeometricError=Uo.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,64,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._errorEvent=new ye}Object.defineProperties(Yw.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});Yw.prototype.requestTileGeometry=function(e,t,n,i){return Promise.resolve(new kc({buffer:new Uint8Array(256),width:16,height:16}))};Yw.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};Yw.prototype.getTileDataAvailable=function(e,t,n){};Yw.prototype.loadTileDataAvailability=function(e,t,n){};var a0=Yw;var i3=`uniform vec4 u_initialColor;
-
- #if TEXTURE_UNITS > 0
- uniform sampler2D u_dayTextures[TEXTURE_UNITS];
- uniform vec4 u_dayTextureTranslationAndScale[TEXTURE_UNITS];
- uniform bool u_dayTextureUseWebMercatorT[TEXTURE_UNITS];
-
- #ifdef APPLY_ALPHA
- uniform float u_dayTextureAlpha[TEXTURE_UNITS];
- #endif
-
- #ifdef APPLY_DAY_NIGHT_ALPHA
- uniform float u_dayTextureNightAlpha[TEXTURE_UNITS];
- uniform float u_dayTextureDayAlpha[TEXTURE_UNITS];
- #endif
-
- #ifdef APPLY_SPLIT
- uniform float u_dayTextureSplit[TEXTURE_UNITS];
- #endif
-
- #ifdef APPLY_BRIGHTNESS
- uniform float u_dayTextureBrightness[TEXTURE_UNITS];
- #endif
-
- #ifdef APPLY_CONTRAST
- uniform float u_dayTextureContrast[TEXTURE_UNITS];
- #endif
-
- #ifdef APPLY_HUE
- uniform float u_dayTextureHue[TEXTURE_UNITS];
- #endif
-
- #ifdef APPLY_SATURATION
- uniform float u_dayTextureSaturation[TEXTURE_UNITS];
- #endif
-
- #ifdef APPLY_GAMMA
- uniform float u_dayTextureOneOverGamma[TEXTURE_UNITS];
- #endif
-
- #ifdef APPLY_IMAGERY_CUTOUT
- uniform vec4 u_dayTextureCutoutRectangles[TEXTURE_UNITS];
- #endif
-
- #ifdef APPLY_COLOR_TO_ALPHA
- uniform vec4 u_colorsToAlpha[TEXTURE_UNITS];
- #endif
-
- uniform vec4 u_dayTextureTexCoordsRectangle[TEXTURE_UNITS];
- #endif
-
- #if defined(HAS_WATER_MASK) && (defined(SHOW_REFLECTIVE_OCEAN) || defined(APPLY_MATERIAL))
- uniform sampler2D u_waterMask;
- uniform vec4 u_waterMaskTranslationAndScale;
- uniform float u_zoomedOutOceanSpecularIntensity;
- #endif
-
- #ifdef SHOW_OCEAN_WAVES
- uniform sampler2D u_oceanNormalMap;
- #endif
-
- #if defined(ENABLE_DAYNIGHT_SHADING) || defined(GROUND_ATMOSPHERE)
- uniform vec2 u_lightingFadeDistance;
- #endif
-
- #ifdef TILE_LIMIT_RECTANGLE
- uniform vec4 u_cartographicLimitRectangle;
- #endif
-
- #ifdef GROUND_ATMOSPHERE
- uniform vec2 u_nightFadeDistance;
- #endif
-
- #ifdef ENABLE_CLIPPING_PLANES
- uniform highp sampler2D u_clippingPlanes;
- uniform mat4 u_clippingPlanesMatrix;
- uniform vec4 u_clippingPlanesEdgeStyle;
- #endif
-
- #ifdef ENABLE_CLIPPING_POLYGONS
- uniform highp sampler2D u_clippingDistance;
- in vec2 v_clippingPosition;
- flat in int v_regionIndex;
- #endif
-
- #if defined(GROUND_ATMOSPHERE) || defined(FOG) && defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))
- uniform float u_minimumBrightness;
- #endif
-
- // Based on colorCorrect
- // The colorCorrect flag can only be true when tileProvider.hue/saturation/brightnessShift
- // are nonzero AND when (applyFog || showGroundAtmosphere) in the tile provider
- // - The tileProvider.hue/saturation/brightnessShift are just passed through
- // from the Globe hue/saturation/brightness, like atmosphereBrightnessShift
- // - The applyFog depends on enableFog, and some tile distance from the viewer
- // - The showGroundAtmosphere is a flag that is passed through from the Globe,
- // and is true by default when the ellipsoid is WGS84
- #ifdef COLOR_CORRECT
- uniform vec3 u_hsbShift; // Hue, saturation, brightness
- #endif
-
- // Based on highlightFillTile
- // This is set for terrain tiles when they are "fill" tiles, and
- // the terrainProvider.fillHighlightColor was set to a value with
- // nonzero alpha
- #ifdef HIGHLIGHT_FILL_TILE
- uniform vec4 u_fillHighlightColor;
- #endif
-
- // Based on translucent
- // This is set depending on the GlobeTranslucencyState
- #ifdef TRANSLUCENT
- uniform vec4 u_frontFaceAlphaByDistance;
- uniform vec4 u_backFaceAlphaByDistance;
- uniform vec4 u_translucencyRectangle;
- #endif
-
- // Based on showUndergroundColor
- // This is set when GlobeSurfaceTileProvider.isUndergroundVisible
- // returns true, AND the tileProvider.undergroundColor had a value with
- // nonzero alpha, and the tileProvider.undergroundColorAlphaByDistance
- // was in the right range
- #ifdef UNDERGROUND_COLOR
- uniform vec4 u_undergroundColor;
- uniform vec4 u_undergroundColorAlphaByDistance;
- #endif
-
- // Based on enableLighting && hasVertexNormals
- // The enableLighting flag is passed in directly from the Globe.
- // The hasVertexNormals flag is from the tileProvider
- #ifdef ENABLE_VERTEX_LIGHTING
- uniform float u_lambertDiffuseMultiplier;
- uniform float u_vertexShadowDarkness;
- #endif
-
- in vec3 v_positionMC;
- in vec3 v_positionEC;
- in vec3 v_textureCoordinates;
- in vec3 v_normalMC;
- in vec3 v_normalEC;
-
- #ifdef APPLY_MATERIAL
- in float v_height;
- in float v_slope;
- in float v_aspect;
- #endif
-
- #if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)
- in float v_distance;
- #endif
-
- #if defined(GROUND_ATMOSPHERE) || defined(FOG)
- in vec3 v_atmosphereRayleighColor;
- in vec3 v_atmosphereMieColor;
- in float v_atmosphereOpacity;
- #endif
-
- #if defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)
- float interpolateByDistance(vec4 nearFarScalar, float distance)
- {
- float startDistance = nearFarScalar.x;
- float startValue = nearFarScalar.y;
- float endDistance = nearFarScalar.z;
- float endValue = nearFarScalar.w;
- float t = clamp((distance - startDistance) / (endDistance - startDistance), 0.0, 1.0);
- return mix(startValue, endValue, t);
- }
- #endif
-
- #if defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT) || defined(APPLY_MATERIAL)
- vec4 alphaBlend(vec4 sourceColor, vec4 destinationColor)
- {
- return sourceColor * vec4(sourceColor.aaa, 1.0) + destinationColor * (1.0 - sourceColor.a);
- }
- #endif
-
- #ifdef TRANSLUCENT
- bool inTranslucencyRectangle()
- {
- return
- v_textureCoordinates.x > u_translucencyRectangle.x &&
- v_textureCoordinates.x < u_translucencyRectangle.z &&
- v_textureCoordinates.y > u_translucencyRectangle.y &&
- v_textureCoordinates.y < u_translucencyRectangle.w;
- }
- #endif
-
- vec4 sampleAndBlend(
- vec4 previousColor,
- sampler2D textureToSample,
- vec2 tileTextureCoordinates,
- vec4 textureCoordinateRectangle,
- vec4 textureCoordinateTranslationAndScale,
- float textureAlpha,
- float textureNightAlpha,
- float textureDayAlpha,
- float textureBrightness,
- float textureContrast,
- float textureHue,
- float textureSaturation,
- float textureOneOverGamma,
- float split,
- vec4 colorToAlpha,
- float nightBlend)
- {
- // This crazy step stuff sets the alpha to 0.0 if this following condition is true:
- // tileTextureCoordinates.s < textureCoordinateRectangle.s ||
- // tileTextureCoordinates.s > textureCoordinateRectangle.p ||
- // tileTextureCoordinates.t < textureCoordinateRectangle.t ||
- // tileTextureCoordinates.t > textureCoordinateRectangle.q
- // In other words, the alpha is zero if the fragment is outside the rectangle
- // covered by this texture. Would an actual 'if' yield better performance?
- vec2 alphaMultiplier = step(textureCoordinateRectangle.st, tileTextureCoordinates);
- textureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;
-
- alphaMultiplier = step(vec2(0.0), textureCoordinateRectangle.pq - tileTextureCoordinates);
- textureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;
-
- #if defined(APPLY_DAY_NIGHT_ALPHA) && defined(ENABLE_DAYNIGHT_SHADING)
- textureAlpha *= mix(textureDayAlpha, textureNightAlpha, nightBlend);
- #endif
-
- vec2 translation = textureCoordinateTranslationAndScale.xy;
- vec2 scale = textureCoordinateTranslationAndScale.zw;
- vec2 textureCoordinates = tileTextureCoordinates * scale + translation;
- vec4 value = texture(textureToSample, textureCoordinates);
- vec3 color = value.rgb;
- float alpha = value.a;
-
- #ifdef APPLY_COLOR_TO_ALPHA
- vec3 colorDiff = abs(color.rgb - colorToAlpha.rgb);
- colorDiff.r = czm_maximumComponent(colorDiff);
- alpha = czm_branchFreeTernary(colorDiff.r < colorToAlpha.a, 0.0, alpha);
- #endif
-
- #if !defined(APPLY_GAMMA)
- vec4 tempColor = czm_gammaCorrect(vec4(color, alpha));
- color = tempColor.rgb;
- alpha = tempColor.a;
- #else
- color = pow(color, vec3(textureOneOverGamma));
- #endif
-
- #ifdef APPLY_SPLIT
- float splitPosition = czm_splitPosition;
- // Split to the left
- if (split < 0.0 && gl_FragCoord.x > splitPosition) {
- alpha = 0.0;
- }
- // Split to the right
- else if (split > 0.0 && gl_FragCoord.x < splitPosition) {
- alpha = 0.0;
- }
- #endif
-
- #ifdef APPLY_BRIGHTNESS
- color = mix(vec3(0.0), color, textureBrightness);
- #endif
-
- #ifdef APPLY_CONTRAST
- color = mix(vec3(0.5), color, textureContrast);
- #endif
-
- #ifdef APPLY_HUE
- color = czm_hue(color, textureHue);
- #endif
-
- #ifdef APPLY_SATURATION
- color = czm_saturation(color, textureSaturation);
- #endif
-
- float sourceAlpha = alpha * textureAlpha;
- float outAlpha = mix(previousColor.a, 1.0, sourceAlpha);
- outAlpha += sign(outAlpha) - 1.0;
-
- vec3 outColor = mix(previousColor.rgb * previousColor.a, color, sourceAlpha) / outAlpha;
-
- // When rendering imagery for a tile in multiple passes,
- // some GPU/WebGL implementation combinations will not blend fragments in
- // additional passes correctly if their computation includes an unmasked
- // divide-by-zero operation,
- // even if it's not in the output or if the output has alpha zero.
- //
- // For example, without sanitization for outAlpha,
- // this renders without artifacts:
- // if (outAlpha == 0.0) { outColor = vec3(0.0); }
- //
- // but using czm_branchFreeTernary will cause portions of the tile that are
- // alpha-zero in the additional pass to render as black instead of blending
- // with the previous pass:
- // outColor = czm_branchFreeTernary(outAlpha == 0.0, vec3(0.0), outColor);
- //
- // So instead, sanitize against divide-by-zero,
- // store this state on the sign of outAlpha, and correct on return.
-
- return vec4(outColor, max(outAlpha, 0.0));
- }
-
- vec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates, float nightBlend);
- vec4 computeWaterColor(vec3 positionEyeCoordinates, vec2 textureCoordinates, mat3 enuToEye, vec4 imageryColor, float specularMapValue, float fade);
-
- const float fExposure = 2.0;
-
- vec3 computeEllipsoidPosition()
- {
- float mpp = czm_metersPerPixel(vec4(0.0, 0.0, -czm_currentFrustum.x, 1.0), 1.0);
- vec2 xy = gl_FragCoord.xy / czm_viewport.zw * 2.0 - vec2(1.0);
- xy *= czm_viewport.zw * mpp * 0.5;
-
- vec3 direction;
- if (czm_orthographicIn3D == 1.0)
- {
- direction = vec3(0.0, 0.0, -1.0);
- }
- else
- {
- direction = normalize(vec3(xy, -czm_currentFrustum.x));
- }
-
- czm_ray ray = czm_ray(vec3(0.0), direction);
-
- vec3 ellipsoid_center = czm_view[3].xyz;
-
- czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoid_center, czm_ellipsoidInverseRadii);
-
- vec3 ellipsoidPosition = czm_pointAlongRay(ray, intersection.start);
- return (czm_inverseView * vec4(ellipsoidPosition, 1.0)).xyz;
- }
-
- void main()
- {
- #ifdef TILE_LIMIT_RECTANGLE
- if (v_textureCoordinates.x < u_cartographicLimitRectangle.x || u_cartographicLimitRectangle.z < v_textureCoordinates.x ||
- v_textureCoordinates.y < u_cartographicLimitRectangle.y || u_cartographicLimitRectangle.w < v_textureCoordinates.y)
- {
- discard;
- }
- #endif
-
- #ifdef ENABLE_CLIPPING_PLANES
- float clipDistance = clip(gl_FragCoord, u_clippingPlanes, u_clippingPlanesMatrix);
- #endif
-
- #if defined(SHOW_REFLECTIVE_OCEAN) || defined(ENABLE_DAYNIGHT_SHADING) || defined(HDR)
- vec3 normalMC = czm_geodeticSurfaceNormal(v_positionMC, vec3(0.0), vec3(1.0)); // normalized surface normal in model coordinates
- vec3 normalEC = czm_normal3D * normalMC; // normalized surface normal in eye coordinates
- #endif
-
- #if defined(APPLY_DAY_NIGHT_ALPHA) && defined(ENABLE_DAYNIGHT_SHADING)
- float nightBlend = 1.0 - clamp(czm_getLambertDiffuse(czm_lightDirectionEC, normalEC) * 5.0, 0.0, 1.0);
- #else
- float nightBlend = 0.0;
- #endif
-
- // The clamp below works around an apparent bug in Chrome Canary v23.0.1241.0
- // where the fragment shader sees textures coordinates < 0.0 and > 1.0 for the
- // fragments on the edges of tiles even though the vertex shader is outputting
- // coordinates strictly in the 0-1 range.
- vec4 color = computeDayColor(u_initialColor, clamp(v_textureCoordinates, 0.0, 1.0), nightBlend);
-
- #ifdef SHOW_TILE_BOUNDARIES
- if (v_textureCoordinates.x < (1.0/256.0) || v_textureCoordinates.x > (255.0/256.0) ||
- v_textureCoordinates.y < (1.0/256.0) || v_textureCoordinates.y > (255.0/256.0))
- {
- color = vec4(1.0, 0.0, 0.0, 1.0);
- }
- #endif
-
- #if defined(ENABLE_DAYNIGHT_SHADING) || defined(GROUND_ATMOSPHERE)
- float cameraDist;
- if (czm_sceneMode == czm_sceneMode2D)
- {
- cameraDist = max(czm_frustumPlanes.x - czm_frustumPlanes.y, czm_frustumPlanes.w - czm_frustumPlanes.z) * 0.5;
- }
- else if (czm_sceneMode == czm_sceneModeColumbusView)
- {
- cameraDist = -czm_view[3].z;
- }
- else
- {
- cameraDist = length(czm_view[3]);
- }
- float fadeOutDist = u_lightingFadeDistance.x;
- float fadeInDist = u_lightingFadeDistance.y;
- if (czm_sceneMode != czm_sceneMode3D) {
- vec3 radii = czm_ellipsoidRadii;
- float maxRadii = max(radii.x, max(radii.y, radii.z));
- fadeOutDist -= maxRadii;
- fadeInDist -= maxRadii;
- }
- float fade = clamp((cameraDist - fadeOutDist) / (fadeInDist - fadeOutDist), 0.0, 1.0);
- #else
- float fade = 0.0;
- #endif
-
- #if defined(HAS_WATER_MASK) && (defined(SHOW_REFLECTIVE_OCEAN) || defined(APPLY_MATERIAL))
- vec2 waterMaskTranslation = u_waterMaskTranslationAndScale.xy;
- vec2 waterMaskScale = u_waterMaskTranslationAndScale.zw;
- vec2 waterMaskTextureCoordinates = v_textureCoordinates.xy * waterMaskScale + waterMaskTranslation;
- waterMaskTextureCoordinates.y = 1.0 - waterMaskTextureCoordinates.y;
-
- float mask = texture(u_waterMask, waterMaskTextureCoordinates).r;
-
- #ifdef SHOW_REFLECTIVE_OCEAN
- if (mask > 0.0)
- {
- mat3 enuToEye = czm_eastNorthUpToEyeCoordinates(v_positionMC, normalEC);
-
- vec2 ellipsoidTextureCoordinates = czm_ellipsoidTextureCoordinates(normalMC);
- vec2 ellipsoidFlippedTextureCoordinates = czm_ellipsoidTextureCoordinates(normalMC.zyx);
-
- vec2 textureCoordinates = mix(ellipsoidTextureCoordinates, ellipsoidFlippedTextureCoordinates, czm_morphTime * smoothstep(0.9, 0.95, normalMC.z));
-
- color = computeWaterColor(v_positionEC, textureCoordinates, enuToEye, color, mask, fade);
- }
- #endif
- #endif
-
- #ifdef APPLY_MATERIAL
- czm_materialInput materialInput;
- materialInput.st = v_textureCoordinates.st;
- materialInput.normalEC = normalize(v_normalEC);
- materialInput.positionToEyeEC = -v_positionEC;
- materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(v_positionMC, normalize(v_normalEC));
- materialInput.slope = v_slope;
- materialInput.height = v_height;
- materialInput.aspect = v_aspect;
- #ifdef HAS_WATER_MASK
- materialInput.waterMask = mask;
- #endif
-
- czm_material material = czm_getMaterial(materialInput);
- vec4 materialColor = vec4(material.diffuse, material.alpha);
- color = alphaBlend(materialColor, color);
- #endif
-
- #ifdef ENABLE_VERTEX_LIGHTING
- float diffuseIntensity = clamp(czm_getLambertDiffuse(czm_lightDirectionEC, normalize(v_normalEC)) * u_lambertDiffuseMultiplier + u_vertexShadowDarkness, 0.0, 1.0);
- vec4 finalColor = vec4(color.rgb * czm_lightColor * diffuseIntensity, color.a);
- #elif defined(ENABLE_DAYNIGHT_SHADING)
- float diffuseIntensity = clamp(czm_getLambertDiffuse(czm_lightDirectionEC, normalEC) * 5.0 + 0.3, 0.0, 1.0);
- diffuseIntensity = mix(1.0, diffuseIntensity, fade);
- vec4 finalColor = vec4(color.rgb * czm_lightColor * diffuseIntensity, color.a);
- #else
- vec4 finalColor = color;
- #endif
-
- #ifdef ENABLE_CLIPPING_PLANES
- vec4 clippingPlanesEdgeColor = vec4(1.0);
- clippingPlanesEdgeColor.rgb = u_clippingPlanesEdgeStyle.rgb;
- float clippingPlanesEdgeWidth = u_clippingPlanesEdgeStyle.a;
-
- if (clipDistance < clippingPlanesEdgeWidth)
- {
- finalColor = clippingPlanesEdgeColor;
- }
- #endif
-
- #ifdef ENABLE_CLIPPING_POLYGONS
- vec2 clippingPosition = v_clippingPosition;
- int regionIndex = v_regionIndex;
- clipPolygons(u_clippingDistance, CLIPPING_POLYGON_REGIONS_LENGTH, clippingPosition, regionIndex);
- #endif
-
- #ifdef HIGHLIGHT_FILL_TILE
- finalColor = vec4(mix(finalColor.rgb, u_fillHighlightColor.rgb, u_fillHighlightColor.a), finalColor.a);
- #endif
-
- #if defined(DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN)
- vec3 atmosphereLightDirection = czm_sunDirectionWC;
- #else
- vec3 atmosphereLightDirection = czm_lightDirectionWC;
- #endif
-
- #if defined(GROUND_ATMOSPHERE) || defined(FOG)
- if (!czm_backFacing())
- {
- bool dynamicLighting = false;
- #if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_DAYNIGHT_SHADING) || defined(ENABLE_VERTEX_LIGHTING))
- dynamicLighting = true;
- #endif
-
- vec3 rayleighColor;
- vec3 mieColor;
- float opacity;
-
- vec3 positionWC;
- vec3 lightDirection;
-
- // When the camera is far away (camera distance > nightFadeOutDistance), the scattering is computed in the fragment shader.
- // Otherwise, the scattering is computed in the vertex shader.
- #ifdef PER_FRAGMENT_GROUND_ATMOSPHERE
- positionWC = computeEllipsoidPosition();
- lightDirection = czm_branchFreeTernary(dynamicLighting, atmosphereLightDirection, normalize(positionWC));
- computeAtmosphereScattering(
- positionWC,
- lightDirection,
- rayleighColor,
- mieColor,
- opacity
- );
- #else
- positionWC = v_positionMC;
- lightDirection = czm_branchFreeTernary(dynamicLighting, atmosphereLightDirection, normalize(positionWC));
- rayleighColor = v_atmosphereRayleighColor;
- mieColor = v_atmosphereMieColor;
- opacity = v_atmosphereOpacity;
- #endif
-
- #ifdef COLOR_CORRECT
- const bool ignoreBlackPixels = true;
- rayleighColor = czm_applyHSBShift(rayleighColor, u_hsbShift, ignoreBlackPixels);
- mieColor = czm_applyHSBShift(mieColor, u_hsbShift, ignoreBlackPixels);
- #endif
-
- vec4 groundAtmosphereColor = computeAtmosphereColor(positionWC, lightDirection, rayleighColor, mieColor, opacity);
-
- // Fog is applied to tiles selected for fog, close to the Earth.
- #ifdef FOG
- vec3 fogColor = groundAtmosphereColor.rgb;
-
- // If there is lighting, apply that to the fog.
- #if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))
- float darken = clamp(dot(normalize(czm_viewerPositionWC), atmosphereLightDirection), u_minimumBrightness, 1.0);
- fogColor *= darken;
- #endif
-
- #ifndef HDR
- fogColor.rgb = czm_pbrNeutralTonemapping(fogColor.rgb);
- fogColor.rgb = czm_inverseGamma(fogColor.rgb);
- #endif
-
- finalColor = vec4(czm_fog(v_distance, finalColor.rgb, fogColor.rgb, czm_fogVisualDensityScalar), finalColor.a);
-
- #else
- // Apply ground atmosphere. This happens when the camera is far away from the earth.
-
- // The transmittance is based on optical depth i.e. the length of segment of the ray inside the atmosphere.
- // This value is larger near the "circumference", as it is further away from the camera. We use it to
- // brighten up that area of the ground atmosphere.
- const float transmittanceModifier = 0.5;
- float transmittance = transmittanceModifier + clamp(1.0 - groundAtmosphereColor.a, 0.0, 1.0);
-
- vec3 finalAtmosphereColor = finalColor.rgb + groundAtmosphereColor.rgb * transmittance;
-
- #if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))
- float fadeInDist = u_nightFadeDistance.x;
- float fadeOutDist = u_nightFadeDistance.y;
-
- float sunlitAtmosphereIntensity = clamp((cameraDist - fadeOutDist) / (fadeInDist - fadeOutDist), 0.05, 1.0);
- float darken = clamp(dot(normalize(positionWC), atmosphereLightDirection), 0.0, 1.0);
- vec3 darkenendGroundAtmosphereColor = mix(groundAtmosphereColor.rgb, finalAtmosphereColor.rgb, darken);
-
- finalAtmosphereColor = mix(darkenendGroundAtmosphereColor, finalAtmosphereColor, sunlitAtmosphereIntensity);
- #endif
-
- #ifndef HDR
- finalAtmosphereColor.rgb = vec3(1.0) - exp(-fExposure * finalAtmosphereColor.rgb);
- #else
- finalAtmosphereColor.rgb = czm_saturation(finalAtmosphereColor.rgb, 1.6);
- #endif
-
- finalColor.rgb = mix(finalColor.rgb, finalAtmosphereColor.rgb, fade);
- #endif
- }
- #endif
-
- #ifdef UNDERGROUND_COLOR
- if (czm_backFacing())
- {
- float distanceFromEllipsoid = max(czm_eyeHeight, 0.0);
- float distance = max(v_distance - distanceFromEllipsoid, 0.0);
- float blendAmount = interpolateByDistance(u_undergroundColorAlphaByDistance, distance);
- vec4 undergroundColor = vec4(u_undergroundColor.rgb, u_undergroundColor.a * blendAmount);
- finalColor = alphaBlend(undergroundColor, finalColor);
- }
- #endif
-
- #ifdef TRANSLUCENT
- if (inTranslucencyRectangle())
- {
- vec4 alphaByDistance = gl_FrontFacing ? u_frontFaceAlphaByDistance : u_backFaceAlphaByDistance;
- finalColor.a *= interpolateByDistance(alphaByDistance, v_distance);
- }
- #endif
-
- out_FragColor = finalColor;
- }
-
-
- #ifdef SHOW_REFLECTIVE_OCEAN
-
- float waveFade(float edge0, float edge1, float x)
- {
- float y = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);
- return pow(1.0 - y, 5.0);
- }
-
- float linearFade(float edge0, float edge1, float x)
- {
- return clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);
- }
-
- // Based on water rendering by Jonas Wagner:
- // http://29a.ch/2012/7/19/webgl-terrain-rendering-water-fog
-
- // low altitude wave settings
- const float oceanFrequencyLowAltitude = 825000.0;
- const float oceanAnimationSpeedLowAltitude = 0.004;
- const float oceanOneOverAmplitudeLowAltitude = 1.0 / 2.0;
- const float oceanSpecularIntensity = 0.5;
-
- // high altitude wave settings
- const float oceanFrequencyHighAltitude = 125000.0;
- const float oceanAnimationSpeedHighAltitude = 0.008;
- const float oceanOneOverAmplitudeHighAltitude = 1.0 / 2.0;
-
- vec4 computeWaterColor(vec3 positionEyeCoordinates, vec2 textureCoordinates, mat3 enuToEye, vec4 imageryColor, float maskValue, float fade)
- {
- vec3 positionToEyeEC = -positionEyeCoordinates;
- float positionToEyeECLength = length(positionToEyeEC);
-
- // The double normalize below works around a bug in Firefox on Android devices.
- vec3 normalizedPositionToEyeEC = normalize(normalize(positionToEyeEC));
-
- // Fade out the waves as the camera moves far from the surface.
- float waveIntensity = waveFade(70000.0, 1000000.0, positionToEyeECLength);
-
- #ifdef SHOW_OCEAN_WAVES
- // high altitude waves
- float time = czm_frameNumber * oceanAnimationSpeedHighAltitude;
- vec4 noise = czm_getWaterNoise(u_oceanNormalMap, textureCoordinates * oceanFrequencyHighAltitude, time, 0.0);
- vec3 normalTangentSpaceHighAltitude = vec3(noise.xy, noise.z * oceanOneOverAmplitudeHighAltitude);
-
- // low altitude waves
- time = czm_frameNumber * oceanAnimationSpeedLowAltitude;
- noise = czm_getWaterNoise(u_oceanNormalMap, textureCoordinates * oceanFrequencyLowAltitude, time, 0.0);
- vec3 normalTangentSpaceLowAltitude = vec3(noise.xy, noise.z * oceanOneOverAmplitudeLowAltitude);
-
- // blend the 2 wave layers based on distance to surface
- float highAltitudeFade = linearFade(0.0, 60000.0, positionToEyeECLength);
- float lowAltitudeFade = 1.0 - linearFade(20000.0, 60000.0, positionToEyeECLength);
- vec3 normalTangentSpace =
- (highAltitudeFade * normalTangentSpaceHighAltitude) +
- (lowAltitudeFade * normalTangentSpaceLowAltitude);
- normalTangentSpace = normalize(normalTangentSpace);
-
- // fade out the normal perturbation as we move farther from the water surface
- normalTangentSpace.xy *= waveIntensity;
- normalTangentSpace = normalize(normalTangentSpace);
- #else
- vec3 normalTangentSpace = vec3(0.0, 0.0, 1.0);
- #endif
-
- vec3 normalEC = enuToEye * normalTangentSpace;
-
- const vec3 waveHighlightColor = vec3(0.3, 0.45, 0.6);
-
- // Use diffuse light to highlight the waves
- float diffuseIntensity = czm_getLambertDiffuse(czm_lightDirectionEC, normalEC) * maskValue;
- vec3 diffuseHighlight = waveHighlightColor * diffuseIntensity * (1.0 - fade);
-
- #ifdef SHOW_OCEAN_WAVES
- // Where diffuse light is low or non-existent, use wave highlights based solely on
- // the wave bumpiness and no particular light direction.
- float tsPerturbationRatio = normalTangentSpace.z;
- vec3 nonDiffuseHighlight = mix(waveHighlightColor * 5.0 * (1.0 - tsPerturbationRatio), vec3(0.0), diffuseIntensity);
- #else
- vec3 nonDiffuseHighlight = vec3(0.0);
- #endif
-
- // Add specular highlights in 3D, and in all modes when zoomed in.
- float specularIntensity = czm_getSpecular(czm_lightDirectionEC, normalizedPositionToEyeEC, normalEC, 10.0);
- float surfaceReflectance = mix(0.0, mix(u_zoomedOutOceanSpecularIntensity, oceanSpecularIntensity, waveIntensity), maskValue);
- float specular = specularIntensity * surfaceReflectance;
-
- #ifdef HDR
- specular *= 1.4;
-
- float e = 0.2;
- float d = 3.3;
- float c = 1.7;
-
- vec3 color = imageryColor.rgb + (c * (vec3(e) + imageryColor.rgb * d) * (diffuseHighlight + nonDiffuseHighlight + specular));
- #else
- vec3 color = imageryColor.rgb + diffuseHighlight + nonDiffuseHighlight + specular;
- #endif
-
- return vec4(color, imageryColor.a);
- }
-
- #endif // #ifdef SHOW_REFLECTIVE_OCEAN
- `;var o3=`#ifdef QUANTIZATION_BITS12
- in vec4 compressed0;
- in float compressed1;
- #else
- in vec4 position3DAndHeight;
- in vec4 textureCoordAndEncodedNormals;
- #endif
-
- #ifdef GEODETIC_SURFACE_NORMALS
- in vec3 geodeticSurfaceNormal;
- #endif
-
- #ifdef EXAGGERATION
- uniform vec2 u_verticalExaggerationAndRelativeHeight;
- #endif
-
- uniform vec3 u_center3D;
- uniform mat4 u_modifiedModelView;
- uniform mat4 u_modifiedModelViewProjection;
- uniform vec4 u_tileRectangle;
-
- // Uniforms for 2D Mercator projection
- uniform vec2 u_southAndNorthLatitude;
- uniform vec2 u_southMercatorYAndOneOverHeight;
-
- out vec3 v_positionMC;
- out vec3 v_positionEC;
-
- out vec3 v_textureCoordinates;
- out vec3 v_normalMC;
- out vec3 v_normalEC;
-
- #ifdef APPLY_MATERIAL
- out float v_slope;
- out float v_aspect;
- out float v_height;
- #endif
-
- #if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)
- out float v_distance;
- #endif
-
- #if defined(FOG) || defined(GROUND_ATMOSPHERE)
- out vec3 v_atmosphereRayleighColor;
- out vec3 v_atmosphereMieColor;
- out float v_atmosphereOpacity;
- #endif
-
- #ifdef ENABLE_CLIPPING_POLYGONS
- uniform highp sampler2D u_clippingExtents;
- out vec2 v_clippingPosition;
- flat out int v_regionIndex;
- #endif
-
- // These functions are generated at runtime.
- vec4 getPosition(vec3 position, float height, vec2 textureCoordinates);
- float get2DYPositionFraction(vec2 textureCoordinates);
-
- vec4 getPosition3DMode(vec3 position, float height, vec2 textureCoordinates)
- {
- return u_modifiedModelViewProjection * vec4(position, 1.0);
- }
-
- float get2DMercatorYPositionFraction(vec2 textureCoordinates)
- {
- // The width of a tile at level 11, in radians and assuming a single root tile, is
- // 2.0 * czm_pi / pow(2.0, 11.0)
- // We want to just linearly interpolate the 2D position from the texture coordinates
- // when we're at this level or higher. The constant below is the expression
- // above evaluated and then rounded up at the 4th significant digit.
- const float maxTileWidth = 0.003068;
- float positionFraction = textureCoordinates.y;
- float southLatitude = u_southAndNorthLatitude.x;
- float northLatitude = u_southAndNorthLatitude.y;
- if (northLatitude - southLatitude > maxTileWidth)
- {
- float southMercatorY = u_southMercatorYAndOneOverHeight.x;
- float oneOverMercatorHeight = u_southMercatorYAndOneOverHeight.y;
-
- float currentLatitude = mix(southLatitude, northLatitude, textureCoordinates.y);
- currentLatitude = clamp(currentLatitude, -czm_webMercatorMaxLatitude, czm_webMercatorMaxLatitude);
- positionFraction = czm_latitudeToWebMercatorFraction(currentLatitude, southMercatorY, oneOverMercatorHeight);
- }
- return positionFraction;
- }
-
- float get2DGeographicYPositionFraction(vec2 textureCoordinates)
- {
- return textureCoordinates.y;
- }
-
- vec4 getPositionPlanarEarth(vec3 position, float height, vec2 textureCoordinates)
- {
- float yPositionFraction = get2DYPositionFraction(textureCoordinates);
- vec4 rtcPosition2D = vec4(height, mix(u_tileRectangle.st, u_tileRectangle.pq, vec2(textureCoordinates.x, yPositionFraction)), 1.0);
- return u_modifiedModelViewProjection * rtcPosition2D;
- }
-
- vec4 getPosition2DMode(vec3 position, float height, vec2 textureCoordinates)
- {
- return getPositionPlanarEarth(position, 0.0, textureCoordinates);
- }
-
- vec4 getPositionColumbusViewMode(vec3 position, float height, vec2 textureCoordinates)
- {
- return getPositionPlanarEarth(position, height, textureCoordinates);
- }
-
- vec4 getPositionMorphingMode(vec3 position, float height, vec2 textureCoordinates)
- {
- // We do not do RTC while morphing, so there is potential for jitter.
- // This is unlikely to be noticeable, though.
- vec3 position3DWC = position + u_center3D;
- float yPositionFraction = get2DYPositionFraction(textureCoordinates);
- vec4 position2DWC = vec4(height, mix(u_tileRectangle.st, u_tileRectangle.pq, vec2(textureCoordinates.x, yPositionFraction)), 1.0);
- vec4 morphPosition = czm_columbusViewMorph(position2DWC, vec4(position3DWC, 1.0), czm_morphTime);
- vec4 morphPositionEC = czm_modelView * morphPosition;
- return czm_projection * morphPositionEC;
- }
-
- #ifdef QUANTIZATION_BITS12
- uniform vec2 u_minMaxHeight;
- uniform mat4 u_scaleAndBias;
- #endif
-
- void main()
- {
- #ifdef QUANTIZATION_BITS12
- vec2 xy = czm_decompressTextureCoordinates(compressed0.x);
- vec2 zh = czm_decompressTextureCoordinates(compressed0.y);
- vec3 position = vec3(xy, zh.x);
- float height = zh.y;
- vec2 textureCoordinates = czm_decompressTextureCoordinates(compressed0.z);
-
- height = height * (u_minMaxHeight.y - u_minMaxHeight.x) + u_minMaxHeight.x;
- position = (u_scaleAndBias * vec4(position, 1.0)).xyz;
-
- #if (defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL)) && defined(INCLUDE_WEB_MERCATOR_Y) || defined(APPLY_MATERIAL)
- float webMercatorT = czm_decompressTextureCoordinates(compressed0.w).x;
- float encodedNormal = compressed1;
- #elif defined(INCLUDE_WEB_MERCATOR_Y)
- float webMercatorT = czm_decompressTextureCoordinates(compressed0.w).x;
- float encodedNormal = 0.0;
- #elif defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)
- float webMercatorT = textureCoordinates.y;
- float encodedNormal = compressed0.w;
- #else
- float webMercatorT = textureCoordinates.y;
- float encodedNormal = 0.0;
- #endif
-
- #else
- // A single float per element
- vec3 position = position3DAndHeight.xyz;
- float height = position3DAndHeight.w;
- vec2 textureCoordinates = textureCoordAndEncodedNormals.xy;
-
- #if (defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)) && defined(INCLUDE_WEB_MERCATOR_Y)
- float webMercatorT = textureCoordAndEncodedNormals.z;
- float encodedNormal = textureCoordAndEncodedNormals.w;
- #elif defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)
- float webMercatorT = textureCoordinates.y;
- float encodedNormal = textureCoordAndEncodedNormals.z;
- #elif defined(INCLUDE_WEB_MERCATOR_Y)
- float webMercatorT = textureCoordAndEncodedNormals.z;
- float encodedNormal = 0.0;
- #else
- float webMercatorT = textureCoordinates.y;
- float encodedNormal = 0.0;
- #endif
-
- #endif
-
- vec3 position3DWC = position + u_center3D;
-
- #ifdef GEODETIC_SURFACE_NORMALS
- vec3 ellipsoidNormal = geodeticSurfaceNormal;
- #else
- vec3 ellipsoidNormal = normalize(position3DWC);
- #endif
-
- #if defined(EXAGGERATION) && defined(GEODETIC_SURFACE_NORMALS)
- float exaggeration = u_verticalExaggerationAndRelativeHeight.x;
- float relativeHeight = u_verticalExaggerationAndRelativeHeight.y;
- float newHeight = (height - relativeHeight) * exaggeration + relativeHeight;
-
- // stop from going through center of earth
- float minRadius = min(min(czm_ellipsoidRadii.x, czm_ellipsoidRadii.y), czm_ellipsoidRadii.z);
- newHeight = max(newHeight, -minRadius);
-
- vec3 offset = ellipsoidNormal * (newHeight - height);
- position += offset;
- position3DWC += offset;
- height = newHeight;
- #endif
-
- gl_Position = getPosition(position, height, textureCoordinates);
-
- v_positionEC = (u_modifiedModelView * vec4(position, 1.0)).xyz;
- v_positionMC = position3DWC; // position in model coordinates
-
- v_textureCoordinates = vec3(textureCoordinates, webMercatorT);
-
- #if defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)
- vec3 normalMC = czm_octDecode(encodedNormal);
-
- #if defined(EXAGGERATION) && defined(GEODETIC_SURFACE_NORMALS)
- vec3 projection = dot(normalMC, ellipsoidNormal) * ellipsoidNormal;
- vec3 rejection = normalMC - projection;
- normalMC = normalize(projection + rejection * exaggeration);
- #endif
-
- v_normalMC = normalMC;
- v_normalEC = czm_normal3D * v_normalMC;
- #endif
-
- #ifdef ENABLE_CLIPPING_POLYGONS
- vec2 sphericalLatLong = czm_approximateSphericalCoordinates(position3DWC);
- sphericalLatLong.y = czm_branchFreeTernary(sphericalLatLong.y < czm_pi, sphericalLatLong.y, sphericalLatLong.y - czm_twoPi);
-
- vec2 minDistance = vec2(czm_infinity);
- v_clippingPosition = vec2(czm_infinity);
- v_regionIndex = -1;
-
- for (int regionIndex = 0; regionIndex < CLIPPING_POLYGON_REGIONS_LENGTH; regionIndex++) {
- vec4 extents = unpackClippingExtents(u_clippingExtents, regionIndex);
- vec2 rectUv = (sphericalLatLong.yx - extents.yx) * extents.wz;
-
- vec2 clamped = clamp(rectUv, vec2(0.0), vec2(1.0));
- vec2 distance = abs(rectUv - clamped) * extents.wz;
-
- float threshold = 0.01;
- if (minDistance.x > distance.x || minDistance.y > distance.y) {
- minDistance = distance;
- v_clippingPosition = rectUv;
- if (rectUv.x > threshold && rectUv.y > threshold && rectUv.x < 1.0 - threshold && rectUv.y < 1.0 - threshold) {
- v_regionIndex = regionIndex;
- }
- }
- }
- #endif
-
- #if defined(FOG) || (defined(GROUND_ATMOSPHERE) && !defined(PER_FRAGMENT_GROUND_ATMOSPHERE))
-
- bool dynamicLighting = false;
-
- #if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_DAYNIGHT_SHADING) || defined(ENABLE_VERTEX_LIGHTING))
- dynamicLighting = true;
- #endif
-
- #if defined(DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN)
- vec3 atmosphereLightDirection = czm_sunDirectionWC;
- #else
- vec3 atmosphereLightDirection = czm_lightDirectionWC;
- #endif
-
- vec3 lightDirection = czm_branchFreeTernary(dynamicLighting, atmosphereLightDirection, normalize(position3DWC));
-
- computeAtmosphereScattering(
- position3DWC,
- lightDirection,
- v_atmosphereRayleighColor,
- v_atmosphereMieColor,
- v_atmosphereOpacity
- );
- #endif
-
- #if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)
- v_distance = length((czm_modelView3D * vec4(position3DWC, 1.0)).xyz);
- #endif
-
- #ifdef APPLY_MATERIAL
- float northPoleZ = czm_ellipsoidRadii.z;
- vec3 northPolePositionMC = vec3(0.0, 0.0, northPoleZ);
- vec3 vectorEastMC = normalize(cross(northPolePositionMC - v_positionMC, ellipsoidNormal));
- float dotProd = abs(dot(ellipsoidNormal, v_normalMC));
- v_slope = acos(dotProd);
- vec3 normalRejected = ellipsoidNormal * dotProd;
- vec3 normalProjected = v_normalMC - normalRejected;
- vec3 aspectVector = normalize(normalProjected);
- v_aspect = acos(dot(aspectVector, vectorEastMC));
- float determ = dot(cross(vectorEastMC, aspectVector), ellipsoidNormal);
- v_aspect = czm_branchFreeTernary(determ < 0.0, 2.0 * czm_pi - v_aspect, v_aspect);
- v_height = height;
- #endif
- }
- `;var Xw=`void computeAtmosphereScattering(vec3 positionWC, vec3 lightDirection, out vec3 rayleighColor, out vec3 mieColor, out float opacity) {
-
- vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC;
- vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);
- czm_ray primaryRay = czm_ray(czm_viewerPositionWC, cameraToPositionWCDirection);
-
- float atmosphereInnerRadius = length(positionWC);
-
- computeScattering(
- primaryRay,
- length(cameraToPositionWC),
- lightDirection,
- atmosphereInnerRadius,
- rayleighColor,
- mieColor,
- opacity
- );
- }
- `;var Mxt=new z;function Bxt(e,t){let n=e.unionClippingRegions,i=e.length,o=ma.useFloatTexture(t),r=ma.getTextureResolution(e,t,Mxt),a=r.x,s=r.y,c=o?Fxt(a,s):kxt(a,s);return c+=`
- `,c+=n?Lxt(i):Nxt(i),c}function Lxt(e){return`float clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix)
- {
- vec4 position = czm_windowToEyeCoordinates(fragCoord);
- vec3 clipNormal = vec3(0.0);
- vec3 clipPosition = vec3(0.0);
- float clipAmount;
- float pixelWidth = czm_metersPerPixel(position);
- bool breakAndDiscard = false;
- for (int i = 0; i < ${e}; ++i)
- {
- vec4 clippingPlane = getClippingPlane(clippingPlanes, i, clippingPlanesMatrix);
- clipNormal = clippingPlane.xyz;
- clipPosition = -clippingPlane.w * clipNormal;
- float amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth;
- clipAmount = czm_branchFreeTernary(i == 0, amount, min(amount, clipAmount));
- if (amount <= 0.0)
- {
- breakAndDiscard = true;
- // HLSL compiler bug if we discard here: https://bugs.chromium.org/p/angleproject/issues/detail?id=1945#c6
- break;
- }
- }
- if (breakAndDiscard) {
- discard;
- }
- return clipAmount;
- }
- `}function Nxt(e){return`float clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix)
- {
- bool clipped = true;
- vec4 position = czm_windowToEyeCoordinates(fragCoord);
- vec3 clipNormal = vec3(0.0);
- vec3 clipPosition = vec3(0.0);
- float clipAmount = 0.0;
- float pixelWidth = czm_metersPerPixel(position);
- for (int i = 0; i < ${e}; ++i)
- {
- vec4 clippingPlane = getClippingPlane(clippingPlanes, i, clippingPlanesMatrix);
- clipNormal = clippingPlane.xyz;
- clipPosition = -clippingPlane.w * clipNormal;
- float amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth;
- clipAmount = max(amount, clipAmount);
- clipped = clipped && (amount <= 0.0);
- }
- if (clipped)
- {
- discard;
- }
- return clipAmount;
- }
- `}function Fxt(e,t){let n=1/e,i=1/t,o=`${n}`;o.indexOf(".")===-1&&(o+=".0");let r=`${i}`;return r.indexOf(".")===-1&&(r+=".0"),`vec4 getClippingPlane(highp sampler2D packedClippingPlanes, int clippingPlaneNumber, mat4 transform)
- {
- int pixY = clippingPlaneNumber / ${e};
- int pixX = clippingPlaneNumber - (pixY * ${e});
- // Sample from center of pixel
- float u = (float(pixX) + 0.5) * ${o};
- float v = (float(pixY) + 0.5) * ${r};
- vec4 plane = texture(packedClippingPlanes, vec2(u, v));
- return czm_transformPlane(plane, transform);
- }
- `}function kxt(e,t){let n=1/e,i=1/t,o=`${n}`;o.indexOf(".")===-1&&(o+=".0");let r=`${i}`;return r.indexOf(".")===-1&&(r+=".0"),`vec4 getClippingPlane(highp sampler2D packedClippingPlanes, int clippingPlaneNumber, mat4 transform)
- {
- int clippingPlaneStartIndex = clippingPlaneNumber * 2;
- int pixY = clippingPlaneStartIndex / ${e};
- int pixX = clippingPlaneStartIndex - (pixY * ${e});
- // Sample from center of pixel
- float u = (float(pixX) + 0.5) * ${o};
- float v = (float(pixY) + 0.5) * ${r};
- vec4 oct32 = texture(packedClippingPlanes, vec2(u, v)) * 255.0;
- vec2 oct = vec2(oct32.x * 256.0 + oct32.y, oct32.z * 256.0 + oct32.w);
- vec4 plane;
- plane.xyz = czm_octDecode(oct, 65535.0);
- plane.w = czm_unpackFloat(texture(packedClippingPlanes, vec2(u + ${o}, v)));
- return czm_transformPlane(plane, transform);
- }
- `}var rT=Bxt;function zxt(e,t,n,i,o,r){this.numberOfDayTextures=e,this.flags=t,this.material=n,this.shaderProgram=i,this.clippingShaderState=o,this.clippingPolygonShaderState=r}function Qee(){this.baseVertexShaderSource=void 0,this.baseFragmentShaderSource=void 0,this._shadersByTexturesFlags=[],this.material=void 0}function Uxt(e){let t="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPosition3DMode(position, height, textureCoordinates); }",n="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPositionColumbusViewMode(position, height, textureCoordinates); }",i="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPositionMorphingMode(position, height, textureCoordinates); }",o;switch(e){case ie.SCENE3D:o=t;break;case ie.SCENE2D:case ie.COLUMBUS_VIEW:o=n;break;case ie.MORPHING:o=i;break}return o}function Vxt(e){return e.webgl2?`void clipPolygons(highp sampler2D clippingDistance, int regionsLength, vec2 clippingPosition, int regionIndex) {
- czm_clipPolygons(clippingDistance, regionsLength, clippingPosition, regionIndex);
- }`:`void clipPolygons(highp sampler2D clippingDistance, int regionsLength, vec2 clippingPosition, int regionIndex) {
- }`}function jxt(e){return e.webgl2?`vec4 unpackClippingExtents(highp sampler2D extentsTexture, int index) {
- return czm_unpackClippingExtents(extentsTexture, index);
- }`:`vec4 unpackClippingExtents(highp sampler2D extentsTexture, int index) {
- return vec4();
- }`}function Gxt(e){return e?"float get2DYPositionFraction(vec2 textureCoordinates) { return get2DMercatorYPositionFraction(textureCoordinates); }":"float get2DYPositionFraction(vec2 textureCoordinates) { return get2DGeographicYPositionFraction(textureCoordinates); }"}Qee.prototype.getShaderProgram=function(e){let t=e.frameState,n=e.surfaceTile,i=e.numberOfDayTextures,o=e.applyBrightness,r=e.applyContrast,a=e.applyHue,s=e.applySaturation,c=e.applyGamma,u=e.applyAlpha,f=e.applyDayNightAlpha,d=e.applySplit,p=e.hasWaterMask,g=e.showReflectiveOcean,m=e.showOceanWaves,A=e.enableLighting,y=e.dynamicAtmosphereLighting,x=e.dynamicAtmosphereLightingFromSun,b=e.showGroundAtmosphere,C=e.perFragmentGroundAtmosphere,E=e.hasVertexNormals,S=e.useWebMercatorProjection,w=e.enableFog,P=e.enableClippingPlanes,R=e.clippingPlanes,B=e.enableClippingPolygons,L=e.clippingPolygons,_=e.clippedByBoundaries,T=e.hasImageryLayerCutout,v=e.colorCorrect,I=e.highlightFillTile,O=e.colorToAlpha,N=e.hasGeodeticSurfaceNormals,j=e.hasExaggeration,k=e.showUndergroundColor,U=e.translucent,F=0,H="",J=n.renderedMesh.encoding;J.quantization===Ws.BITS12&&(F=1,H="QUANTIZATION_BITS12");let Z=0,K="";_&&(Z=1,K="TILE_LIMIT_RECTANGLE");let le=0,me="";T&&(le=1,me="APPLY_IMAGERY_CUTOUT");let ae=t.mode,be=((ae|o<<2|r<<3|a<<4|s<<5|c<<6|u<<7|p<<8|g<<9|m<<10|A<<11|y<<12|x<<13|b<<14|C<<15|E<<16|S<<17|w<<18|F<<19|d<<20|P<<21|B<<22|Z<<23|le<<24|v<<25|I<<26|O<<27|N<<28|j<<29|k<<30|U<<31)>>>0)+(f?4294967296:0),ge=0;l(R)&&R.length>0&&(ge=P?R.clippingPlanesState:0);let we=0;l(L)&&L.length>0&&(we=B?L.clippingPolygonsState:0);let Ee=n.surfaceShader;if(l(Ee)&&Ee.numberOfDayTextures===i&&Ee.flags===be&&Ee.material===this.material&&Ee.clippingShaderState===ge&&Ee.clippingPolygonShaderState===we)return Ee.shaderProgram;let Be=this._shadersByTexturesFlags[i];if(l(Be)||(Be=this._shadersByTexturesFlags[i]=[]),Ee=Be[be],!l(Ee)||Ee.material!==this.material||Ee.clippingShaderState!==ge||Ee.clippingPolygonShaderState!==we){let ke=this.baseVertexShaderSource.clone(),Ge=this.baseFragmentShaderSource.clone();ge!==0&&Ge.sources.unshift(rT(R,t.context)),we!==0&&(Ge.sources.unshift(Vxt(t.context)),ke.sources.unshift(jxt(t.context))),ke.defines.push(H),Ge.defines.push(`TEXTURE_UNITS ${i}`,K,me),o&&Ge.defines.push("APPLY_BRIGHTNESS"),r&&Ge.defines.push("APPLY_CONTRAST"),a&&Ge.defines.push("APPLY_HUE"),s&&Ge.defines.push("APPLY_SATURATION"),c&&Ge.defines.push("APPLY_GAMMA"),u&&Ge.defines.push("APPLY_ALPHA"),f&&Ge.defines.push("APPLY_DAY_NIGHT_ALPHA"),p&&Ge.defines.push("HAS_WATER_MASK"),g&&(Ge.defines.push("SHOW_REFLECTIVE_OCEAN"),ke.defines.push("SHOW_REFLECTIVE_OCEAN")),m&&Ge.defines.push("SHOW_OCEAN_WAVES"),O&&Ge.defines.push("APPLY_COLOR_TO_ALPHA"),k&&(ke.defines.push("UNDERGROUND_COLOR"),Ge.defines.push("UNDERGROUND_COLOR")),U&&(ke.defines.push("TRANSLUCENT"),Ge.defines.push("TRANSLUCENT")),A&&(E?(ke.defines.push("ENABLE_VERTEX_LIGHTING"),Ge.defines.push("ENABLE_VERTEX_LIGHTING")):(ke.defines.push("ENABLE_DAYNIGHT_SHADING"),Ge.defines.push("ENABLE_DAYNIGHT_SHADING"))),y&&(ke.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING"),Ge.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING"),x&&(ke.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN"),Ge.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN"))),b&&(ke.defines.push("GROUND_ATMOSPHERE"),Ge.defines.push("GROUND_ATMOSPHERE"),C&&(ke.defines.push("PER_FRAGMENT_GROUND_ATMOSPHERE"),Ge.defines.push("PER_FRAGMENT_GROUND_ATMOSPHERE"))),ke.defines.push("INCLUDE_WEB_MERCATOR_Y"),Ge.defines.push("INCLUDE_WEB_MERCATOR_Y"),w&&(ke.defines.push("FOG"),Ge.defines.push("FOG")),d&&Ge.defines.push("APPLY_SPLIT"),P&&Ge.defines.push("ENABLE_CLIPPING_PLANES"),B&&(Ge.defines.push("ENABLE_CLIPPING_POLYGONS"),ke.defines.push("ENABLE_CLIPPING_POLYGONS"),L.inverse&&Ge.defines.push("CLIPPING_INVERSE"),Ge.defines.push(`CLIPPING_POLYGON_REGIONS_LENGTH ${L.extentsCount}`),ke.defines.push(`CLIPPING_POLYGON_REGIONS_LENGTH ${L.extentsCount}`)),v&&Ge.defines.push("COLOR_CORRECT"),I&&Ge.defines.push("HIGHLIGHT_FILL_TILE"),N&&ke.defines.push("GEODETIC_SURFACE_NORMALS"),j&&ke.defines.push("EXAGGERATION");let rt=` vec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates, float nightBlend)
- {
- vec4 color = initialColor;
- `;T&&(rt+=` vec4 cutoutAndColorResult;
- bool texelUnclipped;
- `);for(let Pe=0;Pe<i;++Pe)T?rt+=` cutoutAndColorResult = u_dayTextureCutoutRectangles[${Pe}];
- texelUnclipped = v_textureCoordinates.x < cutoutAndColorResult.x || cutoutAndColorResult.z < v_textureCoordinates.x || v_textureCoordinates.y < cutoutAndColorResult.y || cutoutAndColorResult.w < v_textureCoordinates.y;
- cutoutAndColorResult = sampleAndBlend(
- `:rt+=` color = sampleAndBlend(
- `,rt+=` color,
- u_dayTextures[${Pe}],
- u_dayTextureUseWebMercatorT[${Pe}] ? textureCoordinates.xz : textureCoordinates.xy,
- u_dayTextureTexCoordsRectangle[${Pe}],
- u_dayTextureTranslationAndScale[${Pe}],
- ${u?`u_dayTextureAlpha[${Pe}]`:"1.0"},
- ${f?`u_dayTextureNightAlpha[${Pe}]`:"1.0"},
- ${f?`u_dayTextureDayAlpha[${Pe}]`:"1.0"},
- ${o?`u_dayTextureBrightness[${Pe}]`:"0.0"},
- ${r?`u_dayTextureContrast[${Pe}]`:"0.0"},
- ${a?`u_dayTextureHue[${Pe}]`:"0.0"},
- ${s?`u_dayTextureSaturation[${Pe}]`:"0.0"},
- ${c?`u_dayTextureOneOverGamma[${Pe}]`:"0.0"},
- ${d?`u_dayTextureSplit[${Pe}]`:"0.0"},
- ${O?`u_colorsToAlpha[${Pe}]`:"vec4(0.0)"},
- nightBlend);
- `,T&&(rt+=` color = czm_branchFreeTernary(texelUnclipped, cutoutAndColorResult, color);
- `);rt+=` return color;
- }`,Ge.sources.push(rt),ke.sources.push(Uxt(ae)),ke.sources.push(Gxt(S));let et=Kt.fromCache({context:t.context,vertexShaderSource:ke,fragmentShaderSource:Ge,attributeLocations:J.getAttributeLocations()});Ee=Be[be]=new zxt(i,be,this.material,et,ge,we)}return n.surfaceShader=Ee,Ee.shaderProgram};Qee.prototype.destroy=function(){let e,t,n=this._shadersByTexturesFlags;for(let i in n)if(n.hasOwnProperty(i)){let o=n[i];if(!l(o))continue;for(e in o)o.hasOwnProperty(e)&&(t=o[e],l(t)&&t.shaderProgram.destroy())}return fe(this)};var r3=Qee;var awe={NONE:-1,PARTIAL:0,FULL:1};Object.freeze(awe);var Vr=awe;var swe={START:0,LOADING:1,DONE:2,FAILED:3};Object.freeze(swe);var qs=swe;var cwe={FAILED:0,UNLOADED:1,RECEIVING:2,RECEIVED:3,TRANSFORMING:4,TRANSFORMED:5,READY:6};Object.freeze(cwe);var Io=cwe;function hr(){this.imagery=[],this.waterMaskTexture=void 0,this.waterMaskTranslationAndScale=new se(0,0,1,1),this.terrainData=void 0,this.vertexArray=void 0,this.tileBoundingRegion=void 0,this.occludeePointInScaledSpace=new h,this.boundingVolumeSourceTile=void 0,this.boundingVolumeIsFromMesh=!1,this.terrainState=Io.UNLOADED,this.mesh=void 0,this.fill=void 0,this.pickBoundingSphere=new ce,this.surfaceShader=void 0,this.isClipped=!0,this.clippedByBoundaries=!1}Object.defineProperties(hr.prototype,{eligibleForUnloading:{get:function(){let e=this.terrainState,n=!(e===Io.RECEIVING||e===Io.TRANSFORMING),i=this.imagery;for(let o=0,r=i.length;n&&o<r;++o){let a=i[o];n=!l(a.loadingImagery)||a.loadingImagery.state!==Vn.TRANSITIONING}return n}},renderedMesh:{get:function(){if(l(this.vertexArray))return this.mesh;if(l(this.fill))return this.fill.mesh}}});hr.prototype.pick=function(e,t,n,i,o){if(!l(this.renderedMesh))return;let r=this.renderedMesh.pick(e,i,t,n);return h.clone(r,o)};hr.prototype.freeResources=function(){l(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,this.waterMaskTexture.referenceCount===0&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0),this.terrainData=void 0,this.terrainState=Io.UNLOADED,this.mesh=void 0,this.fill=this.fill&&this.fill.destroy();let e=this.imagery;for(let t=0,n=e.length;t<n;++t)e[t].freeResources();this.imagery.length=0,this.freeVertexArray()};hr.prototype.freeVertexArray=function(){hr._freeVertexArray(this.vertexArray),this.vertexArray=void 0,hr._freeVertexArray(this.wireframeVertexArray),this.wireframeVertexArray=void 0};hr.initialize=function(e,t,n){let i=e.data;l(i)||(i=e.data=new hr),e.state===qs.START&&(Hxt(e,t,n),e.state=qs.LOADING)};hr.processStateMachine=function(e,t,n,i,o,r,a){hr.initialize(e,n,i);let s=e.data;if(e.state===qs.LOADING&&Wxt(e,t,n,i,o,r),a)return;let c=e.renderable;e.renderable=l(s.vertexArray);let u=s.terrainState===Io.READY;e.upsampledFromParent=l(s.terrainData)&&s.terrainData.wasCreatedByUpsampling();let f=s.processImagery(e,n,t);if(u&&f){let d=e._loadedCallbacks,p={};for(let g in d)d.hasOwnProperty(g)&&(d[g](e)||(p[g]=d[g]));e._loadedCallbacks=p,e.state=qs.DONE}c&&(e.renderable=!0)};hr.prototype.processImagery=function(e,t,n,i){let o=e.data,r=e.upsampledFromParent,a=!1,s=!0,c=o.imagery,u,f;for(u=0,f=c.length;u<f;++u){let d=c[u];if(!l(d.loadingImagery)){r=!1;continue}if(d.loadingImagery.state===Vn.PLACEHOLDER){let g=d.loadingImagery.imageryLayer;if(g.ready){d.freeResources(),c.splice(u,1),g._createTileImagerySkeletons(e,t,u),--u,f=c.length;continue}else r=!1}let p=d.processStateMachine(e,n,i);s=s&&p,a=a||p||l(d.readyImagery),r=r&&l(d.loadingImagery)&&(d.loadingImagery.state===Vn.FAILED||d.loadingImagery.state===Vn.INVALID)}return e.upsampledFromParent=r,e.renderable=e.renderable&&(a||s),s};function lwe(e,t,n,i){let o=e.renderedMesh,r=o.vertices,a=o.encoding,s=r.length/a.stride,c=dr.clone(a);c.hasGeodeticSurfaceNormals=t,c=dr.clone(c);let u=c.stride,f=new Float32Array(s*u);t?a.addGeodeticSurfaceNormals(r,f,n):a.removeGeodeticSurfaceNormals(r,f),o.vertices=f,o.stride=u,o!==e.mesh?(hr._freeVertexArray(e.fill.vertexArray),e.fill.vertexArray=hr._createVertexArrayForMesh(i.context,o)):(hr._freeVertexArray(e.vertexArray),e.vertexArray=hr._createVertexArrayForMesh(i.context,o)),hr._freeVertexArray(e.wireframeVertexArray),e.wireframeVertexArray=void 0}hr.prototype.addGeodeticSurfaceNormals=function(e,t){lwe(this,!0,e,t)};hr.prototype.removeGeodeticSurfaceNormals=function(e){lwe(this,!1,void 0,e)};hr.prototype.updateExaggeration=function(e,t,n){let i=this,o=i.renderedMesh;if(o===void 0)return;let r=t.verticalExaggeration,a=t.verticalExaggerationRelativeHeight,s=r!==1,c=o.encoding,u=c.exaggeration!==r,f=c.exaggerationRelativeHeight!==a;if(u||f){if(u)if(s&&!c.hasGeodeticSurfaceNormals){let p=e.tilingScheme.ellipsoid;i.addGeodeticSurfaceNormals(p,t)}else!s&&c.hasGeodeticSurfaceNormals&&i.removeGeodeticSurfaceNormals(t);if(c.exaggeration=r,c.exaggerationRelativeHeight=a,n!==void 0){n._tileToUpdateHeights.push(e);let p=e.customData;for(let g of p)g.level=-1}o.updateExaggeration(r,a)}};hr.prototype.updateSceneMode=function(e){let n=this.renderedMesh;n!==void 0&&n.updateSceneMode(e)};function Hxt(e,t,n){let i=t.getTileDataAvailable(e.x,e.y,e.level);if(!l(i)&&l(e.parent)){let o=e.parent,r=o.data;l(r)&&l(r.terrainData)&&(i=r.terrainData.isChildAvailable(o.x,o.y,e.x,e.y))}i===!1&&(e.data.terrainState=Io.FAILED);for(let o=0,r=n.length;o<r;++o){let a=n.get(o);a.show&&a._createTileImagerySkeletons(e,t)}}function Wxt(e,t,n,i,o,r){let a=e.data,s=e.parent;if(a.terrainState===Io.FAILED&&s!==void 0&&(s.data!==void 0&&s.data.terrainData!==void 0&&s.data.terrainData.canUpsample!==!1||hr.processStateMachine(s,t,n,i,o,r,!0)),a.terrainState===Io.FAILED&&qxt(a,e,t,n,e.x,e.y,e.level),a.terrainState===Io.UNLOADED&&Yxt(a,n,e.x,e.y,e.level),a.terrainState===Io.RECEIVED&&Kxt(a,t,n,e.x,e.y,e.level),a.terrainState===Io.TRANSFORMED&&(Qxt(a,t.context,n,e.x,e.y,e.level,r),a.updateExaggeration(e,t,o)),a.terrainState>=Io.RECEIVED&&a.waterMaskTexture===void 0&&n.hasWaterMask)if(a.terrainData.waterMask!==void 0)Jxt(t.context,a);else{let u=a._findAncestorTileWithTerrainData(e);l(u)&&l(u.data.waterMaskTexture)&&(a.waterMaskTexture=u.data.waterMaskTexture,++a.waterMaskTexture.referenceCount,a._computeWaterMaskTranslationAndScale(e,u,a.waterMaskTranslationAndScale))}}function qxt(e,t,n,i,o,r,a){let s=t.parent;if(!s){t.state=qs.FAILED;return}let c=s.data.terrainData,u=s.x,f=s.y,d=s.level;if(!l(c))return;let p=c.upsample(i.tilingScheme,u,f,d,o,r,a);l(p)&&(e.terrainState=Io.RECEIVING,Promise.resolve(p).then(function(g){l(g)&&(e.terrainData=g,e.terrainState=Io.RECEIVED)}).catch(function(){e.terrainState=Io.FAILED}))}function Yxt(e,t,n,i,o){function r(c){if(!l(c)){e.terrainState=Io.UNLOADED,e.request=void 0;return}e.terrainData=c,e.terrainState=Io.RECEIVED,e.request=void 0}function a(c){if(e.request.state===di.CANCELLED){e.terrainData=void 0,e.terrainState=Io.UNLOADED,e.request=void 0;return}e.terrainState=Io.FAILED,e.request=void 0;let u=`Failed to obtain terrain tile X: ${n} Y: ${i} Level: ${o}. Error message: "${c}"`;t._requestError=Go.reportError(t._requestError,t,t.errorEvent,u,n,i,o),t._requestError.retry&&s()}function s(){let c=new _r({throttle:!1,throttleByServer:!0,type:qa.TERRAIN});e.request=c;let u=t.requestTileGeometry(n,i,o,c);l(u)?(e.terrainState=Io.RECEIVING,Promise.resolve(u).then(function(f){r(f)}).catch(function(f){a(f)})):(e.terrainState=Io.UNLOADED,e.request=void 0)}s()}var Xxt={tilingScheme:void 0,x:0,y:0,level:0,exaggeration:1,exaggerationRelativeHeight:0,throttle:!0};function Kxt(e,t,n,i,o,r){let a=n.tilingScheme,s=Xxt;s.tilingScheme=a,s.x=i,s.y=o,s.level=r,s.exaggeration=t.verticalExaggeration,s.exaggerationRelativeHeight=t.verticalExaggerationRelativeHeight,s.throttle=!0;let u=e.terrainData.createMesh(s);l(u)&&(e.terrainState=Io.TRANSFORMING,Promise.resolve(u).then(function(f){e.mesh=f,e.terrainState=Io.TRANSFORMED}).catch(function(){e.terrainState=Io.FAILED}))}hr._createVertexArrayForMesh=function(e,t){let n=t.vertices,i=Ke.createVertexBuffer({context:e,typedArray:n,usage:Oe.STATIC_DRAW}),o=t.encoding.getAttributes(i),r=t.indices.indexBuffers||{},a=r[e.id];if(!l(a)||a.isDestroyed()){let s=t.indices;a=Ke.createIndexBuffer({context:e,typedArray:s,usage:Oe.STATIC_DRAW,indexDatatype:Ue.fromSizeInBytes(s.BYTES_PER_ELEMENT)}),a.vertexArrayDestroyable=!1,a.referenceCount=1,r[e.id]=a,t.indices.indexBuffers=r}else++a.referenceCount;return new Fn({context:e,attributes:o,indexBuffer:a})};hr._freeVertexArray=function(e){if(l(e)){let t=e.indexBuffer;e.isDestroyed()||e.destroy(),l(t)&&!t.isDestroyed()&&l(t.referenceCount)&&(--t.referenceCount,t.referenceCount===0&&t.destroy())}};function Qxt(e,t,n,i,o,r,a){e.vertexArray=hr._createVertexArrayForMesh(t,e.mesh),e.terrainState=Io.READY,e.fill=e.fill&&e.fill.destroy(a)}function $xt(e){let t=e.cache.tile_waterMaskData;if(!l(t)){let n=It.create({context:e,pixelFormat:Xe.LUMINANCE,pixelDatatype:je.UNSIGNED_BYTE,source:{arrayBufferView:new Uint8Array([255]),width:1,height:1}});n.referenceCount=1;let i=new jt({wrapS:un.CLAMP_TO_EDGE,wrapT:un.CLAMP_TO_EDGE,minificationFilter:Vt.LINEAR,magnificationFilter:ti.LINEAR});t={allWaterTexture:n,sampler:i,destroy:function(){this.allWaterTexture.destroy()}},e.cache.tile_waterMaskData=t}return t}function Jxt(e,t){let n=t.terrainData.waterMask,i=$xt(e),o,r=n.length;if(n instanceof ImageBitmap)o=It.create({context:e,source:n,sampler:i.sampler,flipY:!1,skipColorSpaceConversion:!0});else if(r===1)if(n[0]!==0)o=i.allWaterTexture;else return;else{let a=Math.sqrt(r);o=It.create({context:e,pixelFormat:Xe.LUMINANCE,pixelDatatype:je.UNSIGNED_BYTE,source:{width:a,height:a,arrayBufferView:n},sampler:i.sampler,flipY:!1}),o.referenceCount=0}++o.referenceCount,t.waterMaskTexture=o,se.fromElements(0,0,1,1,t.waterMaskTranslationAndScale)}hr.prototype._findAncestorTileWithTerrainData=function(e){let t=e.parent;for(;l(t)&&(!l(t.data)||!l(t.data.terrainData)||t.data.terrainData.wasCreatedByUpsampling());)t=t.parent;return t};hr.prototype._computeWaterMaskTranslationAndScale=function(e,t,n){let i=t.rectangle,o=e.rectangle,r=o.width,a=o.height,s=r/i.width,c=a/i.height;return n.x=s*(o.west-i.west)/r,n.y=c*(o.south-i.south)/a,n.z=s,n.w=c,n};var lh=hr;var Zxt={WEST:0,NORTH:1,EAST:2,SOUTH:3,NORTHWEST:4,NORTHEAST:5,SOUTHWEST:6,SOUTHEAST:7},Tn=Zxt;var uwe={NONE:0,CULLED:1,RENDERED:2,REFINED:3,RENDERED_AND_KICKED:6,REFINED_AND_KICKED:7,CULLED_BUT_NEEDED:9,wasKicked:function(e){return e>=uwe.RENDERED_AND_KICKED},originalResult:function(e){return e&3},kick:function(e){return e|4}},oi=uwe;function Qw(e){this.tile=e,this.frameLastUpdated=void 0,this.westMeshes=[],this.westTiles=[],this.southMeshes=[],this.southTiles=[],this.eastMeshes=[],this.eastTiles=[],this.northMeshes=[],this.northTiles=[],this.southwestMesh=void 0,this.southwestTile=void 0,this.southeastMesh=void 0,this.southeastTile=void 0,this.northwestMesh=void 0,this.northwestTile=void 0,this.northeastMesh=void 0,this.northeastTile=void 0,this.changedThisFrame=!0,this.visitedFrame=void 0,this.enqueuedFrame=void 0,this.mesh=void 0,this.vertexArray=void 0,this.waterMaskTexture=void 0,this.waterMaskTranslationAndScale=new se}Qw.prototype.update=function(e,t,n){this.changedThisFrame&&(_we(e,t,this.tile,n),this.changedThisFrame=!1)};Qw.prototype.destroy=function(e){this._destroyVertexArray(e),l(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,this.waterMaskTexture.referenceCount===0&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0)};Qw.prototype._destroyVertexArray=function(e){l(this.vertexArray)&&(l(e)?e.push(this.vertexArray):lh._freeVertexArray(this.vertexArray),this.vertexArray=void 0)};var ebt=new RA;Qw.updateFillTiles=function(e,t,n,i){let o=e._quadtree,r=o._levelZeroTiles,a=o._lastSelectionFrameNumber,s=ebt;s.clear();for(let u=0;u<t.length;++u){let f=t[u];l(f.data.vertexArray)&&s.enqueue(t[u])}let c=s.dequeue();for(;c!==void 0;){let u=c.findTileToWest(r),f=c.findTileToSouth(r),d=c.findTileToEast(r),p=c.findTileToNorth(r);vs(e,n,c,u,a,Tn.EAST,!1,s,i),vs(e,n,c,f,a,Tn.NORTH,!1,s,i),vs(e,n,c,d,a,Tn.WEST,!1,s,i),vs(e,n,c,p,a,Tn.SOUTH,!1,s,i);let g=u.findTileToNorth(r),m=u.findTileToSouth(r),A=d.findTileToNorth(r),y=d.findTileToSouth(r);vs(e,n,c,g,a,Tn.SOUTHEAST,!1,s,i),vs(e,n,c,A,a,Tn.SOUTHWEST,!1,s,i),vs(e,n,c,m,a,Tn.NORTHEAST,!1,s,i),vs(e,n,c,y,a,Tn.NORTHWEST,!1,s,i),c=s.dequeue()}};function vs(e,t,n,i,o,r,a,s,c){if(i===void 0)return;let u=i;for(;u&&(u._lastSelectionResultFrame!==o||oi.wasKicked(u._lastSelectionResult)||oi.originalResult(u._lastSelectionResult)===oi.CULLED);){if(a)return;let f=u.parent;if(r>=Tn.NORTHWEST&&f!==void 0)switch(r){case Tn.NORTHWEST:u=u===f.northwestChild?f:void 0;break;case Tn.NORTHEAST:u=u===f.northeastChild?f:void 0;break;case Tn.SOUTHWEST:u=u===f.southwestChild?f:void 0;break;case Tn.SOUTHEAST:u=u===f.southeastChild?f:void 0;break}else u=f}if(u!==void 0){if(u._lastSelectionResult===oi.RENDERED){if(l(u.data.vertexArray))return;tbt(e,t,n,u,r,o,s,c);return}if(oi.originalResult(i._lastSelectionResult)!==oi.CULLED)switch(r){case Tn.WEST:vs(e,t,n,i.northwestChild,o,r,!0,s,c),vs(e,t,n,i.southwestChild,o,r,!0,s,c);break;case Tn.EAST:vs(e,t,n,i.southeastChild,o,r,!0,s,c),vs(e,t,n,i.northeastChild,o,r,!0,s,c);break;case Tn.SOUTH:vs(e,t,n,i.southwestChild,o,r,!0,s,c),vs(e,t,n,i.southeastChild,o,r,!0,s,c);break;case Tn.NORTH:vs(e,t,n,i.northeastChild,o,r,!0,s,c),vs(e,t,n,i.northwestChild,o,r,!0,s,c);break;case Tn.NORTHWEST:vs(e,t,n,i.northwestChild,o,r,!0,s,c);break;case Tn.NORTHEAST:vs(e,t,n,i.northeastChild,o,r,!0,s,c);break;case Tn.SOUTHWEST:vs(e,t,n,i.southwestChild,o,r,!0,s,c);break;case Tn.SOUTHEAST:vs(e,t,n,i.southeastChild,o,r,!0,s,c);break;default:throw new _e("Invalid edge")}}}function tbt(e,t,n,i,o,r,a,s){let c=i.data;if(c.fill===void 0)c.fill=new Qw(i);else if(c.fill.visitedFrame===r)return;c.fill.enqueuedFrame!==r&&(c.fill.enqueuedFrame=r,c.fill.changedThisFrame=!1,a.enqueue(i)),nbt(e,t,n,i,o,s)}function nbt(e,t,n,i,o,r){let a=i.data.fill,s,c=n.data.fill;l(c)?(c.visitedFrame=t.frameNumber,c.changedThisFrame&&(_we(e,t,n,r),c.changedThisFrame=!1),s=n.data.fill.mesh):s=n.data.mesh;let u,f;switch(o){case Tn.WEST:u=a.westMeshes,f=a.westTiles;break;case Tn.SOUTH:u=a.southMeshes,f=a.southTiles;break;case Tn.EAST:u=a.eastMeshes,f=a.eastTiles;break;case Tn.NORTH:u=a.northMeshes,f=a.northTiles;break;case Tn.NORTHWEST:a.changedThisFrame=a.changedThisFrame||a.northwestMesh!==s,a.northwestMesh=s,a.northwestTile=n;return;case Tn.NORTHEAST:a.changedThisFrame=a.changedThisFrame||a.northeastMesh!==s,a.northeastMesh=s,a.northeastTile=n;return;case Tn.SOUTHWEST:a.changedThisFrame=a.changedThisFrame||a.southwestMesh!==s,a.southwestMesh=s,a.southwestTile=n;return;case Tn.SOUTHEAST:a.changedThisFrame=a.changedThisFrame||a.southeastMesh!==s,a.southeastMesh=s,a.southeastTile=n;return}if(n.level<=i.level){a.changedThisFrame=a.changedThisFrame||u[0]!==s||u.length!==1,u[0]=s,f[0]=n,u.length=1,f.length=1;return}let d,p,g,m,A=n.rectangle,y,x=i.rectangle;switch(o){case Tn.WEST:for(y=(x.north-x.south)*D.EPSILON5,d=0;d<f.length&&(g=f[d],m=g.rectangle,!D.greaterThan(A.north,m.south,y));++d);for(p=d;p<f.length&&(g=f[p],m=g.rectangle,!D.greaterThanOrEquals(A.south,m.north,y));++p);break;case Tn.SOUTH:for(y=(x.east-x.west)*D.EPSILON5,d=0;d<f.length&&(g=f[d],m=g.rectangle,!D.lessThan(A.west,m.east,y));++d);for(p=d;p<f.length&&(g=f[p],m=g.rectangle,!D.lessThanOrEquals(A.east,m.west,y));++p);break;case Tn.EAST:for(y=(x.north-x.south)*D.EPSILON5,d=0;d<f.length&&(g=f[d],m=g.rectangle,!D.lessThan(A.south,m.north,y));++d);for(p=d;p<f.length&&(g=f[p],m=g.rectangle,!D.lessThanOrEquals(A.north,m.south,y));++p);break;case Tn.NORTH:for(y=(x.east-x.west)*D.EPSILON5,d=0;d<f.length&&(g=f[d],m=g.rectangle,!D.greaterThan(A.east,m.west,y));++d);for(p=d;p<f.length&&(g=f[p],m=g.rectangle,!D.greaterThanOrEquals(A.west,m.east,y));++p);break}p-d===1?(a.changedThisFrame=a.changedThisFrame||u[d]!==s,u[d]=s,f[d]=n):(a.changedThisFrame=!0,u.splice(d,p-d,s),f.splice(d,p-d,n))}var aT=new de,ibt=new de,Kw=new h,ete=new h,$ee=new z,Jee=new z,$f=new z;function G6(){this.height=0,this.encodedNormal=new z}function F6(e,t,n,i,o,r,a,s,c){if(l(o))return o;let u;if(l(r)&&l(a))u=(r.height+a.height)*.5;else if(l(r))u=r.height;else if(l(a))u=a.height;else if(l(s))u=s.height;else{let d=e.tile.data.tileBoundingRegion,p=0,g=0;l(d)&&(p=d.minimumHeight,g=d.maximumHeight),u=(p+g)*.5}return Awe(e,t,n,i,u,c),c}var obt={minimumHeight:0,maximumHeight:0},rbt=new h,fwe=new G6,dwe=new G6,hwe=new G6,mwe=new G6,abt=typeof Uint8Array<"u"?new Uint8Array(81):void 0,sbt={tilingScheme:void 0,x:0,y:0,level:0,exaggeration:1,exaggerationRelativeHeight:0};function _we(e,t,n,i){lh.initialize(n,e.terrainProvider,e._imageryLayers);let o=n.data,r=o.fill,a=n.rectangle,s=t.verticalExaggeration,c=t.verticalExaggerationRelativeHeight,u=s!==1,f=n.tilingScheme.ellipsoid,d=z6(r,f,0,1,r.northwestTile,r.northwestMesh,r.northTiles,r.northMeshes,r.westTiles,r.westMeshes,hwe),p=z6(r,f,0,0,r.southwestTile,r.southwestMesh,r.westTiles,r.westMeshes,r.southTiles,r.southMeshes,fwe),g=z6(r,f,1,0,r.southeastTile,r.southeastMesh,r.southTiles,r.southMeshes,r.eastTiles,r.eastMeshes,dwe),m=z6(r,f,1,1,r.northeastTile,r.northeastMesh,r.eastTiles,r.eastMeshes,r.northTiles,r.northMeshes,mwe);d=F6(r,f,0,1,d,p,m,g,hwe),p=F6(r,f,0,0,p,d,g,m,fwe),g=F6(r,f,1,1,g,p,m,d,dwe),m=F6(r,f,1,1,m,g,d,p,mwe);let A=p.height,y=g.height,x=d.height,b=m.height,C=Math.min(A,y,x,b),E=Math.max(A,y,x,b),S=(C+E)*.5,w,P,R=e.getLevelMaximumGeometricError(n.level),B=f.maximumRadius-R,L=Math.acos(B/f.maximumRadius)*4;if(L*=1.5,a.width>L&&E-C<=R){let v=new kc({width:9,height:9,buffer:abt,structure:{heightOffset:E}}),I=sbt;I.tilingScheme=n.tilingScheme,I.x=n.x,I.y=n.y,I.level=n.level,I.exaggeration=s,I.exaggerationRelativeHeight=c,r.mesh=v._createMeshSync(I)}else{let v=u,I=oe.center(a,ibt);I.height=S;let O=f.cartographicToCartesian(I,rbt),N=new dr(O,void 0,void 0,void 0,void 0,!0,!0,v,s,c),j=5,k;for(k=r.westMeshes,w=0,P=k.length;w<P;++w)j+=k[w].eastIndicesNorthToSouth.length;for(k=r.southMeshes,w=0,P=k.length;w<P;++w)j+=k[w].northIndicesWestToEast.length;for(k=r.eastMeshes,w=0,P=k.length;w<P;++w)j+=k[w].westIndicesSouthToNorth.length;for(k=r.northMeshes,w=0,P=k.length;w<P;++w)j+=k[w].southIndicesEastToWest.length;let U=obt;U.minimumHeight=C,U.maximumHeight=E;let F=N.stride,H=new Float32Array(j*F),q=0,J=q;q=k6(f,a,N,H,q,0,1,d.height,d.encodedNormal,1,U),q=V6(r,f,N,H,q,r.westTiles,r.westMeshes,Tn.EAST,U);let W=q;q=k6(f,a,N,H,q,0,0,p.height,p.encodedNormal,0,U),q=V6(r,f,N,H,q,r.southTiles,r.southMeshes,Tn.NORTH,U);let Z=q;q=k6(f,a,N,H,q,1,0,g.height,g.encodedNormal,0,U),q=V6(r,f,N,H,q,r.eastTiles,r.eastMeshes,Tn.WEST,U);let K=q;q=k6(f,a,N,H,q,1,1,m.height,m.encodedNormal,1,U),q=V6(r,f,N,H,q,r.northTiles,r.northMeshes,Tn.SOUTH,U),C=U.minimumHeight,E=U.maximumHeight;let le=Qt.fromRectangle(a,C,E,n.tilingScheme.ellipsoid),me=li.geodeticLatitudeToMercatorAngle(a.south),ae=1/(li.geodeticLatitudeToMercatorAngle(a.north)-me),be=(li.geodeticLatitudeToMercatorAngle(I.latitude)-me)*ae,ge=f.geodeticSurfaceNormalCartographic(aT,ete),we=nn.octEncode(ge,$ee),Ee=q;N.encode(H,q*F,le.center,z.fromElements(.5,.5,$f),S,we,be,ge),++q;let Be=q,ke=Be<256?1:2,Ge=(Be-1)*3,rt=Ge*ke,et=(H.length-Be*F)*Float32Array.BYTES_PER_ELEMENT,Pe;if(et>=rt){let xt=Be*F*Float32Array.BYTES_PER_ELEMENT;Pe=Be<256?new Uint8Array(H.buffer,xt,Ge):new Uint16Array(H.buffer,xt,Ge)}else Pe=Be<256?new Uint8Array(Ge):new Uint16Array(Ge);H=new Float32Array(H.buffer,0,Be*F);let Ye=0;for(w=0;w<Be-2;++w)Pe[Ye++]=Ee,Pe[Ye++]=w,Pe[Ye++]=w+1;Pe[Ye++]=Ee,Pe[Ye++]=w,Pe[Ye++]=0;let ut=[];for(w=W;w>=J;--w)ut.push(w);let Tt=[];for(w=Z;w>=W;--w)Tt.push(w);let tn=[];for(w=K;w>=Z;--w)tn.push(w);let Ht=[];for(Ht.push(0),w=Ee-1;w>=K;--w)Ht.push(w);r.mesh=new pc(N.center,H,Pe,Ge,Be,C,E,a,ce.fromOrientedBoundingBox(le),mbt(e,le.center,a,C,E),N.stride,le,N,ut,Tt,tn,Ht)}let _=t.context;r._destroyVertexArray(i),r.vertexArray=lh._createVertexArrayForMesh(_,r.mesh),o.processImagery(n,e.terrainProvider,t,!0);let T=r.waterMaskTexture;if(r.waterMaskTexture=void 0,e.terrainProvider.hasWaterMask){let v=o._findAncestorTileWithTerrainData(n);l(v)&&l(v.data.waterMaskTexture)&&(r.waterMaskTexture=v.data.waterMaskTexture,++r.waterMaskTexture.referenceCount,o._computeWaterMaskTranslationAndScale(n,v,r.waterMaskTranslationAndScale))}l(T)&&(--T.referenceCount,T.referenceCount===0&&T.destroy())}function k6(e,t,n,i,o,r,a,s,c,u,f){let d=aT;d.longitude=D.lerp(t.west,t.east,r),d.latitude=D.lerp(t.south,t.north,a),d.height=s;let p=e.cartographicToCartesian(d,Kw),g;n.hasGeodeticSurfaceNormals&&(g=e.geodeticSurfaceNormal(p,ete));let m=Jee;return m.x=r,m.y=a,n.encode(i,o*n.stride,p,m,s,c,u,g),f.minimumHeight=Math.min(f.minimumHeight,s),f.maximumHeight=Math.max(f.maximumHeight,s),o+1}var j6=new oe;function a3(e,t,n,i){let o=e.rectangle,r=t.rectangle;t.x===0&&n.x===1&&e.x===e.tilingScheme.getNumberOfXTilesAtLevel(e.level)-1?(o=oe.clone(e.rectangle,j6),o.west-=D.TWO_PI,o.east-=D.TWO_PI):e.x===0&&n.x===0&&t.x===t.tilingScheme.getNumberOfXTilesAtLevel(t.level)-1&&(o=oe.clone(e.rectangle,j6),o.west+=D.TWO_PI,o.east+=D.TWO_PI);let a=o.east-o.west,s=(r.west-o.west)/a,c=(r.east-o.west)/a,u=o.north-o.south,f=(r.south-o.south)/u,d=(r.north-o.south)/u,p=(n.x-s)/(c-s),g=(n.y-f)/(d-f);return Math.abs(p)<Math.EPSILON5?p=0:Math.abs(p-1)<Math.EPSILON5&&(p=1),Math.abs(g)<Math.EPSILON5?g=0:Math.abs(g-1)<Math.EPSILON5&&(g=1),i.x=p,i.y=g,i}var cbt=new z;function Zee(e,t,n,i,o){let r=e.encoding,a=e.vertices;if(o.height=r.decodeHeight(a,t),r.hasVertexNormals)r.getOctEncodedNormal(a,t,o.encodedNormal);else{let s=o.encodedNormal;s.x=0,s.y=0}}var lbt=new z,ubt=new h;function fbt(e,t,n,i,o,r,a,s,c,u){let f=i.encoding,d=i.vertices,p=a3(t,n,f.decodeTextureCoordinates(d,o,$f),$f),g=a3(t,n,f.decodeTextureCoordinates(d,r,Jee),Jee),m;c?m=(a-p.x)/(g.x-p.x):m=(s-p.y)/(g.y-p.y);let A=f.decodeHeight(d,o),y=f.decodeHeight(d,r),x=n.rectangle;aT.longitude=D.lerp(x.west,x.east,a),aT.latitude=D.lerp(x.south,x.north,s),u.height=aT.height=D.lerp(A,y,m);let b;if(f.hasVertexNormals){let C=f.getOctEncodedNormal(d,o,cbt),E=f.getOctEncodedNormal(d,r,lbt),S=nn.octDecode(C.x,C.y,Kw),w=nn.octDecode(E.x,E.y,ubt);b=h.lerp(S,w,m,Kw),h.normalize(b,b),nn.octEncode(b,u.encodedNormal)}else b=e.geodeticSurfaceNormalCartographic(aT,Kw),nn.octEncode(b,u.encodedNormal)}function Awe(e,t,n,i,o,r){r.height=o;let a=t.geodeticSurfaceNormalCartographic(aT,Kw);nn.octEncode(a,r.encodedNormal)}function z6(e,t,n,i,o,r,a,s,c,u,f){if(gwe(e,t,s,a,!1,n,i,f)||gwe(e,t,u,c,!0,n,i,f))return f;let p;if(tte(o,r))return n===0?i===0?p=r.eastIndicesNorthToSouth[0]:p=r.southIndicesEastToWest[0]:i===0?p=r.northIndicesWestToEast[0]:p=r.westIndicesSouthToNorth[0],Zee(r,p,n,i,f),f;let g;if(n===0?i===0?g=U6(e.westMeshes,e.westTiles,Tn.EAST,e.southMeshes,e.southTiles,Tn.NORTH,n,i):g=U6(e.northMeshes,e.northTiles,Tn.SOUTH,e.westMeshes,e.westTiles,Tn.EAST,n,i):i===0?g=U6(e.southMeshes,e.southTiles,Tn.NORTH,e.eastMeshes,e.eastTiles,Tn.WEST,n,i):g=U6(e.eastMeshes,e.eastTiles,Tn.WEST,e.northMeshes,e.northTiles,Tn.SOUTH,n,i),l(g))return Awe(e,t,n,i,g,f),f}function U6(e,t,n,i,o,r,a,s){let c=pwe(e,t,!1,n,a,s),u=pwe(i,o,!0,r,a,s);return l(c)&&l(u)?(c+u)*.5:l(c)?c:u}function V6(e,t,n,i,o,r,a,s,c){for(let u=0;u<r.length;++u)o=dbt(e,t,n,i,o,r[u],a[u],s,c);return o}function dbt(e,t,n,i,o,r,a,s,c){let u=r.rectangle;s===Tn.EAST&&e.tile.x===0?(u=oe.clone(r.rectangle,j6),u.west-=D.TWO_PI,u.east-=D.TWO_PI):s===Tn.WEST&&r.x===0&&(u=oe.clone(r.rectangle,j6),u.west+=D.TWO_PI,u.east+=D.TWO_PI);let f=e.tile.rectangle,d,p;o>0&&(n.decodeTextureCoordinates(i,o-1,$f),d=$f.x,p=$f.y);let g,m;switch(s){case Tn.WEST:g=a.westIndicesSouthToNorth,m=!1;break;case Tn.NORTH:g=a.northIndicesWestToEast,m=!0;break;case Tn.EAST:g=a.eastIndicesNorthToSouth,m=!1;break;case Tn.SOUTH:g=a.southIndicesEastToWest,m=!0;break}let A=r,y=e.tile,x=a.encoding,b=a.vertices,C=n.stride,E,S;x.hasWebMercatorT&&(E=li.geodeticLatitudeToMercatorAngle(f.south),S=1/(li.geodeticLatitudeToMercatorAngle(f.north)-E));for(let w=0;w<g.length;++w){let P=g[w],R=x.decodeTextureCoordinates(b,P,$f);a3(A,y,R,R);let B=R.x,L=R.y,_=m?B:L;if(_<0||_>1||Math.abs(B-d)<D.EPSILON5&&Math.abs(L-p)<D.EPSILON5)continue;let T=Math.abs(B)<D.EPSILON5||Math.abs(B-1)<D.EPSILON5,v=Math.abs(L)<D.EPSILON5||Math.abs(L-1)<D.EPSILON5;if(T&&v)continue;let I=x.decodePosition(b,P,Kw),O=x.decodeHeight(b,P),N;x.hasVertexNormals?N=x.getOctEncodedNormal(b,P,$ee):(N=$ee,N.x=0,N.y=0);let j=L;if(x.hasWebMercatorT){let U=D.lerp(f.south,f.north,L);j=(li.geodeticLatitudeToMercatorAngle(U)-E)*S}let k;n.hasGeodeticSurfaceNormals&&(k=t.geodeticSurfaceNormal(I,ete)),n.encode(i,o*C,I,R,O,N,j,k),c.minimumHeight=Math.min(c.minimumHeight,O),c.maximumHeight=Math.max(c.maximumHeight,O),++o}return o}function pwe(e,t,n,i,o,r){let a,s,c;n?(a=0,s=e.length,c=1):(a=e.length-1,s=-1,c=-1);for(let u=a;u!==s;u+=c){let f=e[u],d=t[u];if(!tte(d,f))continue;let p;switch(i){case Tn.WEST:p=f.westIndicesSouthToNorth;break;case Tn.SOUTH:p=f.southIndicesEastToWest;break;case Tn.EAST:p=f.eastIndicesNorthToSouth;break;case Tn.NORTH:p=f.northIndicesWestToEast;break}let g=p[n?0:p.length-1];if(l(g))return f.encoding.decodeHeight(f.vertices,g)}}function tte(e,t){return l(t)&&(!l(e.data.fill)||!e.data.fill.changedThisFrame)}function gwe(e,t,n,i,o,r,a,s){let c,u,f,d,p,g=i[o?0:n.length-1],m=n[o?0:n.length-1];if(tte(g,m)&&(r===0?a===0?(c=o?m.northIndicesWestToEast:m.eastIndicesNorthToSouth,u=o,f=o):(c=o?m.eastIndicesNorthToSouth:m.southIndicesEastToWest,u=!o,f=!1):a===0?(c=o?m.westIndicesSouthToNorth:m.northIndicesWestToEast,u=!o,f=!0):(c=o?m.southIndicesEastToWest:m.westIndicesSouthToNorth,u=o,f=!o),c.length>0)){d=o?0:c.length-1,p=c[d],m.encoding.decodeTextureCoordinates(m.vertices,p,$f);let A=a3(g,e.tile,$f,$f);if(A.x===r&&A.y===a)return Zee(m,p,r,a,s),!0;if(d=_o(c,u?r:a,function(y,x){m.encoding.decodeTextureCoordinates(m.vertices,y,$f);let b=a3(g,e.tile,$f,$f);return f?u?b.x-r:b.y-a:u?r-b.x:a-b.y}),d<0){if(d=~d,d>0&&d<c.length)return fbt(t,g,e.tile,m,c[d-1],c[d],r,a,u,s),!0}else return Zee(m,c[d],r,a,s),!0}return!1}var hbt=[new h,new h,new h,new h];function mbt(e,t,n,i,o,r){let a=e.quadtree._occluders.ellipsoid,s=a.ellipsoid,c=hbt;return h.fromRadians(n.west,n.south,o,s,c[0]),h.fromRadians(n.east,n.south,o,s,c[1]),h.fromRadians(n.west,n.north,o,s,c[2]),h.fromRadians(n.east,n.north,o,s,c[3]),a.computeHorizonCullingPointPossiblyUnderEllipsoid(t,c,i,r)}var $w=Qw;function Dr(e){this.lightingFadeOutDistance=65e5,this.lightingFadeInDistance=9e6,this.hasWaterMask=!1,this.showWaterEffect=!1,this.oceanNormalMap=void 0,this.zoomedOutOceanSpecularIntensity=.5,this.enableLighting=!1,this.dynamicAtmosphereLighting=!1,this.dynamicAtmosphereLightingFromSun=!1,this.showGroundAtmosphere=!1,this.shadows=vn.RECEIVE_ONLY,this.vertexShadowDarkness=.3,this.fillHighlightColor=void 0,this.hueShift=0,this.saturationShift=0,this.brightnessShift=0,this.showSkirts=!0,this.backFaceCulling=!0,this.undergroundColor=void 0,this.undergroundColorAlphaByDistance=void 0,this.lambertDiffuseMultiplier=0,this.materialUniformMap=void 0,this._materialUniformMap=void 0,this._quadtree=void 0,this._terrainProvider=e.terrainProvider,this._imageryLayers=e.imageryLayers,this._surfaceShaderSet=e.surfaceShaderSet,this._renderState=void 0,this._blendRenderState=void 0,this._disableCullingRenderState=void 0,this._disableCullingBlendRenderState=void 0,this._errorEvent=new ye,this._removeLayerAddedListener=this._imageryLayers.layerAdded.addEventListener(Dr.prototype._onLayerAdded,this),this._removeLayerRemovedListener=this._imageryLayers.layerRemoved.addEventListener(Dr.prototype._onLayerRemoved,this),this._removeLayerMovedListener=this._imageryLayers.layerMoved.addEventListener(Dr.prototype._onLayerMoved,this),this._removeLayerShownListener=this._imageryLayers.layerShownOrHidden.addEventListener(Dr.prototype._onLayerShownOrHidden,this),this._imageryLayersUpdatedEvent=new ye,this._layerOrderChanged=!1,this._tilesToRenderByTextureCount=[],this._drawCommands=[],this._uniformMaps=[],this._usedDrawCommands=0,this._vertexArraysToDestroy=[],this._debug={wireframe:!1,boundingSphereTile:void 0},this._baseColor=void 0,this._firstPassInitialColor=void 0,this.baseColor=new V(0,0,.5,1),this._clippingPlanes=void 0,this._clippingPolygons=void 0,this.cartographicLimitRectangle=oe.clone(oe.MAX_VALUE),this._hasLoadedTilesThisFrame=!1,this._hasFillTilesThisFrame=!1,this._oldVerticalExaggeration=void 0,this._oldVerticalExaggerationRelativeHeight=void 0,this._oldSceneMode=ie.SCENE3D}Object.defineProperties(Dr.prototype,{baseColor:{get:function(){return this._baseColor},set:function(e){this._baseColor=e,this._firstPassInitialColor=se.fromColor(e,this._firstPassInitialColor)}},quadtree:{get:function(){return this._quadtree},set:function(e){this._quadtree=e}},tilingScheme:{get:function(){if(l(this._terrainProvider))return this._terrainProvider.tilingScheme}},errorEvent:{get:function(){return this._errorEvent}},imageryLayersUpdatedEvent:{get:function(){return this._imageryLayersUpdatedEvent}},terrainProvider:{get:function(){return this._terrainProvider},set:function(e){this._terrainProvider!==e&&(this._terrainProvider=e,l(this._quadtree)&&this._quadtree.invalidateAllTiles())}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){ma.setOwner(e,this,"_clippingPlanes")}},clippingPolygons:{get:function(){return this._clippingPolygons},set:function(e){Qh.setOwner(e,this,"_clippingPolygons")}}});function pbt(e,t){let n=e.loadingImagery;l(n)||(n=e.readyImagery);let i=t.loadingImagery;return l(i)||(i=t.readyImagery),n.imageryLayer._layerIndex-i.imageryLayer._layerIndex}Dr.prototype.update=function(e){this._imageryLayers._update()};function gbt(e,t){let n=t.creditDisplay,i=e._terrainProvider;l(i)&&l(i.credit)&&n.addCreditToNextFrame(i.credit);let o=e._imageryLayers;for(let r=0,a=o.length;r<a;++r){let s=o.get(r);s.ready&&s.show&&l(s.imageryProvider.credit)&&n.addCreditToNextFrame(s.imageryProvider.credit)}}Dr.prototype.initialize=function(e){this._imageryLayers.queueReprojectionCommands(e),this._layerOrderChanged&&(this._layerOrderChanged=!1,this._quadtree.forEachLoadedTile(function(i){i.data.imagery.sort(pbt)})),gbt(this,e);let t=this._vertexArraysToDestroy,n=t.length;for(let i=0;i<n;++i)lh._freeVertexArray(t[i]);t.length=0};Dr.prototype.beginUpdate=function(e){let t=this._tilesToRenderByTextureCount;for(let o=0,r=t.length;o<r;++o){let a=t[o];l(a)&&(a.length=0)}let n=this._clippingPlanes;l(n)&&n.enabled&&n.update(e);let i=this._clippingPolygons;l(i)&&i.enabled&&(i.update(e),i.queueCommands(e)),this._usedDrawCommands=0,this._hasLoadedTilesThisFrame=!1,this._hasFillTilesThisFrame=!1};Dr.prototype.endUpdate=function(e){if(!l(this._renderState)){this._renderState=Ve.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:tc.LESS}}),this._blendRenderState=Ve.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:tc.LESS_OR_EQUAL},blending:Jt.ALPHA_BLEND});let s=We(this._renderState,!0);s.cull.enabled=!1,this._disableCullingRenderState=Ve.fromCache(s),s=We(this._blendRenderState,!0),s.cull.enabled=!1,this._disableCullingBlendRenderState=Ve.fromCache(s)}this._hasFillTilesThisFrame&&this._hasLoadedTilesThisFrame&&$w.updateFillTiles(this,this._quadtree._tilesToRender,e,this._vertexArraysToDestroy);let t=this.quadtree,n=e.verticalExaggeration,i=e.verticalExaggerationRelativeHeight,o=this._oldVerticalExaggeration!==n||this._oldVerticalExaggerationRelativeHeight!==i;this._oldVerticalExaggeration=n,this._oldVerticalExaggerationRelativeHeight=i,o&&t.forEachLoadedTile(function(s){s.data.updateExaggeration(s,e,t)});let r=this._oldSceneMode!==e.mode;this._oldSceneMode=e.mode,r&&t.forEachLoadedTile(function(s){s.data.updateSceneMode(e.mode)});let a=this._tilesToRenderByTextureCount;for(let s=0,c=a.length;s<c;++s){let u=a[s];if(l(u))for(let f=0,d=u.length;f<d;++f){let p=u[f],g=p.data.tileBoundingRegion;Ubt(this,p,e),e.minimumTerrainHeight=Math.min(e.minimumTerrainHeight,g.minimumHeight)}}};function Twe(e,t){let n=t.globeTranslucencyState;if(n.translucent){let i=e.renderState.blending.enabled;n.pushDerivedCommands(e,i,t)}else t.commandList.push(e)}Dr.prototype.updateForPick=function(e){let t=this._drawCommands;for(let n=0,i=this._usedDrawCommands;n<i;++n)Twe(t[n],e)};Dr.prototype.cancelReprojections=function(){this._imageryLayers.cancelReprojections()};Dr.prototype.getLevelMaximumGeometricError=function(e){return l(this._terrainProvider)?this._terrainProvider.getLevelMaximumGeometricError(e):0};Dr.prototype.loadTile=function(e,t){let n=t.data,i=!0,o;l(n)&&(i=n.boundingVolumeSourceTile!==t||t._lastSelectionResult===oi.CULLED_BUT_NEEDED,o=n.terrainState),lh.processStateMachine(t,e,this.terrainProvider,this._imageryLayers,this.quadtree,this._vertexArraysToDestroy,i),n=t.data,i&&o!==t.data.terrainState&&this.computeTileVisibility(t,e,this.quadtree.occluders)!==Vr.NONE&&n.boundingVolumeSourceTile===t&&(i=!1,lh.processStateMachine(t,e,this.terrainProvider,this._imageryLayers,this.quadtree,this._vertexArraysToDestroy,i))};var _bt=new ce,Ewe=new oe,Abt=new oe,ybt=new de;function W6(e,t){if(t.west<t.east)return t;let n=oe.clone(t,Abt);return oe.center(e,ybt).longitude>0?n.east=D.PI:n.west=-D.PI,n}function vwe(e,t){if(t.cameraUnderground||t.globeTranslucencyState.translucent)return!0;if(e.backFaceCulling)return!1;let n=e._clippingPlanes;if(l(n)&&n.enabled)return!0;let i=e._clippingPolygons;return!!(l(i)&&i.enabled||!oe.equals(e.cartographicLimitRectangle,oe.MAX_VALUE))}Dr.prototype.computeTileVisibility=function(e,t,n){let i=this.computeDistanceToTile(e,t);e._distance=i;let o=vwe(this,t);if(t.fog.enabled&&!o&&D.fog(i,t.fog.density)>=1)return Vr.NONE;let r=e.data,a=r.tileBoundingRegion;if(r.boundingVolumeSourceTile===void 0)return Vr.PARTIAL;let s=t.cullingVolume,c=a.boundingVolume;l(c)||(c=a.boundingSphere),r.clippedByBoundaries=!1;let u=W6(e.rectangle,this.cartographicLimitRectangle),f=oe.simpleIntersection(u,e.rectangle,Ewe);if(!l(f))return Vr.NONE;if(oe.equals(f,e.rectangle)||(r.clippedByBoundaries=!0),t.mode!==ie.SCENE3D&&(c=_bt,ce.fromRectangleWithHeights2D(e.rectangle,t.mapProjection,a.minimumHeight,a.maximumHeight,c),h.fromElements(c.center.z,c.center.x,c.center.y,c.center),t.mode===ie.MORPHING&&l(r.renderedMesh)&&(c=ce.union(a.boundingSphere,c,c))),!l(c))return Vr.PARTIAL;let d=this._clippingPlanes;if(l(d)&&d.enabled){let y=d.computeIntersectionWithBoundingVolume(c);if(e.isClipped=y!==qt.INSIDE,y===qt.OUTSIDE)return Vr.NONE}let p=this._clippingPolygons;if(l(p)&&p.enabled){let y=p.computeIntersectionWithBoundingVolume(a);e.isClipped=y!==qt.OUTSIDE}let g,m=s.computeVisibility(c);if(m===qt.OUTSIDE?g=Vr.NONE:m===qt.INTERSECTING?g=Vr.PARTIAL:m===qt.INSIDE&&(g=Vr.FULL),g===Vr.NONE)return g;let A=t.mode===ie.SCENE3D&&t.camera.frustum instanceof fn;if(t.mode===ie.SCENE3D&&!A&&l(n)&&!o){let y=r.occludeePointInScaledSpace;return!l(y)||n.ellipsoid.isScaledSpacePointVisiblePossiblyUnderEllipsoid(y,a.minimumHeight)?g:Vr.NONE}return g};Dr.prototype.canRefine=function(e){return l(e.data.terrainData)?!0:this.terrainProvider.getTileDataAvailable(e.x*2,e.y*2,e.level+1)!==void 0};var xbt=[],bbt=[];Dr.prototype.canRenderWithoutLosingDetail=function(e,t){let n=e.data,i=xbt;i.length=this._imageryLayers.length;let o=!1,r=!1,a;l(n)&&(o=n.terrainState===Io.READY,r=!0,a=n.imagery);let s,c;for(s=0,c=i.length;s<c;++s)i[s]=r;if(l(a))for(s=0,c=a.length;s<c;++s){let d=a[s],p=d.loadingImagery,g=!l(p)||p.state===Vn.FAILED||p.state===Vn.INVALID,m=(d.loadingImagery||d.readyImagery).imageryLayer._layerIndex;i[m]=g&&i[m]}let u=this.quadtree._lastSelectionFrameNumber,f=bbt;for(f.length=0,f.push(e.southwestChild,e.southeastChild,e.northwestChild,e.northeastChild);f.length>0;){let d=f.pop(),p=d._lastSelectionResultFrame===u?d._lastSelectionResult:oi.NONE;if(p===oi.RENDERED){let g=d.data;if(!l(g))continue;if(!o&&d.data.terrainState===Io.READY)return!1;let m=d.data.imagery;for(s=0,c=m.length;s<c;++s){let A=m[s],y=A.loadingImagery,x=!l(y)||y.state===Vn.FAILED||y.state===Vn.INVALID,b=(A.loadingImagery||A.readyImagery).imageryLayer._layerIndex;if(x&&!i[b])return!1}}else p===oi.REFINED&&f.push(d.southwestChild,d.southeastChild,d.northwestChild,d.northeastChild)}return!0};var Cbt=new h;Dr.prototype.computeTileLoadPriority=function(e,t){let n=e.data;if(n===void 0)return 0;let i=n.tileBoundingRegion.boundingVolume;if(i===void 0)return 0;let o=t.camera.positionWC,r=t.camera.directionWC,a=h.subtract(i.center,o,Cbt),s=h.magnitude(a);return s<D.EPSILON5?0:(h.divideByScalar(a,s,a),(1-h.dot(a,r))*e._distance)};var ywe=new M,H6=new M,Tbt=new se,Ebt=new se,vbt=new se,Sbt=new h,xwe=new h,wbt=new h,Ibt=new h;Dr.prototype.showTileThisFrame=function(e,t){let n=0,i=e.data.imagery;for(let s=0,c=i.length;s<c;++s){let u=i[s];l(u.readyImagery)&&u.readyImagery.imageryLayer.alpha!==0&&++n}let o=this._tilesToRenderByTextureCount[n];l(o)||(o=[],this._tilesToRenderByTextureCount[n]=o),o.push(e);let r=e.data;l(r.vertexArray)?this._hasLoadedTilesThisFrame=!0:this._hasFillTilesThisFrame=!0;let a=this._debug;++a.tilesRendered,a.texturesRendered+=n};var Dbt=[new h,new h,new h,new h];function bwe(e,t,n,i,o,r){let a=e.quadtree._occluders.ellipsoid,s=a.ellipsoid,c=Dbt;return h.fromRadians(n.west,n.south,o,s,c[0]),h.fromRadians(n.east,n.south,o,s,c[1]),h.fromRadians(n.west,n.north,o,s,c[2]),h.fromRadians(n.east,n.north,o,s,c[3]),a.computeHorizonCullingPointPossiblyUnderEllipsoid(t,c,i,r)}Dr.prototype.computeDistanceToTile=function(e,t){Pbt(e,this,t);let n=e.data;if(n.boundingVolumeSourceTile===void 0)return 9999999999;let o=n.tileBoundingRegion,r=o.minimumHeight,a=o.maximumHeight;if(n.boundingVolumeSourceTile!==e){let c=t.camera.positionCartographic.height,u=Math.abs(c-r),f=Math.abs(c-a);u>f?(o.minimumHeight=r,o.maximumHeight=r):(o.minimumHeight=a,o.maximumHeight=a)}let s=o.distanceToCamera(t);return o.minimumHeight=r,o.maximumHeight=a,s};function Pbt(e,t,n){let i=e.data;i===void 0&&(i=e.data=new lh);let o=e.tilingScheme.ellipsoid;i.tileBoundingRegion===void 0&&(i.tileBoundingRegion=new Rf({computeBoundingVolumes:!1,rectangle:e.rectangle,ellipsoid:o,minimumHeight:0,maximumHeight:0}));let r=i.tileBoundingRegion,a=r.minimumHeight,s=r.maximumHeight,c=!1,u=e,f=i.mesh,d=i.terrainData;if(f!==void 0&&f.minimumHeight!==void 0&&f.maximumHeight!==void 0)r.minimumHeight=f.minimumHeight,r.maximumHeight=f.maximumHeight,c=!0;else if(d!==void 0&&d._minimumHeight!==void 0&&d._maximumHeight!==void 0)r.minimumHeight=d._minimumHeight,r.maximumHeight=d._maximumHeight;else{r.minimumHeight=Number.NaN,r.maximumHeight=Number.NaN;let p=e.parent;for(;p!==void 0;){let g=p.data;if(g!==void 0){let m=g.mesh,A=g.terrainData;if(m!==void 0&&m.minimumHeight!==void 0&&m.maximumHeight!==void 0){r.minimumHeight=m.minimumHeight,r.maximumHeight=m.maximumHeight;break}else if(A!==void 0&&A._minimumHeight!==void 0&&A._maximumHeight!==void 0){r.minimumHeight=A._minimumHeight,r.maximumHeight=A._maximumHeight;break}}p=p.parent}u=p}if(u!==void 0){let p=n.verticalExaggeration,g=n.verticalExaggerationRelativeHeight;if(p!==1&&(c=!1,r.minimumHeight=so.getHeight(r.minimumHeight,p,g),r.maximumHeight=so.getHeight(r.maximumHeight,p,g)),c)i.boundingVolumeIsFromMesh||(r._orientedBoundingBox=Qt.clone(f.orientedBoundingBox,r._orientedBoundingBox),r._boundingSphere=ce.clone(f.boundingSphere3D,r._boundingSphere),i.occludeePointInScaledSpace=h.clone(f.occludeePointInScaledSpace,i.occludeePointInScaledSpace),l(i.occludeePointInScaledSpace)||(i.occludeePointInScaledSpace=bwe(t,r._orientedBoundingBox.center,e.rectangle,r.minimumHeight,r.maximumHeight,i.occludeePointInScaledSpace)));else{let A=r._orientedBoundingBox===void 0||r._boundingSphere===void 0;(r.minimumHeight!==a||r.maximumHeight!==s||A)&&(r.computeBoundingVolumes(o),i.occludeePointInScaledSpace=bwe(t,r._orientedBoundingBox.center,e.rectangle,r.minimumHeight,r.maximumHeight,i.occludeePointInScaledSpace))}i.boundingVolumeSourceTile=u,i.boundingVolumeIsFromMesh=c}else i.boundingVolumeSourceTile=void 0,i.boundingVolumeIsFromMesh=!1}Dr.prototype.isDestroyed=function(){return!1};Dr.prototype.destroy=function(){return this._tileProvider=this._tileProvider&&this._tileProvider.destroy(),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),this._clippingPolygons=this._clippingPolygons&&this._clippingPolygons.destroy(),this._removeLayerAddedListener=this._removeLayerAddedListener&&this._removeLayerAddedListener(),this._removeLayerRemovedListener=this._removeLayerRemovedListener&&this._removeLayerRemovedListener(),this._removeLayerMovedListener=this._removeLayerMovedListener&&this._removeLayerMovedListener(),this._removeLayerShownListener=this._removeLayerShownListener&&this._removeLayerShownListener(),fe(this)};function Rbt(e,t,n){return function(i){let o,r,a=-1,s=i.data.imagery,c=s.length,u;for(u=0;u<c;++u)if(o=s[u],r=o.readyImagery??o.loadingImagery,r.imageryLayer===t){a=u;break}if(a!==-1){let f=a+e;if(o=s[f],r=l(o)?o.readyImagery??o.loadingImagery:void 0,!l(r)||r.imageryLayer!==t)return!t._createTileImagerySkeletons(i,n,f);for(u=a;u<f;++u)s[u].freeResources();s.splice(a,e)}return!0}}Dr.prototype._onLayerAdded=function(e,t){if(!this.isDestroyed()&&e.show){let n=this._terrainProvider,i=this,o=this._imageryLayersUpdatedEvent,r=function(){e._imageryCache={},i._quadtree.forEachLoadedTile(function(a){if(l(a._loadedCallbacks[e._layerIndex]))return;let s,c=a.data.imagery,u=c.length,f=-1,d=0;for(s=0;s<u;++s){let g=c[s];if((g.readyImagery??g.loadingImagery).imageryLayer===e)f===-1&&(f=s),++d;else if(f!==-1)break}if(f===-1)return;let p=f+d;e._createTileImagerySkeletons(a,n,p)&&(a._loadedCallbacks[e._layerIndex]=Rbt(d,e,n),a.state=qs.LOADING)})};if(e.ready){let a=e.imageryProvider;a._reload=r}this._quadtree.forEachLoadedTile(function(a){e._createTileImagerySkeletons(a,n)&&(a.state=qs.LOADING,a.level!==0&&(a._lastSelectionResultFrame!==i.quadtree._lastSelectionFrameNumber||a._lastSelectionResult!==oi.RENDERED)&&(a.renderable=!1))}),this._layerOrderChanged=!0,o.raiseEvent()}};Dr.prototype._onLayerRemoved=function(e,t){this._quadtree.forEachLoadedTile(function(n){let i=n.data.imagery,o=-1,r=0;for(let a=0,s=i.length;a<s;++a){let c=i[a],u=c.loadingImagery;if(l(u)||(u=c.readyImagery),u.imageryLayer===e)o===-1&&(o=a),c.freeResources(),++r;else if(o!==-1)break}o!==-1&&i.splice(o,r)}),l(e.imageryProvider)&&(e.imageryProvider._reload=void 0),this._imageryLayersUpdatedEvent.raiseEvent()};Dr.prototype._onLayerMoved=function(e,t,n){this._layerOrderChanged=!0,this._imageryLayersUpdatedEvent.raiseEvent()};Dr.prototype._onLayerShownOrHidden=function(e,t,n){n?this._onLayerAdded(e,t):this._onLayerRemoved(e,t)};var Obt=new M,Mbt=new M;function Cwe(e,t){let n={u_initialColor:function(){return this.properties.initialColor},u_fillHighlightColor:function(){return this.properties.fillHighlightColor},u_zoomedOutOceanSpecularIntensity:function(){return this.properties.zoomedOutOceanSpecularIntensity},u_oceanNormalMap:function(){return this.properties.oceanNormalMap},u_atmosphereLightIntensity:function(){return this.properties.atmosphereLightIntensity},u_atmosphereRayleighCoefficient:function(){return this.properties.atmosphereRayleighCoefficient},u_atmosphereMieCoefficient:function(){return this.properties.atmosphereMieCoefficient},u_atmosphereRayleighScaleHeight:function(){return this.properties.atmosphereRayleighScaleHeight},u_atmosphereMieScaleHeight:function(){return this.properties.atmosphereMieScaleHeight},u_atmosphereMieAnisotropy:function(){return this.properties.atmosphereMieAnisotropy},u_lightingFadeDistance:function(){return this.properties.lightingFadeDistance},u_nightFadeDistance:function(){return this.properties.nightFadeDistance},u_center3D:function(){return this.properties.center3D},u_verticalExaggerationAndRelativeHeight:function(){return this.properties.verticalExaggerationAndRelativeHeight},u_tileRectangle:function(){return this.properties.tileRectangle},u_modifiedModelView:function(){let i=e.context.uniformState.view,o=M.multiplyByPoint(i,this.properties.rtc,xwe);return M.setTranslation(i,o,ywe),ywe},u_modifiedModelViewProjection:function(){let i=e.context.uniformState.view,o=e.context.uniformState.projection,r=M.multiplyByPoint(i,this.properties.rtc,xwe);return M.setTranslation(i,r,H6),M.multiply(o,H6,H6),H6},u_dayTextures:function(){return this.properties.dayTextures},u_dayTextureTranslationAndScale:function(){return this.properties.dayTextureTranslationAndScale},u_dayTextureTexCoordsRectangle:function(){return this.properties.dayTextureTexCoordsRectangle},u_dayTextureUseWebMercatorT:function(){return this.properties.dayTextureUseWebMercatorT},u_dayTextureAlpha:function(){return this.properties.dayTextureAlpha},u_dayTextureNightAlpha:function(){return this.properties.dayTextureNightAlpha},u_dayTextureDayAlpha:function(){return this.properties.dayTextureDayAlpha},u_dayTextureBrightness:function(){return this.properties.dayTextureBrightness},u_dayTextureContrast:function(){return this.properties.dayTextureContrast},u_dayTextureHue:function(){return this.properties.dayTextureHue},u_dayTextureSaturation:function(){return this.properties.dayTextureSaturation},u_dayTextureOneOverGamma:function(){return this.properties.dayTextureOneOverGamma},u_dayIntensity:function(){return this.properties.dayIntensity},u_southAndNorthLatitude:function(){return this.properties.southAndNorthLatitude},u_southMercatorYAndOneOverHeight:function(){return this.properties.southMercatorYAndOneOverHeight},u_waterMask:function(){return this.properties.waterMask},u_waterMaskTranslationAndScale:function(){return this.properties.waterMaskTranslationAndScale},u_minMaxHeight:function(){return this.properties.minMaxHeight},u_scaleAndBias:function(){return this.properties.scaleAndBias},u_dayTextureSplit:function(){return this.properties.dayTextureSplit},u_dayTextureCutoutRectangles:function(){return this.properties.dayTextureCutoutRectangles},u_clippingPlanes:function(){let i=t._clippingPlanes;return l(i)&&l(i.texture)?i.texture:e.context.defaultTexture},u_cartographicLimitRectangle:function(){return this.properties.localizedCartographicLimitRectangle},u_clippingPlanesMatrix:function(){let i=t._clippingPlanes,o=l(i)?M.multiply(e.context.uniformState.view,i.modelMatrix,Obt):M.IDENTITY;return M.inverseTranspose(o,Mbt)},u_clippingPlanesEdgeStyle:function(){let i=this.properties.clippingPlanesEdgeColor;return i.alpha=this.properties.clippingPlanesEdgeWidth,i},u_clippingDistance:function(){let i=t._clippingPolygons.clippingTexture;return l(i)?i:e.context.defaultTexture},u_clippingExtents:function(){let i=t._clippingPolygons.extentsTexture;return l(i)?i:e.context.defaultTexture},u_minimumBrightness:function(){return e.fog.minimumBrightness},u_hsbShift:function(){return this.properties.hsbShift},u_colorsToAlpha:function(){return this.properties.colorsToAlpha},u_frontFaceAlphaByDistance:function(){return this.properties.frontFaceAlphaByDistance},u_backFaceAlphaByDistance:function(){return this.properties.backFaceAlphaByDistance},u_translucencyRectangle:function(){return this.properties.localizedTranslucencyRectangle},u_undergroundColor:function(){return this.properties.undergroundColor},u_undergroundColorAlphaByDistance:function(){return this.properties.undergroundColorAlphaByDistance},u_lambertDiffuseMultiplier:function(){return this.properties.lambertDiffuseMultiplier},u_vertexShadowDarkness:function(){return this.properties.vertexShadowDarkness},properties:{initialColor:new se(0,0,.5,1),fillHighlightColor:new V(0,0,0,0),zoomedOutOceanSpecularIntensity:.5,oceanNormalMap:void 0,lightingFadeDistance:new z(65e5,9e6),nightFadeDistance:new z(1e7,4e7),atmosphereLightIntensity:10,atmosphereRayleighCoefficient:new h(55e-7,13e-6,284e-7),atmosphereMieCoefficient:new h(21e-6,21e-6,21e-6),atmosphereRayleighScaleHeight:1e4,atmosphereMieScaleHeight:3200,atmosphereMieAnisotropy:.9,hsbShift:new h,center3D:void 0,rtc:new h,modifiedModelView:new M,tileRectangle:new se,verticalExaggerationAndRelativeHeight:new z(1,0),dayTextures:[],dayTextureTranslationAndScale:[],dayTextureTexCoordsRectangle:[],dayTextureUseWebMercatorT:[],dayTextureAlpha:[],dayTextureNightAlpha:[],dayTextureDayAlpha:[],dayTextureBrightness:[],dayTextureContrast:[],dayTextureHue:[],dayTextureSaturation:[],dayTextureOneOverGamma:[],dayTextureSplit:[],dayTextureCutoutRectangles:[],dayIntensity:0,colorsToAlpha:[],southAndNorthLatitude:new z,southMercatorYAndOneOverHeight:new z,waterMask:void 0,waterMaskTranslationAndScale:new se,minMaxHeight:new z,scaleAndBias:new M,clippingPlanesEdgeColor:V.clone(V.WHITE),clippingPlanesEdgeWidth:0,localizedCartographicLimitRectangle:new se,frontFaceAlphaByDistance:new se,backFaceAlphaByDistance:new se,localizedTranslucencyRectangle:new se,undergroundColor:V.clone(V.TRANSPARENT),undergroundColorAlphaByDistance:new se,lambertDiffuseMultiplier:0,vertexShadowDarkness:0}};return l(t.materialUniformMap)?wt(n,t.materialUniformMap):n}function Bbt(e,t,n){let i=n.data,o,r;if(l(i.vertexArray)?(o=i.mesh,r=i.vertexArray):l(i.fill)&&l(i.fill.vertexArray)&&(o=i.fill.mesh,r=i.fill.vertexArray),!(!l(o)||!l(r))){if(l(i.wireframeVertexArray)){if(i.wireframeVertexArray.mesh===o)return;i.wireframeVertexArray.destroy(),i.wireframeVertexArray=void 0}i.wireframeVertexArray=Lbt(e,r,o),i.wireframeVertexArray.mesh=o}}function Lbt(e,t,n){let o={indices:n.indices,primitiveType:Re.TRIANGLES};kn.toWireframe(o);let r=o.indices,a=Ke.createIndexBuffer({context:e,typedArray:r,usage:Oe.STATIC_DRAW,indexDatatype:Ue.fromSizeInBytes(r.BYTES_PER_ELEMENT)});return new Fn({context:e,attributes:t._attributes,indexBuffer:a})}var Swe,wwe,q6;(function(){let e=new Ot({geometry:Nh.fromDimensions({dimensions:new h(2,2,2)})}),t=new Ot({geometry:new Hg({radius:1})}),n=new M,i,o;function r(a){return new Dn({geometryInstances:a,appearance:new dn({translucent:!1,flat:!0}),asynchronous:!1})}Swe=function(a,s){return a===i||(q6(),i=a,n=M.fromRotationTranslation(a.halfAxes,a.center,n),e.modelMatrix=n,e.attributes.color=Yt.fromColor(s),o=r(e)),o},wwe=function(a,s){return a===i||(q6(),i=a,n=M.fromTranslation(a.center,n),n=M.multiplyByUniformScale(n,a.radius,n),t.modelMatrix=n,t.attributes.color=Yt.fromColor(s),o=r(t)),o},q6=function(){l(o)&&(o.destroy(),o=void 0,i=void 0)}})();var Nbt=new se(0,0,0,0),Fbt={frameState:void 0,surfaceTile:void 0,numberOfDayTextures:void 0,applyBrightness:void 0,applyContrast:void 0,applyHue:void 0,applySaturation:void 0,applyGamma:void 0,applyAlpha:void 0,applyDayNightAlpha:void 0,applySplit:void 0,showReflectiveOcean:void 0,showOceanWaves:void 0,enableLighting:void 0,dynamicAtmosphereLighting:void 0,dynamicAtmosphereLightingFromSun:void 0,showGroundAtmosphere:void 0,perFragmentGroundAtmosphere:void 0,hasVertexNormals:void 0,useWebMercatorProjection:void 0,enableFog:void 0,enableClippingPlanes:void 0,clippingPlanes:void 0,enableClippingPolygons:void 0,clippingPolygons:void 0,clippedByBoundaries:void 0,hasImageryLayerCutout:void 0,colorCorrect:void 0,colorToAlpha:void 0,hasGeodeticSurfaceNormals:void 0,hasExaggeration:void 0},kbt=V.TRANSPARENT,zbt=new zt;function Ubt(e,t,n){let i=t.data;l(i.vertexArray)||(i.fill===void 0&&(i.fill=new $w(t)),i.fill.update(e,n));let o=n.creditDisplay,r=i.terrainData;if(l(r)&&l(r.credits)){let xt=r.credits;for(let Pt=0,bn=xt.length;Pt<bn;++Pt)o.addCreditToNextFrame(xt[Pt])}let a=Rt.maximumTextureImageUnits,s=i.waterMaskTexture,c=i.waterMaskTranslationAndScale;!l(s)&&l(i.fill)&&(s=i.fill.waterMaskTexture,c=i.fill.waterMaskTranslationAndScale);let u=n.cameraUnderground,f=n.globeTranslucencyState,d=f.translucent,p=f.frontFaceAlphaByDistance,g=f.backFaceAlphaByDistance,m=f.rectangle,A=e.undergroundColor??kbt,y=e.undergroundColorAlphaByDistance??zbt,x=vwe(e,n)&&n.mode===ie.SCENE3D&&A.alpha>0&&(y.nearValue>0||y.farValue>0),b=e.lambertDiffuseMultiplier,C=e.vertexShadowDarkness,E=e.hasWaterMask&&l(s),S=E&&e.showWaterEffect,w=e.oceanNormalMap,P=S&&l(w),R=e.terrainProvider,B=l(R)&&e.terrainProvider.hasVertexNormals,L=n.fog.enabled&&n.fog.renderable&&!u,_=e.showGroundAtmosphere&&n.mode===ie.SCENE3D,T=vn.castShadows(e.shadows)&&!d,v=vn.receiveShadows(e.shadows)&&!d,I=e.hueShift,O=e.saturationShift,N=e.brightnessShift,j=!(D.equalsEpsilon(I,0,D.EPSILON7)&&D.equalsEpsilon(O,0,D.EPSILON7)&&D.equalsEpsilon(N,0,D.EPSILON7)),k=!1;if(_){let xt=h.magnitude(n.camera.positionWC),Pt=e.nightFadeOutDistance;k=xt>Pt}E&&--a,P&&--a,l(n.shadowState)&&n.shadowState.shadowsEnabled&&--a,l(e.clippingPlanes)&&e.clippingPlanes.enabled&&--a,l(e.clippingPolygons)&&e.clippingPolygons.enabled&&(--a,--a),a-=f.numberOfTextureUniforms;let U=i.renderedMesh,F=U.center,H=U.encoding,q=i.tileBoundingRegion,J=n.verticalExaggeration,W=n.verticalExaggerationRelativeHeight,Z=J!==1,K=H.hasGeodeticSurfaceNormals,le=Tbt,me=0,ae=0,be=0,ge=0,we=!1;if(n.mode!==ie.SCENE3D){let xt=n.mapProjection,Pt=xt.project(oe.southwest(t.rectangle),wbt),bn=xt.project(oe.northeast(t.rectangle),Ibt);if(le.x=Pt.x,le.y=Pt.y,le.z=bn.x,le.w=bn.y,n.mode!==ie.MORPHING&&(F=Sbt,F.x=0,F.y=(le.z+le.x)*.5,F.z=(le.w+le.y)*.5,le.x-=F.y,le.y-=F.z,le.z-=F.y,le.w-=F.z),n.mode===ie.SCENE2D&&H.quantization===Ws.BITS12){let at=1/(Math.pow(2,12)-1)*.5,st=(le.z-le.x)*at,Ln=(le.w-le.y)*at;le.x-=st,le.y-=Ln,le.z+=st,le.w+=Ln}xt instanceof li&&(me=t.rectangle.south,ae=t.rectangle.north,be=li.geodeticLatitudeToMercatorAngle(me),ge=1/(li.geodeticLatitudeToMercatorAngle(ae)-be),we=!0)}let Ee=Fbt;Ee.frameState=n,Ee.surfaceTile=i,Ee.hasWaterMask=E,Ee.showReflectiveOcean=S,Ee.showOceanWaves=P,Ee.enableLighting=e.enableLighting,Ee.dynamicAtmosphereLighting=e.dynamicAtmosphereLighting,Ee.dynamicAtmosphereLightingFromSun=e.dynamicAtmosphereLightingFromSun,Ee.showGroundAtmosphere=_,Ee.atmosphereLightIntensity=e.atmosphereLightIntensity,Ee.atmosphereRayleighCoefficient=e.atmosphereRayleighCoefficient,Ee.atmosphereMieCoefficient=e.atmosphereMieCoefficient,Ee.atmosphereRayleighScaleHeight=e.atmosphereRayleighScaleHeight,Ee.atmosphereMieScaleHeight=e.atmosphereMieScaleHeight,Ee.atmosphereMieAnisotropy=e.atmosphereMieAnisotropy,Ee.perFragmentGroundAtmosphere=k,Ee.hasVertexNormals=B,Ee.useWebMercatorProjection=we,Ee.clippedByBoundaries=i.clippedByBoundaries,Ee.hasGeodeticSurfaceNormals=K,Ee.hasExaggeration=Z;let Be=i.imagery,ke=0,Ge=Be.length,rt=e.showSkirts&&!u&&!d,et=e.backFaceCulling&&!u&&!d,Pe=et?e._renderState:e._disableCullingRenderState,Ye=et?e._blendRenderState:e._disableCullingBlendRenderState,ut=Pe,Tt=e._firstPassInitialColor,tn=n.context;if(l(e._debug.boundingSphereTile)||q6(),e._materialUniformMap!==e.materialUniformMap){e._materialUniformMap=e.materialUniformMap;let xt=e._drawCommands.length;for(let Pt=0;Pt<xt;++Pt)e._uniformMaps[Pt]=Cwe(n,e)}do{let xt=0,Pt,bn;if(e._drawCommands.length<=e._usedDrawCommands?(Pt=new tt,Pt.owner=t,Pt.cull=!1,Pt.boundingVolume=new ce,Pt.orientedBoundingBox=void 0,bn=Cwe(n,e),e._drawCommands.push(Pt),e._uniformMaps.push(bn)):(Pt=e._drawCommands[e._usedDrawCommands],bn=e._uniformMaps[e._usedDrawCommands]),Pt.owner=t,++e._usedDrawCommands,t===e._debug.boundingSphereTile){let Xo=q.boundingVolume,gr=q.boundingSphere;l(Xo)?Swe(Xo,V.RED).update(n):l(gr)&&wwe(gr,V.RED).update(n)}let at=bn.properties;se.clone(Tt,at.initialColor),at.oceanNormalMap=w,at.lightingFadeDistance.x=e.lightingFadeOutDistance,at.lightingFadeDistance.y=e.lightingFadeInDistance,at.nightFadeDistance.x=e.nightFadeOutDistance,at.nightFadeDistance.y=e.nightFadeInDistance,at.atmosphereLightIntensity=e.atmosphereLightIntensity,at.atmosphereRayleighCoefficient=e.atmosphereRayleighCoefficient,at.atmosphereMieCoefficient=e.atmosphereMieCoefficient,at.atmosphereRayleighScaleHeight=e.atmosphereRayleighScaleHeight,at.atmosphereMieScaleHeight=e.atmosphereMieScaleHeight,at.atmosphereMieAnisotropy=e.atmosphereMieAnisotropy,at.zoomedOutOceanSpecularIntensity=e.zoomedOutOceanSpecularIntensity;let st=u?g:p,Ln=u?p:g;l(st)&&(se.fromElements(st.near,st.nearValue,st.far,st.farValue,at.frontFaceAlphaByDistance),se.fromElements(Ln.near,Ln.nearValue,Ln.far,Ln.farValue,at.backFaceAlphaByDistance)),se.fromElements(y.near,y.nearValue,y.far,y.farValue,at.undergroundColorAlphaByDistance),V.clone(A,at.undergroundColor),at.lambertDiffuseMultiplier=b,at.vertexShadowDarkness=C;let Nn=!l(i.vertexArray)&&l(e.fillHighlightColor)&&e.fillHighlightColor.alpha>0;Nn&&V.clone(e.fillHighlightColor,at.fillHighlightColor),at.verticalExaggerationAndRelativeHeight.x=J,at.verticalExaggerationAndRelativeHeight.y=W,at.center3D=U.center,h.clone(F,at.rtc),se.clone(le,at.tileRectangle),at.southAndNorthLatitude.x=me,at.southAndNorthLatitude.y=ae,at.southMercatorYAndOneOverHeight.x=be,at.southMercatorYAndOneOverHeight.y=ge;let uo=Ebt,Yo=W6(t.rectangle,e.cartographicLimitRectangle),oo=vbt,ro=W6(t.rectangle,m);h.fromElements(I,O,N,at.hsbShift);let Xn=t.rectangle,Kn=1/Xn.width,cn=1/Xn.height;uo.x=(Yo.west-Xn.west)*Kn,uo.y=(Yo.south-Xn.south)*cn,uo.z=(Yo.east-Xn.west)*Kn,uo.w=(Yo.north-Xn.south)*cn,se.clone(uo,at.localizedCartographicLimitRectangle),oo.x=(ro.west-Xn.west)*Kn,oo.y=(ro.south-Xn.south)*cn,oo.z=(ro.east-Xn.west)*Kn,oo.w=(ro.north-Xn.south)*cn,se.clone(oo,at.localizedTranslucencyRectangle);let Jn=L&&D.fog(t._distance,n.fog.density)>D.EPSILON3;j=j&&(Jn||_);let Pr=!1,Da=!1,rs=!1,Ga=!1,as=!1,pr=!1,ri=!1,Gr=!1,Po=!1,Ri=!1;for(;xt<a&&ke<Ge;){let Xo=Be[ke],gr=Xo.readyImagery;if(++ke,!l(gr)||gr.imageryLayer.alpha===0)continue;let Ch=Xo.useWebMercatorT?gr.textureWebMercator:gr.texture,Hr=gr.imageryLayer;l(Xo.textureTranslationAndScale)||(Xo.textureTranslationAndScale=Hr._calculateTextureTranslationAndScale(t,Xo)),at.dayTextures[xt]=Ch,at.dayTextureTranslationAndScale[xt]=Xo.textureTranslationAndScale,at.dayTextureTexCoordsRectangle[xt]=Xo.textureCoordinateRectangle,at.dayTextureUseWebMercatorT[xt]=Xo.useWebMercatorT,at.dayTextureAlpha[xt]=Hr.alpha,pr=pr||at.dayTextureAlpha[xt]!==1,at.dayTextureNightAlpha[xt]=Hr.nightAlpha,ri=ri||at.dayTextureNightAlpha[xt]!==1,at.dayTextureDayAlpha[xt]=Hr.dayAlpha,ri=ri||at.dayTextureDayAlpha[xt]!==1,at.dayTextureBrightness[xt]=Hr.brightness,Pr=Pr||at.dayTextureBrightness[xt]!==ya.DEFAULT_BRIGHTNESS,at.dayTextureContrast[xt]=Hr.contrast,Da=Da||at.dayTextureContrast[xt]!==ya.DEFAULT_CONTRAST,at.dayTextureHue[xt]=Hr.hue,rs=rs||at.dayTextureHue[xt]!==ya.DEFAULT_HUE,at.dayTextureSaturation[xt]=Hr.saturation,Ga=Ga||at.dayTextureSaturation[xt]!==ya.DEFAULT_SATURATION,at.dayTextureOneOverGamma[xt]=1/Hr.gamma,as=as||at.dayTextureOneOverGamma[xt]!==1/ya.DEFAULT_GAMMA,at.dayTextureSplit[xt]=Hr.splitDirection,Gr=Gr||at.dayTextureSplit[xt]!==0;let Vc=at.dayTextureCutoutRectangles[xt];if(l(Vc)||(Vc=at.dayTextureCutoutRectangles[xt]=new se),se.clone(se.ZERO,Vc),l(Hr.cutoutRectangle)){let Co=W6(Xn,Hr.cutoutRectangle),Ha=oe.simpleIntersection(Co,Xn,Ewe);Po=l(Ha)||Po,Vc.x=(Co.west-Xn.west)*Kn,Vc.y=(Co.south-Xn.south)*cn,Vc.z=(Co.east-Xn.west)*Kn,Vc.w=(Co.north-Xn.south)*cn}let jc=at.colorsToAlpha[xt];l(jc)||(jc=at.colorsToAlpha[xt]=new se);let Cc=l(Hr.colorToAlpha)&&Hr.colorToAlphaThreshold>0;if(Ri=Ri||Cc,Cc){let Co=Hr.colorToAlpha;jc.x=Co.red,jc.y=Co.green,jc.z=Co.blue,jc.w=Hr.colorToAlphaThreshold}else jc.w=-1;if(l(gr.credits)){let Co=gr.credits;for(let Ha=0,H_=Co.length;Ha<H_;++Ha)o.addCreditToNextFrame(Co[Ha])}++xt}at.dayTextures.length=xt,at.waterMask=s,se.clone(c,at.waterMaskTranslationAndScale),at.minMaxHeight.x=H.minimumHeight,at.minMaxHeight.y=H.maximumHeight,M.clone(H.matrix,at.scaleAndBias);let ui=e._clippingPlanes,Lo=l(ui)&&ui.enabled&&t.isClipped;Lo&&(at.clippingPlanesEdgeColor=V.clone(ui.edgeColor,at.clippingPlanesEdgeColor),at.clippingPlanesEdgeWidth=ui.edgeWidth);let bc=e._clippingPolygons,sa=l(bc)&&bc.enabled&&t.isClipped;Ee.numberOfDayTextures=xt,Ee.applyBrightness=Pr,Ee.applyContrast=Da,Ee.applyHue=rs,Ee.applySaturation=Ga,Ee.applyGamma=as,Ee.applyAlpha=pr,Ee.applyDayNightAlpha=ri,Ee.applySplit=Gr,Ee.enableFog=Jn,Ee.enableClippingPlanes=Lo,Ee.clippingPlanes=ui,Ee.enableClippingPolygons=sa,Ee.clippingPolygons=bc,Ee.hasImageryLayerCutout=Po,Ee.colorCorrect=j,Ee.highlightFillTile=Nn,Ee.colorToAlpha=Ri,Ee.showUndergroundColor=x,Ee.translucent=d;let cf=i.renderedMesh.indices.length;rt||(cf=i.renderedMesh.indexCountWithoutSkirts),Pt.shaderProgram=e._surfaceShaderSet.getShaderProgram(Ee),Pt.castShadows=T,Pt.receiveShadows=v,Pt.renderState=ut,Pt.primitiveType=Re.TRIANGLES,Pt.vertexArray=i.vertexArray||i.fill.vertexArray,Pt.count=cf,Pt.uniformMap=bn,Pt.pass=Ie.GLOBE,e._debug.wireframe&&(Bbt(tn,e,t),l(i.wireframeVertexArray)&&(Pt.vertexArray=i.wireframeVertexArray,Pt.primitiveType=Re.LINES,Pt.count=cf*2));let Ks=Pt.boundingVolume,G_=Pt.orientedBoundingBox;n.mode!==ie.SCENE3D?(ce.fromRectangleWithHeights2D(t.rectangle,n.mapProjection,q.minimumHeight,q.maximumHeight,Ks),h.fromElements(Ks.center.z,Ks.center.x,Ks.center.y,Ks.center),n.mode===ie.MORPHING&&(Ks=ce.union(q.boundingSphere,Ks,Ks))):(Pt.boundingVolume=ce.clone(q.boundingSphere,Ks),Pt.orientedBoundingBox=Qt.clone(q.boundingVolume,G_)),Pt.dirty=!0,d&&f.updateDerivedCommands(Pt,n),Twe(Pt,n),ut=Ye,Tt=Nbt}while(ke<Ge)}var s3=Dr;function Iwe(){this._enabled=!1,this._frontFaceAlpha=1,this._frontFaceAlphaByDistance=void 0,this._backFaceAlpha=1,this._backFaceAlphaByDistance=void 0,this._rectangle=oe.clone(oe.MAX_VALUE)}Object.defineProperties(Iwe.prototype,{enabled:{get:function(){return this._enabled},set:function(e){this._enabled=e}},frontFaceAlpha:{get:function(){return this._frontFaceAlpha},set:function(e){this._frontFaceAlpha=e}},frontFaceAlphaByDistance:{get:function(){return this._frontFaceAlphaByDistance},set:function(e){this._frontFaceAlphaByDistance=zt.clone(e,this._frontFaceAlphaByDistance)}},backFaceAlpha:{get:function(){return this._backFaceAlpha},set:function(e){this._backFaceAlpha=e}},backFaceAlphaByDistance:{get:function(){return this._backFaceAlphaByDistance},set:function(e){this._backFaceAlphaByDistance=zt.clone(e,this._backFaceAlphaByDistance)}},rectangle:{get:function(){return this._rectangle},set:function(e){l(e)||(e=oe.clone(oe.MAX_VALUE)),oe.clone(e,this._rectangle)}}});var c3=Iwe;var nte=class{constructor(t){this._ellipsoid=new bm(t.ellipsoid,h.ZERO)}get ellipsoid(){return this._ellipsoid}},l3=nte;var ite=class{constructor(t){this.maxSize=t,this.cache=new Map}get(t){if(!this.cache.has(t))return;let n=this.cache.get(t);return this.cache.delete(t),this.cache.set(t,n),n}set(t,n){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){let i=this.cache.keys().next().value;this.cache.delete(i)}this.cache.set(t,n)}get size(){return this.cache.size}clear(){this.cache.clear()}},Vbt=1e3,ote=class e{constructor(t){this._tilingScheme=t.tilingScheme,this._x=t.x,this._y=t.y,this._level=t.level,this._parent=t.parent,this._rectangle=this._tilingScheme.tileXYToRectangle(this._x,this._y,this._level),this._southwestChild=void 0,this._southeastChild=void 0,this._northwestChild=void 0,this._northeastChild=void 0,this.replacementPrevious=void 0,this.replacementNext=void 0,this._distance=0,this._loadPriority=0,this._customData=new Set,this._customDataIterator=void 0,this._addedCustomData=[],this._removedCustomData=[],this._lastSelectionResult=oi.NONE,this._lastSelectionResultFrame=void 0,this._loadedCallbacks={},this._positionCache=new ite(Vbt),this.state=qs.START,this.renderable=!1,this.upsampledFromParent=!1,this.data=void 0}static createLevelZeroTiles(t){let n=t.getNumberOfXTilesAtLevel(0),i=t.getNumberOfYTilesAtLevel(0),o=new Array(n*i),r=0;for(let a=0;a<i;++a)for(let s=0;s<n;++s)o[r++]=new e({tilingScheme:t,x:s,y:a,level:0});return o}_getCacheKey(t,n){return Gbt(t.longitude,t.latitude,this._rectangle,n)}getPositionCacheEntry(t,n){return this._positionCache.get(this._getCacheKey(t,n))}setPositionCacheEntry(t,n,i){this._positionCache.set(this._getCacheKey(t,n),i)}clearPositionCache(){this._positionCache.size>0&&this._positionCache.clear()}updateCustomData(){let t=this._addedCustomData,n=this._removedCustomData;if(t.length===0&&n.length===0)return;let i=this.customData;for(let o=0;o<t.length;++o){let r=t[o];i.add(r),Dwe(this,r.positionCartographic)._addedCustomData.push(r)}this._addedCustomData.length=0;for(let o=0;o<n.length;++o){let r=n[o];i.has(r)&&i.delete(r),Dwe(this,r.positionCartographic)._removedCustomData.push(r)}this._removedCustomData.length=0}get tilingScheme(){return this._tilingScheme}get x(){return this._x}get y(){return this._y}get level(){return this._level}get parent(){return this._parent}get rectangle(){return this._rectangle}get children(){return[this.northwestChild,this.northeastChild,this.southwestChild,this.southeastChild]}get southwestChild(){return l(this._southwestChild)||(this._southwestChild=new e({tilingScheme:this.tilingScheme,x:this.x*2,y:this.y*2+1,level:this.level+1,parent:this})),this._southwestChild}get southeastChild(){return l(this._southeastChild)||(this._southeastChild=new e({tilingScheme:this.tilingScheme,x:this.x*2+1,y:this.y*2+1,level:this.level+1,parent:this})),this._southeastChild}get northwestChild(){return l(this._northwestChild)||(this._northwestChild=new e({tilingScheme:this.tilingScheme,x:this.x*2,y:this.y*2,level:this.level+1,parent:this})),this._northwestChild}get northeastChild(){return l(this._northeastChild)||(this._northeastChild=new e({tilingScheme:this.tilingScheme,x:this.x*2+1,y:this.y*2,level:this.level+1,parent:this})),this._northeastChild}get customData(){return this._customData}get needsLoading(){return this.state<qs.DONE}get eligibleForUnloading(){let t=!0;return l(this.data)&&(t=this.data.eligibleForUnloading,l(t)||(t=!0)),t}findLevelZeroTile(t,n,i){let o=this.tilingScheme.getNumberOfXTilesAtLevel(0);if(n<0?n+=o:n>=o&&(n-=o),!(i<0||i>=this.tilingScheme.getNumberOfYTilesAtLevel(0)))return t.filter(function(r){return r.x===n&&r.y===i})[0]}findTileToWest(t){let n=this.parent;if(n===void 0)return this.findLevelZeroTile(t,this.x-1,this.y);if(n.southeastChild===this)return n.southwestChild;if(n.northeastChild===this)return n.northwestChild;let i=n.findTileToWest(t);if(i!==void 0)return n.southwestChild===this?i.southeastChild:i.northeastChild}findTileToEast(t){let n=this.parent;if(n===void 0)return this.findLevelZeroTile(t,this.x+1,this.y);if(n.southwestChild===this)return n.southeastChild;if(n.northwestChild===this)return n.northeastChild;let i=n.findTileToEast(t);if(i!==void 0)return n.southeastChild===this?i.southwestChild:i.northwestChild}findTileToSouth(t){let n=this.parent;if(n===void 0)return this.findLevelZeroTile(t,this.x,this.y+1);if(n.northwestChild===this)return n.southwestChild;if(n.northeastChild===this)return n.southeastChild;let i=n.findTileToSouth(t);if(i!==void 0)return n.southwestChild===this?i.northwestChild:i.northeastChild}findTileToNorth(t){let n=this.parent;if(n===void 0)return this.findLevelZeroTile(t,this.x,this.y-1);if(n.southwestChild===this)return n.northwestChild;if(n.southeastChild===this)return n.northeastChild;let i=n.findTileToNorth(t);if(i!==void 0)return n.northwestChild===this?i.southwestChild:i.southeastChild}freeResources(){this.clearPositionCache(),this.state=qs.START,this.renderable=!1,this.upsampledFromParent=!1;let t=this.data;l(t)&&l(t.freeResources)&&t.freeResources(),Y6(this._southwestChild),this._southwestChild=void 0,Y6(this._southeastChild),this._southeastChild=void 0,Y6(this._northwestChild),this._northwestChild=void 0,Y6(this._northeastChild),this._northeastChild=void 0}},jbt=256;function Gbt(e,t,n,i){let o=n.width/jbt*i,r=Math.floor(e/o)*o,a=Math.floor(t/o)*o;return`${r.toFixed(10)},${a.toFixed(10)}`}var Hbt=new de;function Dwe(e,t){let n=e.northwestChild.rectangle,i=oe.southeast(n,Hbt),o=t.longitude>=i.longitude?1:0;switch((t.latitude<i.latitude?1:0)*2+o){case 0:return e.northwestChild;case 1:return e.northeastChild;case 2:return e.southwestChild;default:return e.southeastChild}}function Y6(e){l(e)&&e.freeResources()}var u3=ote;function X6(){this.head=void 0,this.tail=void 0,this.count=0,this._lastBeforeStartOfFrame=void 0}X6.prototype.markStartOfRenderFrame=function(){this._lastBeforeStartOfFrame=this.head};X6.prototype.trimTiles=function(e){let t=this.tail,n=!0;for(;n&&l(this._lastBeforeStartOfFrame)&&this.count>e&&l(t);){n=t!==this._lastBeforeStartOfFrame;let i=t.replacementPrevious;t.eligibleForUnloading&&(t.freeResources(),Pwe(this,t)),t=i}};function Pwe(e,t){let n=t.replacementPrevious,i=t.replacementNext;t===e._lastBeforeStartOfFrame&&(e._lastBeforeStartOfFrame=i),t===e.head?e.head=i:n.replacementNext=i,t===e.tail?e.tail=n:i.replacementPrevious=n,t.replacementPrevious=void 0,t.replacementNext=void 0,--e.count}X6.prototype.markTileRendered=function(e){let t=this.head;if(t===e){e===this._lastBeforeStartOfFrame&&(this._lastBeforeStartOfFrame=e.replacementNext);return}if(++this.count,!l(t)){e.replacementPrevious=void 0,e.replacementNext=void 0,this.head=e,this.tail=e;return}(l(e.replacementPrevious)||l(e.replacementNext))&&Pwe(this,e),e.replacementPrevious=void 0,e.replacementNext=t,t.replacementPrevious=e,this.head=e};var f3=X6;function uh(e){this._tileProvider=e.tileProvider,this._tileProvider.quadtree=this,this._debug={enableDebugOutput:!1,maxDepth:0,maxDepthVisited:0,tilesVisited:0,tilesCulled:0,tilesRendered:0,tilesWaitingForChildren:0,lastMaxDepth:-1,lastMaxDepthVisited:-1,lastTilesVisited:-1,lastTilesCulled:-1,lastTilesRendered:-1,lastTilesWaitingForChildren:-1,suspendLodUpdate:!1};let n=this._tileProvider.tilingScheme.ellipsoid;this._tilesRenderedThisFrame=new Set,this._tilesToRender=[],this._tileLoadQueueHigh=[],this._tileLoadQueueMedium=[],this._tileLoadQueueLow=[],this._tileReplacementQueue=new f3,this._levelZeroTiles=void 0,this._loadQueueTimeSlice=5,this._tilesInvalidated=!1,this._addHeightCallbacks=[],this._removeHeightCallbacks=[],this._tileToUpdateHeights=[],this._updateHeightsTimeSlice=2,this._cameraPositionCartographic=void 0,this._cameraReferenceFrameOriginCartographic=void 0,this.maximumScreenSpaceError=e.maximumScreenSpaceError??2,this.tileCacheSize=e.tileCacheSize??100,this.loadingDescendantLimit=20,this.preloadAncestors=!0,this.preloadSiblings=!1,this._occluders=new l3({ellipsoid:n}),this._tileLoadProgressEvent=new ye,this._lastTileLoadQueueLength=0,this._lastSelectionFrameNumber=void 0}Object.defineProperties(uh.prototype,{tileProvider:{get:function(){return this._tileProvider}},tileLoadProgressEvent:{get:function(){return this._tileLoadProgressEvent}},occluders:{get:function(){return this._occluders}}});uh.prototype.invalidateAllTiles=function(){this._tilesInvalidated=!0};function Wbt(e){let t=e._tileReplacementQueue;t.head=void 0,t.tail=void 0,t.count=0,Owe(e);let n=e._levelZeroTiles;if(l(n))for(let i=0;i<n.length;++i){let r=n[i].customData;for(let a of r)a.level=0,e._addHeightCallbacks.push(a);n[i].freeResources()}e._levelZeroTiles=void 0,e._tileProvider.cancelReprojections()}uh.prototype.forEachLoadedTile=function(e){let t=this._tileReplacementQueue.head;for(;l(t);)t.state!==qs.START&&e(t),t=t.replacementNext};uh.prototype.forEachRenderedTile=function(e){let t=this._tilesRenderedThisFrame;for(let n of t)e(n)};uh.prototype.updateHeight=function(e,t){let n=this,i={positionOnEllipsoidSurface:void 0,positionCartographic:e,level:-1,callback:t};return i.removeFunc=function(){let o=n._addHeightCallbacks,r=o.length;for(let a=0;a<r;++a)if(o[a]===i){o.splice(a,1);break}n._removeHeightCallbacks.push(i),i.callback&&(i.callback=void 0)},n._addHeightCallbacks.push(i),i.removeFunc};uh.prototype.update=function(e){l(this._tileProvider.update)&&this._tileProvider.update(e)};function Owe(e){let t=e._debug;t.maxDepth=0,t.maxDepthVisited=0,t.tilesVisited=0,t.tilesCulled=0,t.tilesRendered=0,t.tilesWaitingForChildren=0,e._tileLoadQueueHigh.length=0,e._tileLoadQueueMedium.length=0,e._tileLoadQueueLow.length=0}uh.prototype.beginFrame=function(e){e.passes.render&&(this._tilesInvalidated&&(Wbt(this),this._tilesInvalidated=!1),this._tileProvider.initialize(e),Owe(this),!this._debug.suspendLodUpdate&&(this._tileReplacementQueue.markStartOfRenderFrame(),this._tilesRenderedThisFrame.clear()))};uh.prototype.render=function(e){let t=e.passes,n=this._tileProvider;t.render&&(n.beginUpdate(e),Kbt(this,e),rCt(this,e),n.endUpdate(e)),t.pick&&this._tilesToRender.length>0&&n.updateForPick(e)};function qbt(e,t){let n=e._tileLoadQueueHigh.length+e._tileLoadQueueMedium.length+e._tileLoadQueueLow.length;if(n!==e._lastTileLoadQueueLength||e._tilesInvalidated){let o=ye.prototype.raiseEvent.bind(e._tileLoadProgressEvent,n);t.afterRender.push(()=>(o(),!0)),e._lastTileLoadQueueLength=n}let i=e._debug;i.enableDebugOutput&&!i.suspendLodUpdate&&(i.maxDepth=e._tilesToRender.reduce(function(o,r){return Math.max(o,r.level)},-1),i.tilesRendered=e._tilesToRender.length,(i.tilesVisited!==i.lastTilesVisited||i.tilesRendered!==i.lastTilesRendered||i.tilesCulled!==i.lastTilesCulled||i.maxDepth!==i.lastMaxDepth||i.tilesWaitingForChildren!==i.lastTilesWaitingForChildren||i.maxDepthVisited!==i.lastMaxDepthVisited)&&(console.log(`Visited ${i.tilesVisited}, Rendered: ${i.tilesRendered}, Culled: ${i.tilesCulled}, Max Depth Rendered: ${i.maxDepth}, Max Depth Visited: ${i.maxDepthVisited}, Waiting for children: ${i.tilesWaitingForChildren}`),i.lastTilesVisited=i.tilesVisited,i.lastTilesRendered=i.tilesRendered,i.lastTilesCulled=i.tilesCulled,i.lastMaxDepth=i.maxDepth,i.lastTilesWaitingForChildren=i.tilesWaitingForChildren,i.lastMaxDepthVisited=i.maxDepthVisited))}uh.prototype.endFrame=function(e){!e.passes.render||e.mode===ie.MORPHING||(tCt(this,e),oCt(this,e),qbt(this,e))};uh.prototype.isDestroyed=function(){return!1};uh.prototype.destroy=function(){this._tileProvider=this._tileProvider&&this._tileProvider.destroy()};var h3,Rwe=new de;function Ybt(e,t){let n=oe.center(e.rectangle,Rwe),i=n.longitude-h3.longitude,o=n.latitude-h3.latitude;n=oe.center(t.rectangle,Rwe);let r=n.longitude-h3.longitude,a=n.latitude-h3.latitude;return i*i+o*o-(r*r+a*a)}var Xbt=new h,d3=[];function Kbt(e,t){let n=e._debug;if(n.suspendLodUpdate)return;let i=e._tilesToRender;i.length=0;let o=e._tileProvider;if(!l(e._levelZeroTiles)){let d=o.tilingScheme;if(l(d)){let p=o.tilingScheme;e._levelZeroTiles=u3.createLevelZeroTiles(p);let g=e._levelZeroTiles.length;if(d3.length<g){d3=new Array(g);for(let m=0;m<g;++m)d3[m]===void 0&&(d3[m]=new m3)}}else return}e._occluders.ellipsoid.cameraPosition=t.camera.positionWC;let r=e._levelZeroTiles,a=r.length>1?e._occluders:void 0;h3=t.camera.positionCartographic,r.sort(Ybt);let s=e._addHeightCallbacks,c=e._removeHeightCallbacks;s.forEach(d=>{let p=r.find(g=>oe.contains(g.rectangle,d.positionCartographic));p&&p._addedCustomData.push(d)}),c.forEach(d=>{let p=r.find(g=>oe.contains(g.rectangle,d.positionCartographic));p&&p._removedCustomData.push(d)}),r.forEach(d=>d.updateCustomData()),s.length=0,c.length=0;let u=t.camera;e._cameraPositionCartographic=u.positionCartographic;let f=M.getTranslation(u.transform,Xbt);e._cameraReferenceFrameOriginCartographic=e.tileProvider.tilingScheme.ellipsoid.cartesianToCartographic(f,e._cameraReferenceFrameOriginCartographic);for(let d=0;d<r.length;++d){let p=r[d];e._tileReplacementQueue.markTileRendered(p),p.renderable?zc(e,p,o,t,a,!1,d3[d]):(b_(e,e._tileLoadQueueHigh,p,t),++n.tilesWaitingForChildren)}e._lastSelectionFrameNumber=t.frameNumber}function b_(e,t,n,i){n.needsLoading&&(e.tileProvider.computeTileLoadPriority!==void 0&&(n._loadPriority=e.tileProvider.computeTileLoadPriority(n,i)),t.push(n))}function m3(){this.allAreRenderable=!0,this.anyWereRenderedLastFrame=!1,this.notYetRenderableCount=0}function Mwe(){this.southwest=new m3,this.southeast=new m3,this.northwest=new m3,this.northeast=new m3}Mwe.prototype.combine=function(e){let t=this.southwest,n=this.southeast,i=this.northwest,o=this.northeast;e.allAreRenderable=t.allAreRenderable&&n.allAreRenderable&&i.allAreRenderable&&o.allAreRenderable,e.anyWereRenderedLastFrame=t.anyWereRenderedLastFrame||n.anyWereRenderedLastFrame||i.anyWereRenderedLastFrame||o.anyWereRenderedLastFrame,e.notYetRenderableCount=t.notYetRenderableCount+n.notYetRenderableCount+i.notYetRenderableCount+o.notYetRenderableCount};var ate=new Array(31);for(let e=0;e<ate.length;++e)ate[e]=new Mwe;function Qbt(e,t,n,i,o){let r=e._debug;++r.tilesVisited,e._tileReplacementQueue.markTileRendered(n),n.updateCustomData(),n.level>r.maxDepthVisited&&(r.maxDepthVisited=n.level);let a=Zbt(e,t,n)<e.maximumScreenSpaceError,s=n.southwestChild,c=n.southeastChild,u=n.northwestChild,f=n.northeastChild,d=e._lastSelectionFrameNumber,p=n._lastSelectionResultFrame===d?n._lastSelectionResult:oi.NONE,g=e.tileProvider;if(a||i){let m=oi.originalResult(p)===oi.RENDERED,A=oi.originalResult(p)===oi.CULLED||p===oi.NONE,y=n.state===qs.DONE,x=m||A||y;if(x||l(g.canRenderWithoutLosingDetail)&&(x=g.canRenderWithoutLosingDetail(n)),x){a&&b_(e,e._tileLoadQueueMedium,n,t),K6(e,n),o.allAreRenderable=n.renderable,o.anyWereRenderedLastFrame=p===oi.RENDERED,o.notYetRenderableCount=n.renderable?0:1,n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=oi.RENDERED,o.anyWereRenderedLastFrame||e._tileToUpdateHeights.push(n);return}i=!0,a&&b_(e,e._tileLoadQueueHigh,n,t)}if(g.canRefine(n)){if(s.upsampledFromParent&&c.upsampledFromParent&&u.upsampledFromParent&&f.upsampledFromParent){K6(e,n),b_(e,e._tileLoadQueueMedium,n,t),e._tileReplacementQueue.markTileRendered(s),e._tileReplacementQueue.markTileRendered(c),e._tileReplacementQueue.markTileRendered(u),e._tileReplacementQueue.markTileRendered(f),o.allAreRenderable=n.renderable,o.anyWereRenderedLastFrame=p===oi.RENDERED,o.notYetRenderableCount=n.renderable?0:1,n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=oi.RENDERED,o.anyWereRenderedLastFrame||e._tileToUpdateHeights.push(n);return}n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=oi.REFINED;let A=e._tilesToRender.length,y=e._tileLoadQueueLow.length,x=e._tileLoadQueueMedium.length,b=e._tileLoadQueueHigh.length,C=e._tileToUpdateHeights.length;if($bt(e,s,c,u,f,t,i,o),A!==e._tilesToRender.length){let E=o.allAreRenderable,S=o.anyWereRenderedLastFrame,w=o.notYetRenderableCount,P=!1;if(!E&&!S){let R=e._tilesToRender;for(let L=A;L<R.length;++L){let _=R[L];for(;_!==void 0&&_._lastSelectionResult!==oi.KICKED&&_!==n;)_._lastSelectionResult=oi.kick(_._lastSelectionResult),_=_.parent}e._tilesToRender.length=A,e._tileToUpdateHeights.length=C,K6(e,n),n._lastSelectionResult=oi.RENDERED;let B=p===oi.RENDERED;!B&&w>e.loadingDescendantLimit&&(e._tileLoadQueueLow.length=y,e._tileLoadQueueMedium.length=x,e._tileLoadQueueHigh.length=b,b_(e,e._tileLoadQueueMedium,n,t),o.notYetRenderableCount=n.renderable?0:1,P=!0),o.allAreRenderable=n.renderable,o.anyWereRenderedLastFrame=B,B||e._tileToUpdateHeights.push(n),++r.tilesWaitingForChildren}e.preloadAncestors&&!P&&b_(e,e._tileLoadQueueLow,n,t)}return}n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=oi.RENDERED,K6(e,n),b_(e,e._tileLoadQueueHigh,n,t),o.allAreRenderable=n.renderable,o.anyWereRenderedLastFrame=p===oi.RENDERED,o.notYetRenderableCount=n.renderable?0:1}function $bt(e,t,n,i,o,r,a,s){let c=r.camera.positionCartographic,u=e._tileProvider,f=e._occluders,d=ate[t.level],p=d.southwest,g=d.southeast,m=d.northwest,A=d.northeast;c.longitude<t.rectangle.east?c.latitude<t.rectangle.north?(zc(e,t,u,r,f,a,p),zc(e,n,u,r,f,a,g),zc(e,i,u,r,f,a,m),zc(e,o,u,r,f,a,A)):(zc(e,i,u,r,f,a,m),zc(e,t,u,r,f,a,p),zc(e,o,u,r,f,a,A),zc(e,n,u,r,f,a,g)):c.latitude<t.rectangle.north?(zc(e,n,u,r,f,a,g),zc(e,t,u,r,f,a,p),zc(e,o,u,r,f,a,A),zc(e,i,u,r,f,a,m)):(zc(e,o,u,r,f,a,A),zc(e,i,u,r,f,a,m),zc(e,n,u,r,f,a,g),zc(e,t,u,r,f,a,p)),d.combine(s)}function Jbt(e,t){let n=t.rectangle;return l(e._cameraPositionCartographic)&&oe.contains(n,e._cameraPositionCartographic)||l(e._cameraReferenceFrameOriginCartographic)&&oe.contains(n,e._cameraReferenceFrameOriginCartographic)}function zc(e,t,n,i,o,r,a){if(n.computeTileVisibility(t,i,o)!==Vr.NONE)return Qbt(e,i,t,r,a);if(++e._debug.tilesCulled,e._tileReplacementQueue.markTileRendered(t),a.allAreRenderable=!0,a.anyWereRenderedLastFrame=!1,a.notYetRenderableCount=0,Jbt(e,t)){(!l(t.data)||!l(t.data.vertexArray))&&b_(e,e._tileLoadQueueMedium,t,i);let s=e._lastSelectionFrameNumber,c=t._lastSelectionResultFrame===s?t._lastSelectionResult:oi.NONE;c!==oi.CULLED_BUT_NEEDED&&c!==oi.RENDERED&&e._tileToUpdateHeights.push(t),t._lastSelectionResult=oi.CULLED_BUT_NEEDED}else e.preloadSiblings||t.level===0?(b_(e,e._tileLoadQueueLow,t,i),t._lastSelectionResult=oi.CULLED):t._lastSelectionResult=oi.CULLED;t._lastSelectionResultFrame=i.frameNumber}function Zbt(e,t,n){if(t.mode===ie.SCENE2D||t.camera.frustum instanceof fn||t.camera.frustum instanceof da)return eCt(e,t,n);let i=e._tileProvider.getLevelMaximumGeometricError(n.level),o=n._distance,r=t.context.drawingBufferHeight,a=t.camera.frustum.sseDenominator,s=i*r/(o*a);return t.fog.enabled&&(s-=D.fog(o,t.fog.density)*t.fog.sse),s/=t.pixelRatio,s}function eCt(e,t,n){let o=t.camera.frustum,r=o.offCenterFrustum;l(r)&&(o=r);let a=t.context,s=a.drawingBufferWidth,c=a.drawingBufferHeight,u=e._tileProvider.getLevelMaximumGeometricError(n.level),f=Math.max(o.top-o.bottom,o.right-o.left)/Math.max(s,c),d=u/f;return t.fog.enabled&&t.mode!==ie.SCENE2D&&(d-=D.fog(n._distance,t.fog.density)*t.fog.sse),d/=t.pixelRatio,d}function K6(e,t){e._tilesToRender.push(t),e._tilesRenderedThisFrame.add(t)}function tCt(e,t){let n=e._tileLoadQueueHigh,i=e._tileLoadQueueMedium,o=e._tileLoadQueueLow;if(n.length===0&&i.length===0&&o.length===0)return;e._tileReplacementQueue.trimTiles(e.tileCacheSize);let r=Fi()+e._loadQueueTimeSlice,a=e._tileProvider,s=rte(e,t,a,r,n,!1);s=rte(e,t,a,r,i,s),rte(e,t,a,r,o,s)}function nCt(e,t){return e._loadPriority-t._loadPriority}function rte(e,t,n,i,o,r){n.computeTileLoadPriority!==void 0&&o.sort(nCt);for(let a=0,s=o.length;a<s&&(Fi()<i||!r);++a){let c=o[a];e._tileReplacementQueue.markTileRendered(c),n.loadTile(t,c),r=!0}return r}var Jw=new gn,Q6=new de,Fy=new h,iCt=[];function oCt(e,t){if(!l(e.tileProvider.tilingScheme))return;let n=iCt;n.length=0;let i=e._tileToUpdateHeights,o=Fi(),r=e._updateHeightsTimeSlice,a=o+r,s=t.mode,c=t.mapProjection,u=e.tileProvider.tilingScheme.ellipsoid,f;for(;i.length>0;){let d=i[0];if(!l(d.data)||!l(d.data.mesh)){let y=d._lastSelectionResultFrame===e._lastSelectionFrameNumber?d._lastSelectionResult:oi.NONE;(y===oi.RENDERED||y===oi.CULLED_BUT_NEEDED)&&n.push(d),d.clearPositionCache(),i.shift();continue}let p=d.customData;l(d._customDataIterator)||(d._customDataIterator=p.values());let g=d._customDataIterator,m=!1,A;for(;!(A=g.next()).done;){let y=A.value,x=d.data.terrainData,b=l(x)&&x.wasCreatedByUpsampling();if(d.level>y.level&&!b){let C,E=d.getPositionCacheEntry(y.positionCartographic,e.maximumScreenSpaceError);if(l(E))C=E;else{if(l(y.positionOnEllipsoidSurface)||(y.positionOnEllipsoidSurface=h.fromRadians(y.positionCartographic.longitude,y.positionCartographic.latitude,0,u)),s===ie.SCENE3D){let S=u.geodeticSurfaceNormal(y.positionOnEllipsoidSurface,Jw.direction),w=u.getSurfaceNormalIntersectionWithZAxis(y.positionOnEllipsoidSurface,11500,Jw.origin);if(!l(w)){let P=0;l(d.data.tileBoundingRegion)&&(P=d.data.tileBoundingRegion.minimumHeight);let R=Math.min(P,-11500),B=h.multiplyByScalar(S,Math.abs(R)+1,Fy);h.subtract(y.positionOnEllipsoidSurface,B,Jw.origin)}}else de.clone(y.positionCartographic,Q6),Q6.height=-11500,c.project(Q6,Fy),h.fromElements(Fy.z,Fy.x,Fy.y,Fy),h.clone(Fy,Jw.origin),h.clone(h.UNIT_X,Jw.direction);C=d.data.pick(Jw,s,c,!1,Fy),l(C)&&d.setPositionCacheEntry(y.positionCartographic,e.maximumScreenSpaceError,C)}if(l(C)){if(l(y.callback)){let S=u.cartesianToCartographic(C,Q6);y.callback(S)}y.level=d.level}}if(Fi()>=a){m=!0;break}}if(m){d._customDataIterator=g;break}else d._customDataIterator=void 0,i.shift()}for(f=0;f<n.length;f++)i.push(n[f])}function rCt(e,t){let n=e._tileProvider,i=e._tilesToRender;for(let o=0,r=i.length;o<r;++o){let a=i[o];n.showTileThisFrame(a,t)}}var p3=uh;function Vm(e){e=e??te.default;let t=new a0({ellipsoid:e}),n=new pC;this._ellipsoid=e,this._imageryLayerCollection=n,this._surfaceShaderSet=new r3,this._material=void 0,this._surface=new p3({tileProvider:new s3({terrainProvider:t,imageryLayers:n,surfaceShaderSet:this._surfaceShaderSet})}),this._terrainProvider=t,this._terrainProviderChanged=new ye,this._undergroundColor=V.clone(V.BLACK),this._undergroundColorAlphaByDistance=new zt(e.maximumRadius/1e3,0,e.maximumRadius/5,1),this._translucency=new c3,cte(this),this.show=!0,this._oceanNormalMapResourceDirty=!0,this._oceanNormalMapResource=new De({url:Xt("Assets/Textures/waterNormalsSmall.jpg")}),this.maximumScreenSpaceError=2,this.tileCacheSize=100,this.loadingDescendantLimit=20,this.preloadAncestors=!0,this.preloadSiblings=!1,this.fillHighlightColor=void 0,this.enableLighting=!1,this.lambertDiffuseMultiplier=.9,this.dynamicAtmosphereLighting=!0,this.dynamicAtmosphereLightingFromSun=!1,this.showGroundAtmosphere=te.WGS84.equals(e),this.atmosphereLightIntensity=10,this.atmosphereRayleighCoefficient=new h(55e-7,13e-6,284e-7),this.atmosphereMieCoefficient=new h(21e-6,21e-6,21e-6),this.atmosphereRayleighScaleHeight=1e4,this.atmosphereMieScaleHeight=3200,this.atmosphereMieAnisotropy=.9,this.lightingFadeOutDistance=D.PI_OVER_TWO*e.minimumRadius,this.lightingFadeInDistance=D.PI*e.minimumRadius,this.nightFadeOutDistance=D.PI_OVER_TWO*e.minimumRadius,this.nightFadeInDistance=5*D.PI_OVER_TWO*e.minimumRadius,this.showWaterEffect=!0,this.depthTestAgainstTerrain=!1,this.shadows=vn.RECEIVE_ONLY,this.atmosphereHueShift=0,this.atmosphereSaturationShift=0,this.atmosphereBrightnessShift=0,this.showSkirts=!0,this.backFaceCulling=!0,this._oceanNormalMap=void 0,this._zoomedOutOceanSpecularIntensity=void 0,this.vertexShadowDarkness=.3}Object.defineProperties(Vm.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},imageryLayers:{get:function(){return this._imageryLayerCollection}},imageryLayersUpdatedEvent:{get:function(){return this._surface.tileProvider.imageryLayersUpdatedEvent}},tilesLoaded:{get:function(){return l(this._surface)?this._surface._tileLoadQueueHigh.length===0&&this._surface._tileLoadQueueMedium.length===0&&this._surface._tileLoadQueueLow.length===0:!0}},baseColor:{get:function(){return this._surface.tileProvider.baseColor},set:function(e){this._surface.tileProvider.baseColor=e}},clippingPlanes:{get:function(){return this._surface.tileProvider.clippingPlanes},set:function(e){this._surface.tileProvider.clippingPlanes=e}},clippingPolygons:{get:function(){return this._surface.tileProvider.clippingPolygons},set:function(e){this._surface.tileProvider.clippingPolygons=e}},cartographicLimitRectangle:{get:function(){return this._surface.tileProvider.cartographicLimitRectangle},set:function(e){l(e)||(e=oe.clone(oe.MAX_VALUE)),this._surface.tileProvider.cartographicLimitRectangle=e}},oceanNormalMapUrl:{get:function(){return this._oceanNormalMapResource.url},set:function(e){this._oceanNormalMapResource.url=e,this._oceanNormalMapResourceDirty=!0}},terrainProvider:{get:function(){return this._terrainProvider},set:function(e){e!==this._terrainProvider&&(this._terrainProvider=e,this._terrainProviderChanged.raiseEvent(e),l(this._material)&&cte(this))}},terrainProviderChanged:{get:function(){return this._terrainProviderChanged}},tileLoadProgressEvent:{get:function(){return this._surface.tileLoadProgressEvent}},material:{get:function(){return this._material},set:function(e){this._material!==e&&(this._material=e,cte(this))}},undergroundColor:{get:function(){return this._undergroundColor},set:function(e){this._undergroundColor=V.clone(e,this._undergroundColor)}},undergroundColorAlphaByDistance:{get:function(){return this._undergroundColorAlphaByDistance},set:function(e){this._undergroundColorAlphaByDistance=zt.clone(e,this._undergroundColorAlphaByDistance)}},translucency:{get:function(){return this._translucency}}});function cte(e){let t=[],n=l(e._material)&&(l(e._material.shaderSource.match(/slope/))||l(e._material.shaderSource.match("normalEC"))),i=[$h,Xw];l(e._material)&&(!n||e._terrainProvider.hasVertexNormals)?(i.push(e._material.shaderSource),t.push("APPLY_MATERIAL"),e._surface._tileProvider.materialUniformMap=e._material._uniforms):e._surface._tileProvider.materialUniformMap=void 0,i.push(i3),e._surfaceShaderSet.baseVertexShaderSource=new He({sources:[$h,Xw,o3],defines:t}),e._surfaceShaderSet.baseFragmentShaderSource=new He({sources:i,defines:t}),e._surfaceShaderSet.material=e._material}function aCt(e){return function(t,n){let i=ce.distanceSquaredTo(t.pickBoundingSphere,e),o=ce.distanceSquaredTo(n.pickBoundingSphere,e);return i-o}}var sCt=[],cCt={start:0,stop:0};Vm.prototype.pickWorldCoordinates=function(e,t,n,i){n=n??!0;let o=t.mode,r=t.mapProjection,a=sCt;a.length=0;for(let u of this._surface._tilesRenderedThisFrame){let f=u.data;if(!l(f))continue;let d=f.pickBoundingSphere;if(o!==ie.SCENE3D)f.pickBoundingSphere=d=ce.fromRectangleWithHeights2D(u.rectangle,r,f.tileBoundingRegion.minimumHeight,f.tileBoundingRegion.maximumHeight,d),h.fromElements(d.center.z,d.center.x,d.center.y,d.center);else if(l(f.renderedMesh))ce.clone(f.tileBoundingRegion.boundingSphere,d);else continue;let p=si.raySphere(e,d,cCt);l(p)&&a.push(f)}a.sort(aCt(e.origin));let s,c=a.length;for(let u=0;u<c&&(s=a[u].pick(e,t.mode,t.mapProjection,n,i),!l(s));++u);return s};var lCt=new de;Vm.prototype.pick=function(e,t,n){if(n=this.pickWorldCoordinates(e,t,!0,n),l(n)&&t.mode!==ie.SCENE3D){n=h.fromElements(n.y,n.z,n.x,n);let i=t.mapProjection.unproject(n,lCt);n=this._ellipsoid.cartographicToCartesian(i,n)}return n};var uCt=new h,Bwe=new h,fCt=new de,dCt=new gn;function ste(e,t){return l(e)&&oe.contains(e.rectangle,t)?e:void 0}Vm.prototype.getHeight=function(e){let t=this._surface._levelZeroTiles;if(!l(t))return;let n,i,o=t.length;for(i=0;i<o&&(n=t[i],!oe.contains(n.rectangle,e));++i);if(i>=o)return;let r=n;for(;l(n);)n=ste(n._southwestChild,e)||ste(n._southeastChild,e)||ste(n._northwestChild,e)||n._northeastChild,l(n)&&l(n.data)&&l(n.data.renderedMesh)&&(r=n);if(n=r,!l(n)||!l(n.data)||!l(n.data.renderedMesh))return;let a=this._surface._tileProvider.tilingScheme.projection,s=this._surface._tileProvider.tilingScheme.ellipsoid,c=h.fromRadians(e.longitude,e.latitude,0,s,uCt),u=dCt,f=s.geodeticSurfaceNormal(c,u.direction),d=s.getSurfaceNormalIntersectionWithZAxis(c,11500,u.origin);if(!l(d)){let g;l(n.data.tileBoundingRegion)&&(g=n.data.tileBoundingRegion.minimumHeight);let m=Math.min(g??0,-11500),A=h.multiplyByScalar(f,Math.abs(m)+1,Bwe);h.subtract(c,A,u.origin)}let p=n.data.pick(u,ie.SCENE3D,a,!1,Bwe);if(l(p))return s.cartesianToCartographic(p,fCt).height};Vm.prototype.update=function(e){this.show&&e.passes.render&&this._surface.update(e)};Vm.prototype.beginFrame=function(e){let t=this._surface,n=t.tileProvider,i=this.terrainProvider,o=l(i)&&i.hasWaterMask&&i.hasWaterMask;if(o&&this._oceanNormalMapResourceDirty){this._oceanNormalMapResourceDirty=!1;let s=this._oceanNormalMapResource,c=s.url;if(l(c)){let u=this;s.fetchImage().then(function(f){c===u._oceanNormalMapResource.url&&(u._oceanNormalMap=u._oceanNormalMap&&u._oceanNormalMap.destroy(),u._oceanNormalMap=new It({context:e.context,source:f}))})}else this._oceanNormalMap=this._oceanNormalMap&&this._oceanNormalMap.destroy()}let r=e.passes,a=e.mode;r.render&&(this.showGroundAtmosphere?this._zoomedOutOceanSpecularIntensity=.4:this._zoomedOutOceanSpecularIntensity=.5,t.maximumScreenSpaceError=this.maximumScreenSpaceError,t.tileCacheSize=this.tileCacheSize,t.loadingDescendantLimit=this.loadingDescendantLimit,t.preloadAncestors=this.preloadAncestors,t.preloadSiblings=this.preloadSiblings,n.terrainProvider=this.terrainProvider,n.lightingFadeOutDistance=this.lightingFadeOutDistance,n.lightingFadeInDistance=this.lightingFadeInDistance,n.nightFadeOutDistance=this.nightFadeOutDistance,n.nightFadeInDistance=this.nightFadeInDistance,n.zoomedOutOceanSpecularIntensity=a===ie.SCENE3D?this._zoomedOutOceanSpecularIntensity:0,n.hasWaterMask=o,n.showWaterEffect=this.showWaterEffect,n.oceanNormalMap=this._oceanNormalMap,n.enableLighting=this.enableLighting,n.dynamicAtmosphereLighting=this.dynamicAtmosphereLighting,n.dynamicAtmosphereLightingFromSun=this.dynamicAtmosphereLightingFromSun,n.showGroundAtmosphere=this.showGroundAtmosphere,n.atmosphereLightIntensity=this.atmosphereLightIntensity,n.atmosphereRayleighCoefficient=this.atmosphereRayleighCoefficient,n.atmosphereMieCoefficient=this.atmosphereMieCoefficient,n.atmosphereRayleighScaleHeight=this.atmosphereRayleighScaleHeight,n.atmosphereMieScaleHeight=this.atmosphereMieScaleHeight,n.atmosphereMieAnisotropy=this.atmosphereMieAnisotropy,n.shadows=this.shadows,n.hueShift=this.atmosphereHueShift,n.saturationShift=this.atmosphereSaturationShift,n.brightnessShift=this.atmosphereBrightnessShift,n.fillHighlightColor=this.fillHighlightColor,n.showSkirts=this.showSkirts,n.backFaceCulling=this.backFaceCulling,n.vertexShadowDarkness=this.vertexShadowDarkness,n.undergroundColor=this._undergroundColor,n.undergroundColorAlphaByDistance=this._undergroundColorAlphaByDistance,n.lambertDiffuseMultiplier=this.lambertDiffuseMultiplier,t.beginFrame(e))};Vm.prototype.render=function(e){this.show&&(l(this._material)&&this._material.update(e.context),this._surface.render(e))};Vm.prototype.endFrame=function(e){this.show&&e.passes.render&&this._surface.endFrame(e)};Vm.prototype.isDestroyed=function(){return!1};Vm.prototype.destroy=function(){return this._surfaceShaderSet=this._surfaceShaderSet&&this._surfaceShaderSet.destroy(),this._surface=this._surface&&this._surface.destroy(),this._oceanNormalMap=this._oceanNormalMap&&this._oceanNormalMap.destroy(),fe(this)};var g3=Vm;function hCt(e,t,n,i){this.rightAscension=e,this.declination=t,this.rotation=n,this.rotationRate=i}var _3=hCt;var Xwe={},mCt=32.184,pCt=2451545,Lwe=-.0529921,Nwe=-.1059842,Fwe=13.0120009,kwe=13.3407154,zwe=.9856003,Uwe=26.4057084,Vwe=13.064993,jwe=.3287146,Gwe=1.7484877,Hwe=-.1589763,Wwe=.0036096,qwe=.1643573,Ywe=12.9590088,lte=new Q;Xwe.ComputeMoon=function(e,t){l(e)||(e=Q.now()),lte=Q.addSeconds(e,mCt,lte);let n=Q.totalDays(lte)-pCt,i=n/ii.DAYS_PER_JULIAN_CENTURY,o=(125.045+Lwe*n)*D.RADIANS_PER_DEGREE,r=(250.089+Nwe*n)*D.RADIANS_PER_DEGREE,a=(260.008+Fwe*n)*D.RADIANS_PER_DEGREE,s=(176.625+kwe*n)*D.RADIANS_PER_DEGREE,c=(357.529+zwe*n)*D.RADIANS_PER_DEGREE,u=(311.589+Uwe*n)*D.RADIANS_PER_DEGREE,f=(134.963+Vwe*n)*D.RADIANS_PER_DEGREE,d=(276.617+jwe*n)*D.RADIANS_PER_DEGREE,p=(34.226+Gwe*n)*D.RADIANS_PER_DEGREE,g=(15.134+Hwe*n)*D.RADIANS_PER_DEGREE,m=(119.743+Wwe*n)*D.RADIANS_PER_DEGREE,A=(239.961+qwe*n)*D.RADIANS_PER_DEGREE,y=(25.053+Ywe*n)*D.RADIANS_PER_DEGREE,x=Math.sin(o),b=Math.sin(r),C=Math.sin(a),E=Math.sin(s),S=Math.sin(c),w=Math.sin(u),P=Math.sin(f),R=Math.sin(d),B=Math.sin(p),L=Math.sin(g),_=Math.sin(m),T=Math.sin(A),v=Math.sin(y),I=Math.cos(o),O=Math.cos(r),N=Math.cos(a),j=Math.cos(s),k=Math.cos(c),U=Math.cos(u),F=Math.cos(f),H=Math.cos(d),q=Math.cos(p),J=Math.cos(g),W=Math.cos(m),Z=Math.cos(A),K=Math.cos(y),le=(269.9949+.0031*i-3.8787*x-.1204*b+.07*C-.0172*E+.0072*w-.0052*L+.0043*v)*D.RADIANS_PER_DEGREE,me=(66.5392+.013*i+1.5419*I+.0239*O-.0278*N+.0068*j-.0029*U+9e-4*F+8e-4*J-9e-4*K)*D.RADIANS_PER_DEGREE,ae=(38.3213+13.17635815*n-14e-13*n*n+3.561*x+.1208*b-.0642*C+.0158*E+.0252*S-.0066*w-.0047*P-.0046*R+.0028*B+.0052*L+.004*_+.0019*T-.0044*v)*D.RADIANS_PER_DEGREE,be=(13.17635815-14e-13*(2*n)+3.561*I*Lwe+.1208*O*Nwe-.0642*N*Fwe+.0158*j*kwe+.0252*k*zwe-.0066*U*Uwe-.0047*F*Vwe-.0046*H*jwe+.0028*q*Gwe+.0052*J*Hwe+.004*W*Wwe+.0019*Z*qwe-.0044*K*Ywe)/86400*D.RADIANS_PER_DEGREE;return l(t)||(t=new _3),t.rightAscension=le,t.declination=me,t.rotation=ae,t.rotationRate=be,t};var A3=Xwe;function Kwe(e){(!l(e)||typeof e!="function")&&(e=A3.ComputeMoon),this._computeFunction=e}var gCt=new h,_Ct=new h,ACt=new h;function yCt(e,t,n){let i=gCt;i.x=Math.cos(e+D.PI_OVER_TWO),i.y=Math.sin(e+D.PI_OVER_TWO),i.z=0;let o=Math.cos(t),r=ACt;r.x=o*Math.cos(e),r.y=o*Math.sin(e),r.z=Math.sin(t);let a=h.cross(r,i,_Ct);return l(n)||(n=new $),n[0]=i.x,n[1]=a.x,n[2]=r.x,n[3]=i.y,n[4]=a.y,n[5]=r.y,n[6]=i.z,n[7]=a.z,n[8]=r.z,n}var xCt=new $,bCt=new Le;Kwe.prototype.evaluate=function(e,t){l(e)||(e=Q.now());let n=this._computeFunction(e),i=yCt(n.rightAscension,n.declination,t),o=D.zeroToTwoPi(n.rotation),r=Le.fromAxisAngle(h.UNIT_Z,o,bCt),a=$.fromQuaternion(Le.conjugate(r,r),xCt);return $.multiply(a,i,i)};var y3=Kwe;var Zw=`uniform vec3 u_radii;
- uniform vec3 u_oneOverEllipsoidRadiiSquared;
-
- in vec3 v_positionEC;
-
- vec4 computeEllipsoidColor(czm_ray ray, float intersection, float side)
- {
- vec3 positionEC = czm_pointAlongRay(ray, intersection);
- vec3 positionMC = (czm_inverseModelView * vec4(positionEC, 1.0)).xyz;
- vec3 geodeticNormal = normalize(czm_geodeticSurfaceNormal(positionMC, vec3(0.0), u_oneOverEllipsoidRadiiSquared));
- vec3 sphericalNormal = normalize(positionMC / u_radii);
- vec3 normalMC = geodeticNormal * side; // normalized surface normal (always facing the viewer) in model coordinates
- vec3 normalEC = normalize(czm_normal * normalMC); // normalized surface normal in eye coordinates
-
- vec2 st = czm_ellipsoidTextureCoordinates(sphericalNormal);
- vec3 positionToEyeEC = -positionEC;
-
- czm_materialInput materialInput;
- materialInput.s = st.s;
- materialInput.st = st;
- materialInput.str = (positionMC + u_radii) / u_radii;
- materialInput.normalEC = normalEC;
- materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(positionMC, normalEC);
- materialInput.positionToEyeEC = positionToEyeEC;
- czm_material material = czm_getMaterial(materialInput);
-
- #ifdef ONLY_SUN_LIGHTING
- return czm_private_phong(normalize(positionToEyeEC), material, czm_sunDirectionEC);
- #else
- return czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
- #endif
- }
-
- void main()
- {
- // PERFORMANCE_TODO: When dynamic branching is available, compute ratio of maximum and minimum radii
- // in the vertex shader. Only when it is larger than some constant, march along the ray.
- // Otherwise perform one intersection test which will be the common case.
-
- // Test if the ray intersects a sphere with the ellipsoid's maximum radius.
- // For very oblate ellipsoids, using the ellipsoid's radii for an intersection test
- // may cause false negatives. This will discard fragments before marching the ray forward.
- float maxRadius = max(u_radii.x, max(u_radii.y, u_radii.z)) * 1.5;
- vec3 direction = normalize(v_positionEC);
- vec3 ellipsoidCenter = czm_modelView[3].xyz;
-
- float t1 = -1.0;
- float t2 = -1.0;
-
- float b = -2.0 * dot(direction, ellipsoidCenter);
- float c = dot(ellipsoidCenter, ellipsoidCenter) - maxRadius * maxRadius;
-
- float discriminant = b * b - 4.0 * c;
- if (discriminant >= 0.0) {
- t1 = (-b - sqrt(discriminant)) * 0.5;
- t2 = (-b + sqrt(discriminant)) * 0.5;
- }
-
- if (t1 < 0.0 && t2 < 0.0) {
- discard;
- }
-
- float t = min(t1, t2);
- if (t < 0.0) {
- t = 0.0;
- }
-
- // March ray forward to intersection with larger sphere and find
- czm_ray ray = czm_ray(t * direction, direction);
-
- vec3 ellipsoid_inverseRadii = vec3(1.0 / u_radii.x, 1.0 / u_radii.y, 1.0 / u_radii.z);
-
- czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoidCenter, ellipsoid_inverseRadii);
-
- if (czm_isEmpty(intersection))
- {
- discard;
- }
-
- // If the viewer is outside, compute outsideFaceColor, with normals facing outward.
- vec4 outsideFaceColor = (intersection.start != 0.0) ? computeEllipsoidColor(ray, intersection.start, 1.0) : vec4(0.0);
-
- // If the viewer either is inside or can see inside, compute insideFaceColor, with normals facing inward.
- vec4 insideFaceColor = (outsideFaceColor.a < 1.0) ? computeEllipsoidColor(ray, intersection.stop, -1.0) : vec4(0.0);
-
- out_FragColor = mix(insideFaceColor, outsideFaceColor, outsideFaceColor.a);
- out_FragColor.a = 1.0 - (1.0 - insideFaceColor.a) * (1.0 - outsideFaceColor.a);
-
- #if (defined(WRITE_DEPTH) && (__VERSION__ == 300 || defined(GL_EXT_frag_depth)))
- t = (intersection.start != 0.0) ? intersection.start : intersection.stop;
- vec3 positionEC = czm_pointAlongRay(ray, t);
- vec4 positionCC = czm_projection * vec4(positionEC, 1.0);
- #ifdef LOG_DEPTH
- czm_writeLogDepth(1.0 + positionCC.w);
- #else
- float z = positionCC.z / positionCC.w;
-
- float n = czm_depthRange.near;
- float f = czm_depthRange.far;
-
- gl_FragDepth = (z * (f - n) + f + n) * 0.5;
- #endif
- #endif
- }
- `;var eI=`in vec3 position;
-
- uniform vec3 u_radii;
-
- out vec3 v_positionEC;
-
- void main()
- {
- // In the vertex data, the cube goes from (-1.0, -1.0, -1.0) to (1.0, 1.0, 1.0) in model coordinates.
- // Scale to consider the radii. We could also do this once on the CPU when using the BoxGeometry,
- // but doing it here allows us to change the radii without rewriting the vertex data, and
- // allows all ellipsoids to reuse the same vertex data.
- vec4 p = vec4(u_radii * position, 1.0);
-
- vec4 pEC = czm_modelView * p;
- v_positionEC = pEC.xyz; // position in eye coordinates
- gl_Position = czm_projection * pEC;
- // With multi-frustum, when the ellipsoid primitive is positioned on the intersection of two frustums
- // and close to terrain, the terrain (writes depth) in the closest frustum can overwrite part of the
- // ellipsoid (does not write depth) that was rendered in the farther frustum.
- //
- // Here, we clamp the depth in the vertex shader to avoid being overwritten; however, this creates
- // artifacts since some fragments can be alpha blended twice. This is solved by only rendering
- // the ellipsoid in the closest frustum to the viewer.
- gl_Position.z = clamp(gl_Position.z, czm_depthRange.near, czm_depthRange.far);
-
- czm_vertexLogDepth();
- }
- `;var ute={position:0};function $6(e){e=e??G.EMPTY_OBJECT,this.center=h.clone(e.center??h.ZERO),this._center=new h,this.radii=h.clone(e.radii),this._radii=new h,this._oneOverEllipsoidRadiiSquared=new h,this._boundingSphere=new ce,this.modelMatrix=M.clone(e.modelMatrix??M.IDENTITY),this._modelMatrix=new M,this._computedModelMatrix=new M,this.show=e.show??!0,this.material=e.material??Hi.fromType(Hi.ColorType),this._material=void 0,this._translucent=void 0,this.id=e.id,this._id=void 0,this.debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this.onlySunLighting=e.onlySunLighting??!1,this._onlySunLighting=!1,this._depthTestEnabled=e.depthTestEnabled??!0,this._useLogDepth=!1,this._sp=void 0,this._rs=void 0,this._va=void 0,this._pickSP=void 0,this._pickId=void 0,this._colorCommand=new tt({owner:e._owner??this}),this._pickCommand=new tt({owner:e._owner??this,pickOnly:!0});let t=this;this._uniforms={u_radii:function(){return t.radii},u_oneOverEllipsoidRadiiSquared:function(){return t._oneOverEllipsoidRadiiSquared}},this._pickUniforms={czm_pickColor:function(){return t._pickId.color}}}function CCt(e){let t=e.cache.ellipsoidPrimitive_vertexArray;if(l(t))return t;let n=Ec.createGeometry(Ec.fromDimensions({dimensions:new h(2,2,2),vertexFormat:Ne.POSITION_ONLY}));return t=Fn.fromGeometry({context:e,geometry:n,attributeLocations:ute,bufferUsage:Oe.STATIC_DRAW,interleave:!0}),e.cache.ellipsoidPrimitive_vertexArray=t,t}$6.prototype.update=function(e){if(!this.show||e.mode!==ie.SCENE3D||!l(this.center)||!l(this.radii))return;let t=e.context,n=this.material.isTranslucent(),i=this._translucent!==n;(!l(this._rs)||i)&&(this._translucent=n,this._rs=Ve.fromCache({cull:{enabled:!0,face:Mi.FRONT},depthTest:{enabled:this._depthTestEnabled},depthMask:!n&&t.fragmentDepth,blending:n?Jt.ALPHA_BLEND:void 0})),l(this._va)||(this._va=CCt(t));let o=!1,r=this.radii;if(!h.equals(this._radii,r)){h.clone(r,this._radii);let A=this._oneOverEllipsoidRadiiSquared;A.x=1/(r.x*r.x),A.y=1/(r.y*r.y),A.z=1/(r.z*r.z),o=!0}(!M.equals(this.modelMatrix,this._modelMatrix)||!h.equals(this.center,this._center))&&(M.clone(this.modelMatrix,this._modelMatrix),h.clone(this.center,this._center),M.multiplyByTranslation(this.modelMatrix,this.center,this._computedModelMatrix),o=!0),o&&(h.clone(h.ZERO,this._boundingSphere.center),this._boundingSphere.radius=h.maximumComponent(r),ce.transform(this._boundingSphere,this._computedModelMatrix,this._boundingSphere));let a=this._material!==this.material;this._material=this.material,this._material.update(t);let s=this.onlySunLighting!==this._onlySunLighting;this._onlySunLighting=this.onlySunLighting;let c=e.useLogDepth,u=this._useLogDepth!==c;this._useLogDepth=c;let f=this._colorCommand,d,p;(a||s||i||u)&&(d=new He({sources:[eI]}),p=new He({sources:[this.material.shaderSource,Zw]}),this.onlySunLighting&&p.defines.push("ONLY_SUN_LIGHTING"),!n&&t.fragmentDepth&&p.defines.push("WRITE_DEPTH"),this._useLogDepth&&(d.defines.push("LOG_DEPTH"),p.defines.push("LOG_DEPTH")),this._sp=Kt.replaceCache({context:t,shaderProgram:this._sp,vertexShaderSource:d,fragmentShaderSource:p,attributeLocations:ute}),f.vertexArray=this._va,f.renderState=this._rs,f.shaderProgram=this._sp,f.uniformMap=wt(this._uniforms,this.material._uniforms),f.executeInClosestFrustum=n);let g=e.commandList,m=e.passes;if(m.render&&(f.boundingVolume=this._boundingSphere,f.debugShowBoundingVolume=this.debugShowBoundingVolume,f.modelMatrix=this._computedModelMatrix,f.pass=n?Ie.TRANSLUCENT:Ie.OPAQUE,g.push(f)),m.pick){let A=this._pickCommand;(!l(this._pickId)||this._id!==this.id)&&(this._id=this.id,this._pickId=this._pickId&&this._pickId.destroy(),this._pickId=t.createPickId({primitive:this,id:this.id})),(a||s||!l(this._pickSP)||u)&&(d=new He({sources:[eI]}),p=new He({sources:[this.material.shaderSource,Zw],pickColorQualifier:"uniform"}),this.onlySunLighting&&p.defines.push("ONLY_SUN_LIGHTING"),!n&&t.fragmentDepth&&p.defines.push("WRITE_DEPTH"),this._useLogDepth&&(d.defines.push("LOG_DEPTH"),p.defines.push("LOG_DEPTH")),this._pickSP=Kt.replaceCache({context:t,shaderProgram:this._pickSP,vertexShaderSource:d,fragmentShaderSource:p,attributeLocations:ute}),A.vertexArray=this._va,A.renderState=this._rs,A.shaderProgram=this._pickSP,A.uniformMap=wt(wt(this._uniforms,this._pickUniforms),this.material._uniforms),A.executeInClosestFrustum=n),A.boundingVolume=this._boundingSphere,A.modelMatrix=this._computedModelMatrix,A.pass=n?Ie.TRANSLUCENT:Ie.OPAQUE,g.push(A)}};$6.prototype.isDestroyed=function(){return!1};$6.prototype.destroy=function(){return this._sp=this._sp&&this._sp.destroy(),this._pickSP=this._pickSP&&this._pickSP.destroy(),this._pickId=this._pickId&&this._pickId.destroy(),fe(this)};var x3=$6;function b3(e){e=e??G.EMPTY_OBJECT;let t=e.textureUrl;l(t)||(t=Xt("Assets/Textures/moonSmall.jpg")),this.show=e.show??!0,this.textureUrl=t,this._ellipsoid=e.ellipsoid??te.MOON,this.onlySunLighting=e.onlySunLighting??!0,this._ellipsoidPrimitive=new x3({radii:this.ellipsoid.radii,material:Hi.fromType(Hi.ImageType),depthTestEnabled:!1,_owner:this}),this._ellipsoidPrimitive.material.translucent=!1,this._axes=new y3}Object.defineProperties(b3.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});var J6=new $,TCt=new $,ECt=new h,Z6=[];b3.prototype.update=function(e){if(!this.show)return;let t=this._ellipsoidPrimitive;t.material.uniforms.image=this.textureUrl,t.onlySunLighting=this.onlySunLighting;let n=e.time;l(pt.computeIcrfToFixedMatrix(n,J6))||pt.computeTemeToPseudoFixedMatrix(n,J6);let i=this._axes.evaluate(n,TCt);$.transpose(i,i),$.multiply(J6,i,i);let o=iA.computeMoonPositionInEarthInertialFrame(n,ECt);$.multiplyByVector(J6,o,o),M.fromRotationTranslation(i,o,t.modelMatrix);let r=e.commandList;return e.commandList=Z6,Z6.length=0,t.update(e),e.commandList=r,Z6.length===1?Z6[0]:void 0};b3.prototype.isDestroyed=function(){return!1};b3.prototype.destroy=function(){return this._ellipsoidPrimitive=this._ellipsoidPrimitive&&this._ellipsoidPrimitive.destroy(),fe(this)};var C3=b3;var fte=[],dte=[];function vCt(e,t,n,i,o,r){let a=o-i+1,s=r-o,c=fte,u=dte,f,d;for(f=0;f<a;++f)c[f]=e[i+f];for(d=0;d<s;++d)u[d]=e[o+d+1];f=0,d=0;for(let p=i;p<=r;++p){let g=c[f],m=u[d];f<a&&(d>=s||t(g,m,n)<=0)?(e[p]=g,++f):d<s&&(e[p]=m,++d)}}function hte(e,t,n,i,o){if(i>=o)return;let r=Math.floor((i+o)*.5);hte(e,t,n,i,r),hte(e,t,n,r+1,o),vCt(e,t,n,i,r,o)}function SCt(e,t,n){let i=e.length,o=Math.ceil(i*.5);fte.length=o,dte.length=o,hte(e,t,n,0,i-1),fte.length=0,dte.length=0}var s0=SCt;function Al(e,t){this._occluderPosition=h.clone(e.center),this._occluderRadius=e.radius,this._horizonDistance=0,this._horizonPlaneNormal=void 0,this._horizonPlanePosition=void 0,this._cameraPosition=void 0,this.cameraPosition=t}var e5=new h;Object.defineProperties(Al.prototype,{position:{get:function(){return this._occluderPosition}},radius:{get:function(){return this._occluderRadius}},cameraPosition:{set:function(e){e=h.clone(e,this._cameraPosition);let t=h.subtract(this._occluderPosition,e,e5),n=h.magnitudeSquared(t),i=this._occluderRadius*this._occluderRadius,o,r,a;if(n>i){o=Math.sqrt(n-i),n=1/Math.sqrt(n),r=h.multiplyByScalar(t,n,e5);let s=o*o*n;a=h.add(e,h.multiplyByScalar(r,s,e5),e5)}else o=Number.MAX_VALUE;this._horizonDistance=o,this._horizonPlaneNormal=r,this._horizonPlanePosition=a,this._cameraPosition=e}}});Al.fromBoundingSphere=function(e,t,n){return l(n)?(h.clone(e.center,n._occluderPosition),n._occluderRadius=e.radius,n.cameraPosition=t,n):new Al(e,t)};var $we=new h;Al.prototype.isPointVisible=function(e){if(this._horizonDistance!==Number.MAX_VALUE){let t=h.subtract(e,this._occluderPosition,$we),n=this._occluderRadius;if(n=h.magnitudeSquared(t)-n*n,n>0)return n=Math.sqrt(n)+this._horizonDistance,t=h.subtract(e,this._cameraPosition,t),n*n>h.magnitudeSquared(t)}return!1};var wCt=new h;Al.prototype.isBoundingSphereVisible=function(e){let t=h.clone(e.center,wCt),n=e.radius;if(this._horizonDistance!==Number.MAX_VALUE){let i=h.subtract(t,this._occluderPosition,$we),o=this._occluderRadius-n;if(o=h.magnitudeSquared(i)-o*o,n<this._occluderRadius)return o>0?(o=Math.sqrt(o)+this._horizonDistance,i=h.subtract(t,this._cameraPosition,i),o*o+n*n>h.magnitudeSquared(i)):!1;if(o>0){i=h.subtract(t,this._cameraPosition,i);let r=h.magnitudeSquared(i),a=this._occluderRadius*this._occluderRadius,s=n*n;return(this._horizonDistance*this._horizonDistance+a)*s>r*a?!0:(o=Math.sqrt(o)+this._horizonDistance,o*o+s>r)}return!0}return!1};var ICt=new h;Al.prototype.computeVisibility=function(e){let t=h.clone(e.center),n=e.radius;if(n>this._occluderRadius)return Vr.FULL;if(this._horizonDistance!==Number.MAX_VALUE){let i=h.subtract(t,this._occluderPosition,ICt),o=this._occluderRadius-n,r=h.magnitudeSquared(i);if(o=r-o*o,o>0){o=Math.sqrt(o)+this._horizonDistance,i=h.subtract(t,this._cameraPosition,i);let a=h.magnitudeSquared(i);return o*o+n*n<a?Vr.NONE:(o=this._occluderRadius+n,o=r-o*o,o>0?(o=Math.sqrt(o)+this._horizonDistance,a<o*o+n*n?Vr.FULL:Vr.PARTIAL):(i=h.subtract(t,this._horizonPlanePosition,i),h.dot(i,this._horizonPlaneNormal)>-n?Vr.PARTIAL:Vr.FULL))}}return Vr.NONE};var t5=new h;Al.computeOccludeePoint=function(e,t,n){let i=h.clone(t),o=h.clone(e.center),r=e.radius,a=n.length,s=h.normalize(h.subtract(i,o,t5),t5),c=-h.dot(s,o),u=Al._anyRotationVector(o,s,c),f=Al._horizonToPlaneNormalDotProduct(e,s,c,u,n[0]);if(!f)return;let d;for(let g=1;g<a;++g){if(d=Al._horizonToPlaneNormalDotProduct(e,s,c,u,n[g]),!d)return;d<f&&(f=d)}if(f<.0017453283658983088)return;let p=r/f;return h.add(o,h.multiplyByScalar(s,p,t5),t5)};var DCt=[];Al.computeOccludeePointFromRectangle=function(e,t){t=t??te.default;let n=oe.subsample(e,t,0,DCt),i=ce.fromPoints(n),o=h.ZERO;if(!h.equals(o,i.center))return Al.computeOccludeePoint(new ce(o,t.minimumRadius),i.center,n)};var PCt=new h;Al._anyRotationVector=function(e,t,n){let i=h.abs(t,PCt),o=i.x>i.y?0:1;(o===0&&i.z>i.x||o===1&&i.z>i.y)&&(o=2);let r=new h,a;o===0?(i.x=e.x,i.y=e.y+1,i.z=e.z+1,a=h.UNIT_X):o===1?(i.x=e.x+1,i.y=e.y,i.z=e.z+1,a=h.UNIT_Y):(i.x=e.x+1,i.y=e.y+1,i.z=e.z,a=h.UNIT_Z);let s=(h.dot(t,i)+n)/-h.dot(t,a);return h.normalize(h.subtract(h.add(i,h.multiplyByScalar(a,s,r),i),e,i),i)};var RCt=new h;Al._rotationVector=function(e,t,n,i,o){let r=h.subtract(i,e,RCt);if(r=h.normalize(r,r),h.dot(t,r)<.9999999847691291){let a=h.cross(t,r,r);if(h.magnitude(a)>D.EPSILON13)return h.normalize(a,new h)}return o};var mte=new h,OCt=new h,n5=new h,Qwe=new h;Al._horizonToPlaneNormalDotProduct=function(e,t,n,i,o){let r=h.clone(o,mte),a=h.clone(e.center,OCt),s=e.radius,c=h.subtract(a,r,n5),u=h.magnitudeSquared(c),f=s*s;if(u<f)return!1;let d=u-f,p=Math.sqrt(d),m=1/Math.sqrt(u),y=p*m*p;c=h.normalize(c,c);let x=h.add(r,h.multiplyByScalar(c,y,Qwe),Qwe),b=Math.sqrt(d-y*y),C=this._rotationVector(a,t,n,r,i),E=h.fromElements(C.x*C.x*c.x+(C.x*C.y-C.z)*c.y+(C.x*C.z+C.y)*c.z,(C.x*C.y+C.z)*c.x+C.y*C.y*c.y+(C.y*C.z-C.x)*c.z,(C.x*C.z-C.y)*c.x+(C.y*C.z+C.x)*c.y+C.z*C.z*c.z,mte);E=h.normalize(E,E);let S=h.multiplyByScalar(E,b,mte);C=h.normalize(h.subtract(h.add(x,S,n5),a,n5),n5);let w=h.dot(t,C);C=h.normalize(h.subtract(h.subtract(x,S,C),a,C),C);let P=h.dot(t,C);return w<P?w:P};var T3=Al;function c0(e){e=e??G.EMPTY_OBJECT,this.left=e.left,this._left=void 0,this.right=e.right,this._right=void 0,this.top=e.top,this._top=void 0,this.bottom=e.bottom,this._bottom=void 0,this.near=e.near??1,this._near=this.near,this.far=e.far??5e8,this._far=this.far,this._cullingVolume=new Ka,this._perspectiveMatrix=new M,this._infinitePerspective=new M}function pte(e){let{top:t,bottom:n,right:i,left:o,near:r,far:a}=e;(t!==e._top||n!==e._bottom||o!==e._left||i!==e._right||r!==e._near||a!==e._far)&&(e._left=o,e._right=i,e._top=t,e._bottom=n,e._near=r,e._far=a,e._perspectiveMatrix=M.computePerspectiveOffCenter(o,i,n,t,r,a,e._perspectiveMatrix),e._infinitePerspective=M.computeInfinitePerspectiveOffCenter(o,i,n,t,r,e._infinitePerspective))}Object.defineProperties(c0.prototype,{projectionMatrix:{get:function(){return pte(this),this._perspectiveMatrix}},infiniteProjectionMatrix:{get:function(){return pte(this),this._infinitePerspective}}});var MCt=new h,BCt=new h,LCt=new h,NCt=new h;c0.prototype.computeCullingVolume=function(e,t,n){let i=this._cullingVolume.planes,o=this.top,r=this.bottom,a=this.right,s=this.left,c=this.near,u=this.far,f=h.cross(t,n,MCt),d=BCt;h.multiplyByScalar(t,c,d),h.add(e,d,d);let p=LCt;h.multiplyByScalar(t,u,p),h.add(e,p,p);let g=NCt;h.multiplyByScalar(f,s,g),h.add(d,g,g),h.subtract(g,e,g),h.normalize(g,g),h.cross(g,n,g),h.normalize(g,g);let m=i[0];return l(m)||(m=i[0]=new se),m.x=g.x,m.y=g.y,m.z=g.z,m.w=-h.dot(g,e),h.multiplyByScalar(f,a,g),h.add(d,g,g),h.subtract(g,e,g),h.cross(n,g,g),h.normalize(g,g),m=i[1],l(m)||(m=i[1]=new se),m.x=g.x,m.y=g.y,m.z=g.z,m.w=-h.dot(g,e),h.multiplyByScalar(n,r,g),h.add(d,g,g),h.subtract(g,e,g),h.cross(f,g,g),h.normalize(g,g),m=i[2],l(m)||(m=i[2]=new se),m.x=g.x,m.y=g.y,m.z=g.z,m.w=-h.dot(g,e),h.multiplyByScalar(n,o,g),h.add(d,g,g),h.subtract(g,e,g),h.cross(g,f,g),h.normalize(g,g),m=i[3],l(m)||(m=i[3]=new se),m.x=g.x,m.y=g.y,m.z=g.z,m.w=-h.dot(g,e),m=i[4],l(m)||(m=i[4]=new se),m.x=t.x,m.y=t.y,m.z=t.z,m.w=-h.dot(t,d),h.negate(t,g),m=i[5],l(m)||(m=i[5]=new se),m.x=g.x,m.y=g.y,m.z=g.z,m.w=-h.dot(g,p),this._cullingVolume};c0.prototype.getPixelDimensions=function(e,t,n,i,o){pte(this);let r=1/this.near,a=this.top*r,s=2*i*n*a/t;a=this.right*r;let c=2*i*n*a/e;return o.x=c,o.y=s,o};c0.prototype.clone=function(e){return l(e)||(e=new c0),e.right=this.right,e.left=this.left,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e};c0.prototype.equals=function(e){return l(e)&&e instanceof c0&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far};c0.prototype.equalsEpsilon=function(e,t,n){return e===this||l(e)&&e instanceof c0&&D.equalsEpsilon(this.right,e.right,t,n)&&D.equalsEpsilon(this.left,e.left,t,n)&&D.equalsEpsilon(this.top,e.top,t,n)&&D.equalsEpsilon(this.bottom,e.bottom,t,n)&&D.equalsEpsilon(this.near,e.near,t,n)&&D.equalsEpsilon(this.far,e.far,t,n)};var du=c0;function $u(e){e=e??G.EMPTY_OBJECT,this._offCenterFrustum=new du,this.fov=e.fov,this._fov=void 0,this._fovy=void 0,this._sseDenominator=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=e.near??1,this._near=this.near,this.far=e.far??5e8,this._far=this.far,this.xOffset=e.xOffset??0,this._xOffset=this.xOffset,this.yOffset=e.yOffset??0,this._yOffset=this.yOffset}$u.packedLength=6;$u.pack=function(e,t,n){return n=n??0,t[n++]=e.fov,t[n++]=e.aspectRatio,t[n++]=e.near,t[n++]=e.far,t[n++]=e.xOffset,t[n]=e.yOffset,t};$u.unpack=function(e,t,n){return t=t??0,l(n)||(n=new $u),n.fov=e[t++],n.aspectRatio=e[t++],n.near=e[t++],n.far=e[t++],n.xOffset=e[t++],n.yOffset=e[t],n};function jm(e){if(!(e.fov!==e._fov||e.aspectRatio!==e._aspectRatio||e.near!==e._near||e.far!==e._far||e.xOffset!==e._xOffset||e.yOffset!==e._yOffset))return;e._aspectRatio=e.aspectRatio,e._fov=e.fov,e._fovy=e.aspectRatio<=1?e.fov:Math.atan(Math.tan(e.fov*.5)/e.aspectRatio)*2,e._near=e.near,e._far=e.far,e._sseDenominator=2*Math.tan(.5*e._fovy),e._xOffset=e.xOffset,e._yOffset=e.yOffset;let n=e._offCenterFrustum;n.top=e.near*Math.tan(.5*e._fovy),n.bottom=-n.top,n.right=e.aspectRatio*n.top,n.left=-n.right,n.near=e.near,n.far=e.far,n.right+=e.xOffset,n.left+=e.xOffset,n.top+=e.yOffset,n.bottom+=e.yOffset}Object.defineProperties($u.prototype,{projectionMatrix:{get:function(){return jm(this),this._offCenterFrustum.projectionMatrix}},infiniteProjectionMatrix:{get:function(){return jm(this),this._offCenterFrustum.infiniteProjectionMatrix}},fovy:{get:function(){return jm(this),this._fovy}},sseDenominator:{get:function(){return jm(this),this._sseDenominator}},offCenterFrustum:{get:function(){return jm(this),this._offCenterFrustum}}});$u.prototype.computeCullingVolume=function(e,t,n){return jm(this),this._offCenterFrustum.computeCullingVolume(e,t,n)};$u.prototype.getPixelDimensions=function(e,t,n,i,o){return jm(this),this._offCenterFrustum.getPixelDimensions(e,t,n,i,o)};$u.prototype.clone=function(e){return l(e)||(e=new $u),e.aspectRatio=this.aspectRatio,e.fov=this.fov,e.near=this.near,e.far=this.far,e._aspectRatio=void 0,e._fov=void 0,e._near=void 0,e._far=void 0,this._offCenterFrustum.clone(e._offCenterFrustum),e};$u.prototype.equals=function(e){return!l(e)||!(e instanceof $u)?!1:(jm(this),jm(e),this.fov===e.fov&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))};$u.prototype.equalsEpsilon=function(e,t,n){return!l(e)||!(e instanceof $u)?!1:(jm(this),jm(e),D.equalsEpsilon(this.fov,e.fov,t,n)&&D.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,n)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,n))};var Vi=$u;var E3=`in vec2 v_textureCoordinates;
- const float M_PI = 3.141592653589793;
-
- float vdcRadicalInverse(int i)
- {
- float r;
- float base = 2.0;
- float value = 0.0;
- float invBase = 1.0 / base;
- float invBi = invBase;
- for (int x = 0; x < 100; x++)
- {
- if (i <= 0)
- {
- break;
- }
- r = mod(float(i), base);
- value += r * invBi;
- invBi *= invBase;
- i = int(float(i) * invBase);
- }
- return value;
- }
-
- vec2 hammersley2D(int i, int N)
- {
- return vec2(float(i) / float(N), vdcRadicalInverse(i));
- }
-
- vec3 importanceSampleGGX(vec2 xi, float alphaRoughness, vec3 N)
- {
- float alphaRoughnessSquared = alphaRoughness * alphaRoughness;
- float phi = 2.0 * M_PI * xi.x;
- float cosTheta = sqrt((1.0 - xi.y) / (1.0 + (alphaRoughnessSquared - 1.0) * xi.y));
- float sinTheta = sqrt(1.0 - cosTheta * cosTheta);
- vec3 H = vec3(sinTheta * cos(phi), sinTheta * sin(phi), cosTheta);
- vec3 upVector = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);
- vec3 tangentX = normalize(cross(upVector, N));
- vec3 tangentY = cross(N, tangentX);
- return tangentX * H.x + tangentY * H.y + N * H.z;
- }
-
- /**
- * Estimate the geometric self-shadowing of the microfacets in a surface,
- * using the Smith Joint GGX visibility function.
- * Note: Vis = G / (4 * NdotL * NdotV)
- * see Eric Heitz. 2014. Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs. Journal of Computer Graphics Techniques, 3
- * see Real-Time Rendering. Page 331 to 336.
- * see https://google.github.io/filament/Filament.md.html#materialsystem/specularbrdf/geometricshadowing(specularg)
- *
- * @param {float} alphaRoughness The roughness of the material, expressed as the square of perceptual roughness.
- * @param {float} NdotL The cosine of the angle between the surface normal and the direction to the light source.
- * @param {float} NdotV The cosine of the angle between the surface normal and the direction to the camera.
- */
- float smithVisibilityGGX(float alphaRoughness, float NdotL, float NdotV)
- {
- float alphaRoughnessSq = alphaRoughness * alphaRoughness;
-
- float GGXV = NdotL * sqrt(NdotV * NdotV * (1.0 - alphaRoughnessSq) + alphaRoughnessSq);
- float GGXL = NdotV * sqrt(NdotL * NdotL * (1.0 - alphaRoughnessSq) + alphaRoughnessSq);
-
- float GGX = GGXV + GGXL; // 2.0 if NdotL = NdotV = 1.0
- if (GGX > 0.0)
- {
- return 0.5 / GGX; // 1/4 if NdotL = NdotV = 1.0
- }
- return 0.0;
- }
-
- vec2 integrateBrdf(float roughness, float NdotV)
- {
- vec3 V = vec3(sqrt(1.0 - NdotV * NdotV), 0.0, NdotV);
- float A = 0.0;
- float B = 0.0;
- const int NumSamples = 1024;
- float alphaRoughness = roughness * roughness;
- for (int i = 0; i < NumSamples; i++)
- {
- vec2 xi = hammersley2D(i, NumSamples);
- vec3 H = importanceSampleGGX(xi, alphaRoughness, vec3(0.0, 0.0, 1.0));
- vec3 L = 2.0 * dot(V, H) * H - V;
- float NdotL = clamp(L.z, 0.0, 1.0);
- float NdotH = clamp(H.z, 0.0, 1.0);
- float VdotH = clamp(dot(V, H), 0.0, 1.0);
- if (NdotL > 0.0)
- {
- float G = smithVisibilityGGX(alphaRoughness, NdotL, NdotV);
- float G_Vis = 4.0 * G * VdotH * NdotL / NdotH;
- float Fc = pow(1.0 - VdotH, 5.0);
- A += (1.0 - Fc) * G_Vis;
- B += Fc * G_Vis;
- }
- }
- return vec2(A, B) / float(NumSamples);
- }
-
- void main()
- {
- out_FragColor = vec4(integrateBrdf(v_textureCoordinates.y, v_textureCoordinates.x), 0.0, 1.0);
- }
- `;function v3(){this._colorTexture=void 0,this._drawCommand=void 0}Object.defineProperties(v3.prototype,{colorTexture:{get:function(){return this._colorTexture}}});function FCt(e,t,n){let i=t.createViewportQuadCommand(E3,{framebuffer:n,renderState:Ve.fromCache({viewport:new Je(0,0,256,256)})});e._drawCommand=i}v3.prototype.update=function(e){if(!l(this._colorTexture)){let t=e.context,n=new It({context:t,width:256,height:256,pixelFormat:Xe.RGBA,pixelDatatype:je.UNSIGNED_BYTE,sampler:jt.NEAREST});this._colorTexture=n;let i=new fa({context:t,colorTextures:[n],destroyAttachments:!1});FCt(this,t,i),this._drawCommand.execute(t),i.destroy(),this._drawCommand.shaderProgram=this._drawCommand.shaderProgram&&this._drawCommand.shaderProgram.destroy()}};v3.prototype.isDestroyed=function(){return!1};v3.prototype.destroy=function(){return this._colorTexture=this._colorTexture&&this._colorTexture.destroy(),fe(this)};var S3=v3;var tIe={};function kCt(e,t,n){let i,o,r;if(e instanceof Vi){let a=Math.tan(.5*e.fovy);return i=e.near,o=e.near*a,r=e.aspectRatio*o,Math.max(t*i/r,n*i/o)}else if(e instanceof du)return i=e.near,o=e.top,r=e.right,Math.max(t*i/r,n*i/o);return Math.max(t,n)}var zCt=new h,Jwe=new h;function nIe(e,t,n,i){if(l(i)&&n(.5)>i){let o=n(0),r=n(1),a=n(.5),s=a-o,c=a-r;return function(u){let f=n(u);if(u<=.5){let p=(f-o)/s;return D.lerp(e,-D.PI_OVER_TWO,p)}let d=(f-r)/c;return D.lerp(-D.PI_OVER_TWO,t,1-d)}}return function(o){return D.lerp(e,t,o)}}function _te(e,t,n,i,o){let r=o,a=Math.max(n,i);if(!l(r)){let s=e.position,c=t,u=e.up,f=e.right,d=e.frustum,p=h.subtract(s,c,zCt),g=h.magnitude(h.multiplyByScalar(u,h.dot(p,u),Jwe)),m=h.magnitude(h.multiplyByScalar(f,h.dot(p,f),Jwe));r=Math.min(kCt(d,g,m)*.2,1e9)}if(a<r){let u=-Math.pow((r-n)*1e6,.125),f=Math.pow((r-i)*1e6,1/8);return function(d){let p=d*(f-u)+u;return-Math.pow(p,8)/1e6+r}}return function(s){return D.lerp(n,i,s)}}function w3(e,t){return D.equalsEpsilon(e,D.TWO_PI,D.EPSILON11)&&(e=0),t>e+Math.PI?e+=D.TWO_PI:t<e-Math.PI&&(e-=D.TWO_PI),e}var iIe=new h;function UCt(e,t,n,i,o,r,a,s){let c=e.camera,u=h.clone(c.position,iIe),f=c.pitch,d=w3(c.heading,i),p=w3(c.roll,r),g=_te(c,n,u.z,n.z,a),m=nIe(f,o,g,s);function A(y){let x=y.time/t;c.setView({orientation:{heading:D.lerp(d,i,x),pitch:m(x),roll:D.lerp(p,r,x)}}),z.lerp(u,n,x,c.position),c.position.z=g(x)}return A}function VCt(e,t){e.longitude<t.longitude?e.longitude+=D.TWO_PI:t.longitude+=D.TWO_PI}function jCt(e,t){let n=e.longitude-t.longitude;n<-D.PI?e.longitude+=D.TWO_PI:n>D.PI&&(t.longitude+=D.TWO_PI)}var GCt=new de,HCt=new de;function WCt(e,t,n,i,o,r,a,s,c,u){let f=e.camera,p=e.mapProjection.ellipsoid,g=de.clone(f.positionCartographic,GCt),m=f.pitch,A=w3(f.heading,i),y=w3(f.roll,r),x=p.cartesianToCartographic(n,HCt);g.longitude=D.zeroToTwoPi(g.longitude),x.longitude=D.zeroToTwoPi(x.longitude);let b=!1;if(l(s)){let w=D.zeroToTwoPi(s),P=Math.min(g.longitude,x.longitude),R=Math.max(g.longitude,x.longitude),B=w>=P&&w<=R;if(l(c)){let L=Math.abs(g.longitude-x.longitude),_=D.TWO_PI-L;(B?L:_)<(B?_:L)*c&&!B&&(b=!0)}else B||(b=!0)}b?VCt(g,x):jCt(g,x);let C=_te(f,n,g.height,x.height,a),E=nIe(m,o,C,u);function S(){let w=g.longitude,P=x.longitude,R=g.latitude,B=x.latitude;return function(_){let T=_.time/t,v=h.fromRadians(D.lerp(w,P,T),D.lerp(R,B,T),C(T),p);f.setView({destination:v,orientation:{heading:D.lerp(A,i,T),pitch:E(T),roll:D.lerp(y,r,T)}})}}return S()}function qCt(e,t,n,i,o,r,a){let s=e.camera,c=h.clone(s.position,iIe),u=w3(s.heading,i),f=s.frustum.right-s.frustum.left,d=_te(s,n,f,n.z,a);function p(g){let m=g.time/t;s.setView({orientation:{heading:D.lerp(u,i,m)}}),z.lerp(c,n,m,s.position);let A=d(m),y=s.frustum,x=y.top/y.right,b=(A-(y.right-y.left))*.5;y.right+=b,y.left-=b,y.top=x*y.right,y.bottom=-y.top}return p}var Zwe=new de,YCt=new h;function gte(e,t){return{startObject:{},stopObject:{},duration:0,complete:e,cancel:t}}function eIe(e,t){function n(){typeof t=="function"&&t(),e.enableInputs=!0}return n}tIe.createTween=function(e,t){t=t??G.EMPTY_OBJECT;let n=t.destination,i=e.mode;if(i===ie.MORPHING)return gte();let o=t.convert??!0,r=e.mapProjection,a=r.ellipsoid,s=t.maximumHeight,c=t.flyOverLongitude,u=t.flyOverLongitudeWeight,f=t.pitchAdjustHeight,d=t.easingFunction;o&&i!==ie.SCENE3D&&(a.cartesianToCartographic(n,Zwe),n=r.project(Zwe,YCt));let p=e.camera,g=t.endTransform;l(g)&&p._setTransform(g);let m=t.duration;l(m)||(m=Math.ceil(h.distance(p.position,n)/1e6)+2,m=Math.min(m,3));let A=t.heading??0,y=t.pitch??-D.PI_OVER_TWO,x=t.roll??0,b=e.screenSpaceCameraController;b.enableInputs=!1;let C=eIe(b,t.complete),E=eIe(b,t.cancel),S=p.frustum,w=e.mode===ie.SCENE2D;if(w=w&&z.equalsEpsilon(p.position,n,D.EPSILON6),w=w&&D.equalsEpsilon(Math.max(S.right-S.left,S.top-S.bottom),n.z,D.EPSILON6),w=w||e.mode!==ie.SCENE2D&&h.equalsEpsilon(n,p.position,D.EPSILON10),w=w&&D.equalsEpsilon(D.negativePiToPi(A),D.negativePiToPi(p.heading),D.EPSILON10)&&D.equalsEpsilon(D.negativePiToPi(y),D.negativePiToPi(p.pitch),D.EPSILON10)&&D.equalsEpsilon(D.negativePiToPi(x),D.negativePiToPi(p.roll),D.EPSILON10),w)return gte(C,E);let P=new Array(4);if(P[ie.SCENE2D]=qCt,P[ie.SCENE3D]=WCt,P[ie.COLUMBUS_VIEW]=UCt,m<=0)return gte(function(){P[i](e,1,n,A,y,x,s,c,u,f)({time:1}),typeof C=="function"&&C()},E);let R=P[i](e,m,n,A,y,x,s,c,u,f);if(!l(d)){let B=p.positionCartographic.height,L=i===ie.SCENE3D?a.cartesianToCartographic(n).height:n.z;B>L&&B>11500?d=wa.CUBIC_OUT:d=wa.QUINTIC_IN_OUT}return{duration:m,easingFunction:d,startObject:{time:0},stopObject:{time:m},update:R,complete:C,cancel:E}};var I3=tIe;var oIe={ROTATE:0,INFINITE_SCROLL:1};Object.freeze(oIe);var hu=oIe;function rn(e){this._scene=e,this._transform=M.clone(M.IDENTITY),this._invTransform=M.clone(M.IDENTITY),this._actualTransform=M.clone(M.IDENTITY),this._actualInvTransform=M.clone(M.IDENTITY),this._transformChanged=!1,this.position=new h,this._position=new h,this._positionWC=new h,this._positionCartographic=new de,this._oldPositionWC=void 0,this.positionWCDeltaMagnitude=0,this.positionWCDeltaMagnitudeLastFrame=0,this.timeSinceMoved=0,this._lastMovedTimestamp=0,this.direction=new h,this._direction=new h,this._directionWC=new h,this.up=new h,this._up=new h,this._upWC=new h,this.right=new h,this._right=new h,this._rightWC=new h,this.frustum=new Vi,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.fov=D.toRadians(60),this.defaultMoveAmount=1e5,this.defaultLookAmount=Math.PI/60,this.defaultRotateAmount=Math.PI/3600,this.defaultZoomAmount=1e5,this.constrainedAxis=void 0,this.maximumZoomFactor=1.5,this._moveStart=new ye,this._moveEnd=new ye,this._changed=new ye,this._changedPosition=void 0,this._changedDirection=void 0,this._changedFrustum=void 0,this._changedHeading=void 0,this._changedRoll=void 0,this.percentageChanged=.5,this._viewMatrix=new M,this._invViewMatrix=new M,dIe(this),this._mode=ie.SCENE3D,this._modeChanged=!0;let t=e.mapProjection;this._projection=t,this._maxCoord=t.project(new de(Math.PI,D.PI_OVER_TWO)),this._max2Dfrustum=void 0,EIe(this,rn.DEFAULT_VIEW_RECTANGLE,this.position,!0);let n=h.magnitude(this.position);n+=n*rn.DEFAULT_VIEW_FACTOR,h.normalize(this.position,this.position),h.multiplyByScalar(this.position,n,this.position)}rn.TRANSFORM_2D=new M(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);rn.TRANSFORM_2D_INVERSE=M.inverseTransformation(rn.TRANSFORM_2D,new M);rn.DEFAULT_VIEW_RECTANGLE=oe.fromDegrees(-95,-20,-70,90);rn.DEFAULT_VIEW_FACTOR=.5;rn.DEFAULT_OFFSET=new ih(0,-D.PI_OVER_FOUR,0);function dIe(e){M.computeView(e._position,e._direction,e._up,e._right,e._viewMatrix),M.multiply(e._viewMatrix,e._actualInvTransform,e._viewMatrix),M.inverseTransformation(e._viewMatrix,e._invViewMatrix)}function XCt(e){if(!l(e._oldPositionWC))e._oldPositionWC=h.clone(e.positionWC,e._oldPositionWC);else{e.positionWCDeltaMagnitudeLastFrame=e.positionWCDeltaMagnitude;let t=h.subtract(e.positionWC,e._oldPositionWC,e._oldPositionWC);e.positionWCDeltaMagnitude=h.magnitude(t),e._oldPositionWC=h.clone(e.positionWC,e._oldPositionWC),e.positionWCDeltaMagnitude>0?(e.timeSinceMoved=0,e._lastMovedTimestamp=Fi()):e.timeSinceMoved=Math.max(Fi()-e._lastMovedTimestamp,0)/1e3}}rn.prototype.canPreloadFlight=function(){return l(this._currentFlight)&&this._mode!==ie.SCENE2D};rn.prototype._updateCameraChanged=function(){let e=this;if(XCt(e),e._changed.numberOfListeners===0)return;let t=e.percentageChanged,n=e.heading;l(e._changedHeading)||(e._changedHeading=n);let i=Math.abs(e._changedHeading-n)%D.TWO_PI;i=i>D.PI?D.TWO_PI-i:i;let o=i/Math.PI;o>t&&(e._changedHeading=n);let r=e.roll;l(e._changedRoll)||(e._changedRoll=r);let a=Math.abs(e._changedRoll-r)%D.TWO_PI;a=a>D.PI?D.TWO_PI-a:a;let s=a/Math.PI;if(s>t&&(e._changedRoll=r),(s>t||o>t)&&e._changed.raiseEvent(Math.max(s,o)),e._mode===ie.SCENE2D){if(!l(e._changedFrustum)){e._changedPosition=h.clone(e.position,e._changedPosition),e._changedFrustum=e.frustum.clone();return}let p=e.position,g=e._changedPosition,m=e.frustum,A=e._changedFrustum,y=p.x+m.left,x=p.x+m.right,b=g.x+A.left,C=g.x+A.right,E=p.y+m.bottom,S=p.y+m.top,w=g.y+A.bottom,P=g.y+A.top,R=Math.max(y,b),B=Math.min(x,C),L=Math.max(E,w),_=Math.min(S,P),T;if(R>=B||L>=S)T=1;else{let v=A;y<b&&x>C&&E<w&&S>P&&(v=m),T=1-(B-R)*(_-L)/((v.right-v.left)*(v.top-v.bottom))}T>t&&(e._changed.raiseEvent(T),e._changedPosition=h.clone(e.position,e._changedPosition),e._changedFrustum=e.frustum.clone(e._changedFrustum));return}if(!l(e._changedDirection)){e._changedPosition=h.clone(e.positionWC,e._changedPosition),e._changedDirection=h.clone(e.directionWC,e._changedDirection);return}let c=D.acosClamped(h.dot(e.directionWC,e._changedDirection)),u;l(e.frustum.fovy)?u=c/(e.frustum.fovy*.5):u=c;let d=h.distance(e.positionWC,e._changedPosition)/e.positionCartographic.height;(u>t||d>t)&&(e._changed.raiseEvent(Math.max(u,d)),e._changedPosition=h.clone(e.positionWC,e._changedPosition),e._changedDirection=h.clone(e.directionWC,e._changedDirection))};function KCt(e){pt.basisTo2D(e._projection,e._transform,e._actualTransform)}var QCt=new de,$Ct=new h,i5=new h,JCt=new se,ZCt=new se,eTt=new se,tTt=new se,nTt=new se;function iTt(e){let t=e._projection,n=t.ellipsoid,i=M.getColumn(e._transform,3,JCt),o=n.cartesianToCartographic(i,QCt),r=t.project(o,$Ct),a=ZCt;a.x=r.z,a.y=r.x,a.z=r.y,a.w=1;let s=se.clone(se.UNIT_X,nTt),c=se.add(M.getColumn(e._transform,0,i5),i,i5);n.cartesianToCartographic(c,o),t.project(o,r);let u=eTt;u.x=r.z,u.y=r.x,u.z=r.y,u.w=0,h.subtract(u,a,u),u.x=0;let f=tTt;if(h.magnitudeSquared(u)>D.EPSILON10)h.cross(s,u,f);else{let d=se.add(M.getColumn(e._transform,1,i5),i,i5);n.cartesianToCartographic(d,o),t.project(o,r),f.x=r.z,f.y=r.x,f.z=r.y,f.w=0,h.subtract(f,a,f),f.x=0,h.magnitudeSquared(f)<D.EPSILON10&&(se.clone(se.UNIT_Y,u),se.clone(se.UNIT_Z,f))}h.cross(f,s,u),h.normalize(u,u),h.cross(s,u,f),h.normalize(f,f),M.setColumn(e._actualTransform,0,u,e._actualTransform),M.setColumn(e._actualTransform,1,f,e._actualTransform),M.setColumn(e._actualTransform,2,s,e._actualTransform),M.setColumn(e._actualTransform,3,a,e._actualTransform)}var Ate=new h;function xl(e){let t=e._mode,n=!1,i=0;t===ie.SCENE2D&&(i=e.frustum.right-e.frustum.left,n=i!==e._positionCartographic.height);let o=e._position,r=!h.equals(o,e.position)||n;r&&(o=h.clone(e.position,e._position));let a=e._direction,s=!h.equals(a,e.direction);s&&(h.normalize(e.direction,e.direction),a=h.clone(e.direction,e._direction));let c=e._up,u=!h.equals(c,e.up);u&&(h.normalize(e.up,e.up),c=h.clone(e.up,e._up));let f=e._right,d=!h.equals(f,e.right);d&&(h.normalize(e.right,e.right),f=h.clone(e.right,e._right));let p=e._transformChanged||e._modeChanged;e._transformChanged=!1,p&&(M.inverseTransformation(e._transform,e._invTransform),e._mode===ie.COLUMBUS_VIEW||e._mode===ie.SCENE2D?M.equals(M.IDENTITY,e._transform)?M.clone(rn.TRANSFORM_2D,e._actualTransform):e._mode===ie.COLUMBUS_VIEW?KCt(e):iTt(e):M.clone(e._transform,e._actualTransform),M.inverseTransformation(e._actualTransform,e._actualInvTransform),e._modeChanged=!1);let g=e._actualTransform;if(r||p)if(e._positionWC=M.multiplyByPoint(g,o,e._positionWC),t===ie.SCENE3D||t===ie.MORPHING)e._positionCartographic=e._projection.ellipsoid.cartesianToCartographic(e._positionWC,e._positionCartographic);else{let m=Ate;m.x=e._positionWC.y,m.y=e._positionWC.z,m.z=e._positionWC.x,t===ie.SCENE2D&&(m.z=i),e._projection.unproject(m,e._positionCartographic)}if(s||u||d){let m=h.dot(a,h.cross(c,f,Ate));if(Math.abs(1-m)>D.EPSILON2){let A=1/h.magnitudeSquared(c),y=h.dot(c,a)*A,x=h.multiplyByScalar(a,y,Ate);c=h.normalize(h.subtract(c,x,e._up),e._up),h.clone(c,e.up),f=h.cross(a,c,e._right),h.clone(f,e.right)}}(s||p)&&(e._directionWC=M.multiplyByPointAsVector(g,a,e._directionWC),h.normalize(e._directionWC,e._directionWC)),(u||p)&&(e._upWC=M.multiplyByPointAsVector(g,c,e._upWC),h.normalize(e._upWC,e._upWC)),(d||p)&&(e._rightWC=M.multiplyByPointAsVector(g,f,e._rightWC),h.normalize(e._rightWC,e._rightWC)),(r||s||u||d||p)&&dIe(e)}function hIe(e,t){let n;return D.equalsEpsilon(Math.abs(e.z),1,D.EPSILON3)?n=Math.atan2(t.y,t.x)-D.PI_OVER_TWO:n=Math.atan2(e.y,e.x)-D.PI_OVER_TWO,D.TWO_PI-D.zeroToTwoPi(n)}function mIe(e){return D.PI_OVER_TWO-D.acosClamped(e.z)}function pIe(e,t,n){let i=0;return D.equalsEpsilon(Math.abs(e.z),1,D.EPSILON3)||(i=Math.atan2(-n.z,t.z),i=D.zeroToTwoPi(i+D.TWO_PI)),i}var a5=new M,s5=new M;Object.defineProperties(rn.prototype,{transform:{get:function(){return this._transform}},inverseTransform:{get:function(){return xl(this),this._invTransform}},viewMatrix:{get:function(){return xl(this),this._viewMatrix}},inverseViewMatrix:{get:function(){return xl(this),this._invViewMatrix}},positionCartographic:{get:function(){return xl(this),this._positionCartographic}},positionWC:{get:function(){return xl(this),this._positionWC}},directionWC:{get:function(){return xl(this),this._directionWC}},upWC:{get:function(){return xl(this),this._upWC}},rightWC:{get:function(){return xl(this),this._rightWC}},heading:{get:function(){if(this._mode!==ie.MORPHING){let e=this._projection.ellipsoid,t=M.clone(this._transform,a5),n=pt.eastNorthUpToFixedFrame(this.positionWC,e,s5);this._setTransform(n);let i=hIe(this.direction,this.up);return this._setTransform(t),i}}},pitch:{get:function(){if(this._mode!==ie.MORPHING){let e=this._projection.ellipsoid,t=M.clone(this._transform,a5),n=pt.eastNorthUpToFixedFrame(this.positionWC,e,s5);this._setTransform(n);let i=mIe(this.direction);return this._setTransform(t),i}}},roll:{get:function(){if(this._mode!==ie.MORPHING){let e=this._projection.ellipsoid,t=M.clone(this._transform,a5),n=pt.eastNorthUpToFixedFrame(this.positionWC,e,s5);this._setTransform(n);let i=pIe(this.direction,this.up,this.right);return this._setTransform(t),i}}},moveStart:{get:function(){return this._moveStart}},moveEnd:{get:function(){return this._moveEnd}},changed:{get:function(){return this._changed}}});rn.prototype.update=function(e){let t=!1;if(e!==this._mode&&(this._mode=e,this._modeChanged=e!==ie.MORPHING,t=this._mode===ie.SCENE2D),t){let n=this._max2Dfrustum=this.frustum.clone(),i=2,o=n.top/n.right;n.right=this._maxCoord.x*i,n.left=-n.right,n.top=o*n.right,n.bottom=-n.top}this._mode===ie.SCENE2D&&yIe(this,this.position)};var oTt=new h,rTt=new h,aTt=new h;rn.prototype._setTransform=function(e){let t=h.clone(this.positionWC,oTt),n=h.clone(this.upWC,rTt),i=h.clone(this.directionWC,aTt);M.clone(e,this._transform),this._transformChanged=!0,xl(this);let o=this._actualInvTransform;M.multiplyByPoint(o,t,this.position),M.multiplyByPointAsVector(o,i,this.direction),M.multiplyByPointAsVector(o,n,this.up),h.cross(this.direction,this.up,this.right),xl(this)};var sTt=new z,cTt=new gn,lTt=new h,uTt=new h;function gIe(e){if(!M.equals(M.IDENTITY,e.transform))return h.magnitude(e.position);let t=e._scene,n=t.globe,i=sTt;i.x=t.drawingBufferWidth/t.pixelRatio/2,i.y=t.drawingBufferHeight/t.pixelRatio/2;let o;if(l(n)){let s=e.getPickRay(i,cTt);o=n.pickWorldCoordinates(s,t,!0,lTt)}let r;t.pickPositionSupported&&(r=t.pickPositionWorldCoordinates(i,uTt));let a;if(l(o)||l(r)){let s=l(r)?h.distance(r,e.positionWC):Number.POSITIVE_INFINITY,c=l(o)?h.distance(o,e.positionWC):Number.POSITIVE_INFINITY;a=Math.min(s,c)}else a=Math.max(e.positionCartographic.height,0);return a}rn.prototype._adjustOrthographicFrustum=function(e){this.frustum instanceof fn&&(!e&&this._positionCartographic.height<15e4||(this.frustum.width=gIe(this)))};var c5=new h,Tte=new M,fTt=new M,Ete=new Le,vte=new $,_Ie=new de;function dTt(e,t,n){let i=M.clone(e.transform,Tte),o=pt.eastNorthUpToFixedFrame(t,e._projection.ellipsoid,fTt);e._setTransform(o),h.clone(h.ZERO,e.position),n.heading=n.heading-D.PI_OVER_TWO;let r=Le.fromHeadingPitchRoll(n,Ete),a=$.fromQuaternion(r,vte);$.getColumn(a,0,e.direction),$.getColumn(a,2,e.up),h.cross(e.direction,e.up,e.right),e._setTransform(i),e._adjustOrthographicFrustum(!0)}function hTt(e,t,n,i){let o=M.clone(e.transform,Tte);if(e._setTransform(M.IDENTITY),!h.equals(t,e.positionWC)){if(i){let s=e._projection,c=s.ellipsoid.cartesianToCartographic(t,_Ie);t=s.project(c,c5)}h.clone(t,e.position)}n.heading=n.heading-D.PI_OVER_TWO;let r=Le.fromHeadingPitchRoll(n,Ete),a=$.fromQuaternion(r,vte);$.getColumn(a,0,e.direction),$.getColumn(a,2,e.up),h.cross(e.direction,e.up,e.right),e._setTransform(o),e._adjustOrthographicFrustum(!0)}function mTt(e,t,n,i){let o=M.clone(e.transform,Tte);if(e._setTransform(M.IDENTITY),!h.equals(t,e.positionWC)){if(i){let c=e._projection,u=c.ellipsoid.cartesianToCartographic(t,_Ie);t=c.project(u,c5)}z.clone(t,e.position);let r=-t.z*.5,a=-r,s=e.frustum;if(a>r){let c=s.top/s.right;s.right=a,s.left=r,s.top=s.right*c,s.bottom=-s.top}}if(e._scene.mapMode2D===hu.ROTATE){n.heading=n.heading-D.PI_OVER_TWO,n.pitch=-D.PI_OVER_TWO,n.roll=0;let r=Le.fromHeadingPitchRoll(n,Ete),a=$.fromQuaternion(r,vte);$.getColumn(a,2,e.up),h.cross(e.direction,e.up,e.right)}e._setTransform(o)}var pTt=new h,gTt=new h,_Tt=new h;function AIe(e,t,n,i){let o=h.clone(n.direction,pTt),r=h.clone(n.up,gTt);if(e._scene.mode===ie.SCENE3D){let s=e._projection.ellipsoid,c=pt.eastNorthUpToFixedFrame(t,s,a5),u=M.inverseTransformation(c,s5);M.multiplyByPointAsVector(u,o,o),M.multiplyByPointAsVector(u,r,r)}let a=h.cross(o,r,_Tt);return i.heading=hIe(o,r),i.pitch=mIe(o),i.roll=pIe(o,r,a),i}var Cte={destination:void 0,orientation:{direction:void 0,up:void 0,heading:void 0,pitch:void 0,roll:void 0},convert:void 0,endTransform:void 0},tI=new Tc;rn.prototype.setView=function(e){e=e??G.EMPTY_OBJECT;let t=e.orientation??G.EMPTY_OBJECT,n=this._mode;if(n===ie.MORPHING)return;l(e.endTransform)&&this._setTransform(e.endTransform);let i=e.convert??!0,o=e.destination??h.clone(this.positionWC,c5);l(o)&&l(o.west)&&(o=this.getRectangleCameraCoordinates(o,c5),i=!1),l(t.direction)&&(t=AIe(this,o,t,Cte.orientation)),tI.heading=t.heading??0,tI.pitch=t.pitch??-D.PI_OVER_TWO,tI.roll=t.roll??0,n===ie.SCENE3D?dTt(this,o,tI):n===ie.SCENE2D?mTt(this,o,tI,i):hTt(this,o,tI,i)};var ATt=new h;rn.prototype.flyHome=function(e){let t=this._mode;if(t===ie.MORPHING&&this._scene.completeMorph(),t===ie.SCENE2D)this.flyTo({destination:rn.DEFAULT_VIEW_RECTANGLE,duration:e,endTransform:M.IDENTITY});else if(t===ie.SCENE3D){let n=this.getRectangleCameraCoordinates(rn.DEFAULT_VIEW_RECTANGLE),i=h.magnitude(n);i+=i*rn.DEFAULT_VIEW_FACTOR,h.normalize(n,n),h.multiplyByScalar(n,i,n),this.flyTo({destination:n,duration:e,endTransform:M.IDENTITY})}else if(t===ie.COLUMBUS_VIEW){let n=this._projection.ellipsoid.maximumRadius,i=new h(0,-1,1);i=h.multiplyByScalar(h.normalize(i,i),5*n,i),this.flyTo({destination:i,duration:e,orientation:{heading:0,pitch:-Math.acos(h.normalize(i,ATt).z),roll:0},endTransform:M.IDENTITY,convert:!1})}};rn.prototype.worldToCameraCoordinates=function(e,t){return l(t)||(t=new se),xl(this),M.multiplyByVector(this._actualInvTransform,e,t)};rn.prototype.worldToCameraCoordinatesPoint=function(e,t){return l(t)||(t=new h),xl(this),M.multiplyByPoint(this._actualInvTransform,e,t)};rn.prototype.worldToCameraCoordinatesVector=function(e,t){return l(t)||(t=new h),xl(this),M.multiplyByPointAsVector(this._actualInvTransform,e,t)};rn.prototype.cameraToWorldCoordinates=function(e,t){return l(t)||(t=new se),xl(this),M.multiplyByVector(this._actualTransform,e,t)};rn.prototype.cameraToWorldCoordinatesPoint=function(e,t){return l(t)||(t=new h),xl(this),M.multiplyByPoint(this._actualTransform,e,t)};rn.prototype.cameraToWorldCoordinatesVector=function(e,t){return l(t)||(t=new h),xl(this),M.multiplyByPointAsVector(this._actualTransform,e,t)};function yIe(e,t){let n=e._scene.mapMode2D===hu.ROTATE,i=e._maxCoord.x,o=e._maxCoord.y,r,a;n?(a=i,r=-a):(a=t.x-i*2,r=t.x+i*2),t.x>i&&(t.x=a),t.x<-i&&(t.x=r),t.y>o&&(t.y=o),t.y<-o&&(t.y=-o)}var rIe=new h;rn.prototype.move=function(e,t){let n=this.position;h.multiplyByScalar(e,t,rIe),h.add(n,rIe,n),this._mode===ie.SCENE2D&&yIe(this,n),this._adjustOrthographicFrustum(!0)};rn.prototype.moveForward=function(e){e=e??this.defaultMoveAmount,this._mode===ie.SCENE2D?l5(this,e):this.move(this.direction,e)};rn.prototype.moveBackward=function(e){e=e??this.defaultMoveAmount,this._mode===ie.SCENE2D?l5(this,-e):this.move(this.direction,-e)};rn.prototype.moveUp=function(e){e=e??this.defaultMoveAmount,this.move(this.up,e)};rn.prototype.moveDown=function(e){e=e??this.defaultMoveAmount,this.move(this.up,-e)};rn.prototype.moveRight=function(e){e=e??this.defaultMoveAmount,this.move(this.right,e)};rn.prototype.moveLeft=function(e){e=e??this.defaultMoveAmount,this.move(this.right,-e)};rn.prototype.lookLeft=function(e){e=e??this.defaultLookAmount,this._mode!==ie.SCENE2D&&this.look(this.up,-e)};rn.prototype.lookRight=function(e){e=e??this.defaultLookAmount,this._mode!==ie.SCENE2D&&this.look(this.up,e)};rn.prototype.lookUp=function(e){e=e??this.defaultLookAmount,this._mode!==ie.SCENE2D&&this.look(this.right,-e)};rn.prototype.lookDown=function(e){e=e??this.defaultLookAmount,this._mode!==ie.SCENE2D&&this.look(this.right,e)};var yTt=new Le,xTt=new $;rn.prototype.look=function(e,t){let n=t??this.defaultLookAmount,i=Le.fromAxisAngle(e,-n,yTt),o=$.fromQuaternion(i,xTt),r=this.direction,a=this.up,s=this.right;$.multiplyByVector(o,r,r),$.multiplyByVector(o,a,a),$.multiplyByVector(o,s,s)};rn.prototype.twistLeft=function(e){e=e??this.defaultLookAmount,this.look(this.direction,e)};rn.prototype.twistRight=function(e){e=e??this.defaultLookAmount,this.look(this.direction,-e)};var bTt=new Le,CTt=new $;rn.prototype.rotate=function(e,t){let n=t??this.defaultRotateAmount,i=Le.fromAxisAngle(e,-n,bTt),o=$.fromQuaternion(i,CTt);$.multiplyByVector(o,this.position,this.position),$.multiplyByVector(o,this.direction,this.direction),$.multiplyByVector(o,this.up,this.up),h.cross(this.direction,this.up,this.right),h.cross(this.right,this.direction,this.up),this._adjustOrthographicFrustum(!1)};rn.prototype.rotateDown=function(e){e=e??this.defaultRotateAmount,xIe(this,e)};rn.prototype.rotateUp=function(e){e=e??this.defaultRotateAmount,xIe(this,-e)};var TTt=new h,ETt=new h,vTt=new h,aIe=new h;function xIe(e,t){let n=e.position;if(l(e.constrainedAxis)&&!h.equalsEpsilon(e.position,h.ZERO,D.EPSILON2)){let i=h.normalize(n,TTt),o=h.equalsEpsilon(i,e.constrainedAxis,D.EPSILON2),r=h.equalsEpsilon(i,h.negate(e.constrainedAxis,aIe),D.EPSILON2);if(!o&&!r){let a=h.normalize(e.constrainedAxis,ETt),s=h.dot(i,a),c=D.acosClamped(s);t>0&&t>c&&(t=c-D.EPSILON4),s=h.dot(i,h.negate(a,aIe)),c=D.acosClamped(s),t<0&&-t>c&&(t=-c+D.EPSILON4);let u=h.cross(a,i,vTt);e.rotate(u,t)}else(o&&t<0||r&&t>0)&&e.rotate(e.right,t)}else e.rotate(e.right,t)}rn.prototype.rotateRight=function(e){e=e??this.defaultRotateAmount,bIe(this,-e)};rn.prototype.rotateLeft=function(e){e=e??this.defaultRotateAmount,bIe(this,e)};function bIe(e,t){l(e.constrainedAxis)?e.rotate(e.constrainedAxis,t):e.rotate(e.up,t)}function l5(e,t){let n=e.frustum,i;if(t=t*.5,Math.abs(n.top)+Math.abs(n.bottom)>Math.abs(n.left)+Math.abs(n.right)){let o=n.top-t,r=n.bottom+t,a=e._maxCoord.y;e._scene.mapMode2D===hu.ROTATE&&(a*=e.maximumZoomFactor),r>a&&(r=a,o=-a),o<=r&&(o=1,r=-1),i=n.right/n.top,n.top=o,n.bottom=r,n.right=n.top*i,n.left=-n.right}else{let o=n.right-t,r=n.left+t,a=e._maxCoord.x;e._scene.mapMode2D===hu.ROTATE&&(a*=e.maximumZoomFactor),o>a&&(o=a,r=-a),o<=r&&(o=1,r=-1),i=n.top/n.right,n.right=o,n.left=r,n.top=n.right*i,n.bottom=-n.top}}function CIe(e,t){e.move(e.direction,t)}rn.prototype.zoomIn=function(e){e=e??this.defaultZoomAmount,this._mode===ie.SCENE2D?l5(this,e):CIe(this,e)};rn.prototype.zoomOut=function(e){e=e??this.defaultZoomAmount,this._mode===ie.SCENE2D?l5(this,-e):CIe(this,-e)};rn.prototype.getMagnitude=function(){if(this._mode===ie.SCENE3D)return h.magnitude(this.position);if(this._mode===ie.COLUMBUS_VIEW)return Math.abs(this.position.z);if(this._mode===ie.SCENE2D)return Math.max(this.frustum.right-this.frustum.left,this.frustum.top-this.frustum.bottom)};var STt=new M;rn.prototype.lookAt=function(e,t){let i=this._scene.ellipsoid??te.default,o=pt.eastNorthUpToFixedFrame(e,i,STt);this.lookAtTransform(o,t)};var wTt=new h,ITt=new Le,DTt=new Le,PTt=new $;function TIe(e,t,n){t=D.clamp(t,-D.PI_OVER_TWO,D.PI_OVER_TWO),e=D.zeroToTwoPi(e)-D.PI_OVER_TWO;let i=Le.fromAxisAngle(h.UNIT_Y,-t,ITt),o=Le.fromAxisAngle(h.UNIT_Z,-e,DTt),r=Le.multiply(o,i,o),a=$.fromQuaternion(r,PTt),s=h.clone(h.UNIT_X,wTt);return $.multiplyByVector(a,s,s),h.negate(s,s),h.multiplyByScalar(s,n,s),s}rn.prototype.lookAtTransform=function(e,t){if(this._setTransform(e),!l(t))return;let n;if(l(t.heading)?n=TIe(t.heading,t.pitch,t.range):n=t,this._mode===ie.SCENE2D){z.clone(z.ZERO,this.position),h.negate(n,this.up),this.up.z=0,h.magnitudeSquared(this.up)<D.EPSILON10&&h.clone(h.UNIT_Y,this.up),h.normalize(this.up,this.up),this._setTransform(M.IDENTITY),h.negate(h.UNIT_Z,this.direction),h.cross(this.direction,this.up,this.right),h.normalize(this.right,this.right);let i=this.frustum,o=i.top/i.right;i.right=h.magnitude(n)*.5,i.left=-i.right,i.top=o*i.right,i.bottom=-i.top,this._setTransform(e);return}h.clone(n,this.position),h.negate(this.position,this.direction),h.normalize(this.direction,this.direction),h.cross(this.direction,h.UNIT_Z,this.right),h.magnitudeSquared(this.right)<D.EPSILON10&&h.clone(h.UNIT_X,this.right),h.normalize(this.right,this.right),h.cross(this.right,this.direction,this.up),h.normalize(this.up,this.up),this._adjustOrthographicFrustum(!0)};var D3=new de,RTt=new de,OTt=new h,MTt=new h,BTt=new h,LTt=new h,NTt=new h,FTt=new h,kTt=new h,yte=new h,zTt={direction:new h,right:new h,up:new h},sIe;function yl(e,t,n,i){return Math.abs(h.dot(t,n))/i-h.dot(e,n)}function EIe(e,t,n,i){let o=e._projection.ellipsoid,r=i?e:zTt,{north:a,south:s,west:c}=t,{east:u}=t;c>u&&(u+=D.TWO_PI);let f=(c+u)*.5,d;if(s<-D.PI_OVER_TWO+D.RADIANS_PER_DEGREE&&a>D.PI_OVER_TWO-D.RADIANS_PER_DEGREE)d=0;else{let B=D3;B.longitude=f,B.latitude=a,B.height=0;let L=RTt;L.longitude=f,L.latitude=s,L.height=0;let _=sIe;(!l(_)||_.ellipsoid!==o)&&(sIe=_=new Y0(void 0,void 0,o)),_.setEndPoints(B,L),d=_.interpolateUsingFraction(.5,D3).latitude}let p=D3;p.longitude=f,p.latitude=d,p.height=0;let g=o.cartographicToCartesian(p,kTt),m=D3;m.longitude=u,m.latitude=a;let A=o.cartographicToCartesian(m,OTt);m.longitude=c;let y=o.cartographicToCartesian(m,BTt);m.longitude=f;let x=o.cartographicToCartesian(m,NTt);m.latitude=s;let b=o.cartographicToCartesian(m,FTt);m.longitude=u;let C=o.cartographicToCartesian(m,LTt);m.longitude=c;let E=o.cartographicToCartesian(m,MTt);h.subtract(y,g,y),h.subtract(C,g,C),h.subtract(A,g,A),h.subtract(E,g,E),h.subtract(x,g,x),h.subtract(b,g,b);let S=o.geodeticSurfaceNormal(g,r.direction);h.negate(S,S);let w=h.cross(S,h.UNIT_Z,r.right);h.normalize(w,w);let P=h.cross(w,S,r.up),R;if(e.frustum instanceof fn){let B=Math.max(h.distance(A,y),h.distance(C,E)),L=Math.max(h.distance(A,C),h.distance(y,E)),_,T,v=e.frustum._offCenterFrustum,I=v.right/v.top,O=L*I;B>O?(_=B,T=_/I):(T=L,_=O),R=Math.max(_,T)}else{let B=Math.tan(e.frustum.fovy*.5),L=e.frustum.aspectRatio*B;if(R=Math.max(yl(S,P,y,B),yl(S,P,C,B),yl(S,P,A,B),yl(S,P,E,B),yl(S,P,x,B),yl(S,P,b,B),yl(S,w,y,L),yl(S,w,C,L),yl(S,w,A,L),yl(S,w,E,L),yl(S,w,x,L),yl(S,w,b,L)),s<0&&a>0){let _=D3;_.longitude=c,_.latitude=0,_.height=0;let T=o.cartographicToCartesian(_,yte);h.subtract(T,g,T),R=Math.max(R,yl(S,P,T,B),yl(S,w,T,L)),_.longitude=u,T=o.cartographicToCartesian(_,yte),h.subtract(T,g,T),R=Math.max(R,yl(S,P,T,B),yl(S,w,T,L))}}return h.add(g,h.multiplyByScalar(S,-R,yte),n)}var UTt=new de,VTt=new h,jTt=new h;function GTt(e,t,n){let i=e._projection;t.west>t.east&&(t=oe.MAX_VALUE);let o=e._actualTransform,r=e._actualInvTransform,a=UTt;a.longitude=t.east,a.latitude=t.north;let s=i.project(a,VTt);M.multiplyByPoint(o,s,s),M.multiplyByPoint(r,s,s),a.longitude=t.west,a.latitude=t.south;let c=i.project(a,jTt);if(M.multiplyByPoint(o,c,c),M.multiplyByPoint(r,c,c),n.x=(s.x-c.x)*.5+c.x,n.y=(s.y-c.y)*.5+c.y,l(e.frustum.fovy)){let u=Math.tan(e.frustum.fovy*.5),f=e.frustum.aspectRatio*u;n.z=Math.max((s.x-c.x)/f,(s.y-c.y)/u)*.5}else{let u=s.x-c.x,f=s.y-c.y;n.z=Math.max(u,f)}return n}var HTt=new de,WTt=new h,qTt=new h;function YTt(e,t,n){let i=e._projection,o=t.east;t.west>t.east&&(e._scene.mapMode2D===hu.INFINITE_SCROLL?o+=D.TWO_PI:(t=oe.MAX_VALUE,o=t.east));let r=HTt;r.longitude=o,r.latitude=t.north;let a=i.project(r,WTt);r.longitude=t.west,r.latitude=t.south;let s=i.project(r,qTt),c=Math.abs(a.x-s.x)*.5,u=Math.abs(a.y-s.y)*.5,f,d,p=e.frustum.right/e.frustum.top,g=u*p;return c>g?(f=c,d=f/p):(d=u,f=g),u=Math.max(2*f,2*d),n.x=(a.x-s.x)*.5+s.x,n.y=(a.y-s.y)*.5+s.y,r=i.unproject(n,r),r.height=u,n=i.project(r,n),n}rn.prototype.getRectangleCameraCoordinates=function(e,t){let n=this._mode;if(l(t)||(t=new h),n===ie.SCENE3D)return EIe(this,e,t);if(n===ie.COLUMBUS_VIEW)return GTt(this,e,t);if(n===ie.SCENE2D)return YTt(this,e,t)};var XTt=new gn;function KTt(e,t,n,i){n=n??te.default;let o=e.getPickRay(t,XTt),r=si.rayEllipsoid(o,n);if(!r)return;let a=r.start>0?r.start:r.stop;return gn.getPoint(o,a,i)}var QTt=new gn;function $Tt(e,t,n,i){let r=e.getPickRay(t,QTt).origin;r=h.fromElements(r.y,r.z,0,r);let a=n.unproject(r);if(!(a.latitude<-D.PI_OVER_TWO||a.latitude>D.PI_OVER_TWO))return n.ellipsoid.cartographicToCartesian(a,i)}var JTt=new gn;function ZTt(e,t,n,i){let o=e.getPickRay(t,JTt),r=-o.origin.x/o.direction.x;gn.getPoint(o,r,i);let a=n.unproject(new h(i.y,i.z,0));if(!(a.latitude<-D.PI_OVER_TWO||a.latitude>D.PI_OVER_TWO||a.longitude<-Math.PI||a.longitude>Math.PI))return n.ellipsoid.cartographicToCartesian(a,i)}rn.prototype.pickEllipsoid=function(e,t,n){let i=this._scene.canvas;if(!(i.clientWidth===0||i.clientHeight===0)){if(l(n)||(n=new h),t=t??te.default,this._mode===ie.SCENE3D)n=KTt(this,e,t,n);else if(this._mode===ie.SCENE2D)n=$Tt(this,e,this._projection,n);else if(this._mode===ie.COLUMBUS_VIEW)n=ZTt(this,e,this._projection,n);else return;return n}};var eEt=new h,tEt=new h,nEt=new h;function iEt(e,t,n){let i=e._scene.canvas,o=i.clientWidth,r=i.clientHeight,a=Math.tan(e.frustum.fovy*.5),s=e.frustum.aspectRatio*a,c=e.frustum.near,u=2/o*t.x-1,f=2/r*(r-t.y)-1,d=e.positionWC;h.clone(d,n.origin);let p=h.multiplyByScalar(e.directionWC,c,eEt);h.add(d,p,p);let g=h.multiplyByScalar(e.rightWC,u*c*s,tEt),m=h.multiplyByScalar(e.upWC,f*c*a,nEt),A=h.add(p,g,n.direction);return h.add(A,m,A),h.subtract(A,d,A),h.normalize(A,A),n}var o5=new h;function oEt(e,t,n){let i=e._scene.canvas,o=i.clientWidth,r=i.clientHeight,a=e.frustum,s=a.offCenterFrustum;l(s)&&(a=s);let c=2/o*t.x-1;c*=(a.right-a.left)*.5;let u=2/r*(r-t.y)-1;u*=(a.top-a.bottom)*.5;let f=n.origin;if(h.clone(e.positionWC,f),h.multiplyByScalar(e.rightWC,c,o5),h.add(o5,f,f),h.multiplyByScalar(e.upWC,u,o5),h.add(o5,f,f),h.clone(e.directionWC,n.direction),e._mode===ie.SCENE2D&&e._scene.mapMode2D===hu.INFINITE_SCROLL){let d=e._maxCoord.x;f.y=D.mod(f.y+d,2*d)-d}return n}rn.prototype.getPickRay=function(e,t){l(t)||(t=new gn);let n=this._scene.canvas;if(n.clientWidth<=0||n.clientHeight<=0)return;let i=this.frustum;return l(i.aspectRatio)&&l(i.fov)&&l(i.near)?iEt(this,e,t):oEt(this,e,t)};var rEt=new h,aEt=new h;rn.prototype.distanceToBoundingSphere=function(e){let t=h.subtract(this.positionWC,e.center,rEt),n=h.multiplyByScalar(this.directionWC,h.dot(t,this.directionWC),aEt);return Math.max(0,h.magnitude(n)-e.radius)};var sEt=new z;rn.prototype.getPixelSize=function(e,t,n){let i=this.distanceToBoundingSphere(e),o=this.frustum.getPixelDimensions(t,n,i,this._scene.pixelRatio,sEt);return Math.max(o.x,o.y)};function cEt(e,t,n,i,o,r){let a=h.clone(t);n.y>i?a.y-=n.y-i:n.y<-i&&(a.y+=-i-n.y),n.z>o?a.z-=n.z-o:n.z<-o&&(a.z+=-o-n.z);function s(c){let u=h.lerp(t,a,c.time,new h);e.worldToCameraCoordinatesPoint(u,e.position)}return{easingFunction:wa.EXPONENTIAL_OUT,startObject:{time:0},stopObject:{time:1},duration:r,update:s}}var lEt=new h,cIe=new h,uEt=new h,fEt=new h;function dEt(e,t){let n=e.position,i=e.direction,o=e.worldToCameraCoordinatesVector(h.UNIT_X,lEt),r=-h.dot(o,n)/h.dot(o,i),a=h.add(n,h.multiplyByScalar(i,r,cIe),cIe);e.cameraToWorldCoordinatesPoint(a,a),n=e.cameraToWorldCoordinatesPoint(e.position,uEt);let s=Math.tan(e.frustum.fovy*.5),c=e.frustum.aspectRatio*s,u=h.magnitude(h.subtract(n,a,fEt)),f=c*u,d=s*u,p=e._maxCoord.x,g=e._maxCoord.y,m=Math.max(f-p,p),A=Math.max(d-g,g);if(n.z<-m||n.z>m||n.y<-A||n.y>A){let y=a.y<-m||a.y>m,x=a.z<-A||a.z>A;if(y||x)return cEt(e,n,a,m,A,t)}}rn.prototype.createCorrectPositionTween=function(e){if(this._mode===ie.COLUMBUS_VIEW)return dEt(this,e)};var hEt=new h,Ys={destination:void 0,heading:void 0,pitch:void 0,roll:void 0,duration:void 0,complete:void 0,cancel:void 0,endTransform:void 0,maximumHeight:void 0,easingFunction:void 0};rn.prototype.cancelFlight=function(){l(this._currentFlight)&&(this._currentFlight.cancelTween(),this._currentFlight=void 0)};rn.prototype.completeFlight=function(){if(l(this._currentFlight)){this._currentFlight.cancelTween();let e={destination:void 0,orientation:{heading:void 0,pitch:void 0,roll:void 0}};e.destination=Ys.destination,e.orientation.heading=Ys.heading,e.orientation.pitch=Ys.pitch,e.orientation.roll=Ys.roll,this.setView(e),l(this._currentFlight.complete)&&this._currentFlight.complete(),this._currentFlight=void 0}};rn.prototype.flyTo=function(e){e=e??G.EMPTY_OBJECT;let t=e.destination;if(this._mode===ie.MORPHING)return;this.cancelFlight();let i=t instanceof oe;i&&(t=this.getRectangleCameraCoordinates(t,hEt));let o=e.orientation??G.EMPTY_OBJECT;if(l(o.direction)&&(o=AIe(this,t,o,Cte.orientation)),l(e.duration)&&e.duration<=0){let f=Cte;f.destination=e.destination,f.orientation.heading=o.heading,f.orientation.pitch=o.pitch,f.orientation.roll=o.roll,f.convert=e.convert,f.endTransform=e.endTransform,this.setView(f),typeof e.complete=="function"&&e.complete();return}let r=this,a;Ys.destination=t,Ys.heading=o.heading,Ys.pitch=o.pitch,Ys.roll=o.roll,Ys.duration=e.duration,Ys.complete=function(){a===r._currentFlight&&(r._currentFlight=void 0),l(e.complete)&&e.complete()},Ys.cancel=e.cancel,Ys.endTransform=e.endTransform,Ys.convert=i?!1:e.convert,Ys.maximumHeight=e.maximumHeight,Ys.pitchAdjustHeight=e.pitchAdjustHeight,Ys.flyOverLongitude=e.flyOverLongitude,Ys.flyOverLongitudeWeight=e.flyOverLongitudeWeight,Ys.easingFunction=e.easingFunction;let s=this._scene,c=I3.createTween(s,Ys);if(c.duration===0){typeof c.complete=="function"&&c.complete();return}a=s.tweens.add(c),this._currentFlight=a;let u=this._scene.preloadFlightCamera;this._mode!==ie.SCENE2D&&(l(u)||(u=rn.clone(this)),u.setView({destination:t,orientation:o}),this._scene.preloadFlightCullingVolume=u.frustum.computeCullingVolume(u.positionWC,u.directionWC,u.upWC))};function mEt(e,t){let n=e.frustum,i=Math.tan(n.fovy*.5),o=n.aspectRatio*i;return Math.max(t/o,t/i)}function pEt(e,t){let n=e.frustum,i=n.offCenterFrustum;l(i)&&(n=i);let o,r,a=n.right/n.top,s=t*a;return t>s?(o=t,r=o/a):(r=t,o=s),Math.max(o,r)*1.5}var gEt=100;function vIe(e,t,n){n=ih.clone(l(n)?n:rn.DEFAULT_OFFSET);let i=e._scene.screenSpaceCameraController.minimumZoomDistance,o=e._scene.screenSpaceCameraController.maximumZoomDistance,r=n.range;if(!l(r)||r===0){let a=t.radius;a===0?n.range=gEt:e.frustum instanceof fn||e._mode===ie.SCENE2D?n.range=pEt(e,a):n.range=mEt(e,a),n.range=D.clamp(n.range,i,o)}return n}rn.prototype.viewBoundingSphere=function(e,t){t=vIe(this,e,t),this.lookAt(e.center,t)};var _Et=new M,AEt=new h,yEt=new h,xEt=new h,bEt=new h,CEt=new se,TEt=new Le,EEt=new $;rn.prototype.flyToBoundingSphere=function(e,t){t=t??G.EMPTY_OBJECT;let n=this._mode===ie.SCENE2D||this._mode===ie.COLUMBUS_VIEW;this._setTransform(M.IDENTITY);let i=vIe(this,e,t.offset),o;n?o=h.multiplyByScalar(h.UNIT_Z,i.range,AEt):o=TIe(i.heading,i.pitch,i.range);let a=this._scene.ellipsoid??te.default,s=pt.eastNorthUpToFixedFrame(e.center,a,_Et);M.multiplyByPoint(s,o,o);let c,u;if(!n){if(c=h.subtract(e.center,o,yEt),h.normalize(c,c),u=M.multiplyByPointAsVector(s,h.UNIT_Z,xEt),1-Math.abs(h.dot(c,u))<D.EPSILON6){let d=Le.fromAxisAngle(c,i.heading,TEt),p=$.fromQuaternion(d,EEt);h.fromCartesian4(M.getColumn(s,1,CEt),u),$.multiplyByVector(p,u,u)}let f=h.cross(c,u,bEt);h.cross(f,c,u),h.normalize(u,u)}this.flyTo({destination:o,orientation:{direction:c,up:u},duration:t.duration,complete:t.complete,cancel:t.cancel,endTransform:t.endTransform,maximumHeight:t.maximumHeight,easingFunction:t.easingFunction,flyOverLongitude:t.flyOverLongitude,flyOverLongitudeWeight:t.flyOverLongitudeWeight,pitchAdjustHeight:t.pitchAdjustHeight})};var lIe=new h,uIe=new h,xte=new h,fIe=new h,P3=[new h,new h,new h,new h];function vEt(e,t){let n=t.radii,i=e.positionWC,o=h.multiplyComponents(t.oneOverRadii,i,lIe),r=h.magnitude(o),a=h.normalize(o,uIe),s,c;h.equalsEpsilon(a,h.UNIT_Z,D.EPSILON10)?(s=new h(0,1,0),c=new h(0,0,1)):(s=h.normalize(h.cross(h.UNIT_Z,a,xte),xte),c=h.normalize(h.cross(a,s,fIe),fIe));let u=Math.sqrt(h.magnitudeSquared(o)-1),f=h.multiplyByScalar(a,1/r,lIe),d=u/r,p=h.multiplyByScalar(s,d,uIe),g=h.multiplyByScalar(c,d,xte),m=h.add(f,g,P3[0]);h.subtract(m,p,m),h.multiplyComponents(n,m,m);let A=h.subtract(f,g,P3[1]);h.subtract(A,p,A),h.multiplyComponents(n,A,A);let y=h.subtract(f,g,P3[2]);h.add(y,p,y),h.multiplyComponents(n,y,y);let x=h.add(f,g,P3[3]);return h.add(x,p,x),h.multiplyComponents(n,x,x),P3}var bte=new z,SEt=new h,ky=[new de,new de,new de,new de];function r5(e,t,n,i,o,r){bte.x=e,bte.y=t;let a=i.pickEllipsoid(bte,o,SEt);return l(a)?(ky[n]=o.cartesianToCartographic(a,ky[n]),1):(ky[n]=o.cartesianToCartographic(r[n],ky[n]),0)}rn.prototype.computeViewRectangle=function(e,t){e=e??te.default;let n=this.frustum.computeCullingVolume(this.positionWC,this.directionWC,this.upWC),i=new ce(h.ZERO,e.maximumRadius);if(n.computeVisibility(i)===qt.OUTSIDE)return;let r=this._scene.canvas,a=r.clientWidth,s=r.clientHeight,c=0,u=vEt(this,e);if(c+=r5(0,0,0,this,e,u),c+=r5(0,s,1,this,e,u),c+=r5(a,s,2,this,e,u),c+=r5(a,0,3,this,e,u),c<2)return oe.MAX_VALUE;t=oe.fromCartographicArray(ky,t);let f=0,d=ky[3].longitude;for(let p=0;p<4;++p){let g=ky[p].longitude,m=Math.abs(g-d);m>D.PI?f+=D.TWO_PI-m:f+=m,d=g}return D.equalsEpsilon(Math.abs(f),D.TWO_PI,D.EPSILON9)&&(t.west=-D.PI,t.east=D.PI,ky[0].latitude>=0?t.north=D.PI_OVER_TWO:t.south=-D.PI_OVER_TWO),t};rn.prototype.switchToPerspectiveFrustum=function(){if(this._mode===ie.SCENE2D||this.frustum instanceof Vi)return;let e=this._scene;this.frustum=new Vi,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.fov=D.toRadians(60)};rn.prototype.switchToOrthographicFrustum=function(){if(this._mode===ie.SCENE2D||this.frustum instanceof fn)return;let e=gIe(this),t=this._scene;this.frustum=new fn,this.frustum.aspectRatio=t.drawingBufferWidth/t.drawingBufferHeight,this.frustum.width=e};rn.clone=function(e,t){return l(t)||(t=new rn(e._scene)),h.clone(e.position,t.position),h.clone(e.direction,t.direction),h.clone(e.up,t.up),h.clone(e.right,t.right),M.clone(e._transform,t.transform),t._transformChanged=!0,t.frustum=e.frustum.clone(),t};var bo=rn;function wEt(e){this.pass=e.pass,this.commandList=e.commandList,this.camera=e.camera,this.cullingVolume=e.cullingVolume,this.ready=!1}var fh=wEt;var PIe=Yr(uf(),1),SIe=576,IEt=100,R3="#ffffff",u5="#48b";function RIe(e,t){this.credit=e,this.count=t??1}function DEt(e,t){let n=e.length;for(let i=0;i<n;i++){let o=e[i];if(yt.equals(o,t))return!0}return!1}function PEt(e){let t=e._previousCesiumCredit,n=e._currentCesiumCredit;yt.equals(n,t)||(l(t)&&e._cesiumCreditContainer.removeChild(t.element),l(n)&&e._cesiumCreditContainer.appendChild(n.element),e._previousCesiumCredit=n)}var OIe="cesium-credit-delimiter";function wIe(e){let t=document.createElement("span");return t.textContent=e,t.className=OIe,t}function IIe(e,t){if(l(t)){let n=document.createElement(t);n._creditId=e._creditId,n.appendChild(e),e=n}return e}function DIe(e,t,n,i){let o=e.childNodes,r=-1;t.sort(function(a,s){return s.count-a.count});for(let a=0;a<t.length;++a){let s=t[a].credit;if(l(s)){if(r=a,l(n)&&(r*=2,a>0)){let u=r-1;if(o.length<=u)e.appendChild(wIe(n));else{let f=o[u];f.className!==OIe&&e.replaceChild(wIe(n),f)}}let c=s.element;if(o.length<=r)e.appendChild(IIe(c,i));else{let u=o[r];u._creditId!==s._id&&e.replaceChild(IIe(c,i),u)}}}for(++r;r<o.length;)e.removeChild(o[r])}function REt(e){let t=e._lightboxCredits,n=e.viewport.clientWidth,i=e.viewport.clientHeight;n!==e._lastViewportWidth&&(n<SIe?(t.className="cesium-credit-lightbox cesium-credit-lightbox-mobile",t.style.marginTop="0"):(t.className="cesium-credit-lightbox cesium-credit-lightbox-expanded",t.style.marginTop=`${Math.floor((i-t.clientHeight)*.5)}px`),e._lastViewportWidth=n),n>=SIe&&i!==e._lastViewportHeight&&(t.style.marginTop=`${Math.floor((i-t.clientHeight)*.5)}px`,e._lastViewportHeight=i)}function OEt(e){let t=`
- .cesium-credit-lightbox-overlay {
- display: none;
- z-index: 1;
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- background-color: rgba(80, 80, 80, 0.8);
- }
-
- .cesium-credit-lightbox {
- background-color: #303336;
- color: ${R3};
- position: relative;
- min-height: ${IEt}px;
- margin: auto;
- }
- .cesium-credit-lightbox > ul > li a,
- .cesium-credit-lightbox > ul > li a:visited,
- .cesium-credit-wrapper a,
- .cesium-credit-wrapper a:visited {
- color: ${R3};
- }
- .cesium-credit-lightbox > ul > li a:hover {
- color: ${u5};
- }
- .cesium-credit-lightbox.cesium-credit-lightbox-expanded {
- border: 1px solid #444;
- border-radius: 5px;
- max-width: 470px;
- }
- .cesium-credit-lightbox.cesium-credit-lightbox-mobile {
- height: 100%;
- width: 100%;
- }
- .cesium-credit-lightbox-title {
- padding: 20px 20px 0 20px;
- }
- .cesium-credit-lightbox-close {
- font-size: 18pt;
- cursor: pointer;
- position: absolute;
- top: 0;
- right: 6px;
- color: ${R3};
- }
- .cesium-credit-lightbox-close:hover {
- color: ${u5};
- }
- .cesium-credit-lightbox > ul {
- margin: 0;
- padding: 12px 20px 12px 40px;
- font-size: 13px;
- }
- .cesium-credit-lightbox > ul > li {
- padding-bottom: 6px;
- }
- .cesium-credit-lightbox > ul > li * {
- padding: 0;
- margin: 0;
- }
-
- .cesium-credit-expand-link {
- padding-left: 5px;
- cursor: pointer;
- text-decoration: underline;
- color: ${R3};
- }
- .cesium-credit-expand-link:hover {
- color: ${u5};
- }
-
- .cesium-credit-text {
- color: ${R3};
- }
-
- .cesium-credit-delimiter {
- padding: 0 5px;
- }
-
- .cesium-credit-textContainer *,
- .cesium-credit-logoContainer * {
- display: inline;
- }
-
- .cesium-credit-textContainer a:hover {
- color: ${u5}
- }
-
- .cesium-credit-textContainer .cesium-credit-wrapper:first-of-type {
- padding-left: 5px;
- }
- `;function n(r){if(r.shadowRoot)return r.shadowRoot;if(r.getRootNode){let a=r.getRootNode();if(a instanceof ShadowRoot)return a}}let i=n(e)??document.head,o=document.createElement("style");o.innerHTML=t,i.appendChild(o)}function jr(e,t,n){let i=this;n=n??document.body;let o=document.createElement("div");o.className="cesium-credit-lightbox-overlay",n.appendChild(o);let r=document.createElement("div");r.className="cesium-credit-lightbox",o.appendChild(r);function a(m){r.contains(m.target)||i.hideLightbox()}o.addEventListener("click",a,!1);let s=document.createElement("div");s.className="cesium-credit-lightbox-title",s.textContent="Data provided by:",r.appendChild(s);let c=document.createElement("a");c.onclick=this.hideLightbox.bind(this),c.innerHTML="×",c.className="cesium-credit-lightbox-close",r.appendChild(c);let u=document.createElement("ul");r.appendChild(u);let f=document.createElement("div");f.className="cesium-credit-logoContainer",f.style.display="inline",e.appendChild(f);let d=document.createElement("div");d.className="cesium-credit-textContainer",d.style.display="inline",e.appendChild(d);let p=document.createElement("a");p.className="cesium-credit-expand-link",p.onclick=this.showLightbox.bind(this),p.textContent="Data attribution",e.appendChild(p),OEt(e);let g=yt.clone(jr.cesiumCredit);this._delimiter=t??"\u2022",this._screenContainer=d,this._cesiumCreditContainer=f,this._lastViewportHeight=void 0,this._lastViewportWidth=void 0,this._lightboxCredits=r,this._creditList=u,this._lightbox=o,this._hideLightbox=a,this._expandLink=p,this._expanded=!1,this._staticCredits=[],this._cesiumCredit=g,this._previousCesiumCredit=void 0,this._currentCesiumCredit=g,this._creditDisplayElementPool=[],this._creditDisplayElementIndex=0,this._currentFrameCredits={screenCredits:new Lt,lightboxCredits:new Lt},this._defaultCredit=void 0,this.viewport=n,this.container=e}function MIe(e,t,n,i){i=i??1;let o=t.get(n.id);if(l(o))o.count<Number.MAX_VALUE&&(o.count+=i);else{let r=e._creditDisplayElementPool,a=e._creditDisplayElementPoolIndex;a<r.length?(o=r[a],o.credit=n,o.count=i):(o=new RIe(n,i),r.push(o)),++e._creditDisplayElementPoolIndex,t.set(n.id,o)}}jr.prototype.addCreditToNextFrame=function(e){if(e.isIon()){l(this._defaultCredit)||(this._defaultCredit=yt.clone(BIe())),this._currentCesiumCredit=this._defaultCredit;return}let t;e.showOnScreen?t=this._currentFrameCredits.screenCredits:t=this._currentFrameCredits.lightboxCredits,MIe(this,t,e)};jr.prototype.addStaticCredit=function(e){let t=this._staticCredits;DEt(t,e)||t.push(e)};jr.prototype.removeStaticCredit=function(e){let t=this._staticCredits,n=t.indexOf(e);n!==-1&&t.splice(n,1)};jr.prototype.showLightbox=function(){this._lightbox.style.display="block",this._expanded=!0};jr.prototype.hideLightbox=function(){this._lightbox.style.display="none",this._expanded=!1};jr.prototype.update=function(){this._expanded&&REt(this)};jr.prototype.beginFrame=function(){let e=this._currentFrameCredits;this._creditDisplayElementPoolIndex=0;let t=e.screenCredits,n=e.lightboxCredits;t.removeAll(),n.removeAll();let i=this._staticCredits;for(let o=0;o<i.length;++o){let r=i[o],a=r.showOnScreen?t:n;r.isIon()&&yt.equals(jr.cesiumCredit,this._cesiumCredit)||MIe(this,a,r,Number.MAX_VALUE)}yt.equals(jr.cesiumCredit,this._cesiumCredit)||(this._cesiumCredit=yt.clone(jr.cesiumCredit)),this._currentCesiumCredit=this._cesiumCredit};jr.prototype.endFrame=function(){let e=this._currentFrameCredits.screenCredits.values;DIe(this._screenContainer,e,this._delimiter,void 0);let t=this._currentFrameCredits.lightboxCredits.values;this._expandLink.style.display=t.length>0?"inline":"none",DIe(this._creditList,t,void 0,"li"),PEt(this)};jr.prototype.destroy=function(){return this._lightbox.removeEventListener("click",this._hideLightbox,!1),this.container.removeChild(this._cesiumCreditContainer),this.container.removeChild(this._screenContainer),this.container.removeChild(this._expandLink),this.viewport.removeChild(this._lightbox),fe(this)};jr.prototype.isDestroyed=function(){return!1};jr._cesiumCredit=void 0;jr._cesiumCreditInitialized=!1;var f5;function BIe(){if(!l(f5)){let e=Xt("Assets/Images/ion-credit.png");e.indexOf("http://")!==0&&e.indexOf("https://")!==0&&e.indexOf("data:")!==0&&(e=new PIe.default(e).path()),f5=new yt(`<a href="https://cesium.com/" target="_blank"><img src="${e}" style="vertical-align: -7px" title="Cesium ion"/></a>`,!0)}return jr._cesiumCreditInitialized||(jr._cesiumCredit=f5,jr._cesiumCreditInitialized=!0),f5}Object.defineProperties(jr,{cesiumCredit:{get:function(){return BIe(),jr._cesiumCredit},set:function(e){jr._cesiumCredit=e,jr._cesiumCreditInitialized=!0}}});jr.CreditDisplayElement=RIe;var O3=jr;var d5=0,MEt=1;function sT(e){let t=e.frustum,n=e.orientation,i=e.origin,o=e.vertexFormat??Ne.DEFAULT,r=e._drawNearPlane??!0,a,s;t instanceof Vi?(a=d5,s=Vi.packedLength):t instanceof fn&&(a=MEt,s=fn.packedLength),this._frustumType=a,this._frustum=t.clone(),this._origin=h.clone(i),this._orientation=Le.clone(n),this._drawNearPlane=r,this._vertexFormat=o,this._workerName="createFrustumGeometry",this.packedLength=2+s+h.packedLength+Le.packedLength+Ne.packedLength}sT.pack=function(e,t,n){n=n??0;let i=e._frustumType,o=e._frustum;return t[n++]=i,i===d5?(Vi.pack(o,t,n),n+=Vi.packedLength):(fn.pack(o,t,n),n+=fn.packedLength),h.pack(e._origin,t,n),n+=h.packedLength,Le.pack(e._orientation,t,n),n+=Le.packedLength,Ne.pack(e._vertexFormat,t,n),n+=Ne.packedLength,t[n]=e._drawNearPlane?1:0,t};var BEt=new Vi,LEt=new fn,NEt=new Le,FEt=new h,kEt=new Ne;sT.unpack=function(e,t,n){t=t??0;let i=e[t++],o;i===d5?(o=Vi.unpack(e,t,BEt),t+=Vi.packedLength):(o=fn.unpack(e,t,LEt),t+=fn.packedLength);let r=h.unpack(e,t,FEt);t+=h.packedLength;let a=Le.unpack(e,t,NEt);t+=Le.packedLength;let s=Ne.unpack(e,t,kEt);t+=Ne.packedLength;let c=e[t]===1;if(!l(n))return new sT({frustum:o,origin:r,orientation:a,vertexFormat:s,_drawNearPlane:c});let u=i===n._frustumType?n._frustum:void 0;return n._frustum=o.clone(u),n._frustumType=i,n._origin=h.clone(r,n._origin),n._orientation=Le.clone(a,n._orientation),n._vertexFormat=Ne.clone(s,n._vertexFormat),n._drawNearPlane=c,n};function nI(e,t,n,i,o,r,a,s){let c=e/3*2;for(let u=0;u<4;++u)l(t)&&(t[e]=r.x,t[e+1]=r.y,t[e+2]=r.z),l(n)&&(n[e]=a.x,n[e+1]=a.y,n[e+2]=a.z),l(i)&&(i[e]=s.x,i[e+1]=s.y,i[e+2]=s.z),e+=3;o[c]=0,o[c+1]=0,o[c+2]=1,o[c+3]=0,o[c+4]=1,o[c+5]=1,o[c+6]=0,o[c+7]=1}var zEt=new $,UEt=new M,Ste=new M,LIe=new h,NIe=new h,FIe=new h,VEt=new h,jEt=new h,GEt=new h,zy=new Array(3),M3=new Array(4);M3[0]=new se(-1,-1,1,1);M3[1]=new se(1,-1,1,1);M3[2]=new se(1,1,1,1);M3[3]=new se(-1,1,1,1);var kIe=new Array(4);for(let e=0;e<4;++e)kIe[e]=new se;sT._computeNearFarPlanes=function(e,t,n,i,o,r,a,s){let c=$.fromQuaternion(t,zEt),u=r??LIe,f=a??NIe,d=s??FIe;u=$.getColumn(c,0,u),f=$.getColumn(c,1,f),d=$.getColumn(c,2,d),h.normalize(u,u),h.normalize(f,f),h.normalize(d,d),h.negate(u,u);let p=M.computeView(e,d,f,u,UEt),g,m,A=i.projectionMatrix;if(n===d5){let y=M.multiply(A,p,Ste);m=M.inverse(y,Ste)}else g=M.inverseTransformation(p,Ste);l(m)?(zy[0]=i.near,zy[1]=i.far):(zy[0]=0,zy[1]=i.near,zy[2]=i.far);for(let y=0;y<2;++y)for(let x=0;x<4;++x){let b=se.clone(M3[x],kIe[x]);if(l(m)){b=M.multiplyByVector(m,b,b);let C=1/b.w;h.multiplyByScalar(b,C,b),h.subtract(b,e,b),h.normalize(b,b);let E=h.dot(d,b);h.multiplyByScalar(b,zy[y]/E,b),h.add(b,e,b)}else{let C=i.offCenterFrustum;l(C)&&(i=C);let E=zy[y],S=zy[y+1];b.x=(b.x*(i.right-i.left)+i.left+i.right)*.5,b.y=(b.y*(i.top-i.bottom)+i.bottom+i.top)*.5,b.z=(b.z*(E-S)-E-S)*.5,b.w=1,M.multiplyByVector(g,b,b)}o[12*y+x*3]=b.x,o[12*y+x*3+1]=b.y,o[12*y+x*3+2]=b.z}};sT.createGeometry=function(e){let t=e._frustumType,n=e._frustum,i=e._origin,o=e._orientation,r=e._drawNearPlane,a=e._vertexFormat,s=r?6:5,c=new Float64Array(72);sT._computeNearFarPlanes(i,o,t,n,c);let u=24;c[u]=c[12],c[u+1]=c[13],c[u+2]=c[14],c[u+3]=c[0],c[u+4]=c[1],c[u+5]=c[2],c[u+6]=c[9],c[u+7]=c[10],c[u+8]=c[11],c[u+9]=c[21],c[u+10]=c[22],c[u+11]=c[23],u+=12,c[u]=c[15],c[u+1]=c[16],c[u+2]=c[17],c[u+3]=c[3],c[u+4]=c[4],c[u+5]=c[5],c[u+6]=c[0],c[u+7]=c[1],c[u+8]=c[2],c[u+9]=c[12],c[u+10]=c[13],c[u+11]=c[14],u+=12,c[u]=c[3],c[u+1]=c[4],c[u+2]=c[5],c[u+3]=c[15],c[u+4]=c[16],c[u+5]=c[17],c[u+6]=c[18],c[u+7]=c[19],c[u+8]=c[20],c[u+9]=c[6],c[u+10]=c[7],c[u+11]=c[8],u+=12,c[u]=c[6],c[u+1]=c[7],c[u+2]=c[8],c[u+3]=c[18],c[u+4]=c[19],c[u+5]=c[20],c[u+6]=c[21],c[u+7]=c[22],c[u+8]=c[23],c[u+9]=c[9],c[u+10]=c[10],c[u+11]=c[11],r||(c=c.subarray(12));let f=new pn({position:new Me({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:c})});if(l(a.normal)||l(a.tangent)||l(a.bitangent)||l(a.st)){let p=l(a.normal)?new Float32Array(12*s):void 0,g=l(a.tangent)?new Float32Array(12*s):void 0,m=l(a.bitangent)?new Float32Array(12*s):void 0,A=l(a.st)?new Float32Array(8*s):void 0,y=LIe,x=NIe,b=FIe,C=h.negate(y,VEt),E=h.negate(x,jEt),S=h.negate(b,GEt);u=0,r&&(nI(u,p,g,m,A,S,y,x),u+=12),nI(u,p,g,m,A,b,C,x),u+=12,nI(u,p,g,m,A,C,S,x),u+=12,nI(u,p,g,m,A,E,S,C),u+=12,nI(u,p,g,m,A,y,b,x),u+=12,nI(u,p,g,m,A,x,b,C),l(p)&&(f.normal=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:p})),l(g)&&(f.tangent=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:g})),l(m)&&(f.bitangent=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:m})),l(A)&&(f.st=new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:A}))}let d=new Uint16Array(6*s);for(let p=0;p<s;++p){let g=p*6,m=p*4;d[g]=m,d[g+1]=m+1,d[g+2]=m+2,d[g+3]=m,d[g+4]=m+2,d[g+5]=m+3}return new At({attributes:f,indices:d,primitiveType:Re.TRIANGLES,boundingSphere:ce.fromVertices(c)})};var cT=sT;var wte=0,HEt=1;function B3(e){let t=e.frustum,n=e.orientation,i=e.origin,o=e._drawNearPlane??!0,r,a;t instanceof Vi?(r=wte,a=Vi.packedLength):t instanceof fn&&(r=HEt,a=fn.packedLength),this._frustumType=r,this._frustum=t.clone(),this._origin=h.clone(i),this._orientation=Le.clone(n),this._drawNearPlane=o,this._workerName="createFrustumOutlineGeometry",this.packedLength=2+a+h.packedLength+Le.packedLength}B3.pack=function(e,t,n){n=n??0;let i=e._frustumType,o=e._frustum;return t[n++]=i,i===wte?(Vi.pack(o,t,n),n+=Vi.packedLength):(fn.pack(o,t,n),n+=fn.packedLength),h.pack(e._origin,t,n),n+=h.packedLength,Le.pack(e._orientation,t,n),n+=Le.packedLength,t[n]=e._drawNearPlane?1:0,t};var WEt=new Vi,qEt=new fn,YEt=new Le,XEt=new h;B3.unpack=function(e,t,n){t=t??0;let i=e[t++],o;i===wte?(o=Vi.unpack(e,t,WEt),t+=Vi.packedLength):(o=fn.unpack(e,t,qEt),t+=fn.packedLength);let r=h.unpack(e,t,XEt);t+=h.packedLength;let a=Le.unpack(e,t,YEt);t+=Le.packedLength;let s=e[t]===1;if(!l(n))return new B3({frustum:o,origin:r,orientation:a,_drawNearPlane:s});let c=i===n._frustumType?n._frustum:void 0;return n._frustum=o.clone(c),n._frustumType=i,n._origin=h.clone(r,n._origin),n._orientation=Le.clone(a,n._orientation),n._drawNearPlane=s,n};B3.createGeometry=function(e){let t=e._frustumType,n=e._frustum,i=e._origin,o=e._orientation,r=e._drawNearPlane,a=new Float64Array(24);cT._computeNearFarPlanes(i,o,t,n,a);let s=new pn({position:new Me({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:a})}),c,u,f=r?2:1,d=new Uint16Array(8*(f+1)),p=r?0:1;for(;p<2;++p)c=r?p*8:0,u=p*4,d[c]=u,d[c+1]=u+1,d[c+2]=u+1,d[c+3]=u+2,d[c+4]=u+2,d[c+5]=u+3,d[c+6]=u+3,d[c+7]=u;for(p=0;p<2;++p)c=(f+p)*8,u=p*4,d[c]=u,d[c+1]=u+4,d[c+2]=u+1,d[c+3]=u+5,d[c+4]=u+2,d[c+5]=u+6,d[c+6]=u+3,d[c+7]=u+7;return new At({attributes:s,indices:d,primitiveType:Re.LINES,boundingSphere:ce.fromVertices(a)})};var L3=B3;function h5(e){e=e??G.EMPTY_OBJECT,this._camera=e.camera,this._frustumSplits=e.frustumSplits,this._color=e.color??V.CYAN,this._updateOnChange=e.updateOnChange??!0,this.show=e.show??!0,this.id=e.id,this._id=void 0,this._outlinePrimitives=[],this._planesPrimitives=[]}var KEt=new h,QEt=new $,$Et=new Le,JEt=new Vi,ZEt=new du,evt=new fn,tvt=new da,nvt=new V,ivt=[1,1e5];h5.prototype.update=function(e){if(!this.show)return;let t=this._planesPrimitives,n=this._outlinePrimitives,i,o;if(this._updateOnChange){for(o=t.length,i=0;i<o;++i)n[i]=n[i]&&n[i].destroy(),t[i]=t[i]&&t[i].destroy();t.length=0,n.length=0}if(t.length===0){let r=this._camera,a=r.frustum,s;a instanceof Vi?s=JEt:a instanceof du?s=ZEt:a instanceof fn?s=evt:s=tvt,s=a.clone(s);let c,u=this._frustumSplits;!l(u)||u.length<=1?(u=ivt,u[0]=this._camera.frustum.near,u[1]=this._camera.frustum.far,c=1):c=u.length-1;let f=r.positionWC,d=r.directionWC,p=r.upWC,g=r.rightWC;g=h.negate(g,KEt);let m=QEt;$.setColumn(m,0,g,m),$.setColumn(m,1,p,m),$.setColumn(m,2,d,m);let A=Le.fromRotationMatrix(m,$Et);for(t.length=n.length=c,i=0;i<c;++i)s.near=u[i],s.far=u[i+1],t[i]=new Dn({geometryInstances:new Ot({geometry:new cT({origin:f,orientation:A,frustum:s,_drawNearPlane:i===0}),attributes:{color:Yt.fromColor(V.fromAlpha(this._color,.1,nvt))},id:this.id,pickPrimitive:this}),appearance:new dn({translucent:!0,flat:!0}),asynchronous:!1}),n[i]=new Dn({geometryInstances:new Ot({geometry:new L3({origin:f,orientation:A,frustum:s,_drawNearPlane:i===0}),attributes:{color:Yt.fromColor(this._color)},id:this.id,pickPrimitive:this}),appearance:new dn({translucent:!1,flat:!0}),asynchronous:!1})}for(o=t.length,i=0;i<o;++i)n[i].update(e),t[i].update(e)};h5.prototype.isDestroyed=function(){return!1};h5.prototype.destroy=function(){let e=this._planesPrimitives.length;for(let t=0;t<e;++t)this._outlinePrimitives[t]=this._outlinePrimitives[t]&&this._outlinePrimitives[t].destroy(),this._planesPrimitives[t]=this._planesPrimitives[t]&&this._planesPrimitives[t].destroy();return fe(this)};var l0=h5;var N3=`in vec4 positionEC;
-
- void main()
- {
- vec3 position;
- vec3 direction;
- if (czm_orthographicIn3D == 1.0)
- {
- vec2 uv = (gl_FragCoord.xy - czm_viewport.xy) / czm_viewport.zw;
- vec2 minPlane = vec2(czm_frustumPlanes.z, czm_frustumPlanes.y); // left, bottom
- vec2 maxPlane = vec2(czm_frustumPlanes.w, czm_frustumPlanes.x); // right, top
- position = vec3(mix(minPlane, maxPlane, uv), 0.0);
- direction = vec3(0.0, 0.0, -1.0);
- }
- else
- {
- position = vec3(0.0);
- direction = normalize(positionEC.xyz);
- }
-
- czm_ray ray = czm_ray(position, direction);
-
- vec3 ellipsoid_center = czm_view[3].xyz;
-
- czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoid_center, czm_ellipsoidInverseRadii);
- if (!czm_isEmpty(intersection))
- {
- out_FragColor = vec4(1.0, 1.0, 0.0, 1.0);
- }
- else
- {
- discard;
- }
-
- czm_writeLogDepth();
- }
- `;var F3=`in vec4 position;
-
- out vec4 positionEC;
-
- void main()
- {
- positionEC = czm_modelView * position;
- gl_Position = czm_projection * positionEC;
-
- czm_vertexLogDepth();
- }
- `;function z3(e){this._rs=void 0,this._sp=void 0,this._va=void 0,this._command=void 0,this._mode=void 0,this._useLogDepth=!1,this._ellipsoidOffset=e??0}var k3=sn.supportsTypedArrays()?new Float32Array(12):[],zIe=new h,UIe=new h,Ite=new h,VIe=new h,m5=new h;function ovt(e,t){let n=e.radii,i=t.camera,o,r,a;if(i.frustum instanceof fn)o=h.ZERO,r=i.rightWC,a=i.upWC;else{let d=i.positionWC,p=h.multiplyComponents(e.oneOverRadii,d,zIe),g=h.normalize(p,UIe),m=h.normalize(h.cross(h.UNIT_Z,p,Ite),Ite),A=h.normalize(h.cross(g,m,VIe),VIe),y=h.magnitude(p),x=Math.sqrt(y*y-1);o=h.multiplyByScalar(g,1/y,zIe);let b=x/y;r=h.multiplyByScalar(m,b,UIe),a=h.multiplyByScalar(A,b,Ite)}let s=h.add(o,a,m5);h.subtract(s,r,s),h.multiplyComponents(n,s,s),h.pack(s,k3,0);let c=h.subtract(o,a,m5);h.subtract(c,r,c),h.multiplyComponents(n,c,c),h.pack(c,k3,3);let u=h.add(o,a,m5);h.add(u,r,u),h.multiplyComponents(n,u,u),h.pack(u,k3,6);let f=h.subtract(o,a,m5);return h.add(f,r,f),h.multiplyComponents(n,f,f),h.pack(f,k3,9),k3}z3.prototype.update=function(e){if(this._mode=e.mode,e.mode!==ie.SCENE3D)return;let t=e.context,n=e.mapProjection.ellipsoid.radii,i=new te(n.x+this._ellipsoidOffset,n.y+this._ellipsoidOffset,n.z+this._ellipsoidOffset),o=e.useLogDepth;if(l(this._command)||(this._rs=Ve.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},colorMask:{red:!1,green:!1,blue:!1,alpha:!1}}),this._command=new tt({renderState:this._rs,boundingVolume:new ce(h.ZERO,i.maximumRadius),pass:Ie.OPAQUE,owner:this})),!l(this._sp)||this._useLogDepth!==o){this._useLogDepth=o;let a=new He({sources:[F3]}),s=new He({sources:[N3]});o&&(s.defines.push("LOG_DEPTH"),a.defines.push("LOG_DEPTH")),this._sp=Kt.replaceCache({shaderProgram:this._sp,context:t,vertexShaderSource:a,fragmentShaderSource:s,attributeLocations:{position:0}}),this._command.shaderProgram=this._sp}let r=ovt(i,e);if(l(this._va))this._va.getAttribute(0).vertexBuffer.copyFromArrayView(r);else{let a=new At({attributes:{position:new Me({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:r})},indices:[0,1,2,2,1,3],primitiveType:Re.TRIANGLES});this._va=Fn.fromGeometry({context:t,geometry:a,attributeLocations:{position:0},bufferUsage:Oe.DYNAMIC_DRAW}),this._command.vertexArray=this._va}};z3.prototype.execute=function(e,t){this._mode===ie.SCENE3D&&this._command.execute(e,t)};z3.prototype.isDestroyed=function(){return!1};z3.prototype.destroy=function(){this._sp=this._sp&&this._sp.destroy(),this._va=this._va&&this._va.destroy()};var U3=z3;function oI(){}var rvt=/\bgl_FragDepth\b/,avt=/\bdiscard\b/;function svt(e,t){let n=e.shaderCache.getDerivedShaderProgram(t,"depthOnly");if(l(n))return n;let i=t.fragmentShaderSource,o=!1,r=i.sources;for(let s=0;s<r.length;++s)if(rvt.test(r[s])||avt.test(r[s])){o=!0;break}let a=i.defines.indexOf("LOG_DEPTH")>=0;if(!o&&!a){let s=`void main()
- {
- out_FragColor = vec4(1.0);
- }
- `;i=new He({sources:[s]})}else if(!o&&a){let s=`void main()
- {
- out_FragColor = vec4(1.0);
- czm_writeLogDepth();
- }
- `;i=new He({defines:["LOG_DEPTH"],sources:[s]})}return e.shaderCache.createDerivedShaderProgram(t,"depthOnly",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:i,attributeLocations:t._attributeLocations})}function cvt(e,t){let n=e._depthOnlyRenderStateCache,i=n[t.id];if(l(i))return i;let o=Ve.getState(t);o.depthMask=!0,o.colorMask={red:!1,green:!1,blue:!1,alpha:!1};let r=Ve.fromCache(o);return n[t.id]=r,r}oI.createDepthOnlyDerivedCommand=function(e,t,n,i){l(i)||(i={});let o=i.depthOnlyCommand?.shaderProgram,r=i.depthOnlyCommand?.renderState;return i.depthOnlyCommand=tt.shallowClone(t,i.depthOnlyCommand),!l(o)||i.shaderProgramId!==t.shaderProgram.id?(i.depthOnlyCommand.shaderProgram=svt(n,t.shaderProgram),i.depthOnlyCommand.renderState=cvt(e,t.renderState),i.shaderProgramId=t.shaderProgram.id):(i.depthOnlyCommand.shaderProgram=o,i.depthOnlyCommand.renderState=r),i};var lvt=/\s+czm_writeLogDepth\(/,uvt=/\s+czm_vertexLogDepth\(/;function fvt(e,t){if(t.fragmentShaderSource.defines.indexOf("LOG_DEPTH_READ_ONLY")>=0)return t;let i=e.shaderCache.getDerivedShaderProgram(t,"logDepth");if(l(i))return i;let o=t._attributeLocations,r=t.vertexShaderSource.clone(),a=t.fragmentShaderSource.clone();r.defines=l(r.defines)?r.defines.slice(0):[],r.defines.push("LOG_DEPTH"),a.defines=l(a.defines)?a.defines.slice(0):[],a.defines.push("LOG_DEPTH");let s=!1,c=r.sources;for(let f=0;f<c.length;++f)if(uvt.test(c[f])){s=!0;break}if(!s){for(let d=0;d<c.length;++d)c[d]=He.replaceMain(c[d],"czm_log_depth_main");c.push(`
-
- void main()
- {
- czm_log_depth_main();
- czm_vertexLogDepth();
- }
- `)}c=a.sources,s=!1;for(let f=0;f<c.length;++f)lvt.test(c[f])&&(s=!0);a.defines.indexOf("LOG_DEPTH_WRITE")!==-1&&(s=!0);let u="";if(!s){for(let f=0;f<c.length;f++)c[f]=He.replaceMain(c[f],"czm_log_depth_main");u=`
- void main()
- {
- czm_log_depth_main();
- czm_writeLogDepth();
- }
- `}return c.push(u),e.shaderCache.createDerivedShaderProgram(t,"logDepth",{vertexShaderSource:r,fragmentShaderSource:a,attributeLocations:o})}oI.createLogDepthCommand=function(e,t,n){l(n)||(n={});let i=n.command?.shaderProgram;return n.command=tt.shallowClone(e,n.command),!l(i)||n.shaderProgramId!==e.shaderProgram.id?(n.command.shaderProgram=fvt(t,e.shaderProgram),n.shaderProgramId=e.shaderProgram.id):n.command.shaderProgram=i,n};function dvt(e,t,n){let i=e.shaderCache.getDerivedShaderProgram(t,"pick");if(l(i))return i;let o=t._attributeLocations,{sources:r,defines:a}=t.fragmentShaderSource,c=r.some(g=>g.includes("out_FragData"))?"out_FragData_0":"out_FragColor",u=`void main ()
- {
- czm_non_pick_main();
- if (${c}.a == 0.0) {
- discard;
- }
- ${c} = ${n};
- } `,f=r.length,d=new Array(f+1);for(let g=0;g<f;++g)d[g]=He.replaceMain(r[g],"czm_non_pick_main");d[f]=u;let p=new He({sources:d,defines:a});return e.shaderCache.createDerivedShaderProgram(t,"pick",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:p,attributeLocations:o})}function jIe(e,t){let n=e.picking.pickRenderStateCache,i=n[t.id];if(l(i))return i;let o=Ve.getState(t);o.blending.enabled=!1,o.depthMask=!0;let r=Ve.fromCache(o);return n[t.id]=r,r}oI.createPickDerivedCommand=function(e,t,n,i){l(i)||(i={});let o=i.pickCommand?.shaderProgram,r=i.pickCommand?.renderState;return i.pickCommand=tt.shallowClone(t,i.pickCommand),!l(o)||i.shaderProgramId!==t.shaderProgram.id?(i.pickCommand.shaderProgram=dvt(n,t.shaderProgram,t.pickId),i.pickCommand.renderState=jIe(e,t.renderState),i.shaderProgramId=t.shaderProgram.id):(i.pickCommand.shaderProgram=o,i.pickCommand.renderState=r),i};function iI(e,t,n){let i=e.length;for(let o=0;o<i;o++)e[o].trimStart().split(/\s+/)[0]===t&&(e[o]=`${t} ${n}`)}function hvt(e){return e.isArray?e.arrayLength:dt.getComponentCount(e.type)}function GIe(e,t,n){return`((${e} - float(${t})) / float(${n}))`}function HIe(e,t){let n=Dt.getMaximum(t);return`(${e}) / float(${n})`}function mvt(e,t){let n="float(value)";if(t.hasValueTransform){let i=t.offset,o=t.scale;n=GIe(n,i,o)}return e.normalized||(n=HIe(n,e.componentType)),n}function pvt(e,t,n){let o=`float(${`value.${n}`})`;if(t.hasValueTransform){let r=t.offset[n],a=t.scale[n];o=GIe(o,r,a)}return e.normalized||(o=HIe(o,e.componentType)),o}function gvt(e,t,n){let i=n.schemaId,o=n.className,r=n.propertyName,a=`pickMetadata-${i}-${o}-${r}`,s=e.shaderCache.getDerivedShaderProgram(t,a);if(l(s))return s;let c=n.metadataProperty,u=n.classProperty,f=u.getGlslType(),d=["0.0","0.0","0.0","0.0"],p=hvt(u);if(p===1)d[0]=mvt(u,c);else{let y=["x","y","z","w"];for(let x=0;x<p;x++)d[x]=pvt(u,c,y[x])}let g=t.fragmentShaderSource.defines.slice();g.push(Sf.METADATA_PICKING_ENABLED),iI(g,Sf.METADATA_PICKING_VALUE_TYPE,f),iI(g,Sf.METADATA_PICKING_VALUE_STRING,`metadata.${r}`),iI(g,Sf.METADATA_PICKING_VALUE_COMPONENT_X,d[0]),iI(g,Sf.METADATA_PICKING_VALUE_COMPONENT_Y,d[1]),iI(g,Sf.METADATA_PICKING_VALUE_COMPONENT_Z,d[2]),iI(g,Sf.METADATA_PICKING_VALUE_COMPONENT_W,d[3]);let m=new He({sources:t.fragmentShaderSource.sources,defines:g});return e.shaderCache.createDerivedShaderProgram(t,a,{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:m,attributeLocations:t._attributeLocations})}oI.createPickMetadataDerivedCommand=function(e,t,n,i){return l(i)||(i={}),i.pickMetadataCommand=tt.shallowClone(t,i.pickMetadataCommand),i.pickMetadataCommand.shaderProgram=gvt(n,t.shaderProgram,t.pickedMetadataInfo),i.pickMetadataCommand.renderState=jIe(e,t.renderState),i.shaderProgramId=t.shaderProgram.id,i};function _vt(e,t){let n=e.shaderCache.getDerivedShaderProgram(t,"HDR");if(l(n))return n;let i=t._attributeLocations,o=t.vertexShaderSource.clone(),r=t.fragmentShaderSource.clone();return o.defines=l(o.defines)?o.defines.slice(0):[],o.defines.push("HDR"),r.defines=l(r.defines)?r.defines.slice(0):[],r.defines.push("HDR"),e.shaderCache.createDerivedShaderProgram(t,"HDR",{vertexShaderSource:o,fragmentShaderSource:r,attributeLocations:i})}oI.createHdrCommand=function(e,t,n){l(n)||(n={});let i=n.command?.shaderProgram;return n.command=tt.shallowClone(e,n.command),!l(i)||n.shaderProgramId!==e.shaderProgram.id?(n.command.shaderProgram=_vt(t,e.shaderProgram),n.shaderProgramId=e.shaderProgram.id):n.command.shaderProgram=i,n};var u0=oI;function p5(e){this._scene=e,this._lastAlpha=void 0,this._lastBeta=void 0,this._lastGamma=void 0,this._alpha=void 0,this._beta=void 0,this._gamma=void 0;let t=this;function n(i){let o=i.alpha;if(!l(o)){t._alpha=void 0,t._beta=void 0,t._gamma=void 0;return}t._alpha=D.toRadians(o),t._beta=D.toRadians(i.beta),t._gamma=D.toRadians(i.gamma)}window.addEventListener("deviceorientation",n,!1),this._removeListener=function(){window.removeEventListener("deviceorientation",n,!1)}}var Avt=new Le,WIe=new Le,yvt=new $;function xvt(e,t,n,i){let o=e.direction,r=e.right,a=e.up,s=Le.fromAxisAngle(o,n,WIe),c=Le.fromAxisAngle(r,i,Avt),u=Le.multiply(c,s,c),f=Le.fromAxisAngle(a,t,WIe);Le.multiply(f,u,u);let d=$.fromQuaternion(u,yvt);$.multiplyByVector(d,r,r),$.multiplyByVector(d,a,a),$.multiplyByVector(d,o,o)}p5.prototype.update=function(){if(!l(this._alpha))return;l(this._lastAlpha)||(this._lastAlpha=this._alpha,this._lastBeta=this._beta,this._lastGamma=this._gamma);let e=this._lastAlpha-this._alpha,t=this._lastBeta-this._beta,n=this._lastGamma-this._gamma;xvt(this._scene.camera,-e,t,n),this._lastAlpha=this._alpha,this._lastBeta=this._beta,this._lastGamma=this._gamma};p5.prototype.isDestroyed=function(){return!1};p5.prototype.destroy=function(){return this._removeListener(),fe(this)};var V3=p5;function Dte(){this.enabled=!0,this.renderable=!0,this.density=6e-4,this.heightScalar=.001,this._heightFalloff=.59,this.maxHeight=8e5,this.visualDensityScalar=.15,this.screenSpaceErrorFactor=2,this.minimumBrightness=.03}Object.defineProperties(Dte.prototype,{heightFalloff:{get:function(){return this._heightFalloff},set:function(e){this._heightFalloff=e}}});var bvt=new h;Dte.prototype.update=function(e){if(!(e.fog.enabled=this.enabled))return;e.fog.renderable=this.renderable;let n=e.camera,i=n.positionCartographic;if(!l(i)||i.height>this.maxHeight||e.mode!==ie.SCENE3D){e.fog.enabled=!1,e.fog.density=0;return}let o=i.height,r=this.density*this.heightScalar*Math.pow(Math.max(o/this.maxHeight,D.EPSILON4),-Math.max(this._heightFalloff,0)),a=h.normalize(n.positionWC,bvt),s=Math.abs(h.dot(n.directionWC,a));r*=1-s,e.fog.density=r,e.fog.visualDensityScalar=this.visualDensityScalar,e.fog.sse=this.screenSpaceErrorFactor,e.fog.minimumBrightness=this.minimumBrightness};var j3=Dte;function Cvt(e,t,n){this.context=e,this.commandList=[],this.panoramaCommandList=[],this.shadowMaps=[],this.brdfLutGenerator=void 0,this.environmentMap=void 0,this.sphericalHarmonicCoefficients=void 0,this.specularEnvironmentMaps=void 0,this.specularEnvironmentMapsMaximumLOD=void 0,this.mode=ie.SCENE3D,this.morphTime=ie.getMorphTime(ie.SCENE3D),this.frameNumber=0,this.newFrame=!1,this.time=void 0,this.jobScheduler=n,this.mapProjection=void 0,this.camera=void 0,this.cameraUnderground=!1,this.globeTranslucencyState=void 0,this.cullingVolume=void 0,this.occluder=void 0,this.maximumScreenSpaceError=void 0,this.pixelRatio=1,this.passes={render:!1,pick:!1,pickVoxel:!1,depth:!1,postProcess:!1,offscreen:!1},this.creditDisplay=t,this.afterRender=[],this.scene3DOnly=!1,this.fog={enabled:!1,renderable:!1,density:void 0,visualDensityScalar:void 0,sse:void 0,minimumBrightness:void 0},this.atmosphere=void 0,this.verticalExaggeration=1,this.verticalExaggerationRelativeHeight=0,this.shadowState={shadowsEnabled:!0,shadowMaps:[],lightShadowMaps:[],nearPlane:1,farPlane:5e3,closestObjectSize:1e3,lastDirtyTime:0,outOfView:!0},this.splitPosition=0,this.frustumSplits=[],this.backgroundColor=void 0,this.light=void 0,this.minimumDisableDepthTestDistance=void 0,this.invertClassification=!1,this.invertClassificationColor=void 0,this.useLogDepth=!1,this.tilesetPassState=void 0,this.minimumTerrainHeight=0,this.pickingMetadata=!1,this.pickedMetadataInfo=void 0,this.edgeVisibilityRequested=!1}var G3=Cvt;var gc={OPAQUE_FRONT_FACE:0,OPAQUE_BACK_FACE:1,DEPTH_ONLY_FRONT_FACE:2,DEPTH_ONLY_BACK_FACE:3,DEPTH_ONLY_FRONT_AND_BACK_FACE:4,TRANSLUCENT_FRONT_FACE:5,TRANSLUCENT_BACK_FACE:6,TRANSLUCENT_FRONT_FACE_MANUAL_DEPTH_TEST:7,TRANSLUCENT_BACK_FACE_MANUAL_DEPTH_TEST:8,PICK_FRONT_FACE:9,PICK_BACK_FACE:10,DERIVED_COMMANDS_MAXIMUM_LENGTH:11},lT=gc.DERIVED_COMMANDS_MAXIMUM_LENGTH,tDe=["opaqueFrontFaceCommand","opaqueBackFaceCommand","depthOnlyFrontFaceCommand","depthOnlyBackFaceCommand","depthOnlyFrontAndBackFaceCommand","translucentFrontFaceCommand","translucentBackFaceCommand","translucentFrontFaceManualDepthTestCommand","translucentBackFaceManualDepthTestCommand","pickFrontFaceCommand","pickBackFaceCommand"];function uT(){this._frontFaceAlphaByDistance=new zt(0,1,0,1),this._backFaceAlphaByDistance=new zt(0,1,0,1),this._frontFaceTranslucent=!1,this._backFaceTranslucent=!1,this._requiresManualDepthTest=!1,this._sunVisibleThroughGlobe=!1,this._environmentVisible=!1,this._useDepthPlane=!1,this._numberOfTextureUniforms=0,this._globeTranslucencyFramebuffer=void 0,this._rectangle=oe.clone(oe.MAX_VALUE),this._derivedCommandKey=0,this._derivedCommandsDirty=!1,this._derivedCommandPacks=void 0,this._derivedCommandTypes=new Array(lT),this._derivedBlendCommandTypes=new Array(lT),this._derivedPickCommandTypes=new Array(lT),this._derivedCommandTypesToUpdate=new Array(lT),this._derivedCommandsLength=0,this._derivedBlendCommandsLength=0,this._derivedPickCommandsLength=0,this._derivedCommandsToUpdateLength=0}Object.defineProperties(uT.prototype,{frontFaceAlphaByDistance:{get:function(){return this._frontFaceAlphaByDistance}},backFaceAlphaByDistance:{get:function(){return this._backFaceAlphaByDistance}},translucent:{get:function(){return this._frontFaceTranslucent}},sunVisibleThroughGlobe:{get:function(){return this._sunVisibleThroughGlobe}},environmentVisible:{get:function(){return this._environmentVisible}},useDepthPlane:{get:function(){return this._useDepthPlane}},numberOfTextureUniforms:{get:function(){return this._numberOfTextureUniforms}},rectangle:{get:function(){return this._rectangle}}});uT.prototype.update=function(e){let t=e.globe;if(!l(t)||!t.show){this._frontFaceTranslucent=!1,this._backFaceTranslucent=!1,this._sunVisibleThroughGlobe=!0,this._environmentVisible=!0,this._useDepthPlane=!1;return}this._frontFaceAlphaByDistance=qIe(t.translucency.enabled,t.translucency.frontFaceAlpha,t.translucency.frontFaceAlphaByDistance,this._frontFaceAlphaByDistance),this._backFaceAlphaByDistance=qIe(t.translucency.enabled,t.translucency.backFaceAlpha,t.translucency.backFaceAlphaByDistance,this._backFaceAlphaByDistance),this._frontFaceTranslucent=YIe(t.translucency.enabled,this._frontFaceAlphaByDistance,t),this._backFaceTranslucent=YIe(t.translucency.enabled,this._backFaceAlphaByDistance,t),this._requiresManualDepthTest=Svt(this,e,t),this._sunVisibleThroughGlobe=Tvt(this,e),this._environmentVisible=Evt(this,e),this._useDepthPlane=vvt(this,e),this._numberOfTextureUniforms=wvt(this),this._rectangle=oe.clone(t.translucency.rectangle,this._rectangle),Ivt(this,e)};function qIe(e,t,n,i){return e?l(n)?(zt.clone(n,i),i.nearValue*=t,i.farValue*=t,i):(i.nearValue=t,i.farValue=t,i):(i.nearValue=1,i.farValue=1,i)}function YIe(e,t,n){return e&&(n.baseColor.alpha<1||t.nearValue<1||t.farValue<1)}function Tvt(e,t){let n=e._frontFaceTranslucent,i=e._backFaceTranslucent;return n&&(t.cameraUnderground||i)}function Evt(e,t){return!t.cameraUnderground||e._frontFaceTranslucent}function vvt(e,t){return!t.cameraUnderground&&!e._frontFaceTranslucent}function Svt(e,t,n){return e._frontFaceTranslucent&&!e._backFaceTranslucent&&!n.depthTestAgainstTerrain&&t.mode!==ie.SCENE2D&&t.context.depthTexture}function wvt(e){let t=0;return e._frontFaceTranslucent&&++t,e._requiresManualDepthTest&&++t,t}function Ivt(e,t){e._derivedCommandsLength=Pte(e,t,!1,!1,e._derivedCommandTypes),e._derivedBlendCommandsLength=Pte(e,t,!0,!1,e._derivedBlendCommandTypes),e._derivedPickCommandsLength=Pte(e,t,!1,!0,e._derivedPickCommandTypes);let n,i=0;for(n=0;n<e._derivedCommandsLength;++n)i|=1<<e._derivedCommandTypes[n];for(n=0;n<e._derivedBlendCommandsLength;++n)i|=1<<e._derivedBlendCommandTypes[n];for(n=0;n<e._derivedPickCommandsLength;++n)i|=1<<e._derivedPickCommandTypes[n];let o=0;for(n=0;n<lT;++n)(i&1<<n)>0&&(e._derivedCommandTypesToUpdate[o++]=n);e._derivedCommandsToUpdateLength=o;let r=i!==e._derivedCommandKey;e._derivedCommandKey=i,e._derivedCommandsDirty=r,!l(e._derivedCommandPacks)&&e._frontFaceTranslucent&&(e._derivedCommandPacks=Gvt())}function Pte(e,t,n,i,o){let r=0,a=e._frontFaceTranslucent,s=e._backFaceTranslucent;if(!a)return r;let c=t.cameraUnderground,u=e._requiresManualDepthTest,f=i?gc.PICK_FRONT_FACE:u?gc.TRANSLUCENT_FRONT_FACE_MANUAL_DEPTH_TEST:gc.TRANSLUCENT_FRONT_FACE,d=i?gc.PICK_BACK_FACE:u?gc.TRANSLUCENT_BACK_FACE_MANUAL_DEPTH_TEST:gc.TRANSLUCENT_BACK_FACE;return t.mode===ie.SCENE2D?(o[r++]=gc.DEPTH_ONLY_FRONT_FACE,o[r++]=f,r):(s?(n||(o[r++]=gc.DEPTH_ONLY_FRONT_AND_BACK_FACE),c?(o[r++]=f,o[r++]=d):(o[r++]=d,o[r++]=f)):c?(n||(o[r++]=gc.DEPTH_ONLY_BACK_FACE),o[r++]=gc.OPAQUE_FRONT_FACE,o[r++]=d):(n||(o[r++]=gc.DEPTH_ONLY_FRONT_FACE),o[r++]=gc.OPAQUE_BACK_FACE,o[r++]=f),r)}function dh(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function XIe(e,t){return e.indexOf(t)>-1}function Dvt(e,t){dh(e.defines,"TRANSLUCENT"),dh(t.defines,"TRANSLUCENT")}function Pvt(e,t){dh(e.defines,"GROUND_ATMOSPHERE"),dh(t.defines,"GROUND_ATMOSPHERE"),dh(e.defines,"FOG"),dh(t.defines,"FOG"),dh(e.defines,"TRANSLUCENT"),dh(t.defines,"TRANSLUCENT")}function Rte(e,t){if(XIe(t.defines,"TILE_LIMIT_RECTANGLE")||XIe(t.defines,"ENABLE_CLIPPING_PLANES"))return;let n=`void main()
- {
- out_FragColor = vec4(1.0);
- }
- `;t.sources=[n]}function Ote(e,t){let n=t.sources,i=n.length;for(let r=0;r<i;++r)n[r]=He.replaceMain(n[r],"czm_globe_translucency_main");n.push(`
-
- uniform sampler2D u_classificationTexture;
- void main()
- {
- vec2 st = gl_FragCoord.xy / czm_viewport.zw;
- #ifdef MANUAL_DEPTH_TEST
- float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, st));
- if (logDepthOrDepth != 0.0)
- {
- vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);
- float depthEC = eyeCoordinate.z / eyeCoordinate.w;
- if (v_positionEC.z < depthEC)
- {
- discard;
- }
- }
- #endif
- czm_globe_translucency_main();
- vec4 classificationColor = texture(u_classificationTexture, st);
- if (classificationColor.a > 0.0)
- {
- // Reverse premultiplication process to get the correct composited result of the classification primitives
- classificationColor.rgb /= classificationColor.a;
- }
- out_FragColor = classificationColor * vec4(classificationColor.aaa, 1.0) + out_FragColor * (1.0 - classificationColor.a);
- }
- `)}function nDe(e,t){Ote(e,t),dh(e.defines,"GROUND_ATMOSPHERE"),dh(t.defines,"GROUND_ATMOSPHERE"),dh(e.defines,"FOG"),dh(t.defines,"FOG")}function Rvt(e,t){Ote(e,t),e.defines.push("GENERATE_POSITION"),t.defines.push("MANUAL_DEPTH_TEST")}function Ovt(e,t){nDe(e,t),e.defines.push("GENERATE_POSITION"),t.defines.push("MANUAL_DEPTH_TEST")}function KIe(e,t){let n=`uniform sampler2D u_classificationTexture;
- void main()
- {
- vec2 st = gl_FragCoord.xy / czm_viewport.zw;
- vec4 pickColor = texture(u_classificationTexture, st);
- if (pickColor == vec4(0.0))
- {
- discard;
- }
- out_FragColor = pickColor;
- }
- `;t.sources=[n]}function Mvt(e,t,n,i,o,r){if(!l(o))return t;if(!i&&l(n))return n;let a=e.shaderCache.getDerivedShaderProgram(t,r);if(!l(a)){let s=t._attributeLocations,c=t.vertexShaderSource.clone(),u=t.fragmentShaderSource.clone();c.defines=l(c.defines)?c.defines.slice(0):[],u.defines=l(u.defines)?u.defines.slice(0):[],o(c,u),a=e.shaderCache.createDerivedShaderProgram(t,r,{vertexShaderSource:c,fragmentShaderSource:u,attributeLocations:s})}return a}function Bvt(e){e.cull.face=Mi.BACK,e.cull.enabled=!0}function Lvt(e){e.cull.face=Mi.FRONT,e.cull.enabled=!0}function Nvt(e){e.cull.face=Mi.BACK,e.cull.enabled=!0,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function Fvt(e){e.cull.face=Mi.FRONT,e.cull.enabled=!0,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function kvt(e){e.cull.enabled=!1,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function QIe(e){e.cull.face=Mi.BACK,e.cull.enabled=!0,e.depthMask=!1,e.blending=Jt.ALPHA_BLEND}function $Ie(e){e.cull.face=Mi.FRONT,e.cull.enabled=!0,e.depthMask=!1,e.blending=Jt.ALPHA_BLEND}function zvt(e){e.cull.face=Mi.BACK,e.cull.enabled=!0,e.blending.enabled=!1}function Uvt(e){e.cull.face=Mi.FRONT,e.cull.enabled=!0,e.blending.enabled=!1}function Vvt(e,t,n,i,o){if(!l(i))return e;if(!n&&l(t))return t;let r=o[e.id];if(!l(r)){let a=Ve.getState(e);i(a),r=Ve.fromCache(a),o[e.id]=r}return r}function rI(e){return{u_classificationTexture:function(){return e._globeTranslucencyFramebuffer.classificationTexture}}}function jvt(e,t,n,i,o){return l(o)?!i&&l(n)?n:wt(t,o(e),!1):t}function Gm(e){this.pass=e.pass,this.pickOnly=e.pickOnly,this.getShaderProgramFunction=e.getShaderProgramFunction,this.getRenderStateFunction=e.getRenderStateFunction,this.getUniformMapFunction=e.getUniformMapFunction,this.renderStateCache={}}function Gvt(){return[new Gm({pass:Ie.GLOBE,pickOnly:!1,getShaderProgramFunction:Dvt,getRenderStateFunction:Bvt,getUniformMapFunction:void 0}),new Gm({pass:Ie.GLOBE,pickOnly:!1,getShaderProgramFunction:Pvt,getRenderStateFunction:Lvt,getUniformMapFunction:void 0}),new Gm({pass:Ie.GLOBE,pickOnly:!1,getShaderProgramFunction:Rte,getRenderStateFunction:Nvt,getUniformMapFunction:void 0}),new Gm({pass:Ie.GLOBE,pickOnly:!1,getShaderProgramFunction:Rte,getRenderStateFunction:Fvt,getUniformMapFunction:void 0}),new Gm({pass:Ie.GLOBE,pickOnly:!1,getShaderProgramFunction:Rte,getRenderStateFunction:kvt,getUniformMapFunction:void 0}),new Gm({pass:Ie.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:Ote,getRenderStateFunction:QIe,getUniformMapFunction:rI}),new Gm({pass:Ie.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:nDe,getRenderStateFunction:$Ie,getUniformMapFunction:rI}),new Gm({pass:Ie.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:Rvt,getRenderStateFunction:QIe,getUniformMapFunction:rI}),new Gm({pass:Ie.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:Ovt,getRenderStateFunction:$Ie,getUniformMapFunction:rI}),new Gm({pass:Ie.TRANSLUCENT,pickOnly:!0,getShaderProgramFunction:KIe,getRenderStateFunction:zvt,getUniformMapFunction:rI}),new Gm({pass:Ie.TRANSLUCENT,pickOnly:!0,getShaderProgramFunction:KIe,getRenderStateFunction:Uvt,getUniformMapFunction:rI})]}var JIe=new Array(lT),ZIe=new Array(lT);uT.prototype.updateDerivedCommands=function(e,t){let n=this._derivedCommandTypesToUpdate,i=this._derivedCommandsToUpdateLength;if(i!==0){for(let o=0;o<i;++o)ZIe[o]=this._derivedCommandPacks[n[o]],JIe[o]=tDe[n[o]];Hvt(this,e,i,n,JIe,ZIe,t)}};function Hvt(e,t,n,i,o,r,a){let s=t.derivedCommands.globeTranslucency,c=e._derivedCommandsDirty;if(t.dirty||!l(s)||c){t.dirty=!1,l(s)||(s={},t.derivedCommands.globeTranslucency=s);let u=a.frameNumber,f=s.uniformMapDirtyFrame??0,d=s.shaderProgramDirtyFrame??0,p=s.renderStateDirtyFrame??0,g=s.uniformMap!==t.uniformMap,m=s.shaderProgramId!==t.shaderProgram.id,A=s.renderStateId!==t.renderState.id;g&&(s.uniformMapDirtyFrame=u),m&&(s.shaderProgramDirtyFrame=u),A&&(s.renderStateDirtyFrame=u),s.uniformMap=t.uniformMap,s.shaderProgramId=t.shaderProgram.id,s.renderStateId=t.renderState.id;for(let y=0;y<n;++y){let x=r[y],b=i[y],C=o[y],E=s[C],S,w,P;l(E)?(S=E.uniformMap,w=E.shaderProgram,P=E.renderState):(S=void 0,w=void 0,P=void 0),E=tt.shallowClone(t,E),s[C]=E;let R=E.derivedCommands.uniformMapDirtyFrame??0,B=E.derivedCommands.shaderProgramDirtyFrame??0,L=E.derivedCommands.renderStateDirtyFrame??0,_=g||R<f,T=m||B<d,v=A||L<p;_&&(E.derivedCommands.uniformMapDirtyFrame=u),T&&(E.derivedCommands.shaderProgramDirtyFrame=u),v&&(E.derivedCommands.renderStateDirtyFrame=u),E.derivedCommands.type=b,E.pass=x.pass,E.pickOnly=x.pickOnly,E.uniformMap=jvt(e,t.uniformMap,S,_,x.getUniformMapFunction),E.shaderProgram=Mvt(a.context,t.shaderProgram,w,T,x.getShaderProgramFunction,C),E.renderState=Vvt(t.renderState,P,v,x.getRenderStateFunction,x.renderStateCache)}}}uT.prototype.pushDerivedCommands=function(e,t,n){let i=n.passes.pick||n.passes.pickVoxel;if(i&&t)return;let o=this._derivedCommandTypes,r=this._derivedCommandsLength;if(i?(o=this._derivedPickCommandTypes,r=this._derivedPickCommandsLength):t&&(o=this._derivedBlendCommandTypes,r=this._derivedBlendCommandsLength),r===0){n.commandList.push(e);return}let a=e.derivedCommands.globeTranslucency;for(let s=0;s<r;++s){let c=tDe[o[s]];n.commandList.push(a[c])}};function iDe(e,t,n,i,o,r){for(let a=0;a<t;++a){let s=e[a],c=s.derivedCommands.type;(!l(r)||r.indexOf(c)>-1)&&n(s,i,o)}}function eDe(e,t,n,i,o){for(let r=0;r<t;++r)n(e[r],i,o)}var Wvt=[gc.OPAQUE_FRONT_FACE,gc.OPAQUE_BACK_FACE],qvt=[gc.DEPTH_ONLY_FRONT_FACE,gc.DEPTH_ONLY_BACK_FACE,gc.DEPTH_ONLY_FRONT_AND_BACK_FACE];uT.prototype.executeGlobeCommands=function(e,t,n,i,o){let r=i.context,a=e.commands[Ie.GLOBE],s=e.indices[Ie.GLOBE];s!==0&&(this._globeTranslucencyFramebuffer=n,n.clearClassification(r,o),iDe(a,s,t,i,o,Wvt))};uT.prototype.executeGlobeClassificationCommands=function(e,t,n,i,o){let{context:r}=i,{uniformState:a}=r,s=e.commands[Ie.GLOBE],c=e.indices[Ie.GLOBE],u=e.commands[Ie.TERRAIN_CLASSIFICATION],f=e.indices[Ie.TERRAIN_CLASSIFICATION];if(c===0||f===0)return;let d=this._frontFaceTranslucent,p=this._backFaceTranslucent;if((!d||!p)&&eDe(u,f,t,i,o),!d&&!p)return;this._globeTranslucencyFramebuffer=n;let g=a.globeDepthTexture,m=o.framebuffer;if(o.framebuffer=n.classificationFramebuffer,iDe(s,c,t,i,o,qvt),r.depthTexture){let A=n.packDepth(r,o);a.globeDepthTexture=A}eDe(u,f,t,i,o),a.globeDepthTexture=g,o.framebuffer=m};var H3=uT;var Ju=`uniform sampler2D colorTexture;
-
- in vec2 v_textureCoordinates;
-
- void main()
- {
- out_FragColor = texture(colorTexture, v_textureCoordinates);
- }
- `;function f0(){this._numSamples=1,this.previousFramebuffer=void 0,this._previousFramebuffer=void 0,this._depthStencilTexture=void 0,this._depthStencilRenderbuffer=void 0,this._fbo=new yi({depthStencil:!0,createDepthAttachments:!1}),this._fboClassified=new yi({depthStencil:!0,createDepthAttachments:!1}),this._rsUnclassified=void 0,this._rsClassified=void 0,this._unclassifiedCommand=void 0,this._classifiedCommand=void 0,this._translucentCommand=void 0,this._clearColorCommand=new ai({color:new V(0,0,0,0),owner:this}),this._clearCommand=new ai({color:new V(0,0,0,0),depth:1,stencil:0});let e=this;this._uniformMap={colorTexture:function(){return e._fbo.getColorTexture()},depthTexture:function(){return e._depthStencilTexture},classifiedTexture:function(){return e._fboClassified.getColorTexture()}}}Object.defineProperties(f0.prototype,{unclassifiedCommand:{get:function(){return this._unclassifiedCommand}}});f0.isTranslucencySupported=function(e){return e.depthTexture&&e.fragmentDepth};var Yvt={depthMask:!1,stencilTest:{enabled:!0,frontFunction:qn.EQUAL,frontOperation:{fail:vt.KEEP,zFail:vt.KEEP,zPass:vt.KEEP},backFunction:qn.NEVER,reference:0,mask:Gt.CLASSIFICATION_MASK},blending:Jt.ALPHA_BLEND},Xvt={depthMask:!1,stencilTest:{enabled:!0,frontFunction:qn.NOT_EQUAL,frontOperation:{fail:vt.KEEP,zFail:vt.KEEP,zPass:vt.KEEP},backFunction:qn.NEVER,reference:0,mask:Gt.CLASSIFICATION_MASK},blending:Jt.ALPHA_BLEND},Kvt={depthMask:!0,depthTest:{enabled:!0},stencilTest:Gt.setCesium3DTileBit(),stencilMask:Gt.CESIUM_3D_TILE_MASK,blending:Jt.ALPHA_BLEND},Qvt=`uniform sampler2D colorTexture;
- uniform sampler2D depthTexture;
- uniform sampler2D classifiedTexture;
- in vec2 v_textureCoordinates;
- void main()
- {
- vec4 color = texture(colorTexture, v_textureCoordinates);
- if (color.a == 0.0)
- {
- discard;
- }
- bool isClassified = all(equal(texture(classifiedTexture, v_textureCoordinates), vec4(0.0)));
- #ifdef UNCLASSIFIED
- vec4 highlightColor = czm_invertClassificationColor;
- if (isClassified)
- {
- discard;
- }
- #else
- vec4 highlightColor = vec4(1.0);
- if (!isClassified)
- {
- discard;
- }
- #endif
- out_FragColor = color * highlightColor;
- gl_FragDepth = texture(depthTexture, v_textureCoordinates).r;
- }
- `,$vt=`uniform sampler2D colorTexture;
- in vec2 v_textureCoordinates;
- void main()
- {
- vec4 color = texture(colorTexture, v_textureCoordinates);
- if (color.a == 0.0)
- {
- discard;
- }
- #ifdef UNCLASSIFIED
- out_FragColor = color * czm_invertClassificationColor;
- #else
- out_FragColor = color;
- #endif
- }
- `;f0.prototype.update=function(e,t,n){let i=this._fbo.getColorTexture(),o=this.previousFramebuffer!==this._previousFramebuffer;this._previousFramebuffer=this.previousFramebuffer;let r=this._numSamples!==t,a=e.drawingBufferWidth,s=e.drawingBufferHeight,c=!l(i)||i.width!==a||i.height!==s;if((c||o||r)&&(this._numSamples=t,this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._depthStencilRenderbuffer=this._depthStencilRenderbuffer&&this._depthStencilRenderbuffer.destroy(),l(this._previousFramebuffer)||(this._depthStencilTexture=new It({context:e,width:a,height:s,pixelFormat:Xe.DEPTH_STENCIL,pixelDatatype:je.UNSIGNED_INT_24_8}),t>1&&(this._depthStencilRenderbuffer=new mf({context:e,width:a,height:s,format:Ml.DEPTH24_STENCIL8,numSamples:t})))),!l(this._fbo.framebuffer)||c||o||r){this._fbo.destroy(),this._fboClassified.destroy();let u,f;l(this._previousFramebuffer)?(u=n.getDepthStencilTexture(),f=n.getDepthStencilRenderbuffer()):(u=this._depthStencilTexture,f=this._depthStencilRenderbuffer),this._fbo.setDepthStencilTexture(u),l(f)&&this._fbo.setDepthStencilRenderbuffer(f),this._fbo.update(e,a,s,t),l(this._previousFramebuffer)||(this._fboClassified.setDepthStencilTexture(u),this._fboClassified.update(e,a,s))}if(l(this._rsUnclassified)||(this._rsUnclassified=Ve.fromCache(Yvt),this._rsClassified=Ve.fromCache(Xvt),this._rsDefault=Ve.fromCache(Kvt)),!l(this._unclassifiedCommand)||o||r){l(this._unclassifiedCommand)&&(this._unclassifiedCommand.shaderProgram=this._unclassifiedCommand.shaderProgram&&this._unclassifiedCommand.shaderProgram.destroy(),this._classifiedCommand.shaderProgram=this._classifiedCommand.shaderProgram&&this._classifiedCommand.shaderProgram.destroy());let u=l(this._previousFramebuffer)?$vt:Qvt,f=new He({defines:["UNCLASSIFIED"],sources:[u]}),d=new He({sources:[u]});this._unclassifiedCommand=e.createViewportQuadCommand(f,{renderState:l(this._previousFramebuffer)?this._rsUnclassified:this._rsDefault,uniformMap:this._uniformMap,owner:this}),this._classifiedCommand=e.createViewportQuadCommand(d,{renderState:l(this._previousFramebuffer)?this._rsClassified:this._rsDefault,uniformMap:this._uniformMap,owner:this}),l(this._translucentCommand)&&(this._translucentCommand.shaderProgram=this._translucentCommand.shaderProgram&&this._translucentCommand.shaderProgram.destroy()),l(this._previousFramebuffer)||(this._translucentCommand=e.createViewportQuadCommand(Ju,{renderState:this._rsUnclassified,uniformMap:this._uniformMap,owner:this}))}};f0.prototype.prepareTextures=function(e,t){this._fbo._numSamples>1&&this._fbo.prepareTextures(e,t)};f0.prototype.clear=function(e,t){l(this._previousFramebuffer)?this._fbo.clear(e,this._clearColorCommand,t):(this._fbo.clear(e,this._clearCommand,t),this._fboClassified.clear(e,this._clearCommand,t))};f0.prototype.executeClassified=function(e,t){if(!l(this._previousFramebuffer)){let n=t.framebuffer;this.prepareTextures(e,!0),t.framebuffer=this._fboClassified.framebuffer,this._translucentCommand.execute(e,t),t.framebuffer=n}this._classifiedCommand.execute(e,t)};f0.prototype.executeUnclassified=function(e,t){this._unclassifiedCommand.execute(e,t)};f0.prototype.isDestroyed=function(){return!1};f0.prototype.destroy=function(){return this._fbo.destroy(),this._fboClassified.destroy(),this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._depthStencilRenderbuffer=this._depthStencilRenderbuffer&&this._depthStencilRenderbuffer.destroy(),l(this._unclassifiedCommand)&&(this._unclassifiedCommand.shaderProgram=this._unclassifiedCommand.shaderProgram&&this._unclassifiedCommand.shaderProgram.destroy(),this._classifiedCommand.shaderProgram=this._classifiedCommand.shaderProgram&&this._classifiedCommand.shaderProgram.destroy()),fe(this)};var aI=f0;function g5(e){this._total=e,this.usedThisFrame=0,this.stolenFromMeThisFrame=0,this.starvedThisFrame=!1,this.starvedLastFrame=!1}Object.defineProperties(g5.prototype,{total:{get:function(){return this._total}}});function Uy(e){let t=new Array(Pc.NUMBER_OF_JOB_TYPES);t[Pc.TEXTURE]=new g5(l(e)?e[Pc.TEXTURE]:10),t[Pc.PROGRAM]=new g5(l(e)?e[Pc.PROGRAM]:10),t[Pc.BUFFER]=new g5(l(e)?e[Pc.BUFFER]:30);let n=t.length,i,o=0;for(i=0;i<n;++i)o+=t[i].total;let r=new Array(n);for(i=0;i<n;++i)r[i]=!1;this._totalBudget=o,this._totalUsedThisFrame=0,this._budgets=t,this._executedThisFrame=r}Uy.getTimestamp=Fi;Object.defineProperties(Uy.prototype,{totalBudget:{get:function(){return this._totalBudget}}});Uy.prototype.disableThisFrame=function(){this._totalUsedThisFrame=this._totalBudget};Uy.prototype.resetBudgets=function(){let e=this._budgets,t=e.length;for(let n=0;n<t;++n){let i=e[n];i.starvedLastFrame=i.starvedThisFrame,i.starvedThisFrame=!1,i.usedThisFrame=0,i.stolenFromMeThisFrame=0}this._totalUsedThisFrame=0};Uy.prototype.execute=function(e,t){let n=this._budgets,i=n[t],o=this._executedThisFrame[t];if(this._totalUsedThisFrame>=this._totalBudget&&o)return i.starvedThisFrame=!0,!1;let r;if(i.usedThisFrame+i.stolenFromMeThisFrame>=i.total){let c=n.length,u;for(u=0;u<c&&(r=n[u],!(r.usedThisFrame+r.stolenFromMeThisFrame<r.total&&!r.starvedLastFrame));++u);if(u===c&&o)return!1;o&&(i.starvedThisFrame=!0)}let a=Uy.getTimestamp();e.execute();let s=Uy.getTimestamp()-a;return this._totalUsedThisFrame+=s,r?r.stolenFromMeThisFrame+=s:i.usedThisFrame+=s,this._executedThisFrame[t]=!0,!0};var W3=Uy;function _5(e){e=e??G.EMPTY_OBJECT;let t=On(e.container);this._container=t;let n=document.createElement("div");n.className="cesium-performanceDisplay";let i=document.createElement("div");i.className="cesium-performanceDisplay-fps",this._fpsText=document.createTextNode(""),i.appendChild(this._fpsText);let o=document.createElement("div");o.className="cesium-performanceDisplay-ms",this._msText=document.createTextNode(""),o.appendChild(this._msText),n.appendChild(o),n.appendChild(i),this._container.appendChild(n),this._lastFpsSampleTime=Fi(),this._lastMsSampleTime=Fi(),this._fpsFrameCount=0,this._msFrameCount=0,this._throttled=!1;let r=document.createElement("div");r.className="cesium-performanceDisplay-throttled",this._throttledText=document.createTextNode(""),r.appendChild(this._throttledText),n.appendChild(r)}Object.defineProperties(_5.prototype,{throttled:{get:function(){return this._throttled},set:function(e){this._throttled!==e&&(e?this._throttledText.nodeValue="(throttled)":this._throttledText.nodeValue="",this._throttled=e)}}});_5.prototype.update=function(e){let t=Fi(),n=e??!0;this._fpsFrameCount++;let i=t-this._lastFpsSampleTime;if(i>1e3){let r="N/A";n&&(r=this._fpsFrameCount*1e3/i|0),this._fpsText.nodeValue=`${r} FPS`,this._lastFpsSampleTime=t,this._fpsFrameCount=0}this._msFrameCount++;let o=t-this._lastMsSampleTime;if(o>200){let r="N/A";n&&(r=(o/this._msFrameCount).toFixed(2)),this._msText.nodeValue=`${r} MS`,this._lastMsSampleTime=t,this._msFrameCount=0}};_5.prototype.destroy=function(){return fe(this)};var C_=_5;var _c={};_c.decodeRawMetadataValue=function(e,t,n){switch(e){case Dt.INT8:return t.getInt8(n);case Dt.UINT8:return t.getUint8(n);case Dt.INT16:return t.getInt16(n,!0);case Dt.UINT16:return t.getUint16(n,!0);case Dt.INT32:return t.getInt32(n,!0);case Dt.UINT32:return t.getUint32(n,!0);case Dt.INT64:return t.getBigInt64(n,!0);case Dt.UINT64:return t.getBigUint64(n,!0);case Dt.FLOAT32:return t.getFloat32(n,!0);case Dt.FLOAT64:return t.getFloat64(n,!0)}throw new re(`Invalid component type: ${e}`)};_c.decodeRawMetadataValueComponent=function(e,t,n){let i=e.componentType,o=_c.decodeRawMetadataValue(i,t,n);return e.normalized?Dt.normalize(o,i):o};_c.decodeRawMetadataValueElement=function(e,t,n){let i=e.componentType,o=Dt.getSizeInBytes(i),r=e.type,a=dt.getComponentCount(r),s=o*a;if(a>1){let f=Array(a);for(let d=0;d<a;d++){let p=n*s+d*o,g=_c.decodeRawMetadataValueComponent(e,t,p);f[d]=g}return f}let c=n*s;return _c.decodeRawMetadataValueComponent(e,t,c)};_c.decodeRawMetadataValues=function(e,t){let n=new DataView(t.buffer,t.byteOffset,t.byteLength);if(e.isArray){let o=e.arrayLength,r=Array(o);for(let a=0;a<o;a++){let s=_c.decodeRawMetadataValueElement(e,n,a);r[a]=s}return r}return _c.decodeRawMetadataValueElement(e,n,0)};_c.convertToObjectType=function(e,t){if(!l(t)||e===dt.SCALAR||e===dt.STRING||e===dt.BOOLEAN||e===dt.ENUM)return t;let n=t.map(i=>Number(i));switch(e){case dt.VEC2:return z.unpack(n,0,new z);case dt.VEC3:return h.unpack(n,0,new h);case dt.VEC4:return se.unpack(n,0,new se);case dt.MAT2:return Gi.unpack(n,0,new Gi);case dt.MAT3:return $.unpack(n,0,new $);case dt.MAT4:return M.unpack(n,0,new M)}throw new re(`Invalid metadata object type: ${e}`)};_c.convertFromObjectType=function(e,t){if(!l(t)||e===dt.SCALAR||e===dt.STRING||e===dt.BOOLEAN||e===dt.ENUM)return t;switch(e){case dt.VEC2:return z.pack(t,Array(2));case dt.VEC3:return h.pack(t,Array(3));case dt.VEC4:return se.pack(t,Array(4));case dt.MAT2:return Gi.pack(t,Array(4));case dt.MAT3:return $.pack(t,Array(9));case dt.MAT4:return M.pack(t,Array(16))}throw new re(`Invalid metadata object type: ${e}`)};_c.decodeMetadataValues=function(e,t,n){let i=_c.decodeRawMetadataValues(e,n);if(t.hasValueTransform){let r=_c.convertFromObjectType(e.type,t.offset),a=_c.convertFromObjectType(e.type,t.scale);i=yp.valueTransformInPlace(i,r,a,Dt.applyValueTransform)}if(e.isArray){let r=e.arrayLength,a=Array(r);for(let s=0;s<r;s++){let c=i[s],u=_c.convertToObjectType(e.type,c);a[s]=u}return a}return _c.convertToObjectType(e.type,i)};var q3=Object.freeze(_c);function fT(){this._framebuffer=new yi,this._textureToCopy=void 0,this._copyDepthCommand=void 0}Object.defineProperties(fT.prototype,{framebuffer:{get:function(){return this._framebuffer.framebuffer}}});function Jvt(e,t,n){let{width:i,height:o}=n;e._framebuffer.update(t,i,o)}function Zvt(e,t,n){l(e._copyDepthCommand)||(e._copyDepthCommand=t.createViewportQuadCommand(`uniform highp sampler2D colorTexture;
-
- in vec2 v_textureCoordinates;
-
- void main()
- {
- vec4 globeDepthPacked = texture(czm_globeDepthTexture, v_textureCoordinates);
- float globeDepth = czm_unpackDepth(globeDepthPacked);
- float depth = texture(colorTexture, v_textureCoordinates).r;
- out_FragColor = czm_branchFreeTernary(globeDepth <= 0.0 || globeDepth >= 1.0 || depth < globeDepth && depth > 0.0 && depth < 1.0,
- czm_packDepth(depth), globeDepthPacked);
- }
- `,{renderState:Ve.fromCache(),uniformMap:{colorTexture:function(){return e._textureToCopy}},owner:e})),e._textureToCopy=n,e._copyDepthCommand.framebuffer=e.framebuffer}fT.prototype.update=function(e,t){Jvt(this,e,t),Zvt(this,e,t)};var eSt=new se,tSt=new se(1,1/255,1/65025,1/16581375);fT.prototype.getDepth=function(e,t,n){if(!l(this.framebuffer))return;let i=e.readPixels({x:t,y:n,width:1,height:1,framebuffer:this.framebuffer}),o=se.unpack(i,0,eSt);return se.divideByScalar(o,255,o),se.dot(o,tSt)};fT.prototype.executeCopyDepth=function(e,t){this._copyDepthCommand.execute(e,t)};fT.prototype.isDestroyed=function(){return!1};fT.prototype.destroy=function(){return this._framebuffer.destroy(),l(this._copyDepthCommand)&&(this._copyDepthCommand.shaderProgram=l(this._copyDepthCommand.shaderProgram)&&this._copyDepthCommand.shaderProgram.destroy()),fe(this)};var Y3=fT;function Vy(e){e=e||{},this._framebufferManager=new yi({colorAttachmentsLength:3,createColorAttachments:!0,depthStencil:!0,supportsDepthTexture:!0,color:!0}),this._framebuffer=void 0,this._colorTexture=void 0,this._idTexture=void 0,this._depthTexture=void 0,this._depthStencilTexture=void 0,this._clearCommand=new ai({color:new V(0,0,0,0),depth:1,stencil:0,owner:this})}Object.defineProperties(Vy.prototype,{framebuffer:{get:function(){return this._framebuffer}},colorTexture:{get:function(){return this._colorTexture}},idTexture:{get:function(){return this._idTexture}},depthTexture:{get:function(){return this._depthTexture}},depthStencilTexture:{get:function(){return this._depthStencilTexture}}});Vy.prototype.update=function(e,t,n,i,o){let r=t.width,a=t.height,s=n?e.halfFloatingPointTexture?je.HALF_FLOAT:je.FLOAT:je.UNSIGNED_BYTE,c=this._framebufferManager.update(e,r,a,1,s,Xe.RGBA);return this._framebufferManager.framebuffer&&(this._framebuffer=this._framebufferManager.framebuffer,this._colorTexture=l(i)?i:this._framebufferManager.getColorTexture(0),this._idTexture=this._framebufferManager.getColorTexture(1),this._depthTexture=this._framebufferManager.getColorTexture(2),this._depthStencilTexture=l(o)?o:this._framebufferManager.getDepthStencilTexture()),c};Vy.prototype.clear=function(e,t,n){this.getClearCommand(n).execute(e,t)};Vy.prototype.getClearCommand=function(e){return this._clearCommand.framebuffer=this._framebuffer,l(e)&&V.clone(e,this._clearCommand.color),this._clearCommand};Vy.prototype.getFramebuffer=function(e,t,n,i){return this.update(e,t,!1,n,i),this._framebuffer};Vy.prototype.isDestroyed=function(){return!1};Vy.prototype.destroy=function(){return this._framebufferManager=this._framebufferManager&&this._framebufferManager.destroy(),this._clearCommand=void 0,fe(this)};var X3=Vy;function nSt(e,t){this.near=e??0,this.far=t??0;let n=Ie.NUMBER_OF_PASSES,i=new Array(n),o=new Array(n);for(let r=0;r<n;++r)i[r]=[],o[r]=0;this.commands=i,this.indices=o}var K3=nSt;var jy=`uniform highp sampler2D u_depthTexture;
-
- in vec2 v_textureCoordinates;
-
- void main()
- {
- out_FragColor = czm_packDepth(texture(u_depthTexture, v_textureCoordinates).r);
- }
- `;function d0(){this._picking=!1,this._numSamples=1,this._tempCopyDepthTexture=void 0,this._pickColorFramebuffer=new yi({depthStencil:!0,supportsDepthTexture:!0}),this._outputFramebuffer=new yi({depthStencil:!0,supportsDepthTexture:!0}),this._copyDepthFramebuffer=new yi,this._tempCopyDepthFramebuffer=new yi,this._updateDepthFramebuffer=new yi({createColorAttachments:!1,createDepthAttachments:!1,depthStencil:!0}),this._clearGlobeColorCommand=void 0,this._copyColorCommand=void 0,this._copyDepthCommand=void 0,this._tempCopyDepthCommand=void 0,this._updateDepthCommand=void 0,this._viewport=new Je,this._rs=void 0,this._rsBlend=void 0,this._rsUpdate=void 0,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHdr=void 0,this._clearGlobeDepth=void 0}Object.defineProperties(d0.prototype,{colorFramebufferManager:{get:function(){return this._picking?this._pickColorFramebuffer:this._outputFramebuffer}},framebuffer:{get:function(){return this.colorFramebufferManager.framebuffer}},depthStencilTexture:{get:function(){return this.colorFramebufferManager.getDepthStencilTexture()}},picking:{get:function(){return this._picking},set:function(e){this._picking=e}}});function oDe(e,t,n,i,o){let r=e._viewport;r.width=n,r.height=i;let a=!Je.equals(r,o.viewport),s=a!==e._useScissorTest;e._useScissorTest=a,Je.equals(e._scissorRectangle,o.viewport)||(e._scissorRectangle=Je.clone(o.viewport,e._scissorRectangle),s=!0),(!l(e._rs)||!Je.equals(r,e._rs.viewport)||s)&&(e._rs=Ve.fromCache({viewport:r,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}}),e._rsBlend=Ve.fromCache({viewport:r,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},blending:Jt.ALPHA_BLEND}),e._rsUpdate=Ve.fromCache({viewport:r,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},stencilTest:{enabled:!0,frontFunction:qn.EQUAL,frontOperation:{fail:vt.KEEP,zFail:vt.KEEP,zPass:vt.KEEP},backFunction:qn.NEVER,reference:Gt.CESIUM_3D_TILE_MASK,mask:Gt.CESIUM_3D_TILE_MASK}})),l(e._copyDepthCommand)||(e._copyDepthCommand=t.createViewportQuadCommand(jy,{uniformMap:{u_depthTexture:function(){return e.colorFramebufferManager.getDepthStencilTexture()}},owner:e})),e._copyDepthCommand.framebuffer=e._copyDepthFramebuffer.framebuffer,e._copyDepthCommand.renderState=e._rs,l(e._copyColorCommand)||(e._copyColorCommand=t.createViewportQuadCommand(Ju,{uniformMap:{colorTexture:function(){return e.colorFramebufferManager.getColorTexture()}},owner:e})),e._copyColorCommand.renderState=e._rs,l(e._tempCopyDepthCommand)||(e._tempCopyDepthCommand=t.createViewportQuadCommand(jy,{uniformMap:{u_depthTexture:function(){return e._tempCopyDepthTexture}},owner:e})),e._tempCopyDepthCommand.framebuffer=e._tempCopyDepthFramebuffer.framebuffer,e._tempCopyDepthCommand.renderState=e._rs,l(e._updateDepthCommand)||(e._updateDepthCommand=t.createViewportQuadCommand(Ju,{uniformMap:{colorTexture:function(){return e._tempCopyDepthFramebuffer.getColorTexture()}},owner:e})),e._updateDepthCommand.framebuffer=e._updateDepthFramebuffer.framebuffer,e._updateDepthCommand.renderState=e._rsUpdate,l(e._clearGlobeColorCommand)||(e._clearGlobeColorCommand=new ai({color:new V(0,0,0,0),stencil:0,owner:e})),e._clearGlobeColorCommand.framebuffer=e.framebuffer}d0.prototype.update=function(e,t,n,i,o,r){let{width:a,height:s}=n,c=o?e.halfFloatingPointTexture?je.HALF_FLOAT:je.FLOAT:je.UNSIGNED_BYTE;this._numSamples=i,this.picking?this._pickColorFramebuffer.update(e,a,s):this._outputFramebuffer.update(e,a,s,i,c),this._copyDepthFramebuffer.update(e,a,s),oDe(this,e,a,s,t),e.uniformState.globeDepthTexture=void 0,this._clearGlobeDepth=r};d0.prototype.prepareColorTextures=function(e,t){!this.picking&&this._numSamples>1&&this._outputFramebuffer.prepareTextures(e,t)};d0.prototype.executeCopyDepth=function(e,t){l(this._copyDepthCommand)&&(this.prepareColorTextures(e),this._copyDepthCommand.execute(e,t),e.uniformState.globeDepthTexture=this._copyDepthFramebuffer.getColorTexture())};d0.prototype.executeUpdateDepth=function(e,t,n){let i=l(n)?n:t.framebuffer.depthStencilTexture;if(!this._clearGlobeDepth&&i===this.colorFramebufferManager.getDepthStencilTexture()){l(this._copyDepthCommand)&&this._copyDepthCommand.execute(e,t);return}if(!l(this._updateDepthCommand))return;let o=this._updateDepthFramebuffer;if(!l(o.framebuffer)||o.getDepthStencilTexture()!==i||o.getColorTexture()!==this._copyDepthFramebuffer.getColorTexture()){let r=this._copyDepthFramebuffer.getColorTexture(),{width:a,height:s}=r;this._tempCopyDepthFramebuffer.destroy(),this._tempCopyDepthFramebuffer.update(e,a,s),o.setColorTexture(r,0),o.setDepthStencilTexture(i),o.update(e,a,s),oDe(this,e,a,s,t)}this._tempCopyDepthTexture=i,this._tempCopyDepthCommand.execute(e,t),this._updateDepthCommand.execute(e,t)};d0.prototype.executeCopyColor=function(e,t){l(this._copyColorCommand)&&this._copyColorCommand.execute(e,t)};d0.prototype.clear=function(e,t,n){let i=this._clearGlobeColorCommand;l(i)&&(V.clone(n,i.color),this.colorFramebufferManager.clear(e,i,t))};d0.prototype.isDestroyed=function(){return!1};d0.prototype.destroy=function(){return this._pickColorFramebuffer.destroy(),this._outputFramebuffer.destroy(),this._copyDepthFramebuffer.destroy(),this._tempCopyDepthFramebuffer.destroy(),this._updateDepthFramebuffer.destroy(),l(this._copyColorCommand)&&(this._copyColorCommand.shaderProgram=this._copyColorCommand.shaderProgram.destroy()),l(this._copyDepthCommand)&&(this._copyDepthCommand.shaderProgram=this._copyDepthCommand.shaderProgram.destroy()),l(this._tempCopyDepthCommand)&&(this._tempCopyDepthCommand.shaderProgram=this._tempCopyDepthCommand.shaderProgram.destroy()),l(this._updateDepthCommand)&&(this._updateDepthCommand.shaderProgram=this._updateDepthCommand.shaderProgram.destroy()),fe(this)};var Q3=d0;function dT(){this._framebuffer=new yi({depthStencil:!0,supportsDepthTexture:!0}),this._packedDepthFramebuffer=new yi,this._renderState=void 0,this._packedDepthCommand=void 0,this._clearCommand=void 0,this._viewport=new Je,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHdr=void 0}Object.defineProperties(dT.prototype,{classificationTexture:{get:function(){return this._framebuffer.getColorTexture()}},classificationFramebuffer:{get:function(){return this._framebuffer.framebuffer}},packedDepthFramebuffer:{get:function(){return this._packedDepthFramebuffer.framebuffer}},depthStencilTexture:{get:function(){return this._framebuffer.getDepthStencilTexture()}},depthStencilRenderbuffer:{get:function(){return this._framebuffer.getDepthStencilRenderbuffer()}},packedDepthTexture:{get:function(){return this._packedDepthFramebuffer.getColorTexture()}}});function iSt(e){e._framebuffer.destroy(),e._packedDepthFramebuffer.destroy()}function oSt(e,t,n,i,o){let r=o?t.halfFloatingPointTexture?je.HALF_FLOAT:je.FLOAT:je.UNSIGNED_BYTE;e._framebuffer.update(t,n,i,1,r),e._packedDepthFramebuffer.update(t,n,i)}function rSt(e,t,n,i,o){e._viewport.width=n,e._viewport.height=i;let r=!Je.equals(e._viewport,o.viewport),a=r!==e._useScissorTest;e._useScissorTest=r,Je.equals(e._scissorRectangle,o.viewport)||(e._scissorRectangle=Je.clone(o.viewport,e._scissorRectangle),a=!0),(!l(e._renderState)||!Je.equals(e._viewport,e._renderState.viewport)||a)&&(e._renderState=Ve.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}})),l(e._packedDepthCommand)||(e._packedDepthCommand=t.createViewportQuadCommand(jy,{uniformMap:{u_depthTexture:function(){return e.depthStencilTexture}},owner:e})),l(e._clearCommand)||(e._clearCommand=new ai({color:new V(0,0,0,0),depth:1,stencil:0,owner:e})),e._packedDepthCommand.framebuffer=e._packedDepthFramebuffer.framebuffer,e._packedDepthCommand.renderState=e._renderState,e._clearCommand.framebuffer=e.classificationFramebuffer,e._clearCommand.renderState=e._renderState}dT.prototype.updateAndClear=function(e,t,n,i){let o=t.width,r=t.height;oSt(this,n,o,r,e),rSt(this,n,o,r,i),this._useHdr=e};dT.prototype.clearClassification=function(e,t){this._clearCommand.execute(e,t)};dT.prototype.packDepth=function(e,t){return this._packedDepthCommand.execute(e,t),this.packedDepthTexture};dT.prototype.isDestroyed=function(){return!1};dT.prototype.destroy=function(){return iSt(this),fe(this)};var $3=dT;var sI=`#ifdef MRT
- layout (location = 0) out vec4 out_FragData_0;
- layout (location = 1) out vec4 out_FragData_1;
- #else
- layout (location = 0) out vec4 out_FragColor;
- #endif
-
- uniform vec4 u_bgColor;
- uniform sampler2D u_depthTexture;
-
- in vec2 v_textureCoordinates;
-
- void main()
- {
- if (texture(u_depthTexture, v_textureCoordinates).r < 1.0)
- {
- #ifdef MRT
- out_FragData_0 = u_bgColor;
- out_FragData_1 = vec4(u_bgColor.a);
- #else
- out_FragColor = u_bgColor;
- #endif
- return;
- }
-
- discard;
- }
- `;var J3=`/**
- * Compositing for Weighted Blended Order-Independent Transparency. See:
- * - http://jcgt.org/published/0002/02/09/
- * - http://casual-effects.blogspot.com/2014/03/weighted-blended-order-independent.html
- */
-
- uniform sampler2D u_opaque;
- uniform sampler2D u_accumulation;
- uniform sampler2D u_revealage;
-
- in vec2 v_textureCoordinates;
-
- void main()
- {
- vec4 opaque = texture(u_opaque, v_textureCoordinates);
- vec4 accum = texture(u_accumulation, v_textureCoordinates);
- float r = texture(u_revealage, v_textureCoordinates).r;
-
- #ifdef MRT
- vec4 transparent = vec4(accum.rgb / clamp(r, 1e-4, 5e4), accum.a);
- #else
- vec4 transparent = vec4(accum.rgb / clamp(accum.a, 1e-4, 5e4), r);
- #endif
-
- out_FragColor = (1.0 - transparent.a) * transparent + transparent.a * opaque;
-
- if (opaque != czm_backgroundColor)
- {
- out_FragColor.a = 1.0;
- }
- }
- `;function T_(e){this._numSamples=1,this._translucentMultipassSupport=!1,this._translucentMRTSupport=!1;let t=e.colorBufferFloat&&e.depthTexture&&e.floatBlend;this._translucentMRTSupport=e.drawBuffers&&t,this._translucentMultipassSupport=!this._translucentMRTSupport&&t,this._opaqueFBO=void 0,this._opaqueTexture=void 0,this._depthStencilTexture=void 0,this._accumulationTexture=void 0,this._translucentFBO=new yi({colorAttachmentsLength:this._translucentMRTSupport?2:1,createColorAttachments:!1,createDepthAttachments:!1,depth:!0}),this._alphaFBO=new yi({createColorAttachments:!1,createDepthAttachments:!1,depth:!0}),this._adjustTranslucentFBO=new yi({colorAttachmentsLength:this._translucentMRTSupport?2:1,createColorAttachments:!1}),this._adjustAlphaFBO=new yi({createColorAttachments:!1}),this._opaqueClearCommand=new ai({color:new V(0,0,0,0),owner:this}),this._translucentMRTClearCommand=new ai({color:new V(0,0,0,1),owner:this}),this._translucentMultipassClearCommand=new ai({color:new V(0,0,0,0),owner:this}),this._alphaClearCommand=new ai({color:new V(1,1,1,1),owner:this}),this._translucentRenderStateCache={},this._alphaRenderStateCache={},this._compositeCommand=void 0,this._adjustTranslucentCommand=void 0,this._adjustAlphaCommand=void 0,this._viewport=new Je,this._rs=void 0,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHDR=!1}function rDe(e){e._accumulationTexture=e._accumulationTexture&&!e._accumulationTexture.isDestroyed()&&e._accumulationTexture.destroy(),e._revealageTexture=e._revealageTexture&&!e._revealageTexture.isDestroyed()&&e._revealageTexture.destroy()}function Mte(e){e._translucentFBO.destroy(),e._alphaFBO.destroy(),e._adjustTranslucentFBO.destroy(),e._adjustAlphaFBO.destroy()}function aDe(e){rDe(e),Mte(e)}function aSt(e,t,n,i){rDe(e),e._accumulationTexture=new It({context:t,width:n,height:i,pixelFormat:Xe.RGBA,pixelDatatype:je.FLOAT}),e._revealageTexture=new It({context:t,pixelFormat:Xe.RGBA,pixelDatatype:je.FLOAT,width:n,height:i,flipY:!1})}function sSt(e,t){Mte(e);let n=ee.FRAMEBUFFER_COMPLETE,i=!0,{width:o,height:r}=e._accumulationTexture;if(e._translucentMRTSupport&&(e._translucentFBO.setColorTexture(e._accumulationTexture,0),e._translucentFBO.setColorTexture(e._revealageTexture,1),e._translucentFBO.setDepthStencilTexture(e._depthStencilTexture),e._translucentFBO.update(t,o,r),e._adjustTranslucentFBO.setColorTexture(e._accumulationTexture,0),e._adjustTranslucentFBO.setColorTexture(e._revealageTexture,1),e._adjustTranslucentFBO.update(t,o,r),(e._translucentFBO.status!==n||e._adjustTranslucentFBO.status!==n)&&(Mte(e),e._translucentMRTSupport=!1)),!e._translucentMRTSupport){e._translucentFBO.setColorTexture(e._accumulationTexture),e._translucentFBO.setDepthStencilTexture(e._depthStencilTexture),e._translucentFBO.update(t,o,r),e._alphaFBO.setColorTexture(e._revealageTexture),e._alphaFBO.setDepthStencilTexture(e._depthStencilTexture),e._alphaFBO.update(t,o,r),e._adjustTranslucentFBO.setColorTexture(e._accumulationTexture),e._adjustTranslucentFBO.update(t,o,r),e._adjustAlphaFBO.setColorTexture(e._revealageTexture),e._adjustAlphaFBO.update(t,o,r);let a=e._translucentFBO.status===n,s=e._alphaFBO.status===n,c=e._adjustTranslucentFBO.status===n,u=e._adjustAlphaFBO.status===n;(!a||!s||!c||!u)&&(aDe(e),e._translucentMultipassSupport=!1,i=!1)}return i}T_.prototype.update=function(e,t,n,i,o){if(!this.isSupported())return;this._opaqueFBO=n,this._opaqueTexture=n.getColorTexture(0),this._depthStencilTexture=n.getDepthStencilTexture();let{width:r,height:a}=this._opaqueTexture,s=this._accumulationTexture,c=!l(s)||s.width!==r||s.height!==a||i!==this._useHDR,u=this._numSamples!==o;if((c||u)&&(this._numSamples=o,aSt(this,e,r,a)),(!l(this._translucentFBO.framebuffer)||c||u)&&!sSt(this,e))return;this._useHDR=i;let f=this,d,p;l(this._compositeCommand)||(d=new He({sources:[J3]}),this._translucentMRTSupport&&d.defines.push("MRT"),p={u_opaque:function(){return f._opaqueTexture},u_accumulation:function(){return f._accumulationTexture},u_revealage:function(){return f._revealageTexture}},this._compositeCommand=e.createViewportQuadCommand(d,{uniformMap:p,owner:this})),l(this._adjustTranslucentCommand)||(this._translucentMRTSupport?(d=new He({defines:["MRT"],sources:[sI]}),p={u_bgColor:function(){return f._translucentMRTClearCommand.color},u_depthTexture:function(){return f._depthStencilTexture}},this._adjustTranslucentCommand=e.createViewportQuadCommand(d,{uniformMap:p,owner:this})):this._translucentMultipassSupport&&(d=new He({sources:[sI]}),p={u_bgColor:function(){return f._translucentMultipassClearCommand.color},u_depthTexture:function(){return f._depthStencilTexture}},this._adjustTranslucentCommand=e.createViewportQuadCommand(d,{uniformMap:p,owner:this}),p={u_bgColor:function(){return f._alphaClearCommand.color},u_depthTexture:function(){return f._depthStencilTexture}},this._adjustAlphaCommand=e.createViewportQuadCommand(d,{uniformMap:p,owner:this}))),this._viewport.width=r,this._viewport.height=a;let g=!Je.equals(this._viewport,t.viewport),m=g!==this._useScissorTest;this._useScissorTest=g,Je.equals(this._scissorRectangle,t.viewport)||(this._scissorRectangle=Je.clone(t.viewport,this._scissorRectangle),m=!0),(!l(this._rs)||!Je.equals(this._viewport,this._rs.viewport)||m)&&(this._rs=Ve.fromCache({viewport:this._viewport,scissorTest:{enabled:this._useScissorTest,rectangle:this._scissorRectangle}})),l(this._compositeCommand)&&(this._compositeCommand.renderState=this._rs),this._adjustTranslucentCommand&&(this._adjustTranslucentCommand.renderState=this._rs),l(this._adjustAlphaCommand)&&(this._adjustAlphaCommand.renderState=this._rs)};var cSt={enabled:!0,color:new V(0,0,0,0),equationRgb:Sc.ADD,equationAlpha:Sc.ADD,functionSourceRgb:Vo.ONE,functionDestinationRgb:Vo.ONE,functionSourceAlpha:Vo.ZERO,functionDestinationAlpha:Vo.ONE_MINUS_SOURCE_ALPHA},lSt={enabled:!0,color:new V(0,0,0,0),equationRgb:Sc.ADD,equationAlpha:Sc.ADD,functionSourceRgb:Vo.ONE,functionDestinationRgb:Vo.ONE,functionSourceAlpha:Vo.ONE,functionDestinationAlpha:Vo.ONE},uSt={enabled:!0,color:new V(0,0,0,0),equationRgb:Sc.ADD,equationAlpha:Sc.ADD,functionSourceRgb:Vo.ZERO,functionDestinationRgb:Vo.ONE_MINUS_SOURCE_ALPHA,functionSourceAlpha:Vo.ZERO,functionDestinationAlpha:Vo.ONE_MINUS_SOURCE_ALPHA};function Bte(e,t,n,i){let o=n[i.id];if(!l(o)){let r=Ve.getState(i);r.depthMask=!1,r.blending=t,o=Ve.fromCache(r),n[i.id]=o}return o}function fSt(e,t,n){return Bte(t,cSt,e._translucentRenderStateCache,n)}function dSt(e,t,n){return Bte(t,lSt,e._translucentRenderStateCache,n)}function hSt(e,t,n){return Bte(t,uSt,e._alphaRenderStateCache,n)}var mSt=` vec3 Ci = czm_out_FragColor.rgb * czm_out_FragColor.a;
- float ai = czm_out_FragColor.a;
- float wzi = czm_alphaWeight(ai);
- out_FragData_0 = vec4(Ci * wzi, ai);
- out_FragData_1 = vec4(ai * wzi);
- `,pSt=` vec3 Ci = czm_out_FragColor.rgb * czm_out_FragColor.a;
- float ai = czm_out_FragColor.a;
- float wzi = czm_alphaWeight(ai);
- out_FragColor = vec4(Ci, ai) * wzi;
- `,gSt=` float ai = czm_out_FragColor.a;
- out_FragColor = vec4(ai);
- `;function Lte(e,t,n,i){let{shaderCache:o}=e,r=o.getDerivedShaderProgram(t,n);if(l(r))return r;let a=t._attributeLocations,s=t.fragmentShaderSource.clone();s.sources=s.sources.map(function(f){return He.replaceMain(f,"czm_translucent_main").replace(/out_FragColor/g,"czm_out_FragColor").replace(/layout\s*\(location\s*=\s*0\)\s*out\s+vec4\s+out_FragColor;/g,"").replace(/\bdiscard\b/g,"czm_discard = true").replace(/czm_phong/g,"czm_translucentPhong")}),s.sources.splice(0,0,`#define CESIUM_REDIRECTED_COLOR_OUTPUT
- vec4 czm_out_FragColor;
- bool czm_discard = false;
- `);let c=[...i.matchAll(/out_FragData_(\d+)/g)],u="";for(let f=0;f<c.length;f++){let d=c[f];u=`layout (location = ${d[1]}) out vec4 ${d[0]};
- ${u}`}return s.sources.push(u),s.sources.push(`void main()
- {
- czm_translucent_main();
- if (czm_discard)
- {
- discard;
- }
- ${i}}
- `),o.createDerivedShaderProgram(t,n,{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:s,attributeLocations:a})}function _St(e,t){return Lte(e,t,"translucentMRT",mSt)}function ASt(e,t){return Lte(e,t,"translucentMultipass",pSt)}function ySt(e,t){return Lte(e,t,"alphaMultipass",gSt)}T_.prototype.createDerivedCommands=function(e,t,n){if(l(n)||(n={}),this._translucentMRTSupport){let s,c;return l(n.translucentCommand)&&(s=n.translucentCommand.shaderProgram,c=n.translucentCommand.renderState),n.translucentCommand=tt.shallowClone(e,n.translucentCommand),!l(s)||n.shaderProgramId!==e.shaderProgram.id?(n.translucentCommand.shaderProgram=_St(t,e.shaderProgram),n.translucentCommand.renderState=fSt(this,t,e.renderState),n.shaderProgramId=e.shaderProgram.id):(n.translucentCommand.shaderProgram=s,n.translucentCommand.renderState=c),n}let i,o,r,a;return l(n.translucentCommand)&&(i=n.translucentCommand.shaderProgram,o=n.translucentCommand.renderState,r=n.alphaCommand.shaderProgram,a=n.alphaCommand.renderState),n.translucentCommand=tt.shallowClone(e,n.translucentCommand),n.alphaCommand=tt.shallowClone(e,n.alphaCommand),!l(i)||n.shaderProgramId!==e.shaderProgram.id?(n.translucentCommand.shaderProgram=ASt(t,e.shaderProgram),n.translucentCommand.renderState=dSt(this,t,e.renderState),n.alphaCommand.shaderProgram=ySt(t,e.shaderProgram),n.alphaCommand.renderState=hSt(this,t,e.renderState),n.shaderProgramId=e.shaderProgram.id):(n.translucentCommand.shaderProgram=i,n.translucentCommand.renderState=o,n.alphaCommand.shaderProgram=r,n.alphaCommand.renderState=a),n};function xSt(e,t,n,i,o,r){let{context:a,frameState:s}=t,{useLogDepth:c,shadowState:u}=s,f=t._hdr,d=i.framebuffer,p=u.lightShadowsEnabled;i.framebuffer=e._adjustTranslucentFBO.framebuffer,e._adjustTranslucentCommand.execute(a,i),i.framebuffer=e._adjustAlphaFBO.framebuffer,e._adjustAlphaCommand.execute(a,i);let g=e._opaqueFBO.framebuffer;i.framebuffer=e._translucentFBO.framebuffer;for(let m=0;m<o.length;++m){let A=o[m];A=c?A.derivedCommands.logDepth.command:A,A=f?A.derivedCommands.hdr.command:A;let y=p&&A.receiveShadows?A.derivedCommands.oit.shadows.translucentCommand:A.derivedCommands.oit.translucentCommand;n(y,t,i,g)}if(l(r)){let m=r.unclassifiedCommand,A=p&&m.receiveShadows?m.derivedCommands.oit.shadows.translucentCommand:m.derivedCommands.oit.translucentCommand;n(A,t,i,g)}i.framebuffer=e._alphaFBO.framebuffer;for(let m=0;m<o.length;++m){let A=o[m];A=c?A.derivedCommands.logDepth.command:A,A=f?A.derivedCommands.hdr.command:A;let y=p&&A.receiveShadows?A.derivedCommands.oit.shadows.alphaCommand:A.derivedCommands.oit.alphaCommand;n(y,t,i,g)}if(l(r)){let m=r.unclassifiedCommand,A=p&&m.receiveShadows?m.derivedCommands.oit.shadows.alphaCommand:m.derivedCommands.oit.alphaCommand;n(A,t,i,g)}i.framebuffer=d}function bSt(e,t,n,i,o,r){let{context:a,frameState:s}=t,{useLogDepth:c,shadowState:u}=s,f=t._hdr,d=i.framebuffer,p=u.lightShadowsEnabled;i.framebuffer=e._adjustTranslucentFBO.framebuffer,e._adjustTranslucentCommand.execute(a,i);let g=e._opaqueFBO.framebuffer;i.framebuffer=e._translucentFBO.framebuffer;for(let m=0;m<o.length;++m){let A=o[m];A=c?A.derivedCommands.logDepth.command:A,A=f?A.derivedCommands.hdr.command:A;let y=p&&A.receiveShadows?A.derivedCommands.oit.shadows.translucentCommand:A.derivedCommands.oit.translucentCommand;n(y,t,i,g)}if(l(r)){let m=r.unclassifiedCommand,A=p&&m.receiveShadows?m.derivedCommands.oit.shadows.translucentCommand:m.derivedCommands.oit.translucentCommand;n(A,t,i,g)}i.framebuffer=d}T_.prototype.executeCommands=function(e,t,n,i,o){if(this._translucentMRTSupport){bSt(this,e,t,n,i,o);return}xSt(this,e,t,n,i,o)};T_.prototype.execute=function(e,t){this._compositeCommand.execute(e,t)};T_.prototype.clear=function(e,t,n){let i=t.framebuffer;t.framebuffer=this._opaqueFBO.framebuffer,V.clone(n,this._opaqueClearCommand.color),this._opaqueClearCommand.execute(e,t),t.framebuffer=this._translucentFBO.framebuffer,(this._translucentMRTSupport?this._translucentMRTClearCommand:this._translucentMultipassClearCommand).execute(e,t),this._translucentMultipassSupport&&(t.framebuffer=this._alphaFBO.framebuffer,this._alphaClearCommand.execute(e,t)),t.framebuffer=i};T_.prototype.isSupported=function(){return this._translucentMRTSupport||this._translucentMultipassSupport};T_.prototype.isDestroyed=function(){return!1};T_.prototype.destroy=function(){return aDe(this),l(this._compositeCommand)&&(this._compositeCommand.shaderProgram=this._compositeCommand.shaderProgram&&this._compositeCommand.shaderProgram.destroy()),l(this._adjustTranslucentCommand)&&(this._adjustTranslucentCommand.shaderProgram=this._adjustTranslucentCommand.shaderProgram&&this._adjustTranslucentCommand.shaderProgram.destroy()),l(this._adjustAlphaCommand)&&(this._adjustAlphaCommand.shaderProgram=this._adjustAlphaCommand.shaderProgram&&this._adjustAlphaCommand.shaderProgram.destroy()),fe(this)};var Z3=T_;function ez(){this._framebuffer=new yi({color:!1,depthStencil:!0,supportsDepthTexture:!0}),this._passState=void 0}Object.defineProperties(ez.prototype,{framebuffer:{get:function(){return this._framebuffer.framebuffer}}});function CSt(e){e._framebuffer.destroy()}function TSt(e,t){let n=t.drawingBufferWidth,i=t.drawingBufferHeight;e._framebuffer.update(t,n,i);let o=new $c(t);o.blendingEnabled=!1,o.scissorTest={enabled:!0,rectangle:new Je},o.viewport=new Je,e._passState=o}ez.prototype.update=function(e,t,n){let i=n.width,o=n.height;this._framebuffer.isDirty(i,o)&&TSt(this,e);let r=this.framebuffer,a=this._passState;return a.framebuffer=r,a.viewport.width=i,a.viewport.height=o,a.scissorTest.rectangle.x=t.x,a.scissorTest.rectangle.y=o-t.y,a.scissorTest.rectangle.width=1,a.scissorTest.rectangle.height=1,a};ez.prototype.isDestroyed=function(){return!1};ez.prototype.destroy=function(){return CSt(this),fe(this)};var tz=ez;function hT(e){let t=new $c(e);t.blendingEnabled=!1,t.scissorTest={enabled:!0,rectangle:new Je},t.viewport=new Je,this._context=e,this._fb=new yi({depthStencil:!0}),this._passState=t,this._width=0,this._height=0}function sDe(e,t,n,i,o=1){let r=Math.max(n,i),a=r*r,s=Math.floor(n*.5),c=Math.floor(i*.5),u=0,f=0,d=0,p=-1,g=new Set;for(let m=0;m<a;++m){if(-s<=u&&u<=s&&-c<=f&&f<=c){let A=4*((c-f)*n+u+s),y=V.bytesToRgba(t[A],t[A+1],t[A+2],t[A+3]),x=e.getObjectByPickColor(y);if(l(x)&&(g.add(x),g.size>=o))break}if(u===f||u<0&&-u===f||u>0&&u===1-f){let A=d;d=-p,p=A}u+=d,f+=p}return[...g]}hT.prototype.begin=function(e,t){let n=this._context,{width:i,height:o}=t;return Je.clone(e,this._passState.scissorTest.rectangle),this._width=i,this._height=o,this._fb.update(n,i,o),this._passState.framebuffer=this._fb.framebuffer,this._passState.viewport.width=i,this._passState.viewport.height=o,this._passState};hT.prototype.endAsync=async function(e,t,n=1){let i=e.width??1,o=e.height??1,r=this._context,a=this._fb.framebuffer,s=je.UNSIGNED_BYTE,c=Xe.RGBA;l(a)&&a.numberOfColorAttachments>0&&(s=a.getColorTexture(0).pixelDatatype,c=a.getColorTexture(0).pixelFormat);let u=r.readPixelsToPBO({x:e.x,y:e.y,width:i,height:o,framebuffer:a}),f=TR.create({context:r});try{await f.waitForSignal(g=>t.afterRender.push(g));let d=Xe.createTypedArray(c,s,i,o);return u.getBufferData(d),sDe(r,d,i,o,n)}catch{throw new re("Async Picking Request Timeout")}finally{f.destroy(),u.destroy()}};hT.prototype.end=function(e,t=1){let n=e.width??1,i=e.height??1,o=this._context,r=o.readPixels({x:e.x,y:e.y,width:n,height:i,framebuffer:this._fb.framebuffer});return sDe(o,r,n,i,t)};hT.prototype.readCenterPixel=function(e){let t=e.width??1,n=e.height??1,o=this._context.readPixels({x:e.x,y:e.y,width:t,height:n,framebuffer:this._fb.framebuffer}),r=Math.floor(t*.5),s=4*(Math.floor(n*.5)*t+r);return o.slice(s,s+4)};hT.prototype.isDestroyed=function(){return!1};hT.prototype.destroy=function(){return this._fb.destroy(),fe(this)};var nz=hT;function E_(){this._numSamples=1,this._colorFramebuffer=new yi({depthStencil:!0,supportsDepthTexture:!0}),this._idFramebuffer=new yi({depthStencil:!0,supportsDepthTexture:!0}),this._idClearColor=new V(0,0,0,0),this._clearCommand=new ai({color:new V(0,0,0,0),depth:1,owner:this})}function ESt(e){e._colorFramebuffer.destroy(),e._idFramebuffer.destroy()}Object.defineProperties(E_.prototype,{framebuffer:{get:function(){return this._colorFramebuffer.framebuffer}},idFramebuffer:{get:function(){return this._idFramebuffer.framebuffer}},depthStencilTexture:{get:function(){return this._colorFramebuffer.getDepthStencilTexture()}}});E_.prototype.update=function(e,t,n,i){let o=t.width,r=t.height,a=n?e.halfFloatingPointTexture?je.HALF_FLOAT:je.FLOAT:je.UNSIGNED_BYTE;this._numSamples=i,this._colorFramebuffer.update(e,o,r,i,a),this._idFramebuffer.update(e,o,r)};E_.prototype.clear=function(e,t,n){V.clone(n,this._clearCommand.color),V.clone(this._idClearColor,this._clearCommand.color),this._colorFramebuffer.clear(e,this._clearCommand,t),this._idFramebuffer.clear(e,this._clearCommand,t)};E_.prototype.getFramebuffer=function(){return this._colorFramebuffer.framebuffer};E_.prototype.getIdFramebuffer=function(){return this._idFramebuffer.framebuffer};E_.prototype.prepareColorTextures=function(e){this._numSamples>1&&this._colorFramebuffer.prepareTextures(e)};E_.prototype.isDestroyed=function(){return!1};E_.prototype.destroy=function(){return ESt(this),fe(this)};var mT=E_;function pT(){}pT.getShadowCastShaderKeyword=function(e,t,n,i){return`castShadow ${e} ${t} ${n} ${i}`};pT.createShadowCastVertexShader=function(e,t,n){let i=e.defines.slice(0),o=e.sources.slice(0);i.push("SHADOW_MAP"),n&&i.push("GENERATE_POSITION");let r=He.findPositionVarying(e),a=l(r);if(t&&!a){let s=o.length;for(let u=0;u<s;++u)o[u]=He.replaceMain(o[u],"czm_shadow_cast_main");o.push(`out vec3 v_positionEC;
- void main()
- {
- czm_shadow_cast_main();
- v_positionEC = (czm_inverseProjection * gl_Position).xyz;
- }`)}return new He({defines:i,sources:o})};pT.createShadowCastFragmentShader=function(e,t,n,i){let o=e.defines.slice(0),r=e.sources.slice(0);o.push("SHADOW_MAP");let a=He.findPositionVarying(e),s=l(a);s||(a="v_positionEC");let c=r.length;for(let f=0;f<c;++f)r[f]=He.replaceMain(r[f],"czm_shadow_cast_main");let u="";return t&&(s||(u+=`in vec3 v_positionEC;
- `),u+=`uniform vec4 shadowMap_lightPositionEC;
- `),i?u+=`void main()
- {
- `:u+=`void main()
- {
- czm_shadow_cast_main();
- if (out_FragColor.a == 0.0)
- {
- discard;
- }
- `,t?u+=` float distance = length(${a});
- if (distance >= shadowMap_lightPositionEC.w)
- {
- discard;
- }
- distance /= shadowMap_lightPositionEC.w; // radius
- out_FragColor = czm_packDepth(distance);
- `:n?u+=` out_FragColor = vec4(1.0);
- `:u+=` out_FragColor = czm_packDepth(gl_FragCoord.z);
- `,u+=`}
- `,r.push(u),new He({defines:o,sources:r})};pT.getShadowReceiveShaderKeyword=function(e,t,n,i){let o=e._usesDepthTexture,r=e._polygonOffsetSupported,a=e._isPointLight,s=e._isSpotLight,c=e._numberOfCascades>1,u=e.debugCascadeColors,f=e.softShadows;return`receiveShadow ${o}${r}${a}${s}${c}${u}${f}${t}${n}${i}`};pT.createShadowReceiveVertexShader=function(e,t,n){let i=e.defines.slice(0),o=e.sources.slice(0);return i.push("SHADOW_MAP"),t&&(n?i.push("GENERATE_POSITION_AND_NORMAL"):i.push("GENERATE_POSITION")),new He({defines:i,sources:o})};pT.createShadowReceiveFragmentShader=function(e,t,n,i,o){let r=He.findNormalVarying(e),a=!i&&l(r)||i&&o,s=He.findPositionVarying(e),c=l(s),u=t._usesDepthTexture,f=t._polygonOffsetSupported,d=t._isPointLight,p=t._isSpotLight,g=t._numberOfCascades>1,m=t.debugCascadeColors,A=t.softShadows,y=d?t._pointBias:i?t._terrainBias:t._primitiveBias,x=e.defines.slice(0),b=e.sources.slice(0),C=b.length;for(let w=0;w<C;++w)b[w]=He.replaceMain(b[w],"czm_shadow_receive_main");d?x.push("USE_CUBE_MAP_SHADOW"):u&&x.push("USE_SHADOW_DEPTH_TEXTURE"),A&&!d&&x.push("USE_SOFT_SHADOWS"),g&&n&&i&&(a?x.push("ENABLE_VERTEX_LIGHTING"):x.push("ENABLE_DAYNIGHT_SHADING")),n&&y.normalShading&&a&&(x.push("USE_NORMAL_SHADING"),y.normalShadingSmooth>0&&x.push("USE_NORMAL_SHADING_SMOOTH"));let E="";d?E+=`uniform samplerCube shadowMap_textureCube;
- `:E+=`uniform sampler2D shadowMap_texture;
- `;let S;return c?S=` return vec4(${s}, 1.0);
- `:S=`#ifndef LOG_DEPTH
- return czm_windowToEyeCoordinates(gl_FragCoord);
- #else
- return vec4(v_logPositionEC, 1.0);
- #endif
- `,E+=`uniform mat4 shadowMap_matrix;
- uniform vec3 shadowMap_lightDirectionEC;
- uniform vec4 shadowMap_lightPositionEC;
- uniform vec4 shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness;
- uniform vec4 shadowMap_texelSizeDepthBiasAndNormalShadingSmooth;
- #ifdef LOG_DEPTH
- in vec3 v_logPositionEC;
- #endif
- vec4 getPositionEC()
- {
- ${S}}
- vec3 getNormalEC()
- {
- ${a?` return normalize(${r});
- `:` return vec3(1.0);
- `}}
- void applyNormalOffset(inout vec4 positionEC, vec3 normalEC, float nDotL)
- {
- ${y.normalOffset&&a?` float normalOffset = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.x;
- float normalOffsetScale = 1.0 - nDotL;
- vec3 offset = normalOffset * normalOffsetScale * normalEC;
- positionEC.xyz += offset;
- `:""}}
- `,E+=`void main()
- {
- czm_shadow_receive_main();
- vec4 positionEC = getPositionEC();
- vec3 normalEC = getNormalEC();
- float depth = -positionEC.z;
- `,E+=` czm_shadowParameters shadowParameters;
- shadowParameters.texelStepSize = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.xy;
- shadowParameters.depthBias = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.z;
- shadowParameters.normalShadingSmooth = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.w;
- shadowParameters.darkness = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.w;
- `,i?E+=` shadowParameters.depthBias *= max(depth * 0.01, 1.0);
- `:f||(E+=` shadowParameters.depthBias *= mix(1.0, 100.0, depth * 0.0015);
- `),d?E+=` vec3 directionEC = positionEC.xyz - shadowMap_lightPositionEC.xyz;
- float distance = length(directionEC);
- directionEC = normalize(directionEC);
- float radius = shadowMap_lightPositionEC.w;
- // Stop early if the fragment is beyond the point light radius
- if (distance > radius)
- {
- return;
- }
- vec3 directionWC = czm_inverseViewRotation * directionEC;
- shadowParameters.depth = distance / radius;
- shadowParameters.nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0);
- shadowParameters.texCoords = directionWC;
- float visibility = czm_shadowVisibility(shadowMap_textureCube, shadowParameters);
- `:p?E+=` vec3 directionEC = normalize(positionEC.xyz - shadowMap_lightPositionEC.xyz);
- float nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0);
- applyNormalOffset(positionEC, normalEC, nDotL);
- vec4 shadowPosition = shadowMap_matrix * positionEC;
- // Spot light uses a perspective projection, so perform the perspective divide
- shadowPosition /= shadowPosition.w;
- // Stop early if the fragment is not in the shadow bounds
- if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0))))
- {
- return;
- }
- shadowParameters.texCoords = shadowPosition.xy;
- shadowParameters.depth = shadowPosition.z;
- shadowParameters.nDotL = nDotL;
- float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters);
- `:g?E+=` float maxDepth = shadowMap_cascadeSplits[1].w;
- // Stop early if the eye depth exceeds the last cascade
- if (depth > maxDepth)
- {
- return;
- }
- // Get the cascade based on the eye-space depth
- vec4 weights = czm_cascadeWeights(depth);
- // Apply normal offset
- float nDotL = clamp(dot(normalEC, shadowMap_lightDirectionEC), 0.0, 1.0);
- applyNormalOffset(positionEC, normalEC, nDotL);
- // Transform position into the cascade
- vec4 shadowPosition = czm_cascadeMatrix(weights) * positionEC;
- // Get visibility
- shadowParameters.texCoords = shadowPosition.xy;
- shadowParameters.depth = shadowPosition.z;
- shadowParameters.nDotL = nDotL;
- float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters);
- // Fade out shadows that are far away
- float shadowMapMaximumDistance = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.z;
- float fade = max((depth - shadowMapMaximumDistance * 0.8) / (shadowMapMaximumDistance * 0.2), 0.0);
- visibility = mix(visibility, 1.0, fade);
- ${m?` // Draw cascade colors for debugging
- out_FragColor *= czm_cascadeColor(weights);
- `:""}`:E+=` float nDotL = clamp(dot(normalEC, shadowMap_lightDirectionEC), 0.0, 1.0);
- applyNormalOffset(positionEC, normalEC, nDotL);
- vec4 shadowPosition = shadowMap_matrix * positionEC;
- // Stop early if the fragment is not in the shadow bounds
- if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0))))
- {
- return;
- }
- shadowParameters.texCoords = shadowPosition.xy;
- shadowParameters.depth = shadowPosition.z;
- shadowParameters.nDotL = nDotL;
- float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters);
- `,E+=` out_FragColor.rgb *= visibility;
- }
- `,b.push(E),new He({defines:x,sources:b})};var h0=pT;function m0(e){e=e??G.EMPTY_OBJECT;let t=e.context;this._enabled=e.enabled??!0,this._softShadows=e.softShadows??!1,this._normalOffset=e.normalOffset??!0,this.dirty=!0,this.fromLightSource=e.fromLightSource??!0,this.darkness=e.darkness??.3,this._darkness=this.darkness,this.fadingEnabled=e.fadingEnabled??!0,this.maximumDistance=e.maximumDistance??5e3,this._outOfView=!1,this._outOfViewPrevious=!1,this._needsUpdate=!0;let n=!0;(sn.isEdge()||(sn.isChrome()||sn.isFirefox())&&sn.isWindows()&&!t.depthTexture)&&(n=!1),this._polygonOffsetSupported=n,this._terrainBias={polygonOffset:n,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:.5,normalShading:!0,normalShadingSmooth:.3,depthBias:1e-4},this._primitiveBias={polygonOffset:n,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:.1,normalShading:!0,normalShadingSmooth:.05,depthBias:2e-5},this._pointBias={polygonOffset:!1,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:0,normalShading:!0,normalShadingSmooth:.1,depthBias:5e-4},this._depthAttachment=void 0,this._colorAttachment=void 0,this._shadowMapMatrix=new M,this._shadowMapTexture=void 0,this._lightDirectionEC=new h,this._lightPositionEC=new se,this._distance=0,this._lightCamera=e.lightCamera,this._shadowMapCamera=new A5,this._shadowMapCullingVolume=void 0,this._sceneCamera=void 0,this._boundingSphere=new ce,this._isPointLight=e.isPointLight??!1,this._pointLightRadius=e.pointLightRadius??100,this._cascadesEnabled=this._isPointLight?!1:e.cascadesEnabled??!0,this._numberOfCascades=this._cascadesEnabled?e.numberOfCascades??4:0,this._fitNearFar=!0,this._maximumCascadeDistances=[25,150,700,Number.MAX_VALUE],this._textureSize=new z,this._isSpotLight=!1,this._cascadesEnabled?this._shadowMapCamera.frustum=new da:l(this._lightCamera.frustum.fov)&&(this._isSpotLight=!0),this._cascadeSplits=[new se,new se],this._cascadeMatrices=[new M,new M,new M,new M],this._cascadeDistances=new se;let i;this._isPointLight?i=6:this._cascadesEnabled?i=this._numberOfCascades:i=1,this._passes=new Array(i);for(let o=0;o<i;++o)this._passes[o]=new vSt(t);this.debugShow=!1,this.debugFreezeFrame=!1,this._debugFreezeFrame=!1,this._debugCascadeColors=!1,this._debugLightFrustum=void 0,this._debugCameraFrustum=void 0,this._debugCascadeFrustums=new Array(this._numberOfCascades),this._debugShadowViewCommand=void 0,this._usesDepthTexture=t.depthTexture,this._isPointLight&&(this._usesDepthTexture=!1),this._primitiveRenderState=void 0,this._terrainRenderState=void 0,this._pointRenderState=void 0,Fte(this),this._clearCommand=new ai({depth:1,color:new V}),this._clearPassState=new $c(t),this._size=e.size??2048,this.size=this._size}m0.MAXIMUM_DISTANCE=2e4;function vSt(e){this.camera=new A5,this.passState=new $c(e),this.framebuffer=void 0,this.textureOffsets=void 0,this.commandList=[],this.cullingVolume=void 0}function Nte(e,t){return Ve.fromCache({cull:{enabled:!0,face:Mi.BACK},depthTest:{enabled:!0},colorMask:{red:e,green:e,blue:e,alpha:e},depthMask:!0,polygonOffset:{enabled:t.polygonOffset,factor:t.polygonOffsetFactor,units:t.polygonOffsetUnits}})}function Fte(e){let t=!e._usesDepthTexture;e._primitiveRenderState=Nte(t,e._primitiveBias),e._terrainRenderState=Nte(t,e._terrainBias),e._pointRenderState=Nte(t,e._pointBias)}m0.prototype.debugCreateRenderStates=function(){Fte(this)};Object.defineProperties(m0.prototype,{enabled:{get:function(){return this._enabled},set:function(e){this.dirty=this._enabled!==e,this._enabled=e}},normalOffset:{get:function(){return this._normalOffset},set:function(e){this.dirty=this._normalOffset!==e,this._normalOffset=e,this._terrainBias.normalOffset=e,this._primitiveBias.normalOffset=e,this._pointBias.normalOffset=e}},softShadows:{get:function(){return this._softShadows},set:function(e){this.dirty=this._softShadows!==e,this._softShadows=e}},size:{get:function(){return this._size},set:function(e){RSt(this,e)}},outOfView:{get:function(){return this._outOfView}},shadowMapCullingVolume:{get:function(){return this._shadowMapCullingVolume}},passes:{get:function(){return this._passes}},isPointLight:{get:function(){return this._isPointLight}},debugCascadeColors:{get:function(){return this._debugCascadeColors},set:function(e){this.dirty=this._debugCascadeColors!==e,this._debugCascadeColors=e}}});function kte(e){let t=e._passes.length;for(let n=0;n<t;++n){let i=e._passes[n],o=i.framebuffer;l(o)&&!o.isDestroyed()&&o.destroy(),i.framebuffer=void 0}e._depthAttachment=e._depthAttachment&&e._depthAttachment.destroy(),e._colorAttachment=e._colorAttachment&&e._colorAttachment.destroy()}function SSt(e,t){let n=new mf({context:t,width:e._textureSize.x,height:e._textureSize.y,format:Ml.DEPTH_COMPONENT16}),i=new It({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:Xe.RGBA,pixelDatatype:je.UNSIGNED_BYTE,sampler:jt.NEAREST}),o=new fa({context:t,depthRenderbuffer:n,colorTextures:[i],destroyAttachments:!1}),r=e._passes.length;for(let a=0;a<r;++a){let s=e._passes[a];s.framebuffer=o,s.passState.framebuffer=o}e._shadowMapTexture=i,e._depthAttachment=n,e._colorAttachment=i}function wSt(e,t){let n=new It({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:Xe.DEPTH_STENCIL,pixelDatatype:je.UNSIGNED_INT_24_8,sampler:jt.NEAREST}),i=new fa({context:t,depthStencilTexture:n,destroyAttachments:!1}),o=e._passes.length;for(let r=0;r<o;++r){let a=e._passes[r];a.framebuffer=i,a.passState.framebuffer=i}e._shadowMapTexture=n,e._depthAttachment=n}function ISt(e,t){let n=new mf({context:t,width:e._textureSize.x,height:e._textureSize.y,format:Ml.DEPTH_COMPONENT16}),i=new $r({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:Xe.RGBA,pixelDatatype:je.UNSIGNED_BYTE,sampler:jt.NEAREST}),o=[i.negativeX,i.negativeY,i.negativeZ,i.positiveX,i.positiveY,i.positiveZ];for(let r=0;r<6;++r){let a=new fa({context:t,depthRenderbuffer:n,colorTextures:[o[r]],destroyAttachments:!1}),s=e._passes[r];s.framebuffer=a,s.passState.framebuffer=a}e._shadowMapTexture=i,e._depthAttachment=n,e._colorAttachment=i}function uDe(e,t){e._isPointLight?ISt(e,t):e._usesDepthTexture?wSt(e,t):SSt(e,t)}function DSt(e,t){e._usesDepthTexture&&e._passes[0].framebuffer.status!==ee.FRAMEBUFFER_COMPLETE&&(e._usesDepthTexture=!1,Fte(e),kte(e),uDe(e,t))}function PSt(e,t){(!l(e._passes[0].framebuffer)||e._shadowMapTexture.width!==e._textureSize.x)&&(kte(e),uDe(e,t),DSt(e,t),fDe(e,t))}function fDe(e,t,n){n=n??0,(e._isPointLight||n===0)&&(e._clearCommand.framebuffer=e._passes[n].framebuffer,e._clearCommand.execute(t,e._clearPassState))}function RSt(e,t){e._size=t;let n=e._passes,i=n.length,o=e._textureSize;if(e._isPointLight){t=Rt.maximumCubeMapSize>=t?t:Rt.maximumCubeMapSize,o.x=t,o.y=t;let r=new Je(0,0,t,t);n[0].passState.viewport=r,n[1].passState.viewport=r,n[2].passState.viewport=r,n[3].passState.viewport=r,n[4].passState.viewport=r,n[5].passState.viewport=r}else i===1?(t=Rt.maximumTextureSize>=t?t:Rt.maximumTextureSize,o.x=t,o.y=t,n[0].passState.viewport=new Je(0,0,t,t)):i===4&&(t=Rt.maximumTextureSize>=t*2?t:Rt.maximumTextureSize/2,o.x=t*2,o.y=t*2,n[0].passState.viewport=new Je(0,0,t,t),n[1].passState.viewport=new Je(t,0,t,t),n[2].passState.viewport=new Je(0,t,t,t),n[3].passState.viewport=new Je(t,t,t,t));e._clearPassState.viewport=new Je(0,0,o.x,o.y);for(let r=0;r<i;++r){let a=n[r],s=a.passState.viewport,c=s.x/o.x,u=s.y/o.y,f=s.width/o.x,d=s.height/o.y;a.textureOffsets=new M(f,0,0,c,0,d,0,u,0,0,1,0,0,0,0,1)}}var OSt=new Je;function MSt(e,t){let n;e._isPointLight?n=`uniform samplerCube shadowMap_textureCube;
- in vec2 v_textureCoordinates;
- void main()
- {
- vec2 uv = v_textureCoordinates;
- vec3 dir;
-
- if (uv.y < 0.5)
- {
- if (uv.x < 0.333)
- {
- dir.x = -1.0;
- dir.y = uv.x * 6.0 - 1.0;
- dir.z = uv.y * 4.0 - 1.0;
- }
- else if (uv.x < 0.666)
- {
- dir.y = -1.0;
- dir.x = uv.x * 6.0 - 3.0;
- dir.z = uv.y * 4.0 - 1.0;
- }
- else
- {
- dir.z = -1.0;
- dir.x = uv.x * 6.0 - 5.0;
- dir.y = uv.y * 4.0 - 1.0;
- }
- }
- else
- {
- if (uv.x < 0.333)
- {
- dir.x = 1.0;
- dir.y = uv.x * 6.0 - 1.0;
- dir.z = uv.y * 4.0 - 3.0;
- }
- else if (uv.x < 0.666)
- {
- dir.y = 1.0;
- dir.x = uv.x * 6.0 - 3.0;
- dir.z = uv.y * 4.0 - 3.0;
- }
- else
- {
- dir.z = 1.0;
- dir.x = uv.x * 6.0 - 5.0;
- dir.y = uv.y * 4.0 - 3.0;
- }
- }
-
- float shadow = czm_unpackDepth(czm_textureCube(shadowMap_textureCube, dir));
- out_FragColor = vec4(vec3(shadow), 1.0);
- }
- `:n=`uniform sampler2D shadowMap_texture;
- in vec2 v_textureCoordinates;
- void main()
- {
- ${e._usesDepthTexture?` float shadow = texture(shadowMap_texture, v_textureCoordinates).r;
- `:` float shadow = czm_unpackDepth(texture(shadowMap_texture, v_textureCoordinates));
- `} out_FragColor = vec4(vec3(shadow), 1.0);
- }
- `;let i=t.createViewportQuadCommand(n,{uniformMap:{shadowMap_texture:function(){return e._shadowMapTexture},shadowMap_textureCube:function(){return e._shadowMapTexture}}});return i.pass=Ie.OVERLAY,i}function BSt(e,t){let n=t.context,i=t.context.drawingBufferWidth,o=t.context.drawingBufferHeight,r=Math.min(i,o)*.3,a=OSt;a.x=i-r,a.y=0,a.width=r,a.height=r;let s=e._debugShadowViewCommand;l(s)||(s=MSt(e,n),e._debugShadowViewCommand=s),(!l(s.renderState)||!Je.equals(s.renderState.viewport,a))&&(s.renderState=Ve.fromCache({viewport:Je.clone(a)})),t.commandList.push(e._debugShadowViewCommand)}var p0=new Array(8);p0[0]=new se(-1,-1,-1,1);p0[1]=new se(1,-1,-1,1);p0[2]=new se(1,1,-1,1);p0[3]=new se(-1,1,-1,1);p0[4]=new se(-1,-1,1,1);p0[5]=new se(1,-1,1,1);p0[6]=new se(1,1,1,1);p0[7]=new se(-1,1,1,1);var Gy=new M,zte=new Array(8);for(let e=0;e<8;++e)zte[e]=new se;function LSt(e,t){let n=new Ot({geometry:new Nh({minimum:new h(-.5,-.5,-.5),maximum:new h(.5,.5,.5)}),attributes:{color:Yt.fromColor(t)}}),i=new Ot({geometry:new Hg({radius:.5}),attributes:{color:Yt.fromColor(t)}});return new Dn({geometryInstances:[n,i],appearance:new dn({translucent:!1,flat:!0}),asynchronous:!1,modelMatrix:e})}var NSt=[V.RED,V.GREEN,V.BLUE,V.MAGENTA],FSt=new h;function kSt(e,t){BSt(e,t);let n=e.debugFreezeFrame&&!e._debugFreezeFrame;if(e._debugFreezeFrame=e.debugFreezeFrame,e.debugFreezeFrame&&(n&&(e._debugCameraFrustum=e._debugCameraFrustum&&e._debugCameraFrustum.destroy(),e._debugCameraFrustum=new l0({camera:e._sceneCamera,color:V.CYAN,updateOnChange:!1})),e._debugCameraFrustum.update(t)),e._cascadesEnabled){if(e.debugFreezeFrame){n&&(e._debugLightFrustum=e._debugLightFrustum&&e._debugLightFrustum.destroy(),e._debugLightFrustum=new l0({camera:e._shadowMapCamera,color:V.YELLOW,updateOnChange:!1})),e._debugLightFrustum.update(t);for(let i=0;i<e._numberOfCascades;++i)n&&(e._debugCascadeFrustums[i]=e._debugCascadeFrustums[i]&&e._debugCascadeFrustums[i].destroy(),e._debugCascadeFrustums[i]=new l0({camera:e._passes[i].camera,color:NSt[i],updateOnChange:!1})),e._debugCascadeFrustums[i].update(t)}}else if(e._isPointLight){if(!l(e._debugLightFrustum)||e._needsUpdate){let i=e._shadowMapCamera.positionWC,o=Le.IDENTITY,r=e._pointLightRadius*2,a=h.fromElements(r,r,r,FSt),s=M.fromTranslationQuaternionRotationScale(i,o,a,Gy);e._debugLightFrustum=e._debugLightFrustum&&e._debugLightFrustum.destroy(),e._debugLightFrustum=LSt(s,V.YELLOW)}e._debugLightFrustum.update(t)}else(!l(e._debugLightFrustum)||e._needsUpdate)&&(e._debugLightFrustum=new l0({camera:e._shadowMapCamera,color:V.YELLOW,updateOnChange:!1})),e._debugLightFrustum.update(t)}function A5(){this.viewMatrix=new M,this.inverseViewMatrix=new M,this.frustum=void 0,this.positionCartographic=new de,this.positionWC=new h,this.directionWC=h.clone(h.UNIT_Z),this.upWC=h.clone(h.UNIT_Y),this.rightWC=h.clone(h.UNIT_X),this.viewProjectionMatrix=new M}A5.prototype.clone=function(e){M.clone(e.viewMatrix,this.viewMatrix),M.clone(e.inverseViewMatrix,this.inverseViewMatrix),this.frustum=e.frustum.clone(this.frustum),de.clone(e.positionCartographic,this.positionCartographic),h.clone(e.positionWC,this.positionWC),h.clone(e.directionWC,this.directionWC),h.clone(e.upWC,this.upWC),h.clone(e.rightWC,this.rightWC)};var zSt=new M(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1);A5.prototype.getViewProjection=function(){let e=this.viewMatrix,t=this.frustum.projectionMatrix;return M.multiply(t,e,this.viewProjectionMatrix),M.multiply(zSt,this.viewProjectionMatrix,this.viewProjectionMatrix),this.viewProjectionMatrix};var USt=new Array(5),VSt=new Vi,jSt=new Array(4),dDe=new h,hDe=new h;function GSt(e,t){let n=e._shadowMapCamera,i=e._sceneCamera,o=i.frustum.near,r=i.frustum.far,a=e._numberOfCascades,s,c=r-o,u=r/o,f=.9,d=!1;t.shadowState.closestObjectSize<200&&(d=!0,f=.9);let p=jSt,g=USt;for(g[0]=o,g[a]=r,s=0;s<a;++s){let L=(s+1)/a,_=o*Math.pow(u,L),T=o+c*L,v=D.lerp(T,_,f);g[s+1]=v,p[s]=v-g[s]}if(d){for(s=0;s<a;++s)p[s]=Math.min(p[s],e._maximumCascadeDistances[s]);let L=g[0];for(s=0;s<a-1;++s)L+=p[s],g[s+1]=L}se.unpack(g,0,e._cascadeSplits[0]),se.unpack(g,1,e._cascadeSplits[1]),se.unpack(p,0,e._cascadeDistances);let m=n.frustum,A=m.left,y=m.right,x=m.bottom,b=m.top,C=m.near,E=m.far,S=n.positionWC,w=n.directionWC,P=n.upWC,R=i.frustum.clone(VSt),B=n.getViewProjection();for(s=0;s<a;++s){R.near=g[s],R.far=g[s+1];let L=M.multiply(R.projectionMatrix,i.viewMatrix,Gy),_=M.inverse(L,Gy),T=M.multiply(B,_,Gy),v=h.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,dDe),I=h.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,hDe);for(let U=0;U<8;++U){let F=se.clone(p0[U],zte[U]);M.multiplyByVector(T,F,F),h.divideByScalar(F,F.w,F),h.minimumByComponent(F,v,v),h.maximumByComponent(F,I,I)}v.x=Math.max(v.x,0),v.y=Math.max(v.y,0),v.z=0,I.x=Math.min(I.x,1),I.y=Math.min(I.y,1),I.z=Math.min(I.z,1);let O=e._passes[s],N=O.camera;N.clone(n);let j=N.frustum;j.left=A+v.x*(y-A),j.right=A+I.x*(y-A),j.bottom=x+v.y*(b-x),j.top=x+I.y*(b-x),j.near=C+v.z*(E-C),j.far=C+I.z*(E-C),O.cullingVolume=N.frustum.computeCullingVolume(S,w,P);let k=e._cascadeMatrices[s];M.multiply(N.getViewProjection(),i.inverseViewMatrix,k),M.multiply(O.textureOffsets,k,k)}}var HSt=new M,WSt=new h,qSt=new h,cDe=new h;function YSt(e,t){let n=e._shadowMapCamera,i=e._sceneCamera,o=M.multiply(i.frustum.projectionMatrix,i.viewMatrix,Gy),r=M.inverse(o,Gy),a=n.directionWC,s=i.directionWC;h.equalsEpsilon(a,s,D.EPSILON10)&&(s=i.upWC);let c=h.cross(a,s,WSt);s=h.cross(c,a,qSt),h.normalize(s,s),h.normalize(c,c);let u=h.fromElements(0,0,0,cDe),f=M.computeView(u,a,s,c,HSt),d=M.multiply(f,r,Gy),p=h.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,dDe),g=h.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,hDe);for(let E=0;E<8;++E){let S=se.clone(p0[E],zte[E]);M.multiplyByVector(d,S,S),h.divideByScalar(S,S.w,S),h.minimumByComponent(S,p,p),h.maximumByComponent(S,g,g)}g.z+=1e3,p.z-=10;let m=cDe;m.x=-(.5*(p.x+g.x)),m.y=-(.5*(p.y+g.y)),m.z=-g.z;let A=M.fromTranslation(m,Gy);f=M.multiply(A,f,f);let y=.5*(g.x-p.x),x=.5*(g.y-p.y),b=g.z-p.z,C=n.frustum;C.left=-y,C.right=y,C.bottom=-x,C.top=x,C.near=.01,C.far=b,M.clone(f,n.viewMatrix),M.inverse(f,n.inverseViewMatrix),M.getTranslation(n.inverseViewMatrix,n.positionWC),t.mapProjection.ellipsoid.cartesianToCartographic(n.positionWC,n.positionCartographic),h.clone(a,n.directionWC),h.clone(s,n.upWC),h.clone(c,n.rightWC)}var XSt=[new h(-1,0,0),new h(0,-1,0),new h(0,0,-1),new h(1,0,0),new h(0,1,0),new h(0,0,1)],KSt=[new h(0,-1,0),new h(0,0,-1),new h(0,-1,0),new h(0,-1,0),new h(0,0,1),new h(0,-1,0)],QSt=[new h(0,0,1),new h(1,0,0),new h(-1,0,0),new h(0,0,-1),new h(1,0,0),new h(1,0,0)];function $St(e,t){let n=new Vi;n.fov=D.PI_OVER_TWO,n.near=1,n.far=e._pointLightRadius,n.aspectRatio=1;for(let i=0;i<6;++i){let o=e._passes[i].camera;o.positionWC=e._shadowMapCamera.positionWC,o.positionCartographic=t.mapProjection.ellipsoid.cartesianToCartographic(o.positionWC,o.positionCartographic),o.directionWC=XSt[i],o.upWC=KSt[i],o.rightWC=QSt[i],M.computeView(o.positionWC,o.directionWC,o.upWC,o.rightWC,o.viewMatrix),M.inverse(o.viewMatrix,o.inverseViewMatrix),o.frustum=n}}var JSt=new h,ZSt=new h,mDe=new ce,lDe=mDe.center;function ewt(e,t){let n=e._sceneCamera,i=e._shadowMapCamera,o=mDe;if(e._cascadesEnabled){if(n.frustum.near>=e.maximumDistance){e._outOfView=!0,e._needsUpdate=!1;return}let r=t.mapProjection.ellipsoid.geodeticSurfaceNormal(n.positionWC,JSt),a=h.negate(i.directionWC,ZSt),s=h.dot(r,a);if(e.fadingEnabled){let c=D.clamp(s/.1,0,1);e._darkness=D.lerp(1,e.darkness,c)}else e._darkness=e.darkness;if(s<0){e._outOfView=!0,e._needsUpdate=!1;return}e._needsUpdate=!0,e._outOfView=!1}else if(e._isPointLight)o.center=i.positionWC,o.radius=e._pointLightRadius,e._outOfView=t.cullingVolume.computeVisibility(o)===qt.OUTSIDE,e._needsUpdate=!e._outOfView&&!e._boundingSphere.equals(o),ce.clone(o,e._boundingSphere);else{let r=i.frustum.far/2,a=h.add(i.positionWC,h.multiplyByScalar(i.directionWC,r,lDe),lDe);o.center=a,o.radius=r,e._outOfView=t.cullingVolume.computeVisibility(o)===qt.OUTSIDE,e._needsUpdate=!e._outOfView&&!e._boundingSphere.equals(o),ce.clone(o,e._boundingSphere)}}function twt(e,t){let n=t.camera,i=e._lightCamera,o=e._sceneCamera,r=e._shadowMapCamera;e._cascadesEnabled?h.clone(i.directionWC,r.directionWC):e._isPointLight?h.clone(i.positionWC,r.positionWC):r.clone(i);let a=e._lightDirectionEC;M.multiplyByPointAsVector(n.viewMatrix,r.directionWC,a),h.normalize(a,a),h.negate(a,a),M.multiplyByPoint(n.viewMatrix,r.positionWC,e._lightPositionEC),e._lightPositionEC.w=e._pointLightRadius;let s,c;e._fitNearFar?(s=Math.min(t.shadowState.nearPlane,e.maximumDistance),c=Math.min(t.shadowState.farPlane,e.maximumDistance),c=Math.max(c,s+1)):(s=n.frustum.near,c=e.maximumDistance),e._sceneCamera=bo.clone(n,o),n.frustum.clone(e._sceneCamera.frustum),e._sceneCamera.frustum.near=s,e._sceneCamera.frustum.far=c,e._distance=c-s,ewt(e,t),!e._outOfViewPrevious&&e._outOfView&&(e._needsUpdate=!0),e._outOfViewPrevious=e._outOfView}m0.prototype.update=function(e){if(twt(this,e),this._needsUpdate)if(PSt(this,e.context),this._isPointLight&&$St(this,e),this._cascadesEnabled&&(YSt(this,e),this._numberOfCascades>1&&GSt(this,e)),this._isPointLight)this._shadowMapCullingVolume=Ka.fromBoundingSphere(this._boundingSphere);else{let t=this._shadowMapCamera,n=t.positionWC,i=t.directionWC,o=t.upWC;this._shadowMapCullingVolume=t.frustum.computeCullingVolume(n,i,o),this._passes.length===1&&this._passes[0].camera.clone(t)}if(this._passes.length===1){let t=this._sceneCamera.inverseViewMatrix;M.multiply(this._shadowMapCamera.getViewProjection(),t,this._shadowMapMatrix)}this.debugShow&&kSt(this,e)};m0.prototype.updatePass=function(e,t){fDe(this,e,t)};var nwt=new z;function pDe(e,t,n){let i=e._isPointLight?e._pointBias:n?e._terrainBias:e._primitiveBias,o={shadowMap_texture:function(){return e._shadowMapTexture},shadowMap_textureCube:function(){return e._shadowMapTexture},shadowMap_matrix:function(){return e._shadowMapMatrix},shadowMap_cascadeSplits:function(){return e._cascadeSplits},shadowMap_cascadeMatrices:function(){return e._cascadeMatrices},shadowMap_lightDirectionEC:function(){return e._lightDirectionEC},shadowMap_lightPositionEC:function(){return e._lightPositionEC},shadowMap_cascadeDistances:function(){return e._cascadeDistances},shadowMap_texelSizeDepthBiasAndNormalShadingSmooth:function(){let r=nwt;return r.x=1/e._textureSize.x,r.y=1/e._textureSize.y,se.fromElements(r.x,r.y,i.depthBias,i.normalShadingSmooth,this.combinedUniforms1)},shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness:function(){return se.fromElements(i.normalOffsetScale,e._distance,e.maximumDistance,e._darkness,this.combinedUniforms2)},combinedUniforms1:new se,combinedUniforms2:new se};return wt(t,o,!1)}function iwt(e,t,n,i,o,r){let a,s,c;if(l(r)&&(a=r.shaderProgram,s=r.renderState,c=r.uniformMap),r=tt.shallowClone(n,r),r.castShadows=!0,r.receiveShadows=!1,!l(a)||o!==n.shaderProgram.id||t){let u=n.shaderProgram,f=n.pass===Ie.GLOBE,d=n.pass!==Ie.TRANSLUCENT,p=e._isPointLight,g=e._usesDepthTexture,m=h0.getShadowCastShaderKeyword(p,f,g,d);if(a=i.shaderCache.getDerivedShaderProgram(u,m),!l(a)){let y=u.vertexShaderSource,x=u.fragmentShaderSource,b=h0.createShadowCastVertexShader(y,p,f),C=h0.createShadowCastFragmentShader(x,p,g,d);a=i.shaderCache.createDerivedShaderProgram(u,m,{vertexShaderSource:b,fragmentShaderSource:C,attributeLocations:u._attributeLocations})}s=e._primitiveRenderState,p?s=e._pointRenderState:f&&(s=e._terrainRenderState),n.renderState.cull.enabled||(s=We(s,!1),s.cull=We(s.cull,!1),s.cull.enabled=!1,s=Ve.fromCache(s)),c=pDe(e,n.uniformMap,f)}return r.shaderProgram=a,r.renderState=s,r.uniformMap=c,r}m0.createReceiveDerivedCommand=function(e,t,n,i,o){l(o)||(o={});let r=e.length>0,a=t.shaderProgram,s=a.vertexShaderSource,c=a.fragmentShaderSource,u=t.pass===Ie.GLOBE,f=!1;if(u&&(f=t.owner.data.renderedMesh.encoding.hasVertexNormals),t.receiveShadows&&r){let d,p;l(o.receiveCommand)&&(d=o.receiveCommand.shaderProgram,p=o.receiveCommand.uniformMap),o.receiveCommand=tt.shallowClone(t,o.receiveCommand),o.castShadows=!1,o.receiveShadows=!0;let g=o.receiveShaderCastShadows!==t.castShadows,m=o.receiveShaderProgramId!==t.shaderProgram.id;if(!l(d)||m||n||g){let A=h0.getShadowReceiveShaderKeyword(e[0],t.castShadows,u,f);if(d=i.shaderCache.getDerivedShaderProgram(a,A),!l(d)){let y=h0.createShadowReceiveVertexShader(s,u,f),x=h0.createShadowReceiveFragmentShader(c,e[0],t.castShadows,u,f);d=i.shaderCache.createDerivedShaderProgram(a,A,{vertexShaderSource:y,fragmentShaderSource:x,attributeLocations:a._attributeLocations})}p=pDe(e[0],t.uniformMap,u)}o.receiveCommand.shaderProgram=d,o.receiveCommand.uniformMap=p,o.receiveShaderProgramId=t.shaderProgram.id,o.receiveShaderCastShadows=t.castShadows}return o};m0.createCastDerivedCommand=function(e,t,n,i,o){if(l(o)||(o={}),t.castShadows){let r=o.castCommands;l(r)||(r=o.castCommands=[]);let a=o.castShaderProgramId,s=e.length;r.length=s;for(let c=0;c<s;++c)r[c]=iwt(e[c],n,t,i,a,r[c]);o.castShaderProgramId=t.shaderProgram.id}return o};m0.prototype.isDestroyed=function(){return!1};m0.prototype.destroy=function(){kte(this),this._debugLightFrustum=this._debugLightFrustum&&this._debugLightFrustum.destroy(),this._debugCameraFrustum=this._debugCameraFrustum&&this._debugCameraFrustum.destroy(),this._debugShadowViewCommand=this._debugShadowViewCommand&&this._debugShadowViewCommand.shaderProgram&&this._debugShadowViewCommand.shaderProgram.destroy();for(let e=0;e<this._numberOfCascades;++e)this._debugCascadeFrustums[e]=this._debugCascadeFrustums[e]&&this._debugCascadeFrustums[e].destroy();return fe(this)};var v_=m0;var iz=`uniform sampler2D u_opaqueDepthTexture;
- uniform sampler2D u_translucentDepthTexture;
-
- in vec2 v_textureCoordinates;
-
- void main()
- {
- float opaqueDepth = texture(u_opaqueDepthTexture, v_textureCoordinates).r;
- float translucentDepth = texture(u_translucentDepthTexture, v_textureCoordinates).r;
- translucentDepth = czm_branchFreeTernary(translucentDepth > opaqueDepth, 1.0, translucentDepth);
- out_FragColor = czm_packDepth(translucentDepth);
- }
- `;var gT=`uniform sampler2D colorTexture;
-
- #ifdef DEBUG_SHOW_DEPTH
- uniform sampler2D u_packedTranslucentDepth;
- #endif
-
- in vec2 v_textureCoordinates;
-
- void main()
- {
- #ifdef DEBUG_SHOW_DEPTH
- if (v_textureCoordinates.x < 0.5)
- {
- out_FragColor.rgb = vec3(czm_unpackDepth(texture(u_packedTranslucentDepth, v_textureCoordinates)));
- out_FragColor.a = 1.0;
- }
- #else
- vec4 color = texture(colorTexture, v_textureCoordinates);
-
- #ifdef PICK
- if (color == vec4(0.0))
- {
- discard;
- }
- #else
- // Reverse premultiplication process to get the correct composited result of the classification primitives
- color.rgb /= color.a;
- #endif
- out_FragColor = color;
- #endif
- }
- `;var owt=!1;function Hy(e){this._drawClassificationFBO=new yi({createDepthAttachments:!1}),this._accumulationFBO=new yi({createDepthAttachments:!1}),this._packFBO=new yi,this._opaqueDepthStencilTexture=void 0,this._textureToComposite=void 0,this._translucentDepthStencilTexture=void 0,this._packDepthCommand=void 0,this._accumulateCommand=void 0,this._compositeCommand=void 0,this._copyCommand=void 0,this._clearColorCommand=new ai({color:new V(0,0,0,0),owner:this}),this._clearDepthStencilCommand=new ai({depth:1,stencil:0,owner:this}),this._supported=e.depthTexture,this._viewport=new Je,this._rsDepth=void 0,this._rsAccumulate=void 0,this._rsComp=void 0,this._useScissorTest=void 0,this._scissorRectangle=void 0,this._hasTranslucentDepth=!1,this._frustumsDrawn=0}Object.defineProperties(Hy.prototype,{hasTranslucentDepth:{get:function(){return this._hasTranslucentDepth}}});function gDe(e){e._textureToComposite=void 0,e._translucentDepthStencilTexture=e._translucentDepthStencilTexture&&!e._translucentDepthStencilTexture.isDestroyed()&&e._translucentDepthStencilTexture.destroy()}function _De(e){e._drawClassificationFBO.destroy(),e._accumulationFBO.destroy(),e._packFBO.destroy()}function rwt(e,t,n,i){gDe(e),e._translucentDepthStencilTexture=new It({context:t,width:n,height:i,pixelFormat:Xe.DEPTH_STENCIL,pixelDatatype:je.UNSIGNED_INT_24_8,sampler:jt.NEAREST})}function awt(e,t,n,i){_De(e),e._drawClassificationFBO.setDepthStencilTexture(e._translucentDepthStencilTexture),e._drawClassificationFBO.update(t,n,i),e._accumulationFBO.setDepthStencilTexture(e._translucentDepthStencilTexture),e._accumulationFBO.update(t,n,i),e._packFBO.update(t,n,i)}function swt(e,t,n,i){if(!e.isSupported())return;e._opaqueDepthStencilTexture=i;let o=e._opaqueDepthStencilTexture.width,r=e._opaqueDepthStencilTexture.height;e._drawClassificationFBO.isDirty(o,r)&&(rwt(e,t,o,r),awt(e,t,o,r));let a,s;if(l(e._packDepthCommand)||(a=new He({sources:[iz]}),s={u_opaqueDepthTexture:function(){return e._opaqueDepthStencilTexture},u_translucentDepthTexture:function(){return e._translucentDepthStencilTexture}},e._packDepthCommand=t.createViewportQuadCommand(a,{uniformMap:s,owner:e})),!l(e._compositeCommand)){a=new He({sources:[gT]}),s={colorTexture:function(){return e._textureToComposite}},owt&&(a.defines=["DEBUG_SHOW_DEPTH"],s.u_packedTranslucentDepth=function(){return e._packFBO.getColorTexture()}),e._compositeCommand=t.createViewportQuadCommand(a,{uniformMap:s,owner:e});let f=e._compositeCommand,d=f.shaderProgram,p=t.shaderCache.createDerivedShaderProgram(d,"pick",{vertexShaderSource:d.vertexShaderSource,fragmentShaderSource:new He({sources:a.sources,defines:["PICK"]}),attributeLocations:d._attributeLocations}),g=tt.shallowClone(f);g.shaderProgram=p,f.derivedCommands.pick=g}l(e._copyCommand)||(a=new He({sources:[gT]}),s={colorTexture:function(){return e._drawClassificationFBO.getColorTexture()}},e._copyCommand=t.createViewportQuadCommand(a,{uniformMap:s,owner:e})),l(e._accumulateCommand)||(a=new He({sources:[gT]}),s={colorTexture:function(){return e._drawClassificationFBO.getColorTexture()}},e._accumulateCommand=t.createViewportQuadCommand(a,{uniformMap:s,owner:e})),e._viewport.width=o,e._viewport.height=r;let c=!Je.equals(e._viewport,n.viewport),u=c!==e._useScissorTest;e._useScissorTest=c,Je.equals(e._scissorRectangle,n.viewport)||(e._scissorRectangle=Je.clone(n.viewport,e._scissorRectangle),u=!0),(!l(e._rsDepth)||!Je.equals(e._viewport,e._rsDepth.viewport)||u)&&(e._rsDepth=Ve.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}})),l(e._packDepthCommand)&&(e._packDepthCommand.renderState=e._rsDepth),(!l(e._rsAccumulate)||!Je.equals(e._viewport,e._rsAccumulate.viewport)||u)&&(e._rsAccumulate=Ve.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},stencilTest:{enabled:!0,frontFunction:qn.EQUAL,reference:Gt.CESIUM_3D_TILE_MASK}})),l(e._accumulateCommand)&&(e._accumulateCommand.renderState=e._rsAccumulate),(!l(e._rsComp)||!Je.equals(e._viewport,e._rsComp.viewport)||u)&&(e._rsComp=Ve.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},blending:Jt.ALPHA_BLEND})),l(e._compositeCommand)&&(e._compositeCommand.renderState=e._rsComp,e._compositeCommand.derivedCommands.pick.renderState=e._rsComp)}Hy.prototype.executeTranslucentCommands=function(e,t,n,i,o){let r=e.frameState.useLogDepth,a=e.context,s=n.framebuffer;for(let c=0;c<i.length;++c){let u=i[c];if(u=r?u.derivedCommands.logDepth.command:u,u.depthForTranslucentClassification){this._hasTranslucentDepth=!0;break}}if(this._hasTranslucentDepth){swt(this,a,n,o),n.framebuffer=this._drawClassificationFBO.framebuffer,this._clearDepthStencilCommand.execute(a,n);for(let c=0;c<i.length;++c){let u=i[c];if(u=r?u.derivedCommands.logDepth.command:u,!u.depthForTranslucentClassification)continue;let f=u.derivedCommands.depth.depthOnlyCommand;t(f,e,n)}this._frustumsDrawn+=this._hasTranslucentDepth?1:0,this._hasTranslucentDepth&&(n.framebuffer=this._packFBO.framebuffer,this._packDepthCommand.execute(a,n)),n.framebuffer=s}};Hy.prototype.executeClassificationCommands=function(e,t,n,i){if(!this._hasTranslucentDepth)return;let o=e.context,r=o.uniformState,a=n.framebuffer;n.framebuffer=this._accumulationFBO.framebuffer,this._accumulateCommand.execute(o,n),n.framebuffer=this._drawClassificationFBO.framebuffer,this._frustumsDrawn>1&&this._clearColorCommand.execute(o,n),r.updatePass(Ie.CESIUM_3D_TILE_CLASSIFICATION);let s=r.globeDepthTexture;r.globeDepthTexture=this._packFBO.getColorTexture();let c=i.commands[Ie.CESIUM_3D_TILE_CLASSIFICATION],u=i.indices[Ie.CESIUM_3D_TILE_CLASSIFICATION];for(let f=0;f<u;++f)t(c[f],e,n);r.globeDepthTexture=s,n.framebuffer=a,this._frustumsDrawn!==1&&(n.framebuffer=this._accumulationFBO.framebuffer,this._accumulateCommand.execute(o,n),n.framebuffer=a)};Hy.prototype.execute=function(e,t){if(!this._hasTranslucentDepth)return;this._frustumsDrawn===1?this._textureToComposite=this._drawClassificationFBO.getColorTexture():this._textureToComposite=this._accumulationFBO.getColorTexture(),(e.frameState.passes.pick?this._compositeCommand.derivedCommands.pick:this._compositeCommand).execute(e.context,t),cwt(this,e,t)};function cwt(e,t,n){if(!e._hasTranslucentDepth)return;let i=n.framebuffer;n.framebuffer=e._drawClassificationFBO.framebuffer,e._clearColorCommand.execute(t._context,n),n.framebuffer=i,e._frustumsDrawn>1&&(n.framebuffer=e._accumulationFBO.framebuffer,e._clearColorCommand.execute(t._context,n)),e._hasTranslucentDepth=!1,e._frustumsDrawn=0}Hy.prototype.isSupported=function(){return this._supported};Hy.prototype.isDestroyed=function(){return!1};Hy.prototype.destroy=function(){return gDe(this),_De(this),l(this._compositeCommand)&&(this._compositeCommand.shaderProgram=this._compositeCommand.shaderProgram&&this._compositeCommand.shaderProgram.destroy()),l(this._packDepthCommand)&&(this._packDepthCommand.shaderProgram=this._packDepthCommand.shaderProgram&&this._packDepthCommand.shaderProgram.destroy()),fe(this)};var oz=Hy;function lwt(){this.command=void 0,this.near=void 0,this.far=void 0}function y5(e,t,n){let i=e.context,o;i.depthTexture&&(o=new Q3);let r;e._useOIT&&i.depthTexture&&(r=new Z3(i));let a=new $c(i);a.viewport=Je.clone(n),this.camera=t,this._cameraClone=bo.clone(t),this._cameraStartFired=!1,this._cameraMovedTime=void 0,this.viewport=n,this.passState=a,this.pickFramebuffer=new nz(i),this.pickDepthFramebuffer=new tz,this.sceneFramebuffer=new mT,this.edgeFramebuffer=new X3,this.globeDepth=o,this.globeTranslucencyFramebuffer=new $3,this.oit=r,this.translucentTileClassification=new oz(i),this.pickDepths=[],this.frustumCommandsList=[],this.debugFrustumStatistics=void 0,this._commandExtents=[]}var Ute=new h,Vte=new h;function uwt(e,t,n){let i=Math.max(h.maximumComponent(h.abs(e.position,Ute)),h.maximumComponent(h.abs(t.position,Vte))),o=1/Math.max(1,i);return h.multiplyByScalar(e.position,o,Ute),h.multiplyByScalar(t.position,o,Vte),h.equalsEpsilon(Ute,Vte,n)&&h.equalsEpsilon(e.direction,t.direction,n)&&h.equalsEpsilon(e.up,t.up,n)&&h.equalsEpsilon(e.right,t.right,n)&&M.equalsEpsilon(e.transform,t.transform,n)&&e.frustum.equalsEpsilon(t.frustum,n)}y5.prototype.checkForCameraUpdates=function(e){let t=this.camera,n=this._cameraClone;return uwt(t,n,D.EPSILON15)?(this._cameraStartFired&&Fi()-this._cameraMovedTime>e.cameraEventWaitTime&&(t.moveEnd.raiseEvent(),this._cameraStartFired=!1),!1):(this._cameraStartFired||(t.moveStart.raiseEvent(),this._cameraStartFired=!0),this._cameraMovedTime=Fi(),bo.clone(t,n),!0)};function fwt(e,t,n,i){let{frameState:o}=t,{camera:r,useLogDepth:a}=o,s=a?t.logarithmicDepthFarToNearRatio:t.farToNearRatio,c=t.mode===ie.SCENE2D,u=t.nearToFarDistance2D;i*=1+D.EPSILON2,n=Math.min(Math.max(n,r.frustum.near),r.frustum.far),i=Math.max(Math.min(i,r.frustum.far),n);let f;c?(i=Math.min(i,r.position.z+t.nearToFarDistance2D),n=Math.min(n,i),f=Math.ceil(Math.max(1,i-n)/t.nearToFarDistance2D)):f=Math.ceil(Math.log(i/n)/Math.log(s));let{frustumCommandsList:d}=e;d.length=f;for(let p=0;p<f;++p){let g,m;c?(g=Math.min(i-u,n+p*u),m=Math.min(i,g+u)):(g=Math.max(n,Math.pow(s,p)*n),m=Math.min(i,s*g));let A=d[p];l(A)?(A.near=g,A.far=m):A=d[p]=new K3(g,m)}}function dwt(e,t,n){let{command:i,near:o,far:r}=n;t.debugShowFrustums&&(i.debugOverlappingFrustums=0);let{frustumCommandsList:a}=e;for(let s=0;s<a.length;++s){let c=a[s];if(o>c.far)continue;if(r<c.near)break;let u=i.pass,f=c.indices[u]++;if(c.commands[u][f]=i,t.debugShowFrustums&&(i.debugOverlappingFrustums|=1<<s),i.executeInClosestFrustum)break}if(t.debugShowFrustums){let{debugFrustumStatistics:s}=e,{debugOverlappingFrustums:c}=i,u=s.commandsInFrustums;u[c]=l(u[c])?u[c]+1:1,++s.totalCommands}t.updateDerivedCommands(i)}var ADe=new Ka,hwt=new Qr;y5.prototype.createPotentiallyVisibleSet=function(e){let{frameState:t}=e,{camera:n,commandList:i,shadowState:o}=t,{positionWC:r,directionWC:a,frustum:s}=n,c=e._computeCommandList,u=e._overlayCommandList;e.debugShowFrustums&&(this.debugFrustumStatistics={totalCommands:0,commandsInFrustums:{}});let f=this.frustumCommandsList;for(let B=0;B<f.length;++B)for(let L=0;L<Ie.NUMBER_OF_PASSES;++L)f[B].indices[L]=0;c.length=0,u.length=0;let d=this._commandExtents,p=d.length,g=0,m=+Number.MAX_VALUE,A=-Number.MAX_VALUE,{shadowsEnabled:y}=o,x=+Number.MAX_VALUE,b=-Number.MAX_VALUE,C=Number.MAX_VALUE,E=t.mode===ie.SCENE3D?t.occluder:void 0,{cullingVolume:S}=t,w=ADe.planes;for(let B=0;B<5;++B)w[B]=S.planes[B];S=ADe;for(let B=0;B<i.length;++B){let L=i[B],{pass:_,boundingVolume:T}=L;if(_===Ie.COMPUTE)c.push(L);else if(_===Ie.OVERLAY)u.push(L);else{let v,I;if(l(T)){if(!e.isVisible(S,L,E))continue;let N=T.computePlaneDistances(r,a,hwt);if(v=N.start,I=N.stop,m=Math.min(m,v),A=Math.max(A,I),y&&L.receiveShadows&&v<v_.MAXIMUM_DISTANCE&&!(_===Ie.GLOBE&&v<-100&&I>100)){let j=I-v;_!==Ie.GLOBE&&v<100&&(C=Math.min(C,j)),x=Math.min(x,v),b=Math.max(b,I)}}else L instanceof ai?(v=s.near,I=s.far):(v=s.near,I=s.far,m=Math.min(m,v),A=Math.max(A,I));let O=d[g];l(O)||(O=d[g]=new lwt),O.command=L,O.near=v,O.far=I,g++}}y&&(x=Math.min(Math.max(x,s.near),s.far),b=Math.max(Math.min(b,s.far),x),o.nearPlane=x,o.farPlane=b,o.closestObjectSize=C),fwt(this,e,m,A);for(let B=0;B<g;B++)dwt(this,e,d[B]);if(g<p)for(let B=g;B<p;B++){let L=d[B];if(!l(L.command))break;L.command=void 0}let P=f.length,{frustumSplits:R}=t;R.length=P+1;for(let B=0;B<P;++B)R[B]=f[B].near,B===P-1&&(R[B+1]=f[B].far)};y5.prototype.destroy=function(){this.pickFramebuffer=this.pickFramebuffer&&this.pickFramebuffer.destroy(),this.pickDepthFramebuffer=this.pickDepthFramebuffer&&this.pickDepthFramebuffer.destroy(),this.sceneFramebuffer=this.sceneFramebuffer&&this.sceneFramebuffer.destroy(),this.edgeFramebuffer=this.edgeFramebuffer&&this.edgeFramebuffer.destroy(),this.globeDepth=this.globeDepth&&this.globeDepth.destroy(),this.oit=this.oit&&this.oit.destroy(),this.translucentTileClassification=this.translucentTileClassification&&this.translucentTileClassification.destroy(),this.globeTranslucencyFramebuffer=this.globeTranslucencyFramebuffer&&this.globeTranslucencyFramebuffer.destroy();let e=this.pickDepths;for(let t=0;t<e.length;++t)e[t].destroy()};var _T=y5;var xDe=.1,mwt=new fh({pass:tr.MOST_DETAILED_PRELOAD}),pwt=new fh({pass:tr.MOST_DETAILED_PICK}),rz=new fh({pass:tr.PICK});function Ss(e){this._mostDetailedRayPicks=[],this.pickRenderStateCache={},this._pickPositionCache={},this._pickPositionCacheDirty=!1;let t=new Je(0,0,1,1),n=new bo(e);n.frustum=new fn({width:xDe,aspectRatio:1,near:.1}),this._pickOffscreenView=new _T(e,n,t)}Ss.prototype.update=function(){this._pickPositionCacheDirty=!0};Ss.prototype.getPickDepth=function(e,t){let n=e.view.pickDepths,i=n[t];return l(i)||(i=new Y3,n[t]=i),i};var gwt=new da,_wt=new h,x5=new h,Awt=new z,ywt=new M;function xwt(e,t,n,i,o){let r=e.camera,a=r.frustum,s=a.offCenterFrustum;l(s)&&(a=s);let c=2*(t.x-o.x)/o.width-1;c*=(a.right-a.left)*.5;let u=2*(o.height-t.y-o.y)/o.height-1;u*=(a.top-a.bottom)*.5;let f=M.clone(r.transform,ywt);r._setTransform(M.IDENTITY);let d=h.clone(r.position,_wt);h.multiplyByScalar(r.right,c,x5),h.add(x5,d,d),h.multiplyByScalar(r.up,u,x5),h.add(x5,d,d),r._setTransform(f),e.mode===ie.SCENE2D&&h.fromElements(d.z,d.x,d.y,d);let p=a.getPixelDimensions(o.width,o.height,1,1,Awt),g=gwt;return g.right=p.x*.5,g.left=-g.right,g.top=p.y*.5,g.bottom=-g.top,g.near=a.near,g.far=a.far,g.computeCullingVolume(d,r.directionWC,r.upWC)}var bwt=new du,Cwt=new z;function Twt(e,t,n,i,o){let r=e.camera,a=r.frustum,s=a.near,c=Math.tan(a.fovy*.5),u=a.aspectRatio*c,f=2*(t.x-o.x)/o.width-1,d=2*(o.height-t.y-o.y)/o.height-1,p=f*s*u,g=d*s*c,m=a.getPixelDimensions(o.width,o.height,1,1,Cwt),A=m.x*n*.5,y=m.y*i*.5,x=bwt;return x.top=g+y,x.bottom=g-y,x.right=p+A,x.left=p-A,x.near=s,x.far=a.far,x.computeCullingVolume(r.positionWC,r.directionWC,r.upWC)}function b5(e,t,n,i,o){let r=e.camera.frustum;return r instanceof fn||r instanceof da?xwt(e,t,n,i,o):Twt(e,t,n,i,o)}var az=new Je(0,0,3,3),C5=new z,sz=new V(0,0,0,0);function jte(e,t,n,i,o){return o.width=n??3,o.height=i??o.width,o.x=t.x-(o.width-1)*.5,o.y=e-t.y-(o.height-1)*.5,o}function bDe(e,t,n,i,o){let{context:r,frameState:a,defaultView:s}=e,{viewport:c,pickFramebuffer:u}=s;e.view=s,c.x=0,c.y=0,c.width=r.drawingBufferWidth,c.height=r.drawingBufferHeight;let f=s.passState;f.viewport=Je.clone(c,f.viewport);let d=eo.transformWindowToDrawingBuffer(e,t,C5);jte(r.drawingBufferHeight,d,i,o,n),e.jobScheduler.disableThisFrame(),e.updateFrameState(),a.cullingVolume=b5(e,d,n.width,n.height,c),a.invertClassification=!1,a.passes.pick=!0,a.tilesetPassState=rz,r.uniformState.update(a),e.updateEnvironment(),f=u.begin(n,c),e.updateAndExecuteCommands(f,sz),e.resolveFramebuffers(f)}function CDe(e){let{context:t}=e;t.endFrame()}Ss.prototype.pickAsync=async function(e,t,n,i,o=1){let{context:r,frameState:a,defaultView:s}=e,{pickFramebuffer:c}=s,u=az;bDe(e,t,u,n,i);let f;return r.webgl2?f=c.endAsync(u,a,o):(f=c.end(u,o),f=Promise.resolve(f),_t("picking-async-fallback","Fallback to synchronous picking because async operation requires WebGL2 context.")),CDe(e),f};Ss.prototype.pick=function(e,t,n,i,o=1){let{defaultView:r}=e,{pickFramebuffer:a}=r,s=az;bDe(e,t,s,n,i);let c=a.end(s,o);return CDe(e),c};Ss.prototype.pickVoxelCoordinate=function(e,t,n,i){let{context:o,frameState:r,defaultView:a}=e,{viewport:s,pickFramebuffer:c}=a;e.view=a,s.x=0,s.y=0,s.width=o.drawingBufferWidth,s.height=o.drawingBufferHeight;let u=a.passState;u.viewport=Je.clone(s,u.viewport);let f=eo.transformWindowToDrawingBuffer(e,t,C5),d=jte(o.drawingBufferHeight,f,n,i,az);e.jobScheduler.disableThisFrame(),e.updateFrameState(),r.cullingVolume=b5(e,f,d.width,d.height,s),r.invertClassification=!1,r.passes.pickVoxel=!0,r.tilesetPassState=rz,o.uniformState.update(r),e.updateEnvironment(),u=c.begin(d,s),e.updateAndExecuteCommands(u,sz),e.resolveFramebuffers(u);let p=c.readCenterPixel(d);return o.endFrame(),p};Ss.prototype.pickMetadata=function(e,t,n){let{context:i,frameState:o,defaultView:r}=e,{viewport:a,pickFramebuffer:s}=r;e.view=r,a.x=0,a.y=0,a.width=i.drawingBufferWidth,a.height=i.drawingBufferHeight;let c=r.passState;c.viewport=Je.clone(a,c.viewport);let u=eo.transformWindowToDrawingBuffer(e,t,C5),f=jte(i.drawingBufferHeight,u,1,1,az);e.jobScheduler.disableThisFrame(),e.updateFrameState(),o.cullingVolume=b5(e,u,f.width,f.height,a),o.invertClassification=!1,o.passes.pick=!0,o.tilesetPassState=rz,o.pickingMetadata=!0,o.pickedMetadataInfo=n,i.uniformState.update(o),e.updateEnvironment(),c=s.begin(f,a),e.updateAndExecuteCommands(c,sz);let d=e._environmentState.useOIT;e._environmentState.useOIT=!1,e.resolveFramebuffers(c),e._environmentState.useOIT=d;let p=s.readCenterPixel(f);return i.endFrame(),o.pickingMetadata=!1,q3.decodeMetadataValues(n.classProperty,n.metadataProperty,p)};function Ewt(e,t){let{defaultView:n,context:i,frameState:o,environmentState:r}=e,{viewport:a,pickDepthFramebuffer:s}=n;e.view=n,a.x=0,a.y=0,a.width=i.drawingBufferWidth,a.height=i.drawingBufferHeight;let c=n.passState;c.viewport=Je.clone(a,c.viewport),e.clearPasses(o.passes),o.passes.pick=!0,o.passes.depth=!0,o.cullingVolume=b5(e,t,1,1,a),o.tilesetPassState=rz,e.updateEnvironment(),r.renderTranslucentDepthForPick=!0,c=s.update(i,t,a),e.updateAndExecuteCommands(c,sz),e.resolveFramebuffers(c),i.endFrame()}var vwt=new Vi,Swt=new du,wwt=new fn,Iwt=new da;Ss.prototype.pickPositionWorldCoordinates=function(e,t,n){if(!e.useDepthPicking)return;let i=t.toString();if(this._pickPositionCacheDirty)this._pickPositionCache={},this._pickPositionCacheDirty=!1;else if(this._pickPositionCache.hasOwnProperty(i))return h.clone(this._pickPositionCache[i],n);let{context:o,frameState:r,camera:a,defaultView:s}=e,{uniformState:c}=o;e.view=s;let u=eo.transformWindowToDrawingBuffer(e,t,C5);e.pickTranslucentDepth?Ewt(e,u):(e.updateFrameState(),c.update(r),e.updateEnvironment()),u.y=e.drawingBufferHeight-u.y;let f;l(a.frustum.fov)?f=a.frustum.clone(vwt):l(a.frustum.infiniteProjectionMatrix)?f=a.frustum.clone(Swt):l(a.frustum.width)?f=a.frustum.clone(wwt):f=a.frustum.clone(Iwt);let{frustumCommandsList:d}=s,p=d.length;for(let g=0;g<p;++g){let A=this.getPickDepth(e,g).getDepth(o,u.x,u.y);if(l(A)&&A>0&&A<1){let y=d[g],x;return e.mode===ie.SCENE2D?(x=a.position.z,a.position.z=x-y.near+1,f.far=Math.max(1,y.far-y.near),f.near=1,c.update(r),c.updateFrustum(f)):(f.near=y.near*(g!==0?e.opaqueFrustumNearOffset:1),f.far=y.far,c.updateFrustum(f)),n=eo.drawingBufferToWorldCoordinates(e,u,A,n),e.mode===ie.SCENE2D&&(a.position.z=x,c.update(r)),this._pickPositionCache[i]=h.clone(n),n}}this._pickPositionCache[i]=void 0};var Dwt=new de;Ss.prototype.pickPosition=function(e,t,n){if(n=this.pickPositionWorldCoordinates(e,t,n),l(n)&&e.mode!==ie.SCENE3D){h.fromElements(n.y,n.z,n.x,n);let i=e.mapProjection,o=i.ellipsoid,r=i.unproject(n,Dwt);o.cartographicToCartesian(r,n)}return n};function Pwt(e,t,n,i,o,r){for(let a of e){let s=a.object,c=a.position,u=a.exclude;if(l(c)&&!l(s))return n.push(a),!0;if(!l(s)||!l(s.primitive)||!u&&(n.push(a),n.length>=t))return!0;let f=s.primitive,d=!1;if(typeof f.getGeometryInstanceAttributes=="function"&&l(s.id)){let p=f.getGeometryInstanceAttributes(s.id);l(p)&&l(p.show)&&(d=!0,p.show=En.toValue(!1,p.show),o.push(p))}s instanceof Qa&&(d=!0,s.show=!1,r.push(s)),d||(f.show=!1,i.push(f))}}function TDe(e,t){let n=[],i=[],o=[],r=[];l(t)||(t=Number.MAX_VALUE);let a=e(t);for(;l(a)&&a.length>0&&!Pwt(a,t,n,i,o,r);)a=e(t-n.length);for(let s=0;s<i.length;++s)i[s].show=!0;for(let s=0;s<o.length;++s){let c=o[s];c.show=En.toValue(!0,c.show)}for(let s=0;s<r.length;++s)r[s].show=!0;return n}Ss.prototype.drillPick=function(e,t,n,i,o){return TDe(s=>this.pick(e,t,i,o,s).map(u=>({object:u,position:void 0,exclude:!1})),n).map(s=>s.object)};var yDe=new h,Rwt=new h;function Owt(e,t,n){this.ray=e,this.width=t,this.tilesets=n,this.ready=!1;let i=this;this.promise=new Promise(o=>{i._completePick=()=>{o()}})}function EDe(e,t,n,i){let o=t.direction,r=h.mostOrthogonalAxis(o,yDe),a=h.cross(o,r,yDe),s=h.cross(o,a,Rwt);return i.position=t.origin,i.direction=o,i.up=s,i.right=a,i.frustum.width=n??xDe,i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC)}function Mwt(e,t,n){let i=t.frameState,{ray:o,width:r,tilesets:a}=n,s=e._pickOffscreenView.camera,c=EDe(e,o,r,s),u=mwt;u.camera=s,u.cullingVolume=c;let f=!0,d=a.length;for(let p=0;p<d;++p){let g=a[p];g.show&&t.primitives.contains(g)&&(g.updateForPass(i,u),f=f&&u.ready)}return f&&n._completePick(),f}Ss.prototype.updateMostDetailedRayPicks=function(e){let t=this._mostDetailedRayPicks;for(let n=0;n<t.length;++n)Mwt(this,e,t[n])&&t.splice(n--,1)};function vDe(e,t,n){for(let i=0;i<e.length;++i){let o=e.get(i);o.show&&(l(o.isCesium3DTileset)?(!l(t)||t.indexOf(o)===-1)&&n.push(o):o instanceof su&&vDe(o,t,n))}}function T5(e,t,n,i,o,r){let a=[];if(vDe(t.primitives,i,a),a.length===0)return Promise.resolve(r());let s=new Owt(n,o,a);return e._mostDetailedRayPicks.push(s),s.promise.then(function(){return r()})}function Bwt(e,t){return!l(e)||!l(t)||t.length===0?!1:t.indexOf(e)>-1||t.indexOf(e.primitive)>-1||t.indexOf(e.id)>-1}function Lwt(e,t,n,i,o,r,a){let{context:s,frameState:c}=t,u=s.uniformState,f=e._pickOffscreenView;t.view=f,EDe(e,n,o,f.camera);let d=Je.clone(f.viewport,az),p=f.pickFramebuffer.begin(d,f.viewport);t.jobScheduler.disableThisFrame(),t.updateFrameState(),c.invertClassification=!1,c.passes.pick=!0,c.passes.offscreen=!0,a?c.tilesetPassState=pwt:c.tilesetPassState=rz,u.update(c),t.updateEnvironment(),t.updateAndExecuteCommands(p,sz),t.resolveFramebuffers(p);let g,m=f.pickFramebuffer.end(d,1)[0];if(t.context.depthTexture){let{frustumCommandsList:A}=f,y=A.length;for(let x=0;x<y;++x){let C=e.getPickDepth(t,x).getDepth(s,0,0);if(l(C)&&C>0&&C<1){let E=A[x],S=E.near*(x!==0?t.opaqueFrustumNearOffset:1),w=E.far,P=S+C*(w-S);g=gn.getPoint(n,P);break}}}if(t.view=t.defaultView,s.endFrame(),l(m)||l(g))return{object:m,position:g,exclude:!l(g)&&r||Bwt(m,i)}}function Gte(e,t,n,i,o,r,a,s){return TDe(function(){let u=Lwt(e,t,n,o,r,a,s);return u?[u]:void 0},i)}function cI(e,t,n,i,o,r,a){let s=Gte(e,t,n,1,i,o,r,a);if(s.length>0)return s[0]}function E5(e,t){return new Promise((n,i)=>{t.then(function(o){let r=e.postRender.addEventListener(function(){r(),n(o)});e.requestRender()}).catch(function(o){i(o)})})}Ss.prototype.pickFromRay=function(e,t,n,i){return cI(this,e,t,n,i,!1,!1)};Ss.prototype.drillPickFromRay=function(e,t,n,i,o){return Gte(this,e,t,n,i,o,!1,!1)};Ss.prototype.pickFromRayMostDetailed=function(e,t,n,i){let o=this;return t=gn.clone(t),n=l(n)?n.slice():n,E5(e,T5(o,e,t,n,i,function(){return cI(o,e,t,n,i,!1,!0)}))};Ss.prototype.drillPickFromRayMostDetailed=function(e,t,n,i,o){let r=this;return t=gn.clone(t),i=l(i)?i.slice():i,E5(e,T5(r,e,t,i,o,function(){return Gte(r,e,t,n,i,o,!1,!0)}))};var Nwt=new h,Fwt=new h,kwt=new gn,SDe=new de;function Hte(e,t){let n=e.ellipsoid,i=vi._defaultMaxTerrainHeight,o=n.geodeticSurfaceNormalCartographic(t,Fwt),r=de.toCartesian(t,n,Nwt),a=kwt;a.origin=r,a.direction=o;let s=new gn;return gn.getPoint(a,i,s.origin),h.negate(o,s.direction),s}function wDe(e,t){let n=e.ellipsoid,i=de.fromCartesian(t,n,SDe);return Hte(e,i)}function IDe(e,t){let n=e.ellipsoid;return de.fromCartesian(t,n,SDe).height}function zwt(e,t,n,i,o){let r=Hte(t,n);return T5(e,t,r,i,o,function(){let a=cI(e,t,r,i,o,!0,!0);if(l(a))return IDe(t,a.position)})}function Uwt(e,t,n,i,o,r){let a=wDe(t,n);return T5(e,t,a,i,o,function(){let s=cI(e,t,a,i,o,!0,!0);if(l(s))return h.clone(s.position,r)})}Ss.prototype.sampleHeight=function(e,t,n,i){let o=Hte(e,t),r=cI(this,e,o,n,i,!0,!1);if(l(r))return IDe(e,r.position)};Ss.prototype.clampToHeight=function(e,t,n,i,o){let r=wDe(e,t),a=cI(this,e,r,n,i,!0,!1);if(l(a))return h.clone(a.position,o)};Ss.prototype.sampleHeightMostDetailed=function(e,t,n,i){n=l(n)?n.slice():n;let o=t.length,r=new Array(o);for(let a=0;a<o;++a)r[a]=zwt(this,e,t[a],n,i);return E5(e,Promise.all(r).then(function(a){let s=a.length;for(let c=0;c<s;++c)t[c].height=a[c];return t}))};Ss.prototype.clampToHeightMostDetailed=function(e,t,n,i){n=l(n)?n.slice():n;let o=t.length,r=new Array(o);for(let a=0;a<o;++a)r[a]=Uwt(this,e,t[a],n,i,t[a]);return E5(e,Promise.all(r).then(function(a){let s=a.length;for(let c=0;c<s;++c)t[c]=a[c];return t}))};Ss.prototype.destroy=function(){this._pickOffscreenView=this._pickOffscreenView&&this._pickOffscreenView.destroy()};var cz=Ss;var lz=`uniform sampler2D colorTexture;
-
- in vec2 v_textureCoordinates;
-
- #ifdef AUTO_EXPOSURE
- uniform sampler2D autoExposure;
- #else
- uniform float exposure;
- #endif
-
- void main()
- {
- vec4 fragmentColor = texture(colorTexture, v_textureCoordinates);
- vec3 color = fragmentColor.rgb;
-
- #ifdef AUTO_EXPOSURE
- color /= texture(autoExposure, vec2(0.5)).r;
- #else
- color *= vec3(exposure);
- #endif
- color = czm_acesTonemapping(color);
- color = czm_inverseGamma(color);
-
- out_FragColor = vec4(color, fragmentColor.a);
- }
- `;var uz=`precision highp float;
-
- uniform sampler2D randomTexture;
- uniform sampler2D depthTexture;
- uniform float intensity;
- uniform float bias;
- uniform float lengthCap;
- uniform int stepCount;
- uniform int directionCount;
-
- vec4 pixelToEye(vec2 screenCoordinate)
- {
- vec2 uv = screenCoordinate / czm_viewport.zw;
- float depth = czm_readDepth(depthTexture, uv);
- vec2 xy = 2.0 * uv - vec2(1.0);
- vec4 posEC = czm_inverseProjection * vec4(xy, depth, 1.0);
- posEC = posEC / posEC.w;
- // Avoid numerical error at far plane
- if (depth >= 1.0) {
- posEC.z = czm_currentFrustum.y;
- }
- return posEC;
- }
-
- // Reconstruct surface normal in eye coordinates, avoiding edges
- vec3 getNormalXEdge(vec3 positionEC)
- {
- // Find the 3D surface positions at adjacent screen pixels
- vec2 centerCoord = gl_FragCoord.xy;
- vec3 positionLeft = pixelToEye(centerCoord + vec2(-1.0, 0.0)).xyz;
- vec3 positionRight = pixelToEye(centerCoord + vec2(1.0, 0.0)).xyz;
- vec3 positionUp = pixelToEye(centerCoord + vec2(0.0, 1.0)).xyz;
- vec3 positionDown = pixelToEye(centerCoord + vec2(0.0, -1.0)).xyz;
-
- // Compute potential tangent vectors
- vec3 dx0 = positionEC - positionLeft;
- vec3 dx1 = positionRight - positionEC;
- vec3 dy0 = positionEC - positionDown;
- vec3 dy1 = positionUp - positionEC;
-
- // The shorter tangent is more likely to be on the same surface
- vec3 dx = length(dx0) < length(dx1) ? dx0 : dx1;
- vec3 dy = length(dy0) < length(dy1) ? dy0 : dy1;
-
- return normalize(cross(dx, dy));
- }
-
- const float sqrtTwoPi = sqrt(czm_twoPi);
-
- float gaussian(float x, float standardDeviation) {
- float argument = x / standardDeviation;
- return exp(-0.5 * argument * argument) / (sqrtTwoPi * standardDeviation);
- }
-
- void main(void)
- {
- vec4 positionEC = pixelToEye(gl_FragCoord.xy);
-
- // Exit if we are too close to the back of the frustum, where the depth value is invalid.
- float maxValidDepth = czm_currentFrustum.y - lengthCap;
- if (-positionEC.z > maxValidDepth)
- {
- out_FragColor = vec4(1.0);
- return;
- }
-
- vec3 normalEC = getNormalXEdge(positionEC.xyz);
- float gaussianVariance = lengthCap * sqrt(-positionEC.z);
- // Choose a step length such that the marching stops just before 3 * variance.
- float stepLength = 3.0 * gaussianVariance / (float(stepCount) + 1.0);
- float metersPerPixel = czm_metersPerPixel(positionEC, 1.0);
- // Minimum step is 1 pixel to avoid double sampling
- float pixelsPerStep = max(stepLength / metersPerPixel, 1.0);
- stepLength = pixelsPerStep * metersPerPixel;
-
- float angleStepScale = 1.0 / float(directionCount);
- float angleStep = angleStepScale * czm_twoPi;
- float cosStep = cos(angleStep);
- float sinStep = sin(angleStep);
- mat2 rotateStep = mat2(cosStep, sinStep, -sinStep, cosStep);
-
- // Initial sampling direction (different for each pixel)
- const float randomTextureSize = 255.0;
- vec2 randomTexCoord = fract(gl_FragCoord.xy / randomTextureSize);
- float randomVal = texture(randomTexture, randomTexCoord).x;
- vec2 sampleDirection = vec2(cos(angleStep * randomVal), sin(angleStep * randomVal));
-
- float ao = 0.0;
- // Loop over sampling directions
- #if __VERSION__ == 300
- for (int i = 0; i < directionCount; i++)
- {
- #else
- for (int i = 0; i < 16; i++)
- {
- if (i >= directionCount) {
- break;
- }
- #endif
- sampleDirection = rotateStep * sampleDirection;
-
- float localAO = 0.0;
- vec2 radialStep = pixelsPerStep * sampleDirection;
-
- #if __VERSION__ == 300
- for (int j = 0; j < stepCount; j++)
- {
- #else
- for (int j = 0; j < 64; j++)
- {
- if (j >= stepCount) {
- break;
- }
- #endif
- // Step along sampling direction, away from output pixel
- vec2 samplePixel = floor(gl_FragCoord.xy + float(j + 1) * radialStep) + vec2(0.5);
-
- // Exit if we stepped off the screen
- if (clamp(samplePixel, vec2(0.0), czm_viewport.zw) != samplePixel) {
- break;
- }
-
- // Compute step vector from output point to sampled point
- vec4 samplePositionEC = pixelToEye(samplePixel);
- vec3 stepVector = samplePositionEC.xyz - positionEC.xyz;
-
- // Estimate the angle from the surface normal.
- float dotVal = clamp(dot(normalEC, normalize(stepVector)), 0.0, 1.0);
- dotVal = czm_branchFreeTernary(dotVal > bias, dotVal, 0.0);
- dotVal = czm_branchFreeTernary(-samplePositionEC.z <= maxValidDepth, dotVal, 0.0);
-
- // Weight contribution based on the distance from the output point
- float sampleDistance = length(stepVector);
- float weight = gaussian(sampleDistance, gaussianVariance);
- localAO += weight * dotVal;
- }
- ao += localAO;
- }
-
- ao *= angleStepScale * stepLength;
- ao = 1.0 - clamp(ao, 0.0, 1.0);
- ao = pow(ao, intensity);
- out_FragColor = vec4(vec3(ao), 1.0);
- }
- `;var fz=`uniform sampler2D colorTexture;
- uniform sampler2D ambientOcclusionTexture;
- uniform bool ambientOcclusionOnly;
- in vec2 v_textureCoordinates;
-
- void main(void)
- {
- vec4 color = texture(colorTexture, v_textureCoordinates);
- vec4 ao = texture(ambientOcclusionTexture, v_textureCoordinates);
- out_FragColor = ambientOcclusionOnly ? ao : ao * color;
- }
- `;var dz=`uniform sampler2D colorTexture;
- uniform float gradations;
-
- in vec2 v_textureCoordinates;
-
- void main(void)
- {
- vec3 rgb = texture(colorTexture, v_textureCoordinates).rgb;
- #ifdef CZM_SELECTED_FEATURE
- if (czm_selected()) {
- out_FragColor = vec4(rgb, 1.0);
- return;
- }
- #endif
- float luminance = czm_luminance(rgb);
- float darkness = luminance * gradations;
- darkness = (darkness - fract(darkness)) / gradations;
- out_FragColor = vec4(vec3(darkness), 1.0);
- }
- `;var hz=`uniform sampler2D colorTexture;
- uniform sampler2D bloomTexture;
- uniform bool glowOnly;
-
- in vec2 v_textureCoordinates;
-
- void main(void)
- {
- vec4 color = texture(colorTexture, v_textureCoordinates);
-
- #ifdef CZM_SELECTED_FEATURE
- if (czm_selected()) {
- out_FragColor = color;
- return;
- }
- #endif
-
- vec4 bloom = texture(bloomTexture, v_textureCoordinates);
- out_FragColor = glowOnly ? bloom : bloom + color;
- }
- `;var mz=`uniform sampler2D colorTexture;
- uniform float brightness;
-
- in vec2 v_textureCoordinates;
-
- void main(void)
- {
- vec3 rgb = texture(colorTexture, v_textureCoordinates).rgb;
- vec3 target = vec3(0.0);
- out_FragColor = vec4(mix(target, rgb, brightness), 1.0);
- }
- `;var pz=`uniform sampler2D colorTexture;
- uniform float contrast;
- uniform float brightness;
-
- in vec2 v_textureCoordinates;
-
- void main(void)
- {
- vec3 sceneColor = texture(colorTexture, v_textureCoordinates).xyz;
- sceneColor = czm_RGBToHSB(sceneColor);
- sceneColor.z += brightness;
- sceneColor = czm_HSBToRGB(sceneColor);
-
- float factor = (259.0 * (contrast + 255.0)) / (255.0 * (259.0 - contrast));
- sceneColor = factor * (sceneColor - vec3(0.5)) + vec3(0.5);
- out_FragColor = vec4(sceneColor, 1.0);
- }
- `;var gz=`uniform sampler2D colorTexture;
- uniform sampler2D blurTexture;
- uniform sampler2D depthTexture;
- uniform float focalDistance;
-
- in vec2 v_textureCoordinates;
-
- vec4 toEye(vec2 uv, float depth)
- {
- vec2 xy = vec2((uv.x * 2.0 - 1.0), ((1.0 - uv.y) * 2.0 - 1.0));
- vec4 posInCamera = czm_inverseProjection * vec4(xy, depth, 1.0);
- posInCamera = posInCamera / posInCamera.w;
- return posInCamera;
- }
-
- float computeDepthBlur(float depth)
- {
- float f;
- if (depth < focalDistance)
- {
- f = (focalDistance - depth) / (focalDistance - czm_currentFrustum.x);
- }
- else
- {
- f = (depth - focalDistance) / (czm_currentFrustum.y - focalDistance);
- f = pow(f, 0.1);
- }
- f *= f;
- f = clamp(f, 0.0, 1.0);
- return pow(f, 0.5);
- }
-
- void main(void)
- {
- float depth = czm_readDepth(depthTexture, v_textureCoordinates);
- vec4 posInCamera = toEye(v_textureCoordinates, depth);
- float d = computeDepthBlur(-posInCamera.z);
- out_FragColor = mix(texture(colorTexture, v_textureCoordinates), texture(blurTexture, v_textureCoordinates), d);
- }
- `;var _z=`uniform sampler2D depthTexture;
-
- in vec2 v_textureCoordinates;
-
- void main(void)
- {
- float depth = czm_readDepth(depthTexture, v_textureCoordinates);
- out_FragColor = vec4(vec3(depth), 1.0);
- }
- `;var Az=`uniform sampler2D depthTexture;
- uniform float length;
- uniform vec4 color;
-
- in vec2 v_textureCoordinates;
-
- void main(void)
- {
- float directions[3];
- directions[0] = -1.0;
- directions[1] = 0.0;
- directions[2] = 1.0;
-
- float scalars[3];
- scalars[0] = 3.0;
- scalars[1] = 10.0;
- scalars[2] = 3.0;
-
- float padx = czm_pixelRatio / czm_viewport.z;
- float pady = czm_pixelRatio / czm_viewport.w;
-
- #ifdef CZM_SELECTED_FEATURE
- bool selected = false;
- for (int i = 0; i < 3; ++i)
- {
- float dir = directions[i];
- selected = selected || czm_selected(vec2(-padx, dir * pady));
- selected = selected || czm_selected(vec2(padx, dir * pady));
- selected = selected || czm_selected(vec2(dir * padx, -pady));
- selected = selected || czm_selected(vec2(dir * padx, pady));
- if (selected)
- {
- break;
- }
- }
- if (!selected)
- {
- out_FragColor = vec4(color.rgb, 0.0);
- return;
- }
- #endif
-
- float horizEdge = 0.0;
- float vertEdge = 0.0;
-
- for (int i = 0; i < 3; ++i)
- {
- float dir = directions[i];
- float scale = scalars[i];
-
- horizEdge -= texture(depthTexture, v_textureCoordinates + vec2(-padx, dir * pady)).x * scale;
- horizEdge += texture(depthTexture, v_textureCoordinates + vec2(padx, dir * pady)).x * scale;
-
- vertEdge -= texture(depthTexture, v_textureCoordinates + vec2(dir * padx, -pady)).x * scale;
- vertEdge += texture(depthTexture, v_textureCoordinates + vec2(dir * padx, pady)).x * scale;
- }
-
- float len = sqrt(horizEdge * horizEdge + vertEdge * vertEdge);
- out_FragColor = vec4(color.rgb, len > length ? color.a : 0.0);
- }
- `;var yz=`uniform sampler2D colorTexture;
-
- in vec2 v_textureCoordinates;
-
- #ifdef AUTO_EXPOSURE
- uniform sampler2D autoExposure;
- #else
- uniform float exposure;
- #endif
-
- // See slides 142 and 143:
- // http://www.gdcvault.com/play/1012459/Uncharted_2__HDR_Lighting
-
- void main()
- {
- vec4 fragmentColor = texture(colorTexture, v_textureCoordinates);
- vec3 color = fragmentColor.rgb;
-
- #ifdef AUTO_EXPOSURE
- float exposure = texture(autoExposure, vec2(0.5)).r;
- color /= exposure;
- #else
- color *= vec3(exposure);
- #endif
-
- const float A = 0.22; // shoulder strength
- const float B = 0.30; // linear strength
- const float C = 0.10; // linear angle
- const float D = 0.20; // toe strength
- const float E = 0.01; // toe numerator
- const float F = 0.30; // toe denominator
-
- const float white = 11.2; // linear white point value
-
- vec3 c = ((color * (A * color + C * B) + D * E) / (color * ( A * color + B) + D * F)) - E / F;
- float w = ((white * (A * white + C * B) + D * E) / (white * ( A * white + B) + D * F)) - E / F;
-
- c = czm_inverseGamma(c / w);
- out_FragColor = vec4(c, fragmentColor.a);
- }
- `;var xz=`uniform sampler2D colorTexture;
-
- in vec2 v_textureCoordinates;
-
- #ifdef AUTO_EXPOSURE
- uniform sampler2D autoExposure;
- #else
- uniform float exposure;
- #endif
-
- void main()
- {
- vec4 fragmentColor = texture(colorTexture, v_textureCoordinates);
- vec3 color = fragmentColor.rgb;
-
- #ifdef AUTO_EXPOSURE
- color /= texture(autoExposure, vec2(0.5)).r;
- #else
- color *= vec3(exposure);
- #endif
- color = czm_pbrNeutralTonemapping(color);
- color = czm_inverseGamma(color);
-
- out_FragColor = vec4(color, fragmentColor.a);
- }
- `;var bz=`in vec2 v_textureCoordinates;
-
- uniform sampler2D colorTexture;
-
- const float fxaaQualitySubpix = 0.5;
- const float fxaaQualityEdgeThreshold = 0.125;
- const float fxaaQualityEdgeThresholdMin = 0.0833;
-
- void main()
- {
- vec2 fxaaQualityRcpFrame = vec2(1.0) / czm_viewport.zw;
- vec4 color = FxaaPixelShader(
- v_textureCoordinates,
- colorTexture,
- fxaaQualityRcpFrame,
- fxaaQualitySubpix,
- fxaaQualityEdgeThreshold,
- fxaaQualityEdgeThresholdMin);
- float alpha = texture(colorTexture, v_textureCoordinates).a;
- out_FragColor = vec4(color.rgb, alpha);
- }
- `;var Wy=`#define SAMPLES 8
-
- uniform float delta;
- uniform float sigma;
- uniform float direction; // 0.0 for x direction, 1.0 for y direction
-
- uniform sampler2D colorTexture;
-
- #ifdef USE_STEP_SIZE
- uniform float stepSize;
- #else
- uniform vec2 step;
- #endif
-
- in vec2 v_textureCoordinates;
-
- // Incremental Computation of the Gaussian:
- // https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch40.html
-
- void main()
- {
- vec2 st = v_textureCoordinates;
- vec2 dir = vec2(1.0 - direction, direction);
-
- #ifdef USE_STEP_SIZE
- vec2 step = vec2(stepSize * (czm_pixelRatio / czm_viewport.zw));
- #else
- vec2 step = step;
- #endif
-
- vec3 g;
- g.x = 1.0 / (sqrt(czm_twoPi) * sigma);
- g.y = exp((-0.5 * delta * delta) / (sigma * sigma));
- g.z = g.y * g.y;
-
- vec4 result = texture(colorTexture, st) * g.x;
- for (int i = 1; i < SAMPLES; ++i)
- {
- g.xy *= g.yz;
-
- vec2 offset = float(i) * dir * step;
- result += texture(colorTexture, st - offset) * g.x;
- result += texture(colorTexture, st + offset) * g.x;
- }
-
- out_FragColor = result;
- }
- `;var Cz=`uniform sampler2D colorTexture;
- uniform sampler2D dirtTexture;
- uniform sampler2D starTexture;
- uniform vec2 dirtTextureDimensions;
- uniform float distortion;
- uniform float ghostDispersal;
- uniform float haloWidth;
- uniform float dirtAmount;
- uniform float earthRadius;
- uniform float intensity;
-
- in vec2 v_textureCoordinates;
-
- // whether it is in space or not
- // 6500000.0 is empirical value
- #define DISTANCE_TO_SPACE 6500000.0
-
- // return ndc from world coordinate biased earthRadius
- vec4 getNDCFromWC(vec3 WC, float earthRadius)
- {
- vec4 positionEC = czm_view * vec4(WC, 1.0);
- positionEC = vec4(positionEC.x + earthRadius, positionEC.y, positionEC.z, 1.0);
- vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);
- return czm_viewportOrthographic * vec4(positionWC.xy, -positionWC.z, 1.0);
- }
-
- // Check if current pixel is included Earth
- // if then mask it gradually
- float isInEarth(vec2 texcoord, vec2 sceneSize)
- {
- vec2 NDC = texcoord * 2.0 - 1.0;
- vec4 earthPosSC = getNDCFromWC(vec3(0.0), 0.0);
- vec4 earthPosSCEdge = getNDCFromWC(vec3(0.0), earthRadius * 1.5);
- NDC.xy -= earthPosSC.xy;
-
- float X = abs(NDC.x) * sceneSize.x;
- float Y = abs(NDC.y) * sceneSize.y;
-
- return clamp(0.0, 1.0, max(sqrt(X * X + Y * Y) / max(abs(earthPosSCEdge.x * sceneSize.x), 1.0) - 0.8 , 0.0));
- }
-
- // For Chromatic effect
- vec4 textureDistorted(sampler2D tex, vec2 texcoord, vec2 direction, vec3 distortion, bool isSpace)
- {
- vec2 sceneSize = czm_viewport.zw;
- vec3 color;
- if(isSpace)
- {
- color.r = isInEarth(texcoord + direction * distortion.r, sceneSize) * texture(tex, texcoord + direction * distortion.r).r;
- color.g = isInEarth(texcoord + direction * distortion.g, sceneSize) * texture(tex, texcoord + direction * distortion.g).g;
- color.b = isInEarth(texcoord + direction * distortion.b, sceneSize) * texture(tex, texcoord + direction * distortion.b).b;
- }
- else
- {
- color.r = texture(tex, texcoord + direction * distortion.r).r;
- color.g = texture(tex, texcoord + direction * distortion.g).g;
- color.b = texture(tex, texcoord + direction * distortion.b).b;
- }
- return vec4(clamp(color, 0.0, 1.0), 0.0);
- }
-
- void main(void)
- {
- vec4 originalColor = texture(colorTexture, v_textureCoordinates);
- vec3 rgb = originalColor.rgb;
- bool isSpace = length(czm_viewerPositionWC.xyz) > DISTANCE_TO_SPACE;
-
- // Sun position
- vec4 sunPos = czm_morphTime == 1.0 ? vec4(czm_sunPositionWC, 1.0) : vec4(czm_sunPositionColumbusView.zxy, 1.0);
- vec4 sunPositionEC = czm_view * sunPos;
- vec4 sunPositionWC = czm_eyeToWindowCoordinates(sunPositionEC);
- sunPos = czm_viewportOrthographic * vec4(sunPositionWC.xy, -sunPositionWC.z, 1.0);
-
- // If sun is not in the screen space, use original color.
- if(!isSpace || !((sunPos.x >= -1.1 && sunPos.x <= 1.1) && (sunPos.y >= -1.1 && sunPos.y <= 1.1)))
- {
- // Lens flare is disabled when not in space until #5932 is fixed.
- // https://github.com/CesiumGS/cesium/issues/5932
- out_FragColor = originalColor;
- return;
- }
-
- vec2 texcoord = vec2(1.0) - v_textureCoordinates;
- vec2 pixelSize = czm_pixelRatio / czm_viewport.zw;
- vec2 invPixelSize = 1.0 / pixelSize;
- vec3 distortionVec = pixelSize.x * vec3(-distortion, 0.0, distortion);
-
- // ghost vector to image centre:
- vec2 ghostVec = (vec2(0.5) - texcoord) * ghostDispersal;
- vec3 direction = normalize(vec3(ghostVec, 0.0));
-
- // sample ghosts:
- vec4 result = vec4(0.0);
- vec4 ghost = vec4(0.0);
- for (int i = 0; i < 4; ++i)
- {
- vec2 offset = fract(texcoord + ghostVec * float(i));
- // Only bright spots from the centre of the source image
- ghost += textureDistorted(colorTexture, offset, direction.xy, distortionVec, isSpace);
- }
- result += ghost;
-
- // sample halo
- vec2 haloVec = normalize(ghostVec) * haloWidth;
- float weightForHalo = length(vec2(0.5) - fract(texcoord + haloVec)) / length(vec2(0.5));
- weightForHalo = pow(1.0 - weightForHalo, 5.0);
-
- result += textureDistorted(colorTexture, texcoord + haloVec, direction.xy, distortionVec, isSpace) * weightForHalo * 1.5;
-
- // dirt on lens
- vec2 dirtTexCoords = (v_textureCoordinates * invPixelSize) / dirtTextureDimensions;
- if (dirtTexCoords.x > 1.0)
- {
- dirtTexCoords.x = mod(floor(dirtTexCoords.x), 2.0) == 1.0 ? 1.0 - fract(dirtTexCoords.x) : fract(dirtTexCoords.x);
- }
- if (dirtTexCoords.y > 1.0)
- {
- dirtTexCoords.y = mod(floor(dirtTexCoords.y), 2.0) == 1.0 ? 1.0 - fract(dirtTexCoords.y) : fract(dirtTexCoords.y);
- }
- result += dirtAmount * texture(dirtTexture, dirtTexCoords);
-
- // Rotating starburst texture's coordinate
- // dot(czm_view[0].xyz, vec3(0.0, 0.0, 1.0)) + dot(czm_view[1].xyz, vec3(0.0, 1.0, 0.0))
- float camrot = czm_view[0].z + czm_view[1].y;
- float cosValue = cos(camrot);
- float sinValue = sin(camrot);
- mat3 rotation = mat3(
- cosValue, -sinValue, 0.0,
- sinValue, cosValue, 0.0,
- 0.0, 0.0, 1.0
- );
-
- vec3 st1 = vec3(v_textureCoordinates * 2.0 - vec2(1.0), 1.0);
- vec3 st2 = vec3((rotation * st1).xy, 1.0);
- vec3 st3 = st2 * 0.5 + vec3(0.5);
- vec2 lensStarTexcoord = st3.xy;
- float weightForLensFlare = length(vec3(sunPos.xy, 0.0));
- float oneMinusWeightForLensFlare = max(1.0 - weightForLensFlare, 0.0);
-
- if (!isSpace)
- {
- result *= oneMinusWeightForLensFlare * intensity * 0.2;
- }
- else
- {
- result *= oneMinusWeightForLensFlare * intensity;
- result *= texture(starTexture, lensStarTexcoord) * pow(weightForLensFlare, 1.0) * max((1.0 - length(vec3(st1.xy, 0.0))), 0.0) * 2.0;
- }
-
- result += texture(colorTexture, v_textureCoordinates);
-
- out_FragColor = result;
- }
- `;var Tz=`uniform sampler2D colorTexture;
- uniform vec3 white;
-
- in vec2 v_textureCoordinates;
-
- #ifdef AUTO_EXPOSURE
- uniform sampler2D autoExposure;
- #else
- uniform float exposure;
- #endif
-
- // See equation 4:
- // http://www.cs.utah.edu/~reinhard/cdrom/tonemap.pdf
-
- void main()
- {
- vec4 fragmentColor = texture(colorTexture, v_textureCoordinates);
- vec3 color = fragmentColor.rgb;
- #ifdef AUTO_EXPOSURE
- float exposure = texture(autoExposure, vec2(0.5)).r;
- color /= exposure;
- #else
- color *= vec3(exposure);
- #endif
- color = (color * (1.0 + color / white)) / (1.0 + color);
- color = czm_inverseGamma(color);
- out_FragColor = vec4(color, fragmentColor.a);
- }
- `;var Ez=`uniform sampler2D colorTexture;
-
- in vec2 v_textureCoordinates;
-
- float rand(vec2 co)
- {
- return fract(sin(dot(co.xy ,vec2(12.9898, 78.233))) * 43758.5453);
- }
-
- void main(void)
- {
- float noiseValue = rand(v_textureCoordinates + sin(czm_frameNumber)) * 0.1;
- vec3 rgb = texture(colorTexture, v_textureCoordinates).rgb;
- vec3 green = vec3(0.0, 1.0, 0.0);
- out_FragColor = vec4((noiseValue + rgb) * green, 1.0);
- }
- `;var vz=`uniform sampler2D colorTexture;
-
- in vec2 v_textureCoordinates;
-
- #ifdef AUTO_EXPOSURE
- uniform sampler2D autoExposure;
- #else
- uniform float exposure;
- #endif
-
- // See equation 3:
- // http://www.cs.utah.edu/~reinhard/cdrom/tonemap.pdf
-
- void main()
- {
- vec4 fragmentColor = texture(colorTexture, v_textureCoordinates);
- vec3 color = fragmentColor.rgb;
- #ifdef AUTO_EXPOSURE
- float exposure = texture(autoExposure, vec2(0.5)).r;
- color /= exposure;
- #else
- color *= vec3(exposure);
- #endif
- color = color / (1.0 + color);
- color = czm_inverseGamma(color);
- out_FragColor = vec4(color, fragmentColor.a);
- }
- `;var Sz=`uniform sampler2D colorTexture;
- uniform sampler2D silhouetteTexture;
-
- in vec2 v_textureCoordinates;
-
- void main(void)
- {
- vec4 silhouetteColor = texture(silhouetteTexture, v_textureCoordinates);
- vec4 color = texture(colorTexture, v_textureCoordinates);
- out_FragColor = mix(color, silhouetteColor, silhouetteColor.a);
- }
- `;/**
- * @license
- * Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of NVIDIA CORPORATION nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */var wz=`/**
- * @license
- * Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of NVIDIA CORPORATION nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS \`\`AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
- // NVIDIA GameWorks Graphics Samples GitHub link: https://github.com/NVIDIAGameWorks/GraphicsSamples
- // Original source (archived): https://archive.org/details/nvidiagame-works-graphics-samples-master
- // Original FXAA 3.11 shader link: https://github.com/NVIDIAGameWorks/GraphicsSamples/blob/master/samples/es3-kepler/FXAA/FXAA3_11.h
- // Shader link in fork: https://github.com/lyntel/GraphicsSamples/blob/3d30817ebeeade64fe6a4fc3aa1fe4265c29b6fd/samples/es3-kepler/FXAA/FXAA3_11.h
-
- // Steps used to integrate into Cesium:
- // * The following defines are set:
- // #define FXAA_PC 1
- // #define FXAA_WEBGL_1 1
- // #define FXAA_GREEN_AS_LUMA 1
- // #define FXAA_EARLY_EXIT 1
- // #define FXAA_GLSL_120 1
- // * All other preprocessor directives besides the FXAA_QUALITY__P* directives were removed.
- // * Double underscores are invalid for preprocessor directives so replace them with a single underscore. Replace
- // /FXAA_QUALITY__P(.*)/g with /FXAA_QUALITY__P$1/.
- // * There are no implicit conversions from ivec* to vec* so replace:
- // #define FxaaInt2 ivec2
- // with
- // #define FxaaInt2 vec2
- // * The texture2DLod function is only available in vertex shaders so replace:
- // #define FxaaTexTop(t, p) texture2DLod(t, p, 0.0)
- // #define FxaaTexOff(t, p, o, r) texture2DLod(t, p + (o * r), 0.0)
- // with
- // #define FxaaTexTop(t, p) texture(t, p)
- // #define FxaaTexOff(t, p, o, r) texture(t, p + (o * r))
- // * FXAA_QUALITY_PRESET is prepended in the javascript code. We may want to expose that setting in the future.
- // * The following parameters to FxaaPixelShader are unused and can be removed:
- // fxaaConsolePosPos
- // fxaaConsoleRcpFrameOpt
- // fxaaConsoleRcpFrameOpt2
- // fxaaConsole360RcpFrameOpt2
- // fxaaConsoleEdgeSharpness
- // fxaaConsoleEdgeThreshold
- // fxaaConsoleEdgeThresholdMi
- // fxaaConsole360ConstDir
-
- //
- // Choose the quality preset.
- // This needs to be compiled into the shader as it effects code.
- // Best option to include multiple presets is to
- // in each shader define the preset, then include this file.
- //
- // OPTIONS
- // -----------------------------------------------------------------------
- // 10 to 15 - default medium dither (10=fastest, 15=highest quality)
- // 20 to 29 - less dither, more expensive (20=fastest, 29=highest quality)
- // 39 - no dither, very expensive
- //
- // NOTES
- // -----------------------------------------------------------------------
- // 12 = slightly faster then FXAA 3.9 and higher edge quality (default)
- // 13 = about same speed as FXAA 3.9 and better than 12
- // 23 = closest to FXAA 3.9 visually and performance wise
- // _ = the lowest digit is directly related to performance
- // _ = the highest digit is directly related to style
- //
- //#define FXAA_QUALITY_PRESET 12
-
-
- #if (FXAA_QUALITY_PRESET == 10)
- #define FXAA_QUALITY_PS 3
- #define FXAA_QUALITY_P0 1.5
- #define FXAA_QUALITY_P1 3.0
- #define FXAA_QUALITY_P2 12.0
- #endif
- #if (FXAA_QUALITY_PRESET == 11)
- #define FXAA_QUALITY_PS 4
- #define FXAA_QUALITY_P0 1.0
- #define FXAA_QUALITY_P1 1.5
- #define FXAA_QUALITY_P2 3.0
- #define FXAA_QUALITY_P3 12.0
- #endif
- #if (FXAA_QUALITY_PRESET == 12)
- #define FXAA_QUALITY_PS 5
- #define FXAA_QUALITY_P0 1.0
- #define FXAA_QUALITY_P1 1.5
- #define FXAA_QUALITY_P2 2.0
- #define FXAA_QUALITY_P3 4.0
- #define FXAA_QUALITY_P4 12.0
- #endif
- #if (FXAA_QUALITY_PRESET == 13)
- #define FXAA_QUALITY_PS 6
- #define FXAA_QUALITY_P0 1.0
- #define FXAA_QUALITY_P1 1.5
- #define FXAA_QUALITY_P2 2.0
- #define FXAA_QUALITY_P3 2.0
- #define FXAA_QUALITY_P4 4.0
- #define FXAA_QUALITY_P5 12.0
- #endif
- #if (FXAA_QUALITY_PRESET == 14)
- #define FXAA_QUALITY_PS 7
- #define FXAA_QUALITY_P0 1.0
- #define FXAA_QUALITY_P1 1.5
- #define FXAA_QUALITY_P2 2.0
- #define FXAA_QUALITY_P3 2.0
- #define FXAA_QUALITY_P4 2.0
- #define FXAA_QUALITY_P5 4.0
- #define FXAA_QUALITY_P6 12.0
- #endif
- #if (FXAA_QUALITY_PRESET == 15)
- #define FXAA_QUALITY_PS 8
- #define FXAA_QUALITY_P0 1.0
- #define FXAA_QUALITY_P1 1.5
- #define FXAA_QUALITY_P2 2.0
- #define FXAA_QUALITY_P3 2.0
- #define FXAA_QUALITY_P4 2.0
- #define FXAA_QUALITY_P5 2.0
- #define FXAA_QUALITY_P6 4.0
- #define FXAA_QUALITY_P7 12.0
- #endif
- #if (FXAA_QUALITY_PRESET == 20)
- #define FXAA_QUALITY_PS 3
- #define FXAA_QUALITY_P0 1.5
- #define FXAA_QUALITY_P1 2.0
- #define FXAA_QUALITY_P2 8.0
- #endif
- #if (FXAA_QUALITY_PRESET == 21)
- #define FXAA_QUALITY_PS 4
- #define FXAA_QUALITY_P0 1.0
- #define FXAA_QUALITY_P1 1.5
- #define FXAA_QUALITY_P2 2.0
- #define FXAA_QUALITY_P3 8.0
- #endif
- #if (FXAA_QUALITY_PRESET == 22)
- #define FXAA_QUALITY_PS 5
- #define FXAA_QUALITY_P0 1.0
- #define FXAA_QUALITY_P1 1.5
- #define FXAA_QUALITY_P2 2.0
- #define FXAA_QUALITY_P3 2.0
- #define FXAA_QUALITY_P4 8.0
- #endif
- #if (FXAA_QUALITY_PRESET == 23)
- #define FXAA_QUALITY_PS 6
- #define FXAA_QUALITY_P0 1.0
- #define FXAA_QUALITY_P1 1.5
- #define FXAA_QUALITY_P2 2.0
- #define FXAA_QUALITY_P3 2.0
- #define FXAA_QUALITY_P4 2.0
- #define FXAA_QUALITY_P5 8.0
- #endif
- #if (FXAA_QUALITY_PRESET == 24)
- #define FXAA_QUALITY_PS 7
- #define FXAA_QUALITY_P0 1.0
- #define FXAA_QUALITY_P1 1.5
- #define FXAA_QUALITY_P2 2.0
- #define FXAA_QUALITY_P3 2.0
- #define FXAA_QUALITY_P4 2.0
- #define FXAA_QUALITY_P5 3.0
- #define FXAA_QUALITY_P6 8.0
- #endif
- #if (FXAA_QUALITY_PRESET == 25)
- #define FXAA_QUALITY_PS 8
- #define FXAA_QUALITY_P0 1.0
- #define FXAA_QUALITY_P1 1.5
- #define FXAA_QUALITY_P2 2.0
- #define FXAA_QUALITY_P3 2.0
- #define FXAA_QUALITY_P4 2.0
- #define FXAA_QUALITY_P5 2.0
- #define FXAA_QUALITY_P6 4.0
- #define FXAA_QUALITY_P7 8.0
- #endif
- #if (FXAA_QUALITY_PRESET == 26)
- #define FXAA_QUALITY_PS 9
- #define FXAA_QUALITY_P0 1.0
- #define FXAA_QUALITY_P1 1.5
- #define FXAA_QUALITY_P2 2.0
- #define FXAA_QUALITY_P3 2.0
- #define FXAA_QUALITY_P4 2.0
- #define FXAA_QUALITY_P5 2.0
- #define FXAA_QUALITY_P6 2.0
- #define FXAA_QUALITY_P7 4.0
- #define FXAA_QUALITY_P8 8.0
- #endif
- #if (FXAA_QUALITY_PRESET == 27)
- #define FXAA_QUALITY_PS 10
- #define FXAA_QUALITY_P0 1.0
- #define FXAA_QUALITY_P1 1.5
- #define FXAA_QUALITY_P2 2.0
- #define FXAA_QUALITY_P3 2.0
- #define FXAA_QUALITY_P4 2.0
- #define FXAA_QUALITY_P5 2.0
- #define FXAA_QUALITY_P6 2.0
- #define FXAA_QUALITY_P7 2.0
- #define FXAA_QUALITY_P8 4.0
- #define FXAA_QUALITY_P9 8.0
- #endif
- #if (FXAA_QUALITY_PRESET == 28)
- #define FXAA_QUALITY_PS 11
- #define FXAA_QUALITY_P0 1.0
- #define FXAA_QUALITY_P1 1.5
- #define FXAA_QUALITY_P2 2.0
- #define FXAA_QUALITY_P3 2.0
- #define FXAA_QUALITY_P4 2.0
- #define FXAA_QUALITY_P5 2.0
- #define FXAA_QUALITY_P6 2.0
- #define FXAA_QUALITY_P7 2.0
- #define FXAA_QUALITY_P8 2.0
- #define FXAA_QUALITY_P9 4.0
- #define FXAA_QUALITY_P10 8.0
- #endif
- #if (FXAA_QUALITY_PRESET == 29)
- #define FXAA_QUALITY_PS 12
- #define FXAA_QUALITY_P0 1.0
- #define FXAA_QUALITY_P1 1.5
- #define FXAA_QUALITY_P2 2.0
- #define FXAA_QUALITY_P3 2.0
- #define FXAA_QUALITY_P4 2.0
- #define FXAA_QUALITY_P5 2.0
- #define FXAA_QUALITY_P6 2.0
- #define FXAA_QUALITY_P7 2.0
- #define FXAA_QUALITY_P8 2.0
- #define FXAA_QUALITY_P9 2.0
- #define FXAA_QUALITY_P10 4.0
- #define FXAA_QUALITY_P11 8.0
- #endif
- #if (FXAA_QUALITY_PRESET == 39)
- #define FXAA_QUALITY_PS 12
- #define FXAA_QUALITY_P0 1.0
- #define FXAA_QUALITY_P1 1.0
- #define FXAA_QUALITY_P2 1.0
- #define FXAA_QUALITY_P3 1.0
- #define FXAA_QUALITY_P4 1.0
- #define FXAA_QUALITY_P5 1.5
- #define FXAA_QUALITY_P6 2.0
- #define FXAA_QUALITY_P7 2.0
- #define FXAA_QUALITY_P8 2.0
- #define FXAA_QUALITY_P9 2.0
- #define FXAA_QUALITY_P10 4.0
- #define FXAA_QUALITY_P11 8.0
- #endif
-
- #define FxaaBool bool
- #define FxaaFloat float
- #define FxaaFloat2 vec2
- #define FxaaFloat3 vec3
- #define FxaaFloat4 vec4
- #define FxaaHalf float
- #define FxaaHalf2 vec2
- #define FxaaHalf3 vec3
- #define FxaaHalf4 vec4
- #define FxaaInt2 vec2
- #define FxaaTex sampler2D
-
- #define FxaaSat(x) clamp(x, 0.0, 1.0)
- #define FxaaTexTop(t, p) texture(t, p)
- #define FxaaTexOff(t, p, o, r) texture(t, p + (o * r))
-
- FxaaFloat FxaaLuma(FxaaFloat4 rgba) { return rgba.y; }
-
- FxaaFloat4 FxaaPixelShader(
- //
- // Use noperspective interpolation here (turn off perspective interpolation).
- // {xy} = center of pixel
- FxaaFloat2 pos,
- //
- // Input color texture.
- // {rgb_} = color in linear or perceptual color space
- // if (FXAA_GREEN_AS_LUMA == 0)
- // {___a} = luma in perceptual color space (not linear)
- FxaaTex tex,
- //
- // Only used on FXAA Quality.
- // This must be from a constant/uniform.
- // {x_} = 1.0/screenWidthInPixels
- // {_y} = 1.0/screenHeightInPixels
- FxaaFloat2 fxaaQualityRcpFrame,
- //
- // Only used on FXAA Quality.
- // This used to be the FXAA_QUALITY_SUBPIX define.
- // It is here now to allow easier tuning.
- // Choose the amount of sub-pixel aliasing removal.
- // This can effect sharpness.
- // 1.00 - upper limit (softer)
- // 0.75 - default amount of filtering
- // 0.50 - lower limit (sharper, less sub-pixel aliasing removal)
- // 0.25 - almost off
- // 0.00 - completely off
- FxaaFloat fxaaQualitySubpix,
- //
- // Only used on FXAA Quality.
- // This used to be the FXAA_QUALITY_EDGE_THRESHOLD define.
- // It is here now to allow easier tuning.
- // The minimum amount of local contrast required to apply algorithm.
- // 0.333 - too little (faster)
- // 0.250 - low quality
- // 0.166 - default
- // 0.125 - high quality
- // 0.063 - overkill (slower)
- FxaaFloat fxaaQualityEdgeThreshold,
- //
- // Only used on FXAA Quality.
- // This used to be the FXAA_QUALITY_EDGE_THRESHOLD_MIN define.
- // It is here now to allow easier tuning.
- // Trims the algorithm from processing darks.
- // 0.0833 - upper limit (default, the start of visible unfiltered edges)
- // 0.0625 - high quality (faster)
- // 0.0312 - visible limit (slower)
- // Special notes when using FXAA_GREEN_AS_LUMA,
- // Likely want to set this to zero.
- // As colors that are mostly not-green
- // will appear very dark in the green channel!
- // Tune by looking at mostly non-green content,
- // then start at zero and increase until aliasing is a problem.
- FxaaFloat fxaaQualityEdgeThresholdMin
- ) {
- /*--------------------------------------------------------------------------*/
- FxaaFloat2 posM;
- posM.x = pos.x;
- posM.y = pos.y;
- FxaaFloat4 rgbyM = FxaaTexTop(tex, posM);
- #define lumaM rgbyM.y
- FxaaFloat lumaS = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0, 1), fxaaQualityRcpFrame.xy));
- FxaaFloat lumaE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 0), fxaaQualityRcpFrame.xy));
- FxaaFloat lumaN = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0,-1), fxaaQualityRcpFrame.xy));
- FxaaFloat lumaW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 0), fxaaQualityRcpFrame.xy));
- /*--------------------------------------------------------------------------*/
- FxaaFloat maxSM = max(lumaS, lumaM);
- FxaaFloat minSM = min(lumaS, lumaM);
- FxaaFloat maxESM = max(lumaE, maxSM);
- FxaaFloat minESM = min(lumaE, minSM);
- FxaaFloat maxWN = max(lumaN, lumaW);
- FxaaFloat minWN = min(lumaN, lumaW);
- FxaaFloat rangeMax = max(maxWN, maxESM);
- FxaaFloat rangeMin = min(minWN, minESM);
- FxaaFloat rangeMaxScaled = rangeMax * fxaaQualityEdgeThreshold;
- FxaaFloat range = rangeMax - rangeMin;
- FxaaFloat rangeMaxClamped = max(fxaaQualityEdgeThresholdMin, rangeMaxScaled);
- FxaaBool earlyExit = range < rangeMaxClamped;
- /*--------------------------------------------------------------------------*/
- if(earlyExit)
- return rgbyM;
- /*--------------------------------------------------------------------------*/
- FxaaFloat lumaNW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1,-1), fxaaQualityRcpFrame.xy));
- FxaaFloat lumaSE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 1), fxaaQualityRcpFrame.xy));
- FxaaFloat lumaNE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1,-1), fxaaQualityRcpFrame.xy));
- FxaaFloat lumaSW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 1), fxaaQualityRcpFrame.xy));
- /*--------------------------------------------------------------------------*/
- FxaaFloat lumaNS = lumaN + lumaS;
- FxaaFloat lumaWE = lumaW + lumaE;
- FxaaFloat subpixRcpRange = 1.0/range;
- FxaaFloat subpixNSWE = lumaNS + lumaWE;
- FxaaFloat edgeHorz1 = (-2.0 * lumaM) + lumaNS;
- FxaaFloat edgeVert1 = (-2.0 * lumaM) + lumaWE;
- /*--------------------------------------------------------------------------*/
- FxaaFloat lumaNESE = lumaNE + lumaSE;
- FxaaFloat lumaNWNE = lumaNW + lumaNE;
- FxaaFloat edgeHorz2 = (-2.0 * lumaE) + lumaNESE;
- FxaaFloat edgeVert2 = (-2.0 * lumaN) + lumaNWNE;
- /*--------------------------------------------------------------------------*/
- FxaaFloat lumaNWSW = lumaNW + lumaSW;
- FxaaFloat lumaSWSE = lumaSW + lumaSE;
- FxaaFloat edgeHorz4 = (abs(edgeHorz1) * 2.0) + abs(edgeHorz2);
- FxaaFloat edgeVert4 = (abs(edgeVert1) * 2.0) + abs(edgeVert2);
- FxaaFloat edgeHorz3 = (-2.0 * lumaW) + lumaNWSW;
- FxaaFloat edgeVert3 = (-2.0 * lumaS) + lumaSWSE;
- FxaaFloat edgeHorz = abs(edgeHorz3) + edgeHorz4;
- FxaaFloat edgeVert = abs(edgeVert3) + edgeVert4;
- /*--------------------------------------------------------------------------*/
- FxaaFloat subpixNWSWNESE = lumaNWSW + lumaNESE;
- FxaaFloat lengthSign = fxaaQualityRcpFrame.x;
- FxaaBool horzSpan = edgeHorz >= edgeVert;
- FxaaFloat subpixA = subpixNSWE * 2.0 + subpixNWSWNESE;
- /*--------------------------------------------------------------------------*/
- if(!horzSpan) lumaN = lumaW;
- if(!horzSpan) lumaS = lumaE;
- if(horzSpan) lengthSign = fxaaQualityRcpFrame.y;
- FxaaFloat subpixB = (subpixA * (1.0/12.0)) - lumaM;
- /*--------------------------------------------------------------------------*/
- FxaaFloat gradientN = lumaN - lumaM;
- FxaaFloat gradientS = lumaS - lumaM;
- FxaaFloat lumaNN = lumaN + lumaM;
- FxaaFloat lumaSS = lumaS + lumaM;
- FxaaBool pairN = abs(gradientN) >= abs(gradientS);
- FxaaFloat gradient = max(abs(gradientN), abs(gradientS));
- if(pairN) lengthSign = -lengthSign;
- FxaaFloat subpixC = FxaaSat(abs(subpixB) * subpixRcpRange);
- /*--------------------------------------------------------------------------*/
- FxaaFloat2 posB;
- posB.x = posM.x;
- posB.y = posM.y;
- FxaaFloat2 offNP;
- offNP.x = (!horzSpan) ? 0.0 : fxaaQualityRcpFrame.x;
- offNP.y = ( horzSpan) ? 0.0 : fxaaQualityRcpFrame.y;
- if(!horzSpan) posB.x += lengthSign * 0.5;
- if( horzSpan) posB.y += lengthSign * 0.5;
- /*--------------------------------------------------------------------------*/
- FxaaFloat2 posN;
- posN.x = posB.x - offNP.x * FXAA_QUALITY_P0;
- posN.y = posB.y - offNP.y * FXAA_QUALITY_P0;
- FxaaFloat2 posP;
- posP.x = posB.x + offNP.x * FXAA_QUALITY_P0;
- posP.y = posB.y + offNP.y * FXAA_QUALITY_P0;
- FxaaFloat subpixD = ((-2.0)*subpixC) + 3.0;
- FxaaFloat lumaEndN = FxaaLuma(FxaaTexTop(tex, posN));
- FxaaFloat subpixE = subpixC * subpixC;
- FxaaFloat lumaEndP = FxaaLuma(FxaaTexTop(tex, posP));
- /*--------------------------------------------------------------------------*/
- if(!pairN) lumaNN = lumaSS;
- FxaaFloat gradientScaled = gradient * 1.0/4.0;
- FxaaFloat lumaMM = lumaM - lumaNN * 0.5;
- FxaaFloat subpixF = subpixD * subpixE;
- FxaaBool lumaMLTZero = lumaMM < 0.0;
- /*--------------------------------------------------------------------------*/
- lumaEndN -= lumaNN * 0.5;
- lumaEndP -= lumaNN * 0.5;
- FxaaBool doneN = abs(lumaEndN) >= gradientScaled;
- FxaaBool doneP = abs(lumaEndP) >= gradientScaled;
- if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P1;
- if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P1;
- FxaaBool doneNP = (!doneN) || (!doneP);
- if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P1;
- if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P1;
- /*--------------------------------------------------------------------------*/
- if(doneNP) {
- if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
- if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
- if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
- if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
- doneN = abs(lumaEndN) >= gradientScaled;
- doneP = abs(lumaEndP) >= gradientScaled;
- if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P2;
- if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P2;
- doneNP = (!doneN) || (!doneP);
- if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P2;
- if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P2;
- /*--------------------------------------------------------------------------*/
- #if (FXAA_QUALITY_PS > 3)
- if(doneNP) {
- if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
- if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
- if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
- if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
- doneN = abs(lumaEndN) >= gradientScaled;
- doneP = abs(lumaEndP) >= gradientScaled;
- if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P3;
- if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P3;
- doneNP = (!doneN) || (!doneP);
- if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P3;
- if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P3;
- /*--------------------------------------------------------------------------*/
- #if (FXAA_QUALITY_PS > 4)
- if(doneNP) {
- if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
- if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
- if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
- if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
- doneN = abs(lumaEndN) >= gradientScaled;
- doneP = abs(lumaEndP) >= gradientScaled;
- if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P4;
- if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P4;
- doneNP = (!doneN) || (!doneP);
- if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P4;
- if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P4;
- /*--------------------------------------------------------------------------*/
- #if (FXAA_QUALITY_PS > 5)
- if(doneNP) {
- if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
- if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
- if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
- if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
- doneN = abs(lumaEndN) >= gradientScaled;
- doneP = abs(lumaEndP) >= gradientScaled;
- if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P5;
- if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P5;
- doneNP = (!doneN) || (!doneP);
- if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P5;
- if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P5;
- /*--------------------------------------------------------------------------*/
- #if (FXAA_QUALITY_PS > 6)
- if(doneNP) {
- if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
- if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
- if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
- if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
- doneN = abs(lumaEndN) >= gradientScaled;
- doneP = abs(lumaEndP) >= gradientScaled;
- if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P6;
- if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P6;
- doneNP = (!doneN) || (!doneP);
- if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P6;
- if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P6;
- /*--------------------------------------------------------------------------*/
- #if (FXAA_QUALITY_PS > 7)
- if(doneNP) {
- if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
- if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
- if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
- if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
- doneN = abs(lumaEndN) >= gradientScaled;
- doneP = abs(lumaEndP) >= gradientScaled;
- if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P7;
- if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P7;
- doneNP = (!doneN) || (!doneP);
- if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P7;
- if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P7;
- /*--------------------------------------------------------------------------*/
- #if (FXAA_QUALITY_PS > 8)
- if(doneNP) {
- if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
- if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
- if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
- if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
- doneN = abs(lumaEndN) >= gradientScaled;
- doneP = abs(lumaEndP) >= gradientScaled;
- if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P8;
- if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P8;
- doneNP = (!doneN) || (!doneP);
- if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P8;
- if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P8;
- /*--------------------------------------------------------------------------*/
- #if (FXAA_QUALITY_PS > 9)
- if(doneNP) {
- if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
- if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
- if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
- if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
- doneN = abs(lumaEndN) >= gradientScaled;
- doneP = abs(lumaEndP) >= gradientScaled;
- if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P9;
- if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P9;
- doneNP = (!doneN) || (!doneP);
- if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P9;
- if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P9;
- /*--------------------------------------------------------------------------*/
- #if (FXAA_QUALITY_PS > 10)
- if(doneNP) {
- if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
- if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
- if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
- if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
- doneN = abs(lumaEndN) >= gradientScaled;
- doneP = abs(lumaEndP) >= gradientScaled;
- if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P10;
- if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P10;
- doneNP = (!doneN) || (!doneP);
- if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P10;
- if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P10;
- /*--------------------------------------------------------------------------*/
- #if (FXAA_QUALITY_PS > 11)
- if(doneNP) {
- if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
- if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
- if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
- if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
- doneN = abs(lumaEndN) >= gradientScaled;
- doneP = abs(lumaEndP) >= gradientScaled;
- if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P11;
- if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P11;
- doneNP = (!doneN) || (!doneP);
- if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P11;
- if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P11;
- /*--------------------------------------------------------------------------*/
- #if (FXAA_QUALITY_PS > 12)
- if(doneNP) {
- if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
- if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
- if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
- if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
- doneN = abs(lumaEndN) >= gradientScaled;
- doneP = abs(lumaEndP) >= gradientScaled;
- if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P12;
- if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P12;
- doneNP = (!doneN) || (!doneP);
- if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P12;
- if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P12;
- /*--------------------------------------------------------------------------*/
- }
- #endif
- /*--------------------------------------------------------------------------*/
- }
- #endif
- /*--------------------------------------------------------------------------*/
- }
- #endif
- /*--------------------------------------------------------------------------*/
- }
- #endif
- /*--------------------------------------------------------------------------*/
- }
- #endif
- /*--------------------------------------------------------------------------*/
- }
- #endif
- /*--------------------------------------------------------------------------*/
- }
- #endif
- /*--------------------------------------------------------------------------*/
- }
- #endif
- /*--------------------------------------------------------------------------*/
- }
- #endif
- /*--------------------------------------------------------------------------*/
- }
- #endif
- /*--------------------------------------------------------------------------*/
- }
- /*--------------------------------------------------------------------------*/
- FxaaFloat dstN = posM.x - posN.x;
- FxaaFloat dstP = posP.x - posM.x;
- if(!horzSpan) dstN = posM.y - posN.y;
- if(!horzSpan) dstP = posP.y - posM.y;
- /*--------------------------------------------------------------------------*/
- FxaaBool goodSpanN = (lumaEndN < 0.0) != lumaMLTZero;
- FxaaFloat spanLength = (dstP + dstN);
- FxaaBool goodSpanP = (lumaEndP < 0.0) != lumaMLTZero;
- FxaaFloat spanLengthRcp = 1.0/spanLength;
- /*--------------------------------------------------------------------------*/
- FxaaBool directionN = dstN < dstP;
- FxaaFloat dst = min(dstN, dstP);
- FxaaBool goodSpan = directionN ? goodSpanN : goodSpanP;
- FxaaFloat subpixG = subpixF * subpixF;
- FxaaFloat pixelOffset = (dst * (-spanLengthRcp)) + 0.5;
- FxaaFloat subpixH = subpixG * fxaaQualitySubpix;
- /*--------------------------------------------------------------------------*/
- FxaaFloat pixelOffsetGood = goodSpan ? pixelOffset : 0.0;
- FxaaFloat pixelOffsetSubpix = max(pixelOffsetGood, subpixH);
- if(!horzSpan) posM.x += pixelOffsetSubpix * lengthSign;
- if( horzSpan) posM.y += pixelOffsetSubpix * lengthSign;
- return FxaaFloat4(FxaaTexTop(tex, posM).xyz, lumaM);
- }
- `;function AT(){this._uniformMap=void 0,this._command=void 0,this._colorTexture=void 0,this._depthTexture=void 0,this._ready=!1,this._name="czm_autoexposure",this._logDepthChanged=void 0,this._useLogDepth=void 0,this._framebuffers=void 0,this._previousLuminance=new yi,this._commands=void 0,this._clearCommand=void 0,this._minMaxLuminance=new z,this.enabled=!0,this._enabled=!0,this.minimumLuminance=.1,this.maximumLuminance=10}Object.defineProperties(AT.prototype,{ready:{get:function(){return this._ready}},name:{get:function(){return this._name}},outputTexture:{get:function(){let e=this._framebuffers;if(l(e))return e[e.length-1].getColorTexture(0)}}});function DDe(e){let t=e._framebuffers;if(!l(t))return;let n=t.length;for(let i=0;i<n;++i)t[i].destroy();e._framebuffers=void 0,e._previousLuminance.destroy(),e._previousLuminance=void 0}function Vwt(e,t){DDe(e);let n=e._width,i=e._height,o=t.halfFloatingPointTexture?je.HALF_FLOAT:je.FLOAT,r=Math.ceil(Math.log(Math.max(n,i))/Math.log(3)),a=new Array(r);for(let c=0;c<r;++c)n=Math.max(Math.ceil(n/3),1),i=Math.max(Math.ceil(i/3),1),a[c]=new yi,a[c].update(t,n,i,1,o);let s=a[r-1].getColorTexture(0);e._previousLuminance.update(t,s.width,s.height,1,o),e._framebuffers=a}function PDe(e){let t=e._commands;if(!l(t))return;let n=t.length;for(let i=0;i<n;++i)t[i].shaderProgram.destroy();e._commands=void 0}function jwt(e,t){let n;if(t===0)n={colorTexture:function(){return e._colorTexture},colorTextureDimensions:function(){return e._colorTexture.dimensions}};else{let i=e._framebuffers[t-1].getColorTexture(0);n={colorTexture:function(){return i},colorTextureDimensions:function(){return i.dimensions}}}return n.minMaxLuminance=function(){return e._minMaxLuminance},n.previousLuminance=function(){return e._previousLuminance.getColorTexture(0)},n}function Gwt(e,t){let n=`uniform sampler2D colorTexture;
- in vec2 v_textureCoordinates;
- float sampleTexture(vec2 offset) {
- `;return e===0?n+=` vec4 color = texture(colorTexture, v_textureCoordinates + offset);
- return czm_luminance(color.rgb);
- `:n+=` return texture(colorTexture, v_textureCoordinates + offset).r;
- `,n+=`}
-
- `,n+=`uniform vec2 colorTextureDimensions;
- uniform vec2 minMaxLuminance;
- uniform sampler2D previousLuminance;
- void main() {
- float color = 0.0;
- float xStep = 1.0 / colorTextureDimensions.x;
- float yStep = 1.0 / colorTextureDimensions.y;
- int count = 0;
- for (int i = 0; i < 3; ++i) {
- for (int j = 0; j < 3; ++j) {
- vec2 offset;
- offset.x = -xStep + float(i) * xStep;
- offset.y = -yStep + float(j) * yStep;
- if (offset.x < 0.0 || offset.x > 1.0 || offset.y < 0.0 || offset.y > 1.0) {
- continue;
- }
- color += sampleTexture(offset);
- ++count;
- }
- }
- if (count > 0) {
- color /= float(count);
- }
- `,e===t-1&&(n+=` float previous = texture(previousLuminance, vec2(0.5)).r;
- color = clamp(color, minMaxLuminance.x, minMaxLuminance.y);
- color = previous + (color - previous) / (60.0 * 1.5);
- color = clamp(color, minMaxLuminance.x, minMaxLuminance.y);
- `),n+=` out_FragColor = vec4(color);
- }
- `,n}function Hwt(e,t){PDe(e);let n=e._framebuffers,i=n.length,o=new Array(i);for(let r=0;r<i;++r)o[r]=t.createViewportQuadCommand(Gwt(r,i),{framebuffer:n[r].framebuffer,uniformMap:jwt(e,r)});e._commands=o}AT.prototype.clear=function(e){let t=this._framebuffers;if(!l(t))return;let n=this._clearCommand;l(n)||(n=this._clearCommand=new ai({color:new V(0,0,0,0),framebuffer:void 0}));let i=t.length;for(let o=0;o<i;++o)t[o].clear(e,n)};AT.prototype.update=function(e){let t=e.drawingBufferWidth,n=e.drawingBufferHeight;(t!==this._width||n!==this._height)&&(this._width=t,this._height=n,Vwt(this,e),Hwt(this,e),this._ready||(this._ready=!0)),this._minMaxLuminance.x=this.minimumLuminance,this._minMaxLuminance.y=this.maximumLuminance;let i=this._framebuffers,o=i[i.length-1];i[i.length-1]=this._previousLuminance,this._commands[this._commands.length-1].framebuffer=this._previousLuminance.framebuffer,this._previousLuminance=o};AT.prototype.execute=function(e,t){this._colorTexture=t;let n=this._commands;if(!l(n))return;let i=n.length;for(let o=0;o<i;++o)n[o].execute(e)};AT.prototype.isDestroyed=function(){return!1};AT.prototype.destroy=function(){return DDe(this),PDe(this),fe(this)};var Iz=AT;var Wwt={NEAREST:0,LINEAR:1},Jf=Wwt;function yT(e){e=e??G.EMPTY_OBJECT;let{name:t=jn(),fragmentShader:n,uniforms:i,textureScale:o=1,forcePowerOfTwo:r=!1,sampleMode:a=Jf.NEAREST,pixelFormat:s=Xe.RGBA,pixelDatatype:c=je.UNSIGNED_BYTE,clearColor:u=V.BLACK,scissorRectangle:f}=e;this._fragmentShader=n,this._uniforms=i,this._textureScale=o,this._forcePowerOfTwo=r,this._sampleMode=a,this._pixelFormat=s,this._pixelDatatype=c,this._clearColor=u,this._uniformMap=void 0,this._command=void 0,this._colorTexture=void 0,this._depthTexture=void 0,this._idTexture=void 0,this._actualUniforms={},this._dirtyUniforms=[],this._texturesToRelease=[],this._texturesToCreate=[],this._texturePromise=void 0;let d=new $c;d.scissorTest={enabled:!0,rectangle:l(f)?Je.clone(f):new Je},this._passState=d,this._ready=!1,this._name=t,this._logDepthChanged=void 0,this._useLogDepth=void 0,this._selectedIdTexture=void 0,this._selected=void 0,this._selectedShadow=void 0,this._parentSelected=void 0,this._parentSelectedShadow=void 0,this._combinedSelected=void 0,this._combinedSelectedShadow=void 0,this._selectedLength=0,this._parentSelectedLength=0,this._selectedDirty=!0,this._textureCache=void 0,this._index=void 0,this.enabled=!0,this._enabled=!0}Object.defineProperties(yT.prototype,{ready:{get:function(){return this._ready}},name:{get:function(){return this._name}},fragmentShader:{get:function(){return this._fragmentShader}},uniforms:{get:function(){return this._uniforms}},textureScale:{get:function(){return this._textureScale}},forcePowerOfTwo:{get:function(){return this._forcePowerOfTwo}},sampleMode:{get:function(){return this._sampleMode}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},clearColor:{get:function(){return this._clearColor}},scissorRectangle:{get:function(){return this._passState.scissorTest.rectangle}},outputTexture:{get:function(){if(l(this._textureCache)){let e=this._textureCache.getFramebuffer(this._name);if(l(e))return e.getColorTexture(0)}}},selected:{get:function(){return this._selected},set:function(e){this._selected=e}},parentSelected:{get:function(){return this._parentSelected},set:function(e){this._parentSelected=e}}});var qwt=/uniform\s+sampler2D\s+depthTexture/g;yT.prototype._isSupported=function(e){return!qwt.test(this._fragmentShader)||e.depthTexture};function Ywt(e,t,n){let i=t[n];return(typeof i=="string"||i instanceof HTMLCanvasElement||i instanceof HTMLImageElement||i instanceof HTMLVideoElement||i instanceof ImageData)&&e._dirtyUniforms.push(n),{get:function(){return t[n]},set:function(o){let r=t[n];t[n]=o;let a=e._actualUniforms,s=a[n];l(s)&&s!==r&&s instanceof It&&!l(e._textureCache.getStageByName(n))&&(e._texturesToRelease.push(s),delete a[n],delete a[`${n}Dimensions`]),r instanceof It&&e._texturesToRelease.push(r),typeof o=="string"||o instanceof HTMLCanvasElement||o instanceof HTMLImageElement||o instanceof HTMLVideoElement||o instanceof ImageData?e._dirtyUniforms.push(n):a[n]=o}}}function Xwt(e,t){return function(){let n=e._actualUniforms[t];return typeof n=="function"?n():n}}function Kwt(e,t){return function(){let n=e[t]();if(l(n))return n.dimensions}}function Qwt(e){if(l(e._uniformMap))return;let t={},n={},i=e._uniforms,o=e._actualUniforms;for(let r in i){if(!i.hasOwnProperty(r))continue;typeof i[r]!="function"?(t[r]=Xwt(e,r),n[r]=Ywt(e,i,r)):(t[r]=i[r],n[r]=i[r]),o[r]=i[r];let a=t[r]();(typeof a=="string"||a instanceof It||a instanceof HTMLImageElement||a instanceof HTMLCanvasElement||a instanceof HTMLVideoElement)&&(t[`${r}Dimensions`]=Kwt(t,r))}e._uniforms={},Object.defineProperties(e._uniforms,n),e._uniformMap=wt(t,{colorTexture:function(){return e._colorTexture},colorTextureDimensions:function(){return e._colorTexture.dimensions},depthTexture:function(){return e._depthTexture},depthTextureDimensions:function(){return e._depthTexture.dimensions},czm_idTexture:function(){return e._idTexture},czm_selectedIdTexture:function(){return e._selectedIdTexture},czm_selectedIdTextureStep:function(){return 1/e._selectedIdTexture.width}})}function $wt(e,t){return e=e.replace(/in\s+vec2\s+v_textureCoordinates;/g,""),`#define CZM_SELECTED_FEATURE
- uniform sampler2D czm_idTexture;
- uniform sampler2D czm_selectedIdTexture;
- uniform float czm_selectedIdTextureStep;
- in vec2 v_textureCoordinates;
- bool czm_selected(vec2 offset)
- {
- bool selected = false;
- vec4 id = texture(czm_idTexture, v_textureCoordinates + offset);
- for (int i = 0; i < ${t}; ++i)
- {
- vec4 selectedId = texture(czm_selectedIdTexture, vec2((float(i) + 0.5) * czm_selectedIdTextureStep, 0.5));
- if (all(equal(id, selectedId)))
- {
- return true;
- }
- }
- return false;
- }
- bool czm_selected()
- {
- return czm_selected(vec2(0.0));
- }
-
- ${e}`}function Jwt(e,t){if(l(e._command)&&!e._logDepthChanged&&!e._selectedDirty)return;let n=e._fragmentShader;if(l(e._selectedIdTexture)){let o=e._selectedIdTexture.width;n=$wt(n,o)}let i=new He({defines:[e._useLogDepth?"LOG_DEPTH":""],sources:[n]});e._command=t.createViewportQuadCommand(i,{uniformMap:e._uniformMap,owner:e})}function Zwt(e){let t=e._sampleMode,n,i;t===Jf.LINEAR?(n=Vt.LINEAR,i=ti.LINEAR):(n=Vt.NEAREST,i=ti.NEAREST);let o=e._sampler;(!l(o)||o.minificationFilter!==n||o.magnificationFilter!==i)&&(e._sampler=new jt({wrapS:un.CLAMP_TO_EDGE,wrapT:un.CLAMP_TO_EDGE,minificationFilter:n,magnificationFilter:i}))}function eIt(e,t){return function(n){e._texturesToCreate.push({name:t,source:n})}}function tIt(e,t){return function(){return e._textureCache.getOutputTexture(t)}}function nIt(e,t){let n=e._texturesToRelease;for(let s=0;s<n.length;++s){let c=n[s];c=c&&c.destroy()}n.length=0;let i=e._texturesToCreate;for(let s=0;s<i.length;++s){let{name:c,source:u}=i[s];e._actualUniforms[c]=new It({context:t,source:u})}i.length=0;let o=e._dirtyUniforms;if(o.length===0&&!l(e._texturePromise)){e._ready=!0;return}if(o.length===0||l(e._texturePromise))return;let r=e._uniforms,a=[];for(let s=0;s<o.length;++s){let c=o[s],u=r[c],f=e._textureCache.getStageByName(u);if(l(f))e._actualUniforms[c]=tIt(e,u);else if(typeof u=="string"){let d=new De({url:u});a.push(d.fetchImage().then(eIt(e,c)))}else e._texturesToCreate.push({name:c,source:u})}o.length=0,a.length>0?(e._ready=!1,e._texturePromise=Promise.all(a).then(function(){e._ready=!0,e._texturePromise=void 0})):e._ready=!0}function RDe(e){l(e._command)&&(e._command.shaderProgram=e._command.shaderProgram&&e._command.shaderProgram.destroy(),e._command=void 0),e._selectedIdTexture=e._selectedIdTexture&&e._selectedIdTexture.destroy();let t=e._textureCache;if(!l(t))return;let n=e._uniforms,i=e._actualUniforms;for(let o in i){if(!i.hasOwnProperty(o))continue;let r=i[o];r instanceof It&&(l(t.getStageByName(n[o]))||r.destroy(),e._dirtyUniforms.push(o))}}function iIt(e){let t=l(e._selected)?e._selected.length:0,n=l(e._parentSelected)?e._parentSelected:0,i=e._selected!==e._selectedShadow||t!==e._selectedLength||e._parentSelected!==e._parentSelectedShadow||n!==e._parentSelectedLength;if(l(e._selected)&&l(e._parentSelected)?e._combinedSelected=e._selected.concat(e._parentSelected):l(e._parentSelected)?e._combinedSelected=e._parentSelected:e._combinedSelected=e._selected,!i&&l(e._combinedSelected)){if(!l(e._combinedSelectedShadow))return!0;for(let o=0;o<e._combinedSelected.length;++o)if(e._combinedSelected[o]!==e._combinedSelectedShadow[o])return!0}return i}function oIt(e,t){if(!e._selectedDirty)return;e._selectedIdTexture=e._selectedIdTexture&&e._selectedIdTexture.destroy(),e._selectedIdTexture=void 0;let n=e._combinedSelected;if(!l(n))return;let i=0;for(let a=0;a<n.length;++a){let s=n[a];l(s.pickIds)?i+=s.pickIds.length:l(s.pickId)&&++i}if(n.length===0||i===0){let a=new Uint8Array([255,255,255,255]);e._selectedIdTexture=new It({context:t,pixelFormat:Xe.RGBA,pixelDatatype:je.UNSIGNED_BYTE,source:{arrayBufferView:a,width:1,height:1},sampler:jt.NEAREST});return}let o=0,r=new Uint8Array(i*4);for(let a=0;a<n.length;++a){let s=n[a];if(l(s.pickIds)){let c=s.pickIds,u=c.length;for(let f=0;f<u;++f){let d=c[f].color;r[o]=V.floatToByte(d.red),r[o+1]=V.floatToByte(d.green),r[o+2]=V.floatToByte(d.blue),r[o+3]=V.floatToByte(d.alpha),o+=4}}else if(l(s.pickId)){let c=s.pickId.color;r[o]=V.floatToByte(c.red),r[o+1]=V.floatToByte(c.green),r[o+2]=V.floatToByte(c.blue),r[o+3]=V.floatToByte(c.alpha),o+=4}}e._selectedIdTexture=new It({context:t,pixelFormat:Xe.RGBA,pixelDatatype:je.UNSIGNED_BYTE,source:{arrayBufferView:r,width:i,height:1},sampler:jt.NEAREST})}yT.prototype.update=function(e,t){if(this.enabled!==this._enabled&&!this.enabled&&RDe(this),this._enabled=this.enabled,!this._enabled||(this._logDepthChanged=t!==this._useLogDepth,this._useLogDepth=t,this._selectedDirty=iIt(this),this._selectedShadow=this._selected,this._parentSelectedShadow=this._parentSelected,this._combinedSelectedShadow=this._combinedSelected,this._selectedLength=l(this._selected)?this._selected.length:0,this._parentSelectedLength=l(this._parentSelected)?this._parentSelected.length:0,oIt(this,e),Qwt(this),nIt(this,e),Jwt(this,e),Zwt(this),this._selectedDirty=!1,!this._ready))return;let n=this._textureCache.getFramebuffer(this._name);if(this._command.framebuffer=n,!l(n))return;let i=n.getColorTexture(0),o;(i.width!==e.drawingBufferWidth||i.height!==e.drawingBufferHeight)&&(o=this._renderState,(!l(o)||i.width!==o.viewport.width||i.height!==o.viewport.height)&&(this._renderState=Ve.fromCache({viewport:new Je(0,0,i.width,i.height)}))),this._command.renderState=o};yT.prototype.execute=function(e,t,n,i){if(!l(this._command)||!l(this._command.framebuffer)||!this._ready||!this._enabled)return;this._colorTexture=t,this._depthTexture=n,this._idTexture=i,jt.equals(this._colorTexture.sampler,this._sampler)||(this._colorTexture.sampler=this._sampler);let o=this.scissorRectangle.width>0&&this.scissorRectangle.height>0?this._passState:void 0;l(o)&&(o.context=e),this._command.execute(e,o)};yT.prototype.isDestroyed=function(){return!1};yT.prototype.destroy=function(){return RDe(this),fe(this)};var Do=yT;function xT(e){e=e??G.EMPTY_OBJECT,this._stages=e.stages,this._inputPreviousStageTexture=e.inputPreviousStageTexture??!0;let t=e.name;l(t)||(t=jn()),this._name=t,this._uniforms=e.uniforms,this._textureCache=void 0,this._index=void 0,this._selected=void 0,this._selectedShadow=void 0,this._parentSelected=void 0,this._parentSelectedShadow=void 0,this._combinedSelected=void 0,this._combinedSelectedShadow=void 0,this._selectedLength=0,this._parentSelectedLength=0,this._selectedDirty=!0}Object.defineProperties(xT.prototype,{ready:{get:function(){let e=this._stages,t=e.length;for(let n=0;n<t;++n)if(!e[n].ready)return!1;return!0}},name:{get:function(){return this._name}},enabled:{get:function(){return this._stages[0].enabled},set:function(e){let t=this._stages,n=t.length;for(let i=0;i<n;++i)t[i].enabled=e}},uniforms:{get:function(){return this._uniforms}},inputPreviousStageTexture:{get:function(){return this._inputPreviousStageTexture}},length:{get:function(){return this._stages.length}},selected:{get:function(){return this._selected},set:function(e){this._selected=e}},parentSelected:{get:function(){return this._parentSelected},set:function(e){this._parentSelected=e}}});xT.prototype._isSupported=function(e){let t=this._stages,n=t.length;for(let i=0;i<n;++i)if(!t[i]._isSupported(e))return!1;return!0};xT.prototype.get=function(e){return this._stages[e]};function rIt(e){let t=l(e._selected)?e._selected.length:0,n=l(e._parentSelected)?e._parentSelected:0,i=e._selected!==e._selectedShadow||t!==e._selectedLength;if(i=i||e._parentSelected!==e._parentSelectedShadow||n!==e._parentSelectedLength,l(e._selected)&&l(e._parentSelected)?e._combinedSelected=e._selected.concat(e._parentSelected):l(e._parentSelected)?e._combinedSelected=e._parentSelected:e._combinedSelected=e._selected,!i&&l(e._combinedSelected)){if(!l(e._combinedSelectedShadow))return!0;t=e._combinedSelected.length;for(let o=0;o<t;++o)if(e._combinedSelected[o]!==e._combinedSelectedShadow[o])return!0}return i}xT.prototype.update=function(e,t){this._selectedDirty=rIt(this),this._selectedShadow=this._selected,this._parentSelectedShadow=this._parentSelected,this._combinedSelectedShadow=this._combinedSelected,this._selectedLength=l(this._selected)?this._selected.length:0,this._parentSelectedLength=l(this._parentSelected)?this._parentSelected.length:0;let n=this._stages,i=n.length;for(let o=0;o<i;++o){let r=n[o];this._selectedDirty&&(r.parentSelected=this._combinedSelected),r.update(e,t)}};xT.prototype.isDestroyed=function(){return!1};xT.prototype.destroy=function(){let e=this._stages,t=e.length;for(let n=0;n<t;++n)e[n].destroy();return fe(this)};var Zu=xT;var aa={};function Wte(e){let o=`#define USE_STEP_SIZE
- ${Wy}`,r=new Do({name:`${e}_x_direction`,fragmentShader:o,uniforms:{delta:1,sigma:2,stepSize:1,direction:0},sampleMode:Jf.LINEAR}),a=new Do({name:`${e}_y_direction`,fragmentShader:o,uniforms:{delta:1,sigma:2,stepSize:1,direction:1},sampleMode:Jf.LINEAR}),s={};return Object.defineProperties(s,{delta:{get:function(){return r.uniforms.delta},set:function(c){let u=r.uniforms,f=a.uniforms;u.delta=f.delta=c}},sigma:{get:function(){return r.uniforms.sigma},set:function(c){let u=r.uniforms,f=a.uniforms;u.sigma=f.sigma=c}},stepSize:{get:function(){return r.uniforms.stepSize},set:function(c){let u=r.uniforms,f=a.uniforms;u.stepSize=f.stepSize=c}}}),new Zu({name:e,stages:[r,a],uniforms:s})}aa.createBlurStage=function(){return Wte("czm_blur")};aa.createDepthOfFieldStage=function(){let e=Wte("czm_depth_of_field_blur"),t=new Do({name:"czm_depth_of_field_composite",fragmentShader:gz,uniforms:{focalDistance:5,blurTexture:e.name}}),n={};return Object.defineProperties(n,{focalDistance:{get:function(){return t.uniforms.focalDistance},set:function(i){t.uniforms.focalDistance=i}},delta:{get:function(){return e.uniforms.delta},set:function(i){e.uniforms.delta=i}},sigma:{get:function(){return e.uniforms.sigma},set:function(i){e.uniforms.sigma=i}},stepSize:{get:function(){return e.uniforms.stepSize},set:function(i){e.uniforms.stepSize=i}}}),new Zu({name:"czm_depth_of_field",stages:[e,t],inputPreviousStageTexture:!1,uniforms:n})};aa.isDepthOfFieldSupported=function(e){return e.context.depthTexture};aa.createEdgeDetectionStage=function(){let e=jn();return new Do({name:`czm_edge_detection_${e}`,fragmentShader:Az,uniforms:{length:.25,color:V.clone(V.BLACK)}})};aa.isEdgeDetectionSupported=function(e){return e.context.depthTexture};function aIt(e){if(!l(e))return aa.createEdgeDetectionStage();let t=new Zu({name:"czm_edge_detection_multiple",stages:e,inputPreviousStageTexture:!1}),n={},i="",o="";for(let s=0;s<e.length;++s)i+=`uniform sampler2D edgeTexture${s};
- `,o+=` vec4 edge${s} = texture(edgeTexture${s}, v_textureCoordinates);
- if (edge${s}.a > 0.0)
- {
- color = edge${s};
- break;
- }
- `,n[`edgeTexture${s}`]=e[s].name;let r=`${i}in vec2 v_textureCoordinates;
- void main() {
- vec4 color = vec4(0.0);
- for (int i = 0; i < ${e.length}; i++)
- {
- ${o} }
- out_FragColor = color;
- }
- `,a=new Do({name:"czm_edge_detection_combine",fragmentShader:r,uniforms:n});return new Zu({name:"czm_edge_detection_composite",stages:[t,a]})}aa.createSilhouetteStage=function(e){let t=aIt(e),n=new Do({name:"czm_silhouette_color_edges",fragmentShader:Sz,uniforms:{silhouetteTexture:t.name}});return new Zu({name:"czm_silhouette",stages:[t,n],inputPreviousStageTexture:!1,uniforms:t.uniforms})};aa.isSilhouetteSupported=function(e){return e.context.depthTexture};aa.createBloomStage=function(){let e=new Do({name:"czm_bloom_contrast_bias",fragmentShader:pz,uniforms:{contrast:128,brightness:-.3}}),t=Wte("czm_bloom_blur"),n=new Zu({name:"czm_bloom_contrast_bias_blur",stages:[e,t]}),i=new Do({name:"czm_bloom_generate_composite",fragmentShader:hz,uniforms:{glowOnly:!1,bloomTexture:n.name}}),o={};return Object.defineProperties(o,{glowOnly:{get:function(){return i.uniforms.glowOnly},set:function(r){i.uniforms.glowOnly=r}},contrast:{get:function(){return e.uniforms.contrast},set:function(r){e.uniforms.contrast=r}},brightness:{get:function(){return e.uniforms.brightness},set:function(r){e.uniforms.brightness=r}},delta:{get:function(){return t.uniforms.delta},set:function(r){t.uniforms.delta=r}},sigma:{get:function(){return t.uniforms.sigma},set:function(r){t.uniforms.sigma=r}},stepSize:{get:function(){return t.uniforms.stepSize},set:function(r){t.uniforms.stepSize=r}}}),new Zu({name:"czm_bloom",stages:[n,i],inputPreviousStageTexture:!1,uniforms:o})};aa.createAmbientOcclusionStage=function(){let e=new Do({name:"czm_ambient_occlusion_generate",fragmentShader:uz,uniforms:{intensity:3,bias:.1,lengthCap:.26,directionCount:8,stepCount:32,randomTexture:void 0}}),t=new Do({name:"czm_ambient_occlusion_composite",fragmentShader:fz,uniforms:{ambientOcclusionOnly:!1,ambientOcclusionTexture:e.name}}),n={};return Object.defineProperties(n,{intensity:{get:function(){return e.uniforms.intensity},set:function(i){e.uniforms.intensity=i}},bias:{get:function(){return e.uniforms.bias},set:function(i){e.uniforms.bias=i}},lengthCap:{get:function(){return e.uniforms.lengthCap},set:function(i){e.uniforms.lengthCap=i}},directionCount:{get:function(){return e.uniforms.directionCount},set:function(i){e.uniforms.directionCount=i}},stepCount:{get:function(){return e.uniforms.stepCount},set:function(i){e.uniforms.stepCount=i}},randomTexture:{get:function(){return e.uniforms.randomTexture},set:function(i){e.uniforms.randomTexture=i}},ambientOcclusionOnly:{get:function(){return t.uniforms.ambientOcclusionOnly},set:function(i){t.uniforms.ambientOcclusionOnly=i}}}),new Zu({name:"czm_ambient_occlusion",stages:[e,t],inputPreviousStageTexture:!1,uniforms:n})};aa.isAmbientOcclusionSupported=function(e){return e.context.depthTexture};var sIt=`#define FXAA_QUALITY_PRESET 39
- ${wz}
- ${bz}`;aa.createFXAAStage=function(){return new Do({name:"czm_FXAA",fragmentShader:sIt,sampleMode:Jf.LINEAR})};aa.createAcesTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE
- `:"";return t+=lz,new Do({name:"czm_aces",fragmentShader:t,uniforms:{autoExposure:void 0,exposure:1}})};aa.createFilmicTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE
- `:"";return t+=yz,new Do({name:"czm_filmic",fragmentShader:t,uniforms:{autoExposure:void 0,exposure:1}})};aa.createPbrNeutralTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE
- `:"";return t+=xz,new Do({name:"czm_pbr_neutral",fragmentShader:t,uniforms:{autoExposure:void 0,exposure:1}})};aa.createReinhardTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE
- `:"";return t+=vz,new Do({name:"czm_reinhard",fragmentShader:t,uniforms:{autoExposure:void 0,exposure:1}})};aa.createModifiedReinhardTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE
- `:"";return t+=Tz,new Do({name:"czm_modified_reinhard",fragmentShader:t,uniforms:{white:V.WHITE,autoExposure:void 0,exposure:1}})};aa.createAutoExposureStage=function(){return new Iz};aa.createBlackAndWhiteStage=function(){return new Do({name:"czm_black_and_white",fragmentShader:dz,uniforms:{gradations:5}})};aa.createBrightnessStage=function(){return new Do({name:"czm_brightness",fragmentShader:mz,uniforms:{brightness:.5}})};aa.createNightVisionStage=function(){return new Do({name:"czm_night_vision",fragmentShader:Ez})};aa.createDepthViewStage=function(){return new Do({name:"czm_depth_view",fragmentShader:_z})};aa.createLensFlareStage=function(){return new Do({name:"czm_lens_flare",fragmentShader:Cz,uniforms:{dirtTexture:Xt("Assets/Textures/LensFlare/DirtMask.jpg"),starTexture:Xt("Assets/Textures/LensFlare/StarBurst.jpg"),intensity:2,distortion:10,ghostDispersal:.4,haloWidth:.4,dirtAmount:.4,earthRadius:te.WGS84.maximumRadius}})};var Zf=aa;function S_(e){this._collection=e,this._framebuffers=[],this._stageNameToFramebuffer={},this._width=void 0,this._height=void 0,this._updateDependencies=!1}function Pz(e){for(;l(e.length);)e=e.get(e.length-1);return e.name}function qte(e,t,n,i,o){if(!i.enabled||!i._isSupported(t))return o;let r=n[i.name]={};if(l(o)){let s=e.getStageByName(o);r[Pz(s)]=!0}let a=i.uniforms;if(l(a)){let s=Object.getOwnPropertyNames(a),c=s.length;for(let u=0;u<c;++u){let f=a[s[u]];if(typeof f=="string"){let d=e.getStageByName(f);l(d)&&(r[Pz(d)]=!0)}}}return i.name}function Dz(e,t,n,i,o){if(l(i.enabled)&&!i.enabled||l(i._isSupported)&&!i._isSupported(t))return o;let r=o,a=!l(i.inputPreviousStageTexture)||i.inputPreviousStageTexture,s=o,c=i.length;for(let d=0;d<c;++d){let p=i.get(d);l(p.length)?s=Dz(e,t,n,p,o):s=qte(e,t,n,p,o),a&&(o=s)}let u,f;if(a)for(u=1;u<c;++u)f=Pz(i.get(u)),l(n[f])||(n[f]={}),n[f][r]=!0;else for(u=1;u<c;++u){f=Pz(i.get(u));let d=n[f];for(let p=0;p<u;++p)d[Pz(i.get(p))]=!0}return s}function cIt(e,t){let n={};if(l(e.ambientOcclusion)){let i=e.ambientOcclusion,o=e.bloom,r=e._tonemapping,a=e.fxaa,s=Dz(e,t,n,i,void 0);s=Dz(e,t,n,o,s),s=qte(e,t,n,r,s),s=Dz(e,t,n,e,s),qte(e,t,n,a,s)}else Dz(e,t,n,e,void 0);return n}function lIt(e,t,n){let o=e._collection.getStageByName(t),r=o._textureScale,a=o._forcePowerOfTwo,s=o._pixelFormat,c=o._pixelDatatype,u=o._clearColor,f,d,p=e._framebuffers,g=p.length;for(f=0;f<g;++f){if(d=p[f],r!==d.textureScale||a!==d.forcePowerOfTwo||s!==d.pixelFormat||c!==d.pixelDatatype||!V.equals(u,d.clearColor))continue;let m=d.stages,A=m.length,y=!1;for(let x=0;x<A;++x)if(n[m[x]]){y=!0;break}if(!y)break}return l(d)&&f<g?(d.stages.push(t),d):(d={textureScale:r,forcePowerOfTwo:a,pixelFormat:s,pixelDatatype:c,clearColor:u,stages:[t],buffer:new yi({pixelFormat:s,pixelDatatype:c}),clear:void 0},p.push(d),d)}function uIt(e,t){let n=cIt(e._collection,t);for(let i in n)n.hasOwnProperty(i)&&(e._stageNameToFramebuffer[i]=lIt(e,i,n[i]))}function Yte(e){let t=e._framebuffers,n=t.length;for(let i=0;i<n;++i)t[i].buffer.destroy()}function fIt(e,t){let n=e._width,i=e._height,o=e._framebuffers,r=o.length;for(let a=0;a<r;++a){let s=o[a],c=s.textureScale,u=Math.ceil(n*c),f=Math.ceil(i*c),d=Math.min(u,f);s.forcePowerOfTwo&&(D.isPowerOfTwo(d)||(d=D.nextPowerOfTwo(d)),u=d,f=d),s.buffer.update(t,u,f),s.clear=new ai({color:s.clearColor,framebuffer:s.buffer.framebuffer})}}S_.prototype.updateDependencies=function(){this._updateDependencies=!0};S_.prototype.update=function(e){let t=this._collection,n=this._updateDependencies,i=l(t.ambientOcclusion)&&t.ambientOcclusion.enabled&&t.ambientOcclusion._isSupported(e),o=l(t.bloom)&&t.bloom.enabled&&t.bloom._isSupported(e),r=l(t._tonemapping)&&t._tonemapping.enabled&&t._tonemapping._isSupported(e),a=l(t.fxaa)&&t.fxaa.enabled&&t.fxaa._isSupported(e),s=!l(t._activeStages)||t._activeStages.length>0||i||o||r||a;if((n||!s&&this._framebuffers.length>0)&&(Yte(this),this._framebuffers.length=0,this._stageNameToFramebuffer={},this._width=void 0,this._height=void 0),!n&&!s)return;this._framebuffers.length===0&&uIt(this,e);let c=e.drawingBufferWidth,u=e.drawingBufferHeight,f=this._width!==c||this._height!==u;!n&&!f||(this._width=c,this._height=u,this._updateDependencies=!1,Yte(this),fIt(this,e))};S_.prototype.clear=function(e){let t=this._framebuffers;for(let n=0;n<t.length;++n)t[n].clear.execute(e)};S_.prototype.getStageByName=function(e){return this._collection.getStageByName(e)};S_.prototype.getOutputTexture=function(e){return this._collection.getOutputTexture(e)};S_.prototype.getFramebuffer=function(e){let t=this._stageNameToFramebuffer[e];if(l(t))return t.buffer.framebuffer};S_.prototype.isDestroyed=function(){return!1};S_.prototype.destroy=function(){return Yte(this),fe(this)};var bT=S_;var ODe={REINHARD:"REINHARD",MODIFIED_REINHARD:"MODIFIED_REINHARD",FILMIC:"FILMIC",ACES:"ACES",PBR_NEUTRAL:"PBR_NEUTRAL"};Object.freeze(ODe);var w_=ODe;var Xte=[];function mu(){let e=Zf.createFXAAStage(),t=Zf.createAmbientOcclusionStage(),n=Zf.createBloomStage();this._autoExposureEnabled=!1,this._autoExposure=Zf.createAutoExposureStage(),this._exposure=1,this._tonemapping=void 0,this._tonemapper=void 0,this.tonemapper=w_.PBR_NEUTRAL;let i=this._tonemapping;e.enabled=!1,t.enabled=!1,n.enabled=!1,i.enabled=!1;let o=new bT(this),r={},a=Xte;for(a.push(e,t,n,i);a.length>0;){let c=a.pop();r[c.name]=c,c._textureCache=o;let u=c.length;if(l(u))for(let f=0;f<u;++f)a.push(c.get(f))}this._stages=[],this._activeStages=[],this._previousActiveStages=[],this._randomTexture=void 0;let s=this;t.uniforms.randomTexture=function(){return s._randomTexture},this._ao=t,this._bloom=n,this._fxaa=e,this._aoEnabled=void 0,this._bloomEnabled=void 0,this._tonemappingEnabled=void 0,this._fxaaEnabled=void 0,this._activeStagesChanged=!1,this._stagesRemoved=!1,this._textureCacheDirty=!1,this._stageNames=r,this._textureCache=o}Object.defineProperties(mu.prototype,{ready:{get:function(){let e=!1,t=this._stages,n=t.length;for(let s=n-1;s>=0;--s){let c=t[s];e=e||c.ready&&c.enabled}let i=this._fxaa,o=this._ao,r=this._bloom,a=this._tonemapping;return e=e||i.ready&&i.enabled,e=e||o.ready&&o.enabled,e=e||r.ready&&r.enabled,e=e||a.ready&&a.enabled,e}},fxaa:{get:function(){return this._fxaa}},ambientOcclusion:{get:function(){return this._ao}},bloom:{get:function(){return this._bloom}},length:{get:function(){return Kte(this),this._stages.length}},outputTexture:{get:function(){let e=this._fxaa;if(e.enabled&&e.ready)return this.getOutputTexture(e.name);let t=this._stages,n=t.length;for(let a=n-1;a>=0;--a){let s=t[a];if(l(s)&&s.ready&&s.enabled)return this.getOutputTexture(s.name)}let i=this._tonemapping;if(i.enabled&&i.ready)return this.getOutputTexture(i.name);let o=this._bloom;if(o.enabled&&o.ready)return this.getOutputTexture(o.name);let r=this._ao;if(r.enabled&&r.ready)return this.getOutputTexture(r.name)}},hasSelected:{get:function(){let e=this._stages.slice();for(;e.length>0;){let t=e.pop();if(!l(t))continue;if(l(t.selected))return!0;let n=t.length;if(l(n))for(let i=0;i<n;++i)e.push(t.get(i))}return!1}},tonemapper:{get:function(){return this._tonemapper},set:function(e){if(this._tonemapper===e)return;l(this._tonemapping)&&(delete this._stageNames[this._tonemapping.name],this._tonemapping.destroy());let t=this._autoExposureEnabled,n;switch(e){case w_.REINHARD:n=Zf.createReinhardTonemappingStage(t);break;case w_.MODIFIED_REINHARD:n=Zf.createModifiedReinhardTonemappingStage(t);break;case w_.FILMIC:n=Zf.createFilmicTonemappingStage(t);break;case w_.PBR_NEUTRAL:n=Zf.createPbrNeutralTonemappingStage(t);break;default:n=Zf.createAcesTonemappingStage(t);break}if(t){let i=this._autoExposure;n.uniforms.autoExposure=function(){return i.outputTexture}}else n.uniforms.exposure=this._exposure;this._tonemapper=e,this._tonemapping=n,l(this._stageNames)&&(this._stageNames[n.name]=n,n._textureCache=this._textureCache),this._textureCacheDirty=!0}},exposure:{get:function(){return this._exposure},set:function(e){this._tonemapping.uniforms.exposure=e,this._exposure=e}}});function Kte(e){if(!e._stagesRemoved)return;e._stagesRemoved=!1;let t=[],n=e._stages;for(let i=0,o=0;i<n.length;++i){let r=n[i];r&&(r._index=o++,t.push(r))}e._stages=t}mu.prototype.add=function(e){let t=this._stageNames,n=Xte;for(n.push(e);n.length>0;){let o=n.pop();t[o.name]=o,o._textureCache=this._textureCache;let r=o.length;if(l(r))for(let a=0;a<r;++a)n.push(o.get(a))}let i=this._stages;return e._index=i.length,i.push(e),this._textureCacheDirty=!0,e};mu.prototype.remove=function(e){if(!this.contains(e))return!1;let t=this._stageNames,n=Xte;for(n.push(e);n.length>0;){let i=n.pop();delete t[i.name];let o=i.length;if(l(o))for(let r=0;r<o;++r)n.push(i.get(r))}return this._stages[e._index]=void 0,this._stagesRemoved=!0,this._textureCacheDirty=!0,e._index=void 0,e._textureCache=void 0,e.destroy(),!0};mu.prototype.contains=function(e){return l(e)&&l(e._index)&&e._textureCache===this._textureCache};mu.prototype.get=function(e){return Kte(this),this._stages[e]};mu.prototype.removeAll=function(){let e=this._stages,t=e.length;for(let n=0;n<t;++n)this.remove(e[n]);e.length=0};mu.prototype.getStageByName=function(e){return this._stageNames[e]};mu.prototype.update=function(e,t,n){Kte(this);let i=this._activeStages,o=this._activeStages=this._previousActiveStages;this._previousActiveStages=i;let r=this._stages;o.length=r.length;let a=0;for(let x=0;x<r.length;++x){let b=r[x];b.ready&&b.enabled&&b._isSupported(e)&&(o[a++]=b)}o.length=a;let s=a!==i.length;if(!s){for(let x=0;x<a;++x)if(o[x]!==i[x]){s=!0;break}}let c=this._ao,u=this._bloom,f=this._autoExposure,d=this._tonemapping,p=this._fxaa;d.enabled=n;let g=c.enabled&&c._isSupported(e),m=u.enabled&&u._isSupported(e),A=d.enabled&&d._isSupported(e),y=p.enabled&&p._isSupported(e);if((s||this._textureCacheDirty||g!==this._aoEnabled||m!==this._bloomEnabled||A!==this._tonemappingEnabled||y!==this._fxaaEnabled)&&(this._textureCache.updateDependencies(),this._aoEnabled=g,this._bloomEnabled=m,this._tonemappingEnabled=A,this._fxaaEnabled=y,this._textureCacheDirty=!1),l(this._randomTexture)&&!g&&(this._randomTexture.destroy(),this._randomTexture=void 0),!l(this._randomTexture)&&g){let b=new Uint8Array(196608);for(let C=0;C<196608;C+=3)b[C]=Math.floor(Math.random()*255);this._randomTexture=new It({context:e,pixelFormat:Xe.RGB,pixelDatatype:je.UNSIGNED_BYTE,source:{arrayBufferView:b,width:256,height:256},sampler:new jt({wrapS:un.REPEAT,wrapT:un.REPEAT,minificationFilter:Vt.NEAREST,magnificationFilter:ti.NEAREST})})}this._textureCache.update(e),p.update(e,t),c.update(e,t),u.update(e,t),d.update(e,t),this._autoExposureEnabled&&f.update(e,t);for(let x=0;x<r.length;++x)r[x].update(e,t);a=0;for(let x=0;x<r.length;++x){let b=r[x];b.ready&&b.enabled&&b._isSupported(e)&&a++}s=a!==o.length,s&&this.update(e,t,n)};mu.prototype.clear=function(e){this._textureCache.clear(e),this._autoExposureEnabled&&this._autoExposure.clear(e)};function CT(e){for(;l(e.length);)e=e.get(e.length-1);return e.outputTexture}mu.prototype.getOutputTexture=function(e){let t=this.getStageByName(e);if(l(t))return CT(t)};function g0(e,t,n,i,o){if(l(e.execute)){e.execute(t,n,i,o);return}if(e.inputPreviousStageTexture){g0(e.get(0),t,n,i,o);for(let r=1;r<e.length;++r)g0(e.get(r),t,CT(e.get(r-1)),i,o)}else for(let r=0;r<e.length;++r)g0(e.get(r),t,n,i,o)}mu.prototype.execute=function(e,t,n,i){let o=this._activeStages,r=o.length,a=this._fxaa,s=this._ao,c=this._bloom,u=this._autoExposure,f=this._tonemapping,d=s.enabled&&s._isSupported(e),p=c.enabled&&c._isSupported(e),g=this._autoExposureEnabled,m=f.enabled&&f._isSupported(e),A=a.enabled&&a._isSupported(e);if(!A&&!d&&!p&&!m&&r===0)return;let y=t;d&&s.ready&&(g0(s,e,y,n,i),y=CT(s)),p&&c.ready&&(g0(c,e,y,n,i),y=CT(c)),g&&u.ready&&g0(u,e,y,n,i),m&&f.ready&&(g0(f,e,y,n,i),y=CT(f));let x=y;if(r>0){g0(o[0],e,y,n,i);for(let b=1;b<r;++b)g0(o[b],e,CT(o[b-1]),n,i);x=CT(o[r-1])}A&&a.ready&&g0(a,e,x,n,i)};mu.prototype.copy=function(e,t){if(!l(this._copyColorCommand)){let n=this;this._copyColorCommand=e.createViewportQuadCommand(Ju,{uniformMap:{colorTexture:function(){return n.outputTexture}},owner:this})}this._copyColorCommand.framebuffer=t,this._copyColorCommand.execute(e)};mu.prototype.isDestroyed=function(){return!1};mu.prototype.destroy=function(){return this._fxaa.destroy(),this._ao.destroy(),this._bloom.destroy(),this._autoExposure.destroy(),this._tonemapping.destroy(),this.removeAll(),this._textureCache=this._textureCache&&this._textureCache.destroy(),fe(this)};var Rz=mu;var MDe={SHIFT:0,CTRL:1,ALT:2};Object.freeze(MDe);var mr=MDe;var BDe={LEFT_DOWN:0,LEFT_UP:1,LEFT_CLICK:2,LEFT_DOUBLE_CLICK:3,RIGHT_DOWN:5,RIGHT_UP:6,RIGHT_CLICK:7,MIDDLE_DOWN:10,MIDDLE_UP:11,MIDDLE_CLICK:12,MOUSE_MOVE:15,WHEEL:16,PINCH_START:17,PINCH_END:18,PINCH_MOVE:19};Object.freeze(BDe);var Sn=BDe;function qy(e,t,n){let i=e._element;if(i===document)return n.x=t.clientX,n.y=t.clientY,n;let o=i.getBoundingClientRect();return n.x=t.clientX-o.left,n.y=t.clientY-o.top,n}function tne(e,t){if(!l(t))return`${e}`;let n=Array.isArray(t)?t.toSorted():[t];return`${e}+${n.join("+")}`}function TT(e){let t=[];if(e.shiftKey&&t.push(mr.SHIFT),e.ctrlKey&&t.push(mr.CTRL),e.altKey&&t.push(mr.ALT),t.length)return t}var Ia={LEFT:0,MIDDLE:1,RIGHT:2};function ed(e,t,n,i){function o(r){i(e,r)}n.addEventListener(t,o,{capture:!1,passive:!1}),e._removalFunctions.push(function(){n.removeEventListener(t,o,!1)})}function dIt(e){let t=e._element,n=l(t.disableRootEvents)?t:document;sn.supportsPointerEvents()?(ed(e,"pointerdown",t,AIt),ed(e,"pointerup",t,HDe),ed(e,"pointermove",t,yIt),ed(e,"pointercancel",t,HDe)):(ed(e,"mousedown",t,WDe),ed(e,"mouseup",n,qDe),ed(e,"mousemove",n,YDe),ed(e,"touchstart",t,gIt),ed(e,"touchend",n,zDe),ed(e,"touchmove",n,_It),ed(e,"touchcancel",n,zDe)),ed(e,"dblclick",t,mIt);let i;"onwheel"in t?i="wheel":document.onmousewheel!==void 0?i="mousewheel":i="DOMMouseScroll",ed(e,i,t,pIt)}function hIt(e){let t=e._removalFunctions;for(let n=0;n<t.length;++n)t[n]()}var LDe={position:new z};function nne(e){e._lastSeenTouchEvent=Fi()}function ine(e){return Fi()-e._lastSeenTouchEvent>Hm.mouseEmulationIgnoreMilliseconds}function ene(e,t,n){let i=e.x-t.x,o=e.y-t.y;return Math.sqrt(i*i+o*o)<n}function WDe(e,t){if(!ine(e))return;let n=t.button;e._buttonDown[n]=!0;let i;if(n===Ia.LEFT)i=Sn.LEFT_DOWN;else if(n===Ia.MIDDLE)i=Sn.MIDDLE_DOWN;else if(n===Ia.RIGHT)i=Sn.RIGHT_DOWN;else return;let o=qy(e,t,e._primaryPosition);z.clone(o,e._primaryStartPosition),z.clone(o,e._primaryPreviousPosition);let r=TT(t),a=e.getInputAction(i,r);l(a)&&(z.clone(o,LDe.position),a(LDe),t.preventDefault())}var NDe={position:new z},FDe={position:new z};function Qte(e,t,n,i){let o=TT(i),r=e.getInputAction(t,o),a=e.getInputAction(n,o);if(l(r)||l(a)){let s=qy(e,i,e._primaryPosition);if(l(r)&&(z.clone(s,NDe.position),r(NDe)),l(a)){let c=e._primaryStartPosition;ene(c,s,e._clickPixelTolerance)&&(z.clone(s,FDe.position),a(FDe))}}}function qDe(e,t){if(!ine(e))return;let n=t.button;n!==Ia.LEFT&&n!==Ia.MIDDLE&&n!==Ia.RIGHT||(e._buttonDown[Ia.LEFT]&&(Qte(e,Sn.LEFT_UP,Sn.LEFT_CLICK,t),e._buttonDown[Ia.LEFT]=!1),e._buttonDown[Ia.MIDDLE]&&(Qte(e,Sn.MIDDLE_UP,Sn.MIDDLE_CLICK,t),e._buttonDown[Ia.MIDDLE]=!1),e._buttonDown[Ia.RIGHT]&&(Qte(e,Sn.RIGHT_UP,Sn.RIGHT_CLICK,t),e._buttonDown[Ia.RIGHT]=!1))}var $te={startPosition:new z,endPosition:new z};function YDe(e,t){if(!ine(e))return;let n=TT(t),i=qy(e,t,e._primaryPosition),o=e._primaryPreviousPosition,r=e.getInputAction(Sn.MOUSE_MOVE,n);l(r)&&(z.clone(o,$te.startPosition),z.clone(i,$te.endPosition),r($te)),z.clone(i,o),(e._buttonDown[Ia.LEFT]||e._buttonDown[Ia.MIDDLE]||e._buttonDown[Ia.RIGHT])&&t.preventDefault()}var kDe={position:new z};function mIt(e,t){let n=t.button,i;if(n===Ia.LEFT)i=Sn.LEFT_DOUBLE_CLICK;else return;let o=TT(t),r=e.getInputAction(i,o);l(r)&&(qy(e,t,kDe.position),r(kDe))}function pIt(e,t){let n;if(l(t.deltaY)){let r=t.deltaMode;r===t.DOM_DELTA_PIXEL?n=-t.deltaY:r===t.DOM_DELTA_LINE?n=-t.deltaY*40:n=-t.deltaY*120}else t.detail>0?n=t.detail*-120:n=t.wheelDelta;if(!l(n))return;let i=TT(t),o=e.getInputAction(Sn.WHEEL,i);l(o)&&(o(n),t.preventDefault())}function gIt(e,t){nne(e);let n=t.changedTouches,i,o=n.length,r,a,s=e._positions;for(i=0;i<o;++i)r=n[i],a=r.identifier,s.set(a,qy(e,r,new z));v5(e,t);let c=e._previousPositions;for(i=0;i<o;++i)r=n[i],a=r.identifier,c.set(a,z.clone(s.get(a)))}function zDe(e,t){nne(e);let n=t.changedTouches,i,o=n.length,r,a,s=e._positions;for(i=0;i<o;++i)r=n[i],a=r.identifier,s.remove(a);v5(e,t);let c=e._previousPositions;for(i=0;i<o;++i)r=n[i],a=r.identifier,c.remove(a)}var UDe={position:new z},Jte={position1:new z,position2:new z},VDe={position:new z},jDe={position:new z},GDe={position:new z};function v5(e,t){let n=TT(t),i=e._positions,o=i.length,r,a,s=e._isPinching;if(o!==1&&e._buttonDown[Ia.LEFT]){if(e._buttonDown[Ia.LEFT]=!1,l(e._touchHoldTimer)&&(clearTimeout(e._touchHoldTimer),e._touchHoldTimer=void 0),r=e.getInputAction(Sn.LEFT_UP,n),l(r)&&(z.clone(e._primaryPosition,VDe.position),r(VDe)),o===0&&!e._isTouchHolding&&(a=e.getInputAction(Sn.LEFT_CLICK,n),l(a))){let c=e._primaryStartPosition,u=e._previousPositions.values[0];ene(c,u,e._clickPixelTolerance)&&(z.clone(e._primaryPosition,jDe.position),a(jDe))}e._isTouchHolding=!1}if(o===0&&s&&(e._isPinching=!1,r=e.getInputAction(Sn.PINCH_END,n),l(r)&&r()),o===1&&!s){let c=i.values[0];z.clone(c,e._primaryPosition),z.clone(c,e._primaryStartPosition),z.clone(c,e._primaryPreviousPosition),e._buttonDown[Ia.LEFT]=!0,r=e.getInputAction(Sn.LEFT_DOWN,n),l(r)&&(z.clone(c,UDe.position),r(UDe)),e._touchHoldTimer=setTimeout(function(){if(!e.isDestroyed()&&(e._touchHoldTimer=void 0,e._isTouchHolding=!0,a=e.getInputAction(Sn.RIGHT_CLICK,n),l(a))){let u=e._primaryStartPosition,f=e._previousPositions.values[0];ene(u,f,e._holdPixelTolerance)&&(z.clone(e._primaryPosition,GDe.position),a(GDe))}},Hm.touchHoldDelayMilliseconds),t.preventDefault()}o===2&&!s&&(e._isPinching=!0,r=e.getInputAction(Sn.PINCH_START,n),l(r)&&(z.clone(i.values[0],Jte.position1),z.clone(i.values[1],Jte.position2),r(Jte),t.preventDefault()))}function _It(e,t){nne(e);let n=t.changedTouches,i,o=n.length,r,a,s=e._positions;for(i=0;i<o;++i){r=n[i],a=r.identifier;let u=s.get(a);l(u)&&qy(e,r,u)}XDe(e,t);let c=e._previousPositions;for(i=0;i<o;++i)r=n[i],a=r.identifier,z.clone(s.get(a),c.get(a))}var Zte={startPosition:new z,endPosition:new z},Oz={distance:{startPosition:new z,endPosition:new z},angleAndHeight:{startPosition:new z,endPosition:new z}};function XDe(e,t){let n=TT(t),i=e._positions,o=e._previousPositions,r=i.length,a;if(r===1&&e._buttonDown[Ia.LEFT]){let s=i.values[0];z.clone(s,e._primaryPosition);let c=e._primaryPreviousPosition;a=e.getInputAction(Sn.MOUSE_MOVE,n),l(a)&&(z.clone(c,Zte.startPosition),z.clone(s,Zte.endPosition),a(Zte)),z.clone(s,c),t.preventDefault()}else if(r===2&&e._isPinching&&(a=e.getInputAction(Sn.PINCH_MOVE,n),l(a))){let s=i.values[0],c=i.values[1],u=o.values[0],f=o.values[1],d=c.x-s.x,p=c.y-s.y,g=Math.sqrt(d*d+p*p)*.25,m=f.x-u.x,A=f.y-u.y,y=Math.sqrt(m*m+A*A)*.25,x=(c.y+s.y)*.125,b=(f.y+u.y)*.125,C=Math.atan2(p,d),E=Math.atan2(A,m);z.fromElements(0,y,Oz.distance.startPosition),z.fromElements(0,g,Oz.distance.endPosition),z.fromElements(E,b,Oz.angleAndHeight.startPosition),z.fromElements(C,x,Oz.angleAndHeight.endPosition),a(Oz)}}function AIt(e,t){if(t.target.setPointerCapture(t.pointerId),t.pointerType==="touch"){let n=e._positions,i=t.pointerId;n.set(i,qy(e,t,new z)),v5(e,t),e._previousPositions.set(i,z.clone(n.get(i)))}else WDe(e,t)}function HDe(e,t){if(t.pointerType==="touch"){let n=e._positions,i=t.pointerId;n.remove(i),v5(e,t),e._previousPositions.remove(i)}else qDe(e,t)}function yIt(e,t){if(t.pointerType==="touch"){let n=e._positions,i=t.pointerId,o=n.get(i);if(!l(o))return;qy(e,t,o),XDe(e,t);let r=e._previousPositions;z.clone(n.get(i),r.get(i))}else YDe(e,t)}function Hm(e){this._inputEvents={},this._buttonDown={[Ia.LEFT]:!1,[Ia.MIDDLE]:!1,[Ia.RIGHT]:!1},this._isPinching=!1,this._isTouchHolding=!1,this._lastSeenTouchEvent=-Hm.mouseEmulationIgnoreMilliseconds,this._primaryStartPosition=new z,this._primaryPosition=new z,this._primaryPreviousPosition=new z,this._positions=new Lt,this._previousPositions=new Lt,this._removalFunctions=[],this._touchHoldTimer=void 0,this._clickPixelTolerance=5,this._holdPixelTolerance=25,this._element=e??document,dIt(this)}Hm.prototype.setInputAction=function(e,t,n){let i=tne(t,n);this._inputEvents[i]=e};Hm.prototype.getInputAction=function(e,t){let n=tne(e,t);return this._inputEvents[n]};Hm.prototype.removeInputAction=function(e,t){let n=tne(e,t);delete this._inputEvents[n]};Hm.prototype.isDestroyed=function(){return!1};Hm.prototype.destroy=function(){return hIt(this),fe(this)};Hm.mouseEmulationIgnoreMilliseconds=800;Hm.touchHoldDelayMilliseconds=1500;var td=Hm;function ET(e){this._scene=e,this._currentTweens=[],this._morphHandler=void 0,this._morphCancelled=!1,this._completeMorph=void 0,this._morphToOrthographic=!1}ET.prototype.completeMorph=function(){l(this._completeMorph)&&this._completeMorph()};ET.prototype.morphTo2D=function(e,t){l(this._completeMorph)&&this._completeMorph();let n=this._scene;this._previousMode=n.mode,this._morphToOrthographic=n.camera.frustum instanceof fn,!(this._previousMode===ie.SCENE2D||this._previousMode===ie.MORPHING)&&(this._scene.morphStart.raiseEvent(this,this._previousMode,ie.SCENE2D,!0),n._mode=ie.MORPHING,n.camera._setTransform(M.IDENTITY),this._previousMode===ie.COLUMBUS_VIEW?JIt(this,e):rDt(this,e,t),e===0&&l(this._completeMorph)&&this._completeMorph())};var xIt=new h,bIt=new h,CIt=new h,TIt=new h,EIt=new h,vIt=new h,SIt=new h,wIt=new de,IIt=new M,DIt=new Vi,PIt=new fn,RIt={position:void 0,direction:void 0,up:void 0,position2D:void 0,direction2D:void 0,up2D:void 0,frustum:void 0};ET.prototype.morphToColumbusView=function(e,t){l(this._completeMorph)&&this._completeMorph();let n=this._scene;if(this._previousMode=n.mode,this._previousMode===ie.COLUMBUS_VIEW||this._previousMode===ie.MORPHING)return;this._scene.morphStart.raiseEvent(this,this._previousMode,ie.COLUMBUS_VIEW,!0),n.camera._setTransform(M.IDENTITY);let i=xIt,o=bIt,r=CIt;if(e>0)i.x=0,i.y=-1,i.z=1,i=h.multiplyByScalar(h.normalize(i,i),5*t.maximumRadius,i),h.negate(h.normalize(i,o),o),h.cross(h.UNIT_X,o,r);else{let u=n.camera;if(this._previousMode===ie.SCENE2D)h.clone(u.position,i),i.z=u.frustum.right-u.frustum.left,h.negate(h.UNIT_Z,o),h.clone(h.UNIT_Y,r);else{h.clone(u.positionWC,i),h.clone(u.directionWC,o),h.clone(u.upWC,r);let f=t.scaleToGeodeticSurface(i,SIt),d=pt.eastNorthUpToFixedFrame(f,t,IIt);M.inverseTransformation(d,d),n.mapProjection.project(t.cartesianToCartographic(i,wIt),i),M.multiplyByPointAsVector(d,o,o),M.multiplyByPointAsVector(d,r,r)}}let a;this._morphToOrthographic?(a=PIt,a.width=n.camera.frustum.right-n.camera.frustum.left,a.aspectRatio=n.drawingBufferWidth/n.drawingBufferHeight):(a=DIt,a.aspectRatio=n.drawingBufferWidth/n.drawingBufferHeight,a.fov=D.toRadians(60));let s=RIt;s.position=i,s.direction=o,s.up=r,s.frustum=a;let c=sDt(s);Mz(this,c),this._previousMode===ie.SCENE2D?aDt(this,e,s,c):(s.position2D=M.multiplyByPoint(bo.TRANSFORM_2D,i,TIt),s.direction2D=M.multiplyByPointAsVector(bo.TRANSFORM_2D,o,EIt),s.up2D=M.multiplyByPointAsVector(bo.TRANSFORM_2D,r,vIt),n._mode=ie.MORPHING,rPe(this,e,s,c)),e===0&&l(this._completeMorph)&&this._completeMorph()};var ane={position:new h,direction:new h,up:new h,frustum:void 0},QDe=new Vi;ET.prototype.morphTo3D=function(e,t){l(this._completeMorph)&&this._completeMorph();let n=this._scene;if(this._previousMode=n.mode,!(this._previousMode===ie.SCENE3D||this._previousMode===ie.MORPHING)){if(this._scene.morphStart.raiseEvent(this,this._previousMode,ie.SCENE3D,!0),n._mode=ie.MORPHING,n.camera._setTransform(M.IDENTITY),this._previousMode===ie.SCENE2D)jIt(this,e,t);else{let i;e>0?(i=ane,h.fromDegrees(0,0,5*t.maximumRadius,t,i.position),h.negate(i.position,i.direction),h.normalize(i.direction,i.direction),h.clone(h.UNIT_Z,i.up)):i=$De(this,t);let o,r=n.camera;r.frustum instanceof fn?o=r.frustum.clone():(o=QDe,o.aspectRatio=n.drawingBufferWidth/n.drawingBufferHeight,o.fov=D.toRadians(60)),i.frustum=o;let a=sPe(i);Mz(this,a),rne(this,e,i,a)}e===0&&l(this._completeMorph)&&this._completeMorph()}};ET.prototype.isDestroyed=function(){return!1};ET.prototype.destroy=function(){return S5(this),fe(this)};function Mz(e,t){if(e._scene.completeMorphOnUserInput){e._morphHandler=new td(e._scene.canvas);let n=function(){e._morphCancelled=!0,e._scene.camera.cancelFlight(),t(e)};e._completeMorph=n,e._morphHandler.setInputAction(n,Sn.LEFT_DOWN),e._morphHandler.setInputAction(n,Sn.MIDDLE_DOWN),e._morphHandler.setInputAction(n,Sn.RIGHT_DOWN),e._morphHandler.setInputAction(n,Sn.WHEEL)}}function S5(e){let t=e._currentTweens;for(let n=0;n<t.length;++n)t[n].cancelTween();e._currentTweens.length=0,e._morphHandler=e._morphHandler&&e._morphHandler.destroy()}var OIt=new de,MIt=new h,BIt=new M;function $De(e,t){let n=e._scene,i=n.camera,o=ane,r=o.position,a=o.direction,s=o.up,c=n.mapProjection.unproject(i.position,OIt);t.cartographicToCartesian(c,r);let u=t.scaleToGeodeticSurface(r,MIt),f=pt.eastNorthUpToFixedFrame(u,t,BIt);return M.multiplyByPointAsVector(f,i.direction,a),M.multiplyByPointAsVector(f,i.up,s),o}var LIt=new h,NIt=new h,FIt=new h,kIt=new h,zIt=new h,UIt=new h;function rne(e,t,n,i){t*=.5;let o=e._scene,r=o.camera,a=h.clone(r.position,LIt),s=h.clone(r.direction,NIt),c=h.clone(r.up,FIt),u=M.multiplyByPoint(bo.TRANSFORM_2D_INVERSE,n.position,kIt),f=M.multiplyByPointAsVector(bo.TRANSFORM_2D_INVERSE,n.direction,zIt),d=M.multiplyByPointAsVector(bo.TRANSFORM_2D_INVERSE,n.up,UIt);function p(m){hh(a,u,m.time,r.position),hh(s,f,m.time,r.direction),hh(c,d,m.time,r.up),h.cross(r.direction,r.up,r.right),h.normalize(r.right,r.right)}let g=o.tweens.add({duration:t,easingFunction:wa.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:p,complete:function(){aPe(e,o,0,1,t,i)}});e._currentTweens.push(g)}var VIt=new fn,JDe=new h,ZDe=new h,ePe=new h,sne=new h,tPe=new h,nPe=new h;function jIt(e,t,n){t/=3;let i=e._scene,o=i.camera,r;t>0?(r=ane,h.fromDegrees(0,0,5*n.maximumRadius,n,r.position),h.negate(r.position,r.direction),h.normalize(r.direction,r.direction),h.clone(h.UNIT_Z,r.up)):(o.position.z=o.frustum.right-o.frustum.left,r=$De(e,n));let a;e._morphToOrthographic?(a=VIt,a.aspectRatio=i.drawingBufferWidth/i.drawingBufferHeight,a.width=o.frustum.right-o.frustum.left):(a=QDe,a.aspectRatio=i.drawingBufferWidth/i.drawingBufferHeight,a.fov=D.toRadians(60)),r.frustum=a;let s=sPe(r);Mz(e,s);let c;e._morphToOrthographic?c=function(){rne(e,t,r,s)}:c=function(){oPe(e,t,r,function(){rne(e,t,r,s)})},t>0?(i._mode=ie.SCENE2D,o.flyTo({duration:t,destination:h.fromDegrees(0,0,5*n.maximumRadius,n,sne),complete:function(){i._mode=ie.MORPHING,c()}})):c()}function hh(e,t,n,i){return h.lerp(e,t,n,i)}function iPe(e,t,n,i,o){let r=e._scene,a=r.camera;if(a.frustum instanceof fn)return;let s=a.frustum.fov,c=D.RADIANS_PER_DEGREE*.5,u=n.position.z*Math.tan(s*.5);a.frustum.far=u/Math.tan(c*.5)+1e7;function f(p){a.frustum.fov=D.lerp(s,c,p.time);let g=u/Math.tan(a.frustum.fov*.5);i(a,g)}let d=r.tweens.add({duration:t,easingFunction:wa.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:f,complete:function(){a.frustum=n.frustum.clone(),o(e)}});e._currentTweens.push(d)}var GIt=new h,HIt=new h,WIt=new h,one=new h,qIt=new h,YIt=new h,XIt=new da,KIt=new gn,QIt=new h,$It={position:void 0,direction:void 0,up:void 0,frustum:void 0};function JIt(e,t){t*=.5;let n=e._scene,i=n.camera,o=h.clone(i.position,GIt),r=h.clone(i.direction,HIt),a=h.clone(i.up,WIt),s=h.negate(h.UNIT_Z,qIt),c=h.clone(h.UNIT_Y,YIt),u=one;if(t>0)h.clone(h.ZERO,one),u.z=5*n.ellipsoid.maximumRadius;else{h.clone(o,one);let y=KIt;M.multiplyByPoint(bo.TRANSFORM_2D,o,y.origin),M.multiplyByPointAsVector(bo.TRANSFORM_2D,r,y.direction);let x=n.globe;if(l(x)){let b=x.pickWorldCoordinates(y,n,!0,QIt);l(b)&&(M.multiplyByPoint(bo.TRANSFORM_2D_INVERSE,b,u),u.z+=h.distance(o,u))}}let f=XIt;f.right=u.z*.5,f.left=-f.right,f.top=f.right*(n.drawingBufferHeight/n.drawingBufferWidth),f.bottom=-f.top;let d=$It;d.position=u,d.direction=s,d.up=c,d.frustum=f;let p=cPe(d);Mz(e,p);function g(y){hh(o,u,y.time,i.position),hh(r,s,y.time,i.direction),hh(a,c,y.time,i.up),h.cross(i.direction,i.up,i.right),h.normalize(i.right,i.right),i._adjustOrthographicFrustum(!0)}function m(y,x){y.position.z=x}let A=n.tweens.add({duration:t,easingFunction:wa.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:g,complete:function(){iPe(e,t,d,m,p)}});e._currentTweens.push(A)}var KDe=new de,ZIt={position:new h,direction:new h,up:new h,position2D:new h,direction2D:new h,up2D:new h,frustum:new da},eDt={position:new h,direction:new h,up:new h,frustum:void 0},tDt=new h,nDt=new gn,iDt=new M,oDt=new h;function rDt(e,t,n){t*=.5;let i=e._scene,o=i.camera,r=ZIt;if(t>0)h.clone(h.ZERO,r.position),r.position.z=5*n.maximumRadius,h.negate(h.UNIT_Z,r.direction),h.clone(h.UNIT_Y,r.up);else{n.cartesianToCartographic(o.positionWC,KDe),i.mapProjection.project(KDe,r.position),h.negate(h.UNIT_Z,r.direction),h.clone(h.UNIT_Y,r.up);let d=nDt;h.clone(r.position2D,d.origin);let p=h.clone(o.directionWC,d.direction),g=n.scaleToGeodeticSurface(o.positionWC,oDt),m=pt.eastNorthUpToFixedFrame(g,n,iDt);M.inverseTransformation(m,m),M.multiplyByPointAsVector(m,p,p),M.multiplyByPointAsVector(bo.TRANSFORM_2D,p,p);let A=i.globe;if(l(A)){let y=A.pickWorldCoordinates(d,i,!0,tDt);if(l(y)){let x=h.distance(r.position2D,y);y.x+=x,h.clone(y,r.position2D)}}}function a(d,p){d.position.x=p}M.multiplyByPoint(bo.TRANSFORM_2D,r.position,r.position2D),M.multiplyByPointAsVector(bo.TRANSFORM_2D,r.direction,r.direction2D),M.multiplyByPointAsVector(bo.TRANSFORM_2D,r.up,r.up2D);let s=r.frustum;s.right=r.position.z*.5,s.left=-s.right,s.top=s.right*(i.drawingBufferHeight/i.drawingBufferWidth),s.bottom=-s.top;let c=eDt;M.multiplyByPoint(bo.TRANSFORM_2D_INVERSE,r.position2D,c.position),h.clone(r.direction,c.direction),h.clone(r.up,c.up),c.frustum=s;let u=cPe(c);Mz(e,u);function f(){iPe(e,t,r,a,u)}rPe(e,t,r,f)}function oPe(e,t,n,i){let o=e._scene,r=o.camera,a=r.frustum.right-r.frustum.left;r.frustum=n.frustum.clone();let s=r.frustum.fov,c=D.RADIANS_PER_DEGREE*.5,u=a*Math.tan(s*.5);r.frustum.far=u/Math.tan(c*.5)+1e7,r.frustum.fov=c;function f(p){r.frustum.fov=D.lerp(c,s,p.time),r.position.z=u/Math.tan(r.frustum.fov*.5)}let d=o.tweens.add({duration:t,easingFunction:wa.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:f,complete:function(){i(e)}});e._currentTweens.push(d)}function aDt(e,t,n,i){t*=.5;let o=e._scene,r=o.camera,a=h.clone(n.position,sne),s=h.clone(n.direction,tPe),c=h.clone(n.up,nPe);o._mode=ie.MORPHING;function u(){r.frustum=n.frustum.clone();let f=h.clone(r.position,JDe),d=h.clone(r.direction,ZDe),p=h.clone(r.up,ePe);f.z=a.z;function g(A){hh(f,a,A.time,r.position),hh(d,s,A.time,r.direction),hh(p,c,A.time,r.up),h.cross(r.direction,r.up,r.right),h.normalize(r.right,r.right)}let m=o.tweens.add({duration:t,easingFunction:wa.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:g,complete:function(){i(e)}});e._currentTweens.push(m)}e._morphToOrthographic?u():oPe(e,0,n,u)}function rPe(e,t,n,i){let o=e._scene,r=o.camera,a=h.clone(r.position,JDe),s=h.clone(r.direction,ZDe),c=h.clone(r.up,ePe),u=h.clone(n.position2D,sne),f=h.clone(n.direction2D,tPe),d=h.clone(n.up2D,nPe);function p(m){hh(a,u,m.time,r.position),hh(s,f,m.time,r.direction),hh(c,d,m.time,r.up),h.cross(r.direction,r.up,r.right),h.normalize(r.right,r.right),r._adjustOrthographicFrustum(!0)}let g=o.tweens.add({duration:t,easingFunction:wa.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:p,complete:function(){aPe(e,o,1,0,t,i)}});e._currentTweens.push(g)}function aPe(e,t,n,i,o,r){let a={object:t,property:"morphTime",startValue:n,stopValue:i,duration:o,easingFunction:wa.QUARTIC_OUT};l(r)&&(a.complete=function(){r(e)});let s=t.tweens.addProperty(a);e._currentTweens.push(s)}function sPe(e){return function(t){let n=t._scene;n._mode=ie.SCENE3D,n.morphTime=ie.getMorphTime(ie.SCENE3D),S5(t);let i=n.camera;(t._previousMode!==ie.MORPHING||t._morphCancelled)&&(t._morphCancelled=!1,h.clone(e.position,i.position),h.clone(e.direction,i.direction),h.clone(e.up,i.up),h.cross(i.direction,i.up,i.right),h.normalize(i.right,i.right),i.frustum=e.frustum.clone());let o=i.frustum;n.frameState.useLogDepth&&(o.near=.1,o.far=1e10);let r=l(t._completeMorph);t._completeMorph=void 0,n.camera.update(n.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,ie.SCENE3D,r)}}function cPe(e){return function(t){let n=t._scene;n._mode=ie.SCENE2D,n.morphTime=ie.getMorphTime(ie.SCENE2D),S5(t);let i=n.camera;h.clone(e.position,i.position),i.position.z=n.ellipsoid.maximumRadius*2,h.clone(e.direction,i.direction),h.clone(e.up,i.up),h.cross(i.direction,i.up,i.right),h.normalize(i.right,i.right),i.frustum=e.frustum.clone();let o=l(t._completeMorph);t._completeMorph=void 0,n.camera.update(n.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,ie.SCENE2D,o)}}function sDt(e){return function(t){let n=t._scene;n._mode=ie.COLUMBUS_VIEW,n.morphTime=ie.getMorphTime(ie.COLUMBUS_VIEW),S5(t);let i=n.camera;(t._previousModeMode!==ie.MORPHING||t._morphCancelled)&&(t._morphCancelled=!1,h.clone(e.position,i.position),h.clone(e.direction,i.direction),h.clone(e.up,i.up),h.cross(i.direction,i.up,i.right),h.normalize(i.right,i.right));let o=i.frustum;n.frameState.useLogDepth&&(o.near=.1,o.far=1e10);let r=l(t._completeMorph);t._completeMorph=void 0,n.camera.update(n.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,ie.COLUMBUS_VIEW,r)}}var Bz=ET;var lPe={LEFT_DRAG:0,RIGHT_DRAG:1,MIDDLE_DRAG:2,WHEEL:3,PINCH:4};Object.freeze(lPe);var Ji=lPe;var mPe=[mr.SHIFT,mr.CTRL,mr.ALT,[mr.SHIFT,mr.CTRL],[mr.SHIFT,mr.ALT],[mr.CTRL,mr.ALT],[mr.SHIFT,mr.CTRL,mr.ALT]];function Xs(e,t){if(!l(t))return`${e}`;let n=Array.isArray(t)?t.toSorted():[t];return`${e}+${n.join("+")}`}function cDt(e,t){z.clone(e.distance.startPosition,t.distance.startPosition),z.clone(e.distance.endPosition,t.distance.endPosition),z.clone(e.angleAndHeight.startPosition,t.angleAndHeight.startPosition),z.clone(e.angleAndHeight.endPosition,t.angleAndHeight.endPosition)}function uPe(e,t,n){let i=Xs(Ji.PINCH,t),o=e._update,r=e._isDown,a=e._eventStartPosition,s=e._pressTime,c=e._releaseTime;o[i]=!0,r[i]=!1,a[i]=new z;let u=e._movement[i];l(u)||(u=e._movement[i]={}),u.distance={startPosition:new z,endPosition:new z},u.angleAndHeight={startPosition:new z,endPosition:new z},u.prevAngle=0,e._eventHandler.setInputAction(function(f){e._buttonsDown++,r[i]=!0,s[i]=new Date,z.lerp(f.position1,f.position2,.5,a[i])},Sn.PINCH_START,t),e._eventHandler.setInputAction(function(){e._buttonsDown=Math.max(e._buttonsDown-1,0),r[i]=!1,c[i]=new Date},Sn.PINCH_END,t),e._eventHandler.setInputAction(function(f){if(r[i]){o[i]?(cDt(f,u),o[i]=!1,u.prevAngle=u.angleAndHeight.startPosition.x):(z.clone(f.distance.endPosition,u.distance.endPosition),z.clone(f.angleAndHeight.endPosition,u.angleAndHeight.endPosition));let d=u.angleAndHeight.endPosition.x,p=u.prevAngle,g=Math.PI*2;for(;d>=p+Math.PI;)d-=g;for(;d<p-Math.PI;)d+=g;u.angleAndHeight.endPosition.x=-d*n.clientWidth/12,u.angleAndHeight.startPosition.x=-p*n.clientWidth/12}},Sn.PINCH_MOVE,t)}function fPe(e,t){let n=Xs(Ji.WHEEL,t),i=e._pressTime,o=e._releaseTime,r=e._update;r[n]=!0;let a=e._movement[n];l(a)||(a=e._movement[n]={});let s=e._lastMovement[n];l(s)||(s=e._lastMovement[n]={startPosition:new z,endPosition:new z,valid:!1}),a.startPosition=new z,z.clone(z.ZERO,a.startPosition),a.endPosition=new z,e._eventHandler.setInputAction(function(c){let u=7.5*D.toRadians(c);i[n]=o[n]=new Date,a.endPosition.x=0,a.endPosition.y=u,z.clone(a.endPosition,s.endPosition),s.valid=!0,r[n]=!1},Sn.WHEEL,t)}function lI(e,t,n){let i=Xs(n,t),o=e._isDown,r=e._eventStartPosition,a=e._pressTime;o[i]=!1,r[i]=new z;let s=e._lastMovement[i];l(s)||(s=e._lastMovement[i]={startPosition:new z,endPosition:new z,valid:!1});let c,u;n===Ji.LEFT_DRAG?(c=Sn.LEFT_DOWN,u=Sn.LEFT_UP):n===Ji.RIGHT_DRAG?(c=Sn.RIGHT_DOWN,u=Sn.RIGHT_UP):n===Ji.MIDDLE_DRAG&&(c=Sn.MIDDLE_DOWN,u=Sn.MIDDLE_UP),e._eventHandler.setInputAction(function(f){e._buttonsDown++,s.valid=!1,o[i]=!0,a[i]=new Date,z.clone(f.position,r[i])},c,t),e._eventHandler.setInputAction(function(){cne(Xs(n,void 0),e);for(let f of mPe){let d=Xs(n,f);cne(d,e)}},u,t)}function cne(e,t){let n=t._releaseTime,i=t._isDown;i[e]&&(t._buttonsDown=Math.max(t._buttonsDown-1,0)),i[e]=!1,n[e]=new Date}function dPe(e,t){z.clone(e.startPosition,t.startPosition),z.clone(e.endPosition,t.endPosition)}function lDt(e,t,n){let i=n._isDown,o=!1,r=Xs(e,t);for(let[c,u]of Object.entries(i))c.startsWith(e)&&u&&c!==r&&(o=!0,cne(c,n));if(!o)return;let a=n._pressTime,s=n._lastMovement[r];l(s)||(s=n._lastMovement[r]={startPosition:new z,endPosition:new z,valid:!1}),n._buttonsDown++,s.valid=!1,i[r]=!0,a[r]=new Date}function hPe(e,t){let n=e._update,i=e._movement,o=e._lastMovement,r=e._isDown;for(let a in Ji)if(Ji.hasOwnProperty(a)){let s=Ji[a];if(l(s)){let c=Xs(s,t);n[c]=!0,l(e._lastMovement[c])||(e._lastMovement[c]={startPosition:new z,endPosition:new z,valid:!1}),l(e._movement[c])||(e._movement[c]={startPosition:new z,endPosition:new z})}}e._eventHandler.setInputAction(function(a){for(let s in Ji)if(Ji.hasOwnProperty(s)){let c=Ji[s];if(l(c)){let u=Xs(c,t);lDt(c,t,e),r[u]&&(n[u]?(dPe(i[u],o[u]),o[u].valid=!0,dPe(a,i[u]),n[u]=!1):z.clone(a.endPosition,i[u].endPosition))}}z.clone(a.endPosition,e._currentMousePosition)},Sn.MOUSE_MOVE,t)}function mh(e){this._eventHandler=new td(e),this._update={},this._movement={},this._lastMovement={},this._isDown={},this._eventStartPosition={},this._pressTime={},this._releaseTime={},this._buttonsDown=0,this._currentMousePosition=new z,fPe(this,void 0),uPe(this,void 0,e),lI(this,void 0,Ji.LEFT_DRAG),lI(this,void 0,Ji.RIGHT_DRAG),lI(this,void 0,Ji.MIDDLE_DRAG),hPe(this,void 0);for(let t of mPe)fPe(this,t),uPe(this,t,e),lI(this,t,Ji.LEFT_DRAG),lI(this,t,Ji.RIGHT_DRAG),lI(this,t,Ji.MIDDLE_DRAG),hPe(this,t)}Object.defineProperties(mh.prototype,{currentMousePosition:{get:function(){return this._currentMousePosition}},anyButtonDown:{get:function(){let e=!this._update[Xs(Ji.WHEEL)]||!this._update[Xs(Ji.WHEEL,mr.SHIFT)]||!this._update[Xs(Ji.WHEEL,mr.CTRL)]||!this._update[Xs(Ji.WHEEL,mr.ALT)];return this._buttonsDown>0||e}}});mh.prototype.isMoving=function(e,t){let n=Xs(e,t);return!this._update[n]};mh.prototype.getMovement=function(e,t){let n=Xs(e,t);return this._movement[n]};mh.prototype.getLastMovement=function(e,t){let n=Xs(e,t),i=this._lastMovement[n];if(i.valid)return i};mh.prototype.isButtonDown=function(e,t){let n=Xs(e,t);return this._isDown[n]};mh.prototype.getStartMousePosition=function(e,t){if(e===Ji.WHEEL)return this._currentMousePosition;let n=Xs(e,t);return this._eventStartPosition[n]};mh.prototype.getButtonPressTime=function(e,t){let n=Xs(e,t);return this._pressTime[n]};mh.prototype.getButtonReleaseTime=function(e,t){let n=Xs(e,t);return this._releaseTime[n]};mh.prototype.reset=function(){for(let e in this._update)this._update.hasOwnProperty(e)&&(this._update[e]=!0)};mh.prototype.isDestroyed=function(){return!1};mh.prototype.destroy=function(){return this._eventHandler=this._eventHandler&&this._eventHandler.destroy(),fe(this)};var Lz=mh;function w5(e,t,n,i,o,r,a,s,c,u){this._tweens=e,this._tweenjs=t,this._startObject=We(n),this._stopObject=We(i),this._duration=o,this._delay=r,this._easingFunction=a,this._update=s,this._complete=c,this.cancel=u,this.needsStart=!0}Object.defineProperties(w5.prototype,{startObject:{get:function(){return this._startObject}},stopObject:{get:function(){return this._stopObject}},duration:{get:function(){return this._duration}},delay:{get:function(){return this._delay}},easingFunction:{get:function(){return this._easingFunction}},update:{get:function(){return this._update}},complete:{get:function(){return this._complete}},tweenjs:{get:function(){return this._tweenjs}}});w5.prototype.cancelTween=function(){this._tweens.remove(this)};function Wm(){this._tweens=[]}Object.defineProperties(Wm.prototype,{length:{get:function(){return this._tweens.length}}});Wm.prototype.add=function(e){if(e=e??G.EMPTY_OBJECT,e.duration===0)return l(e.complete)&&e.complete(),new w5(this);let t=e.duration/ii.SECONDS_PER_MILLISECOND,n=e.delay??0,i=n/ii.SECONDS_PER_MILLISECOND,o=e.easingFunction??wa.LINEAR_NONE,r=e.startObject,a=new pSe(r);a.to(We(e.stopObject),t),a.delay(i),a.easing(o),l(e.update)&&a.onUpdate(function(){e.update(r)}),a.onComplete(e.complete??null),a.repeat(e._repeat??0);let s=new w5(this,a,e.startObject,e.stopObject,e.duration,n,o,e.update,e.complete,e.cancel);return this._tweens.push(s),s};Wm.prototype.addProperty=function(e){e=e??G.EMPTY_OBJECT;let t=e.object,n=e.property,i=e.startValue,o=e.stopValue;function r(a){t[n]=a.value}return this.add({startObject:{value:i},stopObject:{value:o},duration:e.duration??3,delay:e.delay,easingFunction:e.easingFunction,update:r,complete:e.complete,cancel:e.cancel,_repeat:e._repeat})};Wm.prototype.addAlpha=function(e){e=e??G.EMPTY_OBJECT;let t=e.material,n=[];for(let o in t.uniforms)t.uniforms.hasOwnProperty(o)&&l(t.uniforms[o])&&l(t.uniforms[o].alpha)&&n.push(o);function i(o){let r=n.length;for(let a=0;a<r;++a)t.uniforms[n[a]].alpha=o.alpha}return this.add({startObject:{alpha:e.startValue??0},stopObject:{alpha:e.stopValue??1},duration:e.duration??3,delay:e.delay,easingFunction:e.easingFunction,update:i,complete:e.complete,cancel:e.cancel})};Wm.prototype.addOffsetIncrement=function(e){e=e??G.EMPTY_OBJECT;let n=e.material.uniforms;return this.addProperty({object:n,property:"offset",startValue:n.offset,stopValue:n.offset+1,duration:e.duration,delay:e.delay,easingFunction:e.easingFunction,update:e.update,cancel:e.cancel,_repeat:1/0})};Wm.prototype.remove=function(e){if(!l(e))return!1;let t=this._tweens.indexOf(e);return t!==-1?(e.tweenjs.stop(),l(e.cancel)&&e.cancel(),this._tweens.splice(t,1),!0):!1};Wm.prototype.removeAll=function(){let e=this._tweens;for(let t=0;t<e.length;++t){let n=e[t];n.tweenjs.stop(),l(n.cancel)&&n.cancel()}e.length=0};Wm.prototype.contains=function(e){return l(e)&&this._tweens.indexOf(e)!==-1};Wm.prototype.get=function(e){return this._tweens[e]};Wm.prototype.update=function(e){let t=this._tweens,n=0;for(e=l(e)?e/ii.SECONDS_PER_MILLISECOND:Fi();n<t.length;){let i=t[n],o=i.tweenjs;if(i.needsStart)i.needsStart=!1,o.start(e);else if(o.update(e))n++;else{if(t[n]?.needsStart)continue;o.stop(),t.splice(n,1)}}};var vT=Wm;function Fz(e){this.enableInputs=!0,this.enableTranslate=!0,this.enableZoom=!0,this.enableRotate=!0,this.enableTilt=!0,this.enableLook=!0,this.inertiaSpin=.9,this.inertiaTranslate=.9,this.inertiaZoom=.8,this.maximumMovementRatio=.1,this.bounceAnimationTime=3,this.minimumZoomDistance=1,this.maximumZoomDistance=Number.POSITIVE_INFINITY,this.zoomFactor=5,this.translateEventTypes=Ji.LEFT_DRAG,this.zoomEventTypes=[Ji.RIGHT_DRAG,Ji.WHEEL,Ji.PINCH],this.rotateEventTypes=Ji.LEFT_DRAG,this.tiltEventTypes=[Ji.MIDDLE_DRAG,Ji.PINCH,{eventType:Ji.LEFT_DRAG,modifier:mr.CTRL},{eventType:Ji.RIGHT_DRAG,modifier:mr.CTRL}],this.lookEventTypes={eventType:Ji.LEFT_DRAG,modifier:mr.SHIFT};let t=e.ellipsoid??te.default;this.minimumPickingTerrainHeight=te.WGS84.equals(t)?15e4:t.minimumRadius*.025,this._minimumPickingTerrainHeight=this.minimumPickingTerrainHeight,this.minimumPickingTerrainDistanceWithInertia=te.WGS84.equals(t)?4e3:t.minimumRadius*63e-5,this.minimumCollisionTerrainHeight=te.WGS84.equals(t)?15e3:t.minimumRadius*.0025,this._minimumCollisionTerrainHeight=this.minimumCollisionTerrainHeight,this.minimumTrackBallHeight=te.WGS84.equals(t)?75e5:t.minimumRadius*1.175,this._minimumTrackBallHeight=this.minimumTrackBallHeight,this.enableCollisionDetection=!0,this.maximumTiltAngle=void 0,this._scene=e,this._globe=void 0,this._ellipsoid=t,this._lastGlobeHeight=0,this._aggregator=new Lz(e.canvas),this._lastInertiaSpinMovement=void 0,this._lastInertiaZoomMovement=void 0,this._lastInertiaTranslateMovement=void 0,this._lastInertiaTiltMovement=void 0,this._inertiaDisablers={_lastInertiaZoomMovement:["_lastInertiaSpinMovement","_lastInertiaTranslateMovement","_lastInertiaTiltMovement"],_lastInertiaTiltMovement:["_lastInertiaSpinMovement","_lastInertiaTranslateMovement"]},this._tweens=new vT,this._tween=void 0,this._horizontalRotationAxis=void 0,this._tiltCenterMousePosition=new z(-1,-1),this._tiltCenter=new h,this._rotateMousePosition=new z(-1,-1),this._rotateStartPosition=new h,this._strafeStartPosition=new h,this._strafeMousePosition=new z,this._strafeEndMousePosition=new z,this._zoomMouseStart=new z(-1,-1),this._zoomWorldPosition=new h,this._useZoomWorldPosition=!1,this._panLastMousePosition=new z,this._panLastWorldPosition=new h,this._tiltCVOffMap=!1,this._looking=!1,this._rotating=!1,this._strafing=!1,this._zoomingOnVector=!1,this._zoomingUnderground=!1,this._rotatingZoom=!1,this._adjustedHeightForTerrain=!1,this._cameraUnderground=!1;let n=e.mapProjection;this._maxCoord=n.project(new de(Math.PI,D.PI_OVER_TWO)),this._rotateFactor=void 0,this._rotateRateRangeAdjustment=void 0,this._maximumRotateRate=1.77,this._minimumRotateRate=1/5e3,this._minimumZoomRate=20,this._maximumZoomRate=5906376272e3,this._minimumUndergroundPickDistance=2e3,this._maximumUndergroundPickDistance=1e4}function uDt(e,t){if(e<0)return 0;let n=(1-t)*25;return Math.exp(-n*e)}function fDt(e){return z.equalsEpsilon(e.startPosition,e.endPosition,D.EPSILON14)}var dDt=.4;function hDt(e,t,n,i,o,r,a){let s=r[a];l(s)||(s=r[a]={startPosition:new z,endPosition:new z,motion:new z,inertiaEnabled:!0});let c=e.getButtonPressTime(t,n),u=e.getButtonReleaseTime(t,n),f=c&&u&&(u.getTime()-c.getTime())/1e3,p=u&&(new Date().getTime()-u.getTime())/1e3;if(c&&u&&f<dDt){let g=uDt(p,i),m=e.getLastMovement(t,n);if(!l(m)||fDt(m)||!s.inertiaEnabled||(s.motion.x=(m.endPosition.x-m.startPosition.x)*.5,s.motion.y=(m.endPosition.y-m.startPosition.y)*.5,s.startPosition=z.clone(m.startPosition,s.startPosition),s.endPosition=z.multiplyByScalar(s.motion,g,s.endPosition),s.endPosition=z.add(s.startPosition,s.endPosition,s.endPosition),isNaN(s.endPosition.x)||isNaN(s.endPosition.y)||z.distance(s.startPosition,s.endPosition)<.5))return;if(!e.isButtonDown(t,n)){let A=e.getStartMousePosition(t,n);o(r,A,s)}}}function mDt(e,t){if(l(t)){let n=e[t];l(n)&&(n.inertiaEnabled=!0);let i=e._inertiaDisablers[t];if(l(i)){let o=i.length;for(let r=0;r<o;++r)n=e[i[r]],l(n)&&(n.inertiaEnabled=!1)}}}var pPe=[];function pu(e,t,n,i,o,r){if(!l(n))return;let a=e._aggregator;Array.isArray(n)||(pPe[0]=n,n=pPe);let s=n.length;for(let c=0;c<s;++c){let u=n[c],f=l(u.eventType)?u.eventType:u,d=u.modifier,p=a.isMoving(f,d)&&a.getMovement(f,d),g=a.getStartMousePosition(f,d);e.enableInputs&&t&&(p?(i(e,g,p),mDt(e,r)):o<1&&hDt(a,f,d,o,i,e,r))}}var I5=new gn,pDt=new h,gDt=new z,_Dt=new h,ADt=new z,yDt=new h,xDt=new h,bDt=new h,CDt=new h,wPe=new h,TDt=new h,EDt=new h,vDt=new h,SDt=new h,wDt=new h,IDt=new h,DDt=new h,PDt=new h,RDt=new h,ODt=new h,ST=new h,gPe=new h,_Pe=new h,lne={orientation:new Tc};function _ne(e,t,n,i,o,r){let a=1;l(r)&&(a=D.clamp(Math.abs(r),.25,1));let s=n.endPosition.y-n.startPosition.y,u=s>0?e.minimumZoomDistance*a:0,f=e.maximumZoomDistance,d=o-u,p=i*d;p=D.clamp(p,e._minimumZoomRate,e._maximumZoomRate);let g=s/e._scene.canvas.clientHeight;g=Math.min(g,e.maximumMovementRatio);let m=p*g;if(e.enableCollisionDetection||e.minimumZoomDistance===0||!l(e._globe)){if(m>0&&Math.abs(o-u)<1||m<0&&Math.abs(o-f)<1)return;o-m<u?m=o-u-1:o-m>f&&(m=o-f)}let A=e._scene,y=A.camera,x=A.mode,b=lne.orientation;b.heading=y.heading,b.pitch=y.pitch,b.roll=y.roll;let C=n.inertiaEnabled??z.equals(t,e._zoomMouseStart),E=e._zoomingOnVector,S=e._rotatingZoom,w;if(C||(e._zoomMouseStart=z.clone(t,e._zoomMouseStart),l(e._globe)&&x===ie.SCENE2D?(w=y.getPickRay(t,I5).origin,w=h.fromElements(w.y,w.z,w.x)):l(e._globe)&&(w=I_(e,t,pDt)),l(w)?(e._useZoomWorldPosition=!0,e._zoomWorldPosition=h.clone(w,e._zoomWorldPosition)):e._useZoomWorldPosition=!1,E=e._zoomingOnVector=!1,S=e._rotatingZoom=!1,e._zoomingUnderground=e._cameraUnderground),!e._useZoomWorldPosition){y.zoomIn(m);return}let P=x===ie.COLUMBUS_VIEW;if(y.positionCartographic.height<2e6&&(S=!0),!C||S){if(x===ie.SCENE2D){let R=e._zoomWorldPosition,B=y.position;if(!h.equals(R,B)&&y.positionCartographic.height<e._maxCoord.x*2){let L=y.position.x,_=h.subtract(R,B,_Dt);h.normalize(_,_);let T=h.distance(R,B)*m/(y.getMagnitude()*.5);y.move(_,T*.5),(y.position.x<0&&L>0||y.position.x>0&&L<0)&&(w=y.getPickRay(t,I5).origin,w=h.fromElements(w.y,w.z,w.x),e._zoomWorldPosition=h.clone(w,e._zoomWorldPosition))}}else if(x===ie.SCENE3D){let R=h.normalize(y.position,wPe);if(e._cameraUnderground||e._zoomingUnderground||y.positionCartographic.height<3e3&&Math.abs(h.dot(y.direction,R))<.6)P=!0;else{let B=A.canvas,L=ADt;L.x=B.clientWidth/2,L.y=B.clientHeight/2;let _=I_(e,L,yDt);if(!l(_))P=!0;else if(y.positionCartographic.height<1e6)if(h.dot(y.direction,R)>=-.5)P=!0;else{let T=EDt;h.clone(y.position,T);let v=e._zoomWorldPosition,I=TDt;if(I=h.normalize(v,I),h.dot(I,R)<0)return;let O=ODt,N=wDt;h.clone(y.direction,N),h.add(T,h.multiplyByScalar(N,1e3,ST),O);let j=IDt,k=DDt;h.subtract(v,T,j),h.normalize(j,k);let U=h.dot(R,k);if(U>=0){e._zoomMouseStart.x=-1;return}let F=Math.acos(-U),H=h.magnitude(T),q=h.magnitude(v),J=H-m,W=h.magnitude(j),Z=Math.asin(D.clamp(W/q*Math.sin(F),-1,1)),K=Math.asin(D.clamp(J/q*Math.sin(F),-1,1)),le=Z-K+F,me=vDt;h.normalize(T,me);let ae=SDt;ae=h.cross(k,me,ae),ae=h.normalize(ae,ae),h.normalize(h.cross(me,ae,ST),N),h.multiplyByScalar(h.normalize(O,ST),h.magnitude(O)-m,O),h.normalize(T,T),h.multiplyByScalar(T,J,T);let be=PDt;h.multiplyByScalar(h.add(h.multiplyByScalar(me,Math.cos(le)-1,gPe),h.multiplyByScalar(N,Math.sin(le),_Pe),ST),J,be),h.add(T,be,T),h.normalize(O,me),h.normalize(h.cross(me,ae,ST),N);let ge=RDt;h.multiplyByScalar(h.add(h.multiplyByScalar(me,Math.cos(le)-1,gPe),h.multiplyByScalar(N,Math.sin(le),_Pe),ST),h.magnitude(O),ge),h.add(O,ge,O),h.clone(T,y.position),h.normalize(h.subtract(O,T,ST),y.direction),h.clone(y.direction,y.direction),h.cross(y.direction,y.up,y.right),h.cross(y.right,y.direction,y.up),y.setView(lne);return}else{let T=h.normalize(_,xDt),v=h.normalize(e._zoomWorldPosition,bDt),I=h.dot(v,T);if(I>0&&I<1){let O=D.acosClamped(I),N=h.cross(v,T,CDt),j=Math.abs(O)>D.toRadians(20)?y.positionCartographic.height*.75:y.positionCartographic.height-m,k=m/j;y.rotate(N,O*k)}}}}e._rotatingZoom=!P}if(!C&&P||E){let R,B=eo.worldToWindowCoordinates(A,e._zoomWorldPosition,gDt);x!==ie.COLUMBUS_VIEW&&z.equals(t,e._zoomMouseStart)&&l(B)?R=y.getPickRay(B,I5):R=y.getPickRay(t,I5);let L=R.direction;(x===ie.COLUMBUS_VIEW||x===ie.SCENE2D)&&h.fromElements(L.y,L.z,L.x,L),y.move(L,m),e._zoomingOnVector=!0}else y.zoomIn(m);e._cameraUnderground||y.setView(lne)}var MDt=new gn,BDt=new gn,LDt=new h;function NDt(e,t,n){let o=e._scene.camera,r=o.getPickRay(n.startPosition,MDt).origin,a=o.getPickRay(n.endPosition,BDt).origin;r=h.fromElements(r.y,r.z,r.x,r),a=h.fromElements(a.y,a.z,a.x,a);let s=h.subtract(r,a,LDt),c=h.magnitude(s);c>0&&(h.normalize(s,s),o.move(s,c))}function APe(e,t,n){l(n.distance)&&(n=n.distance);let o=e._scene.camera;_ne(e,t,n,e.zoomFactor,o.getMagnitude())}var FDt=new z,kDt=new z;function yPe(e,t,n){if(l(n.angleAndHeight)){zDt(e,t,n.angleAndHeight);return}let i=e._scene,o=i.camera,r=i.canvas,a=r.clientWidth,s=r.clientHeight,c=FDt;c.x=2/a*n.startPosition.x-1,c.y=2/s*(s-n.startPosition.y)-1,c=z.normalize(c,c);let u=kDt;u.x=2/a*n.endPosition.x-1,u.y=2/s*(s-n.endPosition.y)-1,u=z.normalize(u,u);let f=D.acosClamped(c.x);c.y<0&&(f=D.TWO_PI-f);let d=D.acosClamped(u.x);u.y<0&&(d=D.TWO_PI-d);let p=d-f;o.twistRight(p)}function zDt(e,t,n){let i=e._rotateFactor*e._rotateRateRangeAdjustment;i>e._maximumRotateRate&&(i=e._maximumRotateRate),i<e._minimumRotateRate&&(i=e._minimumRotateRate);let o=e._scene,r=o.camera,a=o.canvas,s=(n.endPosition.x-n.startPosition.x)/a.clientWidth;s=Math.min(s,e.maximumMovementRatio);let c=i*s*Math.PI*4;r.twistRight(c)}function UDt(e){let t=e._scene.mapMode2D===hu.ROTATE;M.equals(M.IDENTITY,e._scene.camera.transform)?(pu(e,e.enableTranslate,e.translateEventTypes,NDt,e.inertiaTranslate,"_lastInertiaTranslateMovement"),pu(e,e.enableZoom,e.zoomEventTypes,APe,e.inertiaZoom,"_lastInertiaZoomMovement"),t&&pu(e,e.enableRotate,e.tiltEventTypes,yPe,e.inertiaSpin,"_lastInertiaTiltMovement")):(pu(e,e.enableZoom,e.zoomEventTypes,APe,e.inertiaZoom,"_lastInertiaZoomMovement"),t&&pu(e,e.enableRotate,e.translateEventTypes,yPe,e.inertiaSpin,"_lastInertiaSpinMovement"))}var IPe=new gn,VDt=new h,jDt=new h;function I_(e,t,n){let i=e._scene,o=e._globe,r=i.camera,a;if(i.pickPositionSupported&&(a=i.pickPositionWorldCoordinates(t,VDt)),!l(o))return h.clone(a,n);let s=!e._cameraUnderground,c=r.getPickRay(t,IPe),u=o.pickWorldCoordinates(c,i,s,jDt),f=l(a)?h.distance(a,r.positionWC):Number.POSITIVE_INFINITY,d=l(u)?h.distance(u,r.positionWC):Number.POSITIVE_INFINITY;return f<d?h.clone(a,n):h.clone(u,n)}var GDt=new de;function L5(e){let t=e._ellipsoid,n=e._scene,i=n.camera,o=n.mode,r=0;if(o===ie.SCENE3D){let c=t.cartesianToCartographic(i.position,GDt);l(c)&&(r=c.height)}else r=i.position.z;let a=e._scene.globeHeight??0;return Math.abs(a-r)}var HDt=new h;function DPe(e,t){let n=t.origin,i=t.direction,o=L5(e),r=h.normalize(n,HDt),a=Math.abs(h.dot(r,i));return a=Math.max(a,.5)*2,o*a}function PPe(e,t,n,i){let o=h.distance(t.origin,n),r=L5(e),a=D.clamp(r*5,e._minimumUndergroundPickDistance,e._maximumUndergroundPickDistance);return o>a&&(o=Math.min(o,r/5),o=Math.max(o,100)),gn.getPoint(t,o,i)}function RPe(e,t,n,i){let o;return l(n)?(o=h.distance(t.origin,n),o>e._maximumUndergroundPickDistance&&(o=L5(e))):o=L5(e),gn.getPoint(t,o,i)}var WDt=new z;function OPe(e,t){let n=t.endPosition,i=z.subtract(t.endPosition,t.startPosition,WDt),o=e._strafeEndMousePosition;z.add(o,i,o),t.endPosition=o,Ane(e,t,e._strafeStartPosition),t.endPosition=n}var xPe=new gn,qDt=new gn,une=new h,YDt=new h,XDt=new h,KDt=new h,QDt=new en(h.UNIT_X,0),$Dt=new z,JDt=new z;function ZDt(e,t,n){if(h.equals(t,e._translateMousePosition)||(e._looking=!1),h.equals(t,e._strafeMousePosition)||(e._strafing=!1),e._looking){id(e,t,n);return}if(e._strafing){OPe(e,n);return}let o=e._scene.camera,r=e._cameraUnderground,a=z.clone(n.startPosition,$Dt),s=z.clone(n.endPosition,JDt),c=o.getPickRay(a,xPe),u=h.clone(h.ZERO,KDt),f=h.UNIT_X,d;if(o.position.z<e._minimumPickingTerrainHeight&&(d=I_(e,a,une),l(d)&&(u.x=d.x)),r||u.x>o.position.z&&l(d)){let C=d;r&&(C=RPe(e,c,d,une)),z.clone(t,e._strafeMousePosition),z.clone(t,e._strafeEndMousePosition),h.clone(C,e._strafeStartPosition),e._strafing=!0,Ane(e,n,e._strafeStartPosition);return}let p=en.fromPointNormal(u,f,QDt);c=o.getPickRay(a,xPe);let g=si.rayPlane(c,p,une),m=o.getPickRay(s,qDt),A=si.rayPlane(m,p,YDt);if(!l(g)||!l(A)){e._looking=!0,id(e,t,n),z.clone(t,e._translateMousePosition);return}let y=h.subtract(g,A,XDt),x=y.x;y.x=y.y,y.y=y.z,y.z=x;let b=h.magnitude(y);b>D.EPSILON6&&(h.normalize(y,y),o.move(y,b))}var MPe=new z,R5=new gn,O5=new h,ePt=new h,BPe=new M,tPt=new M,nPt=new h,iPt=new en(h.UNIT_X,0),fne=new h,mne=new de,LPe=new M,oPt=new Le,rPt=new $,M5=new h;function aPt(e,t,n){if(l(n.angleAndHeight)&&(n=n.angleAndHeight),z.equals(t,e._tiltCenterMousePosition)||(e._tiltCVOffMap=!1,e._looking=!1),e._looking){id(e,t,n);return}let o=e._scene.camera;e._tiltCVOffMap||!e.onMap()||Math.abs(o.position.z)>e._minimumPickingTerrainHeight?(e._tiltCVOffMap=!0,sPt(e,t,n)):cPt(e,t,n)}function sPt(e,t,n){let i=e._scene,o=i.camera,r=i.canvas,a=MPe;a.x=r.clientWidth/2,a.y=r.clientHeight/2;let s=o.getPickRay(a,R5),c=h.UNIT_X,u=s.origin,f=s.direction,d,p=h.dot(c,f);if(Math.abs(p)>D.EPSILON6&&(d=-h.dot(c,u)/p),!l(d)||d<=0){e._looking=!0,id(e,t,n),z.clone(t,e._tiltCenterMousePosition);return}let g=h.multiplyByScalar(f,d,O5);h.add(u,g,g);let m=i.mapProjection,A=m.ellipsoid;h.fromElements(g.y,g.z,g.x,g);let y=m.unproject(g,mne);A.cartographicToCartesian(y,g);let x=pt.eastNorthUpToFixedFrame(g,A,BPe),b=e._globe,C=e._ellipsoid;e._globe=void 0,e._ellipsoid=te.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;let E=M.clone(o.transform,LPe);o._setTransform(x),nd(e,t,n,h.UNIT_Z),o._setTransform(E),e._globe=b,e._ellipsoid=C;let S=C.maximumRadius;e._rotateFactor=1/S,e._rotateRateRangeAdjustment=S}function cPt(e,t,n){let i=e._scene,o=i.camera,r=e._cameraUnderground,a,s,c=h.UNIT_X;if(z.equals(t,e._tiltCenterMousePosition))a=h.clone(e._tiltCenter,O5);else{if(o.position.z<e._minimumPickingTerrainHeight&&(a=I_(e,t,O5)),!l(a)){s=o.getPickRay(t,R5);let _=s.origin,T=s.direction,v,I=h.dot(c,T);if(Math.abs(I)>D.EPSILON6&&(v=-h.dot(c,_)/I),!l(v)||v<=0){e._looking=!0,id(e,t,n),z.clone(t,e._tiltCenterMousePosition);return}a=h.multiplyByScalar(T,v,O5),h.add(_,a,a)}r&&(l(s)||(s=o.getPickRay(t,R5)),PPe(e,s,a,a)),z.clone(t,e._tiltCenterMousePosition),h.clone(a,e._tiltCenter)}let u=i.canvas,f=MPe;f.x=u.clientWidth/2,f.y=e._tiltCenterMousePosition.y,s=o.getPickRay(f,R5);let d=h.clone(h.ZERO,nPt);d.x=a.x;let p=en.fromPointNormal(d,c,iPt),g=si.rayPlane(s,p,ePt),m=o._projection,A=m.ellipsoid;h.fromElements(a.y,a.z,a.x,a);let y=m.unproject(a,mne);A.cartographicToCartesian(y,a);let x=pt.eastNorthUpToFixedFrame(a,A,BPe),b;l(g)?(h.fromElements(g.y,g.z,g.x,g),y=m.unproject(g,mne),A.cartographicToCartesian(y,g),b=pt.eastNorthUpToFixedFrame(g,A,tPt)):b=x;let C=e._globe,E=e._ellipsoid;e._globe=void 0,e._ellipsoid=te.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;let S=h.UNIT_Z,w=M.clone(o.transform,LPe);o._setTransform(x);let P=h.cross(h.UNIT_Z,h.normalize(o.position,fne),fne),R=h.dot(o.right,P);if(nd(e,t,n,S,!1,!0),o._setTransform(b),R<0){let _=n.startPosition.y-n.endPosition.y;(r&&_<0||!r&&_>0)&&(S=void 0);let T=o.constrainedAxis;o.constrainedAxis=void 0,nd(e,t,n,S,!0,!1),o.constrainedAxis=T}else nd(e,t,n,S,!0,!1);if(l(o.constrainedAxis)){let _=h.cross(o.direction,o.constrainedAxis,M5);h.equalsEpsilon(_,h.ZERO,D.EPSILON6)||(h.dot(_,o.right)<0&&h.negate(_,_),h.cross(_,o.direction,o.up),h.cross(o.direction,o.up,o.right),h.normalize(o.up,o.up),h.normalize(o.right,o.right))}o._setTransform(w),e._globe=C,e._ellipsoid=E;let B=E.maximumRadius;e._rotateFactor=1/B,e._rotateRateRangeAdjustment=B;let L=h.clone(o.positionWC,fne);if(e.enableCollisionDetection&&bne(e,!0),!h.equals(o.positionWC,L)){o._setTransform(b),o.worldToCameraCoordinatesPoint(L,L);let _=h.magnitudeSquared(L);h.magnitudeSquared(o.position)>_&&(h.normalize(o.position,o.position),h.multiplyByScalar(o.position,Math.sqrt(_),o.position));let T=h.angleBetween(L,o.position),v=h.cross(L,o.position,L);h.normalize(v,v);let I=Le.fromAxisAngle(v,T,oPt),O=$.fromQuaternion(I,rPt);$.multiplyByVector(O,o.direction,o.direction),$.multiplyByVector(O,o.up,o.up),h.cross(o.direction,o.up,o.right),h.cross(o.right,o.direction,o.up),o._setTransform(w)}}var NPe=new z,FPe=new gn,kPe=new h;function lPt(e,t,n){l(n.distance)&&(n=n.distance);let i=e._scene,o=i.camera,r=i.canvas,a=e._cameraUnderground,s;a?s=t:(s=NPe,s.x=r.clientWidth/2,s.y=r.clientHeight/2);let c=o.getPickRay(s,FPe),u=c.origin,f=c.direction,d=o.position.z,p;d<e._minimumPickingTerrainHeight&&(p=I_(e,s,kPe));let g;if(l(p)&&(g=h.distance(u,p)),a){let m=DPe(e,c,d);l(g)?g=Math.min(g,m):g=m}if(!l(g)){let m=h.UNIT_X;g=-h.dot(m,u)/h.dot(m,f)}_ne(e,t,n,e.zoomFactor,g)}function uPt(e){let n=e._scene.camera;if(!M.equals(M.IDENTITY,n.transform))pu(e,e.enableRotate,e.rotateEventTypes,nd,e.inertiaSpin,"_lastInertiaSpinMovement"),pu(e,e.enableZoom,e.zoomEventTypes,UPe,e.inertiaZoom,"_lastInertiaZoomMovement");else{let i=e._tweens;if(e._aggregator.anyButtonDown&&i.removeAll(),pu(e,e.enableTilt,e.tiltEventTypes,aPt,e.inertiaSpin,"_lastInertiaTiltMovement"),pu(e,e.enableTranslate,e.translateEventTypes,ZDt,e.inertiaTranslate,"_lastInertiaTranslateMovement"),pu(e,e.enableZoom,e.zoomEventTypes,lPt,e.inertiaZoom,"_lastInertiaZoomMovement"),pu(e,e.enableLook,e.lookEventTypes,id),!e._aggregator.anyButtonDown&&!i.contains(e._tween)){let o=n.createCorrectPositionTween(e.bounceAnimationTime);l(o)&&(e._tween=i.add(o))}i.update()}}var fPt=new gn,dPt=new en(h.UNIT_X,0),hPt=new h,mPt=new h;function Ane(e,t,n){let i=e._scene,o=i.camera,r=o.getPickRay(t.endPosition,fPt),a=h.clone(o.direction,mPt);i.mode===ie.COLUMBUS_VIEW&&h.fromElements(a.z,a.x,a.y,a);let s=en.fromPointNormal(n,a,dPt),c=si.rayPlane(r,s,hPt);l(c)&&(a=h.subtract(n,c,a),i.mode===ie.COLUMBUS_VIEW&&h.fromElements(a.y,a.z,a.x,a),h.add(o.position,a,o.position))}var bPe=new h,zPe=new de,pne=new h,gne=new te,pPt=new h,gPt=new h,_Pt=new h;function APt(e,t,n){let o=e._scene.camera,r=e._cameraUnderground,a=e._ellipsoid;if(!M.equals(o.transform,M.IDENTITY)){nd(e,t,n);return}let s,c,u=a.geodeticSurfaceNormal(o.position,pPt);if(z.equals(t,e._rotateMousePosition)){if(e._looking)id(e,t,n,u);else if(e._rotating)nd(e,t,n);else if(e._strafing)OPe(e,n);else{if(h.magnitude(o.position)<h.magnitude(e._rotateStartPosition))return;s=h.magnitude(e._rotateStartPosition),c=pne,c.x=c.y=c.z=s,a=te.fromCartesian3(c,gne),hne(e,t,n,a)}return}e._looking=!1,e._rotating=!1,e._strafing=!1;let f=a.cartesianToCartographic(o.positionWC,zPe).height,d=e._globe;if(l(d)&&f<e._minimumPickingTerrainHeight){let p=I_(e,n.startPosition,_Pt);if(l(p)){let g=!1,m=o.getPickRay(n.startPosition,IPe);if(r)g=!0,RPe(e,m,p,p);else{let A=a.geodeticSurfaceNormal(p,gPt);Math.abs(h.dot(m.direction,A))<.05?g=!0:g=h.magnitude(o.position)<h.magnitude(p)}g?(z.clone(t,e._strafeEndMousePosition),h.clone(p,e._strafeStartPosition),e._strafing=!0,Ane(e,n,e._strafeStartPosition)):(s=h.magnitude(p),c=pne,c.x=c.y=c.z=s,a=te.fromCartesian3(c,gne),hne(e,t,n,a),h.clone(p,e._rotateStartPosition))}else e._looking=!0,id(e,t,n,u)}else l(o.pickEllipsoid(n.startPosition,e._ellipsoid,bPe))?(hne(e,t,n,e._ellipsoid),h.clone(bPe,e._rotateStartPosition)):f>e._minimumTrackBallHeight?(e._rotating=!0,nd(e,t,n)):(e._looking=!0,id(e,t,n,u));z.clone(t,e._rotateMousePosition)}function nd(e,t,n,i,o,r){o=o??!1,r=r??!1;let a=e._scene,s=a.camera,c=a.canvas,u=s.constrainedAxis;l(i)&&(s.constrainedAxis=i);let f=h.magnitude(s.position),d=e._rotateFactor*(f-e._rotateRateRangeAdjustment);d>e._maximumRotateRate&&(d=e._maximumRotateRate),d<e._minimumRotateRate&&(d=e._minimumRotateRate);let p=(n.startPosition.x-n.endPosition.x)/c.clientWidth,g=(n.startPosition.y-n.endPosition.y)/c.clientHeight;p=Math.min(p,e.maximumMovementRatio),g=Math.min(g,e.maximumMovementRatio);let m=d*p*Math.PI*2,A=d*g*Math.PI;if(l(i)&&l(e.maximumTiltAngle)){let y=e.maximumTiltAngle,x=h.dot(s.direction,i),b=Math.PI-Math.acos(x)+A;b>y&&(A-=b-y)}o||s.rotateRight(m),r||s.rotateUp(A),s.constrainedAxis=u}var dne=se.clone(se.UNIT_W),CPe=se.clone(se.UNIT_W),D5=new h,uI=new h,P5=new h,TPe=new h,yPt=new z,xPt=new z,bPt=new z,CPt=new z,TPt=new gn;function hne(e,t,n,i){let o=e._scene,r=o.camera,a=z.clone(n.startPosition,yPt),s=z.clone(n.endPosition,xPt),c=i.cartesianToCartographic(r.positionWC,zPe).height,u,f;if(!n.inertiaEnabled&&c<e._minimumPickingTerrainHeight&&(u=h.clone(e._panLastWorldPosition,dne),!l(e._globe)&&!z.equalsEpsilon(a,e._panLastMousePosition)&&(u=I_(e,a,dne)),!l(e._globe)&&l(u))){let d=h.subtract(u,r.positionWC,uI),p=h.multiplyByScalar(r.directionWC,h.dot(r.directionWC,d),uI),g=h.magnitude(p),m=r.frustum.getPixelDimensions(o.drawingBufferWidth,o.drawingBufferHeight,g,o.pixelRatio,CPt),A=z.subtract(s,a,bPt),y=h.multiplyByScalar(r.rightWC,A.x*m.x,uI),x=h.normalize(r.positionWC,wPe),b=r.getPickRay(s,TPt).direction,C=h.subtract(b,h.projectVector(b,r.rightWC,P5),P5),E=h.angleBetween(C,r.directionWC),S=1;l(r.frustum.fov)&&(S=Math.max(Math.tan(E),.1));let w=Math.abs(h.dot(r.directionWC,x)),P=-A.y*m.y*2/Math.sqrt(S)*(1-w),R=h.multiplyByScalar(b,P,P5);w=Math.abs(h.dot(r.upWC,x));let B=h.multiplyByScalar(r.upWC,-A.y*(1-w)*m.y,TPe);f=h.add(u,y,CPe),f=h.add(f,R,f),f=h.add(f,B,f),h.clone(f,e._panLastWorldPosition),z.clone(s,e._panLastMousePosition)}if((!l(u)||!l(f))&&(u=r.pickEllipsoid(a,i,dne),f=r.pickEllipsoid(s,i,CPe)),!l(u)||!l(f)){e._rotating=!0,nd(e,t,n);return}if(u=r.worldToCameraCoordinates(u,u),f=r.worldToCameraCoordinates(f,f),l(r.constrainedAxis)){let d=r.constrainedAxis,p=h.mostOrthogonalAxis(d,D5);h.cross(p,d,p),h.normalize(p,p);let g=h.cross(d,p,uI),m=h.magnitude(u),A=h.dot(d,u),y=Math.acos(A/m),x=h.multiplyByScalar(d,A,P5);h.subtract(u,x,x),h.normalize(x,x);let b=h.magnitude(f),C=h.dot(d,f),E=Math.acos(C/b),S=h.multiplyByScalar(d,C,TPe);h.subtract(f,S,S),h.normalize(S,S);let w=Math.acos(h.dot(x,p));h.dot(x,g)<0&&(w=D.TWO_PI-w);let P=Math.acos(h.dot(S,p));h.dot(S,g)<0&&(P=D.TWO_PI-P);let R=w-P,B;h.equalsEpsilon(d,r.position,D.EPSILON2)?B=r.right:B=h.cross(d,r.position,D5);let L=h.cross(d,B,D5),_=h.dot(L,h.subtract(u,d,uI)),T=h.dot(L,h.subtract(f,d,uI)),v;_>0&&T>0?v=E-y:_>0&&T<=0?h.dot(r.position,d)>0?v=-y-E:v=y+E:v=y-E,r.rotateRight(R),r.rotateUp(v)}else{h.normalize(u,u),h.normalize(f,f);let d=h.dot(u,f),p=h.cross(u,f,D5);if(d<1&&!h.equalsEpsilon(p,h.ZERO,D.EPSILON14)){let g=Math.acos(d);r.rotate(p,g)}}}var EPt=new h,vPt=new de,EPe=0;function UPe(e,t,n){l(n.distance)&&(n=n.distance);let i=n.inertiaEnabled,o=e._ellipsoid,r=e._scene,a=r.camera,s=r.canvas,c=e._cameraUnderground,u;c?u=t:(u=NPe,u.x=s.clientWidth/2,u.y=s.clientHeight/2);let f=a.getPickRay(u,FPe),d,p=o.cartesianToCartographic(a.position,vPt).height,g=Math.abs(EPe)<e.minimumPickingTerrainDistanceWithInertia;(i?g:p<e._minimumPickingTerrainHeight)&&(d=I_(e,u,kPe));let A;if(l(d)&&(A=h.distance(f.origin,d)),!l(e._globe)&&l(A)&&a.getMagnitude()<A&&(d=void 0,A=void 0),l(A)&&(EPe=A),c){let x=DPe(e,f,p);l(A)?A=Math.min(A,x):A=x}l(A)||(A=p);let y=h.normalize(a.position,EPt);_ne(e,t,n,e.zoomFactor,A,h.dot(y,a.direction))}var VPe=new z,B5=new gn,Nz=new h,SPt=new h,jPe=new M,wPt=new M,GPe=new M,IPt=new Le,DPt=new $,yne=new de,xne=new h;function PPt(e,t,n){let o=e._scene.camera;if(!M.equals(o.transform,M.IDENTITY))return;if(l(n.angleAndHeight)&&(n=n.angleAndHeight),z.equals(t,e._tiltCenterMousePosition)||(e._tiltOnEllipsoid=!1,e._looking=!1),e._looking){let s=e._ellipsoid.geodeticSurfaceNormal(o.position,xne);id(e,t,n,s);return}let a=e._ellipsoid.cartesianToCartographic(o.position,yne);e._tiltOnEllipsoid||a.height>e._minimumCollisionTerrainHeight?(e._tiltOnEllipsoid=!0,OPt(e,t,n)):MPt(e,t,n)}var RPt=new de;function OPt(e,t,n){let i=e._ellipsoid,o=e._scene,r=o.camera,a=e.minimumZoomDistance*.25,s=i.cartesianToCartographic(r.positionWC,RPt).height;if(s-a-1<D.EPSILON3&&n.endPosition.y-n.startPosition.y<0)return;let c=o.canvas,u=VPe;u.x=c.clientWidth/2,u.y=c.clientHeight/2;let f=r.getPickRay(u,B5),d,p=si.rayEllipsoid(f,i);if(l(p))d=gn.getPoint(f,p.start,Nz);else if(s>e._minimumTrackBallHeight){let b=si.grazingAltitudeLocation(f,i);if(!l(b))return;let C=i.cartesianToCartographic(b,yne);C.height=0,d=i.cartographicToCartesian(C,Nz)}else{e._looking=!0;let b=e._ellipsoid.geodeticSurfaceNormal(r.position,xne);id(e,t,n,b),z.clone(t,e._tiltCenterMousePosition);return}let g=pt.eastNorthUpToFixedFrame(d,i,jPe),m=e._globe,A=e._ellipsoid;e._globe=void 0,e._ellipsoid=te.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;let y=M.clone(r.transform,GPe);r._setTransform(g),nd(e,t,n,h.UNIT_Z),r._setTransform(y),e._globe=m,e._ellipsoid=A;let x=A.maximumRadius;e._rotateFactor=1/x,e._rotateRateRangeAdjustment=x}function MPt(e,t,n){let i=e._ellipsoid,o=e._scene,r=o.camera,a=e._cameraUnderground,s,c,u;if(z.equals(t,e._tiltCenterMousePosition))s=h.clone(e._tiltCenter,Nz);else{if(s=I_(e,t,Nz),!l(s)){if(c=r.getPickRay(t,B5),u=si.rayEllipsoid(c,i),!l(u)){if(i.cartesianToCartographic(r.position,yne).height<=e._minimumTrackBallHeight){e._looking=!0;let T=e._ellipsoid.geodeticSurfaceNormal(r.position,xne);id(e,t,n,T),z.clone(t,e._tiltCenterMousePosition)}return}s=gn.getPoint(c,u.start,Nz)}a&&(l(c)||(c=r.getPickRay(t,B5)),PPe(e,c,s,s)),z.clone(t,e._tiltCenterMousePosition),h.clone(s,e._tiltCenter)}let f=o.canvas,d=VPe;d.x=f.clientWidth/2,d.y=e._tiltCenterMousePosition.y,c=r.getPickRay(d,B5);let p=h.magnitude(s),g=h.fromElements(p,p,p,pne),m=te.fromCartesian3(g,gne);if(u=si.rayEllipsoid(c,m),!l(u))return;let A=h.magnitude(c.origin)>p?u.start:u.stop,y=gn.getPoint(c,A,SPt),x=pt.eastNorthUpToFixedFrame(s,i,jPe),b=pt.eastNorthUpToFixedFrame(y,m,wPt),C=e._globe,E=e._ellipsoid;e._globe=void 0,e._ellipsoid=te.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;let S=h.UNIT_Z,w=M.clone(r.transform,GPe);r._setTransform(b);let P=h.cross(y,r.positionWC,M5);if(h.dot(r.rightWC,P)<0){let _=n.startPosition.y-n.endPosition.y;(a&&_<0||!a&&_>0)&&(S=void 0);let T=r.constrainedAxis;r.constrainedAxis=void 0,nd(e,t,n,S,!0,!1),r.constrainedAxis=T}else nd(e,t,n,S,!0,!1);if(r._setTransform(x),nd(e,t,n,S,!1,!0),l(r.constrainedAxis)){let _=h.cross(r.direction,r.constrainedAxis,M5);h.equalsEpsilon(_,h.ZERO,D.EPSILON6)||(h.dot(_,r.right)<0&&h.negate(_,_),h.cross(_,r.direction,r.up),h.cross(r.direction,r.up,r.right),h.normalize(r.up,r.up),h.normalize(r.right,r.right))}r._setTransform(w),e._globe=C,e._ellipsoid=E;let B=E.maximumRadius;e._rotateFactor=1/B,e._rotateRateRangeAdjustment=B;let L=h.clone(r.positionWC,M5);if(e.enableCollisionDetection&&bne(e,!0),!h.equals(r.positionWC,L)){r._setTransform(b),r.worldToCameraCoordinatesPoint(L,L);let _=h.magnitudeSquared(L);h.magnitudeSquared(r.position)>_&&(h.normalize(r.position,r.position),h.multiplyByScalar(r.position,Math.sqrt(_),r.position));let T=h.angleBetween(L,r.position),v=h.cross(L,r.position,L);h.normalize(v,v);let I=Le.fromAxisAngle(v,T,IPt),O=$.fromQuaternion(I,DPt);$.multiplyByVector(O,r.direction,r.direction),$.multiplyByVector(O,r.up,r.up),h.cross(r.direction,r.up,r.right),h.cross(r.right,r.direction,r.up),r._setTransform(w)}}var BPt=new z,LPt=new z,vPe=new gn,SPe=new gn,NPt=new h,FPt=new h;function id(e,t,n,i){let r=e._scene.camera,a=BPt;a.x=n.startPosition.x,a.y=0;let s=LPt;s.x=n.endPosition.x,s.y=0;let c=r.getPickRay(a,vPe),u=r.getPickRay(s,SPe),f=0,d,p;r.frustum instanceof fn?(d=c.origin,p=u.origin,h.add(r.direction,d,d),h.add(r.direction,p,p),h.subtract(d,r.position,d),h.subtract(p,r.position,p),h.normalize(d,d),h.normalize(p,p)):(d=c.direction,p=u.direction);let g=h.dot(d,p);g<1&&(f=Math.acos(g)),f=n.startPosition.x>n.endPosition.x?-f:f;let m=e._horizontalRotationAxis;if(l(i)?r.look(i,-f):l(m)?r.look(m,-f):r.lookLeft(f),a.x=0,a.y=n.startPosition.y,s.x=0,s.y=n.endPosition.y,c=r.getPickRay(a,vPe),u=r.getPickRay(s,SPe),f=0,r.frustum instanceof fn?(d=c.origin,p=u.origin,h.add(r.direction,d,d),h.add(r.direction,p,p),h.subtract(d,r.position,d),h.subtract(p,r.position,p),h.normalize(d,d),h.normalize(p,p)):(d=c.direction,p=u.direction),g=h.dot(d,p),g<1&&(f=Math.acos(g)),f=n.startPosition.y>n.endPosition.y?-f:f,i=i??m,l(i)){let A=r.direction,y=h.negate(i,NPt),x=h.equalsEpsilon(A,i,D.EPSILON2),b=h.equalsEpsilon(A,y,D.EPSILON2);if(!x&&!b){g=h.dot(A,i);let C=D.acosClamped(g);f>0&&f>C&&(f=C-D.EPSILON4),g=h.dot(A,y),C=D.acosClamped(g),f<0&&-f>C&&(f=-C+D.EPSILON4);let E=h.cross(i,A,FPt);r.look(E,f)}else(x&&f<0||b&&f>0)&&r.look(r.right,-f)}else r.lookUp(f)}function kPt(e){pu(e,e.enableRotate,e.rotateEventTypes,APt,e.inertiaSpin,"_lastInertiaSpinMovement"),pu(e,e.enableZoom,e.zoomEventTypes,UPe,e.inertiaZoom,"_lastInertiaZoomMovement"),pu(e,e.enableTilt,e.tiltEventTypes,PPt,e.inertiaSpin,"_lastInertiaTiltMovement"),pu(e,e.enableLook,e.lookEventTypes,id)}var zPt=new M,UPt=new de;function bne(e,t){e._adjustedHeightForTerrain=!0;let n=e._scene,i=n.mode;if(i===ie.SCENE2D||i===ie.MORPHING)return;let o=n.camera,r=n.ellipsoid??te.WGS84,a=n.mapProjection,s,c;M.equals(o.transform,M.IDENTITY)||(s=M.clone(o.transform,zPt),c=h.magnitude(o.position),o._setTransform(M.IDENTITY));let u=UPt;i===ie.SCENE3D?r.cartesianToCartographic(o.position,u):a.unproject(o.position,u);let f=!1;if(u.height<e._minimumCollisionTerrainHeight){let d=e._scene.globeHeight;if(l(d)){let p=d+e.minimumZoomDistance,g=d-e._lastGlobeHeight,m=g/e._lastGlobeHeight;u.height<p&&(t||Math.abs(m)<=.1)&&(u.height=p,i===ie.SCENE3D?r.cartographicToCartesian(u,o.position):a.project(u,o.position),f=!0),t||Math.abs(m)<=.1?e._lastGlobeHeight=d:e._lastGlobeHeight+=g*.1}}l(s)&&(o._setTransform(s),f&&(h.normalize(o.position,o.position),h.negate(o.position,o.direction),h.multiplyByScalar(o.position,Math.max(c,e.minimumZoomDistance),o.position),h.normalize(o.direction,o.direction),h.cross(o.direction,o.up,o.right),h.cross(o.right,o.direction,o.up)))}Fz.prototype.onMap=function(){let e=this._scene,t=e.mode,n=e.camera;return t===ie.COLUMBUS_VIEW?Math.abs(n.position.x)-this._maxCoord.x<0&&Math.abs(n.position.y)-this._maxCoord.y<0:!0};var VPt=new h,jPt=new h;Fz.prototype.update=function(){let e=this._scene,{camera:t,globe:n,mode:i}=e;M.equals(t.transform,M.IDENTITY)?(this._globe=n,this._ellipsoid=e.ellipsoid??te.default):(this._globe=void 0,this._ellipsoid=te.UNIT_SPHERE);let{verticalExaggeration:o,verticalExaggerationRelativeHeight:r}=e;this._minimumCollisionTerrainHeight=so.getHeight(this.minimumCollisionTerrainHeight,o,r),this._minimumPickingTerrainHeight=so.getHeight(this.minimumPickingTerrainHeight,o,r),this._minimumTrackBallHeight=so.getHeight(this.minimumTrackBallHeight,o,r),this._cameraUnderground=e.cameraUnderground&&l(this._globe);let a=this._ellipsoid.maximumRadius;this._rotateFactor=1/a,this._rotateRateRangeAdjustment=a,this._adjustedHeightForTerrain=!1;let s=h.clone(t.positionWC,VPt),c=h.clone(t.directionWC,jPt);if(i===ie.SCENE2D?UDt(this):i===ie.COLUMBUS_VIEW?(this._horizontalRotationAxis=h.UNIT_Z,uPt(this)):i===ie.SCENE3D&&(this._horizontalRotationAxis=void 0,kPt(this)),this.enableCollisionDetection&&!this._adjustedHeightForTerrain){let u=!h.equals(s,t.positionWC)||!h.equals(c,t.directionWC);bne(this,u)}this._aggregator.reset()};Fz.prototype.isDestroyed=function(){return!1};Fz.prototype.destroy=function(){return this._tweens.removeAll(),this._aggregator=this._aggregator&&this._aggregator.destroy(),fe(this)};var kz=Fz;var zz=`uniform sampler2D colorTexture;
- uniform sampler2D colorTexture2;
-
- uniform vec2 center;
- uniform float radius;
-
- in vec2 v_textureCoordinates;
-
- void main()
- {
- vec4 color0 = texture(colorTexture, v_textureCoordinates);
- vec4 color1 = texture(colorTexture2, v_textureCoordinates);
-
- float x = length(gl_FragCoord.xy - center) / radius;
- float t = smoothstep(0.5, 0.8, x);
- out_FragColor = mix(color0 + color1, color1, t);
- }
- `;var Uz=`uniform sampler2D colorTexture;
-
- uniform float avgLuminance;
- uniform float threshold;
- uniform float offset;
-
- in vec2 v_textureCoordinates;
-
- float key(float avg)
- {
- float guess = 1.5 - (1.5 / (avg * 0.1 + 1.0));
- return max(0.0, guess) + 0.1;
- }
-
- // See section 9. "The bright-pass filter" of Realtime HDR Rendering
- // http://www.cg.tuwien.ac.at/research/publications/2007/Luksch_2007_RHR/Luksch_2007_RHR-RealtimeHDR%20.pdf
-
- void main()
- {
- vec4 color = texture(colorTexture, v_textureCoordinates);
- vec3 xyz = czm_RGBToXYZ(color.rgb);
- float luminance = xyz.r;
-
- float scaledLum = key(avgLuminance) * luminance / avgLuminance;
- float brightLum = max(scaledLum - threshold, 0.0);
- float brightness = brightLum / (offset + brightLum);
-
- xyz.r = brightness;
- out_FragColor = vec4(czm_XYZToRGB(xyz), 1.0);
- }
- `;function D_(){this._sceneFramebuffer=new mT;let e=.125,t=new Array(6);t[0]=new Do({fragmentShader:Ju,textureScale:e,forcePowerOfTwo:!0,sampleMode:Jf.LINEAR});let n=t[1]=new Do({fragmentShader:Uz,uniforms:{avgLuminance:.5,threshold:.25,offset:.1},textureScale:e,forcePowerOfTwo:!0}),i=this;this._delta=1,this._sigma=2,this._blurStep=new z,t[2]=new Do({fragmentShader:Wy,uniforms:{step:function(){return i._blurStep.x=i._blurStep.y=1/n.outputTexture.width,i._blurStep},delta:function(){return i._delta},sigma:function(){return i._sigma},direction:0},textureScale:e,forcePowerOfTwo:!0}),t[3]=new Do({fragmentShader:Wy,uniforms:{step:function(){return i._blurStep.x=i._blurStep.y=1/n.outputTexture.width,i._blurStep},delta:function(){return i._delta},sigma:function(){return i._sigma},direction:1},textureScale:e,forcePowerOfTwo:!0}),t[4]=new Do({fragmentShader:Ju,sampleMode:Jf.LINEAR}),this._uCenter=new z,this._uRadius=void 0,t[5]=new Do({fragmentShader:zz,uniforms:{center:function(){return i._uCenter},radius:function(){return i._uRadius},colorTexture2:function(){return i._sceneFramebuffer.framebuffer.getColorTexture(0)}}}),this._stages=new Zu({stages:t});let o=new bT(this),r=t.length;for(let a=0;a<r;++a)t[a]._textureCache=o;this._textureCache=o,this.length=t.length}D_.prototype.get=function(e){return this._stages.get(e)};D_.prototype.getStageByName=function(e){let t=this._stages.length;for(let n=0;n<t;++n){let i=this._stages.get(n);if(i.name===e)return i}};var GPt=new se,HPe=new z,HPt=new z,WPe=new M;function WPt(e,t,n){let i=t.uniformState,o=i.sunPositionWC,r=i.view,a=i.viewProjection,s=i.projection,c=M.computeViewportTransformation(n,0,1,WPe),u=M.multiplyByPoint(r,o,GPt),f=pt.pointToGLWindowCoordinates(a,c,o,HPe);u.x+=D.SOLAR_RADIUS;let d=pt.pointToGLWindowCoordinates(s,c,u,u),p=z.magnitude(z.subtract(d,f,d))*30*2,g=HPt;g.x=p,g.y=p,e._uCenter=z.clone(f,e._uCenter),e._uRadius=Math.max(g.x,g.y)*.15;let m=t.drawingBufferWidth,A=t.drawingBufferHeight,y=e._stages,x=y.get(0),b=x.outputTexture.width,C=x.outputTexture.height,E=new Je;E.width=b,E.height=C,c=M.computeViewportTransformation(E,0,1,WPe),f=pt.pointToGLWindowCoordinates(a,c,o,HPe),g.x*=b/m,g.y*=C/A;let S=x.scissorRectangle;S.x=Math.max(f.x-g.x*.5,0),S.y=Math.max(f.y-g.y*.5,0),S.width=Math.min(g.x,m),S.height=Math.min(g.y,A);for(let w=1;w<4;++w)Je.clone(S,y.get(w).scissorRectangle)}D_.prototype.clear=function(e,t,n){this._sceneFramebuffer.clear(e,t,n),this._textureCache.clear(e)};D_.prototype.update=function(e){let t=e.context,n=e.viewport,i=this._sceneFramebuffer;i.update(t,n);let o=i.framebuffer;return this._textureCache.update(t),this._stages.update(t,!1),WPt(this,t,n),o};D_.prototype.execute=function(e){let t=this._sceneFramebuffer.framebuffer.getColorTexture(0),n=this._stages,i=n.length;n.get(0).execute(e,t);for(let o=1;o<i;++o)n.get(o).execute(e,n.get(o-1).outputTexture)};D_.prototype.copy=function(e,t){if(!l(this._copyColorCommand)){let n=this;this._copyColorCommand=e.createViewportQuadCommand(Ju,{uniformMap:{colorTexture:function(){return n._stages.get(n._stages.length-1).outputTexture}},owner:this})}this._copyColorCommand.framebuffer=t,this._copyColorCommand.execute(e)};D_.prototype.isDestroyed=function(){return!1};D_.prototype.destroy=function(){return this._textureCache.destroy(),this._stages.destroy(),fe(this)};var Vz=D_;function qPe(){this._cachedShowFrustumsShaders={}}function qPt(e){let t={},n=e.vertexAttributes;for(let i in n)n.hasOwnProperty(i)&&(t[i]=n[i].index);return t}function YPt(e,t){let n=e.context,i=t,o=i.fragmentShaderSource.clone(),r=[];o.sources=o.sources.map(function(f){f=He.replaceMain(f,"czm_Debug_main");let d=/out_FragData_(\d+)/g,p;for(;(p=d.exec(f))!==null;)r.indexOf(p[1])===-1&&r.push(p[1]);return f});let a=r.length,s="";s+=`uniform vec3 debugShowCommandsColor;
- `,s+=`uniform vec3 debugShowFrustumsColor;
- `,s+=`void main()
- {
- czm_Debug_main();
- `;let c;if(a>0)for(c=0;c<a;++c)s+=` out_FragData_${r[c]}.rgb *= debugShowCommandsColor;
- `,s+=` out_FragData_${r[c]}.rgb *= debugShowFrustumsColor;
- `;else s+=` out_FragColor.rgb *= debugShowCommandsColor;
- `,s+=` out_FragColor.rgb *= debugShowFrustumsColor;
- `;s+="}",o.sources.push(s);let u=qPt(i);return Kt.fromCache({context:n,vertexShaderSource:i.vertexShaderSource,fragmentShaderSource:o,attributeLocations:u})}var jz=new V;function XPt(e,t){let n;return l(t.uniformMap)?n=t.uniformMap:n={},l(n.debugShowCommandsColor)||l(n.debugShowFrustumsColor)||(n.debugShowCommandsColor=function(){return e.debugShowCommands?(l(t._debugColor)||(t._debugColor=V.fromRandom()),t._debugColor):V.WHITE},n.debugShowFrustumsColor=function(){return e.debugShowFrustums?(jz.red=t.debugOverlappingFrustums&1?1:0,jz.green=t.debugOverlappingFrustums&2?1:0,jz.blue=t.debugOverlappingFrustums&4?1:0,jz.alpha=1,jz):V.WHITE}),n}var KPt=new tt;qPe.prototype.executeDebugShowFrustumsCommand=function(e,t,n){let i=t.shaderProgram.id,o=this._cachedShowFrustumsShaders[i];l(o)||(o=YPt(e,t.shaderProgram),this._cachedShowFrustumsShaders[i]=o);let r=tt.shallowClone(t,KPt);r.shaderProgram=o,r.uniformMap=XPt(e,t),r.execute(e.context,n)};var Gz=qPe;function wT(e,t,n){this._primitive=e,this._tileIndex=t,this._sampleIndex=n,this._metadata={},this._orientedBoundingBox=new Qt}wT.fromKeyframeNode=function(e,t,n,i){let o=new wT(e,t,n),{spatialNode:r,content:a}=i;return o._metadata=QPt(e,a,n),o._orientedBoundingBox=JPt(e,r,n,o._orientedBoundingBox),o};function QPt(e,t,n){if(!l(t)||!l(t.metadata))return;let{names:i,types:o}=e.provider,{metadata:r}=t,a={};for(let s=0;s<i.length;s++){let c=i[s],u=dt.getComponentCount(o[s]),f=r[s].slice(n*u,(n+1)*u);a[c]=f}return a}var YPe=new h,$Pt=new h;function JPt(e,t,n,i){let o=t.dimensions,r=o.x*o.y,a=Math.floor(n/r),s=n-a*r,c=Math.floor(s/o.x),u=s-c*o.x,f=h.fromElements(u,c,a,YPe),d=h.divideComponents(h.subtract(f,e._paddingBefore,YPe),e.dimensions,$Pt);return e._shape.computeOrientedBoundingBoxForSample(t,e.dimensions,d,i)}Object.defineProperties(wT.prototype,{metadata:{get:function(){return this._metadata}},primitive:{get:function(){return this._primitive}},sampleIndex:{get:function(){return this._sampleIndex}},tileIndex:{get:function(){return this._tileIndex}},orientedBoundingBox:{get:function(){return this._orientedBoundingBox.clone()}}});wT.prototype.hasProperty=function(e){return l(this._metadata[e])};wT.prototype.getNames=function(){return Object.keys(this._metadata)};wT.prototype.getProperty=function(e){return this._metadata[e]};var Hz=wT;function ZPt(e,t){let n=document.createElement("canvas");n.width=t,n.height=1;let i=n.getContext("2d"),o=i.createLinearGradient(0,0,n.width,0),r=1/(e.length-1);for(let c=0;c<e.length;c++){let u=e[c],f=c*r,d=u.toCssColorString();o.addColorStop(f,d)}i.fillStyle=o,i.fillRect(0,0,n.width,n.height);let a=i.getImageData(0,0,n.width,n.height);return new Uint8Array(a.data.buffer)}var Wz=ZPt;var XPe={FLOAT:"float",VEC2:"vec2",VEC3:"vec3",VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",MAT2:"mat2",MAT3:"mat3",MAT4:"mat4",SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube"};Object.freeze(XPe);var _0=XPe;function e1t(e,t,n){let i=new Uint8ClampedArray(e.buffer),o=new ImageData(i,t,n),r=document.createElement("canvas");return r.width=t,r.height=n,r.getContext("2d").putImageData(o,0,0),r}var qz=e1t;function fI(){this._defaultTexture=void 0,this._textures={},this._loadedImages=[],this._lastUpdatedFrame=-1}fI.prototype.getTexture=function(e){return this._textures[e]};function t1t(e,t,n){n.resource.fetchImage().then(function(i){e._loadedImages.push({id:t,image:i,textureUniform:n})}).catch(function(){let i=e._textures[t];l(i)&&i!==e._defaultTexture&&i.destroy(),e._textures[t]=e._defaultTexture})}fI.prototype.loadTexture2D=function(e,t){l(t.typedArray)?this._loadedImages.push({id:e,textureUniform:t}):t1t(this,e,t)};function n1t(e,t,n){let{id:i,textureUniform:o,image:r}=t,a=n.webgl2?N5(o,r,n):i1t(o,r,n),s=e._textures[i];l(s)&&s!==n.defaultTexture&&s.destroy(),e._textures[i]=a}function N5(e,t,n){let{typedArray:i,sampler:o}=e,r=l(i)?QPe(e,n):new It({context:n,source:t,sampler:o});return KPe(o)&&r.generateMipmap(),r}function i1t(e,t,n){let{typedArray:i,sampler:o}=e,r=KPe(o),a=o.wrapS===un.REPEAT||o.wrapS===un.MIRRORED_REPEAT||o.wrapT===un.REPEAT||o.wrapT===un.MIRRORED_REPEAT,{width:s,height:c}=l(i)?e:t,u=[s,c].every(D.isPowerOfTwo);if((r||a)&&!u)if(l(i)){if(e.pixelDatatype===je.UNSIGNED_BYTE){let d=qz(i,s,c),p=vA(d);return N5({sampler:o},p,n)}}else{let d=vA(t);return N5(e,d,n)}else return N5(e,t,n);return r?console.warn("Texture requires resizing for mipmaps but pixelDataType cannot be resized. The texture may be rendered incorrectly."):a&&console.warn("Texture requires resizing for wrapping but pixelDataType cannot be resized. The texture may be rendered incorrectly."),QPe(e,n)}function KPe(e){return[Vt.NEAREST_MIPMAP_NEAREST,Vt.NEAREST_MIPMAP_LINEAR,Vt.LINEAR_MIPMAP_NEAREST,Vt.LINEAR_MIPMAP_LINEAR].includes(e.minificationFilter)}function QPe(e,t){let{pixelFormat:n,pixelDatatype:i,width:o,height:r,typedArray:a,sampler:s}=e;return new It({context:t,pixelFormat:n,pixelDatatype:i,source:{arrayBufferView:a,width:o,height:r},sampler:s,flipY:!1})}fI.prototype.update=function(e){if(e.frameNumber===this._lastUpdatedFrame)return;this._lastUpdatedFrame=e.frameNumber;let t=e.context;this._defaultTexture=t.defaultTexture;let n=this._loadedImages;for(let i=0;i<n.length;i++){let o=n[i];n1t(this,o,t)}n.length=0};fI.prototype.isDestroyed=function(){return!1};fI.prototype.destroy=function(){let e=this._textures;for(let t in e)if(e.hasOwnProperty(t)){let n=e[t];n!==this._defaultTexture&&n.destroy()}return fe(this)};var Yz=fI;function Xz(e){e=e??G.EMPTY_OBJECT,this.mode=e.mode??vg.MODIFY_MATERIAL,this.lightingModel=e.lightingModel,this.uniforms=e.uniforms??G.EMPTY_OBJECT,this.varyings=e.varyings??G.EMPTY_OBJECT,this.vertexShaderText=e.vertexShaderText,this.fragmentShaderText=e.fragmentShaderText,this.translucencyMode=e.translucencyMode??VA.INHERIT,this._textureManager=new Yz,this._defaultTexture=void 0,this.uniformMap=o1t(this),this.usedVariablesVertex={attributeSet:{},featureIdSet:{},metadataSet:{}},this.usedVariablesFragment={attributeSet:{},featureIdSet:{},metadataSet:{},materialSet:{}},s1t(this),c1t(this)}function o1t(e){let t=e.uniforms,n={};for(let i in t)if(t.hasOwnProperty(i)){let o=t[i];o.type===_0.SAMPLER_2D?(e._textureManager.loadTexture2D(i,o.value),n[i]=r1t(e,i)):n[i]=a1t(e,i)}return n}function r1t(e,t){return function(){return e._textureManager.getTexture(t)??e._defaultTexture}}function a1t(e,t){return function(){return e.uniforms[t].value}}function IT(e,t,n){let i;for(;(i=t.exec(e))!==null;){let o=i[1];n[o]=!0}}function s1t(e){let t=/[vf]sInput\.attributes\.(\w+)/g,n=/[vf]sInput\.featureIds\.(\w+)/g,i=/[vf]sInput\.(?:metadata|metadataClass|metadataStatistics)\.(\w+)/g,o,r=e.vertexShaderText;l(r)&&(o=e.usedVariablesVertex.attributeSet,IT(r,t,o),o=e.usedVariablesVertex.featureIdSet,IT(r,n,o),o=e.usedVariablesVertex.metadataSet,IT(r,i,o));let a=e.fragmentShaderText;if(l(a)){o=e.usedVariablesFragment.attributeSet,IT(a,t,o),o=e.usedVariablesFragment.featureIdSet,IT(a,n,o),o=e.usedVariablesFragment.metadataSet,IT(a,i,o);let s=/material\.(\w+)/g,c=e.usedVariablesFragment.materialSet;IT(a,s,c)}}function $Pe(e){let t=/^.*MC$/,n=/^.*WC$/,i=/^.*EC$/;return t.test(e)?`${e} (model coordinates)`:n.test(e)?`${e} (Cartesian world coordinates)`:i.test(e)?`${e} (eye coordinates)`:e}function bl(e,t,n,i){if(e.hasOwnProperty(t)){let o=`${$Pe(t)} is not available in the ${i} shader. Did you mean ${$Pe(n)} instead?`;throw new _e(o)}}function c1t(e){let t=e.usedVariablesVertex.attributeSet;bl(t,"position","positionMC","vertex"),bl(t,"normal","normalMC","vertex"),bl(t,"tangent","tangentMC","vertex"),bl(t,"bitangent","bitangentMC","vertex"),bl(t,"positionWC","positionMC","vertex"),bl(t,"positionEC","positionMC","vertex"),bl(t,"normalEC","normalMC","vertex"),bl(t,"tangentEC","tangentMC","vertex"),bl(t,"bitangentEC","bitangentMC","vertex");let n=e.usedVariablesFragment.attributeSet;bl(n,"position","positionEC","fragment"),bl(n,"normal","normalEC","fragment"),bl(n,"tangent","tangentEC","fragment"),bl(n,"bitangent","bitangentEC","fragment"),bl(n,"normalMC","normalEC","fragment"),bl(n,"tangentMC","tangentEC","fragment"),bl(n,"bitangentMC","bitangentEC","fragment")}Xz.prototype.setUniform=function(e,t){let n=this.uniforms[e];n.type===_0.SAMPLER_2D?this._textureManager.loadTexture2D(e,t):l(t.clone)?n.value=t.clone(n.value):n.value=t};Xz.prototype.update=function(e){this._defaultTexture=e.context.defaultTexture,this._textureManager.update(e)};Xz.prototype.isDestroyed=function(){return!1};Xz.prototype.destroy=function(){this._textureManager=this._textureManager&&this._textureManager.destroy(),fe(this)};var A0=Xz;function l1t(e){e=e??G.EMPTY_OBJECT,this.typedArray=e.typedArray,this.width=e.width,this.height=e.height,this.pixelFormat=e.pixelFormat??Xe.RGBA,this.pixelDatatype=e.pixelDatatype??je.UNSIGNED_BYTE;let t=e.url;typeof t=="string"&&(t=De.createIfNeeded(t)),this.resource=t;let i=e.repeat??!0?un.REPEAT:un.CLAMP_TO_EDGE;this.sampler=new jt({wrapS:i,wrapT:i,minificationFilter:e.minificationFilter,magnificationFilter:e.magnificationFilter,maximumAnisotropy:e.maximumAnisotropy})}var Kz=l1t;function u1t(e){let{names:t,types:n,componentTypes:i,minimumValues:o,maximumValues:r}=e;for(let a=0;a<t.length;a++){if(!f1t(o?.[a],r?.[a]))continue;let s=d1t(t[a],n[a],i[a],o[a],r[a]);if(l(s))return s}}function f1t(e,t){if(!Array.isArray(e)||!Array.isArray(t))return!1;let n=Math.min(...e),i=Math.max(...t);return n<i}function d1t(e,t,n,i,o){if(t===dt.VEC4&&n===Dt.FLOAT32)return h1t(e,i,o);if(t===dt.SCALAR&&n===Dt.FLOAT32)return m1t(e,i,o)}function h1t(e,t,n){let i=Math.min(...t),o=Math.max(...n);if(!(i<0||o>1))return new A0({fragmentShaderText:`void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material)
- {
- material.diffuse = fsInput.metadata.${e}.rgb;
- material.alpha = fsInput.metadata.${e}.a;
- }`})}function m1t(e,t,n){let o=Wz([new V(.267,.004,.329),new V(.282,.14,.457),new V(.254,.265,.53),new V(.207,.372,.553),new V(.164,.471,.558),new V(.128,.567,.551),new V(.135,.659,.518),new V(.194,.741,.443),new V(.282,.819,.369),new V(.396,.898,.301),new V(.538,.965,.236),new V(.741,.998,.149),new V(.993,1,.144)],128),r=new Kz({typedArray:o,width:128,height:1});return new A0({uniforms:{u_colorMap:{type:_0.SAMPLER_2D,value:r},u_minimumValue:{type:_0.FLOAT,value:t[0]},u_maximumValue:{type:_0.FLOAT,value:n[0]}},fragmentShaderText:`void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material)
- {
- float value = fsInput.metadata.${e};
- vec3 voxelNormal = fsInput.attributes.normalEC;
- float diffuse = max(0.0, dot(voxelNormal, czm_lightDirectionEC));
- float lighting = 0.5 + 0.5 * diffuse;
-
- if (value >= u_minimumValue && value <= u_maximumValue) {
- float lerp = (value - u_minimumValue) / (u_maximumValue - u_minimumValue);
- material.diffuse = texture(u_colorMap, vec2(lerp, 0.5)).rgb * lighting;
- material.alpha = 1.0;
- }
- }`})}var dI=u1t;function p1t(e,t){let{shaderBuilder:n}=e,{names:i,types:o,componentTypes:r,minimumValues:a,maximumValues:s}=t._provider,c=o.length,u=l(a)&&l(s);n.addDefine("METADATA_COUNT",c,he.FRAGMENT),u&&n.addDefine("STATISTICS",void 0,he.FRAGMENT);for(let _=0;_<c;_++){let T=i[_],v=F5(o[_]),I=`PropertyStatistics_${T}`,O=`PropertyStatistics_${T}`;n.addStruct(I,O,he.FRAGMENT),n.addStructField(I,v,"min"),n.addStructField(I,v,"max")}let f="MetadataStatistics",d="MetadataStatistics",p="metadataStatistics";n.addStruct(f,d,he.FRAGMENT);for(let _=0;_<c;_++){let T=i[_],v=`PropertyStatistics_${T}`,I=T;n.addStructField(f,v,I)}let g="Metadata",m="Metadata",A="metadata";n.addStruct(g,m,he.FRAGMENT);for(let _=0;_<c;_++){let T=F5(o[_]);n.addStructField(g,T,i[_])}let y="Attributes",x="Attributes",b="attributes";n.addStruct(y,x,he.FRAGMENT),n.addStructField(y,"vec3","positionEC"),n.addStructField(y,"vec3","normalEC");let C="Voxel",E="Voxel",S="voxel";n.addStruct(C,E,he.FRAGMENT),n.addStructField(C,"vec3","viewDirUv"),n.addStructField(C,"float","travelDistance"),n.addStructField(C,"int","stepCount"),n.addStructField(C,"int","tileIndex"),n.addStructField(C,"int","sampleIndex"),n.addStructField(C,"float","distanceToDepthBuffer");let w="FragmentInput";n.addStruct(w,"FragmentInput",he.FRAGMENT),n.addStructField(w,d,p),n.addStructField(w,m,A),n.addStructField(w,x,b),n.addStructField(w,E,S);let R="Properties",B="Properties",L="properties";n.addStruct(R,B,he.FRAGMENT);for(let _=0;_<c;_++){let T=F5(o[_]);n.addStructField(R,T,i[_])}{let _="clearProperties";n.addFunction(_,`${B} clearProperties()`,he.FRAGMENT),n.addFunctionLines(_,[`${B} ${L};`]);for(let T=0;T<c;T++){let v=F5(o[T],r[T]);n.addFunctionLines(_,[`${L}.${i[T]} = ${v}(0.0);`])}n.addFunctionLines(_,[`return ${L};`])}{let _="sumProperties";n.addFunction(_,`${B} sumProperties(${B} propertiesA, ${B} propertiesB)`,he.FRAGMENT),n.addFunctionLines(_,[`${B} ${L};`]);for(let T=0;T<c;T++){let v=i[T];n.addFunctionLines(_,[`${L}.${v} = propertiesA.${v} + propertiesB.${v};`])}n.addFunctionLines(_,[`return ${L};`])}{let _="scaleProperties";n.addFunction(_,`${B} scaleProperties(${B} ${L}, float scale)`,he.FRAGMENT),n.addFunctionLines(_,[`${B} scaledProperties = ${L};`]);for(let T=0;T<c;T++)n.addFunctionLines(_,[`scaledProperties.${i[T]} *= scale;`]);n.addFunctionLines(_,["return scaledProperties;"])}{let _="mixProperties";n.addFunction(_,`${B} mixProperties(${B} propertiesA, ${B} propertiesB, float mixFactor)`,he.FRAGMENT),n.addFunctionLines(_,[`${B} ${L};`]);for(let T=0;T<c;T++){let v=i[T];n.addFunctionLines(_,[`${L}.${v} = mix(propertiesA.${v}, propertiesB.${v}, mixFactor);`])}n.addFunctionLines(_,[`return ${L};`])}{let _="copyPropertiesToMetadata";n.addFunction(_,`void copyPropertiesToMetadata(in ${B} ${L}, inout ${m} ${A})`,he.FRAGMENT);for(let T=0;T<c;T++){let v=i[T];n.addFunctionLines(_,[`${A}.${v} = ${L}.${v};`])}}if(u){let _="setStatistics";n.addFunction(_,`void setStatistics(inout ${d} ${p})`,he.FRAGMENT);for(let T=0;T<c;T++){let v=i[T],I=o[T],O=dt.getComponentCount(I);for(let N=0;N<O;N++){let j=_1t(I,N),k=a[T][N],U=s[T][N];!l(k)||!l(U)||n.addFunctionLines(_,[`${p}.${v}.min${j} = ${JPe(k)};`,`${p}.${v}.max${j} = ${JPe(U)};`])}}}{let _="getPropertiesFromMegatextureAtUv";n.addFunction(_,`${B} getPropertiesFromMegatextureAtUv(vec3 texcoord)`,he.FRAGMENT),n.addFunctionLines(_,[`${B} ${L};`]);for(let T=0;T<c;T++){let v=o[T],I=r[T],O=g1t(v,I);n.addFunctionLines(_,[`properties.${i[T]} = texture(u_megatextureTextures[${T}], texcoord)${O};`])}n.addFunctionLines(_,[`return ${L};`])}}function F5(e){if(e===dt.SCALAR)return"float";if(e===dt.VEC2)return"vec2";if(e===dt.VEC3)return"vec3";if(e===dt.VEC4)return"vec4"}function g1t(e){if(e===dt.SCALAR)return".r";if(e===dt.VEC2)return".ra";if(e===dt.VEC3)return".rgb";if(e===dt.VEC4)return""}function JPe(e){let t=e.toString();return t.indexOf(".")===-1&&(t=`${e}.0`),t}function _1t(e,t){return e===dt.SCALAR?"":`[${t}]`}var Qz=p1t;function qm(e){let{planes:t,modelMatrix:n=M.IDENTITY,unionClippingRegions:i=!1}=e??G.EMPTY_OBJECT;if(this._planes=[],this.modelMatrix=M.clone(n),this.planeAdded=new ye,this.planeRemoved=new ye,this._unionClippingRegions=i,this._testIntersection=i?ZPe:e1e,this._float32View=void 0,this._clippingPlanesTexture=void 0,l(t))for(let o=0;o<t.length;++o)this.add(t[o])}function ZPe(e){return e===qt.OUTSIDE}function e1e(e){return e===qt.INSIDE}Object.defineProperties(qm.prototype,{length:{get:function(){return this._planes.length}},unionClippingRegions:{get:function(){return this._unionClippingRegions},set:function(e){this._unionClippingRegions!==e&&(this._unionClippingRegions=e,this._testIntersection=e?ZPe:e1e)}},texture:{get:function(){return this._clippingPlanesTexture}},clippingPlanesState:{get:function(){return this._unionClippingRegions?this._planes.length:-this._planes.length}}});qm.prototype.add=function(e){let t=this._planes.length;e.index=t,this._planes.push(e),this.planeAdded.raiseEvent(e,t)};qm.prototype.get=function(e){return this._planes[e]};function t1e(e,t){for(let n=0;n<e.length;++n)if(en.equals(e[n],t))return n;return-1}qm.prototype.contains=function(e){return t1e(this._planes,e)!==-1};qm.prototype.remove=function(e){let t=this._planes,n=t1e(t,e);if(n===-1)return!1;e instanceof $a&&(e.onChangeCallback=void 0,e.index=-1);let i=t.length-1;for(let o=n;o<i;++o){let r=t[o+1];t[o]=r,r instanceof $a&&(r.index=o)}return t.length=i,this.planeRemoved.raiseEvent(e,n),!0};qm.prototype.removeAll=function(){let e=this._planes;for(let t=0;t<e.length;++t){let n=e[t];n instanceof $a&&(n.onChangeCallback=void 0,n.index=-1),this.planeRemoved.raiseEvent(n,t)}this._planes=[]};var A1t=new en(h.fromElements(1,0,0),0);function y1t(e,t){let n=e._float32View,i=e._planes,o=0;for(let r=0;r<i.length;++r){let{normal:a,distance:s}=b1t(i[r],t,A1t);n[o]=a.x,n[o+1]=a.y,n[o+2]=a.z,n[o+3]=s,o+=4}}var Cne=new se,x1t=new h;function b1t(e,t,n){let{normal:i,distance:o}=e,r=se.fromElements(i.x,i.y,i.z,o,Cne),a=M.multiplyByVector(t,r,Cne),s=h.fromCartesian4(a,x1t);return a=se.divideByScalar(a,h.magnitude(s),Cne),en.fromCartesian4(a,n)}function n1e(e,t){return t.x=Math.min(e,Rt.maximumTextureSize),t.y=Math.ceil(e/t.x),t}var C1t=new z;qm.prototype.update=function(e,t){let n=this._clippingPlanesTexture,i=this.length;if(l(n)){let a=n.width*n.height;(a<i||i<.25*a)&&(n.destroy(),n=void 0,this._clippingPlanesTexture=void 0)}if(this.length===0)return;if(!l(n)){let a=n1e(i,C1t);a.y*=2,n=new It({context:e.context,width:a.x,height:a.y,pixelFormat:Xe.RGBA,pixelDatatype:je.FLOAT,sampler:jt.NEAREST,flipY:!1}),this._float32View=new Float32Array(a.x*a.y*4),this._clippingPlanesTexture=n}let{width:o,height:r}=n;y1t(this,t),n.copyFrom({source:{width:o,height:r,arrayBufferView:this._float32View}})};qm.getTextureResolution=function(e,t,n){let i=e.texture;if(l(i))return n.x=i.width,n.y=i.height,n;let o=e.length,r=n1e(o,n);return r.y*=2,r};qm.prototype.isDestroyed=function(){return!1};qm.prototype.destroy=function(){return this._clippingPlanesTexture=this._clippingPlanesTexture&&this._clippingPlanesTexture.destroy(),fe(this)};var P_=qm;var $z=`struct Ray {
- vec3 pos;
- vec3 dir;
- };
-
- float minComponent(in vec3 v) {
- return min(min(v.x, v.y), v.z);
- }
-
- float maxComponent(in vec3 v) {
- return max(max(v.x, v.y), v.z);
- }
- `;var Jz=`// See Intersection.glsl for the definition of intersectScene
- // See IntersectionUtils.glsl for the definition of nextIntersection
- // See convertLocalToBoxUv.glsl, convertLocalToCylinderUv.glsl, or convertLocalToEllipsoidUv.glsl
- // for the definitions of convertLocalToShapeSpaceDerivative and getTileAndUvCoordinate.
- // The appropriate functions are selected based on the VoxelPrimitive shape type,
- // and added to the shader in Scene/VoxelRenderResources.js.
- // See Octree.glsl for the definitions of TraversalData, SampleData,
- // traverseOctreeFromBeginning, and traverseOctreeFromExisting
- // See Megatexture.glsl for the definition of accumulatePropertiesFromMegatexture
-
- #define STEP_COUNT_MAX 1000 // Harcoded value because GLSL doesn't like variable length loops
- #if defined(PICKING_VOXEL)
- #define ALPHA_ACCUM_MAX 0.1
- #else
- #define ALPHA_ACCUM_MAX 0.98 // Must be > 0.0 and <= 1.0
- #endif
-
- uniform mat4 u_transformPositionViewToLocal;
- uniform mat3 u_transformDirectionViewToLocal;
- uniform vec3 u_cameraPositionLocal;
- uniform vec3 u_cameraDirectionLocal;
- uniform float u_stepSize;
-
- #if defined(PICKING)
- uniform vec4 u_pickColor;
- #endif
-
- vec3 getSampleSize(in int level) {
- vec3 sampleCount = exp2(float(level)) * vec3(u_dimensions);
- vec3 sampleSizeUv = 1.0 / sampleCount;
- return scaleShapeUvToShapeSpace(sampleSizeUv);
- }
-
- #define MINIMUM_STEP_SCALAR (0.02)
- #define SHIFT_FRACTION (0.001)
-
- /**
- * Given a coordinate within a tile, and sample spacings along a ray through
- * the coordinate, find the distance to the points where the ray entered and
- * exited the voxel cell, along with the surface normals at those points.
- * The surface normals are returned in shape space coordinates.
- */
- RayShapeIntersection getVoxelIntersection(in vec3 tileUv, in vec3 sampleSizeAlongRay) {
- vec3 voxelCoord = tileUv * vec3(u_dimensions);
- vec3 directions = sign(sampleSizeAlongRay);
- vec3 positiveDirections = max(directions, 0.0);
- vec3 entryCoord = mix(ceil(voxelCoord), floor(voxelCoord), positiveDirections);
- vec3 exitCoord = entryCoord + directions;
-
- vec3 distanceFromEntry = -abs((entryCoord - voxelCoord) * sampleSizeAlongRay);
- float lastEntry = maxComponent(distanceFromEntry);
- bvec3 isLastEntry = equal(distanceFromEntry, vec3(lastEntry));
- vec3 entryNormal = -1.0 * vec3(isLastEntry) * directions;
- vec4 entry = vec4(entryNormal, lastEntry);
-
- vec3 distanceToExit = abs((exitCoord - voxelCoord) * sampleSizeAlongRay);
- float firstExit = minComponent(distanceToExit);
- bvec3 isFirstExit = equal(distanceToExit, vec3(firstExit));
- vec3 exitNormal = vec3(isFirstExit) * directions;
- vec4 exit = vec4(exitNormal, firstExit);
-
- return RayShapeIntersection(entry, exit);
- }
-
- vec4 getStepSize(in SampleData sampleData, in Ray viewRay, in RayShapeIntersection shapeIntersection, in mat3 jacobianT, in float currentT) {
- vec3 gradient = viewRay.dir * jacobianT;
- vec3 sampleSizeAlongRay = getSampleSize(sampleData.tileCoords.w) / gradient;
-
- RayShapeIntersection voxelIntersection = getVoxelIntersection(sampleData.tileUv, sampleSizeAlongRay);
-
- // Transform normal from shape space to Cartesian space to eye space
- vec3 voxelNormal = jacobianT * voxelIntersection.entry.xyz;
- voxelNormal = normalize(czm_normal * voxelNormal);
-
- // Compare with the shape intersection, to choose the appropriate normal
- vec4 voxelEntry = vec4(voxelNormal, currentT + voxelIntersection.entry.w);
- vec4 entry = intersectionMax(shapeIntersection.entry, voxelEntry);
-
- float fixedStep = minComponent(abs(sampleSizeAlongRay)) * u_stepSize;
- float shift = fixedStep * SHIFT_FRACTION;
- float dt = voxelIntersection.exit.w + shift;
- if ((currentT + dt) > shapeIntersection.exit.w) {
- // Stop at end of shape
- dt = shapeIntersection.exit.w - currentT + shift;
- }
- float stepSize = clamp(dt, fixedStep * MINIMUM_STEP_SCALAR, fixedStep + shift);
-
- return vec4(entry.xyz, stepSize);
- }
-
- vec2 packIntToVec2(int value) {
- float shifted = float(value) / 255.0;
- float lowBits = fract(shifted);
- float highBits = floor(shifted) / 255.0;
- return vec2(highBits, lowBits);
- }
-
- vec2 packFloatToVec2(float value) {
- float lowBits = fract(value);
- float highBits = floor(value) / 255.0;
- return vec2(highBits, lowBits);
- }
-
- int getSampleIndex(in SampleData sampleData) {
- // tileUv = 1.0 is a valid coordinate but sampleIndex = u_inputDimensions is not.
- // (tileUv = 1.0 corresponds to the far edge of the last sample, at index = u_inputDimensions - 1).
- // Clamp to [0, voxelDimensions - 0.5) to avoid numerical error before flooring
- vec3 maxCoordinate = vec3(u_inputDimensions) - vec3(0.5);
- vec3 inputCoordinate = clamp(sampleData.inputCoordinate, vec3(0.0), maxCoordinate);
- ivec3 sampleIndex = ivec3(floor(inputCoordinate));
- // Convert to a 1D index for lookup in a 1D data array
- return sampleIndex.x + u_inputDimensions.x * (sampleIndex.y + u_inputDimensions.y * sampleIndex.z);
- }
-
- /**
- * Compute the view ray at the current fragment, in the local coordinates of the shape.
- */
- Ray getViewRayLocal() {
- vec4 eyeCoordinates = czm_windowToEyeCoordinates(gl_FragCoord);
- vec3 origin;
- vec3 direction;
- if (czm_orthographicIn3D == 1.0) {
- eyeCoordinates.z = 0.0;
- origin = (u_transformPositionViewToLocal * eyeCoordinates).xyz;
- direction = u_cameraDirectionLocal;
- } else {
- origin = u_cameraPositionLocal;
- direction = u_transformDirectionViewToLocal * normalize(eyeCoordinates.xyz);
- }
- return Ray(origin, direction);
- }
-
- Ray getViewRayEC() {
- vec4 eyeCoordinates = czm_windowToEyeCoordinates(gl_FragCoord);
- vec3 viewPosEC = (czm_orthographicIn3D == 1.0)
- ? vec3(eyeCoordinates.xy, 0.0)
- : vec3(0.0);
- vec3 viewDirEC = normalize(eyeCoordinates.xyz);
- return Ray(viewPosEC, viewDirEC);
- }
-
- void main()
- {
- Ray viewRayLocal = getViewRayLocal();
- Ray viewRayEC = getViewRayEC();
-
- Intersections ix;
- vec2 screenCoord = (gl_FragCoord.xy - czm_viewport.xy) / czm_viewport.zw; // [0,1]
- RayShapeIntersection shapeIntersection = intersectScene(screenCoord, viewRayLocal, viewRayEC, ix);
- // Exit early if the scene was completely missed.
- if (shapeIntersection.entry.w == NO_HIT) {
- discard;
- }
-
- float currentT = shapeIntersection.entry.w;
- float endT = shapeIntersection.exit.w;
-
- vec3 positionEC = viewRayEC.pos + currentT * viewRayEC.dir;
- TileAndUvCoordinate tileAndUv = getTileAndUvCoordinate(positionEC);
- vec3 positionLocal = viewRayLocal.pos + currentT * viewRayLocal.dir;
- mat3 jacobianT = convertLocalToShapeSpaceDerivative(positionLocal);
-
- // Traverse the tree from the start position
- TraversalData traversalData;
- SampleData sampleDatas[SAMPLE_COUNT];
- traverseOctreeFromBeginning(tileAndUv, traversalData, sampleDatas);
- vec4 step = getStepSize(sampleDatas[0], viewRayLocal, shapeIntersection, jacobianT, currentT);
-
- FragmentInput fragmentInput;
- #if defined(STATISTICS)
- setStatistics(fragmentInput.metadataStatistics);
- #endif
-
- czm_modelMaterial materialOutput;
- vec4 colorAccum = vec4(0.0);
-
- for (int stepCount = 0; stepCount < STEP_COUNT_MAX; ++stepCount) {
- // Read properties from the megatexture based on the traversal state
- Properties properties = accumulatePropertiesFromMegatexture(sampleDatas);
-
- // Prepare the custom shader inputs
- copyPropertiesToMetadata(properties, fragmentInput.metadata);
-
- fragmentInput.attributes.positionEC = positionEC;
- // Re-normalize normals: some shape intersections may have been scaled to encode positive/negative shapes
- fragmentInput.attributes.normalEC = normalize(step.xyz);
-
- fragmentInput.voxel.viewDirUv = viewRayLocal.dir;
-
- fragmentInput.voxel.travelDistance = step.w;
- fragmentInput.voxel.stepCount = stepCount;
- fragmentInput.voxel.tileIndex = sampleDatas[0].megatextureIndex;
- fragmentInput.voxel.sampleIndex = getSampleIndex(sampleDatas[0]);
- fragmentInput.voxel.distanceToDepthBuffer = ix.distanceToDepthBuffer - currentT;
-
- // Run the custom shader
- fragmentMain(fragmentInput, materialOutput);
-
- // Sanitize the custom shader output
- vec4 color = vec4(materialOutput.diffuse, materialOutput.alpha);
- color.rgb = max(color.rgb, vec3(0.0));
- color.a = clamp(color.a, 0.0, 1.0);
-
- // Pre-multiplied alpha blend
- colorAccum += (1.0 - colorAccum.a) * vec4(color.rgb * color.a, color.a);
-
- // Stop traversing if the alpha has been fully saturated
- if (colorAccum.a > ALPHA_ACCUM_MAX) {
- colorAccum.a = ALPHA_ACCUM_MAX;
- break;
- }
-
- if (step.w == 0.0) {
- // Shape is infinitely thin. The ray may have hit the edge of a
- // foreground voxel. Step ahead slightly to check for more voxels
- step.w = 0.001;
- }
-
- // Keep raymarching
- currentT += step.w;
- // Check if there's more intersections.
- if (currentT > endT) {
- #if (INTERSECTION_COUNT == 1)
- break;
- #else
- shapeIntersection = nextIntersection(ix);
- if (shapeIntersection.entry.w == NO_HIT) {
- break;
- } else {
- // Found another intersection. Resume raymarching there
- currentT = shapeIntersection.entry.w;
- endT = shapeIntersection.exit.w;
- }
- #endif
- }
- positionEC = viewRayEC.pos + currentT * viewRayEC.dir;
- tileAndUv = getTileAndUvCoordinate(positionEC);
- positionLocal = viewRayLocal.pos + currentT * viewRayLocal.dir;
- jacobianT = convertLocalToShapeSpaceDerivative(positionLocal);
-
- // Traverse the tree from the current ray position.
- // This is similar to traverseOctreeFromBeginning but is faster when the ray is in the same tile as the previous step.
- traverseOctreeFromExisting(tileAndUv, traversalData, sampleDatas);
- step = getStepSize(sampleDatas[0], viewRayLocal, shapeIntersection, jacobianT, currentT);
- }
-
- // Convert the alpha from [0,ALPHA_ACCUM_MAX] to [0,1]
- colorAccum.a /= ALPHA_ACCUM_MAX;
-
- #if defined(PICKING)
- // If alpha is 0.0 there is nothing to pick
- if (colorAccum.a == 0.0) {
- discard;
- }
- out_FragColor = u_pickColor;
- #elif defined(PICKING_VOXEL)
- // If alpha is 0.0 there is nothing to pick
- if (colorAccum.a == 0.0) {
- discard;
- }
- vec2 megatextureId = packIntToVec2(sampleDatas[0].megatextureIndex);
- vec2 sampleIndex = packIntToVec2(getSampleIndex(sampleDatas[0]));
- out_FragColor = vec4(megatextureId, sampleIndex);
- #else
- out_FragColor = colorAccum;
- #endif
- }
- `;var Zz=`in vec2 position;
-
- uniform vec4 u_ndcSpaceAxisAlignedBoundingBox;
-
- void main() {
- vec2 aabbMin = u_ndcSpaceAxisAlignedBoundingBox.xy;
- vec2 aabbMax = u_ndcSpaceAxisAlignedBoundingBox.zw;
- vec2 translation = 0.5 * (aabbMax + aabbMin);
- vec2 scale = 0.5 * (aabbMax - aabbMin);
- gl_Position = vec4(position * scale + translation, 0.0, 1.0);
- }
- `;var eU=`/* Intersection defines
- #define INTERSECTION_COUNT ###
- */
-
- #define NO_HIT (-czm_infinity)
- #define INF_HIT (czm_infinity * 0.5)
-
- struct RayShapeIntersection {
- vec4 entry;
- vec4 exit;
- };
-
- vec4 intersectionMin(in vec4 intersect0, in vec4 intersect1)
- {
- if (intersect0.w == NO_HIT) {
- return intersect1;
- } else if (intersect1.w == NO_HIT) {
- return intersect0;
- }
- return (intersect0.w <= intersect1.w) ? intersect0 : intersect1;
- }
-
- vec4 intersectionMax(in vec4 intersect0, in vec4 intersect1)
- {
- return (intersect0.w >= intersect1.w) ? intersect0 : intersect1;
- }
-
- RayShapeIntersection intersectIntersections(in Ray ray, in RayShapeIntersection intersect0, in RayShapeIntersection intersect1)
- {
- bool missed = (intersect0.entry.w == NO_HIT) ||
- (intersect1.entry.w == NO_HIT) ||
- (intersect0.exit.w < intersect1.entry.w) ||
- (intersect0.entry.w > intersect1.exit.w);
- if (missed) {
- vec4 miss = vec4(normalize(ray.dir), NO_HIT);
- return RayShapeIntersection(miss, miss);
- }
-
- vec4 entry = intersectionMax(intersect0.entry, intersect1.entry);
- vec4 exit = intersectionMin(intersect0.exit, intersect1.exit);
-
- return RayShapeIntersection(entry, exit);
- }
-
- struct Intersections {
- // Don't access these member variables directly - call the functions instead.
-
- // Store an array of ray-surface intersections. Each intersection is composed of:
- // .xyz for the surface normal at the intersection point
- // .w for the T value
- // The scale of the normal encodes the shape intersection type:
- // length(intersection.xyz) = 1: positive shape entry
- // length(intersection.xyz) = 2: positive shape exit
- // length(intersection.xyz) = 3: negative shape entry
- // length(intersection.xyz) = 4: negative shape exit
- // INTERSECTION_COUNT is the number of ray-*shape* (volume) intersections,
- // so we need twice as many to track ray-*surface* intersections
- vec4 intersections[INTERSECTION_COUNT * 2];
- float distanceToDepthBuffer;
-
- #if (INTERSECTION_COUNT > 1)
- // Maintain state for future nextIntersection calls
- int index;
- int surroundCount;
- bool surroundIsPositive;
- #endif
- };
-
- RayShapeIntersection getFirstIntersection(in Intersections ix)
- {
- return RayShapeIntersection(ix.intersections[0], ix.intersections[1]);
- }
-
- vec4 encodeIntersectionType(vec4 intersection, int index, bool entry)
- {
- float scale = float(index > 0) * 2.0 + float(!entry) + 1.0;
- return vec4(intersection.xyz * scale, intersection.w);
- }
-
- // Use defines instead of real functions because WebGL1 cannot access array with non-constant index.
- #define setIntersection(/*inout Intersections*/ ix, /*int*/ index, /*float*/ t, /*bool*/ positive, /*bool*/ enter) (ix).intersections[(index)] = vec4(0.0, float(!positive) * 2.0 + float(!enter) + 1.0, 0.0, (t))
- #define setIntersectionPair(/*inout Intersections*/ ix, /*int*/ index, /*vec2*/ entryExit) (ix).intersections[(index) * 2 + 0] = vec4(0.0, float((index) > 0) * 2.0 + 1.0, 0.0, (entryExit).x); (ix).intersections[(index) * 2 + 1] = vec4(0.0, float((index) > 0) * 2.0 + 2.0, 0.0, (entryExit).y)
- #define setSurfaceIntersection(/*inout Intersections*/ ix, /*int*/ index, /*vec4*/ intersection, /*bool*/ positive, /*bool*/ enter) (ix).intersections[(index)] = encodeIntersectionType((intersection), int(!positive), (enter))
- #define setShapeIntersection(/*inout Intersections*/ ix, /*int*/ index, /*RayShapeIntersection*/ intersection) (ix).intersections[(index) * 2 + 0] = encodeIntersectionType((intersection).entry, (index), true); (ix).intersections[(index) * 2 + 1] = encodeIntersectionType((intersection).exit, (index), false)
-
- #if (INTERSECTION_COUNT > 1)
- void initializeIntersections(inout Intersections ix) {
- // Sort the intersections from min T to max T with bubble sort.
- // Note: If this sorting function changes, some of the intersection test may
- // need to be updated. Search for "bubble sort" to find those areas.
- const int sortPasses = INTERSECTION_COUNT * 2 - 1;
- for (int n = sortPasses; n > 0; --n) {
- for (int i = 0; i < sortPasses; ++i) {
- // The loop should be: for (i = 0; i < n; ++i) {...} but WebGL1 cannot
- // loop with non-constant condition, so it has to break early instead
- if (i >= n) { break; }
-
- vec4 intersect0 = ix.intersections[i + 0];
- vec4 intersect1 = ix.intersections[i + 1];
-
- bool inOrder = intersect0.w <= intersect1.w;
-
- ix.intersections[i + 0] = inOrder ? intersect0 : intersect1;
- ix.intersections[i + 1] = inOrder ? intersect1 : intersect0;
- }
- }
-
- // Prepare initial state for nextIntersection
- ix.index = 0;
- ix.surroundCount = 0;
- ix.surroundIsPositive = false;
- }
- #endif
-
- #if (INTERSECTION_COUNT > 1)
- RayShapeIntersection nextIntersection(inout Intersections ix) {
- vec4 surfaceIntersection = vec4(0.0, 0.0, 0.0, NO_HIT);
- RayShapeIntersection shapeIntersection = RayShapeIntersection(surfaceIntersection, surfaceIntersection);
-
- const int passCount = INTERSECTION_COUNT * 2;
-
- if (ix.index == passCount) {
- return shapeIntersection;
- }
-
- for (int i = 0; i < passCount; ++i) {
- // The loop should be: for (i = ix.index; i < passCount; ++i) {...} but WebGL1 cannot
- // loop with non-constant condition, so it has to continue instead.
- if (i < ix.index) {
- continue;
- }
-
- ix.index = i + 1;
-
- surfaceIntersection = ix.intersections[i];
- int intersectionType = int(length(surfaceIntersection.xyz) - 0.5);
- bool currShapeIsPositive = intersectionType < 2;
- bool enter = intersectionType % 2 == 0;
-
- ix.surroundCount += enter ? +1 : -1;
- ix.surroundIsPositive = currShapeIsPositive ? enter : ix.surroundIsPositive;
-
- // entering positive or exiting negative
- if (ix.surroundCount == 1 && ix.surroundIsPositive && enter == currShapeIsPositive) {
- shapeIntersection.entry = surfaceIntersection;
- }
-
- // exiting positive or entering negative after being inside positive
- bool exitPositive = !enter && currShapeIsPositive && ix.surroundCount == 0;
- bool enterNegativeFromPositive = enter && !currShapeIsPositive && ix.surroundCount == 2 && ix.surroundIsPositive;
- if (exitPositive || enterNegativeFromPositive) {
- shapeIntersection.exit = surfaceIntersection;
-
- // entry and exit have been found, so the loop can stop
- if (exitPositive) {
- // After exiting positive shape there is nothing left to intersect, so jump to the end index.
- ix.index = passCount;
- }
- break;
- }
- }
-
- return shapeIntersection;
- }
- #endif
-
- // NOTE: initializeIntersections, nextIntersection aren't even declared unless INTERSECTION_COUNT > 1
- `;var tU=`// See IntersectionUtils.glsl for the definitions of Ray, Intersections,
- // setIntersectionPair, INF_HIT, NO_HIT
-
- /* intersectDepth defines (set in Scene/VoxelRenderResources.js)
- #define DEPTH_INTERSECTION_INDEX ###
- */
-
- void intersectDepth(in vec2 screenCoord, in Ray ray, inout Intersections ix) {
- float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, screenCoord));
- float entry;
- float exit;
- if (logDepthOrDepth != 0.0) {
- // Calculate how far the ray must travel before it hits the depth buffer.
- vec4 eyeCoordinateDepth = czm_screenToEyeCoordinates(screenCoord, logDepthOrDepth);
- eyeCoordinateDepth /= eyeCoordinateDepth.w;
- entry = dot(eyeCoordinateDepth.xyz - ray.pos, ray.dir);
- exit = +INF_HIT;
- } else {
- // There's no depth at this location.
- entry = NO_HIT;
- exit = NO_HIT;
- }
- ix.distanceToDepthBuffer = entry;
- #if defined(DEPTH_TEST)
- setIntersectionPair(ix, DEPTH_INTERSECTION_INDEX, vec2(entry, exit));
- #endif
- }
- `;var nU=`// See IntersectionUtils.glsl for the definitions of Ray, Intersections, INF_HIT,
- // NO_HIT, setShapeIntersection
-
- /* Clipping plane defines (set in Scene/VoxelRenderResources.js)
- #define CLIPPING_PLANES_UNION
- #define CLIPPING_PLANES_COUNT
- #define CLIPPING_PLANES_INTERSECTION_INDEX
- */
-
- uniform sampler2D u_clippingPlanesTexture;
- uniform mat4 u_clippingPlanesMatrix;
-
- // Plane is in Hessian Normal Form
- vec4 intersectPlane(in Ray ray, in vec4 plane) {
- vec3 n = plane.xyz; // normal
- float w = plane.w; // -dot(pointOnPlane, normal)
-
- float a = dot(ray.pos, n);
- float b = dot(ray.dir, n);
- float t = -(w + a) / b;
-
- return vec4(n, t);
- }
-
- #ifdef CLIPPING_PLANES
- void intersectClippingPlanes(in Ray ray, inout Intersections ix) {
- vec4 backSide = vec4(-ray.dir, -INF_HIT);
- vec4 farSide = vec4(ray.dir, +INF_HIT);
- RayShapeIntersection clippingVolume;
-
- #if (CLIPPING_PLANES_COUNT == 1)
- // Union and intersection are the same when there's one clipping plane, and the code
- // is more simplified.
- vec4 planeUv = getClippingPlane(u_clippingPlanesTexture, 0);
- vec4 intersection = intersectPlane(ray, planeUv);
- bool reflects = dot(ray.dir, intersection.xyz) < 0.0;
- clippingVolume.entry = reflects ? backSide : intersection;
- clippingVolume.exit = reflects ? intersection : farSide;
- setShapeIntersection(ix, CLIPPING_PLANES_INTERSECTION_INDEX, clippingVolume);
- #elif defined(CLIPPING_PLANES_UNION)
- vec4 firstTransmission = vec4(ray.dir, +INF_HIT);
- vec4 lastReflection = vec4(-ray.dir, -INF_HIT);
- for (int i = 0; i < CLIPPING_PLANES_COUNT; i++) {
- vec4 planeUv = getClippingPlane(u_clippingPlanesTexture, i);
- vec4 intersection = intersectPlane(ray, planeUv);
- if (dot(ray.dir, planeUv.xyz) > 0.0) {
- firstTransmission = intersection.w <= firstTransmission.w ? intersection : firstTransmission;
- } else {
- lastReflection = intersection.w >= lastReflection.w ? intersection : lastReflection;
- }
- }
- clippingVolume.entry = backSide;
- clippingVolume.exit = lastReflection;
- setShapeIntersection(ix, CLIPPING_PLANES_INTERSECTION_INDEX + 0, clippingVolume);
- clippingVolume.entry = firstTransmission;
- clippingVolume.exit = farSide;
- setShapeIntersection(ix, CLIPPING_PLANES_INTERSECTION_INDEX + 1, clippingVolume);
- #else // intersection
- vec4 lastTransmission = vec4(ray.dir, -INF_HIT);
- vec4 firstReflection = vec4(-ray.dir, +INF_HIT);
- for (int i = 0; i < CLIPPING_PLANES_COUNT; i++) {
- vec4 planeUv = getClippingPlane(u_clippingPlanesTexture, i);
- vec4 intersection = intersectPlane(ray, planeUv);
- if (dot(ray.dir, planeUv.xyz) > 0.0) {
- lastTransmission = intersection.w > lastTransmission.w ? intersection : lastTransmission;
- } else {
- firstReflection = intersection.w < firstReflection.w ? intersection: firstReflection;
- }
- }
- if (lastTransmission.w < firstReflection.w) {
- clippingVolume.entry = lastTransmission;
- clippingVolume.exit = firstReflection;
- } else {
- clippingVolume.entry = vec4(-ray.dir, NO_HIT);
- clippingVolume.exit = vec4(ray.dir, NO_HIT);
- }
- setShapeIntersection(ix, CLIPPING_PLANES_INTERSECTION_INDEX, clippingVolume);
- #endif
- }
- #endif
- `;var hI=`// See IntersectionUtils.glsl for the definitions of Ray, NO_HIT, INF_HIT,
- // RayShapeIntersection
-
- vec4 transformNormalToEC(in vec4 intersection) {
- return vec4(normalize(czm_normal * intersection.xyz), intersection.w);
- }
-
- RayShapeIntersection transformNormalsToEC(in RayShapeIntersection ix) {
- return RayShapeIntersection(transformNormalToEC(ix.entry), transformNormalToEC(ix.exit));
- }
-
- vec4 intersectLongitude(in Ray ray, in float angle, in bool positiveNormal) {
- float normalSign = positiveNormal ? 1.0 : -1.0;
- vec2 planeNormal = vec2(-sin(angle), cos(angle)) * normalSign;
-
- vec2 position = ray.pos.xy;
- vec2 direction = ray.dir.xy;
- float approachRate = dot(direction, planeNormal);
- float distance = -dot(position, planeNormal);
-
- float t = (approachRate == 0.0)
- ? NO_HIT
- : distance / approachRate;
-
- return vec4(planeNormal, 0.0, t);
- }
-
- RayShapeIntersection intersectHalfSpace(in Ray ray, in float angle, in bool positiveNormal)
- {
- vec4 intersection = intersectLongitude(ray, angle, positiveNormal);
- vec4 farSide = vec4(normalize(ray.dir), INF_HIT);
-
- bool hitFront = (intersection.w > 0.0) == (dot(ray.pos.xy, intersection.xy) > 0.0);
- if (!hitFront) {
- return RayShapeIntersection(intersection, farSide);
- } else {
- return RayShapeIntersection(-1.0 * farSide, intersection);
- }
- }
-
- void intersectFlippedWedge(in Ray ray, in vec2 minMaxAngle, out RayShapeIntersection intersections[2])
- {
- intersections[0] = transformNormalsToEC(intersectHalfSpace(ray, minMaxAngle.x, false));
- intersections[1] = transformNormalsToEC(intersectHalfSpace(ray, minMaxAngle.y, true));
- }
-
- bool hitPositiveHalfPlane(in Ray ray, in vec4 intersection, in bool positiveNormal) {
- float normalSign = positiveNormal ? 1.0 : -1.0;
- vec2 planeDirection = vec2(intersection.y, -intersection.x) * normalSign;
- vec2 hit = ray.pos.xy + intersection.w * ray.dir.xy;
- return dot(hit, planeDirection) > 0.0;
- }
-
- void intersectHalfPlane(in Ray ray, in float angle, out RayShapeIntersection intersections[2]) {
- vec4 intersection = intersectLongitude(ray, angle, true);
- vec4 farSide = vec4(normalize(ray.dir), INF_HIT);
- bool hitPositiveSide = hitPositiveHalfPlane(ray, intersection, true);
-
- farSide = transformNormalToEC(farSide);
-
- if (hitPositiveSide) {
- intersection = transformNormalToEC(intersection);
- intersections[0].entry = -1.0 * farSide;
- intersections[0].exit = vec4(-1.0 * intersection.xyz, intersection.w);
- intersections[1].entry = intersection;
- intersections[1].exit = farSide;
- } else {
- vec4 miss = vec4(normalize(czm_normal * ray.dir), NO_HIT);
- intersections[0].entry = -1.0 * farSide;
- intersections[0].exit = farSide;
- intersections[1].entry = miss;
- intersections[1].exit = miss;
- }
- }
-
- RayShapeIntersection intersectRegularWedge(in Ray ray, in vec2 minMaxAngle)
- {
- // Note: works for maxAngle > minAngle + pi, where the "regular wedge"
- // is actually a negative volume.
- // Compute intersections with the two planes.
- // Normals will point toward the "outside" (negative space)
- vec4 intersect1 = intersectLongitude(ray, minMaxAngle.x, false);
- vec4 intersect2 = intersectLongitude(ray, minMaxAngle.y, true);
-
- // Choose intersection with smallest T as the "first", the other as "last"
- // Note: first or last could be in the "shadow" wedge, beyond the tip
- bool inOrder = intersect1.w <= intersect2.w;
- vec4 first = inOrder ? intersect1 : intersect2;
- vec4 last = inOrder ? intersect2 : intersect1;
-
- bool firstIsAhead = first.w >= 0.0;
- bool startedInsideFirst = dot(ray.pos.xy, first.xy) < 0.0;
- bool exitFromInside = firstIsAhead == startedInsideFirst;
- bool lastIsAhead = last.w > 0.0;
- bool startedOutsideLast = dot(ray.pos.xy, last.xy) >= 0.0;
- bool enterFromOutside = lastIsAhead == startedOutsideLast;
-
- vec4 farSide = vec4(normalize(ray.dir), INF_HIT);
- vec4 miss = vec4(normalize(ray.dir), NO_HIT);
-
- if (exitFromInside && enterFromOutside) {
- // Ray crosses both faces of negative wedge, exiting then entering the positive shape
- return transformNormalsToEC(RayShapeIntersection(first, last));
- } else if (!exitFromInside && enterFromOutside) {
- // Ray starts inside wedge. last is in shadow wedge, and first is actually the entry
- return transformNormalsToEC(RayShapeIntersection(-1.0 * farSide, first));
- } else if (exitFromInside && !enterFromOutside) {
- // First intersection was in the shadow wedge, so last is actually the exit
- return transformNormalsToEC(RayShapeIntersection(last, farSide));
- } else { // !exitFromInside && !enterFromOutside
- // Both intersections were in the shadow wedge
- return transformNormalsToEC(RayShapeIntersection(miss, miss));
- }
- }
- `;var iU=`// See IntersectionUtils.glsl for the definitions of Ray, RayShapeIntersection,
- // NO_HIT, Intersections
-
- /* Box defines (set in Scene/VoxelBoxShape.js)
- #define BOX_INTERSECTION_INDEX ### // always 0
- */
-
- uniform sampler2D u_renderBoundPlanesTexture;
-
- RayShapeIntersection intersectBoundPlanes(in Ray ray) {
- vec4 lastEntry = vec4(ray.dir, -INF_HIT);
- vec4 firstExit = vec4(-ray.dir, +INF_HIT);
- for (int i = 0; i < 6; i++) {
- vec4 boundPlane = getBoundPlane(u_renderBoundPlanesTexture, i);
- vec4 intersection = intersectPlane(ray, boundPlane);
- if (dot(ray.dir, boundPlane.xyz) < 0.0) {
- lastEntry = intersection.w > lastEntry.w ? intersection : lastEntry;
- } else {
- firstExit = intersection.w < firstExit.w ? intersection: firstExit;
- }
- }
-
- if (lastEntry.w < firstExit.w) {
- return RayShapeIntersection(lastEntry, firstExit);
- } else {
- return RayShapeIntersection(vec4(-ray.dir, NO_HIT), vec4(ray.dir, NO_HIT));
- }
- }
-
- void intersectShape(in Ray rayUV, in Ray rayEC, inout Intersections ix)
- {
- RayShapeIntersection intersection = intersectBoundPlanes(rayEC);
- setShapeIntersection(ix, BOX_INTERSECTION_INDEX, intersection);
- }
- `;var oU=`// See IntersectionUtils.glsl for the definitions of Ray, NO_HIT, Intersections,
- // RayShapeIntersection, setSurfaceIntersection, setShapeIntersection,
- // intersectIntersections
- // See IntersectLongitude.glsl for the definitions of intersectHalfPlane,
- // intersectFlippedWedge, intersectRegularWedge
-
- /* Cylinder defines (set in Scene/VoxelCylinderShape.js)
- #define CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MIN
- #define CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT
- #define CYLINDER_HAS_RENDER_BOUNDS_ANGLE
- #define CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_UNDER_HALF
- #define CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_OVER_HALF
- #define CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_EQUAL_ZERO
-
- #define CYLINDER_INTERSECTION_INDEX_RADIUS_MAX
- #define CYLINDER_INTERSECTION_INDEX_RADIUS_MIN
- #define CYLINDER_INTERSECTION_INDEX_ANGLE
- */
-
- // Cylinder uniforms
- uniform vec2 u_cylinderRenderRadiusMinMax;
- #if defined(CYLINDER_HAS_RENDER_BOUNDS_ANGLE)
- uniform vec2 u_cylinderRenderAngleMinMax;
- #endif
-
- uniform sampler2D u_renderBoundPlanesTexture;
-
- RayShapeIntersection intersectBoundPlanes(in Ray ray) {
- vec4 lastEntry = vec4(ray.dir, -INF_HIT);
- vec4 firstExit = vec4(-ray.dir, +INF_HIT);
- for (int i = 0; i < 2; i++) {
- vec4 boundPlane = getBoundPlane(u_renderBoundPlanesTexture, i);
- vec4 intersection = intersectPlane(ray, boundPlane);
- if (dot(ray.dir, boundPlane.xyz) < 0.0) {
- lastEntry = intersection.w > lastEntry.w ? intersection : lastEntry;
- } else {
- firstExit = intersection.w < firstExit.w ? intersection: firstExit;
- }
- }
-
- if (lastEntry.w < firstExit.w) {
- return RayShapeIntersection(lastEntry, firstExit);
- } else {
- return RayShapeIntersection(vec4(-ray.dir, NO_HIT), vec4(ray.dir, NO_HIT));
- }
- }
-
- /**
- * Find the intersection of a ray with a right cylindrical surface of a given radius
- * about the z-axis.
- */
- RayShapeIntersection intersectCylinder(in Ray ray, in float radius, in bool convex)
- {
- vec2 position = ray.pos.xy;
- vec2 direction = ray.dir.xy;
-
- float a = dot(direction, direction);
- float b = dot(position, direction);
- float c = dot(position, position) - radius * radius;
- float determinant = b * b - a * c;
-
- if (determinant < 0.0) {
- vec4 miss = vec4(normalize(ray.dir), NO_HIT);
- return RayShapeIntersection(miss, miss);
- }
-
- determinant = sqrt(determinant);
- float t1 = (-b - determinant) / a;
- float t2 = (-b + determinant) / a;
- float signFlip = convex ? 1.0 : -1.0;
- vec3 normal1 = vec3((position + t1 * direction) * signFlip, 0.0);
- vec3 normal2 = vec3((position + t2 * direction) * signFlip, 0.0);
- // Return normals in eye coordinates
- vec4 intersect1 = vec4(normalize(czm_normal * normal1), t1);
- vec4 intersect2 = vec4(normalize(czm_normal * normal2), t2);
-
- return RayShapeIntersection(intersect1, intersect2);
- }
-
- /**
- * Find the intersection of a ray with a right cylindrical solid of given
- * radius and height bounds. NOTE: The shape is assumed to be convex.
- */
- RayShapeIntersection intersectBoundedCylinder(in Ray ray, in Ray rayEC, in float radius)
- {
- RayShapeIntersection cylinderIntersection = intersectCylinder(ray, radius, true);
- RayShapeIntersection heightBoundsIntersection = intersectBoundPlanes(rayEC);
- return intersectIntersections(ray, cylinderIntersection, heightBoundsIntersection);
- }
-
- void intersectShape(in Ray ray, in Ray rayEC, inout Intersections ix)
- {
- RayShapeIntersection outerIntersect = intersectBoundedCylinder(ray, rayEC, u_cylinderRenderRadiusMinMax.y);
-
- setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_RADIUS_MAX, outerIntersect);
-
- if (outerIntersect.entry.w == NO_HIT) {
- return;
- }
-
- #if defined(CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT)
- // When the cylinder is perfectly thin it's necessary to sandwich the
- // inner cylinder intersection inside the outer cylinder intersection.
-
- // Without this special case,
- // [outerMin, outerMax, innerMin, innerMax] will bubble sort to
- // [outerMin, innerMin, outerMax, innerMax] which will cause the back
- // side of the cylinder to be invisible because it will think the ray
- // is still inside the inner (negative) cylinder after exiting the
- // outer (positive) cylinder.
-
- // With this special case,
- // [outerMin, innerMin, innerMax, outerMax] will bubble sort to
- // [outerMin, innerMin, innerMax, outerMax] which will work correctly.
-
- // Note: If initializeIntersections() changes its sorting function
- // from bubble sort to something else, this code may need to change.
- RayShapeIntersection innerIntersect = intersectCylinder(ray, 1.0, false);
- setSurfaceIntersection(ix, 0, outerIntersect.entry, true, true); // positive, enter
- setSurfaceIntersection(ix, 1, innerIntersect.entry, false, true); // negative, enter
- setSurfaceIntersection(ix, 2, innerIntersect.exit, false, false); // negative, exit
- setSurfaceIntersection(ix, 3, outerIntersect.exit, true, false); // positive, exit
- #elif defined(CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MIN)
- RayShapeIntersection innerIntersect = intersectCylinder(ray, u_cylinderRenderRadiusMinMax.x, false);
- setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_RADIUS_MIN, innerIntersect);
- #endif
-
- #if defined(CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_UNDER_HALF)
- RayShapeIntersection wedgeIntersect = intersectRegularWedge(ray, u_cylinderRenderAngleMinMax);
- setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE, wedgeIntersect);
- #elif defined(CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_OVER_HALF)
- RayShapeIntersection wedgeIntersects[2];
- intersectFlippedWedge(ray, u_cylinderRenderAngleMinMax, wedgeIntersects);
- setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE + 0, wedgeIntersects[0]);
- setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE + 1, wedgeIntersects[1]);
- #elif defined(CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_EQUAL_ZERO)
- RayShapeIntersection wedgeIntersects[2];
- intersectHalfPlane(ray, u_cylinderRenderAngleMinMax.x, wedgeIntersects);
- setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE + 0, wedgeIntersects[0]);
- setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE + 1, wedgeIntersects[1]);
- #endif
- }
- `;var rU=`// See IntersectionUtils.glsl for the definitions of Ray, NO_HIT, INF_HIT, Intersections,
- // RayShapeIntersection, setSurfaceIntersection, setShapeIntersection
- // See IntersectLongitude.glsl for the definitions of intersectHalfPlane,
- // intersectFlippedWedge, intersectRegularWedge
-
- /* Ellipsoid defines (set in Scene/VoxelEllipsoidShape.js)
- #define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE
- #define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO
- #define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_UNDER_HALF
- #define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_OVER_HALF
- #define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF
- #define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_EQUAL_HALF
- #define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_OVER_HALF
- #define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF
- #define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_EQUAL_HALF
- #define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_OVER_HALF
- #define ELLIPSOID_INTERSECTION_INDEX_LONGITUDE
- #define ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX
- #define ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN
- #define ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MAX
- #define ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MIN
- */
-
- #if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE)
- uniform vec2 u_ellipsoidRenderLongitudeMinMax;
- #endif
- uniform float u_eccentricitySquared;
- uniform vec2 u_ellipsoidRenderLatitudeSinMinMax;
- uniform vec2 u_clipMinMaxHeight; // Values are negative: clipHeight - maxShapeHeight
-
- RayShapeIntersection intersectZPlane(in Ray ray, in float z) {
- float t = -ray.pos.z / ray.dir.z;
-
- bool startsOutside = sign(ray.pos.z) == sign(z);
- bool entry = (t >= 0.0) != startsOutside;
-
- vec4 intersect = vec4(0.0, 0.0, z, t);
- vec4 farSide = vec4(normalize(ray.dir), INF_HIT);
-
- if (entry) {
- return RayShapeIntersection(intersect, farSide);
- } else {
- return RayShapeIntersection(-1.0 * farSide, intersect);
- }
- }
-
- RayShapeIntersection intersectHeight(in Ray ray, in float height, in bool convex)
- {
- // Scale the ray by the ellipsoid axes to make it a unit sphere
- // Note: approximating ellipsoid + height as an ellipsoid
- vec3 radiiCorrection = vec3(1.0) / (u_ellipsoidRadii + height);
- vec3 position = ray.pos * radiiCorrection;
- vec3 direction = ray.dir * radiiCorrection;
-
- float a = dot(direction, direction); // ~ 1.0 (or maybe 4.0 if ray is scaled)
- float b = dot(direction, position); // roughly inside [-1.0, 1.0] when zoomed in
- float c = dot(position, position) - 1.0; // ~ 0.0 when zoomed in.
- float determinant = b * b - a * c; // ~ b * b when zoomed in
-
- if (determinant < 0.0) {
- vec4 miss = vec4(normalize(direction), NO_HIT);
- return RayShapeIntersection(miss, miss);
- }
-
- determinant = sqrt(determinant);
-
- // Compute larger root using standard formula
- float signB = b < 0.0 ? -1.0 : 1.0;
- // The other root may suffer from subtractive cancellation in the standard formula.
- // Compute it from the first root instead.
- float t1 = (-b - signB * determinant) / a;
- float t2 = c / (a * t1);
- float tmin = min(t1, t2);
- float tmax = max(t1, t2);
-
- float directionScale = convex ? 1.0 : -1.0;
- vec3 d1 = directionScale * (position + tmin * direction);
- vec3 d2 = directionScale * (position + tmax * direction);
-
- // Return normals in eye coordinates. Use spherical approximation for the normal.
- vec3 normal1 = normalize(czm_normal * d1);
- vec3 normal2 = normalize(czm_normal * d2);
-
- return RayShapeIntersection(vec4(normal1, tmin), vec4(normal2, tmax));
- }
-
- /**
- * Given a circular cone around the z-axis, with apex at the origin,
- * find the parametric distance(s) along a ray where that ray intersects
- * the cone.
- * The cone opening angle is described by the squared cosine of
- * its half-angle (the angle between the Z-axis and the surface)
- */
- vec2 intersectDoubleEndedCone(in Ray ray, in float cosSqrHalfAngle)
- {
- vec3 o = ray.pos;
- vec3 d = ray.dir;
- float sinSqrHalfAngle = 1.0 - cosSqrHalfAngle;
-
- float aSin = d.z * d.z * sinSqrHalfAngle;
- float aCos = -dot(d.xy, d.xy) * cosSqrHalfAngle;
- float a = aSin + aCos;
-
- float bSin = d.z * o.z * sinSqrHalfAngle;
- float bCos = -dot(o.xy, d.xy) * cosSqrHalfAngle;
- float b = bSin + bCos;
-
- float cSin = o.z * o.z * sinSqrHalfAngle;
- float cCos = -dot(o.xy, o.xy) * cosSqrHalfAngle;
- float c = cSin + cCos;
- // determinant = b * b - a * c. But bSin * bSin = aSin * cSin.
- // Avoid subtractive cancellation by expanding to eliminate these terms
- float determinant = 2.0 * bSin * bCos + bCos * bCos - aSin * cCos - aCos * cSin - aCos * cCos;
-
- if (determinant < 0.0) {
- return vec2(NO_HIT);
- } else if (a == 0.0) {
- // Ray is parallel to cone surface
- return (b == 0.0)
- ? vec2(NO_HIT) // Ray is on cone surface
- : vec2(-0.5 * c / b, NO_HIT);
- }
-
- determinant = sqrt(determinant);
-
- // Compute larger root using standard formula
- float signB = b < 0.0 ? -1.0 : 1.0;
- float t1 = (-b - signB * determinant) / a;
- // The other root may suffer from subtractive cancellation in the standard formula.
- // Compute it from the first root instead.
- float t2 = c / (a * t1);
- float tmin = min(t1, t2);
- float tmax = max(t1, t2);
- return vec2(tmin, tmax);
- }
-
- /**
- * Given a point on a conical surface, find the surface normal at that point.
- */
- vec3 getConeNormal(in vec3 p, in bool convex) {
- // Start with radial component pointing toward z-axis
- vec2 radial = -abs(p.z) * normalize(p.xy);
- // Z component points toward opening of cone
- float zSign = (p.z < 0.0) ? -1.0 : 1.0;
- float z = length(p.xy) * zSign;
- // Flip normal if shape is convex
- float flip = (convex) ? -1.0 : 1.0;
- return normalize(vec3(radial, z) * flip);
- }
-
- /**
- * Compute the shift between the ellipsoid origin and the apex of a cone of latitude
- */
- float getLatitudeConeShift(in float sinLatitude) {
- // Find prime vertical radius of curvature:
- // the distance along the ellipsoid normal to the intersection with the z-axis
- float x2 = u_eccentricitySquared * sinLatitude * sinLatitude;
- float primeVerticalRadius = u_ellipsoidRadii.x * inversesqrt(1.0 - x2);
-
- // Compute a shift from the origin to the intersection of the cone with the z-axis
- return primeVerticalRadius * u_eccentricitySquared * sinLatitude;
- }
-
- void intersectFlippedCone(in Ray ray, in float cosHalfAngle, out RayShapeIntersection intersections[2]) {
- // Shift the ray to account for the latitude cone not being centered at the Earth center
- ray.pos.z += getLatitudeConeShift(cosHalfAngle);
-
- float cosSqrHalfAngle = cosHalfAngle * cosHalfAngle;
- vec2 intersect = intersectDoubleEndedCone(ray, cosSqrHalfAngle);
-
- vec4 miss = vec4(normalize(ray.dir), NO_HIT);
- vec4 farSide = vec4(normalize(ray.dir), INF_HIT);
-
- // Initialize output with no intersections
- intersections[0].entry = -1.0 * farSide;
- intersections[0].exit = farSide;
- intersections[1].entry = miss;
- intersections[1].exit = miss;
-
- if (intersect.x == NO_HIT) {
- return;
- }
-
- // Find the points of intersection
- float tmin = intersect.x;
- float tmax = intersect.y;
- vec3 p0 = ray.pos + tmin * ray.dir;
- vec3 p1 = ray.pos + tmax * ray.dir;
-
- vec4 intersect0 = vec4(getConeNormal(p0, true), tmin);
- vec4 intersect1 = vec4(getConeNormal(p1, true), tmax);
-
- bool p0InShadowCone = sign(p0.z) != sign(cosHalfAngle);
- bool p1InShadowCone = sign(p1.z) != sign(cosHalfAngle);
-
- if (p0InShadowCone && p1InShadowCone) {
- // no valid intersections
- } else if (p0InShadowCone) {
- intersections[0].exit = intersect1;
- } else if (p1InShadowCone) {
- intersections[0].entry = intersect0;
- } else {
- intersections[0].exit = intersect0;
- intersections[1].entry = intersect1;
- intersections[1].exit = farSide;
- }
- }
-
- RayShapeIntersection intersectRegularCone(in Ray ray, in float cosHalfAngle, in bool convex) {
- // Shift the ray to account for the latitude cone not being centered at the Earth center
- ray.pos.z += getLatitudeConeShift(cosHalfAngle);
-
- float cosSqrHalfAngle = cosHalfAngle * cosHalfAngle;
- vec2 intersect = intersectDoubleEndedCone(ray, cosSqrHalfAngle);
-
- vec4 miss = vec4(normalize(ray.dir), NO_HIT);
- vec4 farSide = vec4(normalize(ray.dir), INF_HIT);
-
- if (intersect.x == NO_HIT) {
- return RayShapeIntersection(miss, miss);
- }
-
- // Find the points of intersection
- float tmin = intersect.x;
- float tmax = intersect.y;
- vec3 p0 = ray.pos + tmin * ray.dir;
- vec3 p1 = ray.pos + tmax * ray.dir;
-
- vec4 intersect0 = vec4(getConeNormal(p0, convex), tmin);
- vec4 intersect1 = vec4(getConeNormal(p1, convex), tmax);
-
- bool p0InShadowCone = sign(p0.z) != sign(cosHalfAngle);
- bool p1InShadowCone = sign(p1.z) != sign(cosHalfAngle);
-
- if (p0InShadowCone && p1InShadowCone) {
- return RayShapeIntersection(miss, miss);
- } else if (p0InShadowCone) {
- return RayShapeIntersection(intersect1, farSide);
- } else if (p1InShadowCone) {
- return RayShapeIntersection(-1.0 * farSide, intersect0);
- } else {
- return RayShapeIntersection(intersect0, intersect1);
- }
- }
-
- void intersectShape(in Ray ray, in Ray rayEC, inout Intersections ix) { // Outer ellipsoid
- RayShapeIntersection outerIntersect = intersectHeight(ray, u_clipMinMaxHeight.y, true);
- setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MAX, outerIntersect);
-
- // Exit early if the outer ellipsoid was missed.
- if (outerIntersect.entry.w == NO_HIT) {
- return;
- }
-
- // Inner ellipsoid
- RayShapeIntersection innerIntersect = intersectHeight(ray, u_clipMinMaxHeight.x, false);
-
- if (innerIntersect.entry.w == NO_HIT) {
- setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MIN, innerIntersect);
- } else {
- // When the ellipsoid is large and thin it's possible for floating point math
- // to cause the ray to intersect the inner ellipsoid before the outer ellipsoid.
- // To prevent this from happening, clamp innerIntersect to outerIntersect and
- // sandwich the inner ellipsoid intersection inside the outer ellipsoid intersection.
-
- // Without this special case,
- // [outerMin, outerMax, innerMin, innerMax] will bubble sort to
- // [outerMin, innerMin, outerMax, innerMax] which will cause the back
- // side of the ellipsoid to be invisible because it will think the ray
- // is still inside the inner (negative) ellipsoid after exiting the
- // outer (positive) ellipsoid.
-
- // With this special case,
- // [outerMin, innerMin, innerMax, outerMax] will bubble sort to
- // [outerMin, innerMin, innerMax, outerMax] which will work correctly.
-
- // Note: If initializeIntersections() changes its sorting function
- // from bubble sort to something else, this code may need to change.
- innerIntersect.entry.w = max(innerIntersect.entry.w, outerIntersect.entry.w);
- innerIntersect.exit.w = min(innerIntersect.exit.w, outerIntersect.exit.w);
- setSurfaceIntersection(ix, 0, outerIntersect.entry, true, true); // positive, enter
- setSurfaceIntersection(ix, 1, innerIntersect.entry, false, true); // negative, enter
- setSurfaceIntersection(ix, 2, innerIntersect.exit, false, false); // negative, exit
- setSurfaceIntersection(ix, 3, outerIntersect.exit, true, false); // positive, exit
- }
-
- // Bottom cone
- #if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF)
- RayShapeIntersection bottomConeIntersection = intersectRegularCone(ray, u_ellipsoidRenderLatitudeSinMinMax.x, false);
- setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN, bottomConeIntersection);
- #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_EQUAL_HALF)
- RayShapeIntersection bottomConeIntersection = intersectZPlane(ray, -1.0);
- setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN, bottomConeIntersection);
- #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_OVER_HALF)
- RayShapeIntersection bottomConeIntersections[2];
- intersectFlippedCone(ray, u_ellipsoidRenderLatitudeSinMinMax.x, bottomConeIntersections);
- setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN + 0, bottomConeIntersections[0]);
- setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN + 1, bottomConeIntersections[1]);
- #endif
-
- // Top cone
- #if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF)
- RayShapeIntersection topConeIntersections[2];
- intersectFlippedCone(ray, u_ellipsoidRenderLatitudeSinMinMax.y, topConeIntersections);
- setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX + 0, topConeIntersections[0]);
- setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX + 1, topConeIntersections[1]);
- #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_EQUAL_HALF)
- RayShapeIntersection topConeIntersection = intersectZPlane(ray, 1.0);
- setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX, topConeIntersection);
- #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_OVER_HALF)
- RayShapeIntersection topConeIntersection = intersectRegularCone(ray, u_ellipsoidRenderLatitudeSinMinMax.y, false);
- setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX, topConeIntersection);
- #endif
-
- // Wedge
- #if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO)
- RayShapeIntersection wedgeIntersects[2];
- intersectHalfPlane(ray, u_ellipsoidRenderLongitudeMinMax.x, wedgeIntersects);
- setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE + 0, wedgeIntersects[0]);
- setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE + 1, wedgeIntersects[1]);
- #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_UNDER_HALF)
- RayShapeIntersection wedgeIntersect = intersectRegularWedge(ray, u_ellipsoidRenderLongitudeMinMax);
- setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE, wedgeIntersect);
- #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_OVER_HALF)
- RayShapeIntersection wedgeIntersects[2];
- intersectFlippedWedge(ray, u_ellipsoidRenderLongitudeMinMax, wedgeIntersects);
- setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE + 0, wedgeIntersects[0]);
- setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE + 1, wedgeIntersects[1]);
- #endif
- }
- `;var DT=`// Main intersection function for Voxel scenes.
- // See IntersectBox.glsl, IntersectCylinder.glsl, or IntersectEllipsoid.glsl
- // for the definition of intersectShape. The appropriate function is selected
- // based on the VoxelPrimitive shape type, and added to the shader in
- // Scene/VoxelRenderResources.js.
- // See also IntersectClippingPlane.glsl and IntersectDepth.glsl.
- // See IntersectionUtils.glsl for the definitions of Ray, NO_HIT,
- // getFirstIntersection, initializeIntersections, nextIntersection.
-
- /* Intersection defines (set in Scene/VoxelRenderResources.js)
- #define INTERSECTION_COUNT ###
- */
-
- RayShapeIntersection intersectScene(in vec2 screenCoord, in Ray ray, in Ray rayEC, out Intersections ix) {
- // Do a ray-shape intersection to find the exact starting and ending points.
- intersectShape(ray, rayEC, ix);
-
- // Exit early if the positive shape was completely missed or behind the ray.
- RayShapeIntersection intersection = getFirstIntersection(ix);
- if (intersection.entry.w == NO_HIT) {
- // Positive shape was completely missed - so exit early.
- return intersection;
- }
-
- // Clipping planes
- #if defined(CLIPPING_PLANES)
- intersectClippingPlanes(ray, ix);
- #endif
-
- // Depth
- intersectDepth(screenCoord, rayEC, ix);
-
- // Find the first intersection that's in front of the ray
- #if (INTERSECTION_COUNT > 1)
- initializeIntersections(ix);
- for (int i = 0; i < INTERSECTION_COUNT; ++i) {
- intersection = nextIntersection(ix);
- if (intersection.exit.w > 0.0) {
- // Set start to 0.0 when ray is inside the shape.
- intersection.entry.w = max(intersection.entry.w, 0.0);
- break;
- }
- }
- #else
- // Set start to 0.0 when ray is inside the shape.
- intersection.entry.w = max(intersection.entry.w, 0.0);
- #endif
-
- return intersection;
- }
- `;var aU=`uniform vec3 u_boxLocalToShapeUvScale;
-
- uniform ivec4 u_cameraTileCoordinates;
- uniform vec3 u_cameraTileUv;
- uniform mat3 u_boxEcToXyz;
-
- mat3 convertLocalToShapeSpaceDerivative(in vec3 positionLocal) {
- // For BOX, local space = shape space, so the Jacobian is the identity matrix.
- return mat3(1.0);
- }
-
- vec3 scaleShapeUvToShapeSpace(in vec3 shapeUv) {
- return shapeUv / u_boxLocalToShapeUvScale;
- }
-
- vec3 convertEcToDeltaTile(in vec3 positionEC) {
- vec3 dPosition = u_boxEcToXyz * positionEC;
- return u_boxLocalToShapeUvScale * dPosition * float(1 << u_cameraTileCoordinates.w);
- }
-
- TileAndUvCoordinate getTileAndUvCoordinate(in vec3 positionEC) {
- vec3 deltaTileCoordinate = convertEcToDeltaTile(positionEC);
- vec3 tileUvSum = u_cameraTileUv + deltaTileCoordinate;
- ivec3 tileCoordinate = u_cameraTileCoordinates.xyz + ivec3(floor(tileUvSum));
- tileCoordinate = min(max(ivec3(0), tileCoordinate), ivec3((1 << u_cameraTileCoordinates.w) - 1));
- ivec3 tileCoordinateChange = tileCoordinate - u_cameraTileCoordinates.xyz;
- vec3 tileUv = clamp(tileUvSum - vec3(tileCoordinateChange), 0.0, 1.0);
- return TileAndUvCoordinate(ivec4(tileCoordinate, u_cameraTileCoordinates.w), tileUv);
- }
- `;var sU=`uniform vec3 u_cylinderLocalToShapeUvScale; // x = radius scale, y = angle scale, z = height scale
- uniform float u_cylinderShapeUvAngleRangeOrigin;
- uniform mat3 u_cylinderEcToRadialTangentUp;
- uniform ivec4 u_cameraTileCoordinates;
- uniform vec3 u_cameraTileUv;
- uniform vec3 u_cameraShapePosition; // (radial distance, angle, height) of camera in shape space
-
- mat3 convertLocalToShapeSpaceDerivative(in vec3 position) {
- vec3 radial = normalize(vec3(position.xy, 0.0));
- vec3 z = vec3(0.0, 0.0, 1.0);
- vec3 east = normalize(vec3(-position.y, position.x, 0.0));
- return mat3(radial, east / length(position.xy), z);
- }
-
- vec3 scaleShapeUvToShapeSpace(in vec3 shapeUv) {
- float radius = shapeUv.x / u_cylinderLocalToShapeUvScale.x;
- float angle = shapeUv.y * czm_twoPi / u_cylinderLocalToShapeUvScale.y;
- float height = shapeUv.z / u_cylinderLocalToShapeUvScale.z;
-
- return vec3(radius, angle, height);
- }
-
- /**
- * Computes the change in polar coordinates given a change in position.
- * @param {vec2} dPosition The change in position in Cartesian coordinates.
- * @param {float} cameraRadialDistance The radial distance of the camera from the origin.
- * @return {vec2} The change in polar coordinates (radial distance, angle).
- */
- vec2 computePolarChange(in vec2 dPosition, in float cameraRadialDistance) {
- float dAngle = atan(dPosition.y, cameraRadialDistance + dPosition.x);
- // Find the direction of the radial axis at the output angle, in Cartesian coordinates
- vec2 outputRadialAxis = vec2(cos(dAngle), sin(dAngle));
- float sinHalfAngle = sin(dAngle / 2.0);
- float versine = 2.0 * sinHalfAngle * sinHalfAngle;
- float dRadial = dot(dPosition, outputRadialAxis) - cameraRadialDistance * versine;
- return vec2(dRadial, dAngle);
- }
-
- vec3 convertEcToDeltaShape(in vec3 positionEC) {
- // 1. Rotate to radial, tangent, and up coordinates
- vec3 rtu = u_cylinderEcToRadialTangentUp * positionEC;
- // 2. Compute change in angular and radial coordinates.
- vec2 dPolar = computePolarChange(rtu.xy, u_cameraShapePosition.x);
- return vec3(dPolar.xy, rtu.z);
- }
-
- vec3 convertEcToDeltaTile(in vec3 positionEC) {
- vec3 deltaShape = convertEcToDeltaShape(positionEC);
- // Convert to tileset coordinates in [0, 1]
- float dx = u_cylinderLocalToShapeUvScale.x * deltaShape.x;
- float dy = deltaShape.y / czm_twoPi;
- #if defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE)
- // Wrap to ensure dy is not crossing through the unoccupied angle range, where
- // angle to tile coordinate conversions would be more complicated
- float cameraUvAngle = (u_cameraShapePosition.y + czm_pi) / czm_twoPi;
- float cameraUvAngleShift = fract(cameraUvAngle - u_cylinderShapeUvAngleRangeOrigin);
- float rawOutputUvAngle = cameraUvAngleShift + dy;
- float rotation = floor(rawOutputUvAngle);
- dy -= rotation;
- #endif
- dy *= u_cylinderLocalToShapeUvScale.y;
- float dz = u_cylinderLocalToShapeUvScale.z * deltaShape.z;
- // Convert to tile coordinate changes
- return vec3(dx, dy, dz) * float(1 << u_cameraTileCoordinates.w);
- }
-
- TileAndUvCoordinate getTileAndUvCoordinate(in vec3 positionEC) {
- vec3 deltaTileCoordinate = convertEcToDeltaTile(positionEC);
- vec3 tileUvSum = u_cameraTileUv + deltaTileCoordinate;
- ivec3 tileCoordinate = u_cameraTileCoordinates.xyz + ivec3(floor(tileUvSum));
- int maxTileCoordinate = (1 << u_cameraTileCoordinates.w) - 1;
- tileCoordinate.x = min(max(0, tileCoordinate.x), maxTileCoordinate);
- tileCoordinate.z = min(max(0, tileCoordinate.z), maxTileCoordinate);
- #if (!defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE))
- ivec3 tileCoordinateChange = tileCoordinate - u_cameraTileCoordinates.xyz;
- if (tileCoordinate.y < 0) {
- tileCoordinate.y += (maxTileCoordinate + 1);
- } else if (tileCoordinate.y > maxTileCoordinate) {
- tileCoordinate.y -= (maxTileCoordinate + 1);
- }
- #else
- tileCoordinate.y = min(max(0, tileCoordinate.y), maxTileCoordinate);
- ivec3 tileCoordinateChange = tileCoordinate - u_cameraTileCoordinates.xyz;
- #endif
- vec3 tileUv = tileUvSum - vec3(tileCoordinateChange);
- tileUv.x = clamp(tileUv.x, 0.0, 1.0);
- #if (!defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE))
- // If there is only one tile spanning 2*PI angle, the coordinate wraps around
- tileUv.y = (u_cameraTileCoordinates.w == 0) ? fract(tileUv.y) : clamp(tileUv.y, 0.0, 1.0);
- #else
- tileUv.y = clamp(tileUv.y, 0.0, 1.0);
- #endif
- tileUv.z = clamp(tileUv.z, 0.0, 1.0);
- return TileAndUvCoordinate(ivec4(tileCoordinate, u_cameraTileCoordinates.w), tileUv);
- }
- `;var cU=`/* Ellipsoid defines (set in Scene/VoxelEllipsoidShape.js)
- #define ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE
- #define ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE
- */
-
- uniform vec3 u_cameraPositionCartographic; // (longitude, latitude, height) in radians and meters
- uniform vec2 u_ellipsoidCurvatureAtLatitude;
- uniform mat3 u_ellipsoidEcToEastNorthUp;
- uniform vec3 u_ellipsoidRadii;
- uniform vec2 u_evoluteScale; // (radii.x ^ 2 - radii.z ^ 2) * vec2(1.0, -1.0) / radii;
- uniform vec3 u_ellipsoidInverseRadiiSquared;
- #if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE)
- uniform float u_ellipsoidShapeUvLongitudeRangeOrigin;
- #endif
- uniform vec3 u_ellipsoidLocalToShapeUvScale; // x = longitude scale, y = latitude scale, z = height scale
-
- uniform ivec4 u_cameraTileCoordinates;
- uniform vec3 u_cameraTileUv;
-
- // robust iterative solution without trig functions
- // https://github.com/0xfaded/ellipse_demo/issues/1
- // https://stackoverflow.com/questions/22959698/distance-from-given-point-to-given-ellipse
- // Extended to return radius of curvature along with the point
- vec3 nearestPointAndRadiusOnEllipse(vec2 pos, vec2 radii) {
- vec2 p = abs(pos);
- vec2 inverseRadii = 1.0 / radii;
-
- // We describe the ellipse parametrically: v = radii * vec2(cos(t), sin(t))
- // but store the cos and sin of t in a vec2 for efficiency.
- // Initial guess: t = pi/4
- vec2 tTrigs = vec2(0.7071067811865476);
- // Initial guess of point on ellipsoid
- vec2 v = radii * tTrigs;
- // Center of curvature of the ellipse at v
- vec2 evolute = u_evoluteScale * tTrigs * tTrigs * tTrigs;
-
- const int iterations = 3;
- for (int i = 0; i < iterations; ++i) {
- // Find the (approximate) intersection of p - evolute with the ellipsoid.
- vec2 q = normalize(p - evolute) * length(v - evolute);
- // Update the estimate of t.
- tTrigs = (q + evolute) * inverseRadii;
- tTrigs = normalize(clamp(tTrigs, 0.0, 1.0));
- v = radii * tTrigs;
- evolute = u_evoluteScale * tTrigs * tTrigs * tTrigs;
- }
-
- return vec3(v * sign(pos), length(v - evolute));
- }
-
- mat3 convertLocalToShapeSpaceDerivative(in vec3 position) {
- vec3 east = normalize(vec3(-position.y, position.x, 0.0));
-
- // Convert the 3D position to a 2D position relative to the ellipse (radii.x, radii.z)
- // (assume radii.y == radii.x) and find the nearest point on the ellipse and its normal
- float distanceFromZAxis = length(position.xy);
- vec2 posEllipse = vec2(distanceFromZAxis, position.z);
- vec3 surfacePointAndRadius = nearestPointAndRadiusOnEllipse(posEllipse, u_ellipsoidRadii.xz);
- vec2 surfacePoint = surfacePointAndRadius.xy;
-
- vec2 normal2d = normalize(surfacePoint * u_ellipsoidInverseRadiiSquared.xz);
- vec3 north = vec3(-normal2d.y * normalize(position.xy), abs(normal2d.x));
-
- float heightSign = length(posEllipse) < length(surfacePoint) ? -1.0 : 1.0;
- float height = heightSign * length(posEllipse - surfacePoint);
- vec3 up = normalize(cross(east, north));
-
- return mat3(east / distanceFromZAxis, north / (surfacePointAndRadius.z + height), up);
- }
-
- vec3 scaleShapeUvToShapeSpace(in vec3 shapeUv) {
- // Convert from [0, 1] to radians [-pi, pi]
- float longitude = shapeUv.x * czm_twoPi;
- #if defined (ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE)
- longitude /= u_ellipsoidLocalToShapeUvScale.x;
- #endif
-
- // Convert from [0, 1] to radians [-pi/2, pi/2]
- float latitude = shapeUv.y * czm_pi;
- #if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE)
- latitude /= u_ellipsoidLocalToShapeUvScale.y;
- #endif
-
- float height = shapeUv.z / u_ellipsoidLocalToShapeUvScale.z;
-
- return vec3(longitude, latitude, height);
- }
-
- vec3 convertEcToDeltaShape(in vec3 positionEC) {
- vec3 enu = u_ellipsoidEcToEastNorthUp * positionEC;
-
- // 1. Compute the change in longitude from the camera to the ENU point
- // First project the camera and ENU positions to the equatorial XY plane,
- // positioning the camera on the +x axis, so that enu.x projects along the +y axis
- float cosLatitude = cos(u_cameraPositionCartographic.y);
- float sinLatitude = sin(u_cameraPositionCartographic.y);
- float primeVerticalRadius = 1.0 / u_ellipsoidCurvatureAtLatitude.x;
- vec2 cameraXY = vec2((primeVerticalRadius + u_cameraPositionCartographic.z) * cosLatitude, 0.0);
- // Note precision loss in positionXY.x if length(enu) << length(cameraXY)
- vec2 positionXY = cameraXY + vec2(-enu.y * sinLatitude + enu.z * cosLatitude, enu.x);
- float dLongitude = atan(positionXY.y, positionXY.x);
-
- // 2. Find the longitude component of positionXY, by rotating about Z until the y component is zero.
- // Use the versine to compute the change in x directly from the change in angle:
- // versine(angle) = 2 * sin^2(angle/2)
- float sinHalfLongitude = sin(dLongitude / 2.0);
- float dx = length(positionXY) * 2.0 * sinHalfLongitude * sinHalfLongitude;
- // Rotate longitude component back to ENU North and Up, and remove from enu
- enu += vec3(-enu.x, -dx * sinLatitude, dx * cosLatitude);
-
- // 3. Compute the change in latitude from the camera to the ENU point.
- // First project the camera and ENU positions to the meridional ZX plane,
- // positioning the camera on the +Z axis, so that enu.y maps to the +X axis.
- float meridionalRadius = 1.0 / u_ellipsoidCurvatureAtLatitude.y;
- vec2 cameraZX = vec2(meridionalRadius + u_cameraPositionCartographic.z, 0.0);
- vec2 positionZX = cameraZX + vec2(enu.z, enu.y);
- float dLatitude = atan(positionZX.y, positionZX.x);
-
- // 4. Compute the change in height above the ellipsoid
- // Find the change in enu.z associated with rotating the point to the latitude of the camera
- float sinHalfLatitude = sin(dLatitude / 2.0);
- float dz = length(positionZX) * 2.0 * sinHalfLatitude * sinHalfLatitude;
- // The remaining change in enu.z is the change in height above the ellipsoid
- float dHeight = enu.z + dz;
-
- return vec3(dLongitude, dLatitude, dHeight);
- }
-
- vec3 convertEcToDeltaTile(in vec3 positionEC) {
- vec3 deltaShape = convertEcToDeltaShape(positionEC);
- // Convert to tileset coordinates in [0, 1]
- float dx = deltaShape.x / czm_twoPi;
-
- #if (defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE))
- // Wrap to ensure dx is not crossing through the unoccupied angle range, where
- // angle to tile coordinate conversions would be more complicated
- float cameraUvLongitude = (u_cameraPositionCartographic.x + czm_pi) / czm_twoPi;
- float cameraUvLongitudeShift = fract(cameraUvLongitude - u_ellipsoidShapeUvLongitudeRangeOrigin);
- float rawOutputUvLongitude = cameraUvLongitudeShift + dx;
- float rotation = floor(rawOutputUvLongitude);
- dx -= rotation;
- dx *= u_ellipsoidLocalToShapeUvScale.x;
- #endif
-
- float dy = deltaShape.y / czm_pi;
- #if (defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE))
- dy *= u_ellipsoidLocalToShapeUvScale.y;
- #endif
-
- float dz = u_ellipsoidLocalToShapeUvScale.z * deltaShape.z;
- // Convert to tile coordinate changes
- return vec3(dx, dy, dz) * float(1 << u_cameraTileCoordinates.w);
- }
-
- TileAndUvCoordinate getTileAndUvCoordinate(in vec3 positionEC) {
- vec3 deltaTileCoordinate = convertEcToDeltaTile(positionEC);
- vec3 tileUvSum = u_cameraTileUv + deltaTileCoordinate;
- ivec3 tileCoordinate = u_cameraTileCoordinates.xyz + ivec3(floor(tileUvSum));
- int maxTileCoordinate = (1 << u_cameraTileCoordinates.w) - 1;
- tileCoordinate.y = min(max(0, tileCoordinate.y), maxTileCoordinate);
- tileCoordinate.z = min(max(0, tileCoordinate.z), maxTileCoordinate);
- #if (!defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE))
- ivec3 tileCoordinateChange = tileCoordinate - u_cameraTileCoordinates.xyz;
- if (tileCoordinate.x < 0) {
- tileCoordinate.x += (maxTileCoordinate + 1);
- } else if (tileCoordinate.x > maxTileCoordinate) {
- tileCoordinate.x -= (maxTileCoordinate + 1);
- }
- #else
- tileCoordinate.x = min(max(0, tileCoordinate.x), maxTileCoordinate);
- ivec3 tileCoordinateChange = tileCoordinate - u_cameraTileCoordinates.xyz;
- #endif
- vec3 tileUv = tileUvSum - vec3(tileCoordinateChange);
- #if (!defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE))
- // If there is only one tile spanning 2*PI angle, the coordinate wraps around
- tileUv.x = (u_cameraTileCoordinates.w == 0) ? fract(tileUv.x) : clamp(tileUv.x, 0.0, 1.0);
- #else
- tileUv.x = clamp(tileUv.x, 0.0, 1.0);
- #endif
- tileUv.y = clamp(tileUv.y, 0.0, 1.0);
- tileUv.z = clamp(tileUv.z, 0.0, 1.0);
- return TileAndUvCoordinate(ivec4(tileCoordinate, u_cameraTileCoordinates.w), tileUv);
- }
- `;var lU=`// These octree flags must be in sync with GpuOctreeFlag in VoxelTraversal.js
- #define OCTREE_FLAG_INTERNAL 0
- #define OCTREE_FLAG_LEAF 1
- #define OCTREE_FLAG_PACKED_LEAF_FROM_PARENT 2
-
- #define OCTREE_MAX_LEVELS 32 // Harcoded value because GLSL doesn't like variable length loops
-
- uniform sampler2D u_octreeInternalNodeTexture;
- uniform vec2 u_octreeInternalNodeTexelSizeUv;
- uniform int u_octreeInternalNodeTilesPerRow;
- #if (SAMPLE_COUNT > 1)
- uniform sampler2D u_octreeLeafNodeTexture;
- uniform vec2 u_octreeLeafNodeTexelSizeUv;
- uniform int u_octreeLeafNodeTilesPerRow;
- #endif
- uniform ivec3 u_dimensions; // does not include padding, and is in the z-up orientation
- uniform ivec3 u_inputDimensions; // includes padding, and is in the orientation of the input data
- #if defined(PADDING)
- uniform ivec3 u_paddingBefore;
- #endif
-
- struct OctreeNodeData {
- int data;
- int flag;
- };
-
- struct TraversalData {
- ivec4 octreeCoords;
- int parentOctreeIndex;
- };
-
- struct TileAndUvCoordinate {
- ivec4 tileCoords;
- vec3 tileUv;
- };
-
- struct SampleData {
- int megatextureIndex;
- ivec4 tileCoords;
- vec3 tileUv;
- vec3 inputCoordinate;
- #if (SAMPLE_COUNT > 1)
- float weight;
- #endif
- };
-
- int normU8_toInt(in float value) {
- return int(value * 255.0);
- }
- int normU8x2_toInt(in vec2 value) {
- return int(value.x * 255.0) + 256 * int(value.y * 255.0);
- }
- float normU8x2_toFloat(in vec2 value) {
- return float(normU8x2_toInt(value)) / 65535.0;
- }
-
- OctreeNodeData getOctreeNodeData(in vec2 octreeUv) {
- vec4 texData = texture(u_octreeInternalNodeTexture, octreeUv);
-
- OctreeNodeData data;
- data.data = normU8x2_toInt(texData.xy);
- data.flag = normU8x2_toInt(texData.zw);
- return data;
- }
-
- OctreeNodeData getOctreeChildData(in int parentOctreeIndex, in ivec3 childCoord) {
- int childIndex = childCoord.z * 4 + childCoord.y * 2 + childCoord.x;
- int octreeCoordX = (parentOctreeIndex % u_octreeInternalNodeTilesPerRow) * 9 + 1 + childIndex;
- int octreeCoordY = parentOctreeIndex / u_octreeInternalNodeTilesPerRow;
- vec2 octreeUv = u_octreeInternalNodeTexelSizeUv * vec2(float(octreeCoordX) + 0.5, float(octreeCoordY) + 0.5);
- return getOctreeNodeData(octreeUv);
- }
-
- int getOctreeParentIndex(in int octreeIndex) {
- int octreeCoordX = (octreeIndex % u_octreeInternalNodeTilesPerRow) * 9;
- int octreeCoordY = octreeIndex / u_octreeInternalNodeTilesPerRow;
- vec2 octreeUv = u_octreeInternalNodeTexelSizeUv * vec2(float(octreeCoordX) + 0.5, float(octreeCoordY) + 0.5);
- vec4 parentData = texture(u_octreeInternalNodeTexture, octreeUv);
- int parentOctreeIndex = normU8x2_toInt(parentData.xy);
- return parentOctreeIndex;
- }
-
- vec3 getTileUv(in TileAndUvCoordinate tileAndUv, in ivec4 octreeCoords) {
- int levelDifference = tileAndUv.tileCoords.w - octreeCoords.w;
- float scalar = exp2(-1.0 * float(levelDifference));
- vec3 originShift = vec3(tileAndUv.tileCoords.xyz - (octreeCoords.xyz << levelDifference)) * scalar;
- return tileAndUv.tileUv * scalar + originShift;
- }
-
- vec3 getClampedTileUv(in TileAndUvCoordinate tileAndUv, in ivec4 octreeCoords) {
- vec3 tileUv = getTileUv(tileAndUv, octreeCoords);
- return clamp(tileUv, vec3(0.0), vec3(1.0));
- }
-
- void addSampleCoordinates(in TileAndUvCoordinate tileAndUv, inout SampleData sampleData) {
- vec3 tileUv = getClampedTileUv(tileAndUv, sampleData.tileCoords);
-
- vec3 inputCoordinate = tileUv * vec3(u_dimensions);
- #if defined(PADDING)
- inputCoordinate += vec3(u_paddingBefore);
- #endif
- #if defined(Y_UP_METADATA_ORDER)
- #if defined(SHAPE_BOX)
- float inputY = inputCoordinate.y;
- inputCoordinate.y = inputCoordinate.z;
- // u_inputDimensions.z is the y-up dimension along the 3D Tiles y-axis.
- inputCoordinate.z = float(u_inputDimensions.z) - inputY;
- #elif defined(SHAPE_CYLINDER)
- float angle = inputCoordinate.y;
- float height = inputCoordinate.z;
- #if (!defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE))
- // Account for the different 0-angle convention in glTF vs 3DTiles
- if (sampleData.tileCoords.w == 0) {
- float angleCount = float(u_inputDimensions.z);
- angle = mod(angle + angleCount / 2.0, angleCount);
- }
- #endif
- inputCoordinate.y = height;
- inputCoordinate.z = angle;
- #endif
- #endif
-
- sampleData.tileUv = tileUv;
- sampleData.inputCoordinate = inputCoordinate;
- }
-
- void getOctreeLeafSampleData(in OctreeNodeData data, in ivec4 octreeCoords, out SampleData sampleData) {
- sampleData.megatextureIndex = data.data;
- sampleData.tileCoords = (data.flag == OCTREE_FLAG_PACKED_LEAF_FROM_PARENT)
- ? ivec4(octreeCoords.xyz / 2, octreeCoords.w - 1)
- : octreeCoords;
- }
-
- #if (SAMPLE_COUNT > 1)
- void getOctreeLeafSampleDatas(in OctreeNodeData data, in ivec4 octreeCoords, out SampleData sampleDatas[SAMPLE_COUNT]) {
- int leafIndex = data.data;
- int leafNodeTexelCount = 2;
- // Adding 0.5 moves to the center of the texel
- float leafCoordXStart = float((leafIndex % u_octreeLeafNodeTilesPerRow) * leafNodeTexelCount) + 0.5;
- float leafCoordY = float(leafIndex / u_octreeLeafNodeTilesPerRow) + 0.5;
-
- // Get an interpolation weight and a flag to determine whether to read the parent texture
- vec2 leafUv0 = u_octreeLeafNodeTexelSizeUv * vec2(leafCoordXStart + 0.0, leafCoordY);
- vec4 leafData0 = texture(u_octreeLeafNodeTexture, leafUv0);
- float lerp = normU8x2_toFloat(leafData0.xy);
- sampleDatas[0].weight = 1.0 - lerp;
- sampleDatas[1].weight = lerp;
- // TODO: this looks wrong? Should be comparing to OCTREE_FLAG_PACKED_LEAF_FROM_PARENT
- sampleDatas[0].tileCoords = (normU8_toInt(leafData0.z) == 1)
- ? ivec4(octreeCoords.xyz / 2, octreeCoords.w - 1)
- : octreeCoords;
- sampleDatas[1].tileCoords = (normU8_toInt(leafData0.w) == 1)
- ? ivec4(octreeCoords.xyz / 2, octreeCoords.w - 1)
- : octreeCoords;
-
- // Get megatexture indices for both samples
- vec2 leafUv1 = u_octreeLeafNodeTexelSizeUv * vec2(leafCoordXStart + 1.0, leafCoordY);
- vec4 leafData1 = texture(u_octreeLeafNodeTexture, leafUv1);
- sampleDatas[0].megatextureIndex = normU8x2_toInt(leafData1.xy);
- sampleDatas[1].megatextureIndex = normU8x2_toInt(leafData1.zw);
- }
- #endif
-
- OctreeNodeData traverseOctreeDownwards(in ivec4 tileCoordinate, inout TraversalData traversalData) {
- OctreeNodeData childData;
-
- for (int i = 0; i < OCTREE_MAX_LEVELS; ++i) {
- // tileCoordinate.xyz is defined at the level of detail tileCoordinate.w.
- // Find the corresponding coordinate at the level traversalData.octreeCoords.w
- int level = traversalData.octreeCoords.w + 1;
- int levelDifference = tileCoordinate.w - level;
- ivec3 coordinateAtLevel = tileCoordinate.xyz >> levelDifference;
- traversalData.octreeCoords = ivec4(coordinateAtLevel, level);
-
- ivec3 childCoordinate = coordinateAtLevel & 1;
- childData = getOctreeChildData(traversalData.parentOctreeIndex, childCoordinate);
-
- if (childData.flag != OCTREE_FLAG_INTERNAL) {
- // leaf tile - stop traversing
- break;
- }
-
- traversalData.parentOctreeIndex = childData.data;
- }
-
- return childData;
- }
-
- /**
- * Transform a given position to an octree tile coordinate and a position within that tile,
- * and find the corresponding megatexture index and texture coordinates
- */
- void traverseOctreeFromBeginning(in TileAndUvCoordinate tileAndUv, out TraversalData traversalData, out SampleData sampleDatas[SAMPLE_COUNT]) {
- traversalData.octreeCoords = ivec4(0);
- traversalData.parentOctreeIndex = 0;
-
- OctreeNodeData nodeData = getOctreeNodeData(vec2(0.0));
- if (nodeData.flag != OCTREE_FLAG_LEAF) {
- nodeData = traverseOctreeDownwards(tileAndUv.tileCoords, traversalData);
- }
-
- #if (SAMPLE_COUNT == 1)
- getOctreeLeafSampleData(nodeData, traversalData.octreeCoords, sampleDatas[0]);
- addSampleCoordinates(tileAndUv, sampleDatas[0]);
- #else
- getOctreeLeafSampleDatas(nodeData, traversalData.octreeCoords, sampleDatas);
- addSampleCoordinates(tileAndUv, sampleDatas[0]);
- addSampleCoordinates(tileAndUv, sampleDatas[1]);
- #endif
- }
-
- bool insideTile(in ivec4 tileCoordinate, in ivec4 octreeCoords) {
- int levelDifference = tileCoordinate.w - octreeCoords.w;
- if (levelDifference < 0) {
- return false;
- }
- ivec3 coordinateAtLevel = tileCoordinate.xyz >> levelDifference;
- return coordinateAtLevel == octreeCoords.xyz;
- }
-
- void traverseOctreeFromExisting(in TileAndUvCoordinate tileAndUv, inout TraversalData traversalData, inout SampleData sampleDatas[SAMPLE_COUNT]) {
- ivec4 tileCoords = tileAndUv.tileCoords;
- if (insideTile(tileCoords, traversalData.octreeCoords)) {
- for (int i = 0; i < SAMPLE_COUNT; i++) {
- addSampleCoordinates(tileAndUv, sampleDatas[i]);
- }
- return;
- }
-
- // Go up tree until we find a parent tile containing tileCoords.
- // Assumes all parents are available all they way up to the root.
- for (int i = 0; i < OCTREE_MAX_LEVELS; ++i) {
- traversalData.octreeCoords.xyz /= 2;
- traversalData.octreeCoords.w -= 1;
-
- if (insideTile(tileCoords, traversalData.octreeCoords)) {
- break;
- }
-
- traversalData.parentOctreeIndex = getOctreeParentIndex(traversalData.parentOctreeIndex);
- }
-
- // Go down tree
- OctreeNodeData nodeData = traverseOctreeDownwards(tileCoords, traversalData);
-
- #if (SAMPLE_COUNT == 1)
- getOctreeLeafSampleData(nodeData, traversalData.octreeCoords, sampleDatas[0]);
- addSampleCoordinates(tileAndUv, sampleDatas[0]);
- #else
- getOctreeLeafSampleDatas(nodeData, traversalData.octreeCoords, sampleDatas);
- addSampleCoordinates(tileAndUv, sampleDatas[0]);
- addSampleCoordinates(tileAndUv, sampleDatas[1]);
- #endif
- }
- `;var uU=`// See Octree.glsl for the definitions of SampleData
-
- /* Megatexture defines (set in Scene/VoxelRenderResources.js)
- #define SAMPLE_COUNT ###
- #define PADDING
- */
-
- uniform ivec3 u_megatextureTileCounts; // number of tiles in the megatexture, along each axis
-
- vec3 index1DTo3DTexCoord(int index)
- {
- int tilesPerZ = u_megatextureTileCounts.x * u_megatextureTileCounts.y;
- int iz = index / tilesPerZ;
- int remainder = index - iz * tilesPerZ;
- int iy = remainder / u_megatextureTileCounts.x;
- int ix = remainder - iy * u_megatextureTileCounts.x;
- return vec3(ix, iy, iz) / vec3(u_megatextureTileCounts);
- }
-
- Properties getPropertiesFromMegatexture(in SampleData sampleData) {
- int tileIndex = sampleData.megatextureIndex;
-
- vec3 voxelCoord = sampleData.inputCoordinate;
-
- // UV coordinate of the lower corner of the tile in the megatexture
- vec3 tileUvOffset = index1DTo3DTexCoord(tileIndex);
-
- // Voxel location
- vec3 tileDimensions = vec3(u_inputDimensions);
- vec3 clampedVoxelCoord = clamp(voxelCoord, vec3(0.5), tileDimensions - vec3(0.5));
- vec3 voxelUv = clampedVoxelCoord / tileDimensions / vec3(u_megatextureTileCounts);
-
- return getPropertiesFromMegatextureAtUv(tileUvOffset + voxelUv);
- }
-
- // Convert an array of sample datas to a final weighted properties.
- Properties accumulatePropertiesFromMegatexture(in SampleData sampleDatas[SAMPLE_COUNT]) {
- #if (SAMPLE_COUNT == 1)
- return getPropertiesFromMegatexture(sampleDatas[0]);
- #else
- // When more than one sample is taken the accumulator needs to start at 0
- Properties properties = clearProperties();
- for (int i = 0; i < SAMPLE_COUNT; ++i) {
- float weight = sampleDatas[i].weight;
-
- // Avoid reading the megatexture when the weight is 0 as it can be costly.
- if (weight > 0.0) {
- Properties tempProperties = getPropertiesFromMegatexture(sampleDatas[i]);
- tempProperties = scaleProperties(tempProperties, weight);
- properties = sumProperties(properties, tempProperties);
- }
- }
- return properties;
- #endif
- }
- `;var i1e={Z_UP:0,Y_UP:1};Object.freeze(i1e);var y0=i1e;function T1t(e){let t=new V0;this.shaderBuilder=t;let n=e._customShader,i=wt(e._uniformMap,n.uniformMap);e._uniformMap=i;let o=n.uniforms;for(let m in o)if(o.hasOwnProperty(m)){let A=o[m];t.addUniform(A.type,m,he.FRAGMENT)}t.addUniform("sampler3D","u_megatextureTextures[METADATA_COUNT]",he.FRAGMENT),this.uniformMap=i;let r=e._clippingPlanes,a=l(r)&&r.enabled?r.length:0;this.clippingPlanes=r,this.clippingPlanesLength=a;let s=e._shape.renderBoundPlanes,c=s?.length??0;this.renderBoundPlanes=s,this.renderBoundPlanesLength=c,t.addVertexLines([Zz]),e.provider.metadataOrder===y0.Y_UP&&t.addDefine("Y_UP_METADATA_ORDER",void 0,he.FRAGMENT);let u=e._provider.shape;u==="BOX"?t.addDefine("SHAPE_BOX",void 0,he.FRAGMENT):u==="CYLINDER"?t.addDefine("SHAPE_CYLINDER",void 0,he.FRAGMENT):u==="ELLIPSOID"&&t.addDefine("SHAPE_ELLIPSOID",void 0,he.FRAGMENT),t.addFragmentLines([n.fragmentShaderText,"#line 0",lU,$z,uU,eU,nU,tU]),a>0&&(t.addDefine("CLIPPING_PLANES",void 0,he.FRAGMENT),t.addDefine("CLIPPING_PLANES_COUNT",a,he.FRAGMENT),r.unionClippingRegions&&t.addDefine("CLIPPING_PLANES_UNION",void 0,he.FRAGMENT)),e._depthTest&&t.addDefine("DEPTH_TEST",void 0,he.FRAGMENT),u==="BOX"?t.addFragmentLines([aU,iU,DT]):u==="CYLINDER"?t.addFragmentLines([sU,hI,oU,DT]):u==="ELLIPSOID"&&t.addFragmentLines([cU,hI,rU,DT]),t.addFragmentLines([Jz]);let f=e._shape,d=f.shaderDefines;for(let m in d)if(d.hasOwnProperty(m)){let A=d[m];l(A)&&(A=A===!0?void 0:A,t.addDefine(m,A,he.FRAGMENT))}let p=f.shaderMaximumIntersectionsLength;a>0&&(t.addDefine("CLIPPING_PLANES_INTERSECTION_INDEX",p,he.FRAGMENT),a===1?p+=1:r.unionClippingRegions?p+=2:p+=1),e._depthTest&&(t.addDefine("DEPTH_INTERSECTION_INDEX",p,he.FRAGMENT),p+=1),t.addDefine("INTERSECTION_COUNT",p,he.FRAGMENT),(!h.equals(e.paddingBefore,h.ZERO)||!h.equals(e.paddingAfter,h.ZERO))&&t.addDefine("PADDING",void 0,he.FRAGMENT),e._useLogDepth&&t.addDefine("LOG_DEPTH_READ_ONLY",void 0,he.FRAGMENT);let g=e._traversal;t.addDefine("SAMPLE_COUNT",`${g._sampleCount}`,he.FRAGMENT)}var fU=T1t;var o1e=new z;function E1t(e,t){let n=new fU(e);Qz(n,e);let{shaderBuilder:i,clippingPlanes:o,clippingPlanesLength:r,renderBoundPlanes:a,renderBoundPlanesLength:s}=n;if(r>0){let C="getClippingPlane",E=`vec4 ${C}(highp sampler2D packedPlanes, int planeNumber)`,S=ma.getTextureResolution(o,t,o1e),w=r1e(S);i.addFunction(C,E,he.FRAGMENT),i.addFunctionLines(C,[w])}if(s>0){let C="getBoundPlane",E=`vec4 ${C}(highp sampler2D packedPlanes, int planeNumber)`,S=P_.getTextureResolution(a,t,o1e),w=r1e(S);i.addFunction(C,E,he.FRAGMENT),i.addFunctionLines(C,[w])}let c=i.clone();c.addDefine("PICKING",void 0,he.FRAGMENT);let u=i.clone();u.addDefine("PICKING_VOXEL",void 0,he.FRAGMENT);let f=i.buildShaderProgram(t),d=c.buildShaderProgram(t),p=u.buildShaderProgram(t),g=Ve.fromCache({cull:{enabled:!0,face:Mi.BACK},depthTest:{enabled:!1},depthMask:!1,blending:Jt.PRE_MULTIPLIED_ALPHA_BLEND}),m=t.getViewportQuadVertexArray(),A=e._depthTest,y=new tt({vertexArray:m,primitiveType:Re.TRIANGLES,renderState:g,shaderProgram:f,uniformMap:n.uniformMap,modelMatrix:e._compoundModelMatrix,pass:Ie.VOXELS,executeInClosestFrustum:!0,owner:this,cull:A,occlude:A}),x=tt.shallowClone(y,new tt);x.shaderProgram=d,x.pickOnly=!0;let b=tt.shallowClone(y,new tt);if(b.shaderProgram=p,b.pickOnly=!0,l(e._drawCommand)){let C=e._drawCommand;C.shaderProgram=C.shaderProgram&&C.shaderProgram.destroy()}if(l(e._drawCommandPick)){let C=e._drawCommandPick;C.shaderProgram=C.shaderProgram&&C.shaderProgram.destroy()}if(l(e._drawCommandPickVoxel)){let C=e._drawCommandPickVoxel;C.shaderProgram=C.shaderProgram&&C.shaderProgram.destroy()}e._drawCommand=y,e._drawCommandPick=x,e._drawCommandPickVoxel=b}function r1e(e){let t=e.x,n=e.y,i=1/t,o=1/n,r=`${i}`;r.indexOf(".")===-1&&(r+=".0");let a=`${o}`;return a.indexOf(".")===-1&&(a+=".0"),`int pixY = planeNumber / ${t};
- int pixX = planeNumber - (pixY * ${t});
- // Sample from center of pixel
- float u = (float(pixX) + 0.5) * ${r};
- float v = (float(pixY) + 0.5) * ${a};
- return texture(packedPlanes, vec2(u, v));`}var dU=E1t;function R_(e){let{loader:t,metadata:n}=e;this._loader=t,this._metadata=n,this._resourcesLoaded=!1,this._ready=!1}Object.defineProperties(R_.prototype,{ready:{get:function(){return this._ready}},metadata:{get:function(){return this._metadata}}});R_.fromMetadataArray=function(e){return new R_({metadata:e})};R_.fromGltf=async function(e){let t=new bf({gltfResource:e,releaseGltfJson:!1,loadAttributesAsTypedArray:!0});try{await t.load()}catch(n){throw t.destroy(),n}return new R_({loader:t})};R_.prototype.update=function(e,t){let n=this._loader;if(!this._ready){if(t.afterRender.push(()=>!0),!l(n)){this._ready=!0;return}if(this._resourcesLoaded){let{structuralMetadata:i,scene:o}=n.components,{attributes:r}=o.nodes[0].primitives[0];this._metadata=v1t(r,i,e),this._ready=!0;return}this._resourcesLoaded=n.process(t)}};function v1t(e,t,n){let{className:i,names:o,types:r,componentTypes:a}=n.provider,s=t.propertyAttributes.find(f=>f.class.id===i),{properties:c}=s,u=new Array(o.length);for(let f=0;f<e.length;f++){let d=c[o[f]].attribute,p=e.find(y=>y.name===d);if(!l(p))continue;let g=Dt.toComponentDatatype(a[f]),m=dt.getComponentCount(r[f]),A=p.count*m;u[f]=Y.createArrayBufferView(g,p.typedArray.buffer,p.typedArray.byteOffset+p.byteOffset,A)}return u}R_.prototype.isDestroyed=function(){return!1};R_.prototype.destroy=function(){return this._loader=this._loader&&this._loader.destroy(),fe(this)};var PT=R_;function Cl(){this._orientedBoundingBox=new Qt,this._boundingSphere=new ce,this._boundTransform=new M,this._shapeTransform=new M,this._minBounds=Cl.DefaultMinBounds.clone(),this._maxBounds=Cl.DefaultMaxBounds.clone(),this._renderMinBounds=Cl.DefaultMinBounds.clone(),this._renderMaxBounds=Cl.DefaultMaxBounds.clone();let{DefaultMinBounds:e,DefaultMaxBounds:t}=Cl,n=[new $a(h.negate(h.UNIT_X,new h),e.x),new $a(h.negate(h.UNIT_Y,new h),e.y),new $a(h.negate(h.UNIT_Z,new h),e.z),new $a(h.UNIT_X,-t.x),new $a(h.UNIT_Y,-t.y),new $a(h.UNIT_Z,-t.z)];this._renderBoundPlanes=new P_({planes:n}),this._localToShapeUvTranslate=new h,this._shaderUniforms={boxEcToXyz:new $,boxLocalToShapeUvScale:new h},this._shaderDefines={BOX_INTERSECTION_INDEX:void 0},this._shaderMaximumIntersectionsLength=0}Object.defineProperties(Cl.prototype,{orientedBoundingBox:{get:function(){return this._orientedBoundingBox}},renderBoundPlanes:{get:function(){return this._renderBoundPlanes}},boundingSphere:{get:function(){return this._boundingSphere}},boundTransform:{get:function(){return this._boundTransform}},shapeTransform:{get:function(){return this._shapeTransform}},shaderUniforms:{get:function(){return this._shaderUniforms}},shaderDefines:{get:function(){return this._shaderDefines}},shaderMaximumIntersectionsLength:{get:function(){return this._shaderMaximumIntersectionsLength}}});var S1t=new h,w1t=new h,I1t=new $,D1t=new h,P1t=new h;Cl.prototype.update=function(e,t,n,i,o){i=i??t.clone(D1t),o=o??n.clone(P1t),t=h.clone(t,this._minBounds),n=h.clone(n,this._maxBounds);let r=h.clamp(t,i,o,this._renderMinBounds),a=h.clamp(n,i,o,this._renderMaxBounds),s=M.getScale(e,w1t);if(r.x>a.x||r.y>a.y||r.z>a.z||(r.x===a.x)+(r.y===a.y)+(r.z===a.z)>=2||s.x===0||s.y===0||s.z===0)return!1;let c=this._renderBoundPlanes;c.get(0).distance=r.x,c.get(1).distance=r.y,c.get(2).distance=r.z,c.get(3).distance=-a.x,c.get(4).distance=-a.y,c.get(5).distance=-a.z,this._shapeTransform=M.clone(e,this._shapeTransform),this._orientedBoundingBox=vne(r,a,this._shapeTransform,this._orientedBoundingBox),this._boundTransform=M.fromRotationTranslation(this._orientedBoundingBox.halfAxes,this._orientedBoundingBox.center,this._boundTransform),this._boundingSphere=ce.fromOrientedBoundingBox(this._orientedBoundingBox,this._boundingSphere);let u=this._shaderUniforms,f=this._shaderDefines;for(let A in f)f.hasOwnProperty(A)&&(f[A]=void 0);let d=0;f.BOX_INTERSECTION_INDEX=d,d+=1;let p=t,g=n,m=h.fromElements(Tne(p.x,g.x),Tne(p.y,g.y),Tne(p.z,g.z),u.boxLocalToShapeUvScale);return this._localToShapeUvTranslate=h.negate(h.multiplyComponents(m,p,this._localToShapeUvTranslate),this._localToShapeUvTranslate),this._shaderMaximumIntersectionsLength=d,!0};function Tne(e,t){return D.equalsEpsilon(e,t,D.EPSILON7)?1:1/(t-e)}var R1t=new M;Cl.prototype.updateViewTransforms=function(e){let t=this._shaderUniforms,n=M.inverse(this._shapeTransform,R1t),i=M.getMatrix3(n,t.boxEcToXyz),o=e.context.uniformState.inverseViewRotation;$.multiply(i,o,t.boxEcToXyz)};Cl.prototype.convertLocalToShapeUvSpace=function(e,t){let{boxLocalToShapeUvScale:n}=this._shaderUniforms,i=this._localToShapeUvTranslate;return h.add(h.multiplyComponents(e,n,t),i,t)};var k5=new h,Ene=new h;Cl.prototype.computeOrientedBoundingBoxForTile=function(e,t,n,i,o){let r=this._minBounds,a=this._maxBounds,s=1/Math.pow(2,e),c=h.fromElements(D.lerp(r.x,a.x,s*t),D.lerp(r.y,a.y,s*n),D.lerp(r.z,a.z,s*i),k5),u=h.fromElements(D.lerp(r.x,a.x,s*(t+1)),D.lerp(r.y,a.y,s*(n+1)),D.lerp(r.z,a.z,s*(i+1)),Ene);return vne(c,u,this._shapeTransform,o)};var a1e=new h;Cl.prototype.computeOrientedBoundingBoxForSample=function(e,t,n,i){let o=1/Math.pow(2,e.level),r=h.divideComponents(h.ONE,t,a1e),a=h.multiplyByScalar(r,o,a1e),s=h.multiplyByScalar(h.fromElements(e.x+n.x,e.y+n.y,e.z+n.z,k5),o,k5),c=h.add(s,a,Ene),u=this._minBounds,f=this._maxBounds,d=h.fromElements(D.lerp(u.x,f.x,s.x),D.lerp(u.y,f.y,s.y),D.lerp(u.z,f.z,s.z),k5),p=h.fromElements(D.lerp(u.x,f.x,c.x),D.lerp(u.y,f.y,c.y),D.lerp(u.z,f.z,c.z),Ene);return vne(d,p,this._shapeTransform,i)};Cl.DefaultMinBounds=Object.freeze(new h(-1,-1,-1));Cl.DefaultMaxBounds=Object.freeze(new h(1,1,1));var s1e=new h;function vne(e,t,n,i){let o=Cl.DefaultMinBounds,r=Cl.DefaultMaxBounds;if(h.equals(e,o)&&h.equals(t,r))i.center=M.getTranslation(n,i.center),i.halfAxes=M.getMatrix3(n,i.halfAxes);else{let s=M.getScale(n,s1e),c=h.midpoint(e,t,S1t);i.center=M.multiplyByPoint(n,c,i.center),s=h.fromElements(s.x*.5*(t.x-e.x),s.y*.5*(t.y-e.y),s.z*.5*(t.z-e.z),s1e);let u=M.getRotation(n,I1t);i.halfAxes=$.setScale(u,s,i.halfAxes)}return i}var RT=Cl;function od(){this._orientedBoundingBox=new Qt,this._boundingSphere=new ce,this._boundTransform=new M,this._shapeTransform=new M,this._minBounds=od.DefaultMinBounds.clone(),this._maxBounds=od.DefaultMaxBounds.clone();let{DefaultMinBounds:e,DefaultMaxBounds:t}=od,n=[new $a(h.negate(h.UNIT_Z,new h),e.z),new $a(h.UNIT_Z,-t.z)];this._renderBoundPlanes=new P_({planes:n}),this._localToShapeUvTranslate=new h,this._shaderUniforms={cameraShapePosition:new h,cylinderEcToRadialTangentUp:new $,cylinderRenderRadiusMinMax:new z,cylinderRenderAngleMinMax:new z,cylinderLocalToShapeUvScale:new h,cylinderShapeUvAngleRangeOrigin:0},this._shaderDefines={CYLINDER_HAS_SHAPE_BOUNDS_ANGLE:void 0,CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MIN:void 0,CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT:void 0,CYLINDER_HAS_RENDER_BOUNDS_ANGLE:void 0,CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_EQUAL_ZERO:void 0,CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_UNDER_HALF:void 0,CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_OVER_HALF:void 0,CYLINDER_INTERSECTION_INDEX_RADIUS_MAX:void 0,CYLINDER_INTERSECTION_INDEX_RADIUS_MIN:void 0,CYLINDER_INTERSECTION_INDEX_ANGLE:void 0},this._shaderMaximumIntersectionsLength=0}Object.defineProperties(od.prototype,{orientedBoundingBox:{get:function(){return this._orientedBoundingBox}},renderBoundPlanes:{get:function(){return this._renderBoundPlanes}},boundingSphere:{get:function(){return this._boundingSphere}},boundTransform:{get:function(){return this._boundTransform}},shapeTransform:{get:function(){return this._shapeTransform}},shaderUniforms:{get:function(){return this._shaderUniforms}},shaderDefines:{get:function(){return this._shaderDefines}},shaderMaximumIntersectionsLength:{get:function(){return this._shaderMaximumIntersectionsLength}}});var O1t=new h,M1t=new h,B1t=new h,L1t=new h,N1t=new h,F1t=new M,k1t=new h,c1e=new z;od.prototype.update=function(e,t,n,i,o){i=i??t.clone(M1t),o=o??n.clone(B1t),t=h.clone(t,this._minBounds),n=h.clone(n,this._maxBounds);let{DefaultMinBounds:r,DefaultMaxBounds:a}=od,s=a.y-r.y,c=.5*s,u=D.EPSILON10,f=D.EPSILON10;t.x=Math.max(0,t.x),n.x=Math.max(0,n.x),t.y=D.negativePiToPi(t.y),n.y=D.negativePiToPi(n.y),i.y=D.negativePiToPi(i.y),o.y=D.negativePiToPi(o.y);let d=h.maximumByComponent(t,i,L1t),p=h.minimumByComponent(n,o,N1t),g=M.getScale(e,O1t);if(p.x===0||d.x>p.x||d.z>p.z||D.equalsEpsilon(g.x,0,void 0,u)||D.equalsEpsilon(g.y,0,void 0,u)||D.equalsEpsilon(g.z,0,void 0,u))return!1;let m=this._renderBoundPlanes;m.get(0).distance=d.z,m.get(1).distance=-p.z,this._shapeTransform=M.clone(e,this._shapeTransform),this._orientedBoundingBox=Ine(d,p,this._shapeTransform,this._orientedBoundingBox),this._boundTransform=M.fromRotationTranslation(this._orientedBoundingBox.halfAxes,this._orientedBoundingBox.center,this._boundTransform),this._boundingSphere=ce.fromOrientedBoundingBox(this._orientedBoundingBox,this._boundingSphere);let A=n.y<t.y,y=n.y-t.y+A*s,x=p.y<d.y,b=p.y-d.y+x*s,C=b>=c-f&&b<s-f,E=b>f&&b<c-f,S=b<=f,w=C||E||S,P=this._shaderUniforms,R=this._shaderDefines;for(let q in R)R.hasOwnProperty(q)&&(R[q]=void 0);let B=0;R.CYLINDER_INTERSECTION_INDEX_RADIUS_MAX=B,B+=1,y<s-f&&(R.CYLINDER_HAS_SHAPE_BOUNDS_ANGLE=!0),d.x!==r.x&&(R.CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MIN=!0,R.CYLINDER_INTERSECTION_INDEX_RADIUS_MIN=B,B+=1),P.cylinderRenderRadiusMinMax=z.fromElements(d.x,p.x,P.cylinderRenderRadiusMinMax),d.x===p.x&&(R.CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT=!0);let L=n.x-t.x,_=0,T=1;L!==0&&(_=1/L,T=-t.x*_);let v=n.z-t.z,I=0,O=1;v!==0&&(I=1/v,O=-t.z*I),w&&(R.CYLINDER_HAS_RENDER_BOUNDS_ANGLE=!0,R.CYLINDER_INTERSECTION_INDEX_ANGLE=B,C?(R.CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_UNDER_HALF=!0,B+=1):E?(R.CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_OVER_HALF=!0,B+=2):S&&(R.CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_EQUAL_ZERO=!0,B+=2),P.cylinderRenderAngleMinMax=z.fromElements(d.y,p.y,P.cylinderRenderAngleMinMax));let N=(t.y-r.y)/s,j=(n.y-r.y)/s,k=1-y/s,U=(j+.5*k)%1;P.cylinderShapeUvAngleRangeOrigin=U;let F=0,H=1;if(y>f){F=s/y;let q=N-U;H=-F*(q-Math.floor(q))}return P.cylinderLocalToShapeUvScale=h.fromElements(_,F,I,P.cylinderLocalToShapeUvScale),this._localToShapeUvTranslate=h.fromElements(T,H,O,this._localToShapeUvTranslate),this._shaderMaximumIntersectionsLength=B,!0};var z1t=new $,U1t=new $,V1t=new M;od.prototype.updateViewTransforms=function(e){let t=this._shaderUniforms,n=M.inverse(this._shapeTransform,F1t),i=M.multiplyByPoint(n,e.camera.positionWC,k1t);t.cameraShapePosition=h.fromElements(z.magnitude(i),Math.atan2(i.y,i.x),i.z,t.cameraShapePosition);let o=z.normalize(z.fromCartesian3(i,c1e),c1e),r=$.fromRowMajorArray([o.x,o.y,0,-o.y,o.x,0,0,0,1],z1t),a=e.context.uniformState.inverseView,s=M.multiplyTransformation(n,a,V1t),c=M.getMatrix3(s,U1t);t.cylinderEcToRadialTangentUp=$.multiply(r,c,t.cylinderEcToRadialTangentUp)};od.prototype.convertLocalToShapeUvSpace=function(e,t){let n=Math.hypot(e.x,e.y),i=Math.atan2(e.y,e.x),o=e.z,{cylinderLocalToShapeUvScale:r,cylinderShapeUvAngleRangeOrigin:a}=this._shaderUniforms,s=this._localToShapeUvTranslate;return n=n*r.x+s.x,i=(i+Math.PI)/(2*Math.PI),i-=a,i=i-Math.floor(i),i=i*r.y+s.y,o=o*r.z+s.z,h.fromElements(n,i,o,t)};var z5=new h,wne=new h;od.prototype.computeOrientedBoundingBoxForTile=function(e,t,n,i,o){let r=this._minBounds,a=this._maxBounds,s=1/Math.pow(2,e),c=h.fromElements(D.lerp(r.x,a.x,t*s),D.lerp(r.y,a.y,n*s),D.lerp(r.z,a.z,i*s),z5),u=h.fromElements(D.lerp(r.x,a.x,(t+1)*s),D.lerp(r.y,a.y,(n+1)*s),D.lerp(r.z,a.z,(i+1)*s),wne);return Ine(c,u,this._shapeTransform,o)};var l1e=new h;od.prototype.computeOrientedBoundingBoxForSample=function(e,t,n,i){let o=1/Math.pow(2,e.level),r=h.divideComponents(h.ONE,t,l1e),a=h.multiplyByScalar(r,o,l1e),s=h.multiplyByScalar(h.fromElements(e.x+n.x,e.y+n.y,e.z+n.z,z5),o,z5),c=h.add(s,a,wne),u=this._minBounds,f=this._maxBounds,d=h.fromElements(D.lerp(u.x,f.x,s.x),D.lerp(u.y,f.y,s.y),D.lerp(u.z,f.z,s.z),z5),p=h.fromElements(D.lerp(u.x,f.x,c.x),D.lerp(u.y,f.y,c.y),D.lerp(u.z,f.z,c.z),wne);return Ine(d,p,this._shapeTransform,i)};od.DefaultMinBounds=Object.freeze(new h(0,-D.PI,-1));od.DefaultMaxBounds=Object.freeze(new h(1,+D.PI,1));var j1t=5,G1t=new Array(j1t),H1t=new h,W1t=new $,q1t=new M,Y1t=new M,X1t=new M,Sne=new M,K1t=new h,Q1t=new h,$1t=new h,f1e=new Array(8);for(let e=0;e<8;e++)f1e[e]=new h;function u1e(e,t,n){return Math.abs(se.dot(e,t))<n}function J1t(e){let t=M.getColumn(e,0,K1t),n=M.getColumn(e,1,Q1t),i=M.getColumn(e,2,$1t),o=D.EPSILON4;return u1e(t,n,o)&&u1e(n,i,o)}function Z1t(e,t){let n=f1e;h.fromElements(-.5,-.5,-.5,n[0]),h.fromElements(-.5,-.5,.5,n[1]),h.fromElements(-.5,.5,-.5,n[2]),h.fromElements(-.5,.5,.5,n[3]),h.fromElements(.5,-.5,-.5,n[4]),h.fromElements(.5,-.5,.5,n[5]),h.fromElements(.5,.5,-.5,n[6]),h.fromElements(.5,.5,.5,n[7]);for(let i=0;i<8;++i)M.multiplyByPoint(e,n[i],n[i]);return Qt.fromPoints(n,t)}var eRt=new h;function Ine(e,t,n,i){let o=e.x,r=t.x,a=e.y,s=t.y<a?t.y+D.TWO_PI:t.y,c=e.z,u=t.z,f=s-a,d=a+f*.5,p=G1t,g=0;p[g++]=a,p[g++]=s,p[g++]=d,f>D.PI&&(p[g++]=d-D.PI_OVER_TWO,p[g++]=d+D.PI_OVER_TWO);let m=Number.POSITIVE_INFINITY,A=Number.POSITIVE_INFINITY,y=Number.NEGATIVE_INFINITY,x=Number.NEGATIVE_INFINITY;for(let N=0;N<g;++N){let j=p[N]-d,k=Math.cos(j),U=Math.sin(j),F=k*o,H=U*o,q=k*r,J=U*r;m=Math.min(m,F,q),A=Math.min(A,H,J),y=Math.max(y,F,q),x=Math.max(x,H,J)}let b=y-m,C=x-A,E=u-c,S=(m+y)*.5,w=(A+x)*.5,P=(c+u)*.5,R=h.fromElements(S,w,P,H1t),B=$.fromRotationZ(d,W1t),L=h.fromElements(b,C,E,eRt),_=M.fromScale(L,X1t),T=M.fromRotation(B,Y1t),v=M.fromTranslation(R,q1t),I=M.multiplyTransformation(T,M.multiplyTransformation(v,_,Sne),Sne),O=M.multiplyTransformation(n,I,Sne);return J1t(O)?Qt.fromTransformation(O,i):Z1t(O,i)}var OT=od;function ph(){this._orientedBoundingBox=new Qt,this._boundingSphere=new ce,this._boundTransform=new M,this._shapeTransform=new M,this._rectangle=new oe,this._minimumHeight=ph.DefaultMinBounds.z,this._maximumHeight=ph.DefaultMaxBounds.z,this._ellipsoid=new te,this._translation=new h,this._rotation=new $,this._localToShapeUvTranslate=new h,this._shaderUniforms={cameraPositionCartographic:new h,ellipsoidEcToEastNorthUp:new $,ellipsoidRadii:new h,eccentricitySquared:0,evoluteScale:new z,ellipsoidCurvatureAtLatitude:new z,ellipsoidInverseRadiiSquared:new h,ellipsoidRenderLongitudeMinMax:new z,ellipsoidShapeUvLongitudeRangeOrigin:0,ellipsoidShapeUvLongitudeMinMaxMid:new h,ellipsoidLocalToShapeUvScale:new h,ellipsoidRenderLatitudeSinMinMax:new z,clipMinMaxHeight:new z},this._shaderDefines={ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_UNDER_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_OVER_HALF:void 0,ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_EQUAL_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_OVER_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_EQUAL_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_OVER_HALF:void 0,ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE:void 0,ELLIPSOID_INTERSECTION_INDEX_LONGITUDE:void 0,ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX:void 0,ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN:void 0,ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MAX:void 0,ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MIN:void 0},this._shaderMaximumIntersectionsLength=0}Object.defineProperties(ph.prototype,{orientedBoundingBox:{get:function(){return this._orientedBoundingBox}},boundingSphere:{get:function(){return this._boundingSphere}},boundTransform:{get:function(){return this._boundTransform}},shapeTransform:{get:function(){return this._shapeTransform}},shaderUniforms:{get:function(){return this._shaderUniforms}},shaderDefines:{get:function(){return this._shaderDefines}},shaderMaximumIntersectionsLength:{get:function(){return this._shaderMaximumIntersectionsLength}}});var tRt=new h,nRt=new h,iRt=new h,oRt=new h,rRt=new h,aRt=new h,sRt=new h,cRt=new h,d1e=new h,h1e=new h,lRt=new oe;ph.prototype.update=function(e,t,n,i,o){let{DefaultMinBounds:r,DefaultMaxBounds:a}=ph;i=i??r,o=o??a;let s=D.EPSILON10,c=D.EPSILON10,u=D.EPSILON10,f=D.EPSILON3,d=M.getScale(e,cRt),p=h.clone(r,tRt);p.z=-h.minimumComponent(d);let g=h.clamp(t,p,a,nRt),m=h.clamp(n,p,a,iRt),A=h.clamp(i,p,a,oRt),y=h.clamp(o,p,a,rRt),x=h.maximumByComponent(g,A,aRt),b=h.minimumByComponent(m,y,sRt),C=h.add(d,h.fromElements(m.z,m.z,m.z,d1e),d1e),E=h.add(d,h.fromElements(b.z,b.z,b.z,h1e),h1e);if(x.y>b.y||x.y===a.y||b.y===r.y||x.z>b.z||D.equalsEpsilon(E,h.ZERO,void 0,s))return!1;this._rectangle=oe.fromRadians(g.x,g.y,m.x,m.y),this._translation=M.getTranslation(e,this._translation),this._rotation=M.getRotation(e,this._rotation),this._ellipsoid=te.fromCartesian3(d,this._ellipsoid),this._minimumHeight=g.z,this._maximumHeight=m.z;let S=oe.fromRadians(x.x,x.y,b.x,b.y,lRt);this._orientedBoundingBox=Dne(S,x.z,b.z,this._ellipsoid,this._translation,this._rotation,this._orientedBoundingBox),this._shapeTransform=M.fromRotationTranslation(this._rotation,this._translation,this._shapeTransform),this._boundTransform=M.fromRotationTranslation(this._orientedBoundingBox.halfAxes,this._orientedBoundingBox.center,this._boundTransform),this._boundingSphere=ce.fromOrientedBoundingBox(this._orientedBoundingBox,this._boundingSphere);let w=a.x-r.x,P=.5*w,R=b.x<x.x,B=b.x-x.x+R*w,L=B<=c,_=B>=P-c&&B<w-c,T=B>c&&B<P-c,v=L||_||T,I=m.x<g.x,O=m.x-g.x+I*w,N=O>P+c&&O<w-c,j=O>=P-c&&O<=P+c,k=O<P-c,U=N||j||k,F=b.y<-f,H=b.y>=-f&&b.y<=+f,q=b.y>+f&&b.y<a.y-u,J=F||H||q,W=x.y>r.y+u&&x.y<-f,Z=x.y>=-f&&x.y<=+f,K=x.y>+f,le=W||Z||K,me=J||le,ae=m.y-g.y,be=m.y<-f,ge=m.y>=-f&&m.y<=+f,we=m.y>+f&&m.y<a.y-u,Ee=be||ge||we,Be=g.y>r.y+u&&g.y<-f,ke=g.y>=-f&&g.y<=+f,Ge=g.y>+f,et=Ee||(Be||ke||Ge),Pe=this._shaderUniforms,Ye=this._shaderDefines;for(let Nn in Ye)Ye.hasOwnProperty(Nn)&&(Ye[Nn]=void 0);Pe.ellipsoidRadii=h.clone(C,Pe.ellipsoidRadii);let{x:ut,z:Tt}=Pe.ellipsoidRadii,tn=Tt/ut;Pe.eccentricitySquared=1-tn*tn,Pe.evoluteScale=z.fromElements((ut*ut-Tt*Tt)/ut,(Tt*Tt-ut*ut)/Tt,Pe.evoluteScale),Pe.ellipsoidInverseRadiiSquared=h.divideComponents(h.ONE,h.multiplyComponents(Pe.ellipsoidRadii,Pe.ellipsoidRadii,Pe.ellipsoidInverseRadiiSquared),Pe.ellipsoidInverseRadiiSquared);let Ht=0;Ye.ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MAX=Ht,Ht+=1,Ye.ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MIN=Ht,Ht+=1,Pe.clipMinMaxHeight=z.fromElements(x.z-m.z,b.z-m.z,Pe.clipMinMaxHeight);let xt=m.z-g.z,Pt=xt===0?0:1/xt;v&&(Ye.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE=!0,Ye.ELLIPSOID_INTERSECTION_INDEX_LONGITUDE=Ht,_?(Ye.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_UNDER_HALF=!0,Ht+=1):T?(Ye.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_OVER_HALF=!0,Ht+=2):L&&(Ye.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO=!0,Ht+=2),Pe.ellipsoidRenderLongitudeMinMax=z.fromElements(x.x,b.x,Pe.ellipsoidRenderLongitudeMinMax));let bn=0,at=1;if(U){Ye.ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE=!0;let Nn=(g.x-r.x)/w,uo=(m.x-r.x)/w,Yo=1-O/w,oo=(uo+.5*Yo)%1;if(Pe.ellipsoidShapeUvLongitudeRangeOrigin=oo,O>c){bn=w/O;let ro=Nn-oo;at=-bn*(ro-Math.floor(ro))}}me&&(le&&(Ye.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN=!0,Ye.ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN=Ht,W?(Ye.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF=!0,Ht+=1):Z?(Ye.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_EQUAL_HALF=!0,Ht+=1):K&&(Ye.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_OVER_HALF=!0,Ht+=2)),J&&(Ye.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX=!0,Ye.ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX=Ht,F?(Ye.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF=!0,Ht+=2):H?(Ye.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_EQUAL_HALF=!0,Ht+=1):q&&(Ye.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_OVER_HALF=!0,Ht+=1)),Pe.ellipsoidRenderLatitudeSinMinMax=z.fromElements(Math.sin(x.y),Math.sin(b.y),Pe.ellipsoidRenderLatitudeSinMinMax));let st=0,Ln=1;return et&&(Ye.ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE=!0,ae>u&&(st=(a.y-r.y)/ae,Ln=(r.y-g.y)/ae)),Pe.ellipsoidLocalToShapeUvScale=h.fromElements(bn,st,Pt,Pe.ellipsoidLocalToShapeUvScale),this._localToShapeUvTranslate=h.fromElements(at,Ln,0,this._localToShapeUvTranslate),this._shaderMaximumIntersectionsLength=Ht,!0};var uRt=new de,fRt=new h,dRt=new M,m1e=new $;ph.prototype.updateViewTransforms=function(e){let t=this._shaderUniforms,n=this._ellipsoid,i=e.camera.positionWC,o=n.cartesianToCartographic(i,uRt);h.fromElements(o.longitude,o.latitude,o.height,t.cameraPositionCartographic);let r=h.fromRadians(o.longitude,o.latitude,0,n,fRt);t.ellipsoidCurvatureAtLatitude=n.getLocalCurvature(r,t.ellipsoidCurvatureAtLatitude);let a=pt.eastNorthUpToFixedFrame(r,n,dRt),s=M.getRotation(a,m1e),c=e.context.uniformState.viewRotation,u=$.multiply(c,s,m1e);t.ellipsoidEcToEastNorthUp=$.transpose(u,t.ellipsoidEcToEastNorthUp)};var b1e=new oe;ph.prototype.computeOrientedBoundingBoxForTile=function(e,t,n,i,o){let r=1/Math.pow(2,e),a=t*r,s=(t+1)*r,c=n*r,u=(n+1)*r,f=i*r,d=(i+1)*r,p=oe.subsection(this._rectangle,a,c,s,u,b1e),g=D.lerp(this._minimumHeight,this._maximumHeight,f),m=D.lerp(this._minimumHeight,this._maximumHeight,d);return Dne(p,g,m,this._ellipsoid,this._translation,this._rotation,o)};var hRt=new z,mRt=new z,hU=new z,p1e=new z,g1e=new z,mU=new z;function pRt(e,t,n,i){let o=z.abs(e,hRt),r=z.fromElements(1/t.x,1/t.y,mRt),a=z.fromElements(Math.SQRT1_2,Math.SQRT1_2,hU),s=z.multiplyComponents(t,a,p1e),c=z.fromElements(n.x*a.x*a.x*a.x,n.y*a.y*a.y*a.y,g1e);for(let u=0;u<3;++u){let f=z.magnitude(z.subtract(s,c,mU)),d=z.normalize(z.subtract(o,c,mU),mU),p=z.multiplyByScalar(d,f,mU);a=z.multiplyComponents(z.add(p,c,hU),r,hU),a=z.normalize(z.clamp(a,z.ZERO,z.ONE,hU),hU),s=z.multiplyComponents(t,a,p1e),c=z.fromElements(n.x*a.x*a.x*a.x,n.y*a.y*a.y*a.y,g1e)}return h.fromElements(Math.sign(e.x)*s.x,Math.sign(e.y)*s.y,z.magnitude(z.subtract(s,c,mU)),i)}var gRt=new z,_1e=new z,_Rt=new h,A1e=new z;ph.prototype.convertLocalToShapeUvSpace=function(e,t){let n=Math.atan2(e.y,e.x),{ellipsoidRadii:i,evoluteScale:o,ellipsoidInverseRadiiSquared:r,ellipsoidShapeUvLongitudeRangeOrigin:a,ellipsoidLocalToShapeUvScale:s}=this._shaderUniforms,c=this._localToShapeUvTranslate,u=Math.hypot(e.x,e.y),f=z.fromElements(u,e.z,_1e),d=pRt(f,z.fromElements(i.x,i.z,gRt),o,_Rt),p=z.normalize(z.fromElements(d.x*r.x,d.y*r.z,A1e),A1e),g=Math.atan2(p.y,p.x),m=z.magnitude(f)<z.magnitude(d)?-1:1,A=z.subtract(f,d,_1e),y=m*z.magnitude(A),{ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE:x,ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE:b}=this._shaderDefines;return n=(n+Math.PI)/(2*Math.PI),l(x)&&(n-=a,n=n-Math.floor(n),n=n*s.x+c.x),g=(g+Math.PI/2)/Math.PI,l(b)&&(g=g*s.y+c.y),y=1+y*s.z,h.fromElements(n,g,y,t)};var y1e=new h,x1e=new h,ARt=new h;ph.prototype.computeOrientedBoundingBoxForSample=function(e,t,n,i){let o=1/Math.pow(2,e.level),r=h.divideComponents(h.ONE,t,y1e),a=h.multiplyByScalar(r,o,y1e),s=h.multiplyByScalar(h.fromElements(e.x+n.x,e.y+n.y,e.z+n.z,x1e),o,x1e),c=h.add(s,a,ARt),u=oe.subsection(this._rectangle,s.x,s.y,c.x,c.y,b1e),f=D.lerp(this._minimumHeight,this._maximumHeight,s.z),d=D.lerp(this._minimumHeight,this._maximumHeight,c.z);return Dne(u,f,d,this._ellipsoid,this._translation,this._rotation,i)};function Dne(e,t,n,i,o,r,a){return a=Qt.fromRectangle(e,t,n,i,a),a.center=h.add(a.center,o,a.center),a.halfAxes=$.multiply(a.halfAxes,r,a.halfAxes),a}ph.DefaultMinBounds=Object.freeze(new h(-D.PI,-D.PI_OVER_TWO,-te.WGS84.minimumRadius));ph.DefaultMaxBounds=Object.freeze(new h(D.PI,D.PI_OVER_TWO,10*te.WGS84.maximumRadius));var MT=ph;var ef={BOX:"BOX",ELLIPSOID:"ELLIPSOID",CYLINDER:"CYLINDER"};ef.getMinBounds=function(e){switch(e){case ef.BOX:return RT.DefaultMinBounds;case ef.ELLIPSOID:return MT.DefaultMinBounds;case ef.CYLINDER:return OT.DefaultMinBounds}};ef.getMaxBounds=function(e){switch(e){case ef.BOX:return RT.DefaultMaxBounds;case ef.ELLIPSOID:return MT.DefaultMaxBounds;case ef.CYLINDER:return OT.DefaultMaxBounds}};ef.getShapeConstructor=function(e){switch(e){case ef.BOX:return RT;case ef.ELLIPSOID:return MT;case ef.CYLINDER:return OT}};Object.freeze(ef);var Ac=ef;function Ym(e){this._comparator=e.comparator,this._maximumLength=e.maximumLength,this._array=l(e.maximumLength)?new Array(e.maximumLength):[],this._length=0}Object.defineProperties(Ym.prototype,{length:{get:function(){return this._length}},maximumLength:{get:function(){return this._maximumLength},set:function(e){if(l(e)){for(;this._length>e;)this.removeMinimum();this._array.length=e}this._maximumLength=e}},internalArray:{get:function(){return this._array}},comparator:{get:function(){return this._comparator}}});Ym.prototype.clone=function(){let e=this._maximumLength,t=this._comparator,n=this._array,i=this._length,o=new Ym({comparator:t,maximumLength:e});o._length=i;for(let r=0;r<i;r++)o._array[r]=n[r];return o};Ym.prototype.reset=function(){this._length=0;let e=this._maximumLength;if(l(e))for(let t=0;t<e;t++)this._array[t]=void 0;else this._array.length=0};Ym.prototype.resort=function(){let e=this._length;for(let t=0;t<e;t++)C1e(this,t)};Ym.prototype.insert=function(e){let t,n=this._maximumLength;if(l(n)){if(n===0)return;if(this._length===n){let o=this._array[0];if(this._comparator(e,o)<=0)return e;t=this.removeMinimum()}}let i=this._length;return this._array[i]=e,this._length++,C1e(this,i),t};Ym.prototype.removeMinimum=function(){let e=this._length;if(e===0)return;this._length--;let t=this._array[0];return e>=2&&(this._array[0]=this._array[e-1],T1e(this,0)),this._array[e-1]=void 0,t};Ym.prototype.removeMaximum=function(){let e=this._length;if(e===0)return;this._length--;let t;if(e<=2)t=this._array[e-1];else{let n=Pne(this,1,2)?1:2;t=this._array[n],this._array[n]=this._array[e-1],e>=4&&T1e(this,n)}return this._array[e-1]=void 0,t};Ym.prototype.getMinimum=function(){if(this._length!==0)return this._array[0]};Ym.prototype.getMaximum=function(){let e=this._length;if(e!==0)return e<=2?this._array[e-1]:this._array[Pne(this,1,2)?1:2]};function U5(e,t,n){let i=e._array,o=i[t];i[t]=i[n],i[n]=o}function pU(e,t,n){return e._comparator(e._array[t],e._array[n])<0}function Pne(e,t,n){return e._comparator(e._array[t],e._array[n])>0}function C1e(e,t){if(t===0)return;let n=Math.floor(D.log2(t+1))%2===0,i=Math.floor((t-1)/2),o=pU(e,t,i);for(o!==n&&(U5(e,t,i),t=i);t>=3;){let r=Math.floor((t-3)/4);if(pU(e,t,r)!==o)break;U5(e,t,r),t=r}}function T1e(e,t){let n=e._length,i=Math.floor(D.log2(t+1))%2===0,o;for(;(o=2*t+1)<n;){let r=o,a=o+1;if(a<n){pU(e,a,r)===i&&(r=a);let s=2*o+1,c=Math.max(Math.min(n-s,4),0);for(let u=0;u<c;u++){let f=s+u;pU(e,f,r)===i&&(r=f)}}if(pU(e,r,t)===i&&(U5(e,r,t),r!==o&&r!==a)){let s=Math.floor((r-1)/2);Pne(e,r,s)===i&&U5(e,r,s)}t=r}}var O_=Ym;var Rne=Object.freeze({UNLOADED:0,RECEIVING:1,PROCESSING:2,LOADED:3,FAILED:4,UNAVAILABLE:5});function gU(e,t){this.spatialNode=e,this.keyframe=t,this.state=Rne.UNLOADED,this.content=void 0,this.megatextureIndex=-1,this.priority=-Number.MAX_VALUE,this.highPriorityFrameNumber=-1}gU.prototype.unload=function(){this.content=this.content&&this.content.destroy(),this.spatialNode=void 0,this.state=Rne.UNLOADED,this.megatextureIndex=-1,this.priority=-Number.MAX_VALUE,this.highPriorityFrameNumber=-1};gU.priorityComparator=function(e,t){return e.priority-t.priority};gU.searchComparator=function(e,t){return e.keyframe-t.keyframe};gU.LoadState=Rne;var Bo=gU;function x0(e,t,n,i,o=134217728,r){let a=yRt(i),s=xRt(n),c=n*Dt.getSizeInBytes(i),u=x0.get3DTextureDimension(t,c,o,r),f=h.divideComponents(u,t,new h);this.channelCount=n,this.componentType=i,this.textureMemoryByteLength=c*u.x*u.y*u.z,this.tileCounts=h.clone(f,new h),this.voxelCountPerTile=h.clone(t,new h),this.maximumTileCount=f.x*f.y*f.z,this.texture=new ER({context:e,pixelFormat:s,pixelDatatype:a,flipY:!1,width:u.x,height:u.y,depth:u.z,sampler:new jt({wrapR:un.CLAMP_TO_EDGE,wrapS:un.CLAMP_TO_EDGE,wrapT:un.CLAMP_TO_EDGE,minificationFilter:Vt.LINEAR,magnificationFilter:ti.LINEAR})}),this.nodes=new Array(this.maximumTileCount);for(let d=0;d<this.maximumTileCount;d++)this.nodes[d]=new bRt(d);for(let d=0;d<this.maximumTileCount;d++){let p=this.nodes[d];p.previousNode=d>0?this.nodes[d-1]:void 0,p.nextNode=d<this.maximumTileCount-1?this.nodes[d+1]:void 0}this.occupiedList=void 0,this.emptyList=this.nodes[0],this.occupiedCount=0,this._nearestSampling=!1}Object.defineProperties(x0.prototype,{nearestSampling:{get:function(){return this._nearestSampling},set:function(e){this._nearestSampling!==e&&(e?this.texture.sampler=jt.NEAREST:this.texture.sampler=new jt({wrapR:un.CLAMP_TO_EDGE,wrapS:un.CLAMP_TO_EDGE,wrapT:un.CLAMP_TO_EDGE,minificationFilter:Vt.LINEAR,magnificationFilter:ti.LINEAR}),this._nearestSampling=e)}}});function yRt(e){if(e===Dt.FLOAT32||e===Dt.FLOAT64)return je.FLOAT;if(e===Dt.UINT8)return je.UNSIGNED_BYTE}function xRt(e){switch(e){case 1:return Xe.RED;case 2:return Xe.RG;case 3:return Xe.RGB;case 4:return Xe.RGBA}}function bRt(e){this.index=e,this.nextNode=void 0,this.previousNode=void 0}x0.prototype.add=function(e){if(this.isFull())throw new _e("Trying to add when there are no empty spots");let t=this.emptyList;this.emptyList=this.emptyList.nextNode,l(this.emptyList)&&(this.emptyList.previousNode=void 0),t.nextNode=this.occupiedList,l(t.nextNode)&&(t.nextNode.previousNode=t),this.occupiedList=t;let n=t.index;return this.writeDataToTexture(n,e),this.occupiedCount++,n};x0.prototype.remove=function(e){if(e<0||e>=this.maximumTileCount)throw new _e("Megatexture index out of bounds");let t=this.nodes[e];l(t.previousNode)&&(t.previousNode.nextNode=t.nextNode),l(t.nextNode)&&(t.nextNode.previousNode=t.previousNode),t.nextNode=this.emptyList,l(t.nextNode)&&(t.nextNode.previousNode=t),t.previousNode=void 0,this.emptyList=t,this.occupiedCount--};x0.prototype.isFull=function(){return this.emptyList===void 0};x0.get3DTextureDimension=function(e,t,n,i){let{maximum3DTextureSize:o}=Rt;if(h.maximumComponent(e)>o)throw new re("The GL context does not support a 3D texture large enough to contain a tile with the given dimensions.");let r=t*e.x*e.y*e.z,a=Math.floor(n/r);if(a<1)throw new re("Not enough texture memory available to create a megatexture with the given tile dimensions.");l(i)?i=Math.min(i,a):i=a;let s=Object.entries(e).sort((f,d)=>d[1]-f[1]),c=s.map(([f,d])=>Math.floor(o/d));for(let f=0;f<3;f++){let d=E1e(c);if(d<i)break;let p=c.slice();p.splice(f,1);let g=p[0]*p[1],m=d-i,A=Math.floor(m/g);c[f]-=A}E1e(c)>a&&(c[2]=Math.floor(a/(c[0]*c[1])));let u=new h;for(let f=0;f<3;f++){let[d,p]=s[f];u[d]=c[f]*p}return u};function E1e(e){return e.reduce((t,n)=>t*n)}x0.prototype.writeDataToTexture=function(e,t){let{tileCounts:n,voxelCountPerTile:i}=this,o={arrayBufferView:t,width:i.x,height:i.y,depth:i.z},r=n.x*n.y,a=Math.floor(e/r),s=e-a*r,c=Math.floor(s/n.x),u=s-c*n.x,f={source:o,xOffset:u*i.x,yOffset:c*i.y,zOffset:a*i.z};this.texture.copyFrom(f)};x0.prototype.isDestroyed=function(){return!1};x0.prototype.destroy=function(){return this.texture=this.texture&&this.texture.destroy(),fe(this)};var _U=x0;function gh(e,t,n,i,o,r,a){this.children=void 0,this.parent=o,this.level=e,this.x=t,this.y=n,this.z=i,this.dimensions=h.clone(a),this.keyframeNodes=[],this.renderableKeyframeNodes=[],this.renderableKeyframeNodeLerp=0,this.renderableKeyframeNodePrevious=void 0,this.renderableKeyframeNodeNext=void 0,this.orientedBoundingBox=new Qt,this.approximateVoxelSize=0,this.screenSpaceError=0,this.visitedFrameNumber=-1,this.computeBoundingVolumes(r)}var CRt=new h;gh.prototype.computeBoundingVolumes=function(e){this.orientedBoundingBox=e.computeOrientedBoundingBoxForTile(this.level,this.x,this.y,this.z,this.orientedBoundingBox);let t=$.getScale(this.orientedBoundingBox.halfAxes,CRt),n=2*h.maximumComponent(t);this.approximateVoxelSize=n/h.minimumComponent(this.dimensions)};gh.prototype.constructChildNodes=function(e){let{level:t,x:n,y:i,z:o}=this,r=n*2,a=i*2,s=o*2,c=a+1,u=r+1,f=s+1,d=t+1,p=[[d,r,a,s],[d,u,a,s],[d,r,c,s],[d,u,c,s],[d,r,a,f],[d,u,a,f],[d,r,c,f],[d,u,c,f]];this.children=p.map(([g,m,A,y])=>new gh(g,m,A,y,this,e,this.dimensions))};gh.prototype.visibility=function(e,t){let n=this.orientedBoundingBox;return e.cullingVolume.computeVisibilityWithPlaneMask(n,t)};gh.prototype.computeScreenSpaceError=function(e,t){let n=this.orientedBoundingBox,i=Math.sqrt(n.distanceSquaredTo(e));i=Math.max(i,D.EPSILON7);let o=this.approximateVoxelSize,r=t*(o/i);this.screenSpaceError=r};var v1e={keyframe:0};function AU(e,t){return v1e.keyframe=e,_o(t,v1e,Bo.searchComparator)}gh.prototype.computeSurroundingRenderableKeyframeNodes=function(e){let t=this,n=t.level,i=Math.floor(e),o=Math.ceil(e),r,a,s=+Number.MAX_VALUE,c=+Number.MAX_VALUE;for(;l(t);){let{renderableKeyframeNodes:d}=t;if(d.length>=1){let p=TRt(i,d),g=d[p],m=o===i||i<g.keyframe?p:Math.min(p+1,d.length-1),A=d[m],y=i-g.keyframe,x=S1e(n-t.level,y);x<s&&(s=x,r=g);let b=A.keyframe-o,C=S1e(n-t.level,b);if(C<c&&(c=C,a=A),y===0&&b===0)break}t=t.parent}if(this.renderableKeyframeNodePrevious=r,this.renderableKeyframeNodeNext=a,!l(r)||!l(a))return;let u=r.keyframe,f=a.keyframe;this.renderableKeyframeNodeLerp=u===f?0:D.clamp((e-u)/(f-u),0,1)};function TRt(e,t){let n=AU(e,t);return n<0?D.clamp(~n-1,0,t.length-1):n}function S1e(e,t){let n=Math.exp(e*4),i=t>=0?1:-200;return e*n+t*i}gh.prototype.isVisited=function(e){return this.visitedFrameNumber===e};gh.prototype.createKeyframeNode=function(e){let t=AU(e,this.keyframeNodes);if(t<0){t=~t;let n=new Bo(this,e);this.keyframeNodes.splice(t,0,n)}};gh.prototype.destroyKeyframeNode=function(e,t){let n=e.keyframe,i=AU(n,this.keyframeNodes);if(i<0)throw new _e("Keyframe node does not exist.");if(this.keyframeNodes.splice(i,1),e.megatextureIndex!==-1){for(let r=0;r<t.length;r++)t[r].remove(e.megatextureIndex);let o=AU(n,this.renderableKeyframeNodes);if(o<0)throw new _e("Renderable keyframe node does not exist.");this.renderableKeyframeNodes.splice(o,1)}e.unload()};gh.prototype.addKeyframeNodeToMegatextures=function(e,t){if(e.megatextureIndex!==-1||e.content.metadata.length!==t.length)throw new _e("Keyframe node cannot be added to megatexture");let{metadata:n}=e.content;for(let r=0;r<t.length;r++){let a=t[r];e.megatextureIndex=a.add(n[r])}let i=this.renderableKeyframeNodes,o=AU(e.keyframe,i);if(o>=0)throw new _e("Keyframe already renderable");o=~o,i.splice(o,0,e)};gh.prototype.isRenderable=function(e){let t=this.renderableKeyframeNodePrevious,n=this.renderableKeyframeNodeNext,i=this.level;return l(t)&&l(n)&&(t.spatialNode.level===i||n.spatialNode.level===i)&&this.visitedFrameNumber===e};var yU=gh;function Yy(e,t,n,i){let{provider:o,dimensions:r,inputDimensions:a}=e,{types:s,componentTypes:c}=o;l(i)?i=Math.min(Math.max(0,i),512*1024*1024):i=128*1024*1024,this._primitive=e,this.textureMemoryByteLength=0,this.megatextures=new Array(s.length);let u=l(o.maximumTileCount)?o.maximumTileCount:l(o.availableLevels)?(8**o.availableLevels-1)/7:void 0;for(let x=0;x<s.length;x++){let b=s[x],C=dt.getComponentCount(b),E=c[x];this.megatextures[x]=new _U(t,a,C,E,i,u),this.textureMemoryByteLength+=this.megatextures[x].textureMemoryByteLength}let f=this.megatextures[0].maximumTileCount;this._simultaneousRequestCount=0,this._debugPrint=!1,this._calculateStatistics=this._primitive._calculateStatistics??!1,this._frameNumber=0;let d=e._shape;this.rootNode=new yU(0,0,0,0,void 0,d,r),this._priorityQueue=new O_({maximumLength:f,comparator:Bo.priorityComparator}),this._highPriorityKeyframeNodes=new Array(f),this._highPriorityKeyframeNodeCount=0,this._keyframeNodesInMegatexture=new Array(f),this._keyframeCount=n,this._sampleCount=void 0,this._keyframeLocation=0,this._binaryTreeKeyframeWeighting=new Array(n),this._initialTilesLoaded=!1;let p=this._binaryTreeKeyframeWeighting;p[0]=0,p[n-1]=0,One(p,1,n-2,0);let g=9,m=2048,A=Math.floor(m/g),y=Math.ceil(f/A);this.internalNodeTexture=new It({context:t,pixelFormat:Xe.RGBA,pixelDatatype:je.UNSIGNED_BYTE,flipY:!1,width:m,height:y,sampler:new jt({minificationFilter:Vt.NEAREST,magnificationFilter:ti.NEAREST})}),this.internalNodeTilesPerRow=A,this.internalNodeTexelSizeUv=new z(1/m,1/y),this.leafNodeTexture=void 0,this.leafNodeTilesPerRow=void 0,this.leafNodeTexelSizeUv=new z}Yy.prototype.findKeyframeNode=function(e){return this._keyframeNodesInMegatexture.find(function(t){return t.megatextureIndex===e})};function One(e,t,n,i){if(t>n)return;let o=Math.floor((t+n)/2);e[o]=i,One(e,t,o-1,i+1),One(e,o+1,n,i+1)}Yy.simultaneousRequestCountMaximum=50;Yy.prototype.update=function(e,t,n,i){let o=this._primitive,r=e.context,a=this.megatextures[0].maximumTileCount,s=this._keyframeCount,c=o._levelBlendFactor,u=c>0,f=s>1,d=(u?2:1)*(f?2:1);this._sampleCount=d;let p=d>=2;if(p&&!l(this.leafNodeTexture)){let C=Math.floor(512),E=Math.ceil(a/C);this.leafNodeTexture=new It({context:r,pixelFormat:Xe.RGBA,pixelDatatype:je.UNSIGNED_BYTE,flipY:!1,width:1024,height:E,sampler:new jt({minificationFilter:Vt.NEAREST,magnificationFilter:ti.NEAREST})}),this.leafNodeTexelSizeUv=z.fromElements(1/1024,1/E,this.leafNodeTexelSizeUv),this.leafNodeTilesPerRow=C}else!p&&l(this.leafNodeTexture)&&(this.leafNodeTexture=this.leafNodeTexture.destroy());if(this._keyframeLocation=D.clamp(t,0,s-1),n&&w1e(this,this.rootNode),i)return;this._frameNumber=e.frameNumber;let g=Fi();SRt(this,e),wRt(this,e);let m=Fi();ORt(this,d,c);let A=Fi(),y=o.loadProgress.numberOfListeners>0||o.allTilesLoaded.numberOfListeners>0||o.initialTilesLoaded.numberOfListeners>0;if(this._debugPrint||this._calculateStatistics||y){let x=m-g,b=A-m,C=A-g;RRt(this,e,x,b,C)}};Yy.prototype.isRenderable=function(e){return e.isRenderable(this._frameNumber)};Yy.prototype.isDestroyed=function(){return!1};Yy.prototype.destroy=function(){let e=this.megatextures,t=e.length;for(let n=0;n<t;n++)e[n]=e[n]&&e[n].destroy();return this.textureMemoryByteLength=0,this.internalNodeTexture=this.internalNodeTexture&&this.internalNodeTexture.destroy(),this.leafNodeTexture=this.leafNodeTexture&&this.leafNodeTexture.destroy(),fe(this)};function w1e(e,t){if(t.computeBoundingVolumes(e._primitive._shape),l(t.children))for(let n=0;n<8;n++){let i=t.children[n];w1e(e,i)}}function ERt(e,t){if(e._simultaneousRequestCount>=Yy.simultaneousRequestCountMaximum)return;let i=e._primitive.provider,{keyframe:o,spatialNode:r}=t;if(l(i.availableLevels)&&r.level>=i.availableLevels)return;function a(f){e._simultaneousRequestCount--,t.content=f,t.state=l(f)?Bo.LoadState.PROCESSING:Bo.LoadState.UNAVAILABLE}function s(f){e._simultaneousRequestCount--,t.state=Bo.LoadState.FAILED,e._primitive.tileFailed.raiseEvent()}let c={tileLevel:r.level,tileX:r.x,tileY:r.y,tileZ:r.z,keyframe:o},u=i.requestData(c);l(u)&&(e._simultaneousRequestCount++,t.state=Bo.LoadState.RECEIVING,u.then(a).catch(s))}function vRt(e){return e/(1+e)}function SRt(e,t){let n=e._frameNumber,i=e._priorityQueue;i.reset(),I1e(e.rootNode,Ka.MASK_INDETERMINATE,e,t);let o=e._highPriorityKeyframeNodes,r=0,a;for(;i.length>0;)a=i.removeMaximum(),a.highPriorityFrameNumber=n,o[r]=a,r++;e._highPriorityKeyframeNodeCount=r}function wRt(e,t){let n=e.megatextures[0],i=n.occupiedCount,o=e._keyframeNodesInMegatexture;o.length=i,o.sort(IRt);let r=e._highPriorityKeyframeNodes,a=e._highPriorityKeyframeNodeCount,s=0,c=0;for(let u=0;u<a;u++){let f=r[u];if(!(f.state===Bo.LoadState.LOADED||f.spatialNode===void 0)&&(f.state===Bo.LoadState.UNLOADED&&ERt(e,f),f.state===Bo.LoadState.PROCESSING)){let{content:d}=f;if(d.update(e._primitive,t),!d.ready)continue;if(!DRt(d.metadata,e)){f.content=void 0,f.state=Bo.LoadState.FAILED,e._primitive.tileFailed.raiseEvent();continue}let p=0;if(n.isFull()){p=i-1-s,s++;let g=o[p];e._primitive.tileUnload.raiseEvent(),g.spatialNode.destroyKeyframeNode(g,e.megatextures)}else p=i+c,c++;f.spatialNode.addKeyframeNodeToMegatextures(f,e.megatextures),f.state=Bo.LoadState.LOADED,o[p]=f,e._primitive.tileLoad.raiseEvent()}}}function IRt(e,t){return e.highPriorityFrameNumber===t.highPriorityFrameNumber?t.priority-e.priority:t.highPriorityFrameNumber-e.highPriorityFrameNumber}function DRt(e,t){let n=t._primitive.provider.types.length;if(!Array.isArray(e)||e.length!==n)return!1;let{megatextures:i}=t;for(let o=0;o<n;o++){let{voxelCountPerTile:r,channelCount:a}=i[o],{x:s,y:c,z:u}=r,f=s*c*u,d=e[o],p=f*a;if(d.length!==p)return!1}return!0}function I1e(e,t,n,i){let{camera:o,context:r,pixelRatio:a,frameNumber:s}=i,{positionWC:c,frustum:u}=o,d=r.drawingBufferHeight/a/u.sseDenominator;if(e.computeScreenSpaceError(c,d),t=e.visibility(i,t),t===Ka.MASK_OUTSIDE)return;e.visitedFrameNumber=s;let p=n._primitive,g=p._shape,m=p.screenSpaceError,A=n._priorityQueue,y=n._keyframeCount,x=D.clamp(Math.floor(n._keyframeLocation),0,y-2),b=x+1;if(y===1)e.createKeyframeNode(0);else if(e.keyframeNodes.length!==y)for(let P=0;P<y;P++)e.createKeyframeNode(P);let{screenSpaceError:C,keyframeNodes:E}=e,S=vRt(C),w=!1;for(let P=0;P<E.length;P++){let R=E[P];R.priority=10*S+PRt(x,R.keyframe,b,n),R.state!==Bo.LoadState.UNAVAILABLE&&R.state!==Bo.LoadState.FAILED&&R.priority!==-Number.MAX_VALUE&&A.insert(R),R.state===Bo.LoadState.LOADED&&(w=!0)}if(C<m||!w){e.children=void 0;return}l(e.children)||e.constructChildNodes(g);for(let P=0;P<8;P++){let R=e.children[P];I1e(R,t,n,i)}}function PRt(e,t,n,i){let o=Math.min(Math.abs(t-e),Math.abs(t-n)),r=Math.max(e,i._keyframeCount-n-1,1),a=Math.pow(1-o/r,4),s=Math.exp(-i._binaryTreeKeyframeWeighting[t]);return D.lerp(s,a,.15+.85*a)}function RRt(e,t,n,i,o){let r=e._keyframeCount,a=e.rootNode,s=Object.keys(Bo.LoadState).length,c=new Array(s),u=new Array(s),f=0;for(let w=0;w<s;w++){let P=new Array(r).fill(0);c[w]=P,u[w]=0}function d(w){let P=w.keyframeNodes;for(let R=0;R<P.length;R++){let B=P[R],L=B.keyframe,_=B.state;c[_][L]+=1,u[_]+=1,f++}if(l(w.children))for(let R=0;R<8;R++){let B=w.children[R];d(B)}}d(a),e._primitive.statistics.numberOfTilesWithContentReady=u[Bo.LoadState.LOADED],e._primitive.statistics.visited=f;let p=u[Bo.LoadState.RECEIVING],g=u[Bo.LoadState.PROCESSING],m=p!==e._primitive.statistics.numberOfPendingRequests||g!==e._primitive.statistics.numberOfTilesProcessing;if(m&&t.afterRender.push(function(){return e._primitive.loadProgress.raiseEvent(p,g),!0}),e._primitive.statistics.numberOfPendingRequests=p,e._primitive.statistics.numberOfTilesProcessing=g,m&&(p===0&&g===0)&&(t.afterRender.push(function(){return e._primitive.allTilesLoaded.raiseEvent(),!0}),e._initialTilesLoaded||(e._initialTilesLoaded=!0,t.afterRender.push(function(){return e._primitive.initialTilesLoaded.raiseEvent(),!0}))),!e._debugPrint)return;let y=`KEYFRAMES: ${c[Bo.LoadState.LOADED]}`,x=`UNLOADED: ${u[Bo.LoadState.UNLOADED]} | RECEIVING: ${u[Bo.LoadState.RECEIVING]} | PROCESSING: ${u[Bo.LoadState.PROCESSING]} | LOADED: ${u[Bo.LoadState.LOADED]} | FAILED: ${u[Bo.LoadState.FAILED]} | UNAVAILABLE: ${u[Bo.LoadState.UNAVAILABLE]} | TOTAL: ${f}`,b=Math.round(n*100)/100,C=Math.round(i*100)/100,E=Math.round(o*100)/100,S=`LOAD: ${b} | OCT: ${C} | ALL: ${E}`;console.log(`${y} || ${x} || ${S}`)}var V5={INTERNAL:0,LEAF:1,PACKED_LEAF_FROM_PARENT:2};function ORt(e,t,n){let i=e._primitive._screenSpaceError,o=e._keyframeLocation,r=e._frameNumber,a=t>=2,s=0,c=0,u=[],f=[];function d(g,m,A,y,x){let b=!1;if(l(g.children))for(let C=0;C<8;C++){let E=g.children[C];E.computeSurroundingRenderableKeyframeNodes(o),E.isRenderable(r)&&(b=!0)}if(b){u[x]=V5.INTERNAL<<16|m,u[A]=y,s++,y=m,x=y*9+1;for(let C=0;C<8;C++){let E=g.children[C];m=s,A=m*9+0,d(E,m,A,y,x+C)}}else{if(e._primitive.tileVisible.raiseEvent(),a){let C=c*5,E=g.renderableKeyframeNodePrevious,S=g.level-E.spatialNode.level,w=E.spatialNode.parent,P=l(w)?w.renderableKeyframeNodePrevious:E,R=MRt(g,i,n),B=S,L=1,_=E.megatextureIndex,T=P.megatextureIndex;f[C+0]=R,f[C+1]=B,f[C+2]=L,f[C+3]=_,f[C+4]=T,u[x]=V5.LEAF<<16|c}else{let C=g.renderableKeyframeNodePrevious,S=g.level-C.spatialNode.level===0?V5.LEAF:V5.PACKED_LEAF_FROM_PARENT;u[x]=S<<16|C.megatextureIndex}c++}}let p=e.rootNode;p.computeSurroundingRenderableKeyframeNodes(o),p.isRenderable(r)&&d(p,0,0,0,0),BRt(u,9,e.internalNodeTilesPerRow,e.internalNodeTexture),a&&LRt(f,2,e.leafNodeTilesPerRow,e.leafNodeTexture)}function MRt(e,t,n){if(e.parent===void 0)return 0;let i=e.screenSpaceError,o=e.parent.screenSpaceError,a=((t-i)/(o-i)+n-1)/n;return D.clamp(a,0,1)}function BRt(e,t,n,i){let o=Xe.componentsLength(i.pixelFormat),r=Math.ceil(e.length/t),a=Math.max(1,t*Math.min(r,n)),s=Math.max(1,Math.ceil(r/n)),c=new Uint8Array(a*s*o);for(let d=0;d<e.length;d++){let p=e[d],g=d*o;for(let m=0;m<o;m++)c[g+m]=p>>>m*8&255}let f={source:{arrayBufferView:c,width:a,height:s},xOffset:0,yOffset:0};i.copyFrom(f)}function LRt(e,t,n,i){let o=Xe.componentsLength(i.pixelFormat),r=5,a=Math.ceil(e.length/r),s=Math.max(1,t*Math.min(a,n)),c=Math.max(1,Math.ceil(a/n)),u=new Uint8Array(s*c*o);for(let p=0;p<a;p++){let g=e[p*r+0],m=e[p*r+1],A=e[p*r+2],y=e[p*r+3],x=e[p*r+4],b=D.clamp(Math.floor(65536*g),0,65535);u[p*8+0]=b>>>0&255,u[p*8+1]=b>>>8&255,u[p*8+2]=m&255,u[p*8+3]=A&255,u[p*8+4]=y>>>0&255,u[p*8+5]=y>>>8&255,u[p*8+6]=x>>>0&255,u[p*8+7]=x>>>8&255}let d={source:{arrayBufferView:u,width:s,height:c},xOffset:0,yOffset:0};i.copyFrom(d)}var xU=Yy;function b0(e){e=e??G.EMPTY_OBJECT;let{provider:t=b0.DefaultProvider,modelMatrix:n=M.IDENTITY,customShader:i=dI(t),clock:o,calculateStatistics:r=!1}=e;this._ready=!1,this._provider=t,this._traversal=void 0,this._statistics=new _m,this._calculateStatistics=r;let{shape:a,minBounds:s=Ac.getMinBounds(a),maxBounds:c=Ac.getMaxBounds(a),dimensions:u,paddingBefore:f=h.ZERO,paddingAfter:d=h.ZERO,metadataOrder:p,availableLevels:g=1}=t;this._dimensions=h.clone(u),this._paddingBefore=h.clone(f),this._paddingAfter=h.clone(d),this._inputDimensions=NRt(u,f,d,p),this._availableLevels=g,this._minBounds=s.clone(),this._minBoundsOld=new h,this._maxBounds=c.clone(),this._maxBoundsOld=new h,this._minClippingBounds=s.clone(),this._minClippingBoundsOld=new h,this._maxClippingBounds=c.clone(),this._maxClippingBoundsOld=new h,this._verticalExaggeration=1,this._verticalExaggerationRelativeHeight=0,this._clippingPlanes=void 0,this._clippingPlanesState=0,this._clippingPlanesEnabled=!1,this._modelMatrix=M.clone(n),this._modelMatrixOld=M.clone(this._modelMatrix),this._customShader=i??b0.DefaultCustomShader,this._customShaderCompilationEvent=new ye,this._shaderDirty=!0,this._drawCommand=void 0,this._drawCommandPick=void 0,this._pickId=void 0,this._clock=o,this._transformPositionLocalToWorld=new M,this._transformPositionWorldToLocal=new M,this._transformPlaneLocalToView=new M,this._transformDirectionWorldToLocal=new $,this._nearestSampling=!1,this._levelBlendFactor=0,this._stepSizeMultiplier=1,this._depthTest=!0,this._useLogDepth=void 0,this._screenSpaceError=4,this._debugPolylines=new um,this._debugDraw=!1,this._disableRender=!1,this._disableUpdate=!1;let m=Ac.getShapeConstructor(a);this._shape=new m,P1e(this),this._shapeVisible=R1e(this),this._uniforms={octreeInternalNodeTexture:void 0,octreeInternalNodeTilesPerRow:0,octreeInternalNodeTexelSizeUv:new z,octreeLeafNodeTexture:void 0,octreeLeafNodeTilesPerRow:0,octreeLeafNodeTexelSizeUv:new z,megatextureTextures:[],megatextureTileCounts:new h,dimensions:this._dimensions,inputDimensions:this._inputDimensions,paddingBefore:this._paddingBefore,paddingAfter:this._paddingAfter,transformPositionViewToLocal:new M,transformDirectionViewToLocal:new $,cameraPositionLocal:new h,cameraDirectionLocal:new h,cameraTileCoordinates:new se,cameraTileUv:new h,ndcSpaceAxisAlignedBoundingBox:new se,clippingPlanesTexture:void 0,clippingPlanesMatrix:new M,renderBoundPlanesTexture:void 0,stepSize:this._stepSizeMultiplier,pickColor:new V},this._shapeDefinesOld={},this._uniformMap={};let A=this._uniforms,y=this._uniformMap;for(let x in A)if(A.hasOwnProperty(x)){let b=`u_${x}`;y[b]=function(){return A[x]}}FRt(this,this._shape),this.tileLoad=new ye,this.tileVisible=new ye,this.tileFailed=new ye,this.tileUnload=new ye,this.loadProgress=new ye,this.allTilesLoaded=new ye,this.initialTilesLoaded=new ye}function NRt(e,t,n,i){let o=h.add(e,t,new h);if(h.add(o,n,o),i===y0.Y_UP){let r=o.y;o.y=o.z,o.z=r}return o}function FRt(e,t){let n=e._uniformMap,{shaderUniforms:i,shaderDefines:o}=t;for(let r in i)if(i.hasOwnProperty(r)){let a=`u_${r}`;n[a]=function(){return i[r]}}e._shapeDefinesOld=We(o,!0)}Object.defineProperties(b0.prototype,{ready:{get:function(){return this._ready}},provider:{get:function(){return this._provider}},boundingSphere:{get:function(){return this._shape.boundingSphere}},orientedBoundingBox:{get:function(){return this._shape.orientedBoundingBox}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix=M.clone(e,this._modelMatrix)}},shape:{get:function(){return this._provider.shape}},dimensions:{get:function(){return this._dimensions}},inputDimensions:{get:function(){return this._inputDimensions}},paddingBefore:{get:function(){return this._paddingBefore}},paddingAfter:{get:function(){return this._paddingAfter}},minimumValues:{get:function(){return this._provider.minimumValues}},maximumValues:{get:function(){return this._provider.maximumValues}},show:{get:function(){return!this._disableRender},set:function(e){this._disableRender=!e}},disableUpdate:{get:function(){return this._disableUpdate},set:function(e){this._disableUpdate=e}},debugDraw:{get:function(){return this._debugDraw},set:function(e){this._debugDraw=e}},depthTest:{get:function(){return this._depthTest},set:function(e){this._depthTest!==e&&(this._depthTest=e,this._shaderDirty=!0)}},nearestSampling:{get:function(){return this._nearestSampling},set:function(e){this._nearestSampling=e}},levelBlendFactor:{get:function(){return this._levelBlendFactor},set:function(e){this._levelBlendFactor=D.clamp(e,0,1)}},screenSpaceError:{get:function(){return this._screenSpaceError},set:function(e){this._screenSpaceError=e}},stepSize:{get:function(){return this._stepSizeMultiplier},set:function(e){this._stepSizeMultiplier=e}},minBounds:{get:function(){return this._minBounds},set:function(e){this._minBounds=h.clone(e,this._minBounds)}},maxBounds:{get:function(){return this._maxBounds},set:function(e){this._maxBounds=h.clone(e,this._maxBounds)}},minClippingBounds:{get:function(){return this._minClippingBounds},set:function(e){this._minClippingBounds=h.clone(e,this._minClippingBounds)}},maxClippingBounds:{get:function(){return this._maxClippingBounds},set:function(e){this._maxClippingBounds=h.clone(e,this._maxClippingBounds)}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){ma.setOwner(e,this,"_clippingPlanes")}},customShader:{get:function(){return this._customShader},set:function(e){if(e===this._customShader)return;let t=this._uniformMap,i=this._customShader.uniformMap;for(let o in i)i.hasOwnProperty(o)&&delete t[o];if(l(e))this._customShader=e;else{let o=dI(this._provider);this._customShader=o??b0.DefaultCustomShader}this._shaderDirty=!0}},customShaderCompilationEvent:{get:function(){return this._customShaderCompilationEvent}},statistics:{get:function(){return this._statistics}}});var kRt=new se,zRt=new se,URt=new M,VRt=new M,jRt=new h,GRt=new se;b0.prototype.update=function(e){let t=this._provider,n=this._uniforms;this._customShader.update(e);let i=e.context;if(!this._ready){QRt(this,t,i),e.afterRender.push(()=>(this._ready=!0,!0));return}let o=P1e(this),r=KRt(this,e);if((o||r)&&(this._shapeVisible=R1e(this),aOt(this)&&(this._shaderDirty=!0)),!this._shapeVisible)return;this._shape.updateViewTransforms(e);let a=sOt(t.timeIntervalCollection,this._clock),s=this._traversal,c=s._sampleCount;if(s.update(e,a,o,this._disableUpdate),c!==s._sampleCount&&(this._shaderDirty=!0),!s.isRenderable(s.rootNode)||(this._debugDraw&&pOt(this,e),this._disableRender))return;this._useLogDepth!==e.useLogDepth&&(this._useLogDepth=e.useLogDepth,this._shaderDirty=!0),cOt(this,e)&&(this._shaderDirty=!0);let f=s.leafNodeTexture;l(f)&&(n.octreeLeafNodeTexture=s.leafNodeTexture,n.octreeLeafNodeTexelSizeUv=z.clone(s.leafNodeTexelSizeUv,n.octreeLeafNodeTexelSizeUv),n.octreeLeafNodeTilesPerRow=s.leafNodeTilesPerRow),this._shaderDirty&&(dU(this,i),this._shaderDirty=!1);let d=i.uniformState.viewProjection,{orientedBoundingBox:p}=this._shape,g=fOt(p,d,zRt);if(g.x===1||g.y===1||g.z===-1||g.w===-1)return;n.ndcSpaceAxisAlignedBoundingBox=se.clone(g,n.ndcSpaceAxisAlignedBoundingBox);let A=i.uniformState.inverseView,y=M.multiplyTransformation(this._transformPositionWorldToLocal,A,n.transformPositionViewToLocal);this._transformPlaneLocalToView=M.transpose(y,this._transformPlaneLocalToView);let x=i.uniformState.inverseViewRotation;n.transformDirectionViewToLocal=$.multiply(this._transformDirectionWorldToLocal,x,n.transformDirectionViewToLocal),n.cameraPositionLocal=M.multiplyByPoint(this._transformPositionWorldToLocal,e.camera.positionWC,n.cameraPositionLocal),n.cameraDirectionLocal=$.multiplyByVector(this._transformDirectionWorldToLocal,e.camera.directionWC,n.cameraDirectionLocal);let b=qRt(this,n.cameraPositionLocal,GRt);n.cameraTileCoordinates=se.fromElements(Math.floor(b.x),Math.floor(b.y),Math.floor(b.z),b.w,n.cameraTileCoordinates),n.cameraTileUv=h.fromElements(b.x-Math.floor(b.x),b.y-Math.floor(b.y),b.z-Math.floor(b.z),n.cameraTileUv),n.stepSize=this._stepSizeMultiplier,HRt(this),WRt(this,e);let C=e.passes.pick?this._drawCommandPick:e.passes.pickVoxel?this._drawCommandPickVoxel:this._drawCommand;C.boundingVolume=this._shape.boundingSphere,e.commandList.push(C)};function HRt(e){let{megatextures:t}=e._traversal;for(let n=0;n<t.length;++n)t[n].nearestSampling=e._nearestSampling}function WRt(e,t){let n=e._uniforms,{renderBoundPlanes:i}=e._shape;l(i)&&(i.update(t,e._transformPlaneLocalToView),n.renderBoundPlanesTexture=i.texture)}function qRt(e,t,n){let i=e._shape.convertLocalToShapeUvSpace(t,jRt),o=e._availableLevels,r=2**(o-1);return se.fromElements(i.x*r,i.y*r,i.z*r,o-1,n)}var YRt=new h,Mne=new h,XRt=new de;function KRt(e,t){let{verticalExaggeration:n,verticalExaggerationRelativeHeight:i}=t;return e._verticalExaggeration===n&&e._verticalExaggerationRelativeHeight===i?!1:(e._verticalExaggeration=n,e._verticalExaggerationRelativeHeight=i,!0)}function QRt(e,t,n){let i=e._uniforms;e._pickId=n.createPickId({primitive:e}),i.pickColor=V.clone(e._pickId.color,i.pickColor);let o=t.keyframeCount??1;e._traversal=new xU(e,n,o),e.statistics.texturesByteLength=e._traversal.textureMemoryByteLength,rOt(e._traversal,i)}function P1e(e){return bU(e,"_modelMatrix","_modelMatrixOld")+bU(e,"_minBounds","_minBoundsOld")+bU(e,"_maxBounds","_maxBoundsOld")+bU(e,"_minClippingBounds","_minClippingBoundsOld")+bU(e,"_maxClippingBounds","_maxClippingBoundsOld")>0}function bU(e,t,n){let i=e[t],o=e[n],r=!i.equals(o);return r&&i.clone(o),r?1:0}var $Rt=new h,JRt=new h,ZRt=new h,eOt=new h,tOt=new M,nOt=new M;function R1e(e){let t=e._verticalExaggeration,n=e._verticalExaggerationRelativeHeight,i=h.clone(e._minBounds,$Rt),o=h.clone(e._maxBounds,JRt),r=h.clone(e._minClippingBounds,ZRt),a=h.clone(e._maxClippingBounds,eOt),s=M.clone(e._modelMatrix,tOt);if(e.shape===Ac.ELLIPSOID)i.z=so.getHeight(e._minBounds.z,t,n),o.z=so.getHeight(e._maxBounds.z,t,n),r.z=so.getHeight(e._minClippingBounds.z,t,n),a.z=so.getHeight(e._maxClippingBounds.z,t,n);else{let m=h.fromElements(1,1,t,YRt);M.multiplyByScale(s,m,s),M.multiplyByTranslation(s,oOt(e),s)}let c=e._provider,u=c.shapeTransform??M.IDENTITY,f=c.globalTransform??M.IDENTITY,d=M.multiplyTransformation(f,s,nOt);M.multiplyTransformation(d,u,d);let p=e._shape;return p.update(d,i,o,r,a)?(e._transformPositionLocalToWorld=M.clone(p.shapeTransform,e._transformPositionLocalToWorld),e._transformPositionWorldToLocal=M.inverse(e._transformPositionLocalToWorld,e._transformPositionWorldToLocal),e._transformDirectionWorldToLocal=M.getMatrix3(e._transformPositionWorldToLocal,e._transformDirectionWorldToLocal),!0):!1}var iOt=new h;function oOt(e){let t=e._verticalExaggeration,n=e._verticalExaggerationRelativeHeight,{shapeTransform:i=M.IDENTITY,globalTransform:o=M.IDENTITY}=e._provider,r=M.getTranslation(i,Mne),a=M.multiplyByPoint(e._modelMatrix,r,Mne),s=M.multiplyByPoint(o,a,Mne),u=te.WGS84.cartesianToCartographic(s,XRt),f=0;l(u)&&(f=u.height);let d=so.getHeight(f,t,n);return h.fromElements(0,0,(d-f)/t,iOt)}function rOt(e,t){t.octreeInternalNodeTexture=e.internalNodeTexture,t.octreeInternalNodeTexelSizeUv=z.clone(e.internalNodeTexelSizeUv,t.octreeInternalNodeTexelSizeUv),t.octreeInternalNodeTilesPerRow=e.internalNodeTilesPerRow;let{megatextures:n}=e,i=n[0];t.megatextureTextures=new Array(n.length);for(let o=0;o<n.length;o++)t.megatextureTextures[o]=n[o].texture;t.megatextureTileCounts=h.clone(i.tileCounts,t.megatextureTileCounts)}function aOt(e){let{shaderDefines:t}=e._shape,n=Object.keys(t).some(i=>t[i]!==e._shapeDefinesOld[i]);return n&&(e._shapeDefinesOld=We(t,!0)),n}function sOt(e,t){if(!l(e)||!l(t))return 0;let n=t.currentTime,i,o=e.indexOf(n);o>=0?i=e.get(o):(o=~o,o===e.length?(o=e.length-1,i=e.get(o),n=i.stop):(i=e.get(o),n=i.start));let r=Q.secondsDifference(i.stop,i.start),s=Q.secondsDifference(n,i.start)/r;return o+s}function cOt(e,t){let n=e.clippingPlanes;if(!l(n))return!1;n.update(t);let{clippingPlanesState:i,enabled:o}=n;if(o){let r=e._uniforms;r.clippingPlanesTexture=n.texture,r.clippingPlanesMatrix=M.transpose(M.multiplyTransformation(M.inverse(n.modelMatrix,r.clippingPlanesMatrix),e._transformPositionLocalToWorld,r.clippingPlanesMatrix),r.clippingPlanesMatrix)}return e._clippingPlanesState===i&&e._clippingPlanesEnabled===o?!1:(e._clippingPlanesState=i,e._clippingPlanesEnabled=o,!0)}b0.prototype.isDestroyed=function(){return!1};b0.prototype.destroy=function(){let e=this._drawCommand;l(e)&&(e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy());let t=this._drawCommandPick;return l(t)&&(t.shaderProgram=t.shaderProgram&&t.shaderProgram.destroy()),this._pickId=this._pickId&&this._pickId.destroy(),this._traversal=this._traversal&&this._traversal.destroy(),this.statistics.texturesByteLength=0,this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),fe(this)};var D1e=new Array(new se(-1,-1,-1,1),new se(1,-1,-1,1),new se(-1,1,-1,1),new se(1,1,-1,1),new se(-1,-1,1,1),new se(1,-1,1,1),new se(-1,1,1,1),new se(1,1,1,1)),lOt=new Array(1,2,4,0,3,5,0,3,6,1,2,7,0,5,6,1,4,7,2,4,7,3,5,6),uOt=new Array(new se,new se,new se,new se,new se,new se,new se,new se);function fOt(e,t,n){let i=M.fromRotationTranslation(e.halfAxes,e.center,URt),o=M.multiply(t,i,VRt),r=+Number.MAX_VALUE,a=-Number.MAX_VALUE,s=+Number.MAX_VALUE,c=-Number.MAX_VALUE,u,f=uOt,d=D1e.length;for(u=0;u<d;u++)M.multiplyByVector(o,D1e[u],f[u]);for(u=0;u<d;u++){let p=f[u];if(p.z>=-p.w){let g=p.x/p.w,m=p.y/p.w;r=Math.min(r,g),a=Math.max(a,g),s=Math.min(s,m),c=Math.max(c,m)}else for(let g=0;g<3;g++){let m=lOt[u*3+g],A=f[m];if(A.z>=-A.w){let y=p.z+p.w,x=A.z+A.w,b=y/(y-x),C=se.lerp(p,A,b,kRt),E=C.x/C.w,S=C.y/C.w;r=Math.min(r,E),a=Math.max(a,E),s=Math.min(s,S),c=Math.max(c,S)}}}return r=D.clamp(r,-1,1),s=D.clamp(s,-1,1),a=D.clamp(a,-1,1),c=D.clamp(c,-1,1),n=se.fromElements(r,s,a,c,n),n}var Bne=3e7,dOt=new h(Bne,0,0),hOt=new h(0,Bne,0),mOt=new h(0,0,Bne);function pOt(e,t){let n=e._traversal,i=e._debugPolylines;i.removeAll();function o(c,u,f,d){i.add({positions:[c,u],width:d,material:Hi.fromType("Color",{color:f})})}function r(c,u,f){let d=c.computeCorners();o(d[0],d[1],u,f),o(d[2],d[3],u,f),o(d[4],d[5],u,f),o(d[6],d[7],u,f),o(d[0],d[2],u,f),o(d[4],d[6],u,f),o(d[1],d[3],u,f),o(d[5],d[7],u,f),o(d[0],d[4],u,f),o(d[2],d[6],u,f),o(d[1],d[5],u,f),o(d[3],d[7],u,f)}function a(c){if(!n.isRenderable(c))return;let u=c.level,d=Math.max(1,5/Math.pow(2,u)),g=[V.RED,V.LIME,V.BLUE][u%3];if(r(c.orientedBoundingBox,g,d),l(c.children))for(let m=0;m<8;m++)a(c.children[m])}r(e._shape.orientedBoundingBox,V.WHITE,5),a(n.rootNode);let s=10;o(h.ZERO,dOt,V.RED,s),o(h.ZERO,hOt,V.LIME,s),o(h.ZERO,mOt,V.BLUE,s),i.update(t)}b0.DefaultCustomShader=new A0({fragmentShaderText:`void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material)
- {
- vec3 voxelNormal = fsInput.attributes.normalEC;
- float diffuse = max(0.0, dot(voxelNormal, czm_lightDirectionEC));
- float lighting = 0.5 + 0.5 * diffuse;
- material.diffuse = vec3(lighting);
- material.alpha = 1.0;
- }`});function O1e(){this.shape=Ac.BOX,this.dimensions=new h(1,1,1),this.names=["data"],this.types=[dt.SCALAR],this.componentTypes=[Dt.FLOAT32],this.maximumTileCount=1}O1e.prototype.requestData=function(e){if((l(e)?e.tileLevel??0:0)>=1)return;let n=new PT({metadata:[new Float32Array(1)]});return Promise.resolve(n)};b0.DefaultProvider=new O1e;var Xy=b0;function gOt(e,t,n,i){if(!l(e)||l(t)&&e.id!==t)return;let r=(e.classes||{})[n];if(!l(r))return;let s=(r.properties||{})[i];if(l(s))return s}var CU=gOt;function _Ot(e,t,n,i,o){this.schemaId=e,this.className=t,this.propertyName=n,this.classProperty=i,this.metadataProperty=o}var TU=_Ot;function AOt(e,t,n){if(!l(e))return;let i=e.propertyTextures;for(let o of i)if(o.class.id===t){let s=o.properties[n];if(l(s))return s}}var EU=AOt;var G5=function(e){return function(){e.frameState.afterRender.push(function(){e.requestRender()})}};function Ai(e){e=e??G.EMPTY_OBJECT;let t=e.canvas,n=e.creditContainer,i=e.creditViewport,o=e.contextOptions instanceof CR;if(o)this._context=e.contextOptions.createSceneContext(t);else{let u=We(e.contextOptions);this._context=new Px(t,u)}let r=this._context,a=l(n);a||(n=document.createElement("div"),n.style.position="absolute",n.style.bottom="0",n.style["text-shadow"]="0 0 2px #000000",n.style.color="#ffffff",n.style["font-size"]="10px",n.style["padding-right"]="5px",t.parentNode.appendChild(n)),l(i)||(i=t.parentNode),this._id=jn(),this._jobScheduler=new W3,this._frameState=new G3(r,new O3(n,"\u2022",i),this._jobScheduler),this._frameState.scene3DOnly=e.scene3DOnly??!1,this._removeCreditContainer=!a,this._creditContainer=n,this._canvas=t,this._computeEngine=new mD(r),this._ellipsoid=e.ellipsoid??te.default,this._globe=void 0,this._globeTranslucencyState=new H3,this._primitives=new su({countReferences:o}),this._groundPrimitives=new su({countReferences:o}),this._globeHeight=void 0,this._globeHeightDirty=!0,this._cameraUnderground=!1,this._removeUpdateHeightCallback=void 0,this._logDepthBuffer=Ai.defaultLogDepthBuffer&&r.fragmentDepth,this._logDepthBufferDirty=!0,this._tweens=new vT,this._shaderFrameCount=0,this._sunPostProcess=void 0,this._computeCommandList=[],this._overlayCommandList=[],this._useOIT=e.orderIndependentTranslucency??!0,this._executeOITFunction=void 0,this._depthPlane=new U3(e.depthPlaneEllipsoidOffset),this._clearColorCommand=new ai({color:new V,stencil:0,owner:this}),this._depthClearCommand=new ai({depth:1,owner:this}),this._stencilClearCommand=new ai({stencil:0}),this._classificationStencilClearCommand=new ai({stencil:0,renderState:Ve.fromCache({stencilMask:Gt.CLASSIFICATION_MASK})}),this._depthOnlyRenderStateCache={},this._transitioner=new Bz(this),this._preUpdate=new ye,this._postUpdate=new ye,this._renderError=new ye,this._preRender=new ye,this._postRender=new ye,this._minimumDisableDepthTestDistance=0,this._debugInspector=new Gz,this._msaaSamples=e.msaaSamples??4,this.rethrowRenderErrors=!1,this.completeMorphOnUserInput=!0,this.morphStart=new ye,this.morphComplete=new ye,this.skyBox=void 0,this.skyAtmosphere=void 0,this.sun=void 0,this.sunBloom=!0,this._sunBloom=void 0,this.moon=void 0,this.backgroundColor=V.clone(V.BLACK),this._mode=ie.SCENE3D,this._mapProjection=l(e.mapProjection)?e.mapProjection:new ji(this._ellipsoid),this.morphTime=1,this.farToNearRatio=1e3,this.logarithmicDepthFarToNearRatio=1e9,this.nearToFarDistance2D=175e4,this.verticalExaggeration=1,this.verticalExaggerationRelativeHeight=0,this.debugCommandFilter=void 0,this.debugShowCommands=!1,this.debugShowFrustums=!1,this.debugShowFramesPerSecond=!1,this.debugShowDepthFrustum=1,this.debugShowFrustumPlanes=!1,this._debugShowFrustumPlanes=!1,this._debugFrustumPlanes=void 0,this.useDepthPicking=!0,this.pickTranslucentDepth=!1,this.cameraEventWaitTime=500,this.atmosphere=new bb,this.fog=new j3,this.fog.enabled=te.WGS84.equals(this._ellipsoid),te.WGS84.equals(this._ellipsoid)||(bo.DEFAULT_VIEW_RECTANGLE=oe.fromDegrees(-45,-45,45,45)),this._shadowMapCamera=new bo(this),this.shadowMap=new v_({context:r,lightCamera:this._shadowMapCamera,enabled:e.shadows??!1}),this.invertClassification=!1,this.invertClassificationColor=V.clone(V.WHITE),this._actualInvertClassificationColor=V.clone(this._invertClassificationColor),this._invertClassification=new aI,this.focalLength=void 0,this.eyeSeparation=void 0,this.postProcessStages=new Rz,this._brdfLutGenerator=new S3,this._performanceDisplay=void 0,this._debugVolume=void 0,this._screenSpaceCameraController=new kz(this),this._cameraUnderground=!1,this._mapMode2D=e.mapMode2D??hu.INFINITE_SCROLL,this._environmentState={skyBoxCommand:void 0,skyAtmosphereCommand:void 0,sunDrawCommand:void 0,sunComputeCommand:void 0,moonCommand:void 0,isSunVisible:!1,isMoonVisible:!1,isReadyForAtmosphere:!1,isSkyAtmosphereVisible:!1,clearGlobeDepth:!1,useDepthPlane:!1,renderTranslucentDepthForPick:!1,originalFramebuffer:void 0,useGlobeDepthFramebuffer:!1,useOIT:!1,useInvertClassification:!1,usePostProcess:!1,usePostProcessSelected:!1,useWebVR:!1},this._useWebVR=!1,this._cameraVR=void 0,this._aspectRatioVR=void 0,this.requestRenderMode=e.requestRenderMode??!1,this._renderRequested=!0,this.maximumRenderTimeChange=e.maximumRenderTimeChange??0,this._lastRenderTime=void 0,this._frameRateMonitor=void 0,this._removeRequestListenerCallback=Xc.requestCompletedEvent.addEventListener(G5(this)),this._removeTaskProcessorListenerCallback=Gn.taskCompletedEvent.addEventListener(G5(this)),this._removeGlobeCallbacks=[],this._removeTerrainProviderReadyListener=void 0;let s=new Je(0,0,r.drawingBufferWidth,r.drawingBufferHeight),c=new bo(this);this._logDepthBuffer&&(c.frustum.near=.1,c.frustum.far=1e10),this.preloadFlightCamera=new bo(this),this.preloadFlightCullingVolume=void 0,this._picking=new cz(this),this._defaultView=new _T(this,c,s),this._view=this._defaultView,this._hdr=void 0,this._hdrDirty=void 0,this.highDynamicRange=!1,this.gamma=2.2,this.sphericalHarmonicCoefficients=void 0,this.specularEnvironmentMaps=void 0,this._specularEnvironmentCubeMap=void 0,this.light=new U0,this._enableEdgeVisibility=!1,k1e(this,0,Q.now()),this.updateFrameState(),this.initializeFrame()}Ai.defaultLogDepthBuffer=!0;function yOt(e,t){for(let i=0;i<e._removeGlobeCallbacks.length;++i)e._removeGlobeCallbacks[i]();e._removeGlobeCallbacks.length=0;let n=[];l(t)&&(n.push(t.imageryLayersUpdatedEvent.addEventListener(G5(e))),n.push(t.terrainProviderChanged.addEventListener(G5(e)))),e._removeGlobeCallbacks=n}Object.defineProperties(Ai.prototype,{canvas:{get:function(){return this._canvas}},drawingBufferHeight:{get:function(){return this._context.drawingBufferHeight}},drawingBufferWidth:{get:function(){return this._context.drawingBufferWidth}},maximumAliasedLineWidth:{get:function(){return Rt.maximumAliasedLineWidth}},maximumCubeMapSize:{get:function(){return Rt.maximumCubeMapSize}},pickPositionSupported:{get:function(){return this._context.depthTexture}},sampleHeightSupported:{get:function(){return this._context.depthTexture}},clampToHeightSupported:{get:function(){return this._context.depthTexture}},invertClassificationSupported:{get:function(){return this._context.depthTexture}},specularEnvironmentMapsSupported:{get:function(){return Gh.isSupported(this._context)}},ellipsoid:{get:function(){return this._ellipsoid}},globe:{get:function(){return this._globe},set:function(e){this._globe=this._globe&&this._globe.destroy(),this._globe=e,yOt(this,e)}},primitives:{get:function(){return this._primitives}},groundPrimitives:{get:function(){return this._groundPrimitives}},camera:{get:function(){return this._view.camera},set:function(e){this._view.camera=e}},view:{get:function(){return this._view},set:function(e){this._view=e}},defaultView:{get:function(){return this._defaultView}},picking:{get:function(){return this._picking}},screenSpaceCameraController:{get:function(){return this._screenSpaceCameraController}},mapProjection:{get:function(){return this._mapProjection}},jobScheduler:{get:function(){return this._jobScheduler}},frameState:{get:function(){return this._frameState}},environmentState:{get:function(){return this._environmentState}},tweens:{get:function(){return this._tweens}},imageryLayers:{get:function(){if(l(this.globe))return this.globe.imageryLayers}},terrainProvider:{get:function(){if(l(this.globe))return this.globe.terrainProvider},set:function(e){this._removeTerrainProviderReadyListener=this._removeTerrainProviderReadyListener&&this._removeTerrainProviderReadyListener(),l(this.globe)&&(this.globe.terrainProvider=e)}},terrainProviderChanged:{get:function(){if(l(this.globe))return this.globe.terrainProviderChanged}},preUpdate:{get:function(){return this._preUpdate}},postUpdate:{get:function(){return this._postUpdate}},renderError:{get:function(){return this._renderError}},preRender:{get:function(){return this._preRender}},postRender:{get:function(){return this._postRender}},lastRenderTime:{get:function(){return this._lastRenderTime}},context:{get:function(){return this._context}},debugFrustumStatistics:{get:function(){return this._view.debugFrustumStatistics}},scene3DOnly:{get:function(){return this._frameState.scene3DOnly}},orderIndependentTranslucency:{get:function(){return this._useOIT}},id:{get:function(){return this._id}},mode:{get:function(){return this._mode},set:function(e){e===ie.SCENE2D?this.morphTo2D(0):e===ie.SCENE3D?this.morphTo3D(0):e===ie.COLUMBUS_VIEW&&this.morphToColumbusView(0),this._mode=e}},frustumCommandsList:{get:function(){return this._view.frustumCommandsList}},numberOfFrustums:{get:function(){return this._view.frustumCommandsList.length}},useWebVR:{get:function(){return this._useWebVR},set:function(e){this._useWebVR=e,this._useWebVR?(this._frameState.creditDisplay.container.style.visibility="hidden",this._cameraVR=new bo(this),l(this._deviceOrientationCameraController)||(this._deviceOrientationCameraController=new V3(this)),this._aspectRatioVR=this.camera.frustum.aspectRatio):(this._frameState.creditDisplay.container.style.visibility="visible",this._cameraVR=void 0,this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this.camera.frustum.aspectRatio=this._aspectRatioVR,this.camera.frustum.xOffset=0)}},mapMode2D:{get:function(){return this._mapMode2D}},splitPosition:{get:function(){return this._frameState.splitPosition},set:function(e){this._frameState.splitPosition=e}},minimumDisableDepthTestDistance:{get:function(){return this._minimumDisableDepthTestDistance},set:function(e){this._minimumDisableDepthTestDistance=e}},logarithmicDepthBuffer:{get:function(){return this._logDepthBuffer},set:function(e){e=this._context.fragmentDepth&&e,this._logDepthBuffer!==e&&(this._logDepthBuffer=e,this._logDepthBufferDirty=!0)}},gamma:{get:function(){return this._context.uniformState.gamma},set:function(e){this._context.uniformState.gamma=e}},highDynamicRange:{get:function(){return this._hdr},set:function(e){let t=this._context,n=e&&t.depthTexture&&(t.colorBufferFloat||t.colorBufferHalfFloat);this._hdrDirty=n!==this._hdr,this._hdr=n}},highDynamicRangeSupported:{get:function(){let e=this._context;return e.depthTexture&&(e.colorBufferFloat||e.colorBufferHalfFloat)}},cameraUnderground:{get:function(){return this._cameraUnderground}},msaaSamples:{get:function(){return this._msaaSamples},set:function(e){e=Math.min(e,Rt.maximumSamples),this._msaaSamples=e}},msaaSupported:{get:function(){return this._context.msaa}},pixelRatio:{get:function(){return this._frameState.pixelRatio},set:function(e){this._frameState.pixelRatio=e}},opaqueFrustumNearOffset:{get:function(){return .9999}},globeHeight:{get:function(){return this._globeHeight}}});Ai.prototype.getCompressedTextureFormatSupported=function(e){let t=this.context;return(e==="WEBGL_compressed_texture_s3tc"||e==="s3tc")&&t.s3tc||(e==="WEBGL_compressed_texture_pvrtc"||e==="pvrtc")&&t.pvrtc||(e==="WEBGL_compressed_texture_etc"||e==="etc")&&t.etc||(e==="WEBGL_compressed_texture_etc1"||e==="etc1")&&t.etc1||(e==="WEBGL_compressed_texture_astc"||e==="astc")&&t.astc||(e==="EXT_texture_compression_bptc"||e==="bc7")&&t.bc7};function xOt(e,t){let n=e.pickedMetadataInfo,i=t.pickedMetadataInfo;return n?.schemaId!==i?.schemaId||n?.className!==i?.className||n?.propertyName!==i?.propertyName}function M1e(e,t,n){let i=e._frameState,o=e._context,r=e._view.oit,{lightShadowMaps:a,lightShadowsEnabled:s}=i.shadowState,c=t.derivedCommands;l(t.pickId)&&(c.picking=u0.createPickDerivedCommand(e,t,o,c.picking)),i.pickingMetadata&&t.pickMetadataAllowed&&(t.pickedMetadataInfo=i.pickedMetadataInfo,l(t.pickedMetadataInfo)&&(c.pickingMetadata=u0.createPickMetadataDerivedCommand(e,t,o,c.pickingMetadata))),t.pickOnly||(c.depth=u0.createDepthOnlyDerivedCommand(e,t,o,c.depth)),c.originalCommand=t,e._hdr&&(c.hdr=u0.createHdrCommand(t,o,c.hdr),t=c.hdr.command,c=t.derivedCommands),s&&t.receiveShadows&&(c.shadows=v_.createReceiveDerivedCommand(a,t,n,o,c.shadows)),t.pass===Ie.TRANSLUCENT&&l(r)&&r.isSupported()&&(s&&t.receiveShadows?(c.oit=l(c.oit)?c.oit:{},c.oit.shadows=r.createDerivedCommands(c.shadows.receiveCommand,o,c.oit.shadows)):c.oit=r.createDerivedCommands(t,o,c.oit))}Ai.prototype.updateDerivedCommands=function(e){let{derivedCommands:t}=e;if(!l(t))return;let n=this._frameState,{shadowState:i,useLogDepth:o}=this._frameState,r=this._context,a=!1,s=i.lastDirtyTime;e.lastDirtyTime!==s&&(e.lastDirtyTime=s,e.dirty=!0,a=!0);let c=this._hdr,u=l(t.logDepth),f=l(t.hdr),d=l(t.originalCommand),p=o&&!u,g=c&&!f,m=(!o||!c)&&!d,A=n.pickingMetadata&&xOt(e,n);if(e.dirty=e.dirty||p||g||m||A,!e.dirty)return;e.dirty=!1;let{shadowsEnabled:y,shadowMaps:x}=i;y&&e.castShadows&&(t.shadows=v_.createCastDerivedCommand(x,e,a,r,t.shadows)),(u||p)&&(t.logDepth=u0.createLogDepthCommand(e,r,t.logDepth),M1e(this,t.logDepth.command,a)),(d||m)&&M1e(this,e,a)};var bOt=new fh({pass:tr.RENDER}),Lne=new fh({pass:tr.PRELOAD}),Nne=new fh({pass:tr.PRELOAD_FLIGHT}),COt=new fh({pass:tr.REQUEST_RENDER_MODE_DEFER_CHECK}),B1e=new ce,Fne;function TOt(e){if(!(e._mode!==ie.SCENE3D||!e.globe?.show||e._cameraUnderground||e._globeTranslucencyState.translucent))return B1e.radius=e.ellipsoid.minimumRadius+e.frameState.minimumTerrainHeight,Fne=T3.fromBoundingSphere(B1e,e.camera.positionWC,Fne),Fne}Ai.prototype.clearPasses=function(e){e.render=!1,e.pick=!1,e.pickVoxel=!1,e.depth=!1,e.postProcess=!1,e.offscreen=!1};function k1e(e,t,n){let i=e._frameState;i.frameNumber=t,i.time=Q.clone(n,i.time)}Ai.prototype.updateFrameState=function(){let e=this.camera,t=this._frameState;t.commandList.length=0,t.shadowMaps.length=0,t.brdfLutGenerator=this._brdfLutGenerator,t.environmentMap=this.skyBox&&this.skyBox._cubeMap,t.mode=this._mode,t.morphTime=this.morphTime,t.mapProjection=this.mapProjection,t.camera=e,t.cullingVolume=e.frustum.computeCullingVolume(e.positionWC,e.directionWC,e.upWC),t.occluder=TOt(this),t.minimumTerrainHeight=0,t.minimumDisableDepthTestDistance=this._minimumDisableDepthTestDistance,t.invertClassification=this.invertClassification,t.useLogDepth=this._logDepthBuffer&&!(this.camera.frustum instanceof fn||this.camera.frustum instanceof da),t.light=this.light,t.cameraUnderground=this._cameraUnderground,t.globeTranslucencyState=this._globeTranslucencyState;let{globe:n}=this;l(n)&&n._terrainExaggerationChanged&&(this.verticalExaggeration=n._terrainExaggeration,this.verticalExaggerationRelativeHeight=n._terrainExaggerationRelativeHeight,n._terrainExaggerationChanged=!1),t.verticalExaggeration=this.verticalExaggeration,t.verticalExaggerationRelativeHeight=this.verticalExaggerationRelativeHeight,l(this._specularEnvironmentCubeMap)&&this._specularEnvironmentCubeMap.ready?(t.specularEnvironmentMaps=this._specularEnvironmentCubeMap.texture,t.specularEnvironmentMapsMaximumLOD=this._specularEnvironmentCubeMap.maximumMipmapLevel):(t.specularEnvironmentMaps=void 0,t.specularEnvironmentMapsMaximumLOD=void 0),t.sphericalHarmonicCoefficients=this.sphericalHarmonicCoefficients,this._actualInvertClassificationColor=V.clone(this.invertClassificationColor,this._actualInvertClassificationColor),aI.isTranslucencySupported(this._context)||(this._actualInvertClassificationColor.alpha=1),t.invertClassificationColor=this._actualInvertClassificationColor,l(this.globe)?t.maximumScreenSpaceError=this.globe.maximumScreenSpaceError:t.maximumScreenSpaceError=2,this.clearPasses(t.passes),t.tilesetPassState=void 0};Ai.prototype.isVisible=function(e,t,n){if(!l(t))return!1;let{boundingVolume:i}=t;return!l(i)||!t.cull?!0:e.computeVisibility(i)===qt.OUTSIDE?!1:!l(n)||!t.occlude||!i.isOccluded(n)};var j5=new M(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);j5=M.inverseTransformation(j5,j5);function EOt(e,t,n,i){let o=t._frameState,r=o.context,a=e.boundingVolume;l(t._debugVolume)&&t._debugVolume.destroy();let s=h.clone(a.center);if(o.mode!==ie.SCENE3D){s=M.multiplyByPoint(j5,s,s);let m=o.mapProjection,A=m.unproject(s);s=m.ellipsoid.cartographicToCartesian(A)}let c,u,{radius:f}=a;l(f)?(c=js.createGeometry(new js({radii:new h(f,f,f),vertexFormat:dn.FLAT_VERTEX_FORMAT})),u=M.fromTranslation(s)):(c=Ec.createGeometry(Ec.fromDimensions({dimensions:new h(2,2,2),vertexFormat:dn.FLAT_VERTEX_FORMAT})),u=M.fromRotationTranslation(a.halfAxes,s,new M)),t._debugVolume=new Dn({geometryInstances:new Ot({geometry:kn.toWireframe(c),modelMatrix:u,attributes:{color:new Yt(1,0,0,1)}}),appearance:new dn({flat:!0,translucent:!1}),asynchronous:!1});let d=o.commandList,p=o.commandList=[];t._debugVolume.update(o),e=p[0],o.useLogDepth&&(e=u0.createLogDepthCommand(e,r).command);let g;l(i)&&(g=n.framebuffer,n.framebuffer=i),e.execute(r,n),l(g)&&(n.framebuffer=g),o.commandList=d}function tf(e,t,n,i){let o=t._frameState,r=t._context;if(l(t.debugCommandFilter)&&!t.debugCommandFilter(e))return;if(e instanceof ai){e.execute(r,n);return}e.debugShowBoundingVolume&&l(e.boundingVolume)&&EOt(e,t,n,i),o.useLogDepth&&l(e.derivedCommands.logDepth)&&(e=e.derivedCommands.logDepth.command);let a=o.passes;if(!a.pick&&!a.pickVoxel&&!a.depth&&t._hdr&&l(e.derivedCommands)&&l(e.derivedCommands.hdr)&&(e=e.derivedCommands.hdr.command),a.pick||a.depth){if(a.pick&&!a.depth){if(o.pickingMetadata&&l(e.derivedCommands.pickingMetadata)){e=e.derivedCommands.pickingMetadata.pickMetadataCommand,e.execute(r,n);return}if(!o.pickingMetadata&&l(e.derivedCommands.picking)){e=e.derivedCommands.picking.pickCommand,e.execute(r,n);return}}else if(l(e.derivedCommands.depth)){e=e.derivedCommands.depth.depthOnlyCommand,e.execute(r,n);return}}if(t.debugShowCommands||t.debugShowFrustums){t._debugInspector.executeDebugShowFrustumsCommand(t,e,n);return}o.shadowState.lightShadowsEnabled&&e.receiveShadows&&l(e.derivedCommands.shadows)?e.derivedCommands.shadows.receiveCommand.execute(r,n):e.execute(r,n)}function L1e(e,t,n){let{derivedCommands:i}=e;if(!l(i))return;let o=t._frameState,r=t._context;o.useLogDepth&&l(i.logDepth)&&(e=i.logDepth.command);let{picking:a,pickingMetadata:s,depth:c}=e.derivedCommands;l(s)&&(e=i.pickingMetadata.pickMetadataCommand,e.execute(r,n)),l(a)?(e=a.pickCommand,e.execute(r,n)):l(c)&&(e=c.depthOnlyCommand,e.execute(r,n))}function z1e(e,t,n){return t.boundingVolume.distanceSquaredTo(n)-e.boundingVolume.distanceSquaredTo(n)}var vOt=new h;function N1e(e,t){let n=h.subtract(e,t,vOt),i=Math.max(0,h.magnitude(n));return i*i}function SOt(e,t,n){let i=e.boundingVolume,o=t.boundingVolume;return N1e(o.center,n)-N1e(i.center,n)}function wOt(e,t,n){return e.boundingVolume.distanceSquaredTo(n)-t.boundingVolume.distanceSquaredTo(n)+D.EPSILON12}function IOt(e,t,n,i,o){s0(i,z1e,e.camera.positionWC),l(o)&&t(o.unclassifiedCommand,e,n);for(let r=0;r<i.length;++r)t(i[r],e,n)}function DOt(e,t,n,i,o){s0(i,wOt,e.camera.positionWC),l(o)&&t(o.unclassifiedCommand,e,n);for(let r=0;r<i.length;++r)t(i[r],e,n)}function POt(e,t,n){e.context.uniformState.updatePass(Ie.VOXELS);let i=n.commands[Ie.VOXELS];i.length=n.indices[Ie.VOXELS],s0(i,z1e,e.camera.positionWC);for(let o=0;o<i.length;++o)tf(i[o],e,t)}function ROt(e,t,n){e.context.uniformState.updatePass(Ie.GAUSSIAN_SPLATS);let i=n.commands[Ie.GAUSSIAN_SPLATS];i.length=n.indices[Ie.GAUSSIAN_SPLATS],s0(i,SOt,e.camera.positionWC);for(let o=0;o<i.length;++o)tf(i[o],e,t)}var OOt=new Vi,MOt=new du,BOt=new fn,LOt=new da;function NOt(e){let{frustum:t}=e;return l(t.fov)?t.clone(OOt):l(t.infiniteProjectionMatrix)?t.clone(MOt):l(t.width)?t.clone(BOt):t.clone(LOt)}function FOt(e){if(e._environmentState.useOIT){if(!l(e._executeOITFunction)){let{view:t,context:n}=e;e._executeOITFunction=function(i,o,r,a,s){t.globeDepth.prepareColorTextures(n),t.oit.executeCommands(i,o,r,a,s)}}return e._executeOITFunction}return e.frameState.passes.render?IOt:DOt}function kOt(e,t,n){let{frameState:i,context:o}=e,{pick:r,pickVoxel:a}=i.passes,s=r||a,c;!s&&e._environmentState.useInvertClassification&&i.invertClassificationColor.alpha<1&&(c=e._invertClassification);let u=FOt(e);o.uniformState.updatePass(Ie.TRANSLUCENT);let f=n.commands[Ie.TRANSLUCENT];f.length=n.indices[Ie.TRANSLUCENT],u(e,tf,t,f,c)}function zOt(e,t,n){let{translucentTileClassification:i,globeDepth:o}=e._view;if(!(n.indices[Ie.CESIUM_3D_TILE_CLASSIFICATION]>0)||!i.isSupported())return;let a=n.commands[Ie.TRANSLUCENT];i.executeTranslucentCommands(e,tf,t,a,o.depthStencilTexture),i.executeClassificationCommands(e,tf,t,n)}function UOt(e,t,n){e.context.uniformState.updatePass(Ie.CESIUM_3D_TILE_EDGES);let i=t.framebuffer;e.context.uniformState.edgeColorTexture=e.context.defaultTexture,e.context.uniformState.edgeIdTexture=e.context.defaultTexture,e.context.uniformState.edgeDepthTexture=e.context.defaultTexture,e._enableEdgeVisibility&&l(e._view)&&l(e._view.edgeFramebuffer)&&(t.framebuffer=e._view.edgeFramebuffer.framebuffer);let o=n.commands[Ie.CESIUM_3D_TILE_EDGES],r=n.indices[Ie.CESIUM_3D_TILE_EDGES];e._enableEdgeVisibility&&l(e._view)&&l(e._view.edgeFramebuffer)&&e._view.edgeFramebuffer.getClearCommand(new V(0,0,0,0)).execute(e.context,t);for(let a=0;a<r;++a)tf(o[a],e,t);t.framebuffer=i}function VOt(e,t,n){e.context.uniformState.updatePass(Ie.CESIUM_3D_TILE_EDGES_DIRECT);let i=n.commands[Ie.CESIUM_3D_TILE_EDGES_DIRECT],o=n.indices[Ie.CESIUM_3D_TILE_EDGES_DIRECT];for(let r=0;r<o;++r)tf(i[r],e,t)}function zne(e,t){let{camera:n,context:i,frameState:o}=e,{uniformState:r}=i;r.updateCamera(n);let a=NOt(n);a.near=n.frustum.near,a.far=n.frustum.far;let s=o.passes,c=s.pick||s.pickVoxel;c||jOt(e,t);let{clearGlobeDepth:u,renderTranslucentDepthForPick:f,useDepthPlane:d,useGlobeDepthFramebuffer:p,useInvertClassification:g,usePostProcessSelected:m}=e._environmentState,{globeDepth:A,globeTranslucencyFramebuffer:y,sceneFramebuffer:x,frustumCommandsList:b}=e._view,C=b.length,E=e._globeTranslucencyState,S=e._depthClearCommand,w=e._stencilClearCommand,P=e._classificationStencilClearCommand,R=e._depthPlane,B=n.position.z;function L(T,v){r.updatePass(v);let I=T.commands[v],O=T.indices[v];for(let N=0;N<O;++N)tf(I[N],e,t);return O}function _(T,v){r.updatePass(v);let I=T.commands[v],O=T.indices[v];for(let N=0;N<O;++N)L1e(I[N],e,t)}for(let T=0;T<C;++T){let v=C-T-1,I=b[v];e.mode===ie.SCENE2D?(n.position.z=B-I.near+1,a.far=Math.max(1,I.far-I.near),a.near=1,r.update(o),r.updateFrustum(a)):(a.near=v!==0?I.near*e.opaqueFrustumNearOffset:I.near,a.far=I.far,r.updateFrustum(a)),S.execute(i,t),i.stencilBuffer&&w.execute(i,t),E.translucent?(r.updatePass(Ie.GLOBE),E.executeGlobeCommands(I,tf,y,e,t)):L(I,Ie.GLOBE),p&&A.executeCopyDepth(i,t),f||(E.translucent?(r.updatePass(Ie.TERRAIN_CLASSIFICATION),E.executeGlobeClassificationCommands(I,tf,y,e,t)):L(I,Ie.TERRAIN_CLASSIFICATION)),u&&(S.execute(i,t),d&&R.execute(i,t));let O;if(UOt(e,t,I),e._enableEdgeVisibility&&l(e._view)&&l(e._view.edgeFramebuffer)){let j=e._view.edgeFramebuffer.colorTexture;l(j)?e.context.uniformState.edgeColorTexture=j:e.context.uniformState.edgeColorTexture=e.context.defaultTexture;let k=e._view.edgeFramebuffer.idTexture;l(k)?e.context.uniformState.edgeIdTexture=k:e.context.uniformState.edgeIdTexture=e.context.defaultTexture;let U=e._view.edgeFramebuffer.depthTexture;l(U)?e.context.uniformState.edgeDepthTexture=U:e.context.uniformState.edgeDepthTexture=e.context.defaultTexture}else e.context.uniformState.edgeColorTexture=e.context.defaultTexture,e.context.uniformState.edgeIdTexture=e.context.defaultTexture,e.context.uniformState.edgeDepthTexture=e.context.defaultTexture;if(!g||c||f)O=L(I,Ie.CESIUM_3D_TILE),O>0&&(p&&(A.prepareColorTextures(i,u),A.executeUpdateDepth(i,t,A.depthStencilTexture)),f||(O=L(I,Ie.CESIUM_3D_TILE_CLASSIFICATION)));else{e._invertClassification.clear(i,t);let j=t.framebuffer;t.framebuffer=e._invertClassification._fbo.framebuffer,O=L(I,Ie.CESIUM_3D_TILE),p&&(e._invertClassification.prepareTextures(i),A.executeUpdateDepth(i,t,e._invertClassification._fbo.getDepthStencilTexture())),O=L(I,Ie.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW),t.framebuffer=j,e._invertClassification.executeClassified(i,t),o.invertClassificationColor.alpha===1&&e._invertClassification.executeUnclassified(i,t),O>0&&i.stencilBuffer&&P.execute(i,t),O=L(I,Ie.CESIUM_3D_TILE_CLASSIFICATION)}if(O>0&&i.stencilBuffer&&w.execute(i,t),POt(e,t,I),L(I,Ie.OPAQUE),VOt(e,t,I),ROt(e,t,I),v!==0&&e.mode!==ie.SCENE2D&&(a.near=I.near,r.updateFrustum(a)),kOt(e,t,I),zOt(e,t,I),i.depthTexture&&e.useDepthPicking&&(p||f)){let j=e._picking.getPickDepth(e,v);j.update(i,A.depthStencilTexture),j.executeCopyDepth(i,t)}if(c||!m)continue;let N=t.framebuffer;t.framebuffer=x.getIdFramebuffer(),a.near=v!==0?I.near*e.opaqueFrustumNearOffset:I.near,a.far=I.far,r.updateFrustum(a),E.translucent?(r.updatePass(Ie.GLOBE),E.executeGlobeCommands(I,L1e,y,e,t)):_(I,Ie.GLOBE),u&&(S.framebuffer=t.framebuffer,S.execute(i,t),S.framebuffer=void 0),u&&d&&R.execute(i,t),_(I,Ie.CESIUM_3D_TILE),_(I,Ie.OPAQUE),_(I,Ie.TRANSLUCENT),t.framebuffer=N}}function jOt(e,t){let{context:n,environmentState:i,view:o}=e;if(n.uniformState.updatePass(Ie.ENVIRONMENT),l(i.skyBoxCommand)&&tf(i.skyBoxCommand,e,t),i.isSkyAtmosphereVisible&&tf(i.skyAtmosphereCommand,e,t),i.isSunVisible&&(i.sunDrawCommand.execute(n,t),e.sunBloom&&!i.useWebVR)){let a;i.useGlobeDepthFramebuffer?a=o.globeDepth.framebuffer:i.usePostProcess?a=o.sceneFramebuffer.framebuffer:a=i.originalFramebuffer,e._sunPostProcess.execute(n),e._sunPostProcess.copy(n,a),t.framebuffer=a}i.isMoonVisible&&i.moonCommand.execute(n,t);let r=e.frameState.panoramaCommandList;for(let a=r.length-1;a>=0;a--){let s=r[a];l(s.shaderProgram)?tf(r[a],e,t):r.splice(a,1)}}function U1e(e){e.context.uniformState.updatePass(Ie.COMPUTE);let t=e._environmentState.sunComputeCommand;l(t)&&t.execute(e._computeEngine);let n=e._computeCommandList;for(let i=0;i<n.length;++i)n[i].execute(e._computeEngine)}function GOt(e,t){e.context.uniformState.updatePass(Ie.OVERLAY);let n=e.context,i=e._overlayCommandList;for(let o=0;o<i.length;++o)i[o].execute(n,t)}function HOt(e,t,n){let{shadowMapCullingVolume:i,isPointLight:o,passes:r}=n,a=r.length,s=[Ie.GLOBE,Ie.CESIUM_3D_TILE,Ie.OPAQUE,Ie.TRANSLUCENT];for(let c=0;c<t.length;++c){let u=t[c];if(e.updateDerivedCommands(u),!(!u.castShadows||s.indexOf(u.pass)<0||!e.isVisible(i,u)))if(o)for(let f=0;f<a;++f)r[f].commandList.push(u);else if(a===1)r[0].commandList.push(u);else{let f=!1;for(let d=a-1;d>=0;--d){let p=r[d].cullingVolume;if(e.isVisible(p,u))r[d].commandList.push(u),f=!0;else if(f)break}}}}function V1e(e){let{shadowState:t,commandList:n}=e.frameState,{shadowsEnabled:i,shadowMaps:o}=t;if(!i)return;let{context:r}=e,{uniformState:a}=r;for(let s=0;s<o.length;++s){let c=o[s];if(c.outOfView)continue;let{passes:u}=c;for(let f=0;f<u.length;++f)u[f].commandList.length=0;HOt(e,n,c);for(let f=0;f<u.length;++f){let d=c.passes[f],{camera:p,commandList:g}=d;a.updateCamera(p),c.updatePass(r,f);for(let m=0;m<g.length;++m){let A=g[m];a.updatePass(A.pass);let y=A.derivedCommands.shadows.castCommands[s];tf(y,e,d.passState)}}}}var WOt=new h;Ai.prototype.updateAndExecuteCommands=function(e,t){oMt(this,e,t),this._environmentState.useWebVR?qOt(this,e,t):this._frameState.mode!==ie.SCENE2D||this._mapMode2D===hu.ROTATE?Ky(!0,this,e):tMt(this,e)};function qOt(e,t){let n=e._view,i=n.camera,r=e._environmentState.renderTranslucentDepthForPick;j1e(e),n.createPotentiallyVisibleSet(e),U1e(e),r||V1e(e);let a=t.viewport;a.x=0,a.y=0,a.width=a.width*.5;let s=bo.clone(i,e._cameraVR);s.frustum=i.frustum;let c=i.frustum.near,u=c*(e.focalLength??5),f=e.eyeSeparation??u/30,d=h.multiplyByScalar(s.right,f*.5,WOt);i.frustum.aspectRatio=a.width/a.height;let p=.5*f*c/u;h.add(s.position,d,i.position),i.frustum.xOffset=p,zne(e,t),a.x=a.width,h.subtract(s.position,d,i.position),i.frustum.xOffset=-p,zne(e,t),bo.clone(s,i)}var YOt=new de(Math.PI,D.PI_OVER_TWO),XOt=new h,KOt=new h,QOt=new M,$Ot=new M,JOt=new h,ZOt=new h,eMt=new Je;function tMt(e,t){let{frameState:n,camera:i}=e,{uniformState:o}=e.context,r=t.viewport,a=Je.clone(r,eMt);t.viewport=a;let s=YOt,c=XOt;e.mapProjection.project(s,c);let f=h.clone(i.position,KOt),d=M.clone(i.transform,$Ot),p=i.frustum.clone();i._setTransform(M.IDENTITY);let g=M.computeViewportTransformation(a,0,1,QOt),m=i.frustum.projectionMatrix,A=i.positionWC.y,y=h.fromElements(D.sign(A)*c.x-A,0,-i.positionWC.x,JOt),x=pt.pointToGLWindowCoordinates(m,g,y,ZOt);x.x=Math.floor(x.x);let b=a.x,C=a.width;if(A===0||x.x<=b||x.x>=b+C)Ky(!0,e,t);else if(Math.abs(b+C*.5-x.x)<1)a.width=x.x-a.x,i.position.x*=D.sign(i.position.x),i.frustum.right=0,n.cullingVolume=i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC),o.update(n),Ky(!0,e,t),a.x=x.x,i.position.x=-i.position.x,i.frustum.right=-i.frustum.left,i.frustum.left=0,n.cullingVolume=i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC),o.update(n),Ky(!1,e,t);else if(x.x>b+C*.5){a.width=x.x-b;let E=i.frustum.right;i.frustum.right=c.x-A,n.cullingVolume=i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC),o.update(n),Ky(!0,e,t),a.x=x.x,a.width=b+C-x.x,i.position.x=-i.position.x,i.frustum.left=-i.frustum.right,i.frustum.right=E-i.frustum.right*2,n.cullingVolume=i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC),o.update(n),Ky(!1,e,t)}else{a.x=x.x,a.width=b+C-x.x;let E=i.frustum.left;i.frustum.left=-c.x-A,n.cullingVolume=i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC),o.update(n),Ky(!0,e,t),a.x=b,a.width=x.x-b,i.position.x=-i.position.x,i.frustum.right=-i.frustum.left,i.frustum.left=E-i.frustum.left*2,n.cullingVolume=i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC),o.update(n),Ky(!1,e,t)}i._setTransform(d),h.clone(f,i.position),i.frustum=p.clone(),t.viewport=r}function Ky(e,t,n){let i=t._view,{renderTranslucentDepthForPick:o}=t._environmentState;e||(t.frameState.commandList.length=0),j1e(t),i.createPotentiallyVisibleSet(t),e&&(U1e(t),o||V1e(t)),zne(t,n)}var F1e=new Ka;Ai.prototype.updateEnvironment=function(){let e=this._frameState,t=this._view,n=this._environmentState,i=e.passes.render,o=e.passes.offscreen,r=this.atmosphere,a=this.skyAtmosphere,s=this.globe,c=this._globeTranslucencyState;if(!i||this._mode!==ie.SCENE2D&&t.camera.frustum instanceof fn||!c.environmentVisible)n.skyAtmosphereCommand=void 0,n.skyBoxCommand=void 0,n.sunDrawCommand=void 0,n.sunComputeCommand=void 0,n.moonCommand=void 0;else{if(l(a)){if(l(s))a.setDynamicLighting(mg.fromGlobeFlags(s)),n.isReadyForAtmosphere=n.isReadyForAtmosphere||!s.show||s._surface._tilesToRender.length>0;else{let x=r.dynamicLighting;a.setDynamicLighting(x),n.isReadyForAtmosphere=!0}n.skyAtmosphereCommand=a.update(e,s),l(n.skyAtmosphereCommand)&&this.updateDerivedCommands(n.skyAtmosphereCommand)}else n.skyAtmosphereCommand=void 0;n.skyBoxCommand=l(this.skyBox)?this.skyBox.update(e,this._hdr):void 0;let y=l(this.sun)?this.sun.update(e,t.passState,this._hdr):void 0;n.sunDrawCommand=l(y)?y.drawCommand:void 0,n.sunComputeCommand=l(y)?y.computeCommand:void 0,n.moonCommand=l(this.moon)?this.moon.update(e):void 0}let u=n.clearGlobeDepth=l(s)&&s.show&&(!s.depthTestAgainstTerrain||this.mode===ie.SCENE2D);(n.useDepthPlane=u&&this.mode===ie.SCENE3D&&c.useDepthPlane)&&this._depthPlane.update(e),n.renderTranslucentDepthForPick=!1,n.useWebVR=this._useWebVR&&this.mode!==ie.SCENE2D&&!o;let d=e.mode===ie.SCENE3D&&!c.sunVisibleThroughGlobe?e.occluder:void 0,p=e.cullingVolume,g=F1e.planes;for(let y=0;y<5;++y)g[y]=p.planes[y];p=F1e,n.isSkyAtmosphereVisible=l(n.skyAtmosphereCommand)&&n.isReadyForAtmosphere,n.isSunVisible=this.isVisible(p,n.sunDrawCommand,d),n.isMoonVisible=this.isVisible(p,n.moonCommand,d);let m=this.specularEnvironmentMaps,A=this._specularEnvironmentCubeMap;l(m)&&A?.url!==m?(A=A&&A.destroy(),this._specularEnvironmentCubeMap=new Gh(m)):!l(m)&&l(A)&&(A.destroy(),this._specularEnvironmentCubeMap=void 0),l(this._specularEnvironmentCubeMap)&&this._specularEnvironmentCubeMap.update(e)};function nMt(e){let t=e._frameState;e.debugShowFrustumPlanes!==e._debugShowFrustumPlanes&&(e.debugShowFrustumPlanes?e._debugFrustumPlanes=new l0({camera:e.camera,updateOnChange:!1,frustumSplits:t.frustumSplits}):e._debugFrustumPlanes=e._debugFrustumPlanes&&e._debugFrustumPlanes.destroy(),e._debugShowFrustumPlanes=e.debugShowFrustumPlanes),l(e._debugFrustumPlanes)&&e._debugFrustumPlanes.update(t)}function iMt(e){let t=e._frameState,{passes:n,shadowState:i,shadowMaps:o}=t,r=o.length,a=r>0&&!n.pick&&!n.pickVoxel&&e.mode===ie.SCENE3D;if(a!==i.shadowsEnabled&&(++i.lastDirtyTime,i.shadowsEnabled=a),i.lightShadowsEnabled=!1,!!a){for(let s=0;s<r;++s)if(o[s]!==i.shadowMaps[s]){++i.lastDirtyTime;break}i.shadowMaps.length=0,i.lightShadowMaps.length=0;for(let s=0;s<r;++s){let c=o[s];c.update(t),i.shadowMaps.push(c),c.fromLightSource&&(i.lightShadowMaps.push(c),i.lightShadowsEnabled=!0),c.dirty&&(++i.lastDirtyTime,c.dirty=!1)}}}function j1e(e){let t=e._frameState;t.edgeVisibilityRequested=!1,e._groundPrimitives.update(t),e._primitives.update(t),t.edgeVisibilityRequested&&e._enableEdgeVisibility===!1&&(e._enableEdgeVisibility=!0),nMt(e),iMt(e),e._globe&&e._globe.render(t)}function oMt(e,t,n){let i=e._context,o=e._frameState,r=e._environmentState,a=e._view,s=o.passes,c=s.pick||s.pickVoxel;l(a.globeDepth)&&(a.globeDepth.picking=c);let u=r.useWebVR;r.originalFramebuffer=t.framebuffer,l(e.sun)&&e.sunBloom!==e._sunBloom?(e.sunBloom&&!u?e._sunPostProcess=new Vz:l(e._sunPostProcess)&&(e._sunPostProcess=e._sunPostProcess.destroy()),e._sunBloom=e.sunBloom):!l(e.sun)&&l(e._sunPostProcess)&&(e._sunPostProcess=e._sunPostProcess.destroy(),e._sunBloom=!1);let f=e._clearColorCommand;V.clone(n,f.color),f.execute(i,t);let d=r.useGlobeDepthFramebuffer=l(a.globeDepth);d&&(a.globeDepth.update(i,t,a.viewport,e.msaaSamples,e._hdr,r.clearGlobeDepth),a.globeDepth.clear(i,t,n));let p=a.oit,g=r.useOIT=!c&&l(p)&&p.isSupported();g&&(p.update(i,t,a.globeDepth.colorFramebufferManager,e._hdr,e.msaaSamples),p.clear(i,t,n),r.useOIT=p.isSupported());let m=e.postProcessStages,A=r.usePostProcess=!c&&(e._hdr||m.length>0||m.ambientOcclusion.enabled||m.fxaa.enabled||m.bloom.enabled);r.usePostProcessSelected=!1,A&&(a.sceneFramebuffer.update(i,a.viewport,e._hdr,e.msaaSamples),a.sceneFramebuffer.clear(i,t,n),m.update(i,o.useLogDepth,e._hdr),m.clear(i),A=r.usePostProcess=m.ready,r.usePostProcessSelected=A&&m.hasSelected),r.isSunVisible&&e.sunBloom&&!u?(t.framebuffer=e._sunPostProcess.update(t),e._sunPostProcess.clear(i,t,n)):d?t.framebuffer=a.globeDepth.framebuffer:A&&(t.framebuffer=a.sceneFramebuffer.framebuffer),l(t.framebuffer)&&f.execute(i,t);let y=r.useInvertClassification=!c&&l(t.framebuffer)&&e.invertClassification;if(!c&&e._enableEdgeVisibility&&a.edgeFramebuffer.update(i,a.viewport,e._hdr),y){let b;if(o.invertClassificationColor.alpha===1&&d&&(b=a.globeDepth.framebuffer),l(b)||i.depthTexture){if(e._invertClassification.previousFramebuffer=b,e._invertClassification.update(i,e.msaaSamples,a.globeDepth.colorFramebufferManager),e._invertClassification.clear(i,t),o.invertClassificationColor.alpha<1&&g){let C=e._invertClassification.unclassifiedCommand,E=C.derivedCommands;E.oit=p.createDerivedCommands(C,i,E.oit)}}else r.useInvertClassification=!1}e._globeTranslucencyState.translucent&&a.globeTranslucencyFramebuffer.updateAndClear(e._hdr,a.viewport,i,t)}Ai.prototype.resolveFramebuffers=function(e){let t=this._context,n=this._environmentState,i=this._view,{globeDepth:o,translucentTileClassification:r}=i;l(o)&&o.prepareColorTextures(t);let{useOIT:a,useGlobeDepthFramebuffer:s,usePostProcess:c,originalFramebuffer:u}=n,f=s?o.colorFramebufferManager:void 0,d=i.sceneFramebuffer._colorFramebuffer,p=i.sceneFramebuffer.idFramebuffer;if(a&&(e.framebuffer=c?d.framebuffer:u,i.oit.execute(t,e)),r.hasTranslucentDepth&&r.isSupported()&&r.execute(this,e),c){i.sceneFramebuffer.prepareColorTextures(t);let g=d;s&&!a&&(g=f);let m=this.postProcessStages,A=g.getColorTexture(0),y=p.getColorTexture(0),x=(f??d).getDepthStencilTexture();m.execute(t,A,x,y),m.copy(t,u)}!a&&!c&&s&&(e.framebuffer=u,o.executeCopyColor(t,e))};function rMt(e){let t=e._frameState.afterRender,n=t.slice();t.length=0;for(let i=0;i<n.length;++i)n[i]()&&e.requestRender()}function aMt(e){if(e.mode===ie.MORPHING)return;let t=e.camera.positionCartographic;return e.getHeight(t)}function G1e(e,t,n){let i=Number.NEGATIVE_INFINITY;if(e instanceof su){let o=e.length;for(let r=0;r<o;++r){let a=e.get(r),s=G1e(a,t,n);l(s)&&s>i&&(i=s)}}else if(e.isCesium3DTileset&&e.show&&e.enableCollision){let o=e.getHeight(t,n);if(l(o)&&o>i)return o}return i}Ai.prototype.getHeight=function(e,t){if(!l(e))return;let n=t===nt.CLAMP_TO_TERRAIN||t===nt.RELATIVE_TO_TERRAIN,i=t===nt.CLAMP_TO_3D_TILE||t===nt.RELATIVE_TO_3D_TILE;if(!l(e))return;let o=Number.NEGATIVE_INFINITY;if(!n){let a=G1e(this.primitives,e,this);l(a)&&a>o&&(o=a)}let r=this._globe;if(!i&&l(r)&&r.show){let a=r.getHeight(e);a>o&&(o=a)}if(o>Number.NEGATIVE_INFINITY)return o};var kne=new de;Ai.prototype.updateHeight=function(e,t,n){let i=this._ellipsoid,o=g=>{de.clone(e,kne);let m;l(g)&&(m=g.height),l(m)||(m=this.getHeight(e,n)),l(m)&&(kne.height=m,t(kne))},r=n===nt.CLAMP_TO_TERRAIN||n===nt.RELATIVE_TO_TERRAIN,a=n===nt.CLAMP_TO_3D_TILE||n===nt.RELATIVE_TO_3D_TILE,s;!a&&l(this.globe)&&(s=this.globe._surface.updateHeight(e,o));let c={},u=g=>{if(r||g.isDestroyed()||!g.isCesium3DTileset)return;let m=g.updateHeight(e,o,i);c[g.id]=m};if(!r){let g=this.primitives.length;for(let m=0;m<g;++m){let A=this.primitives.get(m);u(A)}}let f=this.primitives.primitiveAdded.addEventListener(u),d=this.primitives.primitiveRemoved.addEventListener(g=>{g.isDestroyed()||!g.isCesium3DTileset||(l(c[g.id])&&c[g.id](),delete c[g.id])});return()=>{s=s&&s(),Object.values(c).forEach(g=>g()),c={},f(),d()}};function sMt(e){let t=e.camera,n=e._mode,i=e._screenSpaceCameraController,o=t.positionCartographic;if(!l(o))return!1;if(!i.onMap()&&o.height<0)return!0;if(n===ie.SCENE2D||n===ie.MORPHING)return!1;let r=e._globeHeight;return l(r)&&o.height<r}Ai.prototype.initializeFrame=function(){if(this._shaderFrameCount++===120&&(this._shaderFrameCount=0,this._context.shaderCache.destroyReleasedShaderPrograms(),this._context.textureCache.destroyReleasedTextures()),this._tweens.update(),this._globeHeightDirty){l(this._removeUpdateHeightCallback)&&(this._removeUpdateHeightCallback(),this._removeUpdateHeightCallback=void 0),this._globeHeight=aMt(this),this._globeHeightDirty=!1;let e=this.camera.positionCartographic;this._removeUpdateHeightCallback=this.updateHeight(e,t=>{this.isDestroyed()||(this._globeHeight=t.height)})}this._cameraUnderground=sMt(this),this._globeTranslucencyState.update(this),this._screenSpaceCameraController.update(),l(this._deviceOrientationCameraController)&&this._deviceOrientationCameraController.update(),this.camera.update(this._mode),this.camera._updateCameraChanged()};function cMt(e,t){if(e.debugShowFramesPerSecond){if(!l(e._performanceDisplay)){let n=document.createElement("div");n.className="cesium-performanceDisplay-defaultContainer",e._canvas.parentNode.appendChild(n);let o=new C_({container:n});e._performanceDisplay=o,e._performanceContainer=n}e._performanceDisplay.throttled=e.requestRenderMode,e._performanceDisplay.update(t)}else l(e._performanceDisplay)&&(e._performanceDisplay=e._performanceDisplay&&e._performanceDisplay.destroy(),e._performanceContainer.parentNode.removeChild(e._performanceContainer))}function lMt(e){e._jobScheduler.resetBudgets();let t=e._frameState;e.primitives.prePassesUpdate(t),l(e.globe)&&e.globe.update(t),e._picking.update(),t.creditDisplay.update()}function uMt(e){e.primitives.postPassesUpdate(e._frameState),Xc.update()}var fMt=new V;function dMt(e){let t=e._frameState,n=e.context,{uniformState:i}=n,o=e._defaultView;e._view=o,e.updateFrameState(),t.passes.render=!0,t.passes.postProcess=e.postProcessStages.hasSelected,t.tilesetPassState=bOt;let r=e.backgroundColor??V.BLACK;e._hdr&&(r=V.clone(r,fMt),r.red=Math.pow(r.red,e.gamma),r.green=Math.pow(r.green,e.gamma),r.blue=Math.pow(r.blue,e.gamma)),t.backgroundColor=r,t.atmosphere=e.atmosphere,e.fog.update(t),i.update(t);let a=e.shadowMap;l(a)&&a.enabled&&(!l(e.light)||e.light instanceof U0?h.negate(i.sunDirectionWC,e._shadowMapCamera.direction):h.clone(e.light.direction,e._shadowMapCamera.direction),t.shadowMaps.push(a)),e._computeCommandList.length=0,e._overlayCommandList.length=0;let s=o.viewport;s.x=0,s.y=0,s.width=n.drawingBufferWidth,s.height=n.drawingBufferHeight;let c=o.passState;c.framebuffer=void 0,c.blendingEnabled=void 0,c.scissorTest=void 0,c.viewport=Je.clone(s,c.viewport),n.beginFrame(),l(e.globe)&&e.globe.beginFrame(t),e.updateEnvironment(),e.updateAndExecuteCommands(c,r),e.resolveFramebuffers(c),c.framebuffer=void 0,GOt(e,c),l(e.globe)&&(e.globe.endFrame(t),e.globe.tilesLoaded||(e._renderRequested=!0)),n.endFrame()}function BT(e,t){try{t(e)}catch(n){if(e._renderError.raiseEvent(e,n),e.rethrowRenderErrors)throw n}}function hMt(e){return e._picking.updateMostDetailedRayPicks(e)}Ai.prototype.render=function(e){this._preUpdate.raiseEvent(this,e);let t=this._frameState;t.newFrame=!1,l(e)||(e=Q.now());let n=this._view.checkForCameraUpdates(this);n&&(this._globeHeightDirty=!0);let i=!this.requestRenderMode||this._renderRequested||n||this._logDepthBufferDirty||this._hdrDirty||this.mode===ie.MORPHING;if(!i&&l(this.maximumRenderTimeChange)&&l(this._lastRenderTime)){let o=Math.abs(Q.secondsDifference(this._lastRenderTime,e));i=i||o>this.maximumRenderTimeChange}if(i){this._lastRenderTime=Q.clone(e,this._lastRenderTime),this._renderRequested=!1,this._logDepthBufferDirty=!1,this._hdrDirty=!1;let o=D.incrementWrap(t.frameNumber,15e6,1);k1e(this,o,e),t.newFrame=!0}BT(this,lMt),this.primitives.show&&(BT(this,hMt),BT(this,mMt),BT(this,pMt),i||BT(this,gMt)),this._postUpdate.raiseEvent(this,e),i&&(this._preRender.raiseEvent(this,e),t.creditDisplay.beginFrame(),BT(this,dMt)),cMt(this,i),BT(this,uMt),rMt(this),i&&(this._postRender.raiseEvent(this,e),t.creditDisplay.endFrame())};Ai.prototype.forceRender=function(e){this._renderRequested=!0,this.render(e)};Ai.prototype.requestRender=function(){this._renderRequested=!0};Ai.prototype.clampLineWidth=function(e){return Math.max(Rt.minimumAliasedLineWidth,Math.min(e,Rt.maximumAliasedLineWidth))};Ai.prototype.pick=function(e,t,n){return this._picking.pick(this,e,t,n,1)[0]};Ai.prototype.pickAsync=async function(e,t,n){return(await this._picking.pickAsync(this,e,t,n,1))[0]};Ai.prototype.pickVoxel=function(e,t,n){let i=this.pick(e,t,n);if(!l(i))return;let o=i.primitive;if(!(o instanceof Xy))return;let r=this._picking.pickVoxelCoordinate(this,e,t,n),a=255*r[0]+r[1],s=o._traversal.findKeyframeNode(a);if(!l(s))return;let c=255*r[2]+r[3];return Hz.fromKeyframeNode(o,a,c,s)};Ai.prototype.pickMetadata=function(e,t,n,i){let o=this.pick(e);if(!l(o))return;let r=o.detail?.model?.structuralMetadata;if(!l(r))return;let a=r.schema,s=CU(a,t,n,i);if(!l(s))return;let c=EU(r,n,i);if(!l(c))return;let u=new TU(t,n,i,s,c);return this._picking.pickMetadata(this,e,u)};Ai.prototype.pickMetadataSchema=function(e){let t=this.pick(e);return l(t)?t.detail?.model?.structuralMetadata?.schema:void 0};Ai.prototype.pickPositionWorldCoordinates=function(e,t){return this._picking.pickPositionWorldCoordinates(this,e,t)};Ai.prototype.pickPosition=function(e,t){return this._picking.pickPosition(this,e,t)};Ai.prototype.drillPick=function(e,t,n,i){return this._picking.drillPick(this,e,t,n,i)};function mMt(e){let t=e._frameState;Lne.camera=t.camera,Lne.cullingVolume=t.cullingVolume,e.primitives.updateForPass(t,Lne)}function pMt(e){let t=e._frameState;if(!t.camera.canPreloadFlight())return;Nne.camera=e.preloadFlightCamera,Nne.cullingVolume=e.preloadFlightCullingVolume,e.primitives.updateForPass(t,Nne)}function gMt(e){e.primitives.updateForPass(e._frameState,COt)}Ai.prototype.pickFromRay=function(e,t,n){return this._picking.pickFromRay(this,e,t,n)};Ai.prototype.drillPickFromRay=function(e,t,n,i){return this._picking.drillPickFromRay(this,e,t,n,i)};Ai.prototype.pickFromRayMostDetailed=function(e,t,n){return this._picking.pickFromRayMostDetailed(this,e,t,n)};Ai.prototype.drillPickFromRayMostDetailed=function(e,t,n,i){return this._picking.drillPickFromRayMostDetailed(this,e,t,n,i)};Ai.prototype.sampleHeight=function(e,t,n){return this._picking.sampleHeight(this,e,t,n)};Ai.prototype.clampToHeight=function(e,t,n,i){return this._picking.clampToHeight(this,e,t,n,i)};Ai.prototype.sampleHeightMostDetailed=function(e,t,n){return this._picking.sampleHeightMostDetailed(this,e,t,n)};Ai.prototype.clampToHeightMostDetailed=function(e,t,n){return this._picking.clampToHeightMostDetailed(this,e,t,n)};Ai.prototype.cartesianToCanvasCoordinates=function(e,t){return eo.worldToWindowCoordinates(this,e,t)};Ai.prototype.completeMorph=function(){this._transitioner.completeMorph()};Ai.prototype.morphTo2D=function(e){e=e??2,this._transitioner.morphTo2D(e,this._ellipsoid)};Ai.prototype.morphToColumbusView=function(e){e=e??2,this._transitioner.morphToColumbusView(e,this._ellipsoid)};Ai.prototype.morphTo3D=function(e){e=e??2,this._transitioner.morphTo3D(e,this._ellipsoid)};function _Mt(e,t){if(e._removeTerrainProviderReadyListener=e._removeTerrainProviderReadyListener&&e._removeTerrainProviderReadyListener(),t.ready){l(e.globe)&&(e.globe.terrainProvider=t.provider);return}e.globe.terrainProvider=void 0,e._removeTerrainProviderReadyListener=t.readyEvent.addEventListener(n=>{l(e)&&l(e.globe)&&(e.globe.terrainProvider=n),e._removeTerrainProviderReadyListener()})}Ai.prototype.setTerrain=function(e){return _Mt(this,e),e};Ai.prototype.isDestroyed=function(){return!1};Ai.prototype.destroy=function(){this._tweens.removeAll(),this._computeEngine=this._computeEngine&&this._computeEngine.destroy(),this._screenSpaceCameraController=this._screenSpaceCameraController&&this._screenSpaceCameraController.destroy(),this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this._primitives=this._primitives&&this._primitives.destroy(),this._groundPrimitives=this._groundPrimitives&&this._groundPrimitives.destroy(),this._globe=this._globe&&this._globe.destroy(),this._removeTerrainProviderReadyListener=this._removeTerrainProviderReadyListener&&this._removeTerrainProviderReadyListener(),this.skyBox=this.skyBox&&this.skyBox.destroy(),this.skyAtmosphere=this.skyAtmosphere&&this.skyAtmosphere.destroy(),this._debugSphere=this._debugSphere&&this._debugSphere.destroy(),this.sun=this.sun&&this.sun.destroy(),this._sunPostProcess=this._sunPostProcess&&this._sunPostProcess.destroy(),this._depthPlane=this._depthPlane&&this._depthPlane.destroy(),this._transitioner=this._transitioner&&this._transitioner.destroy(),this._debugFrustumPlanes=this._debugFrustumPlanes&&this._debugFrustumPlanes.destroy(),this._brdfLutGenerator=this._brdfLutGenerator&&this._brdfLutGenerator.destroy(),this._picking=this._picking&&this._picking.destroy(),this._defaultView=this._defaultView&&this._defaultView.destroy(),this._view=void 0,this._removeCreditContainer&&this._canvas.parentNode.removeChild(this._creditContainer),this.postProcessStages=this.postProcessStages&&this.postProcessStages.destroy(),this._context=this._context&&this._context.destroy(),this._frameState.creditDisplay=this._frameState.creditDisplay&&this._frameState.creditDisplay.destroy(),l(this._performanceDisplay)&&(this._performanceDisplay=this._performanceDisplay&&this._performanceDisplay.destroy(),this._performanceContainer.parentNode.removeChild(this._performanceContainer)),this._removeRequestListenerCallback(),this._removeTaskProcessorListenerCallback();for(let e=0;e<this._removeGlobeCallbacks.length;++e)this._removeGlobeCallbacks[e]();return this._removeGlobeCallbacks.length=0,l(this._removeUpdateHeightCallback)&&(this._removeUpdateHeightCallback(),this._removeUpdateHeightCallback=void 0),fe(this)};var vU=Ai;var mI=`float interpolateByDistance(vec4 nearFarScalar, float distance)
- {
- float startDistance = nearFarScalar.x;
- float startValue = nearFarScalar.y;
- float endDistance = nearFarScalar.z;
- float endValue = nearFarScalar.w;
- float t = clamp((distance - startDistance) / (endDistance - startDistance), 0.0, 1.0);
- return mix(startValue, endValue, t);
- }
-
- void computeAtmosphereScattering(vec3 positionWC, vec3 lightDirection, out vec3 rayleighColor, out vec3 mieColor, out float opacity, out float underTranslucentGlobe)
- {
- float ellipsoidRadiiDifference = czm_ellipsoidRadii.x - czm_ellipsoidRadii.z;
-
- // Adjustment to the atmosphere radius applied based on the camera height.
- float distanceAdjustMin = czm_ellipsoidRadii.x / 4.0;
- float distanceAdjustMax = czm_ellipsoidRadii.x;
- float distanceAdjustModifier = ellipsoidRadiiDifference / 2.0;
- float distanceAdjust = distanceAdjustModifier * clamp((czm_eyeHeight - distanceAdjustMin) / (distanceAdjustMax - distanceAdjustMin), 0.0, 1.0);
-
- // Since atmosphere scattering assumes the atmosphere is a spherical shell, we compute an inner radius of the atmosphere best fit
- // for the position on the ellipsoid.
- float radiusAdjust = (ellipsoidRadiiDifference / 4.0) + distanceAdjust;
- float atmosphereInnerRadius = (length(czm_viewerPositionWC) - czm_eyeHeight) - radiusAdjust;
-
- // Setup the primary ray: from the camera position to the vertex position.
- vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC;
- vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);
- czm_ray primaryRay = czm_ray(czm_viewerPositionWC, cameraToPositionWCDirection);
-
- underTranslucentGlobe = 0.0;
-
- // Brighten the sky atmosphere under the Earth's atmosphere when translucency is enabled.
- #if defined(GLOBE_TRANSLUCENT)
-
- // Check for intersection with the inner radius of the atmopshere.
- czm_raySegment primaryRayEarthIntersect = czm_raySphereIntersectionInterval(primaryRay, vec3(0.0), atmosphereInnerRadius + radiusAdjust);
- if (primaryRayEarthIntersect.start > 0.0 && primaryRayEarthIntersect.stop > 0.0) {
-
- // Compute position on globe.
- vec3 direction = normalize(positionWC);
- czm_ray ellipsoidRay = czm_ray(positionWC, -direction);
- czm_raySegment ellipsoidIntersection = czm_rayEllipsoidIntersectionInterval(ellipsoidRay, vec3(0.0), czm_ellipsoidInverseRadii);
- vec3 onEarth = positionWC - (direction * ellipsoidIntersection.start);
-
- // Control the color using the camera angle.
- float angle = dot(normalize(czm_viewerPositionWC), normalize(onEarth));
-
- // Control the opacity using the distance from Earth.
- opacity = interpolateByDistance(vec4(0.0, 1.0, czm_ellipsoidRadii.x, 0.0), length(czm_viewerPositionWC - onEarth));
- vec3 horizonColor = vec3(0.1, 0.2, 0.3);
- vec3 nearColor = vec3(0.0);
-
- rayleighColor = mix(nearColor, horizonColor, exp(-angle) * opacity);
-
- // Set the traslucent flag to avoid alpha adjustment in computeFinalColor funciton.
- underTranslucentGlobe = 1.0;
- return;
- }
- #endif
-
- computeScattering(
- primaryRay,
- length(cameraToPositionWC),
- lightDirection,
- atmosphereInnerRadius,
- rayleighColor,
- mieColor,
- opacity
- );
-
- // Alter the opacity based on how close the viewer is to the ground.
- // (0.0 = At edge of atmosphere, 1.0 = On ground)
- float cameraHeight = czm_eyeHeight + atmosphereInnerRadius;
- float atmosphereOuterRadius = atmosphereInnerRadius + ATMOSPHERE_THICKNESS;
- opacity = clamp((atmosphereOuterRadius - cameraHeight) / (atmosphereOuterRadius - atmosphereInnerRadius), 0.0, 1.0);
-
- // Alter alpha based on time of day (0.0 = night , 1.0 = day)
- float nightAlpha = (u_radiiAndDynamicAtmosphereColor.z != 0.0) ? clamp(dot(normalize(positionWC), lightDirection), 0.0, 1.0) : 1.0;
- opacity *= pow(nightAlpha, 0.5);
- }
- `;var SU=`in vec3 v_outerPositionWC;
-
- uniform vec3 u_hsbShift;
-
- #ifndef PER_FRAGMENT_ATMOSPHERE
- in vec3 v_mieColor;
- in vec3 v_rayleighColor;
- in float v_opacity;
- in float v_translucent;
- #endif
-
- void main (void)
- {
- float lightEnum = u_radiiAndDynamicAtmosphereColor.z;
- vec3 lightDirection = czm_getDynamicAtmosphereLightDirection(v_outerPositionWC, lightEnum);
-
- vec3 mieColor;
- vec3 rayleighColor;
- float opacity;
- float translucent;
-
- #ifdef PER_FRAGMENT_ATMOSPHERE
- computeAtmosphereScattering(
- v_outerPositionWC,
- lightDirection,
- rayleighColor,
- mieColor,
- opacity,
- translucent
- );
- #else
- mieColor = v_mieColor;
- rayleighColor = v_rayleighColor;
- opacity = v_opacity;
- translucent = v_translucent;
- #endif
-
- vec4 color = computeAtmosphereColor(v_outerPositionWC, lightDirection, rayleighColor, mieColor, opacity);
-
- #ifndef HDR
- color.rgb = czm_pbrNeutralTonemapping(color.rgb);
- color.rgb = czm_inverseGamma(color.rgb);
- #endif
-
- #ifdef COLOR_CORRECT
- const bool ignoreBlackPixels = true;
- color.rgb = czm_applyHSBShift(color.rgb, u_hsbShift, ignoreBlackPixels);
- #endif
-
- // For the parts of the sky atmosphere that are not behind a translucent globe,
- // we mix in the default opacity so that the sky atmosphere still appears at distance.
- // This is needed because the opacity in the sky atmosphere is initially adjusted based
- // on the camera height.
- if (translucent == 0.0) {
- color.a = mix(color.b, 1.0, color.a) * smoothstep(0.0, 1.0, czm_morphTime);
- }
-
- out_FragColor = color;
- }
- `;var wU=`in vec4 position;
-
- out vec3 v_outerPositionWC;
-
- #ifndef PER_FRAGMENT_ATMOSPHERE
- out vec3 v_mieColor;
- out vec3 v_rayleighColor;
- out float v_opacity;
- out float v_translucent;
- #endif
-
- void main(void)
- {
- vec4 positionWC = czm_model * position;
- float lightEnum = u_radiiAndDynamicAtmosphereColor.z;
- vec3 lightDirection = czm_getDynamicAtmosphereLightDirection(positionWC.xyz, lightEnum);
-
- #ifndef PER_FRAGMENT_ATMOSPHERE
- computeAtmosphereScattering(
- positionWC.xyz,
- lightDirection,
- v_rayleighColor,
- v_mieColor,
- v_opacity,
- v_translucent
- );
- #endif
-
- v_outerPositionWC = positionWC.xyz;
- vec4 positionEC = czm_modelView * position;
- gl_Position = czm_projection * positionEC;
- }
- `;function pI(e){e=e??te.WGS84,this.show=!0,this.perFragmentAtmosphere=!1,this._ellipsoid=e;let t=1.025,n=h.multiplyByScalar(e.radii,t,new h);this._scaleMatrix=M.fromScale(n),this._modelMatrix=new M,this._command=new tt({owner:this,modelMatrix:this._modelMatrix}),this._spSkyFromSpace=void 0,this._spSkyFromAtmosphere=void 0,this._flags=void 0,this.atmosphereLightIntensity=50,this.atmosphereRayleighCoefficient=new h(55e-7,13e-6,284e-7),this.atmosphereMieCoefficient=new h(21e-6,21e-6,21e-6),this.atmosphereRayleighScaleHeight=1e4,this.atmosphereMieScaleHeight=3200,this.atmosphereMieAnisotropy=.9,this.hueShift=0,this.saturationShift=0,this.brightnessShift=0,this._hueSaturationBrightness=new h;let i=new h;i.x=e.maximumRadius*t,i.y=e.maximumRadius,i.z=0,this._radiiAndDynamicAtmosphereColor=i;let o=this;this._command.uniformMap={u_radiiAndDynamicAtmosphereColor:function(){return o._radiiAndDynamicAtmosphereColor},u_hsbShift:function(){return o._hueSaturationBrightness.x=o.hueShift,o._hueSaturationBrightness.y=o.saturationShift,o._hueSaturationBrightness.z=o.brightnessShift,o._hueSaturationBrightness},u_atmosphereLightIntensity:function(){return o.atmosphereLightIntensity},u_atmosphereRayleighCoefficient:function(){return o.atmosphereRayleighCoefficient},u_atmosphereMieCoefficient:function(){return o.atmosphereMieCoefficient},u_atmosphereRayleighScaleHeight:function(){return o.atmosphereRayleighScaleHeight},u_atmosphereMieScaleHeight:function(){return o.atmosphereMieScaleHeight},u_atmosphereMieAnisotropy:function(){return o.atmosphereMieAnisotropy}}}Object.defineProperties(pI.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});pI.prototype.setDynamicLighting=function(e){this._radiiAndDynamicAtmosphereColor.z=e};var Une=new M;pI.prototype.update=function(e,t){if(!this.show)return;let n=e.mode;if(n!==ie.SCENE3D&&n!==ie.MORPHING||!e.passes.render)return;let i=M.fromRotationTranslation(e.context.uniformState.inverseViewRotation,h.ZERO,Une),o=M.multiplyTransformation(i,Li.Y_UP_TO_Z_UP,Une),r=M.multiply(this._scaleMatrix,o,Une);M.clone(r,this._modelMatrix);let a=e.context,s=AMt(this),c=e.globeTranslucencyState.translucent,u=this.perFragmentAtmosphere||c||!l(t)||!t.show,f=this._command;if(!l(f.vertexArray)){let p=js.createGeometry(new js({radii:new h(1,1,1),slicePartitions:256,stackPartitions:256,vertexFormat:Ne.POSITION_ONLY}));f.vertexArray=Fn.fromGeometry({context:a,geometry:p,attributeLocations:kn.createAttributeLocations(p),bufferUsage:Oe.STATIC_DRAW}),f.renderState=Ve.fromCache({cull:{enabled:!0,face:Mi.FRONT},blending:Jt.ALPHA_BLEND,depthMask:!1})}let d=s|u<<2|c<<3;if(d!==this._flags){this._flags=d;let p=[];s&&p.push("COLOR_CORRECT"),u&&p.push("PER_FRAGMENT_ATMOSPHERE"),c&&p.push("GLOBE_TRANSLUCENT");let g=new He({defines:p,sources:[$h,mI,wU]}),m=new He({defines:p,sources:[$h,mI,SU]});this._spSkyAtmosphere=Kt.fromCache({context:a,vertexShaderSource:g,fragmentShaderSource:m}),f.shaderProgram=this._spSkyAtmosphere}return f};function AMt(e){return!(D.equalsEpsilon(e.hueShift,0,D.EPSILON7)&&D.equalsEpsilon(e.saturationShift,0,D.EPSILON7)&&D.equalsEpsilon(e.brightnessShift,0,D.EPSILON7))}pI.prototype.isDestroyed=function(){return!1};pI.prototype.destroy=function(){let e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),this._spSkyAtmosphere=this._spSkyAtmosphere&&this._spSkyAtmosphere.destroy(),fe(this)};var IU=pI;var DU=`uniform samplerCube u_cubeMap;
-
- in vec3 v_texCoord;
-
- void main()
- {
- vec4 color = czm_textureCube(u_cubeMap, normalize(v_texCoord));
- out_FragColor = vec4(czm_gammaCorrect(color).rgb, czm_morphTime);
- }
- `;var PU=`in vec3 position;
- out vec3 v_texCoord;
-
- void main()
- {
- vec3 p = czm_viewRotation * (czm_temeToPseudoFixed * (czm_entireFrustum.y * position));
- gl_Position = czm_projection * vec4(p, 1.0);
- v_texCoord = position.xyz;
- }
- `;var RU=`uniform mat3 u_cubeMapPanoramaTransform;
-
- in vec3 position;
- out vec3 v_texCoord;
-
- void main()
- {
- vec3 p = czm_viewRotation * (u_cubeMapPanoramaTransform * (czm_entireFrustum.y * position));
- gl_Position = czm_projection * vec4(p, 1.0);
- v_texCoord = position.xyz;
- }
- `;function OU(e){this.sources=e.sources,this._sources=void 0,this._transform=e.transform,this.show=e.show??!0,this._returnCommand=e.returnCommand??!1,this._addToPanoramaCommandList=!this._returnCommand,this._command=new tt({modelMatrix:M.clone(M.IDENTITY),owner:this,pass:Ie.ENVIRONMENT}),this._cubeMap=void 0,this._attributeLocations=void 0,this._useHdr=void 0,this._hasError=!1,this._error=void 0;let t=e.credit;typeof t=="string"&&(t=new yt(t)),this._credit=t}Object.defineProperties(OU.prototype,{transform:{get:function(){return this._transform}},credit:{get:function(){return l(this._credit)?this._credit:void 0}}});OU.prototype.update=function(e,t){let n=this,{mode:i,passes:o,context:r,panoramaCommandList:a}=e;if(!this.show||i!==ie.SCENE3D&&i!==ie.MORPHING||!o.render)return;if(this._hasError){let c=this._error;throw this._hasError=!1,this._error=void 0,c}if(this._sources!==this.sources){this._sources=this.sources;let c=this.sources;typeof c.positiveX=="string"?SR(r,this._sources).then(function(u){n._cubeMap=n._cubeMap&&n._cubeMap.destroy(),n._cubeMap=u}).catch(u=>{this._hasError=!0,this._error=u}):(this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),this._cubeMap=new $r({context:r,source:c})),this._addToPanoramaCommandList=!0}let s=this._command;if(!l(s.vertexArray)){s.uniformMap={u_cubeMap:function(){return n._cubeMap},u_cubeMapPanoramaTransform:function(){return n._transform}};let c=Ec.createGeometry(Ec.fromDimensions({dimensions:new h(2,2,2),vertexFormat:Ne.POSITION_ONLY})),u=this._attributeLocations=kn.createAttributeLocations(c);s.vertexArray=Fn.fromGeometry({context:r,geometry:c,attributeLocations:u,bufferUsage:Oe.STATIC_DRAW}),s.renderState=Ve.fromCache({depthTest:{enabled:!1},depthMask:!1,blending:Jt.ALPHA_BLEND}),this._addToPanoramaCommandList=!0}if(!l(s.shaderProgram)||this._useHdr!==t){let c=new He({defines:[t?"HDR":""],sources:[DU]});s.shaderProgram=Kt.fromCache({context:r,vertexShaderSource:l(this._transform)?RU:PU,fragmentShaderSource:c,attributeLocations:this._attributeLocations}),this._useHdr=t,this._addToPanoramaCommandList=!0}if(l(this._cubeMap)){if(this.show&&l(this._credit)&&!this._returnCommand&&e.creditDisplay.addCreditToNextFrame(this._credit),this._returnCommand)return s;this._addToPanoramaCommandList&&(a.push(s),this._addToPanoramaCommandList=!1)}};OU.prototype.isDestroyed=function(){return!1};OU.prototype.destroy=function(){let e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),fe(this)};var LT=OU;function NT(e){this._sources=e.sources,this._show=e.show??!0,this._panorama=new LT({sources:this._sources,show:this._show,returnCommand:!0})}Object.defineProperties(NT.prototype,{sources:{get:function(){return this._panorama.sources},set:function(e){this._panorama.sources=e}},show:{get:function(){return this._panorama.show},set:function(e){this._panorama.show=e}}});NT.prototype.update=function(e,t){let{mode:n,passes:i}=e;if(!(n!==ie.SCENE3D&&n!==ie.MORPHING)&&i.render)return this._panorama.update(e,t)};NT.prototype.isDestroyed=function(){return!1};NT.prototype.destroy=function(){return this._panorama=this._panorama&&this._panorama.destroy(),fe(this)};function gI(e){return Xt(`Assets/Textures/SkyBox/tycho2t3_80_${e}.jpg`)}NT.createEarthSkyBox=function(){return new NT({sources:{positiveX:gI("px"),negativeX:gI("mx"),positiveY:gI("py"),negativeY:gI("my"),positiveZ:gI("pz"),negativeZ:gI("mz")}})};var MU=NT;var BU=`uniform sampler2D u_texture;
-
- in vec2 v_textureCoordinates;
-
- void main()
- {
- vec4 color = texture(u_texture, v_textureCoordinates);
- out_FragColor = czm_gammaCorrect(color);
- }
- `;var LU=`uniform float u_radiusTS;
-
- in vec2 v_textureCoordinates;
-
- vec2 rotate(vec2 p, vec2 direction)
- {
- return vec2(p.x * direction.x - p.y * direction.y, p.x * direction.y + p.y * direction.x);
- }
-
- vec4 addBurst(vec2 position, vec2 direction, float lengthScalar)
- {
- vec2 rotatedPosition = rotate(position, direction) * vec2(25.0, 0.75);
- float radius = length(rotatedPosition) * lengthScalar;
- float burst = 1.0 - smoothstep(0.0, 0.55, radius);
- return vec4(burst);
- }
-
- void main()
- {
- float lengthScalar = 2.0 / sqrt(2.0);
- vec2 position = v_textureCoordinates - vec2(0.5);
- float radius = length(position) * lengthScalar;
- float surface = step(radius, u_radiusTS);
- vec4 color = vec4(vec2(1.0), surface + 0.2, surface);
-
- float glow = 1.0 - smoothstep(0.0, 0.55, radius);
- color.ba += mix(vec2(0.0), vec2(1.0), glow) * 0.75;
-
- vec4 burst = vec4(0.0);
-
- // The following loop has been manually unrolled for speed, to
- // avoid sin() and cos().
- //
- //for (float i = 0.4; i < 3.2; i += 1.047) {
- // vec2 direction = vec2(sin(i), cos(i));
- // burst += 0.4 * addBurst(position, direction, lengthScalar);
- //
- // direction = vec2(sin(i - 0.08), cos(i - 0.08));
- // burst += 0.3 * addBurst(position, direction, lengthScalar);
- //}
-
- burst += 0.4 * addBurst(position, vec2(0.38942, 0.92106), lengthScalar); // angle == 0.4
- burst += 0.4 * addBurst(position, vec2(0.99235, 0.12348), lengthScalar); // angle == 0.4 + 1.047
- burst += 0.4 * addBurst(position, vec2(0.60327, -0.79754), lengthScalar); // angle == 0.4 + 1.047 * 2.0
-
- burst += 0.3 * addBurst(position, vec2(0.31457, 0.94924), lengthScalar); // angle == 0.4 - 0.08
- burst += 0.3 * addBurst(position, vec2(0.97931, 0.20239), lengthScalar); // angle == 0.4 + 1.047 - 0.08
- burst += 0.3 * addBurst(position, vec2(0.66507, -0.74678), lengthScalar); // angle == 0.4 + 1.047 * 2.0 - 0.08
-
- // End of manual loop unrolling.
-
- color += clamp(burst, vec4(0.0), vec4(1.0)) * 0.15;
-
- out_FragColor = clamp(color, vec4(0.0), vec4(1.0));
- }
- `;var NU=`in vec2 direction;
-
- uniform float u_size;
-
- out vec2 v_textureCoordinates;
-
- void main()
- {
- vec4 position;
- if (czm_morphTime == 1.0)
- {
- position = vec4(czm_sunPositionWC, 1.0);
- }
- else
- {
- position = vec4(czm_sunPositionColumbusView.zxy, 1.0);
- }
-
- vec4 positionEC = czm_view * position;
- vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);
-
- vec2 halfSize = vec2(u_size * 0.5);
- halfSize *= ((direction * 2.0) - 1.0);
-
- gl_Position = czm_viewportOrthographic * vec4(positionWC.xy + halfSize, -positionWC.z, 1.0);
-
- v_textureCoordinates = direction;
- }
- `;function kU(){this.show=!0,this._drawCommand=new tt({primitiveType:Re.TRIANGLES,boundingVolume:new ce,owner:this}),this._commands={drawCommand:this._drawCommand,computeCommand:void 0},this._boundingVolume=new ce,this._boundingVolume2D=new ce,this._texture=void 0,this._drawingBufferWidth=void 0,this._drawingBufferHeight=void 0,this._radiusTS=void 0,this._size=void 0,this.glowFactor=1,this._glowFactorDirty=!1,this._useHdr=void 0;let e=this;this._uniformMap={u_texture:function(){return e._texture},u_size:function(){return e._size}}}Object.defineProperties(kU.prototype,{glowFactor:{get:function(){return this._glowFactor},set:function(e){e=Math.max(e,0),this._glowFactor=e,this._glowFactorDirty=!0}}});var yMt=new z,xMt=new z,bMt=new se,FU=new se;kU.prototype.update=function(e,t,n){if(!this.show)return;let i=e.mode;if(i===ie.SCENE2D||i===ie.MORPHING||!e.passes.render)return;let o=e.context,r=t.viewport.width,a=t.viewport.height;if(!l(this._texture)||r!==this._drawingBufferWidth||a!==this._drawingBufferHeight||this._glowFactorDirty||n!==this._useHdr){this._texture=this._texture&&this._texture.destroy(),this._drawingBufferWidth=r,this._drawingBufferHeight=a,this._glowFactorDirty=!1,this._useHdr=n;let E=Math.max(r,a);E=Math.pow(2,Math.ceil(Math.log(E)/Math.log(2))-2),E=Math.max(1,E);let S=n?o.halfFloatingPointTexture?je.HALF_FLOAT:je.FLOAT:je.UNSIGNED_BYTE;this._texture=new It({context:o,width:E,height:E,pixelFormat:Xe.RGBA,pixelDatatype:S}),this._glowLengthTS=this._glowFactor*5,this._radiusTS=1/(1+2*this._glowLengthTS)*.5;let w=this,P={u_radiusTS:function(){return w._radiusTS}};this._commands.computeCommand=new wl({fragmentShaderSource:LU,outputTexture:this._texture,uniformMap:P,persists:!1,owner:this,postExecute:function(){w._commands.computeCommand=void 0}})}let s=this._drawCommand;if(!l(s.vertexArray)){let E={direction:0},S=new Uint8Array(8);S[0]=0,S[1]=0,S[2]=255,S[3]=0,S[4]=255,S[5]=255,S[6]=0,S[7]=255;let w=Ke.createVertexBuffer({context:o,typedArray:S,usage:Oe.STATIC_DRAW}),P=[{index:E.direction,vertexBuffer:w,componentsPerAttribute:2,normalize:!0,componentDatatype:Y.UNSIGNED_BYTE}],R=Ke.createIndexBuffer({context:o,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:Oe.STATIC_DRAW,indexDatatype:Ue.UNSIGNED_SHORT});s.vertexArray=new Fn({context:o,attributes:P,indexBuffer:R}),s.shaderProgram=Kt.fromCache({context:o,vertexShaderSource:NU,fragmentShaderSource:BU,attributeLocations:E}),s.renderState=Ve.fromCache({blending:Jt.ALPHA_BLEND}),s.uniformMap=this._uniformMap}let c=o.uniformState.sunPositionWC,u=o.uniformState.sunPositionColumbusView,f=this._boundingVolume,d=this._boundingVolume2D;h.clone(c,f.center),d.center.x=u.z,d.center.y=u.x,d.center.z=u.y,f.radius=D.SOLAR_RADIUS+D.SOLAR_RADIUS*this._glowLengthTS,d.radius=f.radius,i===ie.SCENE3D?ce.clone(f,s.boundingVolume):i===ie.COLUMBUS_VIEW&&ce.clone(d,s.boundingVolume);let p=eo.computeActualEllipsoidPosition(e,c,FU),g=h.magnitude(h.subtract(p,e.camera.position,FU)),m=o.uniformState.projection,A=bMt;A.x=0,A.y=0,A.z=-g,A.w=1;let y=M.multiplyByVector(m,A,FU),x=eo.clipToGLWindowCoordinates(t.viewport,y,yMt);A.x=D.SOLAR_RADIUS;let b=M.multiplyByVector(m,A,FU),C=eo.clipToGLWindowCoordinates(t.viewport,b,xMt);return this._size=z.magnitude(z.subtract(C,x,FU)),this._size=2*this._size*(1+2*this._glowLengthTS),this._size=Math.ceil(this._size),this._commands};kU.prototype.isDestroyed=function(){return!1};kU.prototype.destroy=function(){let e=this._drawCommand;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),this._texture=this._texture&&this._texture.destroy(),fe(this)};var zU=kU;var q1e=Yr(M4(),1);function CMt(e,t,n){return` float clipDistance = clip(gl_FragCoord, ${e}, ${t});
- vec4 clippingPlanesEdgeColor = vec4(1.0);
- clippingPlanesEdgeColor.rgb = ${n}.rgb;
- float clippingPlanesEdgeWidth = ${n}.a;
- if (clipDistance > 0.0 && clipDistance < clippingPlanesEdgeWidth)
- {
- out_FragColor = clippingPlanesEdgeColor;
- }
- `}var UU=CMt;var TMt={modifyFragmentShader:function(t){return t=He.replaceMain(t,"czm_splitter_main"),t+=`uniform float czm_splitDirection;
- void main()
- {
- #ifndef SHADOW_MAP
- if (czm_splitDirection < 0.0 && gl_FragCoord.x > czm_splitPosition) discard;
- if (czm_splitDirection > 0.0 && gl_FragCoord.x < czm_splitPosition) discard;
- #endif
- czm_splitter_main();
- }
- `,t},addUniforms:function(t,n){n.czm_splitDirection=function(){return t.splitDirection}}},_I=TMt;var FT={NEEDS_DECODE:0,DECODING:1,READY:2,FAILED:3};function VU(e){this._parsedContent=void 0,this._drawCommand=void 0,this._isTranslucent=!1,this._styleTranslucent=!1,this._constantColor=V.clone(V.DARKGRAY),this._highlightColor=V.clone(V.WHITE),this._pointSize=1,this._rtcCenter=void 0,this._quantizedVolumeScale=void 0,this._quantizedVolumeOffset=void 0,this._styleableShaderAttributes=void 0,this._isQuantized=!1,this._isOctEncoded16P=!1,this._isRGB565=!1,this._hasColors=!1,this._hasNormals=!1,this._hasBatchIds=!1,this._decodingState=FT.READY,this._dequantizeInShader=!0,this._isQuantizedDraco=!1,this._isOctEncodedDraco=!1,this._quantizedRange=0,this._octEncodedRange=0,this.backFaceCulling=!1,this._backFaceCulling=!1,this.normalShading=!0,this._normalShading=!0,this._opaqueRenderState=void 0,this._translucentRenderState=void 0,this._mode=void 0,this._ready=!1,this._pointsLength=0,this._geometryByteLength=0,this._vertexShaderLoaded=e.vertexShaderLoaded,this._fragmentShaderLoaded=e.fragmentShaderLoaded,this._uniformMapLoaded=e.uniformMapLoaded,this._batchTableLoaded=e.batchTableLoaded,this._pickIdLoaded=e.pickIdLoaded,this._opaquePass=e.opaquePass??Ie.OPAQUE,this._cull=e.cull??!0,this.style=void 0,this._style=void 0,this.styleDirty=!1,this.modelMatrix=M.clone(M.IDENTITY),this._modelMatrix=M.clone(M.IDENTITY),this.time=0,this.shadows=vn.ENABLED,this._boundingSphere=void 0,this.clippingPlanes=void 0,this.isClipped=!1,this.clippingPlanesDirty=!1,this.clippingPlanesOriginMatrix=void 0,this.attenuation=!1,this._attenuation=!1,this.geometricError=0,this.geometricErrorScale=1,this.maximumAttenuation=this._pointSize,this.splitDirection=e.splitDirection??Or.NONE,this._splittingEnabled=!1,this._error=void 0,EMt(this,e)}Object.defineProperties(VU.prototype,{pointsLength:{get:function(){return this._pointsLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},ready:{get:function(){return this._ready}},color:{get:function(){return V.clone(this._highlightColor)},set:function(e){this._highlightColor=V.clone(e,this._highlightColor)}},boundingSphere:{get:function(){if(l(this._drawCommand))return this._drawCommand.boundingVolume},set:function(e){this._boundingSphere=ce.clone(e,this._boundingSphere)}}});function EMt(e,t){let n=Nb.parse(t.arrayBuffer,t.byteOffset);if(e._parsedContent=n,e._rtcCenter=n.rtcCenter,e._hasNormals=n.hasNormals,e._hasColors=n.hasColors,e._hasBatchIds=n.hasBatchIds,e._isTranslucent=n.isTranslucent,!n.hasBatchIds&&l(n.batchTableBinary)&&(n.styleableProperties=qh.getBinaryProperties(n.pointsLength,n.batchTableJson,n.batchTableBinary)),l(n.draco)){let s=n.draco;e._decodingState=FT.NEEDS_DECODE,s.dequantizeInShader=e._dequantizeInShader}let i=n.positions;l(i)&&(e._isQuantized=i.isQuantized,e._quantizedVolumeScale=i.quantizedVolumeScale,e._quantizedVolumeOffset=i.quantizedVolumeOffset,e._quantizedRange=i.quantizedRange);let o=n.normals;l(o)&&(e._isOctEncoded16P=o.octEncoded);let r=n.colors;l(r)&&(l(r.constantColor)&&(e._constantColor=V.clone(r.constantColor,e._constantColor),e._hasColors=!1),e._isRGB565=r.isRGB565);let a=n.batchIds;l(n.batchIds)&&(a.name="BATCH_ID",a.semantic="BATCH_ID",a.setIndex=void 0),n.hasBatchIds&&e._batchTableLoaded(n.batchLength,n.batchTableJson,n.batchTableBinary),e._pointsLength=n.pointsLength}var vMt=new h,SMt=new h,wMt=new h,H1e,H5;function IMt(e){if(!l(H5)){H1e=new q1e.default(0),H5=new Array(e);for(let t=0;t<e;++t)H5[t]=H1e.random()}return H5}function DMt(e){let n=e.length/3,i=Math.min(n,20),o=IMt(20),r=Number.MAX_VALUE,a=-Number.MAX_VALUE,s=h.fromElements(r,r,r,vMt),c=h.fromElements(a,a,a,SMt);for(let f=0;f<i;++f){let d=Math.floor(o[f]*n),p=h.unpack(e,d*3,wMt);h.minimumByComponent(s,p,s),h.maximumByComponent(c,p,c)}let u=ce.fromCornerPoints(s,c);return u.radius+=D.EPSILON2,u}function W1e(e,t){let n=Y.fromTypedArray(e);return n===Y.INT||n===Y.UNSIGNED_INT||n===Y.DOUBLE?(_t("Cast pnts property to floats",`Point cloud property "${t}" will be cast to a float array because INT, UNSIGNED_INT, and DOUBLE are not valid WebGL vertex attribute types. Some precision may be lost.`),new Float32Array(e)):e}var PMt=new se,RMt=new se,OMt=new V,Y1e=0,W5=1,Wne=2,X1e=3,MMt=4,Vne=new M,BMt=new M;function LMt(e,t){let n=t.context,i=e._parsedContent,o=e._pointsLength,r=i.positions,a=i.colors,s=i.normals,c=i.batchIds,u=i.styleableProperties,f=l(u),d=e._isQuantized,p=e._isQuantizedDraco,g=e._isOctEncoded16P,m=e._isOctEncodedDraco,A=e._quantizedRange,y=e._octEncodedRange,x=e._isRGB565,b=e._isTranslucent,C=e._hasColors,E=e._hasNormals,S=e._hasBatchIds,w,P,R=[],B={};if(e._styleableShaderAttributes=B,f){let k=MMt;for(let U in u)if(u.hasOwnProperty(U)){let F=u[U],H=W1e(F.typedArray,U);w=F.componentCount,P=Y.fromTypedArray(H);let q=Ke.createVertexBuffer({context:n,typedArray:H,usage:Oe.STATIC_DRAW});e._geometryByteLength+=q.sizeInBytes;let J={index:k,vertexBuffer:q,componentsPerAttribute:w,componentDatatype:P,normalize:!1,offsetInBytes:0,strideInBytes:0};R.push(J),B[U]={location:k,componentCount:w},++k}}let L=Ke.createVertexBuffer({context:n,typedArray:r.typedArray,usage:Oe.STATIC_DRAW});e._geometryByteLength+=L.sizeInBytes;let _;C&&(_=Ke.createVertexBuffer({context:n,typedArray:a.typedArray,usage:Oe.STATIC_DRAW}),e._geometryByteLength+=_.sizeInBytes);let T;E&&(T=Ke.createVertexBuffer({context:n,typedArray:s.typedArray,usage:Oe.STATIC_DRAW}),e._geometryByteLength+=T.sizeInBytes);let v;S&&(c.typedArray=W1e(c.typedArray,"batchIds"),v=Ke.createVertexBuffer({context:n,typedArray:c.typedArray,usage:Oe.STATIC_DRAW}),e._geometryByteLength+=v.sizeInBytes);let I=[];if(d?P=Y.UNSIGNED_SHORT:p?P=A<=255?Y.UNSIGNED_BYTE:Y.UNSIGNED_SHORT:P=Y.FLOAT,I.push({index:Y1e,vertexBuffer:L,componentsPerAttribute:3,componentDatatype:P,normalize:!1,offsetInBytes:0,strideInBytes:0}),e._cull&&(d||p?e._boundingSphere=ce.fromCornerPoints(h.ZERO,e._quantizedVolumeScale):e._boundingSphere=DMt(r.typedArray)),C)if(x)I.push({index:W5,vertexBuffer:_,componentsPerAttribute:1,componentDatatype:Y.UNSIGNED_SHORT,normalize:!1,offsetInBytes:0,strideInBytes:0});else{let k=b?4:3;I.push({index:W5,vertexBuffer:_,componentsPerAttribute:k,componentDatatype:Y.UNSIGNED_BYTE,normalize:!0,offsetInBytes:0,strideInBytes:0})}E&&(g?(w=2,P=Y.UNSIGNED_BYTE):m?(w=2,P=y<=255?Y.UNSIGNED_BYTE:Y.UNSIGNED_SHORT):(w=3,P=Y.FLOAT),I.push({index:Wne,vertexBuffer:T,componentsPerAttribute:w,componentDatatype:P,normalize:!1,offsetInBytes:0,strideInBytes:0})),S&&I.push({index:X1e,vertexBuffer:v,componentsPerAttribute:1,componentDatatype:Y.fromTypedArray(c.typedArray),normalize:!1,offsetInBytes:0,strideInBytes:0}),f&&(I=I.concat(R));let O=new Fn({context:n,attributes:I}),N={depthTest:{enabled:!0}},j={depthTest:{enabled:!0},depthMask:!1,blending:Jt.ALPHA_BLEND};e._opaquePass===Ie.CESIUM_3D_TILE&&(N.stencilTest=Gt.setCesium3DTileBit(),N.stencilMask=Gt.CESIUM_3D_TILE_MASK,j.stencilTest=Gt.setCesium3DTileBit(),j.stencilMask=Gt.CESIUM_3D_TILE_MASK),e._opaqueRenderState=Ve.fromCache(N),e._translucentRenderState=Ve.fromCache(j),e._drawCommand=new tt({boundingVolume:new ce,cull:e._cull,modelMatrix:new M,primitiveType:Re.POINTS,vertexArray:O,count:o,shaderProgram:void 0,uniformMap:void 0,renderState:b?e._translucentRenderState:e._opaqueRenderState,pass:b?Ie.TRANSLUCENT:e._opaquePass,owner:e,castShadows:!1,receiveShadows:!1,pickId:e._pickIdLoaded()})}function NMt(e,t){let n=t.context,i=e._isQuantized,o=e._isQuantizedDraco,r=e._isOctEncodedDraco,a={u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier:function(){let s=PMt;if(s.x=e._attenuation?e.maximumAttenuation:e._pointSize,s.x*=t.pixelRatio,s.y=e.time,e._attenuation){let c=t.camera.frustum,u;t.mode===ie.SCENE2D||c instanceof fn?u=Number.POSITIVE_INFINITY:u=n.drawingBufferHeight/t.camera.frustum.sseDenominator,s.z=e.geometricError*e.geometricErrorScale,s.w=u}return s},u_highlightColor:function(){return e._highlightColor},u_constantColor:function(){return e._constantColor},u_clippingPlanes:function(){let s=e.clippingPlanes;return e.isClipped?s.texture:n.defaultTexture},u_clippingPlanesEdgeStyle:function(){let s=e.clippingPlanes;if(!l(s))return V.TRANSPARENT;let c=V.clone(s.edgeColor,OMt);return c.alpha=s.edgeWidth,c},u_clippingPlanesMatrix:function(){let s=e.clippingPlanes;if(!l(s))return M.IDENTITY;let c=e.clippingPlanesOriginMatrix??e._modelMatrix;M.multiply(n.uniformState.view3D,c,Vne);let u=M.multiply(Vne,s.modelMatrix,Vne);return M.inverseTranspose(u,BMt)}};_I.addUniforms(e,a),(i||o||r)&&(a=wt(a,{u_quantizedVolumeScaleAndOctEncodedRange:function(){let s=RMt;if(l(e._quantizedVolumeScale)){let c=h.clone(e._quantizedVolumeScale,s);h.divideByScalar(c,e._quantizedRange,s)}return s.w=e._octEncodedRange,s}})),l(e._uniformMapLoaded)&&(a=e._uniformMapLoaded(a)),e._drawCommand.uniformMap=a}function jne(e,t){let n=/czm_3dtiles_property_(\d+)/g,i=n.exec(e);for(;i!==null;){let o=parseInt(i[1]);t.indexOf(o)===-1&&t.push(o),i=n.exec(e)}}function Gne(e,t){e=e.slice(e.indexOf(`
- `));let n=/czm_3dtiles_builtin_property_(\w+)/g,i=n.exec(e);for(;i!==null;){let o=i[1];t.indexOf(o)===-1&&t.push(o),i=n.exec(e)}}function Hne(e,t){let n=e.numberOfAttributes;for(let i=0;i<n;++i){let o=e.getAttribute(i);if(o.index===t)return o}}var FMt={POSITION:"czm_3dtiles_builtin_property_POSITION",POSITION_ABSOLUTE:"czm_3dtiles_builtin_property_POSITION_ABSOLUTE",COLOR:"czm_3dtiles_builtin_property_COLOR",NORMAL:"czm_3dtiles_builtin_property_NORMAL"};function kMt(e,t,n){let i,o,r,a=t.context,s=l(n),c=e._isQuantized,u=e._isQuantizedDraco,f=e._isOctEncoded16P,d=e._isOctEncodedDraco,p=e._isRGB565,g=e._isTranslucent,m=e._hasColors,A=e._hasNormals,y=e._hasBatchIds,x=e._backFaceCulling,b=e._normalShading,C=e._drawCommand.vertexArray,E=e.clippingPlanes,S=e._attenuation,w,P,R,B=g,L=We(FMt),_={},T=e._styleableShaderAttributes;for(o in T)T.hasOwnProperty(o)&&(r=T[o],L[o]=`czm_3dtiles_property_${r.location}`,_[r.location]=r);if(s){let ae={translucent:!1},be="(vec3 czm_3dtiles_builtin_property_POSITION, vec3 czm_3dtiles_builtin_property_POSITION_ABSOLUTE, vec4 czm_3dtiles_builtin_property_COLOR, vec3 czm_3dtiles_builtin_property_NORMAL)";w=n.getColorShaderFunction(`getColorFromStyle${be}`,L,ae),P=n.getShowShaderFunction(`getShowFromStyle${be}`,L,ae),R=n.getPointSizeShaderFunction(`getPointSizeFromStyle${be}`,L,ae),l(w)&&ae.translucent&&(B=!0)}e._styleTranslucent=B;let v=l(w),I=l(P),O=l(R),N=e.isClipped,j=[],k=[];v&&(jne(w,j),Gne(w,k)),I&&(jne(P,j),Gne(P,k)),O&&(jne(R,j),Gne(R,k));let U=k.indexOf("COLOR")>=0,F=k.indexOf("NORMAL")>=0;if(F&&!A)throw new re("Style references the NORMAL semantic but the point cloud does not have normals");for(o in T)if(T.hasOwnProperty(o)){r=T[o];let ae=j.indexOf(r.location)>=0,be=Hne(C,r.location);be.enabled=ae}let H=m&&(!v||U);if(m){let ae=Hne(C,W5);ae.enabled=H}let q=A&&(b||x||F);if(A){let ae=Hne(C,Wne);ae.enabled=q}let J={a_position:Y1e};H&&(J.a_color=W5),q&&(J.a_normal=Wne),y&&(J.a_batchId=X1e);let W="",Z=j.length;for(i=0;i<Z;++i){let ae=j[i];r=_[ae];let be=r.componentCount,ge=`czm_3dtiles_property_${ae}`,we;be===1?we="float":we=`vec${be}`,W+=`in ${we} ${ge};
- `,J[ge]=r.location}NMt(e,t);let K=`in vec3 a_position;
- out vec4 v_color;
- uniform vec4 u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier;
- uniform vec4 u_constantColor;
- uniform vec4 u_highlightColor;
- `;K+=`float u_pointSize;
- float tiles3d_tileset_time;
- `,S&&(K+=`float u_geometricError;
- float u_depthMultiplier;
- `),K+=W,H&&(g?K+=`in vec4 a_color;
- `:p?K+=`in float a_color;
- const float SHIFT_RIGHT_11 = 1.0 / 2048.0;
- const float SHIFT_RIGHT_5 = 1.0 / 32.0;
- const float SHIFT_LEFT_11 = 2048.0;
- const float SHIFT_LEFT_5 = 32.0;
- const float NORMALIZE_6 = 1.0 / 64.0;
- const float NORMALIZE_5 = 1.0 / 32.0;
- `:K+=`in vec3 a_color;
- `),q&&(f||d?K+=`in vec2 a_normal;
- `:K+=`in vec3 a_normal;
- `),y&&(K+=`in float a_batchId;
- `),(c||u||d)&&(K+=`uniform vec4 u_quantizedVolumeScaleAndOctEncodedRange;
- `),v&&(K+=w),I&&(K+=P),O&&(K+=R),K+=`void main()
- {
- u_pointSize = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.x;
- tiles3d_tileset_time = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.y;
- `,S&&(K+=` u_geometricError = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.z;
- u_depthMultiplier = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.w;
- `),H?g?K+=` vec4 color = a_color;
- `:p?K+=` float compressed = a_color;
- float r = floor(compressed * SHIFT_RIGHT_11);
- compressed -= r * SHIFT_LEFT_11;
- float g = floor(compressed * SHIFT_RIGHT_5);
- compressed -= g * SHIFT_LEFT_5;
- float b = compressed;
- vec3 rgb = vec3(r * NORMALIZE_5, g * NORMALIZE_6, b * NORMALIZE_5);
- vec4 color = vec4(rgb, 1.0);
- `:K+=` vec4 color = vec4(a_color, 1.0);
- `:K+=` vec4 color = u_constantColor;
- `,c||u?K+=` vec3 position = a_position * u_quantizedVolumeScaleAndOctEncodedRange.xyz;
- `:K+=` vec3 position = a_position;
- `,K+=` vec3 position_absolute = vec3(czm_model * vec4(position, 1.0));
- `,q?(f?K+=` vec3 normal = czm_octDecode(a_normal);
- `:d?K+=` vec3 normal = czm_octDecode(a_normal, u_quantizedVolumeScaleAndOctEncodedRange.w).zxy;
- `:K+=` vec3 normal = a_normal;
- `,K+=` vec3 normalEC = czm_normal * normal;
- `):K+=` vec3 normal = vec3(1.0);
- `,v&&(K+=` color = getColorFromStyle(position, position_absolute, color, normal);
- `),I&&(K+=` float show = float(getShowFromStyle(position, position_absolute, color, normal));
- `),O?K+=` gl_PointSize = getPointSizeFromStyle(position, position_absolute, color, normal) * czm_pixelRatio;
- `:S?K+=` vec4 positionEC = czm_modelView * vec4(position, 1.0);
- float depth = -positionEC.z;
- gl_PointSize = min((u_geometricError / depth) * u_depthMultiplier, u_pointSize);
- `:K+=` gl_PointSize = u_pointSize;
- `,K+=` color = color * u_highlightColor;
- `,q&&b&&(K+=` float diffuseStrength = czm_getLambertDiffuse(czm_lightDirectionEC, normalEC);
- diffuseStrength = max(diffuseStrength, 0.4);
- color.xyz *= diffuseStrength * czm_lightColor;
- `),K+=` v_color = color;
- gl_Position = czm_modelViewProjection * vec4(position, 1.0);
- `,q&&x&&(K+=` float visible = step(-normalEC.z, 0.0);
- gl_Position *= visible;
- gl_PointSize *= visible;
- `),I&&(K+=` gl_Position.w *= float(show);
- gl_PointSize *= float(show);
- `),K+=`}
- `;let le=`in vec4 v_color;
- `;N&&(le+=`uniform highp sampler2D u_clippingPlanes;
- uniform mat4 u_clippingPlanesMatrix;
- uniform vec4 u_clippingPlanesEdgeStyle;
- `,le+=`
- `,le+=rT(E,a),le+=`
- `),le+=`void main()
- {
- out_FragColor = czm_gammaCorrect(v_color);
- `,N&&(le+=UU("u_clippingPlanes","u_clippingPlanesMatrix","u_clippingPlanesEdgeStyle")),le+=`}
- `,e.splitDirection!==Or.NONE&&(le=_I.modifyFragmentShader(le)),l(e._vertexShaderLoaded)&&(K=e._vertexShaderLoaded(K)),l(e._fragmentShaderLoaded)&&(le=e._fragmentShaderLoaded(le));let me=e._drawCommand;l(me.shaderProgram)&&me.shaderProgram.destroy(),me.shaderProgram=Kt.fromCache({context:a,vertexShaderSource:K,fragmentShaderSource:le,attributeLocations:J});try{me.shaderProgram._bind()}catch{throw new re("Error generating style shader: this may be caused by a type mismatch, index out-of-bounds, or other syntax error.")}}function zMt(e,t){if(e._decodingState===FT.READY)return!1;if(e._decodingState===FT.NEEDS_DECODE){let n=e._parsedContent,i=n.draco,o=cg.decodePointCloud(i,t);l(o)&&(e._decodingState=FT.DECODING,o.then(function(r){e._decodingState=FT.READY;let a=l(r.POSITION)?r.POSITION.array:void 0,s=l(r.RGB)?r.RGB.array:void 0,c=l(r.RGBA)?r.RGBA.array:void 0,u=l(r.NORMAL)?r.NORMAL.array:void 0,f=l(r.BATCH_ID)?r.BATCH_ID.array:void 0,d=l(a)&&l(r.POSITION.data.quantization),p=l(u)&&l(r.NORMAL.data.quantization);if(d){let y=r.POSITION.data.quantization,x=y.range;e._quantizedVolumeScale=h.fromElements(x,x,x),e._quantizedVolumeOffset=h.unpack(y.minValues),e._quantizedRange=(1<<y.quantizationBits)-1,e._isQuantizedDraco=!0}p&&(e._octEncodedRange=(1<<r.NORMAL.data.quantization.quantizationBits)-1,e._isOctEncodedDraco=!0);let g=n.styleableProperties,m=i.batchTableProperties;for(let y in m)if(m.hasOwnProperty(y)){let x=r[y];l(g)||(g={}),g[y]={typedArray:x.array,componentCount:x.data.componentsPerAttribute}}l(a)&&(n.positions={typedArray:a});let A=c??s;l(A)&&(n.colors={typedArray:A}),l(u)&&(n.normals={typedArray:u}),l(f)&&(n.batchIds={typedArray:f}),n.styleableProperties=g}).catch(function(r){e._decodingState=FT.FAILED,e._error=r}))}return!0}var UMt=new se,VMt=new h;VU.prototype.update=function(e){let t=e.context;if(l(this._error)){let u=this._error;throw this._error=void 0,u}if(zMt(this,t))return;let i=!1,o=!M.equals(this._modelMatrix,this.modelMatrix);if(this._mode!==e.mode&&(this._mode=e.mode,o=!0),l(this._drawCommand)||(LMt(this,e),o=!0,i=!0,this._ready=!0,this._parsedContent=void 0),o){M.clone(this.modelMatrix,this._modelMatrix);let u=this._drawCommand.modelMatrix;if(M.clone(this._modelMatrix,u),l(this._rtcCenter)&&M.multiplyByTranslation(u,this._rtcCenter,u),l(this._quantizedVolumeOffset)&&M.multiplyByTranslation(u,this._quantizedVolumeOffset,u),e.mode!==ie.SCENE3D){let d=e.mapProjection,p=M.getColumn(u,3,UMt);se.equals(p,se.UNIT_W)||pt.basisTo2D(d,u,u)}let f=this._drawCommand.boundingVolume;if(ce.clone(this._boundingSphere,f),this._cull){let d=f.center;M.multiplyByPoint(u,d,d);let p=M.getScale(u,VMt);f.radius*=h.maximumComponent(p)}}this.clippingPlanesDirty&&(this.clippingPlanesDirty=!1,i=!0),this._attenuation!==this.attenuation&&(this._attenuation=this.attenuation,i=!0),this.backFaceCulling!==this._backFaceCulling&&(this._backFaceCulling=this.backFaceCulling,i=!0),this.normalShading!==this._normalShading&&(this._normalShading=this.normalShading,i=!0),(this._style!==this.style||this.styleDirty)&&(this._style=this.style,this.styleDirty=!1,i=!0);let r=this.splitDirection!==Or.NONE;this._splittingEnabled!==r&&(this._splittingEnabled=r,i=!0),i&&kMt(this,e,this._style),this._drawCommand.castShadows=vn.castShadows(this.shadows),this._drawCommand.receiveShadows=vn.receiveShadows(this.shadows);let a=this._highlightColor.alpha<1||this._constantColor.alpha<1||this._styleTranslucent;this._drawCommand.renderState=a?this._translucentRenderState:this._opaqueRenderState,this._drawCommand.pass=a?Ie.TRANSLUCENT:this._opaquePass;let s=e.commandList,c=e.passes;(c.render||c.pick)&&s.push(this._drawCommand)};VU.prototype.isDestroyed=function(){return!1};VU.prototype.destroy=function(){let e=this._drawCommand;return l(e)&&(e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy()),fe(this)};var jU=VU;function zT(e){e=e??G.EMPTY_OBJECT,this.show=e.show??!0,this.modelMatrix=M.clone(e.modelMatrix??M.IDENTITY),this.shadows=e.shadows??vn.ENABLED,this.maximumMemoryUsage=e.maximumMemoryUsage??256,this.shading=new Ep(e.shading),this.style=e.style,this.frameFailed=new ye,this.frameChanged=new ye,this._clock=e.clock,this._intervals=e.intervals,this._clippingPlanes=void 0,this.clippingPlanes=e.clippingPlanes,this._pointCloudEyeDomeLighting=new Ag,this._loadTimestamp=void 0,this._clippingPlanesState=0,this._styleDirty=!1,this._pickId=void 0,this._totalMemoryUsageInBytes=0,this._frames=[],this._previousInterval=void 0,this._nextInterval=void 0,this._lastRenderedFrame=void 0,this._clockMultiplier=0,this._runningSum=0,this._runningLength=0,this._runningIndex=0,this._runningSamples=new Array(5).fill(0),this._runningAverage=0}Object.defineProperties(zT.prototype,{clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){ma.setOwner(e,this,"_clippingPlanes")}},totalMemoryUsageInBytes:{get:function(){return this._totalMemoryUsageInBytes}},boundingSphere:{get:function(){if(l(this._lastRenderedFrame))return this._lastRenderedFrame.pointCloud.boundingSphere}}});function jMt(e){return`uniform vec4 czm_pickColor;
- ${e}`}function GMt(e){return function(t){return wt(t,{czm_pickColor:function(){return e._pickId.color}})}}function HMt(){return"czm_pickColor"}zT.prototype.makeStyleDirty=function(){this._styleDirty=!0};zT.prototype._getAverageLoadTime=function(){return this._runningLength===0?.05:this._runningAverage};var WMt=new Q;function Yne(e){let t=e._clock,n=t.canAnimate&&t.shouldAnimate,i=t.multiplier;return n?i:0}function kT(e,t){return e._intervals.indexOf(t.start)}function qMt(e,t){let n=e._intervals,i=e._clock,o=Yne(e);if(o===0)return;let r=e._getAverageLoadTime(),a=Q.addSeconds(i.currentTime,r*o,WMt),s=n.indexOf(a),c=kT(e,t);return s===c&&(o>=0?++s:--s),n.get(s)}function YMt(e){let t=e._intervals,i=e._clock.currentTime,o=t.indexOf(i);return t.get(o)}function XMt(e,t,n){let i=Yne(e),o=kT(e,t),r=kT(e,n);return i>=0?o>=r:o<=r}function Q1e(e,t){return function(n){let i=l(n.message)?n.message:n.toString();e.frameFailed.numberOfListeners>0?e.frameFailed.raiseEvent({uri:t,message:i}):(console.log(`A frame failed to load: ${t}`),console.log(`Error: ${i}`))}}function KMt(e,t,n){let i=kT(e,t),o=e._frames,r=o[i];if(!l(r)){let a=t.data.transform,s=l(a)?M.fromArray(a):void 0,c=t.data.uri;r={pointCloud:void 0,transform:s,timestamp:Fi(),sequential:!0,ready:!1,touchedFrameNumber:n.frameNumber,uri:c},o[i]=r,De.fetchArrayBuffer({url:c}).then(function(u){r.pointCloud=new jU({arrayBuffer:u,cull:!0,fragmentShaderLoaded:jMt,uniformMapLoaded:GMt(e),pickIdLoaded:HMt})}).catch(Q1e(e,c))}return r}function QMt(e,t){e._runningSum+=t,e._runningSum-=e._runningSamples[e._runningIndex],e._runningSamples[e._runningIndex]=t,e._runningLength=Math.min(e._runningLength+1,e._runningSamples.length),e._runningIndex=(e._runningIndex+1)%e._runningSamples.length,e._runningAverage=e._runningSum/e._runningLength}function $Mt(e,t,n,i){t.touchedFrameNumber<i.frameNumber-1&&(t.sequential=!1);let o=t.pointCloud;if(l(o)&&!t.ready){let r=i.commandList,a=r.length;if($1e(e,t,n,i),o.ready&&(t.ready=!0,e._totalMemoryUsageInBytes+=o.geometryByteLength,r.length=a,t.sequential)){let s=(Fi()-t.timestamp)/1e3;QMt(e,s)}}t.touchedFrameNumber=i.frameNumber}var JMt=new M;function ZMt(e,t){let n=e.shading;return l(n)&&l(n.baseResolution)?n.baseResolution:l(t.boundingSphere)?D.cbrt(t.boundingSphere.volume()/t.pointsLength):0}function eBt(e){let t=e.shading;return l(t)&&l(t.maximumAttenuation)?t.maximumAttenuation:10}var tBt=new Ep;function $1e(e,t,n,i){let o=e.shading??tBt,r=t.pointCloud,a=t.transform??M.IDENTITY;r.modelMatrix=M.multiplyTransformation(e.modelMatrix,a,JMt),r.style=e.style,r.time=n.timeSinceLoad,r.shadows=e.shadows,r.clippingPlanes=e._clippingPlanes,r.isClipped=n.isClipped,r.attenuation=o.attenuation,r.backFaceCulling=o.backFaceCulling,r.normalShading=o.normalShading,r.geometricError=ZMt(e,r),r.geometricErrorScale=o.geometricErrorScale,r.maximumAttenuation=eBt(e);try{r.update(i)}catch(s){Q1e(e,t.uri)(s)}t.touchedFrameNumber=i.frameNumber}function qne(e,t,n,i){let o=KMt(e,t,i);$Mt(e,o,n,i)}function nBt(e){return function(t){return t.touchedFrameNumber<e.frameNumber}}function J1e(e,t){let n=e._frames,i=n.length;for(let o=0;o<i;++o){let r=n[o];if(l(r)&&(!l(t)||t(r))){let a=r.pointCloud;r.ready&&(e._totalMemoryUsageInBytes-=a.geometryByteLength),l(a)&&a.destroy(),r===e._lastRenderedFrame&&(e._lastRenderedFrame=void 0),n[o]=void 0}}}function iBt(e,t){let n=kT(e,t),i=e._frames[n];if(l(i)&&i.ready)return i}function K1e(e,t,n,i,o){return l(n)?n.ready?!0:(qne(e,t,i,o),n.ready):!1}function oBt(e,t,n,i,o){let r,a,s,c=e._intervals,u=e._frames,f=kT(e,n),d=kT(e,t);if(f>=d){for(r=f;r>=d;--r)if(a=c.get(r),s=u[r],K1e(e,a,s,i,o))return a}else for(r=f;r<=d;++r)if(a=c.get(r),s=u[r],K1e(e,a,s,i,o))return a;return t}function rBt(e,t,n){let i=e._frames,o=i.length;for(let r=0;r<o;++r){let a=i[r];l(a)&&l(a.pointCloud)&&(a.pointCloud.clippingPlanesDirty=t,a.pointCloud.styleDirty=n)}}var AI={timeSinceLoad:0,isClipped:!1,clippingPlanesDirty:!1};zT.prototype.update=function(e){if(e.mode===ie.MORPHING||!this.show)return;l(this._pickId)||(this._pickId=e.context.createPickId({primitive:this})),l(this._loadTimestamp)||(this._loadTimestamp=Q.clone(e.time));let t=Math.max(Q.secondsDifference(e.time,this._loadTimestamp)*1e3,0),n=this._clippingPlanes,i=0,o=!1,r=l(n)&&n.enabled;r&&(n.update(e),i=n.clippingPlanesState),this._clippingPlanesState!==i&&(this._clippingPlanesState=i,o=!0);let a=this._styleDirty;this._styleDirty=!1,(o||a)&&rBt(this,o,a),AI.timeSinceLoad=t,AI.isClipped=r;let s=this.shading,c=this._pointCloudEyeDomeLighting,u=e.commandList,f=u.length,d=this._previousInterval,p=this._nextInterval,g=YMt(this);if(!l(g))return;let m=!1,A=Yne(this),y=A===0;A!==this._clockMultiplier&&(m=!0,this._clockMultiplier=A),(!l(d)||y)&&(d=g),(!l(p)||m||XMt(this,g,p))&&(p=qMt(this,g)),d=oBt(this,d,g,AI,e);let x=iBt(this,d);l(x)||(qne(this,d,AI,e),x=this._lastRenderedFrame),l(x)&&$1e(this,x,AI,e),l(p)&&qne(this,p,AI,e);let b=this;l(x)&&!l(this._lastRenderedFrame)&&e.afterRender.push(function(){return!0}),l(x)&&x!==this._lastRenderedFrame&&b.frameChanged.numberOfListeners>0&&e.afterRender.push(function(){return b.frameChanged.raiseEvent(b),!0}),this._previousInterval=d,this._nextInterval=p,this._lastRenderedFrame=x;let C=this._totalMemoryUsageInBytes,E=this.maximumMemoryUsage*1024*1024;C>E&&J1e(this,nBt(e));let w=u.length-f;l(s)&&s.attenuation&&s.eyeDomeLighting&&w>0&&c.update(e,f,s,this.boundingSphere)};zT.prototype.isDestroyed=function(){return!1};zT.prototype.destroy=function(){return J1e(this),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),this._pickId=this._pickId&&this._pickId.destroy(),fe(this)};var yI=zT;function tRe(e,t){if(l(t)){let n=t.clock;l(n)&&n.getValue(e)}}function aBt(e){e._renderLoopRunning=!0;let t=0;function n(i){if(!e.isDestroyed())if(e._useDefaultRenderLoop)try{let o=e._targetFrameRate;if(!l(o))e.resize(),e.render(),requestAnimationFrame(n);else{let r=1e3/o,a=i-t;a>r&&(e.resize(),e.render(),t=i-a%r),requestAnimationFrame(n)}}catch(o){e._useDefaultRenderLoop=!1,e._renderLoopRunning=!1,e._showRenderLoopErrors&&e.showErrorPanel("An error occurred while rendering. Rendering has stopped.",void 0,o)}else e._renderLoopRunning=!1}requestAnimationFrame(n)}function nRe(e){let t=e._useBrowserRecommendedResolution?1:window.devicePixelRatio;return t*=e._resolutionScale,l(e._scene)&&(e._scene.pixelRatio=t),t}function iRe(e){let t=e._canvas,n=t.clientWidth,i=t.clientHeight,o=nRe(e);e._canvasClientWidth=n,e._canvasClientHeight=i,n*=o,i*=o,t.width=n,t.height=i,e._canRender=n!==0&&i!==0,e._lastDevicePixelRatio=window.devicePixelRatio}function oRe(e){let t=e._canvas,n=t.width,i=t.height;if(n!==0&&i!==0){let o=e._scene.camera.frustum;l(o.aspectRatio)?o.aspectRatio=n/i:(o.top=o.right*(i/n),o.bottom=-o.top)}}function qo(e,t){e=On(e),t=t??G.EMPTY_OBJECT;let n=document.createElement("div");n.className="cesium-widget",e.appendChild(n);let i=document.createElement("canvas"),o=sn.supportsImageRenderingPixelated();this._supportsImageRenderingPixelated=o,o&&(i.style.imageRendering=sn.imageRenderingValue()),i.oncontextmenu=function(){return!1},i.onselectstart=function(){return!1};function r(){i!==i.ownerDocument.activeElement&&i.ownerDocument.activeElement.blur()}(t.blurActiveElementOnCanvasFocus??!0)&&(i.addEventListener("mousedown",r),i.addEventListener("pointerdown",r)),n.appendChild(i);let s=document.createElement("div");s.className="cesium-widget-credits";let c=l(t.creditContainer)?On(t.creditContainer):n;c.appendChild(s);let u=l(t.creditViewport)?On(t.creditViewport):n,f=t.showRenderLoopErrors??!0,d=t.useBrowserRecommendedResolution??!0;this._element=n,this._container=e,this._canvas=i,this._canvasClientWidth=0,this._canvasClientHeight=0,this._lastDevicePixelRatio=0,this._creditViewport=u,this._creditContainer=c,this._innerCreditContainer=s,this._canRender=!1,this._renderLoopRunning=!1,this._showRenderLoopErrors=f,this._resolutionScale=1,this._useBrowserRecommendedResolution=d,this._forceResize=!1,this._entityView=void 0,this._clockTrackedDataSource=void 0,this._trackedEntity=void 0,this._needTrackedEntityUpdate=!1,this._zoomIsFlight=!1,this._zoomTarget=void 0,this._zoomPromise=void 0,this._zoomOptions=void 0,this._trackedEntityChanged=new ye,this._allowDataSourcesToSuspendAnimation=!0,this._clock=l(t.clock)?t.clock:new Tm,l(t.shouldAnimate)&&(this._clock.shouldAnimate=t.shouldAnimate),iRe(this);try{let p=t.ellipsoid??te.default,g=new vU({canvas:i,contextOptions:t.contextOptions,creditContainer:s,creditViewport:u,ellipsoid:p,mapProjection:t.mapProjection,orderIndependentTranslucency:t.orderIndependentTranslucency,scene3DOnly:t.scene3DOnly??!1,shadows:t.shadows,mapMode2D:t.mapMode2D,requestRenderMode:t.requestRenderMode,maximumRenderTimeChange:t.maximumRenderTimeChange,depthPlaneEllipsoidOffset:t.depthPlaneEllipsoidOffset,msaaSamples:t.msaaSamples});this._scene=g,g.camera.constrainedAxis=h.UNIT_Z,nRe(this),oRe(this);let m=t.globe;l(m)||(m=new g3(p)),m!==!1&&(g.globe=m,g.globe.shadows=t.terrainShadows??vn.RECEIVE_ONLY);let A=t.skyBox;!l(A)&&te.WGS84.equals(p)&&(A=MU.createEarthSkyBox()),A!==!1&&(g.skyBox=A,g.sun=new zU,te.WGS84.equals(p)&&(g.moon=new C3));let y=t.skyAtmosphere;!l(y)&&te.WGS84.equals(p)&&(y=new IU(p),y.show=t.globe!==!1&&m.show),y!==!1&&(g.skyAtmosphere=y);let x=t.baseLayer;t.globe!==!1&&x!==!1&&(l(x)||(x=ya.fromWorldImagery()),g.imageryLayers.add(x)),l(t.terrainProvider)&&t.globe!==!1&&(g.terrainProvider=t.terrainProvider),l(t.terrain)&&t.globe!==!1&&g.setTerrain(t.terrain),this._screenSpaceEventHandler=new td(i),l(t.sceneMode)&&(t.sceneMode===ie.SCENE2D&&this._scene.morphTo2D(0),t.sceneMode===ie.COLUMBUS_VIEW&&this._scene.morphToColumbusView(0)),this._useDefaultRenderLoop=void 0,this.useDefaultRenderLoop=t.useDefaultRenderLoop??!0,this._targetFrameRate=void 0,this.targetFrameRate=t.targetFrameRate;let b=this;this._onRenderError=function(R,B){b._useDefaultRenderLoop=!1,b._renderLoopRunning=!1,b._showRenderLoopErrors&&b.showErrorPanel("An error occurred while rendering. Rendering has stopped.",void 0,B)},g.renderError.addEventListener(this._onRenderError);let C=t.dataSources,E=!1;l(C)||(C=new d2,E=!0);let S=new tk({scene:g,dataSourceCollection:C}),w=new Nr;this._dataSourceChangedListeners={},this._automaticallyTrackDataSourceClocks=t.automaticallyTrackDataSourceClocks??!0,this._dataSourceCollection=C,this._destroyDataSourceCollection=E,this._dataSourceDisplay=S,this._eventHelper=w,this._canAnimateUpdateCallback=this._updateCanAnimate,w.add(this._clock.onTick,qo.prototype._onTick,this),w.add(g.morphStart,qo.prototype._clearTrackedObject,this),w.add(C.dataSourceAdded,qo.prototype._onDataSourceAdded,this),w.add(C.dataSourceRemoved,qo.prototype._onDataSourceRemoved,this),w.add(g.postRender,qo.prototype._postRender,this);let P=C.length;for(let R=0;R<P;R++)this._dataSourceAdded(C,C.get(R));this._dataSourceAdded(void 0,S.defaultDataSource),w.add(C.dataSourceAdded,qo.prototype._dataSourceAdded,this),w.add(C.dataSourceRemoved,qo.prototype._dataSourceRemoved,this)}catch(p){throw f&&this.showErrorPanel("Error constructing CesiumWidget.",'Visit <a href="http://get.webgl.org">http://get.webgl.org</a> to verify that your web browser and hardware support WebGL. Consider trying a different web browser or updating your video drivers. Detailed error information is below:',p),p}}Object.defineProperties(qo.prototype,{container:{get:function(){return this._container}},canvas:{get:function(){return this._canvas}},creditContainer:{get:function(){return this._creditContainer}},creditViewport:{get:function(){return this._creditViewport}},scene:{get:function(){return this._scene}},imageryLayers:{get:function(){return this._scene.imageryLayers}},terrainProvider:{get:function(){return this._scene.terrainProvider},set:function(e){this._scene.terrainProvider=e}},creditDisplay:{get:function(){return this._scene.frameState.creditDisplay}},dataSourceDisplay:{get:function(){return this._dataSourceDisplay}},entities:{get:function(){return this._dataSourceDisplay.defaultDataSource.entities}},dataSources:{get:function(){return this._dataSourceCollection}},camera:{get:function(){return this._scene.camera}},ellipsoid:{get:function(){return this._scene.ellipsoid}},clock:{get:function(){return this._clock}},screenSpaceEventHandler:{get:function(){return this._screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._targetFrameRate},set:function(e){this._targetFrameRate=e}},useDefaultRenderLoop:{get:function(){return this._useDefaultRenderLoop},set:function(e){this._useDefaultRenderLoop!==e&&(this._useDefaultRenderLoop=e,e&&!this._renderLoopRunning&&aBt(this))}},resolutionScale:{get:function(){return this._resolutionScale},set:function(e){this._resolutionScale!==e&&(this._resolutionScale=e,this._forceResize=!0)}},useBrowserRecommendedResolution:{get:function(){return this._useBrowserRecommendedResolution},set:function(e){this._useBrowserRecommendedResolution!==e&&(this._useBrowserRecommendedResolution=e,this._forceResize=!0)}},allowDataSourcesToSuspendAnimation:{get:function(){return this._allowDataSourcesToSuspendAnimation},set:function(e){this._allowDataSourcesToSuspendAnimation=e}},trackedEntity:{get:function(){return this._trackedEntity},set:function(e){if(this._trackedEntity!==e){this._trackedEntity=e,Xne(this);let t=this.scene,n=t.mode;!l(e)||!l(e.position)?(this._needTrackedEntityUpdate=!1,(n===ie.COLUMBUS_VIEW||n===ie.SCENE2D)&&(t.screenSpaceCameraController.enableTranslate=!0),(n===ie.COLUMBUS_VIEW||n===ie.SCENE3D)&&(t.screenSpaceCameraController.enableTilt=!0),this._entityView=void 0,this.camera.lookAtTransform(M.IDENTITY)):this._needTrackedEntityUpdate=!0,this._trackedEntityChanged.raiseEvent(e),this.scene.requestRender()}}},trackedEntityChanged:{get:function(){return this._trackedEntityChanged}},clockTrackedDataSource:{get:function(){return this._clockTrackedDataSource},set:function(e){this._clockTrackedDataSource!==e&&(this._clockTrackedDataSource=e,tRe(this.clock,e))}}});qo.prototype.showErrorPanel=function(e,t,n){let i=this._element,o=document.createElement("div");o.className="cesium-widget-errorPanel";let r=document.createElement("div");r.className="cesium-widget-errorPanel-content",o.appendChild(r);let a=document.createElement("div");a.className="cesium-widget-errorPanel-header",a.appendChild(document.createTextNode(e)),r.appendChild(a);let s=document.createElement("div");s.className="cesium-widget-errorPanel-scroll",r.appendChild(s);function c(){s.style.maxHeight=`${Math.max(Math.round(i.clientHeight*.9-100),30)}px`}c(),l(window.addEventListener)&&window.addEventListener("resize",c,!1);let u=l(t),f=l(n);if(u||f){let g=document.createElement("div");if(g.className="cesium-widget-errorPanel-message",s.appendChild(g),f){let m=Sp(n);u||(typeof n=="string"&&(n=new Error(n)),t=Sp({name:n.name,message:n.message}),m=n.stack),typeof console<"u"&&console.error(`${e}
- ${t}
- ${m}`);let A=document.createElement("div");A.className="cesium-widget-errorPanel-message-details collapsed";let y=document.createElement("span");y.className="cesium-widget-errorPanel-more-details",y.appendChild(document.createTextNode("See more...")),A.appendChild(y),A.onclick=function(x){A.removeChild(y),A.appendChild(document.createTextNode(m)),A.className="cesium-widget-errorPanel-message-details",r.className="cesium-widget-errorPanel-content expanded",A.onclick=void 0},s.appendChild(A)}g.innerHTML=`<p>${t}</p>`}let d=document.createElement("div");d.className="cesium-widget-errorPanel-buttonPanel",r.appendChild(d);let p=document.createElement("button");p.setAttribute("type","button"),p.className="cesium-button",p.appendChild(document.createTextNode("OK")),p.onclick=function(){l(c)&&l(window.removeEventListener)&&window.removeEventListener("resize",c,!1),i.removeChild(o)},d.appendChild(p),i.appendChild(o)};qo.prototype.isDestroyed=function(){return!1};qo.prototype.destroy=function(){let e=this.dataSources,t=e.length;for(let n=0;n<t;n++)this._dataSourceRemoved(e,e.get(n));this._dataSourceRemoved(void 0,this._dataSourceDisplay.defaultDataSource),this._dataSourceDisplay=this._dataSourceDisplay.destroy(),l(this._scene)&&(this._scene.renderError.removeEventListener(this._onRenderError),this._scene=this._scene.destroy()),this._container.removeChild(this._element),this._creditContainer.removeChild(this._innerCreditContainer),this._eventHelper.removeAll(),this._destroyDataSourceCollection&&(this._dataSourceCollection=this._dataSourceCollection.destroy()),fe(this)};qo.prototype.resize=function(){let e=this._canvas;!this._forceResize&&this._canvasClientWidth===e.clientWidth&&this._canvasClientHeight===e.clientHeight&&this._lastDevicePixelRatio===window.devicePixelRatio||(this._forceResize=!1,iRe(this),oRe(this),this._scene.requestRender())};qo.prototype.render=function(){if(this._canRender){this._scene.initializeFrame();let e=this._clock.tick();this._scene.render(e)}else this._clock.tick()};qo.prototype._dataSourceAdded=function(e,t){t.entities.collectionChanged.addEventListener(qo.prototype._onEntityCollectionChanged,this)};qo.prototype._dataSourceRemoved=function(e,t){let n=t.entities;n.collectionChanged.removeEventListener(qo.prototype._onEntityCollectionChanged,this),l(this.trackedEntity)&&n.getById(this.trackedEntity.id)===this.trackedEntity&&(this.trackedEntity=void 0)};qo.prototype._updateCanAnimate=function(e){this._clock.canAnimate=e};var sBt=new ce;qo.prototype._onTick=function(e){let t=e.currentTime,n=this._dataSourceDisplay.update(t);this._allowDataSourcesToSuspendAnimation&&this._canAnimateUpdateCallback(n);let i=this._entityView;if(l(i)){let o=this._trackedEntity;this._dataSourceDisplay.getBoundingSphere(o,!1,i.boundingSphere??sBt)===bt.DONE&&i.update(t)}};qo.prototype._onEntityCollectionChanged=function(e,t,n){let i=n.length;for(let o=0;o<i;o++){let r=n[o];this.trackedEntity===r&&(this.trackedEntity=void 0)}};qo.prototype._clearTrackedObject=function(){this.trackedEntity=void 0};qo.prototype._onDataSourceChanged=function(e){this.clockTrackedDataSource===e&&tRe(this.clock,e)};qo.prototype._onDataSourceAdded=function(e,t){this._automaticallyTrackDataSourceClocks&&(this.clockTrackedDataSource=t);let n=t.entities.id,i=this._eventHelper.add(t.changedEvent,qo.prototype._onDataSourceChanged,this);this._dataSourceChangedListeners[n]=i};qo.prototype._onDataSourceRemoved=function(e,t){let n=this.clockTrackedDataSource===t,i=t.entities.id;if(this._dataSourceChangedListeners[i](),this._dataSourceChangedListeners[i]=void 0,n){let o=e.length;this._automaticallyTrackDataSourceClocks&&o>0?this.clockTrackedDataSource=e.get(o-1):this.clockTrackedDataSource=void 0}};qo.prototype.zoomTo=function(e,t){return rRe(this,e,{offset:t},!1)};qo.prototype.flyTo=function(e,t){return rRe(this,e,t,!0)};function rRe(e,t,n,i){Xne(e);let o=new Promise(r=>{e._completeZoom=function(a){r(a)}});return e._zoomPromise=o,e._zoomIsFlight=i,e._zoomOptions=n,Promise.resolve(t).then(function(r){if(e._zoomPromise===o){if(r instanceof ya){let a;l(r.imageryProvider)?a=Promise.resolve(r.getImageryRectangle()):a=new Promise(s=>{let c=r.readyEvent.addEventListener(()=>{c(),s(r.getImageryRectangle())})}),a.then(function(s){return oT(s,e.scene)}).then(function(s){e._zoomPromise===o&&(e._zoomTarget=s)});return}if(r instanceof xa||r instanceof yI||r instanceof Xy||r instanceof Za){e._zoomTarget=r;return}if(r.isLoading&&l(r.loadingEvent)){let a=r.loadingEvent.addEventListener(function(){a(),e._zoomPromise===o&&(e._zoomTarget=r.entities.values.slice(0))});return}if(Array.isArray(r)){e._zoomTarget=r.slice(0);return}r=r.values??r,l(r.entities)&&(r=r.entities.values),Array.isArray(r)?e._zoomTarget=r.slice(0):e._zoomTarget=[r]}}),e.scene.requestRender(),o}function GU(e){e._zoomPromise=void 0,e._zoomTarget=void 0,e._zoomOptions=void 0}function Xne(e){let t=e._zoomPromise;l(t)&&(GU(e),e._completeZoom(!1))}qo.prototype._postRender=function(){cBt(this),lBt(this)};var Z1e=new ce;function cBt(e){let t=e._zoomTarget;if(!l(t)||e.scene.mode===ie.MORPHING)return;let n=e.scene,i=n.camera,o=e._zoomOptions??{},r;function a(f){l(o.offset)||(o.offset=new ih(0,-.5,f.radius)),r={offset:o.offset,duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){e._completeZoom(!0)},cancel:function(){e._completeZoom(!1)}},e._zoomIsFlight?i.flyToBoundingSphere(f,r):(i.viewBoundingSphere(f,o.offset),i.lookAtTransform(M.IDENTITY),e._completeZoom(!0)),GU(e)}if(t instanceof yI){if(l(t.boundingSphere)){a(t.boundingSphere);return}let f=t.frameChanged.addEventListener(function(d){a(d.boundingSphere),f()});return}if(t instanceof xa||t instanceof Xy){a(t.boundingSphere);return}if(t instanceof Za){a(t.boundingVolume);return}if(t instanceof de){r={destination:n.ellipsoid.cartographicToCartesian(t),duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){e._completeZoom(!0)},cancel:function(){e._completeZoom(!1)}},e._zoomIsFlight?i.flyTo(r):(i.setView(r),e._completeZoom(!0)),GU(e);return}let s=t,c=[];for(let f=0,d=s.length;f<d;f++){let p=e._dataSourceDisplay.getBoundingSphere(s[f],!1,Z1e);if(p===bt.PENDING)return;p!==bt.FAILED&&c.push(ce.clone(Z1e))}if(c.length===0){Xne(e);return}e.trackedEntity=void 0;let u=ce.fromBoundingSpheres(c);e._zoomIsFlight?(GU(e),i.flyToBoundingSphere(u,{duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){e._completeZoom(!0)},cancel:function(){e._completeZoom(!1)},offset:o.offset})):(i.viewBoundingSphere(u,o.offset),i.lookAtTransform(M.IDENTITY),GU(e),e._completeZoom(!0))}var eRe=new ce;function lBt(e){if(!e._needTrackedEntityUpdate)return;let t=e._trackedEntity,n=e.clock.currentTime,i=X.getValueOrUndefined(t.position,n);if(!l(i))return;let o=e.scene,r=e._dataSourceDisplay.getBoundingSphere(t,!1,eRe);if(r===bt.PENDING)return;let a=o.mode;(a===ie.COLUMBUS_VIEW||a===ie.SCENE2D)&&(o.screenSpaceCameraController.enableTranslate=!1),(a===ie.COLUMBUS_VIEW||a===ie.SCENE3D)&&(o.screenSpaceCameraController.enableTilt=!1);let s=r!==bt.FAILED?eRe:void 0;e._entityView=new ik(t,o,o.ellipsoid),e._entityView.update(n,s),e._needTrackedEntityUpdate=!1}var HU=qo;var WU=`uniform sampler2D u_noiseTexture;
- uniform vec3 u_noiseTextureDimensions;
- uniform float u_noiseDetail;
- in vec2 v_offset;
- in vec3 v_maximumSize;
- in vec4 v_color;
- in float v_slice;
- in float v_brightness;
-
- float wrap(float value, float rangeLength) {
- if(value < 0.0) {
- float absValue = abs(value);
- float modValue = mod(absValue, rangeLength);
- return mod(rangeLength - modValue, rangeLength);
- }
- return mod(value, rangeLength);
- }
-
- vec3 wrapVec(vec3 value, float rangeLength) {
- return vec3(wrap(value.x, rangeLength),
- wrap(value.y, rangeLength),
- wrap(value.z, rangeLength));
- }
-
- vec2 voxelToUV(vec3 voxelIndex) {
- float textureSliceWidth = u_noiseTextureDimensions.x;
- float noiseTextureRows = u_noiseTextureDimensions.y;
- float inverseNoiseTextureRows = u_noiseTextureDimensions.z;
-
- float textureSliceWidthSquared = textureSliceWidth * textureSliceWidth;
- vec2 inverseNoiseTextureDimensions = vec2(noiseTextureRows / textureSliceWidthSquared,
- inverseNoiseTextureRows / textureSliceWidth);
- vec3 wrappedIndex = wrapVec(voxelIndex, textureSliceWidth);
- float column = mod(wrappedIndex.z, textureSliceWidth * inverseNoiseTextureRows);
- float row = floor(wrappedIndex.z / textureSliceWidth * noiseTextureRows);
-
- float xPixelCoord = wrappedIndex.x + column * textureSliceWidth;
- float yPixelCoord = wrappedIndex.y + row * textureSliceWidth;
- return vec2(xPixelCoord, yPixelCoord) * inverseNoiseTextureDimensions;
- }
-
- // Interpolate a voxel with its neighbor (along the positive X-axis)
- vec4 lerpSamplesX(vec3 voxelIndex, float x) {
- vec2 uv0 = voxelToUV(voxelIndex);
- vec2 uv1 = voxelToUV(voxelIndex + vec3(1.0, 0.0, 0.0));
- vec4 sample0 = texture(u_noiseTexture, uv0);
- vec4 sample1 = texture(u_noiseTexture, uv1);
- return mix(sample0, sample1, x);
- }
-
- vec4 sampleNoiseTexture(vec3 position) {
- float textureSliceWidth = u_noiseTextureDimensions.x;
- vec3 recenteredPos = position + vec3(textureSliceWidth / 2.0);
- vec3 lerpValue = fract(recenteredPos);
- vec3 voxelIndex = floor(recenteredPos);
-
- vec4 xLerp00 = lerpSamplesX(voxelIndex, lerpValue.x);
- vec4 xLerp01 = lerpSamplesX(voxelIndex + vec3(0.0, 0.0, 1.0), lerpValue.x);
- vec4 xLerp10 = lerpSamplesX(voxelIndex + vec3(0.0, 1.0, 0.0), lerpValue.x);
- vec4 xLerp11 = lerpSamplesX(voxelIndex + vec3(0.0, 1.0, 1.0), lerpValue.x);
-
- vec4 yLerp0 = mix(xLerp00, xLerp10, lerpValue.y);
- vec4 yLerp1 = mix(xLerp01, xLerp11, lerpValue.y);
- return mix(yLerp0, yLerp1, lerpValue.z);
- }
-
- // Intersection with a unit sphere with radius 0.5 at center (0, 0, 0).
- bool intersectSphere(vec3 origin, vec3 dir, float slice,
- out vec3 point, out vec3 normal) {
- float A = dot(dir, dir);
- float B = dot(origin, dir);
- float C = dot(origin, origin) - 0.25;
- float discriminant = (B * B) - (A * C);
- if(discriminant < 0.0) {
- return false;
- }
- float root = sqrt(discriminant);
- float t = (-B - root) / A;
- if(t < 0.0) {
- t = (-B + root) / A;
- }
- point = origin + t * dir;
-
- if(slice >= 0.0) {
- point.z = (slice / 2.0) - 0.5;
- if(length(point) > 0.5) {
- return false;
- }
- }
-
- normal = normalize(point);
- point -= czm_epsilon2 * normal;
- return true;
- }
-
- // Transforms the ray origin and direction into unit sphere space,
- // then transforms the result back into the ellipsoid's space.
- bool intersectEllipsoid(vec3 origin, vec3 dir, vec3 center, vec3 scale, float slice,
- out vec3 point, out vec3 normal) {
- if(scale.x <= 0.01 || scale.y < 0.01 || scale.z < 0.01) {
- return false;
- }
-
- vec3 o = (origin - center) / scale;
- vec3 d = dir / scale;
- vec3 p, n;
- bool intersected = intersectSphere(o, d, slice, p, n);
- if(intersected) {
- point = (p * scale) + center;
- normal = n;
- }
- return intersected;
- }
-
- // Assume that if phase shift is being called for octave i,
- // the frequency is of i - 1. This saves us from doing extra
- // division / multiplication operations.
- vec2 phaseShift2D(vec2 p, vec2 freq) {
- return (czm_pi / 2.0) * sin(freq.yx * p.yx);
- }
-
- vec2 phaseShift3D(vec3 p, vec2 freq) {
- return phaseShift2D(p.xy, freq) + czm_pi * vec2(sin(freq.x * p.z));
- }
-
- // The cloud texture function derived from Gardner's 1985 paper,
- // "Visual Simulation of Clouds."
- // https://www.cs.drexel.edu/~david/Classes/Papers/p297-gardner.pdf
- const float T0 = 0.6; // contrast of the texture pattern
- const float k = 0.1; // computed to produce a maximum value of 1
- const float C0 = 0.8; // coefficient
- const float FX0 = 0.6; // frequency X
- const float FY0 = 0.6; // frequency Y
- const int octaves = 5;
-
- float T(vec3 point) {
- vec2 sum = vec2(0.0);
- float Ci = C0;
- vec2 FXY = vec2(FX0, FY0);
- vec2 PXY = vec2(0.0);
- for(int i = 1; i <= octaves; i++) {
- PXY = phaseShift3D(point, FXY);
- Ci *= 0.707;
- FXY *= 2.0;
- vec2 sinTerm = sin(FXY * point.xy + PXY);
- sum += Ci * sinTerm + vec2(T0);
- }
- return k * sum.x * sum.y;
- }
-
- const float a = 0.5; // fraction of surface reflection due to ambient or scattered light,
- const float t = 0.4; // fraction of texture shading
- const float s = 0.25; // fraction of specular reflection
-
- float I(float Id, float Is, float It) {
- return (1.0 - a) * ((1.0 - t) * ((1.0 - s) * Id + s * Is) + t * It) + a;
- }
-
- const vec3 lightDir = normalize(vec3(0.2, -1.0, 0.7));
-
- vec4 drawCloud(vec3 rayOrigin, vec3 rayDir, vec3 cloudCenter, vec3 cloudScale, float cloudSlice,
- float brightness) {
- vec3 cloudPoint, cloudNormal;
- if(!intersectEllipsoid(rayOrigin, rayDir, cloudCenter, cloudScale, cloudSlice,
- cloudPoint, cloudNormal)) {
- return vec4(0.0);
- }
-
- float Id = clamp(dot(cloudNormal, -lightDir), 0.0, 1.0); // diffuse reflection
- float Is = max(pow(dot(-lightDir, -rayDir), 2.0), 0.0); // specular reflection
- float It = T(cloudPoint); // texture function
- float intensity = I(Id, Is, It);
- vec3 color = vec3(intensity * clamp(brightness, 0.1, 1.0));
-
- vec4 noise = sampleNoiseTexture(u_noiseDetail * cloudPoint);
- float W = noise.x;
- float W2 = noise.y;
- float W3 = noise.z;
-
- // The dot product between the cloud's normal and the ray's direction is greatest
- // in the center of the ellipsoid's surface. It decreases towards the edge.
- // Thus, it is used to blur the areas leading to the edges of the ellipsoid,
- // so that no harsh lines appear.
-
- // The first (and biggest) layer of worley noise is then subtracted from this.
- // The final result is scaled up so that the base cloud is not too translucent.
- float ndDot = clamp(dot(cloudNormal, -rayDir), 0.0, 1.0);
- float TR = pow(ndDot, 3.0) - W; // translucency
- TR *= 1.3;
-
- // Subtracting the second and third layers of worley noise is more complicated.
- // If these layers of noise were simply subtracted from the current translucency,
- // the shape derived from the first layer of noise would be completely deleted.
- // The erosion of this noise should thus be constricted to the edges of the cloud.
- // However, because the edges of the ellipsoid were already blurred away, mapping
- // the noise to (1.0 - ndDot) will have no impact on most of the cloud's appearance.
- // The value of (0.5 - ndDot) provides the best compromise.
- float minusDot = 0.5 - ndDot;
-
- // Even with the previous calculation, subtracting the second layer of wnoise
- // erode too much of the cloud. The addition of it, however, will detailed
- // volume to the cloud. As long as the noise is only added and not subtracted,
- // the results are aesthetically pleasing.
-
- // The minusDot product is mapped in a way that it is larger at the edges of
- // the ellipsoid, so a subtraction and min operation are used instead of
- // an addition and max one.
- TR -= min(minusDot * W2, 0.0);
-
- // The third level of worley noise is subtracted from the result, with some
- // modifications. First, a scalar is added to minusDot so that the noise
- // starts affecting the shape farther away from the center of the ellipsoid's
- // surface. Then, it is scaled down so its impact is not too intense.
- TR -= 0.8 * (minusDot + 0.25) * W3;
-
- // The texture function's shading does not correlate with the shape of the cloud
- // produced by the layers of noise, so an extra shading scalar is calculated.
- // The darkest areas of the cloud are assigned to be where the noise erodes
- // the cloud the most. This is then interpolated based on the translucency
- // and the diffuse shading term of that point in the cloud.
- float shading = mix(1.0 - 0.8 * W * W, 1.0, Id * TR);
-
- // To avoid values that are too dark, this scalar is increased by a small amount
- // and clamped so it never goes to zero.
- shading = clamp(shading + 0.2, 0.3, 1.0);
-
- // Finally, the contrast of the cloud's color is increased.
- vec3 finalColor = mix(vec3(0.5), shading * color, 1.15);
- return vec4(finalColor, clamp(TR, 0.0, 1.0)) * v_color;
- }
-
- void main() {
- #ifdef DEBUG_BILLBOARDS
- out_FragColor = vec4(0.0, 0.5, 0.5, 1.0);
- #endif
- // To avoid calculations with high values,
- // we raycast from an arbitrarily smaller space.
- vec2 coordinate = v_maximumSize.xy * v_offset;
-
- vec3 ellipsoidScale = 0.82 * v_maximumSize;
- vec3 ellipsoidCenter = vec3(0.0);
-
- float zOffset = max(ellipsoidScale.z - 10.0, 0.0);
- vec3 eye = vec3(0, 0, -10.0 - zOffset);
- vec3 rayDir = normalize(vec3(coordinate, 1.0) - eye);
- vec3 rayOrigin = eye;
- #ifdef DEBUG_ELLIPSOIDS
- vec3 point, normal;
- if(intersectEllipsoid(rayOrigin, rayDir, ellipsoidCenter, ellipsoidScale, v_slice,
- point, normal)) {
- out_FragColor = v_brightness * v_color;
- }
- #else
- #ifndef DEBUG_BILLBOARDS
- vec4 cloud = drawCloud(rayOrigin, rayDir,
- ellipsoidCenter, ellipsoidScale, v_slice, v_brightness);
- if(cloud.w < 0.01) {
- discard;
- }
- out_FragColor = cloud;
- #endif
- #endif
- }
- `;var qU=`#ifdef INSTANCED
- in vec2 direction;
- #endif
- in vec4 positionHighAndScaleX;
- in vec4 positionLowAndScaleY;
- in vec4 packedAttribute0;
- in vec4 packedAttribute1;
- in vec4 color;
-
- out vec2 v_offset;
- out vec3 v_maximumSize;
- out vec4 v_color;
- out float v_slice;
- out float v_brightness;
-
- void main() {
- // Unpack attributes.
- vec3 positionHigh = positionHighAndScaleX.xyz;
- vec3 positionLow = positionLowAndScaleY.xyz;
- vec2 scale = vec2(positionHighAndScaleX.w, positionLowAndScaleY.w);
-
- float show = packedAttribute0.x;
- float brightness = packedAttribute0.y;
- vec2 coordinates = packedAttribute0.wz;
- vec3 maximumSize = packedAttribute1.xyz;
- float slice = packedAttribute1.w;
-
- #ifdef INSTANCED
- vec2 dir = direction;
- #else
- vec2 dir = coordinates;
- #endif
-
- vec2 offset = dir - vec2(0.5, 0.5);
- vec2 scaledOffset = scale * offset;
- vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);
- vec4 positionEC = czm_modelViewRelativeToEye * p;
- positionEC.xy += scaledOffset;
-
- positionEC.xyz *= show;
- gl_Position = czm_projection * positionEC;
-
- v_offset = offset;
- v_maximumSize = maximumSize;
- v_color = color;
- v_slice = slice;
- v_brightness = brightness;
- }
- `;var YU=`uniform vec3 u_noiseTextureDimensions;
- uniform float u_noiseDetail;
- uniform vec3 u_noiseOffset;
- in vec2 v_position;
-
- float wrap(float value, float rangeLength) {
- if(value < 0.0) {
- float absValue = abs(value);
- float modValue = mod(absValue, rangeLength);
- return mod(rangeLength - modValue, rangeLength);
- }
- return mod(value, rangeLength);
- }
-
- vec3 wrapVec(vec3 value, float rangeLength) {
- return vec3(wrap(value.x, rangeLength),
- wrap(value.y, rangeLength),
- wrap(value.z, rangeLength));
- }
-
- vec3 random3(vec3 p) {
- float dot1 = dot(p, vec3(127.1, 311.7, 932.8));
- float dot2 = dot(p, vec3(269.5, 183.3, 421.4));
- return fract(vec3(sin(dot1 - dot2), cos(dot1 * dot2), dot1 * dot2));
- }
-
- // Frequency corresponds to cell size.
- // The higher the frequency, the smaller the cell size.
- vec3 getWorleyCellPoint(vec3 centerCell, vec3 offset, float freq) {
- float textureSliceWidth = u_noiseTextureDimensions.x;
- vec3 cell = centerCell + offset;
- cell = wrapVec(cell, textureSliceWidth / u_noiseDetail);
- cell += floor(u_noiseOffset / u_noiseDetail);
- vec3 p = offset + random3(cell);
- return p;
- }
-
- float worleyNoise(vec3 p, float freq) {
- vec3 centerCell = floor(p * freq);
- vec3 pointInCell = fract(p * freq);
- float shortestDistance = 1000.0;
-
- for(float z = -1.0; z <= 1.0; z++) {
- for(float y = -1.0; y <= 1.0; y++) {
- for(float x = -1.0; x <= 1.0; x++) {
- vec3 offset = vec3(x, y, z);
- vec3 point = getWorleyCellPoint(centerCell, offset, freq);
-
- float distance = length(pointInCell - point);
- if(distance < shortestDistance) {
- shortestDistance = distance;
- }
- }
- }
- }
-
- return shortestDistance;
- }
-
- const float MAX_FBM_ITERATIONS = 10.0;
-
- float worleyFBMNoise(vec3 p, float octaves, float scale) {
- float noise = 0.0;
- float freq = 1.0;
- float persistence = 0.625;
- for(float i = 0.0; i < MAX_FBM_ITERATIONS; i++) {
- if(i >= octaves) {
- break;
- }
-
- noise += worleyNoise(p * scale, freq * scale) * persistence;
- persistence *= 0.5;
- freq *= 2.0;
- }
- return noise;
- }
-
- void main() {
- float textureSliceWidth = u_noiseTextureDimensions.x;
- float inverseNoiseTextureRows = u_noiseTextureDimensions.z;
- float x = mod(v_position.x, textureSliceWidth);
- float y = mod(v_position.y, textureSliceWidth);
- float sliceRow = floor(v_position.y / textureSliceWidth);
- float z = floor(v_position.x / textureSliceWidth) + sliceRow * inverseNoiseTextureRows * textureSliceWidth;
-
- vec3 position = vec3(x, y, z);
- position /= u_noiseDetail;
- float worley0 = clamp(worleyFBMNoise(position, 3.0, 1.0), 0.0, 1.0);
- float worley1 = clamp(worleyFBMNoise(position, 3.0, 2.0), 0.0, 1.0);
- float worley2 = clamp(worleyFBMNoise(position, 3.0, 3.0), 0.0, 1.0);
- out_FragColor = vec4(worley0, worley1, worley2, 1.0);
- }
- `;var XU=`uniform vec3 u_noiseTextureDimensions;
- in vec2 position;
-
- out vec2 v_position;
-
- void main()
- {
- gl_Position = vec4(position, 0.1, 1.0);
-
- float textureSliceWidth = u_noiseTextureDimensions.x;
- float noiseTextureRows = u_noiseTextureDimensions.y;
- float inverseNoiseTextureRows = u_noiseTextureDimensions.z;
- vec2 transformedPos = (position * 0.5) + vec2(0.5);
- transformedPos *= textureSliceWidth;
- transformedPos.x *= textureSliceWidth * inverseNoiseTextureRows;
- transformedPos.y *= noiseTextureRows;
- v_position = transformedPos;
- }
- `;var KU=`
- in vec2 v_textureCoordinates;
-
- void main()
- {
- czm_materialInput materialInput;
-
- materialInput.s = v_textureCoordinates.s;
- materialInput.st = v_textureCoordinates;
- materialInput.str = vec3(v_textureCoordinates, 0.0);
- materialInput.normalEC = vec3(0.0, 0.0, -1.0);
-
- czm_material material = czm_getMaterial(materialInput);
-
- out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
- }
- `;var uBt=new h(1,1,1);function Kne(e){e=e??uBt,this._dimensions=h.clone(e)}Object.defineProperties(Kne.prototype,{dimensions:{get:function(){return this._dimensions},set:function(e){h.clone(e,this._dimensions)}}});var fBt=new h;Kne.prototype.emit=function(e){let t=this._dimensions,n=h.multiplyByScalar(t,.5,fBt),i=D.randomBetween(-n.x,n.x),o=D.randomBetween(-n.y,n.y),r=D.randomBetween(-n.z,n.z);e.position=h.fromElements(i,o,r,e.position),e.velocity=h.normalize(e.position,e.velocity)};var Qne=Kne;var $ne=class{constructor(){lt(this,"featuresLength");lt(this,"pointsLength");lt(this,"trianglesLength");lt(this,"geometryByteLength");lt(this,"texturesByteLength");lt(this,"batchTableByteLength");lt(this,"innerContents");lt(this,"ready");lt(this,"tileset");lt(this,"tile");lt(this,"url");lt(this,"batchTable");lt(this,"metadata");lt(this,"group");this.featurePropertiesDirty=!1}hasProperty(t,n){_e.throwInstantiationError()}getFeature(t){_e.throwInstantiationError()}applyDebugSettings(t,n){_e.throwInstantiationError()}applyStyle(t){_e.throwInstantiationError()}update(t,n){_e.throwInstantiationError()}pick(t,n,i){_e.throwInstantiationError()}isDestroyed(){_e.throwInstantiationError()}destroy(){_e.throwInstantiationError()}},Jne=$ne;function QU(e){e=e??G.EMPTY_OBJECT,this._maximumSubtreeCount=e.maximumSubtreeCount??0,this._subtreeRequestCounter=0,this._queue=new O_({comparator:QU.comparator})}QU.prototype.addSubtree=function(e){let t=new dBt(e,this._subtreeRequestCounter);this._subtreeRequestCounter++,this._queue.insert(t);let n=e.implicitCoordinates;if(n.level>0){let i=n.getParentSubtreeCoordinates(),o=this.find(i)}if(this._maximumSubtreeCount>0)for(;this._queue.length>this._maximumSubtreeCount&&this._queue.getMinimum()!==t;)this._queue.removeMinimum()};QU.prototype.find=function(e){let t=this._queue,n=t.internalArray,i=t.length;for(let o=0;o<i;o++){let r=n[o],s=r.subtree.implicitCoordinates;if(e.isEqual(s))return r.subtree}};QU.comparator=function(e,t){let n=e.subtree.implicitCoordinates,i=t.subtree.implicitCoordinates;return n.isAncestor(i)?1:i.isAncestor(n)?-1:e.stamp-t.stamp};function dBt(e,t){this.subtree=e,this.stamp=t}var $U=QU;function JU(e){e=e??G.EMPTY_OBJECT;let{className:t,names:n,types:i,componentTypes:o,shape:r,dimensions:a,paddingBefore:s=h.ZERO.clone(),paddingAfter:c=h.ZERO.clone(),globalTransform:u=M.IDENTITY.clone(),shapeTransform:f=M.IDENTITY.clone(),minBounds:d,maxBounds:p,minimumValues:g,maximumValues:m,maximumTileCount:A}=e;this._shapeTransform=f,this._globalTransform=u,this._shape=r,this._minBounds=d,this._maxBounds=p,this._dimensions=a,this._paddingBefore=s,this._paddingAfter=c,this._className=t,this._names=n,this._types=i,this._componentTypes=o,this._metadataOrder=r===Ac.ELLIPSOID?y0.Z_UP:y0.Y_UP,this._minimumValues=g,this._maximumValues=m,this._maximumTileCount=A,this._availableLevels=void 0,this._implicitTileset=void 0,this._subtreeCache=new $U}Object.defineProperties(JU.prototype,{globalTransform:{get:function(){return this._globalTransform}},shapeTransform:{get:function(){return this._shapeTransform}},shape:{get:function(){return this._shape}},minBounds:{get:function(){return this._minBounds}},maxBounds:{get:function(){return this._maxBounds}},dimensions:{get:function(){return this._dimensions}},paddingBefore:{get:function(){return this._paddingBefore}},paddingAfter:{get:function(){return this._paddingAfter}},className:{get:function(){return this._className}},names:{get:function(){return this._names}},types:{get:function(){return this._types}},componentTypes:{get:function(){return this._componentTypes}},metadataOrder:{get:function(){return this._metadataOrder}},minimumValues:{get:function(){return this._minimumValues}},maximumValues:{get:function(){return this._maximumValues}},maximumTileCount:{get:function(){return this._maximumTileCount}},availableLevels:{get:function(){return this._availableLevels}}});JU.fromUrl=async function(e){let t=De.createIfNeeded(e),n=await t.fetchJson();mBt(n);let i=bBt(n,t);await i.load();let{root:o}=n,r=Ci(n,"3DTILES_metadata")?n.extensions["3DTILES_metadata"]:n,a=new hC({metadataJson:r,schema:i.schema}),s=o.content.extensions["3DTILES_content_voxels"],c=s.class,u=CBt(a,c);Object.assign(u,pBt(o)),l(o.transform)?u.globalTransform=M.unpack(o.transform):u.globalTransform=M.clone(M.IDENTITY),u.dimensions=h.unpack(s.dimensions),u.maximumTileCount=hBt(a),l(s.padding)&&(u.paddingBefore=h.unpack(s.padding.before),u.paddingAfter=h.unpack(s.padding.after));let f=new JU(u),d=new Lp(t,o,i.schema);return f._implicitTileset=d,f._availableLevels=d.availableLevels,Ii.unload(i),f};function hBt(e){if(l(e.tileset))return e.tileset.getPropertyBySemantic(Pd.TILESET_TILE_COUNT)}function mBt(e){let t=e.root;if(!l(t.content))throw new re("Root must have content");if(!Ci(t.content,"3DTILES_content_voxels"))throw new re("Root tile content must have 3DTILES_content_voxels extension");if(!Ci(t,"3DTILES_implicit_tiling")&&!l(t.implicitTiling))throw new re("Root tile must have implicit tiling");if(!l(e.schema)&&!l(e.schemaUri)&&!Ci(e,"3DTILES_metadata"))throw new re("Tileset must have a metadata schema")}function pBt(e){let t=e.boundingVolume;if(l(t.box))return yBt(t.box);if(l(t.region))return gBt(t.region);if(Ci(t,"3DTILES_bounding_volume_cylinder"))return xBt(t.extensions["3DTILES_bounding_volume_cylinder"]);throw new re("Only box, region and 3DTILES_bounding_volume_cylinder are supported in Cesium3DTilesVoxelProvider")}function gBt(e){let t=e[0],n=e[1],i=e[2],o=e[3],r=e[4],a=e[5],s=M.fromScale(te.WGS84.radii),c=new h(t,n,r),u=new h(i,o,a);return{shape:Ac.ELLIPSOID,minBounds:c,maxBounds:u,shapeTransform:s}}var _Bt=new h,ABt=new $;function yBt(e){let t=Qt.unpack(e),n=$.getScale(t.halfAxes,_Bt),i=$.getRotation(t.halfAxes,ABt);return{shape:Ac.BOX,minBounds:h.negate(n,new h),maxBounds:h.clone(n),shapeTransform:M.fromRotationTranslation(i,t.center)}}function xBt(e){let{minRadius:t,maxRadius:n,height:i,minAngle:o=-D.PI,maxAngle:r=D.PI,translation:a=[0,0,0],rotation:s=[0,0,0,1]}=e,c=-.5*i+a[2],u=.5*i+a[2],f=M.fromTranslationQuaternionRotationScale(h.unpack(a),Le.unpack(s),h.ONE);return{shape:Ac.CYLINDER,minBounds:h.fromElements(t,o,c),maxBounds:h.fromElements(n,r,u),shapeTransform:f}}function bBt(e,t){let{schemaUri:n,schema:i}=e;return l(n)?Ii.getSchemaLoader({resource:t.getDerivedResource({url:n})}):Ii.getSchemaLoader({schema:i})}function CBt(e,t){let{schema:n,statistics:i}=e,o=i?.classes[t],r=n.classes[t].properties,a=Object.entries(r).map(([g,m])=>{let{type:A,componentType:y}=m,x=o?.properties[g].min,b=o?.properties[g].max,C=dt.getComponentCount(A),E=aRe(x,C),S=aRe(b,C);return{id:g,type:A,componentType:y,minValue:E,maxValue:S}}),s=a.map(g=>g.id),c=a.map(g=>g.type),u=a.map(g=>g.componentType),f=a.map(g=>g.minValue),d=a.map(g=>g.maxValue),p=f.some(l);return{className:t,names:s,types:c,componentTypes:u,minimumValues:p?f:void 0,maximumValues:p?d:void 0}}function aRe(e,t){if(!l(e))return;let n=Array.isArray(e)?e:[e];return Array.from({length:t},(i,o)=>n[o])}async function TBt(e,t){let n=e._implicitTileset,i=e._subtreeCache,o=i.find(t);if(l(o))return o;let r=n.subtreeUriTemplate.getDerivedResource({templateValues:t.getTemplateValues()}),a=n.baseResource.getDerivedResource({url:r.url}),s=await a.fetchArrayBuffer();if(o=i.find(t),l(o))return o;let c=Vg(s);return o=await fg.fromSubtreeJson(a,c.jsonPayload,c.binaryPayload,n,t),i.addSubtree(o),o}JU.prototype.requestData=async function(e){e=e??G.EMPTY_OBJECT;let{tileLevel:t=0,tileX:n=0,tileY:i=0,tileZ:o=0,keyframe:r=0}=e;if(r!==0)return Promise.reject("3D Tiles currently doesn't support time-dynamic data.");let a=this._implicitTileset,s=new Np({subdivisionScheme:a.subdivisionScheme,subtreeLevels:a.subtreeLevels,level:t,x:n,y:i,z:o}),c=s.isSubtreeRoot()&&s.level>0,u=c?s.getParentSubtreeCoordinates():s.getSubtreeCoordinates(),d=await TBt(this,u);if(!(c?d.childSubtreeIsAvailableAtCoordinates:d.tileIsAvailableAtCoordinates).call(d,s))return Promise.reject(`Tile is not available at level ${t}, x ${n}, y ${i}, z ${o}.`);let{contentUriTemplates:m,baseResource:A}=a,y=m[0].getDerivedResource({templateValues:s.getTemplateValues()}),x=A.getDerivedResource({url:y.url});return PT.fromGltf(x)};var Zne=JU;function eie(e){e=e??1,this._radius=e??1}Object.defineProperties(eie.prototype,{radius:{get:function(){return this._radius},set:function(e){this._radius=e}}});eie.prototype.emit=function(e){let t=D.randomBetween(0,D.TWO_PI),n=D.randomBetween(0,this._radius),i=n*Math.cos(t),o=n*Math.sin(t),r=0;e.position=h.fromElements(i,o,r,e.position),e.velocity=h.clone(h.UNIT_Z,e.velocity)};var ZU=eie;var q5={CUMULUS:0};q5.validate=function(e){return e===q5.CUMULUS};Object.freeze(q5);var xI=q5;function Xm(e,t){if(e=e??G.EMPTY_OBJECT,this._show=e.show??!0,this._position=h.clone(e.position??h.ZERO),!l(e.scale)&&l(e.maximumSize))this._maximumSize=h.clone(e.maximumSize),this._scale=new z(this._maximumSize.x,this._maximumSize.y);else{this._scale=z.clone(e.scale??new z(20,12));let n=new h(this._scale.x,this._scale.y,Math.min(this._scale.x,this._scale.y)/1.5);this._maximumSize=h.clone(e.maximumSize??n)}this._slice=e.slice??-1,this._color=V.clone(e.color??V.WHITE),this._brightness=e.brightness??1,this._cloudCollection=t,this._index=-1}var EBt=Xm.SHOW_INDEX=0,vBt=Xm.POSITION_INDEX=1,SBt=Xm.SCALE_INDEX=2,wBt=Xm.MAXIMUM_SIZE_INDEX=3,IBt=Xm.SLICE_INDEX=4,DBt=Xm.BRIGHTNESS_INDEX=5,PBt=Xm.COLOR_INDEX=6;Xm.NUMBER_OF_PROPERTIES=7;function UT(e,t){let n=e._cloudCollection;l(n)&&(n._updateCloud(e,t),e._dirty=!0)}Object.defineProperties(Xm.prototype,{show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,UT(this,EBt))}},position:{get:function(){return this._position},set:function(e){let t=this._position;h.equals(t,e)||(h.clone(e,t),UT(this,vBt))}},scale:{get:function(){return this._scale},set:function(e){let t=this._scale;z.equals(t,e)||(z.clone(e,t),UT(this,SBt))}},maximumSize:{get:function(){return this._maximumSize},set:function(e){let t=this._maximumSize;h.equals(t,e)||(h.clone(e,t),UT(this,wBt))}},color:{get:function(){return this._color},set:function(e){let t=this._color;V.equals(t,e)||(V.clone(e,t),UT(this,PBt))}},slice:{get:function(){return this._slice},set:function(e){this._slice!==e&&(this._slice=e,UT(this,IBt))}},brightness:{get:function(){return this._brightness},set:function(e){this._brightness!==e&&(this._brightness=e,UT(this,DBt))}}});Xm.prototype._destroy=function(){this._cloudCollection=void 0};var rd=Xm;var ad,Y5=new h,RBt={positionHighAndScaleX:0,positionLowAndScaleY:1,packedAttribute0:2,packedAttribute1:3,color:4},OBt={direction:0,positionHighAndScaleX:1,positionLowAndScaleY:2,packedAttribute0:3,packedAttribute1:4,color:5},MBt=rd.SHOW_INDEX,BBt=rd.POSITION_INDEX,LBt=rd.SCALE_INDEX,NBt=rd.MAXIMUM_SIZE_INDEX,FBt=rd.SLICE_INDEX,kBt=rd.BRIGHTNESS_INDEX,zBt=rd.NUMBER_OF_PROPERTIES,UBt=rd.COLOR_INDEX;function Km(e){e=e??G.EMPTY_OBJECT,this._clouds=[],this._cloudsToUpdate=[],this._cloudsToUpdateIndex=0,this._cloudsRemoved=!1,this._createVertexArray=!1,this._propertiesChanged=new Uint32Array(zBt),this._noiseTexture=void 0,this._textureSliceWidth=128,this._noiseTextureRows=4,this.noiseDetail=e.noiseDetail??16,this.noiseOffset=h.clone(e.noiseOffset??h.ZERO),this._loading=!1,this._ready=!1;let t=this;this._uniforms={u_noiseTexture:function(){return t._noiseTexture},u_noiseTextureDimensions:sRe(t),u_noiseDetail:function(){return t.noiseDetail}},this._vaNoise=void 0,this._spNoise=void 0,this._spCreated=!1,this._sp=void 0,this._rs=void 0,this.show=e.show??!0,this._colorCommands=[],this.debugBillboards=e.debugBillboards??!1,this._compiledDebugBillboards=!1,this.debugEllipsoids=e.debugEllipsoids??!1,this._compiledDebugEllipsoids=!1}function sRe(e){return function(){return Y5.x=e._textureSliceWidth,Y5.y=e._noiseTextureRows,Y5.z=1/e._noiseTextureRows,Y5}}Object.defineProperties(Km.prototype,{length:{get:function(){return nie(this),this._clouds.length}}});function cRe(e){let t=e.length;for(let n=0;n<t;++n)e[n]&&e[n]._destroy()}Km.prototype.add=function(e){e=e??G.EMPTY_OBJECT;let t=e.cloudType??xI.CUMULUS,n;return t===xI.CUMULUS&&(n=new rd(e,this),n._index=this._clouds.length,this._clouds.push(n),this._createVertexArray=!0),n};Km.prototype.remove=function(e){return this.contains(e)?(this._clouds[e._index]=void 0,this._cloudsRemoved=!0,this._createVertexArray=!0,e._destroy(),!0):!1};Km.prototype.removeAll=function(){cRe(this._clouds),this._clouds=[],this._cloudsToUpdate=[],this._cloudsToUpdateIndex=0,this._cloudsRemoved=!1,this._createVertexArray=!0};function nie(e){if(e._cloudsRemoved){e._cloudsRemoved=!1;let t=[],n=e._clouds,i=n.length;for(let o=0,r=0;o<i;++o){let a=n[o];l(a)&&(n._index=r++,t.push(a))}e._clouds=t}}Km.prototype._updateCloud=function(e,t){e._dirty||(this._cloudsToUpdate[this._cloudsToUpdateIndex++]=e),++this._propertiesChanged[t]};Km.prototype.contains=function(e){return l(e)&&e._cloudCollection===this};Km.prototype.get=function(e){return nie(this),this._clouds[e]};var VBt=new Float32Array([-1,-1,1,-1,1,1,-1,1]),jBt=new Uint16Array([0,1,2,0,2,3]);function GBt(e){let t=Ke.createVertexBuffer({context:e,typedArray:VBt,usage:Oe.STATIC_DRAW}),n=Ke.createIndexBuffer({context:e,typedArray:jBt,usage:Oe.STATIC_DRAW,indexDatatype:Ue.UNSIGNED_SHORT}),i=[{index:0,vertexBuffer:t,componentsPerAttribute:2,componentDatatype:Y.FLOAT}];return new Fn({context:e,attributes:i,indexBuffer:n})}var iie;function HBt(e){let n=e.cache.cloudCollection_indexBufferBatched;if(l(n))return n;let i=16384*6-6,o=new Uint16Array(i);for(let r=0,a=0;r<i;r+=6,a+=4)o[r]=a,o[r+1]=a+1,o[r+2]=a+2,o[r+3]=a,o[r+4]=a+2,o[r+5]=a+3;return n=Ke.createIndexBuffer({context:e,typedArray:o,usage:Oe.STATIC_DRAW,indexDatatype:Ue.UNSIGNED_SHORT}),n.vertexArrayDestroyable=!1,e.cache.cloudCollection_indexBufferBatched=n,n}function WBt(e){let t=e.cache.cloudCollection_indexBufferInstanced;return l(t)||(t=Ke.createIndexBuffer({context:e,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:Oe.STATIC_DRAW,indexDatatype:Ue.UNSIGNED_SHORT}),t.vertexArrayDestroyable=!1,e.cache.cloudCollection_indexBufferInstanced=t),t}function qBt(e){let t=e.cache.cloudCollection_vertexBufferInstanced;return l(t)||(t=Ke.createVertexBuffer({context:e,typedArray:new Float32Array([0,0,1,0,1,1,0,1]),usage:Oe.STATIC_DRAW}),t.vertexArrayDestroyable=!1,e.cache.cloudCollection_vertexBufferInstanced=t),t}function YBt(e,t,n){let i=[{index:ad.positionHighAndScaleX,componentsPerAttribute:4,componentDatatype:Y.FLOAT,usage:Oe.STATIC_DRAW},{index:ad.positionLowAndScaleY,componentsPerAttribute:4,componentDatatype:Y.FLOAT,usage:Oe.STATIC_DRAW},{index:ad.packedAttribute0,componentsPerAttribute:4,componentDatatype:Y.FLOAT,usage:Oe.STATIC_DRAW},{index:ad.packedAttribute1,componentsPerAttribute:4,componentDatatype:Y.FLOAT,usage:Oe.STATIC_DRAW},{index:ad.color,componentsPerAttribute:4,componentDatatype:Y.UNSIGNED_BYTE,normalize:!0,usage:Oe.STATIC_DRAW}];n&&i.push({index:ad.direction,componentsPerAttribute:2,componentDatatype:Y.FLOAT,vertexBuffer:qBt(e)});let o=n?t:4*t;return new j0(e,i,o,n)}var tie=new xn;function lRe(e,t,n,i){let o,r=n[ad.positionHighAndScaleX],a=n[ad.positionLowAndScaleY],s=i.position;xn.fromCartesian(s,tie);let c=i.scale,u=tie.high,f=tie.low;e._instanced?(o=i._index,r(o,u.x,u.y,u.z,c.x),a(o,f.x,f.y,f.z,c.y)):(o=i._index*4,r(o+0,u.x,u.y,u.z,c.x),r(o+1,u.x,u.y,u.z,c.x),r(o+2,u.x,u.y,u.z,c.x),r(o+3,u.x,u.y,u.z,c.x),a(o+0,f.x,f.y,f.z,c.y),a(o+1,f.x,f.y,f.z,c.y),a(o+2,f.x,f.y,f.z,c.y),a(o+3,f.x,f.y,f.z,c.y))}function uRe(e,t,n,i){let o,r=n[ad.packedAttribute0],a=i.show,s=i.brightness;e._instanced?(o=i._index,r(o,a,s,0,0)):(o=i._index*4,r(o+0,a,s,0,0),r(o+1,a,s,1,0),r(o+2,a,s,1,1),r(o+3,a,s,0,1))}function fRe(e,t,n,i){let o,r=n[ad.packedAttribute1],a=i.maximumSize,s=i.slice;e._instanced?(o=i._index,r(o,a.x,a.y,a.z,s)):(o=i._index*4,r(o+0,a.x,a.y,a.z,s),r(o+1,a.x,a.y,a.z,s),r(o+2,a.x,a.y,a.z,s),r(o+3,a.x,a.y,a.z,s))}function dRe(e,t,n,i){let o,r=n[ad.color],a=i.color,s=V.floatToByte(a.red),c=V.floatToByte(a.green),u=V.floatToByte(a.blue),f=V.floatToByte(a.alpha);e._instanced?(o=i._index,r(o,s,c,u,f)):(o=i._index*4,r(o+0,s,c,u,f),r(o+1,s,c,u,f),r(o+2,s,c,u,f),r(o+3,s,c,u,f))}function XBt(e,t,n,i){lRe(e,t,n,i),uRe(e,t,n,i),fRe(e,t,n,i),dRe(e,t,n,i)}function KBt(e,t,n,i){let o=e,r=o._textureSliceWidth,a=o._noiseTextureRows,s=t.context;o._vaNoise=GBt(s),o._spNoise=Kt.fromCache({context:s,vertexShaderSource:n,fragmentShaderSource:i,attributeLocations:{position:0}});let c=o.noiseDetail,u=o.noiseOffset;o._noiseTexture=new It({context:s,width:r*r/a,height:r*a,pixelDatatype:je.UNSIGNED_BYTE,pixelFormat:Xe.RGBA,sampler:new jt({wrapS:un.REPEAT,wrapT:un.REPEAT,minificationFilter:Vt.NEAREST,magnificationFilter:ti.NEAREST})});let f=new wl({vertexArray:o._vaNoise,shaderProgram:o._spNoise,outputTexture:o._noiseTexture,uniformMap:{u_noiseTextureDimensions:sRe(o),u_noiseDetail:function(){return c},u_noiseOffset:function(){return u}},persists:!1,owner:e,postExecute:function(d){o._ready=!0,o._loading=!1}});t.commandList.push(f),o._loading=!0}function QBt(e,t){let n=e,i=t.context;n._createVertexArray=!1,n._vaf=n._vaf&&n._vaf.destroy();let o=e._clouds,r=o.length;if(r>0){n._vaf=YBt(i,r,n._instanced);let a=n._vaf.writers,s;for(s=0;s<r;++s){let c=o[s];XBt(e,t,a,c)}n._vaf.commit(iie(i))}}var $Bt=[];function JBt(e,t){let n=t.context,i=e,r=i._clouds.length,a=i._cloudsToUpdate,s=i._cloudsToUpdateIndex,c=i._propertiesChanged,u=$Bt;u.length=0,(c[BBt]||c[LBt])&&u.push(lRe),(c[MBt]||c[kBt])&&u.push(uRe),(c[NBt]||c[FBt])&&u.push(fRe),c[UBt]&&u.push(dRe);let f=u.length,d=i._vaf.writers,p,g,m;if(s/r>.1){for(p=0;p<s;++p)for(g=a[p],g._dirty=!1,m=0;m<f;++m)u[m](e,t,d,g);i._vaf.commit(iie(n))}else{for(p=0;p<s;++p){for(g=a[p],g._dirty=!1,m=0;m<f;++m)u[m](e,t,d,g);i._instanced?i._vaf.subCommit(g._index,1):i._vaf.subCommit(g._index*4,4)}i._vaf.endSubCommits()}i._cloudsToUpdateIndex=0}function ZBt(e,t,n,i){let o=t.context,r=e,a=new He({defines:[],sources:[n]});r._instanced&&a.defines.push("INSTANCED");let s=new He({defines:[],sources:[i]});r.debugBillboards&&s.defines.push("DEBUG_BILLBOARDS"),r.debugEllipsoids&&s.defines.push("DEBUG_ELLIPSOIDS"),r._sp=Kt.replaceCache({context:o,shaderProgram:r._sp,vertexShaderSource:a,fragmentShaderSource:s,attributeLocations:ad}),r._rs=Ve.fromCache({depthTest:{enabled:!0,func:ee.LESS},depthMask:!1,blending:Jt.ALPHA_BLEND}),r._spCreated=!0,r._compiledDebugBillboards=r.debugBillboards,r._compiledDebugEllipsoids=r.debugEllipsoids}function eLt(e,t){let n=e,i=t.passes,o=n._uniforms,r=t.commandList;if(i.render){let a=n._colorCommands,s=n._vaf.va,c=s.length;a.length=c;for(let u=0;u<c;u++){let f=a[u];l(f)||(f=a[u]=new tt),f.pass=Ie.TRANSLUCENT,f.owner=e,f.uniformMap=o,f.count=s[u].indicesCount,f.vertexArray=s[u].va,f.shaderProgram=n._sp,f.renderState=n._rs,n._instanced&&(f.count=6,f.instanceCount=n._clouds.length),r.push(f)}}}Km.prototype.update=function(e){if(nie(this),!this.show)return;let t=this.debugBillboards||this.debugEllipsoids;this._ready=t?!0:l(this._noiseTexture),!this._ready&&!this._loading&&!t&&KBt(this,e,XU,YU),this._instanced=e.context.instancedArrays,ad=this._instanced?OBt:RBt,iie=this._instanced?WBt:HBt;let i=this._clouds.length,o=this._cloudsToUpdate,r=this._cloudsToUpdateIndex;this._createVertexArray?QBt(this,e):r>0&&JBt(this,e),r>i*1.5&&(o.length=i),!(!l(this._vaf)||!l(this._vaf.va)||!this._ready&!t)&&((!this._spCreated||this.debugBillboards!==this._compiledDebugBillboards||this.debugEllipsoids!==this._compiledDebugEllipsoids)&&ZBt(this,e,qU,WU),eLt(this,e))};Km.prototype.isDestroyed=function(){return!1};Km.prototype.destroy=function(){return this._noiseTexture=this._noiseTexture&&this._noiseTexture.destroy(),this._sp=this._sp&&this._sp.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),cRe(this._clouds),fe(this)};var oie=Km;var tLt=D.toRadians(30);function rie(e){this._angle=e??tLt}Object.defineProperties(rie.prototype,{angle:{get:function(){return this._angle},set:function(e){this._angle=e}}});rie.prototype.emit=function(e){let t=Math.tan(this._angle),n=D.randomBetween(0,D.TWO_PI),i=D.randomBetween(0,t),o=i*Math.cos(n),r=i*Math.sin(n),a=1;e.velocity=h.fromElements(o,r,a,e.velocity),h.normalize(e.velocity,e.velocity),e.position=h.clone(h.ZERO,e.position)};var aie=rie;function eV(e){e=e??G.EMPTY_OBJECT;let t=e.attributeName,n=e.perInstanceAttribute;l(n)||(n=!1);let i=e.glslDatatype??"vec3",o=`v_${t}`,r;if(t==="normal"||t==="tangent"||t==="bitangent")r=`vec4 getColor() { return vec4((${o} + vec3(1.0)) * 0.5, 1.0); }
- `;else switch(t==="st"&&(i="vec2"),i){case"float":r=`vec4 getColor() { return vec4(vec3(${o}), 1.0); }
- `;break;case"vec2":r=`vec4 getColor() { return vec4(${o}, 0.0, 1.0); }
- `;break;case"vec3":r=`vec4 getColor() { return vec4(${o}, 1.0); }
- `;break;case"vec4":r=`vec4 getColor() { return ${o}; }
- `;break}let a=`in vec3 position3DHigh;
- in vec3 position3DLow;
- in float batchId;
- ${n?"":`in ${i} ${t};
- `}out ${i} ${o};
- void main()
- {
- vec4 p = czm_translateRelativeToEye(position3DHigh, position3DLow);
- ${n?`${o} = czm_batchTable_${t}(batchId);
- `:`${o} = ${t};
- `}gl_Position = czm_modelViewProjectionRelativeToEye * p;
- }`,s=`in ${i} ${o};
- ${r}
- void main()
- {
- out_FragColor = getColor();
- }`;this.material=void 0,this.translucent=e.translucent??!1,this._vertexShaderSource=e.vertexShaderSource??a,this._fragmentShaderSource=e.fragmentShaderSource??s,this._renderState=yo.getDefaultRenderState(!1,!1,e.renderState),this._closed=e.closed??!1,this._attributeName=t,this._glslDatatype=i}Object.defineProperties(eV.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},attributeName:{get:function(){return this._attributeName}},glslDatatype:{get:function(){return this._glslDatatype}}});eV.prototype.getFragmentShaderSource=yo.prototype.getFragmentShaderSource;eV.prototype.isTranslucent=yo.prototype.isTranslucent;eV.prototype.getRenderState=yo.prototype.getRenderState;var sie=eV;function X5(e){e=e??G.EMPTY_OBJECT,this.length=e.length??1e7,this._length=void 0,this.width=e.width??2,this._width=void 0,this.show=e.show??!0,this.modelMatrix=M.clone(e.modelMatrix??M.IDENTITY),this._modelMatrix=new M,this.id=e.id,this._id=void 0,this._primitive=void 0}X5.prototype.update=function(e){if(this.show){if(!l(this._primitive)||!M.equals(this._modelMatrix,this.modelMatrix)||this._length!==this.length||this._width!==this.width||this._id!==this.id){this._modelMatrix=M.clone(this.modelMatrix,this._modelMatrix),this._length=this.length,this._width=this.width,this._id=this.id,l(this._primitive)&&this._primitive.destroy(),this.modelMatrix[12]===0&&this.modelMatrix[13]===0&&this.modelMatrix[14]===0&&(this.modelMatrix[14]=.01);let t=new Ot({geometry:new d_({positions:[h.ZERO,h.UNIT_X],width:this.width,vertexFormat:Oa.VERTEX_FORMAT,colors:[V.RED,V.RED],arcType:on.NONE}),modelMatrix:M.multiplyByUniformScale(this.modelMatrix,this.length,new M),id:this.id,pickPrimitive:this}),n=new Ot({geometry:new d_({positions:[h.ZERO,h.UNIT_Y],width:this.width,vertexFormat:Oa.VERTEX_FORMAT,colors:[V.GREEN,V.GREEN],arcType:on.NONE}),modelMatrix:M.multiplyByUniformScale(this.modelMatrix,this.length,new M),id:this.id,pickPrimitive:this}),i=new Ot({geometry:new d_({positions:[h.ZERO,h.UNIT_Z],width:this.width,vertexFormat:Oa.VERTEX_FORMAT,colors:[V.BLUE,V.BLUE],arcType:on.NONE}),modelMatrix:M.multiplyByUniformScale(this.modelMatrix,this.length,new M),id:this.id,pickPrimitive:this});this._primitive=new Dn({geometryInstances:[t,n,i],appearance:new Oa,asynchronous:!1})}this._primitive.update(e)}};X5.prototype.isDestroyed=function(){return!1};X5.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),fe(this)};var tV=X5;function nLt(e){this.direction=h.clone(e.direction),this.color=V.clone(e.color??V.WHITE),this.intensity=e.intensity??1}var cie=nLt;var nV=`in vec3 v_positionMC;
- in vec3 v_positionEC;
- in vec2 v_st;
-
- void main()
- {
- czm_materialInput materialInput;
-
- vec3 normalEC = normalize(czm_normal3D * czm_geodeticSurfaceNormal(v_positionMC, vec3(0.0), vec3(1.0)));
- #ifdef FACE_FORWARD
- normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);
- #endif
-
- materialInput.s = v_st.s;
- materialInput.st = v_st;
- materialInput.str = vec3(v_st, 0.0);
-
- // Convert tangent space material normal to eye space
- materialInput.normalEC = normalEC;
- materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(v_positionMC, materialInput.normalEC);
-
- // Convert view vector to world space
- vec3 positionToEyeEC = -v_positionEC;
- materialInput.positionToEyeEC = positionToEyeEC;
-
- czm_material material = czm_getMaterial(materialInput);
-
- #ifdef FLAT
- out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
- #else
- out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
- #endif
- }
- `;var iV=`in vec3 position3DHigh;
- in vec3 position3DLow;
- in vec2 st;
- in float batchId;
-
- out vec3 v_positionMC;
- out vec3 v_positionEC;
- out vec2 v_st;
-
- void main()
- {
- vec4 p = czm_computePosition();
-
- v_positionMC = position3DHigh + position3DLow; // position in model coordinates
- v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates
- v_st = st;
-
- gl_Position = czm_modelViewProjectionRelativeToEye * p;
- }
- `;function VT(e){e=e??G.EMPTY_OBJECT;let t=e.translucent??!0,n=e.aboveGround??!1;this.material=l(e.material)?e.material:Hi.fromType(Hi.ColorType),this.translucent=e.translucent??!0,this._vertexShaderSource=e.vertexShaderSource??iV,this._fragmentShaderSource=e.fragmentShaderSource??nV,this._renderState=yo.getDefaultRenderState(t,!n,e.renderState),this._closed=!1,this._flat=e.flat??!1,this._faceForward=e.faceForward??n,this._aboveGround=n}Object.defineProperties(VT.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return VT.VERTEX_FORMAT}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}},aboveGround:{get:function(){return this._aboveGround}}});VT.VERTEX_FORMAT=Ne.POSITION_AND_ST;VT.prototype.getFragmentShaderSource=yo.prototype.getFragmentShaderSource;VT.prototype.isTranslucent=yo.prototype.isTranslucent;VT.prototype.getRenderState=yo.prototype.getRenderState;var lie=VT;function bI(e){let t=e.radius??1,i={radii:new h(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,vertexFormat:e.vertexFormat};this._ellipsoidGeometry=new js(i),this._workerName="createSphereGeometry"}bI.packedLength=js.packedLength;bI.pack=function(e,t,n){return js.pack(e._ellipsoidGeometry,t,n)};var iLt=new js,Qy={radius:void 0,radii:new h,vertexFormat:new Ne,stackPartitions:void 0,slicePartitions:void 0};bI.unpack=function(e,t,n){let i=js.unpack(e,t,iLt);return Qy.vertexFormat=Ne.clone(i._vertexFormat,Qy.vertexFormat),Qy.stackPartitions=i._stackPartitions,Qy.slicePartitions=i._slicePartitions,l(n)?(h.clone(i._radii,Qy.radii),n._ellipsoidGeometry=new js(Qy),n):(Qy.radius=i._radii.x,new bI(Qy))};bI.createGeometry=function(e){return js.createGeometry(e._ellipsoidGeometry)};var oV=bI;var oLt=1e5;function rV(e){e=e??G.EMPTY_OBJECT;let t=e.credit;typeof t=="string"&&(t=new yt(t)),this._credit=t,this._radius=l(e.radius)?e.radius:oLt,this._image=e.image,this._transform=l(e.transform)?e.transform:M.IDENTITY,this._repeatHorizontal=l(e.repeatHorizontal)?e.repeatHorizontal:1,this._repeatVertical=l(e.repeatVertical)?e.repeatVertical:1;let n=new oV({radius:this._radius,vertexFormat:Ne.ALL}),i=new Ot({geometry:n,modelMatrix:this._transform}),o=new Hi({fabric:{type:"Image",uniforms:{image:this._image,repeat:new z(-this._repeatHorizontal,this._repeatVertical)}}});return this._primitive=new Dn({geometryInstances:i,appearance:new go({material:o,closed:!0,faceForward:!1,flat:!0,translucent:!1,renderState:{cull:{enabled:!1}}}),credit:this._credit}),this}Object.defineProperties(rV.prototype,{radius:{get:function(){return this._radius}},image:{get:function(){return this._image}},transform:{get:function(){return this._transform}},credit:{get:function(){return l(this._credit)?this._credit:void 0}},show:{get:function(){return l(this._primitive)?this._primitive.show:void 0},set:function(e){l(this._primitive)&&(this._primitive.show=e)}}});rV.prototype.update=function(e){return l(this._credit)&&e.creditDisplay.addCreditToNextFrame(this._credit),this._primitive.update(e)};rV.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),fe(this)};rV.prototype.isDestroyed=function(){return this._primitive.isDestroyed()};var uie=rV;function nf(e){this._scene=e.scene,this.samplingWindow=e.samplingWindow??nf.defaultSettings.samplingWindow,this.quietPeriod=e.quietPeriod??nf.defaultSettings.quietPeriod,this.warmupPeriod=e.warmupPeriod??nf.defaultSettings.warmupPeriod,this.minimumFrameRateDuringWarmup=e.minimumFrameRateDuringWarmup??nf.defaultSettings.minimumFrameRateDuringWarmup,this.minimumFrameRateAfterWarmup=e.minimumFrameRateAfterWarmup??nf.defaultSettings.minimumFrameRateAfterWarmup,this._lowFrameRate=new ye,this._nominalFrameRate=new ye,this._frameTimes=[],this._needsQuietPeriod=!0,this._quietPeriodEndTime=0,this._warmupPeriodEndTime=0,this._frameRateIsLow=!1,this._lastFramesPerSecond=void 0,this._pauseCount=0;let t=this;this._preUpdateRemoveListener=this._scene.preUpdate.addEventListener(function(o,r){rLt(t,r)}),this._hiddenPropertyName=document.hidden!==void 0?"hidden":document.mozHidden!==void 0?"mozHidden":document.msHidden!==void 0?"msHidden":document.webkitHidden!==void 0?"webkitHidden":void 0;let n=document.hidden!==void 0?"visibilitychange":document.mozHidden!==void 0?"mozvisibilitychange":document.msHidden!==void 0?"msvisibilitychange":document.webkitHidden!==void 0?"webkitvisibilitychange":void 0;function i(){aLt(t)}this._visibilityChangeRemoveListener=void 0,l(n)&&(document.addEventListener(n,i,!1),this._visibilityChangeRemoveListener=function(){document.removeEventListener(n,i,!1)})}nf.defaultSettings={samplingWindow:5,quietPeriod:2,warmupPeriod:5,minimumFrameRateDuringWarmup:4,minimumFrameRateAfterWarmup:8};nf.fromScene=function(e){return(!l(e._frameRateMonitor)||e._frameRateMonitor.isDestroyed())&&(e._frameRateMonitor=new nf({scene:e})),e._frameRateMonitor};Object.defineProperties(nf.prototype,{scene:{get:function(){return this._scene}},lowFrameRate:{get:function(){return this._lowFrameRate}},nominalFrameRate:{get:function(){return this._nominalFrameRate}},lastFramesPerSecond:{get:function(){return this._lastFramesPerSecond}}});nf.prototype.pause=function(){++this._pauseCount,this._pauseCount===1&&(this._frameTimes.length=0,this._lastFramesPerSecond=void 0)};nf.prototype.unpause=function(){--this._pauseCount,this._pauseCount<=0&&(this._pauseCount=0,this._needsQuietPeriod=!0)};nf.prototype.isDestroyed=function(){return!1};nf.prototype.destroy=function(){return this._preUpdateRemoveListener(),l(this._visibilityChangeRemoveListener)&&this._visibilityChangeRemoveListener(),fe(this)};function rLt(e,t){if(e._pauseCount>0)return;let n=Fi();if(e._needsQuietPeriod)e._needsQuietPeriod=!1,e._frameTimes.length=0,e._quietPeriodEndTime=n+e.quietPeriod/ii.SECONDS_PER_MILLISECOND,e._warmupPeriodEndTime=e._quietPeriodEndTime+(e.warmupPeriod+e.samplingWindow)/ii.SECONDS_PER_MILLISECOND;else if(n>=e._quietPeriodEndTime){e._frameTimes.push(n);let i=n-e.samplingWindow/ii.SECONDS_PER_MILLISECOND;if(e._frameTimes.length>=2&&e._frameTimes[0]<=i){for(;e._frameTimes.length>=2&&e._frameTimes[1]<i;)e._frameTimes.shift();let o=(n-e._frameTimes[0])/(e._frameTimes.length-1);e._lastFramesPerSecond=1e3/o;let r=1e3/(n>e._warmupPeriodEndTime?e.minimumFrameRateAfterWarmup:e.minimumFrameRateDuringWarmup);o>r?e._frameRateIsLow||(e._frameRateIsLow=!0,e._needsQuietPeriod=!0,e.lowFrameRate.raiseEvent(e.scene,e._lastFramesPerSecond)):e._frameRateIsLow&&(e._frameRateIsLow=!1,e._needsQuietPeriod=!0,e.nominalFrameRate.raiseEvent(e.scene,e._lastFramesPerSecond))}}}function aLt(e){document[e._hiddenPropertyName]?e.pause():e.unpause()}var aV=nf;var die=class e{constructor(t){t=t??G.EMPTY_OBJECT;let n=sLt(t.geoJson),i=t.allowPicking??!0,o=t.ellipsoid??te.default,r=new Float64Array(0);function a(d){return r.length<d&&(r=new Float64Array(d)),r}if(this.show=t.show??!0,this._url=t.url,this._ids=n.ids,this._properties=n.properties,this._featureCount=n.ids.length,this._pickObjectFactory=t.pickObjectFactory,this._points=void 0,this._polylines=void 0,this._polygons=void 0,n.pointCount>0){let d={primitiveCountMax:n.pointCount,allowPicking:i};this._points=new ku(d)}if(n.polylineCount>0){let d={primitiveCountMax:n.polylineCount,vertexCountMax:n.polylineVertexCount,allowPicking:i};this._polylines=new Uu(d)}if(n.polygonCount>0){let d={primitiveCountMax:n.polygonCount,vertexCountMax:n.polygonVertexCount,holeCountMax:n.polygonHoleCount,triangleCountMax:n.polygonTriangleCount,allowPicking:i};this._polygons=new zu(d)}let s=new h,c=0,u=0,f=0;for(let d=0;d<n.features.length;d++){let p=n.features[d],g=p.featureId,m=this._properties[g];for(let A=0;A<p.points.length;A++){let y=c++;this._points.add({featureId:g,position:ARe(p.points[A],o,s),pickObject:i?fie(this,y,this._points,Bc,m):void 0})}for(let A=0;A<p.polylines.length;A++){let y=u++;this._polylines.add({featureId:g,positions:hRe(p.polylines[A],o,a),pickObject:i?fie(this,y,this._polylines,rc,m):void 0})}for(let A=0;A<p.polygons.length;A++){let y=p.polygons[A],x=f++;this._polygons.add({featureId:g,positions:hRe(y.positions,o,a),holes:y.holes,triangles:y.triangles,pickObject:i?fie(this,x,this._polygons,za,m):void 0})}}}get url(){let t=this._url;if(l(t))return t instanceof De?t.getUrlComponent(!0):t}get featureCount(){return this._featureCount}get ids(){return this._ids}get properties(){return this._properties}get points(){return this._points}get polylines(){return this._polylines}get polygons(){return this._polygons}static async fromUrl(t,n){let i=De.createIfNeeded(t),o=await i.fetchJson();if(!l(o))throw new re(`Failed to load GeoJSON from ${i.getUrlComponent(!0)}.`);return e.fromGeoJson(o,{...n,url:i})}static fromGeoJson(t,n){return new e({...n,geoJson:t})}getId(t){return this._ids[t]}getProperties(t){return this._properties[t]}update(t){this.show&&(l(this._points)&&this._points.update(t),l(this._polylines)&&this._polylines.update(t),l(this._polygons)&&this._polygons.update(t))}destroy(){return this._points&&(this._points.destroy(),this._points=void 0),this._polylines&&(this._polylines.destroy(),this._polylines=void 0),this._polygons&&(this._polygons.destroy(),this._polygons=void 0),fe(this)}isDestroyed(){return!1}};function fie(e,t,n,i,o){return l(e._pickObjectFactory)?e._pickObjectFactory(t,n,o):{index:t,collection:n,get primitive(){return n.get(t,new i)},parentPrimitive:e,properties:o}}function sLt(e){let t=cLt(e),n=[],i=[],o=[],r=0,a=0,s=0,c=0,u=0,f=0,d=0;for(let p=0;p<t.length;p++){let g=t[p],m={points:[],polylines:[],polygons:[]};if(mRe(g.geometry,m),m.points.length===0&&m.polylines.length===0&&m.polygons.length===0)continue;let A=i.length;i.push(g.id),o.push(yLt(g.properties)?g.properties:G.EMPTY_OBJECT);for(let y=0;y<m.polygons.length;y++){let x=m.polygons[y];f+=x.holes.length,d+=x.triangles.length/3,u+=x.positions.length}for(let y=0;y<m.polylines.length;y++)s+=m.polylines[y].length;r+=m.points.length,a+=m.polylines.length,c+=m.polygons.length,n.push({featureId:A,points:m.points,polylines:m.polylines,polygons:m.polygons})}return{features:n,ids:i,properties:o,pointCount:r,polylineCount:a,polylineVertexCount:s,polygonCount:c,polygonVertexCount:u,polygonHoleCount:f,polygonTriangleCount:d}}function cLt(e){if(!l(e)||!l(e.type))throw new re("GeoJSON object must define 'type'.");switch(e.type){case"FeatureCollection":return e.features;case"Feature":return[e];default:if(_Lt(e.type))return[{type:"Feature",geometry:e,properties:G.EMPTY_OBJECT,id:void 0}];throw new re(`Unsupported GeoJSON type: ${e.type}`)}}function mRe(e,t){if(!(!l(e)||!l(e.type)))switch(e.type){case"Point":pRe(e.coordinates,t.points);return;case"MultiPoint":uLt(e.coordinates,t.points);return;case"LineString":gRe(e.coordinates,t.polylines);return;case"MultiLineString":fLt(e.coordinates,t.polylines);return;case"Polygon":_Re(e.coordinates,t.polygons);return;case"MultiPolygon":dLt(e.coordinates,t.polygons);return;case"GeometryCollection":lLt(e.geometries,t);return;default:return}}function lLt(e,t){if(Array.isArray(e))for(let n=0;n<e.length;n++)mRe(e[n],t)}function pRe(e,t){let n=hie(e);l(n)&&t.push(n)}function uLt(e,t){for(let n=0;n<e.length;n++)pRe(e[n],t)}function gRe(e,t){let n=hLt(e);l(n)&&n.length>=2&&t.push(n)}function fLt(e,t){for(let n=0;n<e.length;n++)gRe(e[n],t)}function _Re(e,t){let n=mLt(e);l(n)&&t.push(n)}function dLt(e,t){for(let n=0;n<e.length;n++)_Re(e[n],t)}function hLt(e){if(!Array.isArray(e))return;let t=[];for(let n=0;n<e.length;n++){let i=hie(e[n]);l(i)&&t.push(i)}return t.length>=2?t:void 0}function mLt(e){if(!Array.isArray(e)||e.length===0)return;let t=[];for(let s=0;s<e.length;s++){let c=pLt(e[s]);l(c)&&t.push(c)}if(t.length===0||t[0].length<3)return;let i=[],o=[],r=[];for(let s=0;s<t.length;s++){let c=t[s];if(!(c.length<3)){s>0&&r.push(o.length);for(let u=0;u<c.length;u++){let f=c[u];o.push(f),i.push(new z(f[0],f[1]))}}}if(o.length<3)return;let a=ni.triangulate(i,r);if(!(!l(a)||a.length<3))return{positions:o,holes:new Uint32Array(r),triangles:new Uint32Array(a)}}function pLt(e){if(!Array.isArray(e))return;let t=[];for(let n=0;n<e.length;n++){let i=hie(e[n]);l(i)&&t.push(i)}if(!(t.length<3))return t.length>1&&gLt(t[0],t[t.length-1])&&t.pop(),t.length>=3?t:void 0}function hie(e){if(!Array.isArray(e)||e.length<2)return;let t=e[0],n=e[1],i=e[2]??0;if(!(!Number.isFinite(t)||!Number.isFinite(n)||!Number.isFinite(i)))return[t,n,i]}function gLt(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function _Lt(e){return e==="Point"||e==="MultiPoint"||e==="LineString"||e==="MultiLineString"||e==="Polygon"||e==="MultiPolygon"||e==="GeometryCollection"}function ARe(e,t,n){return h.fromDegrees(e[0],e[1],e[2]??0,t,n)}var ALt=new h;function hRe(e,t,n){let i=e.length*3,o=n(i);for(let r=0;r<e.length;r++){let a=ARe(e[r],t,ALt);o[r*3]=a.x,o[r*3+1]=a.y,o[r*3+2]=a.z}return o.subarray(0,i)}function yLt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var mie=die;var xLt=1953029805,bLt=2917034100;function pie(e,t){if(pie.passThroughDataForTesting)return t;let n=e.byteLength;if(n===0||n%4!==0)throw new re("The length of key must be greater than 0 and a multiple of 4.");let i=new DataView(t),o=i.getUint32(0,!0);if(o===xLt||o===bLt)return t;let r=new DataView(e),a=0,s=t.byteLength,c=s-s%8,u=n,f,d=8;for(;a<c;)for(d=(d+8)%24,f=d;a<c&&f<u;)i.setUint32(a,i.getUint32(a,!0)^r.getUint32(f,!0),!0),i.setUint32(a+4,i.getUint32(a+4,!0)^r.getUint32(f+4,!0),!0),a+=8,f+=24;if(a<s)for(f>=u&&(d=(d+8)%24,f=d);a<s;)i.setUint8(a,i.getUint8(a)^r.getUint8(f)),a++,f++}pie.passThroughDataForTesting=!1;var sV=pie;var wLt=Yr(gie(),1);function CLt(e,t){return(e&t)!==0}var Tl=CLt;var TLt=[1,2,4,8],yRe=15,ELt=16,vLt=64,SLt=128;function C0(e,t,n,i,o,r){this._bits=e,this.cnodeVersion=t,this.imageryVersion=n,this.terrainVersion=i,this.imageryProvider=o,this.terrainProvider=r,this.ancestorHasTerrain=!1,this.terrainState=void 0}C0.clone=function(e,t){return l(t)?(t._bits=e._bits,t.cnodeVersion=e.cnodeVersion,t.imageryVersion=e.imageryVersion,t.terrainVersion=e.terrainVersion,t.imageryProvider=e.imageryProvider,t.terrainProvider=e.terrainProvider):t=new C0(e._bits,e.cnodeVersion,e.imageryVersion,e.terrainVersion,e.imageryProvider,e.terrainProvider),t.ancestorHasTerrain=e.ancestorHasTerrain,t.terrainState=e.terrainState,t};C0.prototype.setParent=function(e){this.ancestorHasTerrain=e.ancestorHasTerrain||this.hasTerrain()};C0.prototype.hasSubtree=function(){return Tl(this._bits,ELt)};C0.prototype.hasImagery=function(){return Tl(this._bits,vLt)};C0.prototype.hasTerrain=function(){return Tl(this._bits,SLt)};C0.prototype.hasChildren=function(){return Tl(this._bits,yRe)};C0.prototype.hasChild=function(e){return Tl(this._bits,TLt[e])};C0.prototype.getChildBitmask=function(){return this._bits&yRe};var lV=C0;function ILt(e){let t=e.length,n=new ArrayBuffer(t),i=new Uint8Array(n);for(let o=0;o<t;++o)i[o]=e.charCodeAt(o);return n}var DLt=ILt(`E\xF4\xBD\vy\xE2jE"\x92,\xCDq\xF8IFgQ\0B%\xC6\xE8a,f)\b\xC64\xDCjb%y
- wmi\xD6\xF0\x9Ck\x93\xA1\xBDNu\xE0A[\xDF@V\f\xD9\xBBr\x9B\x81|3S\xEEOl\xD4q\xB0{\xC0\x7FEVZ\xADwUe\v3\x92*\xACl5\xC50s\xF83>mF8J\xB4\xDD\xF0.\xDDu\xDA\x8CDt"\xFAa"\f3"So\xAF9D\v\x8C9\xD99L\xB9\xBF\x7F\xAB\\\x8CP_\x9F"ux\xE9\x07q\x91h;\xC1\xC4\x9B\x7F\xF0<VqH\x82'UfYNe\x98u\xA3aF}a?A\0\x9F\xD7\xB44M\xCE\x87F\xB0\xD5\xB8\x8A'{\x8B\xDC+\xBBMg0\xC8\xD1\xF6\\\x8FP\xFA[/F\x9Bn5/'C.\xEB
- \f^\xA5s\x1Be4\xE5l.jC'c#U\xA9?q{gC}:\xAF\xCD\xE2TU\x9C\xFDK\xC6\xE2\x9F/(\xED\xCB\\\xC6-f\x07\x88\xA7;/*"N\xB0k.\xDD\r\x95}}G\xBAC\xB2\xB2+>M\xAA>}\xE6\xCEI\x89\xC6\xE6x\fa1-\xA4O\xA5~q \x88\xEC\r1\xE8N\v\0nPh}=\b\r\x95\xA6n\xA3h\x97$[k\xF3#\xF3\xB6s\xB3\r\v@\xC0\x9F\xD8Q]\xFA".j\xDFI\0\xB9\xA0wU\xC6\xEFj\xBF{GL\x7F\x83\xEE\xDC\xDCF\x85\xA9\xADS\x07+S4\x07\xFF\x94Y\xE48\xE81\x83N\xB9XFk\xCB-#\x86\x92p\x005\x88"\xCF1\xB2&/\xE7\xC3u-6,rt\xB0#G\xB7\xD3\xD1&\x857r\xE2\0\x8CD\xCF\xDA3-\xDE\`\x86i#i*|\xCDKQ\r\x95T9w.)\xEA\x1B\xA6P\xA2j\x8FoP\x99\\>T\xFB\xEFP[\v\x07E\x89m(w7\xDB\x8EJfJo\x99 \xE5p\xE2\xB9q~\fmI-z\xFEr\xC7\xF2Y0\x8F\xBB]s\xE5\xC9 \xEAx\xEC \x90\xF0\x8A\x7FB|G\`\xB0\xBD&\xB7q\xB6\xC7\x9F\xD13\x82=\xD3\xAB\xEEc\x99\xC8+S\xA0D\\q\xC6\xCCD2O<\xCA\xC0)=R\xD3aX\xA9}e\xB4\xDC\xCF\r\xF4=\xF1\b\xA9B\xDA# \xD8\xBF^PI\xF8M\xC0\xCBGLO\xF7{+\xD8\xC51\x92;\xB5o\xDCl\r\x92\x88\xD1\x9E\xDB?\xE2\xE9\xDA_\xD4\x84\xE2FaZ\xDEU\xCF\xA4\0\xBE\xFD\xCEg\xF1Ji\x97\xE6 H\xD8]\x7F~\xAEq N\xAE\xC0V\xA9\x91<\x82r\xE7v\xEC)I\xD6]-\x83\xE3\xDB6\xA9;f\x97\x87j\xD5\xB6=P^R\xB9K\xC7sWx\xC9\xF4.Y\x07\x95\x93o\xD0KW>''\xC7\`\xDB;\xED\x9ASD>?\x8D\x92mw\xA2
- \xEB?R\xA8\xC6U^1I7\x85\xF4\xC5&-\xA9\xBF\x8B'T\xDA\xC3j \xE5*x\xB0\xD6\x90pr\xAA\x8Bh\xBD\x88\xF7_H\xB1~\xC0XL?f\xF9>\xE1e\xC0p\xA7\xCF8i\xAF\xF0VldI\x9C'\xADxtO\xC2\x87\xDEV9\0\xDAw\v\xCB-\x1B\x89\xFB5O\xF5\bQ\`\xC1
- ZGM&30x\xDA\xC0\x9CFG\xE2[y\`In7gS
- >\xE9\xECF9\xB2\xF14\r\xC6\x84Sun\xE1\fY\xD9\xDE)\x85{II\xA5wy\xBEIV.6\xE7\v:\xBBOb{\xD2M1\x95/\xBD8{\xA8O!\xE1\xECFpv\x95})"x\x88
- \x90\xDD\x9D\\\xDA\xDEQ\xCF\xF0\xFCYRe|3\xDF\xF3H\xDA\xBB*u\xDB\`\xB2\xD4\xFC\xED\x1B\xEC\x7F5\xA8\xFF(1\x07-\xC8\xDC\x88F|\x8A["`);function sd(e){this.imageryPresent=!0,this.protoImagery=void 0,this.terrainPresent=!0,this.negativeAltitudeExponentBias=32,this.negativeAltitudeThreshold=D.EPSILON12,this.providers={},this.key=void 0,this._resource=void 0,this._quadPacketVersion=1,this._tileInfo={},this._subtreePromises={}}Object.defineProperties(sd.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},resource:{get:function(){return this._resource}}});sd.fromUrl=async function(e){let t=e;typeof t!="string"&&!(t instanceof De)&&(t=e.url);let n=De.createIfNeeded(t);n.appendForwardSlash();let i=new sd;i._resource=n;try{await PLt(i),await i.getQuadTreePacket("",i._quadPacketVersion)}catch(o){let r=`An error occurred while accessing ${bRe(i,"",1).url}: ${o}`;throw new re(r)}return i};sd.tileXYToQuadKey=function(e,t,n){let i="";for(let o=n;o>=0;--o){let r=1<<o,a=0;Tl(t,r)?Tl(e,r)&&(a|=1):(a|=2,Tl(e,r)||(a|=1)),i+=a}return i};sd.quadKeyToTileXY=function(e){let t=0,n=0,i=e.length-1;for(let o=i;o>=0;--o){let r=1<<o,a=+e[i-o];Tl(a,2)?Tl(a,1)||(t|=r):(n|=r,Tl(a,1)&&(t|=r))}return{x:t,y:n,level:i}};sd.prototype.isValid=function(e){let t=this.getTileInformationFromQuadKey(e);if(l(t))return t!==null;let n=!0,i=e,o;for(;i.length>1;)if(o=i.substring(i.length-1),i=i.substring(0,i.length-1),t=this.getTileInformationFromQuadKey(i),l(t)){!t.hasSubtree()&&!t.hasChild(parseInt(o))&&(n=!1);break}else if(t===null){n=!1;break}return n};var xRe=new Gn("decodeGoogleEarthEnterprisePacket");sd.prototype.getQuadTreePacket=function(e,t,n){t=t??1,e=e??"";let o=bRe(this,e,t,n).fetchArrayBuffer();if(!l(o))return;let r=this._tileInfo,a=this.key;return o.then(function(s){return xRe.scheduleTask({buffer:s,quadKey:e,type:"Metadata",key:a},[s]).then(function(u){let f,d=-1;if(e!==""){d=e.length+1;let m=u[e];f=r[e],f._bits|=m._bits,delete u[e]}let p=Object.keys(u);p.sort(function(m,A){return m.length-A.length});let g=p.length;for(let m=0;m<g;++m){let A=p[m];if(u[A]!==null){let x=lV.clone(u[A]),b=A.length;if(b===d)x.setParent(f);else if(b>1){let C=r[A.substring(0,A.length-1)];x.setParent(C)}r[A]=x}else r[A]=null}})})};sd.prototype.populateSubtree=function(e,t,n,i){let o=sd.tileXYToQuadKey(e,t,n);return yie(this,o,i)};function yie(e,t,n){let i=e._tileInfo,o=t,r=i[o];if(l(r)&&(!r.hasSubtree()||r.hasChildren()))return r;for(;r===void 0&&o.length>1;)o=o.substring(0,o.length-1),r=i[o];let a,s=e._subtreePromises,c=s[o];if(l(c))return c.then(function(){return a=new _r({throttle:n.throttle,throttleByServer:n.throttleByServer,type:n.type,priorityFunction:n.priorityFunction}),yie(e,t,a)});if(!l(r)||!r.hasSubtree())return Promise.reject(new re(`Couldn't load metadata for tile ${t}`));if(c=e.getQuadTreePacket(o,r.cnodeVersion,n),!!l(c))return s[o]=c,c.then(function(){return a=new _r({throttle:n.throttle,throttleByServer:n.throttleByServer,type:n.type,priorityFunction:n.priorityFunction}),yie(e,t,a)}).finally(function(){delete s[o]})}sd.prototype.getTileInformation=function(e,t,n){let i=sd.tileXYToQuadKey(e,t,n);return this._tileInfo[i]};sd.prototype.getTileInformationFromQuadKey=function(e){return this._tileInfo[e]};function bRe(e,t,n,i){return e._resource.getDerivedResource({url:`flatfile?q2-0${t}-q.${n.toString()}`,request:i})}var _ie,Aie;function PLt(e){let t=e._resource.getDerivedResource({url:"dbRoot.v5",queryParameters:{output:"proto"}});if(!l(Aie)){let n=Xt("ThirdParty/google-earth-dbroot-parser.js"),i=window.cesiumGoogleEarthDbRootParser;Aie=dx(n).then(function(){_ie=window.cesiumGoogleEarthDbRootParser(wLt),l(i)?window.cesiumGoogleEarthDbRootParser=i:delete window.cesiumGoogleEarthDbRootParser})}return Aie.then(function(){return t.fetchArrayBuffer()}).then(function(n){let i=_ie.EncryptedDbRootProto.decode(new Uint8Array(n)),o=i.encryptionData,r=o.byteOffset,a=r+o.byteLength,s=e.key=o.buffer.slice(r,a);o=i.dbrootData,r=o.byteOffset,a=r+o.byteLength;let c=o.buffer.slice(r,a);return xRe.scheduleTask({buffer:c,type:"DbRoot",key:s},[c])}).then(function(n){let i=_ie.DbRootProto.decode(new Uint8Array(n.buffer));if(e.imageryPresent=i.imageryPresent??e.imageryPresent,e.protoImagery=i.protoImagery,e.terrainPresent=i.terrainPresent??e.terrainPresent,l(i.endSnippet)&&l(i.endSnippet.model)){let s=i.endSnippet.model;e.negativeAltitudeExponentBias=s.negativeAltitudeExponentBias??e.negativeAltitudeExponentBias,e.negativeAltitudeThreshold=s.compressedNegativeAltitudeThreshold??e.negativeAltitudeThreshold}l(i.databaseVersion)&&(e._quadPacketVersion=i.databaseVersion.quadtreeVersion??e._quadPacketVersion);let o=e.providers,r=i.providerInfo??[],a=r.length;for(let s=0;s<a;++s){let c=r[s],u=c.copyrightString;l(u)&&(o[c.providerId]=new yt(u.value))}}).catch(function(){console.log(`Failed to retrieve ${t.url}. Using defaults.`),e.key=DLt})}var M_=sd;var CRe=Yr(gie(),1);function xie(){this._image=new Image}xie.prototype.isReady=function(){return!0};xie.prototype.shouldDiscardImage=function(e){return e===this._image};function jT(e){e=e??G.EMPTY_OBJECT,this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._tileDiscardPolicy=e.tileDiscardPolicy,this._tilingScheme=new Wi({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new oe(-D.PI,-D.PI,D.PI,D.PI),ellipsoid:e.ellipsoid});let t=e.credit;typeof t=="string"&&(t=new yt(t)),this._credit=t,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=23,l(this._tileDiscardPolicy)||(this._tileDiscardPolicy=new xie),this._errorEvent=new ye}Object.defineProperties(jT.prototype,{url:{get:function(){return this._metadata.url}},proxy:{get:function(){return this._metadata.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!1}}});jT.fromMetadata=function(e,t){if(!e.imageryPresent)throw new re(`The server ${e.url} doesn't have imagery`);let n=new jT(t);return n._metadata=e,n};jT.prototype.getTileCredits=function(e,t,n){let i=this._metadata,o=i.getTileInformation(e,t,n);if(l(o)){let r=i.providers[o.imageryProvider];if(l(r))return[r]}};jT.prototype.requestImage=function(e,t,n,i){let o=this._tileDiscardPolicy._image,r=this._metadata,a=M_.tileXYToQuadKey(e,t,n),s=r.getTileInformation(e,t,n);if(!l(s)){if(r.isValid(a)){let u=new _r({throttle:i.throttle,throttleByServer:i.throttleByServer,type:i.type,priorityFunction:i.priorityFunction});r.populateSubtree(e,t,n,u);return}return Promise.resolve(o)}if(!s.hasImagery())return Promise.resolve(o);let c=RLt(this,s,e,t,n,i).fetchArrayBuffer();if(l(c))return c.then(function(u){sV(r.key,u);let f=new Uint8Array(u),d,p=r.protoImagery;if((!l(p)||!p)&&(d=OLt(f)),!l(d)&&(!l(p)||p)){let g=MLt(f);d=g.imageType,f=g.imageData}return!l(d)||!l(f)?o:lg({uint8Array:f,format:d,flipY:!0})})};jT.prototype.pickFeatures=function(e,t,n,i,o){};function RLt(e,t,n,i,o,r){let a=M_.tileXYToQuadKey(n,i,o),s=t.imageryVersion;return s=l(s)&&s>0?s:1,e._metadata.resource.getDerivedResource({url:`flatfile?f1-0${a}-i.${s.toString()}`,request:r})}function OLt(e){let t="JFIF";if(e[6]===t.charCodeAt(0)&&e[7]===t.charCodeAt(1)&&e[8]===t.charCodeAt(2)&&e[9]===t.charCodeAt(3))return"image/jpeg";let n="PNG";if(e[1]===n.charCodeAt(0)&&e[2]===n.charCodeAt(1)&&e[3]===n.charCodeAt(2))return"image/png"}function MLt(e){let t=CRe.Reader.create(e),n=t.len,i={};for(;t.pos<n;){let a=t.uint32(),s;switch(a>>>3){case 1:i.imageType=t.uint32();break;case 2:i.imageData=t.bytes();break;case 3:i.alphaType=t.uint32();break;case 4:i.imageAlpha=t.bytes();break;case 5:if(s=i.copyrightIds,l(s)||(s=i.copyrightIds=[]),(a&7)===2){let c=t.uint32()+t.pos;for(;t.pos<c;)s.push(t.uint32())}else s.push(t.uint32());break;default:t.skipType(a&7);break}}let o=i.imageType;if(l(o))switch(o){case 0:i.imageType="image/jpeg";break;case 4:i.imageType="image/png";break;default:throw new re("GoogleEarthEnterpriseImageryProvider: Unsupported image type.")}let r=i.alphaType;return l(r)&&r!==0&&(console.log("GoogleEarthEnterpriseImageryProvider: External alpha not supported."),delete i.alphaType,delete i.imageAlpha),i}var bie=jT;var BLt=600;function T0(e){e=e??G.EMPTY_OBJECT,this._key=l(e.key)?e.key:ps.defaultApiKey,this._baseResource=De.createIfNeeded(e.url??ps.streetViewStaticApiEndpoint),this._metadataResource=this._baseResource.getDerivedResource({url:"streetview/metadata"}),this._tileSize=e.tileSize??BLt}Object.defineProperties(T0.prototype,{});T0.prototype.loadPanorama=async function(e){let t=e.cartographic,n=e.tileSize??this._tileSize,i=`${n}x${n}`,o=e.signature,{panoId:r}=e;l(r)||(r=(await this.getNearestPanoId(t)).panoId);let a=ps.getDefaultCredit(),s=h.fromDegrees(D.toDegrees(t.longitude),D.toDegrees(t.latitude),0),c=[this._loadFaceImage({heading:0,pitch:0,tileSizeString:i,panoId:r,signature:o}),this._loadFaceImage({heading:180,pitch:0,tileSizeString:i,panoId:r,signature:o}),this._loadFaceImage({heading:-90,pitch:-90,tileSizeString:i,panoId:r,signature:o}),this._loadFaceImage({heading:-90,pitch:90,tileSizeString:i,panoId:r,signature:o}),this._loadFaceImage({heading:270,pitch:0,tileSizeString:i,panoId:r,signature:o}),this._loadFaceImage({heading:90,pitch:0,tileSizeString:i,panoId:r,signature:o})],[u,f,d,p,g,m]=await Promise.all(c),A=pt.localFrameToFixedFrameGenerator("north","down"),y=M.getMatrix3(A(s,te.default),new $);return new LT({sources:{positiveX:u,negativeX:f,positiveY:d,negativeY:p,positiveZ:g,negativeZ:m},transform:y,credit:a})};T0.prototype.getNearestPanoId=async function(e,t){let i=[D.toDegrees(e.latitude),D.toDegrees(e.longitude)].join(","),r=await this._metadataResource.getDerivedResource({queryParameters:{key:this._key,location:i,radius:t??50}}).fetchJson();if(r.status!=="OK")throw new _e(`GoogleStreetViewCubeMapPanoramaProvider metadata error: ${r.status}`);return{panoId:r.pano_id,latitude:r.location.lat,longitude:r.location.lng}};T0.prototype.getPanoIdMetadata=async function(e){let n=await this._metadataResource.getDerivedResource({queryParameters:{key:this._key,pano:e}}).fetchJson();if(n.status!=="OK")throw new _e(`GoogleStreetViewCubeMapPanoramaProvider metadata error: ${n.status}`);return n};T0.prototype._loadFaceImage=async function(e){let t=this._buildFaceUrl(e);try{return await De.fetchImage({url:t,preferImageBitmap:!0,flipY:!0})}catch{throw new _e(`Failed to load Street View face image: ${t}`)}};T0.prototype._buildFaceUrl=function(e){let{heading:t,pitch:n,tileSizeString:i,panoId:o,signature:r}=e;return this._baseResource.getDerivedResource({queryParameters:{size:i,pano:o,heading:t,pitch:n,key:this._key,...l(r)&&{signature:r}}}).url};T0.fromUrl=async function(e){if(e=e??{},e.key=e.key??ps.defaultStreetViewStaticApiKey??ps.defaultApiKey,!l(e.key)&&!l(ps.defaultStreetViewStaticApiKey)&&!l(ps.defaultApiKey))throw new _e("options.key, GoogleMaps.defaultStreetViewStaticApiKey or GoogleMaps.defaultApiKey is required.");return new T0({...e})};T0._parseMetadata=function(e){return{cartographic:de.fromDegrees(e.location.lng,e.location.lat,0)}};var Cie=T0;var LLt=new V(1,1,1,.4),NLt=new V(0,1,0,.05),FLt=new V(0,.5,0,.2);function GT(e){e=e??G.EMPTY_OBJECT,this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._tilingScheme=l(e.tilingScheme)?e.tilingScheme:new Wi({ellipsoid:e.ellipsoid}),this._cells=e.cells??8,this._color=e.color??LLt,this._glowColor=e.glowColor??NLt,this._glowWidth=e.glowWidth??6,this._backgroundColor=e.backgroundColor??FLt,this._errorEvent=new ye,this._tileWidth=e.tileWidth??256,this._tileHeight=e.tileHeight??256,this._canvasSize=e.canvasSize??256,this._canvas=this._createGridCanvas()}Object.defineProperties(GT.prototype,{proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){}},minimumLevel:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}}});GT.prototype._drawGrid=function(e){let n=this._canvasSize;for(let i=0;i<=this._cells;++i){let r=1+i/this._cells*(n-1);e.moveTo(r,0),e.lineTo(r,n),e.moveTo(0,r),e.lineTo(n,r)}e.stroke()};GT.prototype._createGridCanvas=function(){let e=document.createElement("canvas");e.width=this._canvasSize,e.height=this._canvasSize;let t=0,n=this._canvasSize,i=e.getContext("2d"),o=this._backgroundColor.toCssColorString();i.fillStyle=o,i.fillRect(t,t,n,n);let r=this._glowColor.toCssColorString();i.strokeStyle=r,i.lineWidth=this._glowWidth,i.strokeRect(t,t,n,n),this._drawGrid(i),i.lineWidth=this._glowWidth*.5,i.strokeRect(t,t,n,n),this._drawGrid(i);let a=this._color.toCssColorString();return i.strokeStyle=a,i.lineWidth=2,i.strokeRect(t,t,n,n),i.lineWidth=1,this._drawGrid(i),e};GT.prototype.getTileCredits=function(e,t,n){};GT.prototype.requestImage=function(e,t,n,i){return Promise.resolve(this._canvas)};GT.prototype.pickFeatures=function(e,t,n,i,o){};var Tie=GT;function Qm(){}Qm._maxDecodingConcurrency=Math.max(sn.hardwareConcurrency-1,1);Qm._decodeTaskProcessor=new Gn("decodeI3S",Qm._maxDecodingConcurrency);Qm._promise=void 0;async function kLt(){if(await Qm._decodeTaskProcessor.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/draco_decoder.wasm"}))return Qm._decodeTaskProcessor;throw new re("I3S decoder could not be initialized.")}Qm.decode=async function(e,t,n,i,o){return l(Qm._promise)||(Qm._promise=kLt()),Qm._promise.then(function(r){let a=n._parent._data,s=n._parent._inverseRotationMatrix,c=0,u=0,f=0;l(a.obb)?(c=a.obb.center[0],u=a.obb.center[1],f=a.obb.center[2]):l(a.mbs)&&(c=a.mbs[0],u=a.mbs[1],f=a.mbs[2]);let d=$.fromRotationX(-D.PI_OVER_TWO),p=new $;$.multiply(d,s,p);let g=de.fromDegrees(c,u,f),m=te.WGS84.cartographicToCartesian(g),A={binaryData:n._data,featureData:l(i)&&l(i[0])?i[0].data:void 0,schema:t,bufferInfo:n._geometryBufferInfo,ellipsoidRadiiSquare:te.WGS84.radiiSquared,url:e,geoidDataList:n._dataProvider._geoidDataList,cartographicCenter:g,cartesianCenter:m,parentRotation:p,enableFeatures:n._dataProvider.showFeatures,splitGeometryByColorTransparency:n._dataProvider.adjustMaterialAlphaMode,symbologyData:o,calculateNormals:n._dataProvider.calculateNormals};return r.scheduleTask(A)})};var uV=Qm;function Eie(e,t){this._parent=e,this._dataProvider=e._dataProvider,this._layer=e._layer,l(this._parent._nodeIndex)?this._resource=this._parent._layer.resource.getDerivedResource({url:`nodes/${this._parent._data.mesh.attribute.resource}/${t}`}):this._resource=this._parent.resource.getDerivedResource({url:t})}Object.defineProperties(Eie.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}}});Eie.prototype.load=async function(){return this._data=await $m.loadJson(this._resource),this._data};var fV=Eie;function B_(e,t){this._storageInfo=t,this._parent=e,this._dataProvider=e._dataProvider,this._loadPromise=void 0;let n=`attributes/${t.key}/0`;l(this._parent._nodeIndex)?this._resource=this._parent._layer.resource.getDerivedResource({url:`nodes/${this._parent._data.mesh.attribute.resource}/${n}`}):this._resource=this._parent.resource.getDerivedResource({url:n})}Object.defineProperties(B_.prototype,{resource:{get:function(){return this._resource}},header:{get:function(){return this._header}},values:{get:function(){if(l(this._values)){if(l(this._values.attributeValues))return this._values.attributeValues;if(l(this._values.objectIds))return this._values.objectIds}return[]}},name:{get:function(){return this._storageInfo.name}}});function K5(e){return e==="UInt8"||e==="Int8"?1:e==="UInt16"||e==="Int16"?2:e==="UInt32"||e==="Int32"||e==="Oid32"||e==="Float32"?4:e==="UInt64"||e==="Int64"||e==="Float64"?8:0}function zLt(e){return e==="String"?1:K5(e)}async function ULt(e){let t=await e._dataProvider._loadBinary(e._resource),n=new DataView(t);e._data=t,e._validateHeader(n);let i=e._parseHeader(n),o=e._getBodyOffset(i);e._validateBody(n,o),e._parseBody(n,o)}B_.prototype.load=function(){return l(this._loadPromise)?this._loadPromise:(this._loadPromise=ULt(this).catch(function(e){console.error(e)}),this._loadPromise)};B_.prototype._parseValue=function(e,t,n){let i;if(t==="UInt8")i=e.getUint8(n),n+=1;else if(t==="Int8")i=e.getInt8(n),n+=1;else if(t==="UInt16")i=e.getUint16(n,!0),n+=2;else if(t==="Int16")i=e.getInt16(n,!0),n+=2;else if(t==="UInt32")i=e.getUint32(n,!0),n+=4;else if(t==="Oid32")i=e.getUint32(n,!0),n+=4;else if(t==="Int32")i=e.getInt32(n,!0),n+=4;else if(t==="UInt64"){let o=e.getUint32(n,!0),r=e.getUint32(n+4,!0);i=o+Math.pow(2,32)*r,n+=8}else if(t==="Int64"){let o=e.getUint32(n,!0),r=e.getUint32(n+4,!0);r<Math.pow(2,31)?i=o+Math.pow(2,32)*r:i=o+Math.pow(2,32)*(r-Math.pow(2,32)),n+=8}else t==="Float32"?(i=e.getFloat32(n,!0),n+=4):t==="Float64"?(i=e.getFloat64(n,!0),n+=8):t==="String"&&(i=String.fromCharCode(e.getUint8(n)),n+=1);return{value:i,offset:n}};B_.prototype._parseHeader=function(e){let t=0;this._header={};for(let n=0;n<this._storageInfo.header.length;n++){let i=this._storageInfo.header[n],o=this._parseValue(e,i.valueType,t);this._header[i.property]=o.value,t=o.offset}return t};B_.prototype._parseBody=function(e,t){this._values={};for(let n=0;n<this._storageInfo.ordering.length;n++){let i=this._storageInfo.ordering[n],o=i==="ObjectIds"?"objectIds":i,r=this._storageInfo[o];if(l(r)){this._values[o]=[];for(let a=0;a<this._header.count;++a)if(r.valueType!=="String"){let s=this._parseValue(e,r.valueType,t);this._values[o].push(s.value),t=s.offset}else{let s=this._values.attributeByteCounts[a],c="";for(let u=0;u<s;++u){let f=this._parseValue(e,r.valueType,t);f.value.charCodeAt(0)!==0&&(c+=f.value),t=f.offset}this._values[o].push(c)}}}};B_.prototype._getBodyOffset=function(e){let t=0;return l(this._storageInfo.attributeValues)?t=K5(this._storageInfo.attributeValues.valueType):l(this._storageInfo.objectIds)&&(t=K5(this._storageInfo.objectIds.valueType)),t>0?Math.ceil(e/t)*t:e};B_.prototype._validateHeader=function(e){let t=0;for(let n=0;n<this._storageInfo.header.length;n++){let i=this._storageInfo.header[n];t+=zLt(i.valueType)}if(e.byteLength<t)throw new re(`Invalid attribute buffer size (field: ${this.name}, header: ${t}, actual: ${e.byteLength})`)};B_.prototype._validateBody=function(e,t){if(!l(this._header.count))throw new re(`Invalid attribute buffer (field: ${this.name}, count is missing)`);let n;for(let i=0;i<this._storageInfo.ordering.length&&t<e.byteLength;i++){let o=this._storageInfo.ordering[i],r=o==="ObjectIds"?"objectIds":o,a=this._storageInfo[r];if(l(a))if(a.valueType!=="String"){r==="attributeByteCounts"&&(n=t);let s=K5(a.valueType);t+=s*this._header.count}else{if(!l(n))throw new re(`Invalid attribute buffer (field: ${this.name}, attributeByteCounts is missing)`);for(let s=0;s<this._header.count&&t<e.byteLength;++s){let c=this._parseValue(e,this._storageInfo.attributeByteCounts.valueType,n);t+=c.value,n=c.offset}}else throw new re(`Invalid attribute buffer (field: ${this.name}, ${r} is missing)`)}if(e.byteLength<t)throw new re(`Invalid attribute buffer size (field: ${this.name}, expected: ${t}, actual: ${e.byteLength})`)};var dV=B_;function VLt(e){return e<=.04045?e*.07739938080495357:Math.pow((e+.055)*.9478672985781991,2.4)}var HT=VLt;function hV(e,t){let n=e._dataProvider,i=e._layer,o;l(e._nodeIndex)?o=i.resource.getDerivedResource({url:`nodes/${e._data.mesh.geometry.resource}/${t}`}):o=e.resource.getDerivedResource({url:t}),this._parent=e,this._dataProvider=n,this._layer=i,this._resource=o,this._customAttributes=void 0}Object.defineProperties(hV.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}},customAttributes:{get:function(){return this._customAttributes}}});hV.prototype.load=function(){let e=this;return this._dataProvider._loadBinary(this._resource).then(function(t){return e._data=t,t})};var jLt=new h,GLt=new h,HLt=new h,WLt=new h,qLt=new h;function vie(e,t,n,i){let o=h.subtract(i,n,jLt),r=h.cross(o,h.subtract(e,n,GLt),WLt),a=h.cross(o,h.subtract(t,n,HLt),qLt);return h.dot(r,a)>=0}var YLt=new h,XLt=new h,KLt=new h,QLt=new h,$Lt=new h,JLt=new h,ZLt=new h,eNt=new h,tNt=new h,nNt=new h;hV.prototype.getClosestPointIndexOnTriangle=function(e,t,n){if(l(this._customAttributes)&&l(this._customAttributes.positions)){let i=new h(e,t,n);i.x-=this._customAttributes.cartesianCenter.x,i.y-=this._customAttributes.cartesianCenter.y,i.z-=this._customAttributes.cartesianCenter.z,$.multiplyByVector(this._customAttributes.parentRotation,i,i);let o=Number.MAX_VALUE,r,a,s,c,u=this._customAttributes.positions,f=this._customAttributes.indices,d;l(f)?d=f.length:d=u.length/3;for(let p=0;p<d;p++){let g,m,A;l(f)?(g=f[p],m=f[p+1],A=f[p+2]):(g=p*3,m=p*3+1,A=p*3+2);let y=h.fromElements(u[g*3],u[g*3+1],u[g*3+2],YLt),x=h.fromElements(u[m*3],u[m*3+1],u[m*3+2],XLt),b=new h(u[A*3],u[A*3+1],u[A*3+2],KLt);if(!vie(i,y,x,b)||!vie(i,x,y,b)||!vie(i,b,y,x))continue;let C=h.subtract(x,y,QLt),E=h.subtract(b,y,$Lt),S=h.cross(C,E,JLt);if(h.magnitude(S)===0)continue;let w=h.normalize(S,ZLt),P=h.subtract(i,y,eNt),R=Math.abs(h.dot(P,w));if(R<o){o=R,r=p;let B=h.magnitudeSquared(h.subtract(i,y,P)),L=h.magnitudeSquared(h.subtract(i,x,tNt)),_=h.magnitudeSquared(h.subtract(i,b,nNt));B<L&&B<_?(s=g,c=y,a=B):L<_?(s=m,c=x,a=L):(s=A,c=b,a=_)}}if(l(r))return{index:s,distanceSquared:a,distance:Math.sqrt(a),queriedPosition:i,closestPosition:h.clone(c)}}return{index:-1,distanceSquared:Number.Infinity,distance:Number.Infinity}};function TRe(e){let t=[],n=e.length;for(let i=0;i<n;i++)i<3?t.push(HT(e[i])):t.push(e[i]);return t}hV.prototype._generateGltf=function(e,t,n,i,o,r,a,s){let c={pbrMetallicRoughness:{metallicFactor:0},doubleSided:!0,name:"Material"},u=!1,f,d="";if(l(this._parent._data.mesh)&&l(this._layer._data.materialDefinitions)){let C=this._parent._data.mesh.material.definition;if(C>=0&&C<this._layer._data.materialDefinitions.length){if(f=this._layer._data.materialDefinitions[C],c=f,l(c.pbrMetallicRoughness)&&l(c.pbrMetallicRoughness.baseColorTexture)){u=!0,c.pbrMetallicRoughness.baseColorTexture.index=0;let E="0";if(l(this._layer._data.textureSetDefinitions))for(let S=0;S<this._layer._data.textureSetDefinitions.length;S++){let w=this._layer._data.textureSetDefinitions[S];for(let P=0;P<w.formats.length;P++){let R=w.formats[P];if(R.format==="jpg"){E=R.name;break}}}l(this._parent._data.mesh)&&this._parent._data.mesh.material.resource>=0&&(d=this._layer.resource.getDerivedResource({url:`nodes/${this._parent._data.mesh.material.resource}/textures/${E}`}).url)}l(c.pbrMetallicRoughness)&&l(c.pbrMetallicRoughness.baseColorFactor)&&(c.pbrMetallicRoughness.baseColorFactor=TRe(c.pbrMetallicRoughness.baseColorFactor)),l(c.emissiveFactor)&&(c.emissiveFactor=TRe(c.emissiveFactor))}}else l(this._parent._data.textureData)&&(u=!0,d=this._parent.resource.getDerivedResource({url:`${this._parent._data.textureData[0].href}`}).url,c.pbrMetallicRoughness.baseColorTexture={index:0});l(c.alphaMode)&&(c.alphaMode=c.alphaMode.toUpperCase());let p=[],g=[],m=[];u&&(p=[{sampler:0,source:0}],g=[{uri:d}],m=[{magFilter:9729,minFilter:9986,wrapS:10497,wrapT:10497}]);let A=[],y=n.length;for(let b=0;b<y;b++){let C=n[b].primitives,E=C.length;for(let S=0;S<E;S++){let w=C[S];if(l(w.material)){for(;w.material>=A.length;){let R=We(c,!0);A.push(R)}let P=A[w.material];l(w.extra)&&w.extra.isTransparent?l(P.alphaMode)||(P.alphaMode="BLEND"):P.alphaMode==="BLEND"&&(P.alphaMode="OPAQUE")}}}return{scene:0,scenes:[{nodes:e}],nodes:t,meshes:n,buffers:i,bufferViews:o,accessors:r,materials:A,textures:p,images:g,samplers:m,asset:{version:"2.0"},extensions:a,extensionsUsed:s}};var CI=hV;function El(e,t,n){let i,o,r,a;n?(i=0,o=e):(i=e._level+1,o=e._layer),typeof t=="number"?r=t:a=e.resource.getDerivedResource({url:`${t}/`}),this._parent=e,this._dataProvider=e._dataProvider,this._isRoot=n,this._level=i,this._layer=o,this._nodeIndex=r,this._resource=a,this._isLoading=!1,this._tile=void 0,this._data=void 0,this._geometryData=[],this._featureData=[],this._fields={},this._children=[],this._childrenReadyPromise=void 0,this._globalTransform=void 0,this._inverseGlobalTransform=void 0,this._inverseRotationMatrix=void 0,this._symbologyData=void 0}Object.defineProperties(El.prototype,{resource:{get:function(){return this._resource}},layer:{get:function(){return this._layer}},parent:{get:function(){return this._parent}},children:{get:function(){return this._children}},geometryData:{get:function(){return this._geometryData}},featureData:{get:function(){return this._featureData}},fields:{get:function(){return this._fields}},tile:{get:function(){return this._tile}},data:{get:function(){return this._data}}});El.prototype.load=async function(){let e=this;function t(){if(!e._isRoot){let o=e._create3DTileDefinition();e._tile=new Yd(e._layer._tileset,e._dataProvider.resource,o,e._parent._tile),e._tile._i3sNode=e}}if(!l(this._nodeIndex)){let o=await $m.loadJson(this._resource);e._data=o,t();return}let n=await this._layer._getNodeInNodePages(this._nodeIndex);e._data=n;let i;e._isRoot?i="nodes/root/":l(n.mesh)&&(i=`../${n.mesh.geometry.resource}/`),l(i)&&l(e._parent.resource)&&(e._resource=e._parent.resource.getDerivedResource({url:i})),t()};function ERe(e,t){let n=new dV(e,t);return e._fields[t.name]=n,n.load()}El.prototype.loadFields=function(){let e=this._layer._data.attributeStorageInfo,t=[];if(l(e))for(let n=0;n<e.length;n++){let i=e[n],o=this._fields[i.name];l(o)?t.push(o.load()):t.push(ERe(this,i))}return Promise.all(t)};El.prototype.loadField=function(e){let t=this._fields[e];if(l(t))return t.load();let n=this._layer._data.attributeStorageInfo;if(l(n))for(let i=0;i<n.length;i++){let o=n[i];if(o.name===e)return ERe(this,o)}return Promise.resolve()};El.prototype.getFieldsForPickedPosition=function(e){let t=this.geometryData[0];if(!l(t.customAttributes.featureIndex))return{};let n=t.getClosestPointIndexOnTriangle(e.x,e.y,e.z);if(n.index===-1||n.index>t.customAttributes.featureIndex.length)return{};let i=t.customAttributes.featureIndex[n.index];return this.getFieldsForFeature(i)};El.prototype.getFieldsForFeature=function(e){let t={};for(let n in this.fields)if(this.fields.hasOwnProperty(n)){let i=this.fields[n];e>=0&&e<i.values.length&&(t[i.name]=i.values[e])}return t};El.prototype._loadChildren=function(){let e=this;if(l(this._childrenReadyPromise))return this._childrenReadyPromise;let t=[];if(l(e._data.children))for(let n=0;n<e._data.children.length;n++){let i=e._data.children[n],o=new El(e,i.href??i,!1);e._children.push(o),t.push(o.load())}return this._childrenReadyPromise=Promise.all(t).then(function(){for(let n=0;n<e._children.length;n++)e._tile.children.push(e._children[n]._tile)}),this._childrenReadyPromise};El.prototype._loadGeometryData=function(){let e=[];if(l(this._data.geometryData))for(let t=0;t<this._data.geometryData.length;t++){let n=new CI(this,this._data.geometryData[t].href);this._geometryData.push(n),e.push(n.load())}else if(l(this._data.mesh)){let t=this._layer._findBestGeometryBuffers(this._data.mesh.geometry.definition,["position","uv0"]),n=`./geometries/${t.bufferIndex}/`,i=new CI(this,n);i._geometryDefinitions=t.definition,i._geometryBufferInfo=t.geometryBufferInfo,this._geometryData.push(i),e.push(i.load())}return Promise.all(e)};El.prototype._loadFeatureData=function(){let e=[];if(l(this._data.featureData))for(let t=0;t<this._data.featureData.length;t++){let n=new fV(this,this._data.featureData[t].href);this._featureData.push(n),e.push(n.load())}return Promise.all(e)};El.prototype._clearGeometryData=function(){this._geometryData=[]};El.prototype._create3DTileDefinition=function(){let e=this._data.obb,t=this._data.mbs;if(!l(e)&&!l(t)){console.error("Failed to load I3S node. Bounding volume is required.");return}let n;if(l(e)?n=de.fromDegrees(e.center[0],e.center[1],e.center[2]):n=de.fromDegrees(t[0],t[1],t[2]),l(this._dataProvider._geoidDataList)&&l(n))for(let x=0;x<this._dataProvider._geoidDataList.length;x++){let b=this._dataProvider._geoidDataList[x],C=b.projection.project(n);if(C.x>b.nativeExtent.west&&C.x<b.nativeExtent.east&&C.y>b.nativeExtent.south&&C.y<b.nativeExtent.north){n.height+=aNt(C.x,C.y,b);break}}let i={},o,r=0;l(e)?(i={box:[0,0,0,e.halfSize[0],0,0,0,e.halfSize[1],0,0,0,e.halfSize[2]]},r=Math.max(Math.max(this._data.obb.halfSize[0],this._data.obb.halfSize[1]),this._data.obb.halfSize[2]),o=te.WGS84.cartographicToCartesian(n)):(i={sphere:[0,0,0,t[3]]},o=te.WGS84.cartographicToCartesian(n),r=this._data.mbs[3]),r*=2;let a=1/0;if(l(this._data.lodThreshold))if(this._layer._data.nodePages.lodSelectionMetricType==="maxScreenThresholdSQ"){let x=Math.sqrt(this._data.lodThreshold/(Math.PI*.25));a=r/x}else if(this._layer._data.nodePages.lodSelectionMetricType==="maxScreenThreshold"){let x=this._data.lodThreshold;a=r/x}else console.error("Invalid lodSelectionMetricType in Layer");else if(l(this._data.lodSelection))for(let x=0;x<this._data.lodSelection.length;x++)this._data.lodSelection[x].metricType==="maxScreenThreshold"&&(a=r/this._data.lodSelection[x].maxError);a===1/0&&(a=1e5);let s=a*16,c=new Tc(0,0,0),u=pt.headingPitchRollQuaternion(o,c);l(this._data.obb)&&(u=new Le(this._data.obb.quaternion[0],this._data.obb.quaternion[1],this._data.obb.quaternion[2],this._data.obb.quaternion[3]));let f=$.fromQuaternion(u),d=$.inverse(f,new $),p=new M(f[0],f[1],f[2],0,f[3],f[4],f[5],0,f[6],f[7],f[8],0,o.x,o.y,o.z,1),g=M.inverse(p,new M),m=M.clone(p);l(this._parent._globalTransform)&&M.multiply(p,this._parent._inverseGlobalTransform,m),this._globalTransform=p,this._inverseGlobalTransform=g,this._inverseRotationMatrix=d;let A=[];for(let x=0;x<this._children.length;x++)A.push(this._children[x]._create3DTileDefinition());return{children:A,refine:"REPLACE",boundingVolume:i,transform:[m[0],m[4],m[8],m[12],m[1],m[5],m[9],m[13],m[2],m[6],m[10],m[14],m[3],m[7],m[11],m[15]],content:{uri:l(this._resource)?this._resource.url:void 0},geometricError:s}};El.prototype._loadSymbology=async function(){!l(this._symbologyData)&&l(this._layer._symbology)&&(this._symbologyData=await this._layer._symbology._getSymbology(this))};El.prototype._createContentURL=async function(){let e={scene:0,scenes:[{nodes:[0]}],nodes:[{name:"singleNode"}],meshes:[],buffers:[],bufferViews:[],accessors:[],materials:[],textures:[],images:[],samplers:[],asset:{version:"2.0"}},t=[this._loadGeometryData()];if(this._dataProvider.legacyVersion16&&t.push(this._loadFeatureData()),await Promise.all(t),l(this._geometryData)&&this._geometryData.length>0){this._dataProvider._applySymbology&&await this._loadSymbology();let o=this._geometryData[0].resource.url,r=this._layer._data.store.defaultGeometrySchema,a=this._geometryData[0],s=await uV.decode(o,r,a,this._featureData[0],this._symbologyData);if(!l(s))return;e=a._generateGltf(s.meshData.nodesInScene,s.meshData.nodes,s.meshData.meshes,s.meshData.buffers,s.meshData.bufferViews,s.meshData.accessors,s.meshData.rootExtensions,s.meshData.extensionsUsed),this._geometryData[0]._customAttributes=s.meshData._customAttributes}let n=this._dataProvider._binarizeGltf(e),i=new Blob([n],{type:"application/binary"});return URL.createObjectURL(i)};async function iNt(e){let t=e._layer._filters,n=[];for(let i=0;i<t.length;i++){let o=e.loadField(t[i].name);n.push(o)}return await Promise.all(n),t}function oNt(e,t,n){if(!l(n.values)||n.values.length===0)return!1;let i=l(t)?t.values:[],o;e<i.length&&(o=i[e]);let r=!1;for(let a=0;a<n.values.length;a++)if(n.values[a]===o){r=!0;break}return r}async function vRe(e,t){let n=e._tile.content.batchTable;if(l(n)&&n.featuresLength>0){n.setAllShow(!0);let i=await iNt(e);if(i.length>0)for(let o=0;o<n.featuresLength;o++)for(let r=0;r<i.length;r++){let a=i[r];if(!oNt(o,e._fields[a.name],a)){n.setShow(o,!1);break}}}t.show=!0}El.prototype._filterFeatures=function(){let e=[];for(let n=0;n<this._children.length;n++){let i=this._children[n]._filterFeatures();e.push(i)}let t=this._tile?.content?._model;if(l(this._geometryData)&&this._geometryData.length>0&&l(t)&&t.ready){t.show=!1;let n=vRe(this,t);e.push(n)}return Promise.all(e)};Yd.prototype._hookedRequestContent=Yd.prototype.requestContent;Yd.prototype.requestContent=function(){if(!this.tileset._isI3STileSet)return this._hookedRequestContent();if(!this._isLoading){this._isLoading=!0;let e=this;return this._i3sNode._createContentURL().then(t=>{if(!l(t)){e._isLoading=!1;return}return e._contentResource=new De({url:t}),e._hookedRequestContent()}).then(t=>{let n=t?._model;return l(e._i3sNode._geometryData)&&e._i3sNode._geometryData.length>0&&l(n)&&(n.show=!1,n.readyEvent.addEventListener(()=>{vRe(e._i3sNode,n)})),e._isLoading=!1,t})}};function rNt(e,t,n,i,o,r){let a=n*(1-e)+i*e,s=o*(1-e)+r*e;return a*(1-t)+s*t}function Q5(e,t,n,i){let o=e+t*n;return i[o]}function aNt(e,t,n){let i=n.nativeExtent,o=(e-i.west)/(i.east-i.west)*(n.width-1),r=(t-i.south)/(i.north-i.south)*(n.height-1),a=Math.floor(o),s=Math.floor(r);o-=a,r-=s;let c=a<n.width?a+1:a,u=s<n.height?s+1:s;s=n.height-1-s,u=n.height-1-u;let f=Q5(a,s,n.width,n.buffer),d=Q5(c,s,n.width,n.buffer),p=Q5(a,u,n.width,n.buffer),g=Q5(c,u,n.width,n.buffer),m=rNt(o,r,f,d,p,g);return m=m*n.scale+n.offset,m}Object.defineProperties(Yd.prototype,{i3sNode:{get:function(){return this._i3sNode}}});var TI=El;function $5(e){this._layer=e,this._defaultSymbology=void 0,this._valueFields=[],this._uniqueValueHash=void 0,this._classBreaksHash=void 0,this._parseLayerSymbology()}Object.defineProperties($5.prototype,{defaultSymbology:{get:function(){return this._defaultSymbology}}});function Sie(e,t){let n=[];for(let i=0;i<e.length;i++){let o=V.byteToFloat(e[i]);i<3?n.push(HT(o)):n.push(o)}return n.length===3&&(l(t)?n.push(1-t/100):n.push(1)),n}function EI(e,t){let n={edges:void 0,material:void 0};if(l(e)&&l(e.symbolLayers))for(let i=0;i<e.symbolLayers.length;i++){let o=e.symbolLayers[i];if(o.type==="Fill"){let r=o.edges,a=o.outline;if(l(r)?(n.edges={},l(r.color)&&(n.edges.color=Sie(r.color,r.transparency))):l(a)&&(n.edges={},l(a.color)&&(n.edges.color=Sie(a.color,a.transparency))),!t){let s=o.material;l(s)&&(n.material={colorMixMode:s.colorMixMode},l(s.color)&&(n.material.color=Sie(s.color,s.transparency)))}break}}return n}function sNt(e,t){if(l(e.uniqueValueGroups)){let n={};for(let i=0;i<e.uniqueValueGroups.length;i++){let o=e.uniqueValueGroups[i].classes;if(l(o))for(let r=0;r<o.length;r++){let a=EI(o[r].symbol,t),s=o[r].values;for(let c=0;c<s.length;c++){let u=s[c],f=n;for(let d=0;d<u.length;d++){let p=u[d];d===u.length-1?f[p]=a:(l(f[p])||(f[p]={}),f=f[p])}}}}return n}if(l(e.uniqueValueInfos)){let n={};for(let i=0;i<e.uniqueValueInfos.length;i++){let o=e.uniqueValueInfos[i];n[o.value]=EI(o.symbol,t)}return n}}function cNt(e,t){if(l(e.classBreakInfos)){let n=[...e.classBreakInfos];n.sort(function(o,r){let a=o.classMaxValue??o.classMinValue,s=r.classMaxValue??r.classMinValue;return a-s});let i={ranges:[],symbols:[]};l(e.minValue)&&(i.ranges.push(e.minValue),i.symbols.push(void 0));for(let o=0;o<n.length;o++){let r=n[o];l(r.classMinValue)&&(i.ranges.length===0||r.classMinValue>i.ranges[i.ranges.length-1])&&(i.ranges.push(r.classMinValue),i.symbols.push(void 0)),l(r.classMaxValue)&&(i.ranges.length===0||r.classMaxValue>i.ranges[i.ranges.length-1])&&(i.ranges.push(r.classMaxValue),i.symbols.push(EI(r.symbol,t)))}return i.symbols.push(void 0),i}}$5.prototype._parseLayerSymbology=function(){let e=this._layer.data.drawingInfo;if(l(e)&&l(e.renderer)){let t=this._layer.data.cachedDrawingInfo,n=l(t)&&t.color===!0,i=e.renderer;i.type==="simple"?this._defaultSymbology=EI(i.symbol,n):i.type==="uniqueValue"?(this._defaultSymbology=EI(i.defaultSymbol,n),this._valueFields.push(i.field1),l(i.field2)&&this._valueFields.push(i.field2),l(i.field3)&&this._valueFields.push(i.field3),this._uniqueValueHash=sNt(i,n)):i.type==="classBreaks"&&(this._defaultSymbology=EI(i.defaultSymbol,n),this._valueFields.push(i.field),this._classBreaksHash=cNt(i,n))}};function SRe(e,t,n,i){let o=t[n];if(i<o.length){let r=o[i],a=e[r];return l(a)&&++n<t.length?SRe(a,t,n,i):a}}function lNt(e,t){let n=0,i=e.length;if(n<i)do{let o=n+i>>>1;e[o]<t?n=o+1:i=o}while(n<i);return n}function uNt(e,t,n){let i=t[n],o=lNt(e.ranges,i);return e.symbols[o]}$5.prototype._getSymbology=async function(e){let t={default:this._defaultSymbology};if(this._valueFields.length>0){let n=[];for(let r=0;r<this._valueFields.length;r++)n.push(e.loadField(this._valueFields[r]));await Promise.all(n);let i=[];for(let r=0;r<this._valueFields.length;r++)i.push(e.fields[this._valueFields[r]].values);let o;if(l(this._uniqueValueHash)?o=r=>SRe(this._uniqueValueHash,i,0,r):l(this._classBreaksHash)&&(o=r=>uNt(this._classBreaksHash,i[0],r)),l(o)){let r=i[0];for(let a=0;a<r.length;a++){let s=o(a);l(s)&&(t[a]=s)}}}return t};var mV=$5;function of(e,t,n){this._dataProvider=e,this._parent=n,!l(t.href)&&l(t.id)&&(t.href=`layers/${t.id}`);let i=this._parent.resource.getUrlComponent(),o="";i.match(/layers\/\d/)?o=`${i}`.replace(/\/+$/,""):o=`${i}`.replace(/\/?$/,"/").concat(`${t.href}`),this._version=t.store.version;let r=this._version.split(".");this._majorVersion=parseInt(r[0]),this._minorVersion=r.length>1?parseInt(r[1]):0,this._resource=new De({url:o}),this._resource.setQueryParameters(this._dataProvider.resource.queryParameters),this._resource.appendForwardSlash(),this._data=t,this._rootNode=void 0,this._nodePages={},this._nodePageFetches={},this._extent=void 0,this._tileset=void 0,this._geometryDefinitions=void 0,this._filters=[],this._symbology=void 0,this._computeGeometryDefinitions(!0),this._computeExtent()}Object.defineProperties(of.prototype,{resource:{get:function(){return this._resource}},rootNode:{get:function(){return this._rootNode}},tileset:{get:function(){return this._tileset}},data:{get:function(){return this._data}},version:{get:function(){return this._version}},majorVersion:{get:function(){return this._majorVersion}},minorVersion:{get:function(){return this._minorVersion}},legacyVersion16:{get:function(){if(l(this.version))return this.majorVersion<1||this.majorVersion===1&&this.minorVersion<=6}}});of.prototype.load=async function(e){if(this._data.spatialReference.wkid!==4326)throw new re(`Unsupported spatial reference: ${this._data.spatialReference.wkid}`);if(this._dataProvider.applySymbology&&(this._symbology=new mV(this)),await this._dataProvider.loadGeoidData(),await this._loadRootNode(e),await this._create3DTileset(e),this._rootNode._tile=this._tileset._root,this._tileset._root._i3sNode=this._rootNode,this.legacyVersion16)return this._rootNode._loadChildren()};of.prototype._computeGeometryDefinitions=function(e){if(this._geometryDefinitions=[],l(this._data.geometryDefinitions))for(let t=0;t<this._data.geometryDefinitions.length;t++){let n=[],i=this._data.geometryDefinitions[t].geometryBuffers;for(let o=0;o<i.length;o++){let r=i[o],a=[],s=!1;if(l(r.compressedAttributes)&&e){s=!0;let c=r.compressedAttributes.attributes;for(let u=0;u<c.length;u++)a.push(c[u])}else for(let c in r)c!=="offset"&&a.push(c);n.push({compressed:s,attributes:a,index:i.indexOf(r)})}n.sort(function(o,r){return o.compressed&&!r.compressed?-1:!o.compressed&&r.compressed?1:o.attributes.length-r.attributes.length}),this._geometryDefinitions.push(n)}};of.prototype._findBestGeometryBuffers=function(e,t){let n=this._geometryDefinitions[e];if(l(n)){for(let i=0;i<n.length;++i){let o=n[i],r=!1,a=o.attributes;for(let s=0;s<t.length;s++)if(!a.includes(t[s])){r=!0;break}if(!r)return{bufferIndex:o.index,definition:n,geometryBufferInfo:o}}if(l(n[0]))return{bufferIndex:0,definition:n,geometryBufferInfo:n[0]}}};of.prototype._loadRootNode=function(e){if(l(this._data.nodePages)){let t=0;l(this._data.nodePages.rootIndex)&&(t=this._data.nodePages.rootIndex),this._rootNode=new TI(this,t,!0)}else this._rootNode=new TI(this,this._data.store.rootNode,!0);return this._rootNode.load(e)};of.prototype._getNodeInNodePages=function(e){let t=Math.floor(e/this._data.nodePages.nodesPerPage),n=e%this._data.nodePages.nodesPerPage;return this._loadNodePage(t).then(function(i){return i.nodes[n]})};of._fetchJson=function(e){return e.fetchJson()};of.prototype._loadNodePage=function(e){let t=this;if(!l(this._nodePageFetches[e])){let n=this.resource.getDerivedResource({url:`nodepages/${e}/`}),i=of._fetchJson(n).then(function(o){return l(o.error)&&o.error.code!==200?Promise.reject(o.error):(t._nodePages[e]=o.nodes,o)});this._nodePageFetches[e]=i}return this._nodePageFetches[e]};of.prototype._computeExtent=function(){l(this._data.fullExtent)?this._extent=oe.fromDegrees(this._data.fullExtent.xmin,this._data.fullExtent.ymin,this._data.fullExtent.xmax,this._data.fullExtent.ymax):l(this._data.store.extent)&&(this._extent=oe.fromDegrees(this._data.store.extent[0],this._data.store.extent[1],this._data.store.extent[2],this._data.store.extent[3]))};of.prototype._create3DTileset=async function(e){let t={asset:{version:"1.0"},geometricError:Number.MAX_VALUE,root:this._rootNode._create3DTileDefinition()},n=new Blob([JSON.stringify(t)],{type:"application/json"}),i=URL.createObjectURL(n),o=this._symbology?.defaultSymbology?.edges?.color;l(o)&&!l(e?.outlineColor)&&(e=l(e)?We(e):{},e.outlineColor=V.fromCartesian4(se.fromArray(o))),this._tileset=await xa.fromUrl(i,e),this._tileset.show=this._parent.show,this._tileset._isI3STileSet=!0,this._tileset.tileUnload.addEventListener(function(r){r._i3sNode._clearGeometryData(),URL.revokeObjectURL(r._contentResource._url),r._contentResource=r._i3sNode.resource}),this._tileset.tileVisible.addEventListener(function(r){l(r._i3sNode)&&r._i3sNode._loadChildren()})};of.prototype._updateVisibility=function(){l(this._tileset)&&(this._tileset.show=this._parent.show)};of.prototype.filterByAttributes=function(e){this._filters=l(e)?We(e,!0):[];let t=this._rootNode;return l(t)?t._filterFeatures():Promise.resolve()};var WT=of;function J5(e,t){this._dataProvider=e,this._resource=new De({url:t}),this._resource.setQueryParameters(e.resource.queryParameters),this._resource.appendForwardSlash()}Object.defineProperties(J5.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}},names:{get:function(){let e=[],t=this._data.summary;if(l(t))for(let n=0;n<t.length;++n)e.push(t[n].fieldName);return e}}});J5.prototype.load=async function(){return this._data=await $m.loadJson(this._resource),this._data};J5.prototype._getValues=function(e){let t=this._data.summary;if(l(t))for(let n=0;n<t.length;++n){let i=t[n];if(i.fieldName===e)return l(i.mostFrequentValues)?[...i.mostFrequentValues]:[]}};var pV=J5;function gV(e,t,n){this._dataProvider=e,this._parent=t,this._data=n,this._name=n.name,this._modelName=n.modelName,this._visibility=n.visibility??!0,this._resource=void 0,this._sublayers=[],this._i3sLayers=[]}Object.defineProperties(gV.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}},name:{get:function(){return this._name}},modelName:{get:function(){return this._modelName}},sublayers:{get:function(){return this._sublayers}},visibility:{get:function(){return this._visibility},set:function(e){if(this._visibility!==e){this._visibility=e;for(let t=0;t<this._i3sLayers.length;t++)this._i3sLayers[t]._updateVisibility()}}},show:{get:function(){return this._visibility&&this._parent.show}}});gV._fromData=async function(e,t,n,i){let o=new gV(e,i,n);if(o._data.layerType==="group"){let r=o._data.sublayers;if(l(r)){let a=[];for(let c=0;c<r.length;c++){let u=gV._fromData(e,t,r[c],o);a.push(u)}let s=await Promise.all(a);for(let c=0;c<s.length;c++){let u=s[c];o._sublayers.push(u),o._i3sLayers.push(...u._i3sLayers)}}}else if(o._data.layerType==="3DObject"){let r=t.concat(`/sublayers/${o._data.id}`),a=new De({url:r});a.setQueryParameters(e.resource.queryParameters),a.appendForwardSlash(),o._resource=a;let s=await $m.loadJson(o._resource),c=new WT(e,s,o);o._i3sLayers.push(c)}else console.log(`${o._data.layerType} layer ${o._data.name} is skipped as not supported.`);return o};var _V=gV;var DRe=Yr(wRe(),1);function ns(e){e=e??G.EMPTY_OBJECT,this._name=e.name,this._show=e.show??!0,this._geoidTiledTerrainProvider=e.geoidTiledTerrainProvider,this._showFeatures=e.showFeatures??!1,this._adjustMaterialAlphaMode=e.adjustMaterialAlphaMode??!1,this._applySymbology=e.applySymbology??!1,this._calculateNormals=e.calculateNormals??!1,this._cesium3dTilesetOptions=e.cesium3dTilesetOptions??G.EMPTY_OBJECT,this._layers=[],this._sublayers=[],this._data=void 0,this._extent=void 0,this._geoidDataPromise=void 0,this._geoidDataList=void 0,this._decoderTaskProcessor=void 0,this._taskProcessorReadyPromise=void 0,this._attributeStatistics=[],this._layersExtent=[]}Object.defineProperties(ns.prototype,{name:{get:function(){return this._name}},show:{get:function(){return this._show},set:function(e){if(this._show!==e){this._show=e;for(let t=0;t<this._layers.length;t++)this._layers[t]._updateVisibility()}}},geoidTiledTerrainProvider:{get:function(){return this._geoidTiledTerrainProvider}},layers:{get:function(){return this._layers}},sublayers:{get:function(){return this._sublayers}},data:{get:function(){return this._data}},extent:{get:function(){return this._extent}},resource:{get:function(){return this._resource}},showFeatures:{get:function(){return this._showFeatures}},adjustMaterialAlphaMode:{get:function(){return this._adjustMaterialAlphaMode}},applySymbology:{get:function(){return this._applySymbology}},calculateNormals:{get:function(){return this._calculateNormals}}});ns.prototype.destroy=function(){for(let e=0;e<this._layers.length;e++)l(this._layers[e]._tileset)&&this._layers[e]._tileset.destroy();return fe(this)};ns.prototype.isDestroyed=function(){return!1};ns.prototype.update=function(e){for(let t=0;t<this._layers.length;t++)l(this._layers[t]._tileset)&&this._layers[t]._tileset.update(e)};ns.prototype.prePassesUpdate=function(e){for(let t=0;t<this._layers.length;t++)l(this._layers[t]._tileset)&&this._layers[t]._tileset.prePassesUpdate(e)};ns.prototype.postPassesUpdate=function(e){for(let t=0;t<this._layers.length;t++)l(this._layers[t]._tileset)&&this._layers[t]._tileset.postPassesUpdate(e)};ns.prototype.updateForPass=function(e,t){for(let n=0;n<this._layers.length;n++)l(this._layers[n]._tileset)&&this._layers[n]._tileset.updateForPass(e,t)};function fNt(e,t){let n=e.resource.getUrlComponent(),i="";return n.match(/layers\/\d/)?i=`${n}`.replace(/\/+$/,""):i=`${n}`.replace(/\/?$/,"/").concat(`layers/${t}`),i}async function IRe(e,t,n){if(t.layerType==="Building"){l(n.showFeatures)||(e._showFeatures=!0),l(n.adjustMaterialAlphaMode)||(e._adjustMaterialAlphaMode=!0),l(n.applySymbology)||(e._applySymbology=!0),l(n.calculateNormals)||(e._calculateNormals=!0);let i=fNt(e,t.id);if(l(t.sublayers)){let o=[];for(let a=0;a<t.sublayers.length;a++){let s=_V._fromData(e,i,t.sublayers[a],e);o.push(s)}let r=await Promise.all(o);for(let a=0;a<r.length;a++){let s=r[a];e._sublayers.push(s),e._layers.push(...s._i3sLayers)}}if(l(t.statisticsHRef)){let o=i.concat(`/${t.statisticsHRef}`),r=new pV(e,o);await r.load(),e._attributeStatistics.push(r)}if(l(t.fullExtent)){let o=oe.fromDegrees(t.fullExtent.xmin,t.fullExtent.ymin,t.fullExtent.xmax,t.fullExtent.ymax);e._layersExtent.push(o)}}else if(t.layerType==="3DObject"||t.layerType==="IntegratedMesh"){!l(n.calculateNormals)&&!l(t.textureSetDefinitions)&&(e._calculateNormals=!0);let i=new WT(e,t,e);e._layers.push(i),l(i._extent)&&e._layersExtent.push(i._extent)}else console.log(`${t.layerType} layer ${t.name} is skipped as not supported.`)}ns.fromUrl=async function(e,t){t=t??G.EMPTY_OBJECT;let n=De.createIfNeeded(e);n.setQueryParameters({f:"pjson"},!0);let i=await ns.loadJson(n),o=new ns(t);if(o._resource=n,o._data=i,l(i.layers)){let a=[];for(let s=0;s<i.layers.length;s++){let c=IRe(o,i.layers[s],t);a.push(c)}await Promise.all(a)}else await IRe(o,i,t);o._computeExtent();let r=[];for(let a=0;a<o._layers.length;a++)r.push(o._layers[a].load(t.cesium3dTilesetOptions));return await Promise.all(r),o};ns._fetchJson=function(e){return e.fetchJson()};ns.loadJson=async function(e){let t=await ns._fetchJson(e);if(l(t.error)){if(console.error("Failed to fetch I3S ",e.url),l(t.error.message)&&console.error(t.error.message),l(t.error.details))for(let n=0;n<t.error.details.length;n++)console.log(t.error.details[n]);throw new re(t.error)}return t};ns.prototype._loadBinary=async function(e){let t=await e.fetchArrayBuffer();if(t.byteLength>0&&new Uint8Array(t)[0]===123&&new TextDecoder().decode(t).includes("404"))throw new re(`Failed to load binary: ${e.url}`);return t};ns.prototype._binarizeGltf=function(e){let n=new TextEncoder().encode(JSON.stringify(e)),i=new Uint8Array(n.byteLength+20),o={magic:new Uint8Array(i.buffer,0,4),version:new Uint32Array(i.buffer,4,1),length:new Uint32Array(i.buffer,8,1),chunkLength:new Uint32Array(i.buffer,12,1),chunkType:new Uint32Array(i.buffer,16,1),chunkData:new Uint8Array(i.buffer,20,n.byteLength)};return o.magic[0]=103,o.magic[1]=108,o.magic[2]=84,o.magic[3]=70,o.version[0]=2,o.length[0]=i.byteLength,o.chunkLength[0]=n.byteLength,o.chunkType[0]=1313821514,o.chunkData.set(n),i};var dNt=new z;function hNt(e,t){let n=e.tilingScheme,i=[],o={},r=e._lodCount,a=de.fromRadians(t.west,t.north),s=de.fromRadians(t.east,t.south),c=n.positionToTileXY(a,r),u=n.positionToTileXY(s,r);for(let d=c.x;d<=u.x;d++)for(let p=c.y;p<=u.y;p++){let g=z.fromElements(d,p,dNt),m=g.toString();if(!o.hasOwnProperty(m)){let A={x:g.x,y:g.y,level:r,tilingScheme:n,terrainProvider:e,positions:[]};o[m]=A,i.push(A)}}let f=[];for(let d=0;d<i.length;++d){let p=i[d],g=p.terrainProvider.requestTileGeometry(p.x,p.y,p.level);f.push(g)}return Promise.all(f).then(function(d){let p=[];for(let g=0;g<d.length;g++){let m={tilingScheme:n,x:i[g].x,y:i[g].y,level:i[g].level},A=d[g],y="Geographic";n._projection instanceof li&&(y="WebMercator");let x={projectionType:y,projection:n._projection,nativeExtent:n.tileXYToNativeRectangle(m.x,m.y,m.level),height:A._height,width:A._width,scale:A._structure.heightScale,offset:A._structure.heightOffset};if(A._encoding===sh.LERC){let b=DRe.default.decode(A._buffer);x.buffer=b.pixels[0]}else x.buffer=A._buffer;p.push(x)}return p})}async function mNt(e){let t=e._geoidTiledTerrainProvider;if(l(t))try{let n=await hNt(t,e._extent);e._geoidDataList=n}catch{console.log("Error retrieving Geoid Terrain tiles - no geoid conversion will be performed.")}}ns.prototype.loadGeoidData=async function(){return l(this._geoidDataPromise)?this._geoidDataPromise:(this._geoidDataPromise=mNt(this),this._geoidDataPromise)};ns.prototype._computeExtent=function(){let e;for(let t=0;t<this._layersExtent.length;t++){let n=this._layersExtent[t];l(e)?oe.union(e,n,e):e=oe.clone(n)}this._extent=e};ns.prototype.getAttributeNames=function(){let e=[];for(let t=0;t<this._attributeStatistics.length;++t)e.push(...this._attributeStatistics[t].names);return e};ns.prototype.getAttributeValues=function(e){for(let t=0;t<this._attributeStatistics.length;++t){let n=this._attributeStatistics[t]._getValues(e);if(l(n))return n}return[]};ns.prototype.filterByAttributes=function(e){let t=[];for(let n=0;n<this._layers.length;n++){let i=this._layers[n].filterByAttributes(e);t.push(i)}return Promise.all(t)};var $m=ns;var is={};is.ExportStatus=Object.freeze({NotStarted:"NotStarted",InProgress:"InProgress",Complete:"Complete",Invalid:"Invalid"});is.ExportType=Object.freeze({IMODEL:"IMODEL",CESIUM:"CESIUM","3DTILES":"3DTILES"});is.RealityDataType=Object.freeze({Cesium3DTiles:"Cesium3DTiles",PNTS:"PNTS",RealityMesh3DTiles:"RealityMesh3DTiles",Terrain3DTiles:"Terrain3DTiles",GaussianSplat3DTiles:"GS_3DT",KML:"KML",GeoJSON:"GeoJSON",Unstructured:"Unstructured"});is.defaultAccessToken=void 0;is.defaultShareKey=void 0;is._getAuthorizationHeader=function(){return l(is.defaultShareKey)?`Basic ${is.defaultShareKey}`:`Bearer ${is.defaultAccessToken}`};is.apiEndpoint=new De({url:"https://api.bentley.com"});is.getExports=async function(e,t){let n=new De({url:`${is.apiEndpoint}mesh-export`,headers:{Authorization:is._getAuthorizationHeader(),Accept:"application/vnd.bentley.itwin-platform.v1+json",Prefer:"return=representation"},queryParameters:{iModelId:e,exportType:is.ExportType["3DTILES"],$top:"5",client:"CesiumJS"}});typeof CESIUM_VERSION<"u"&&n.appendQueryParameters({clientVersion:CESIUM_VERSION}),l(t)&&t!==""&&n.appendQueryParameters({changesetId:t});try{return await n.fetchJson()}catch(i){let o=JSON.parse(i.response);if(i.statusCode===401){let r=o.error.details?.[0].code??"";throw new re(`Unauthorized, bad token, wrong scopes or headers bad. ${r}`)}else{if(i.statusCode===403)throw console.error(o.error.code,o.error.message),new re("Not allowed, forbidden");if(i.statusCode===422)throw new re(`Unprocessable Entity:${o.error.code} ${o.error.message}`);if(i.statusCode===429)throw new re("Too many requests")}throw new re(`Unknown request failure ${i.statusCode}`)}};is.getRealityDataMetadata=async function(e,t){let n=new De({url:`${is.apiEndpoint}reality-management/reality-data/${t}`,headers:{Authorization:is._getAuthorizationHeader(),Accept:"application/vnd.bentley.itwin-platform.v1+json"},queryParameters:{iTwinId:e}});try{return(await n.fetchJson()).realityData}catch(i){let o=JSON.parse(i.response);if(i.statusCode===401){let r=o.error.details?.[0].code??"";throw new re(`Unauthorized, bad token, wrong scopes or headers bad. ${r}`)}else{if(i.statusCode===403)throw console.error(o.error.code,o.error.message),new re("Not allowed, forbidden");if(i.statusCode===404)throw new re(`Reality data not found: ${e}, ${t}`);if(i.statusCode===422)throw new re(`Unprocessable Entity:${o.error.code} ${o.error.message}`);if(i.statusCode===429)throw new re("Too many requests")}throw new re(`Unknown request failure ${i.statusCode}`)}};is.getRealityDataURL=async function(e,t,n){let i=new De({url:`${is.apiEndpoint}reality-management/reality-data/${t}/readaccess`,headers:{Authorization:is._getAuthorizationHeader(),Accept:"application/vnd.bentley.itwin-platform.v1+json"},queryParameters:{iTwinId:e}});try{let r=(await i.fetchJson())._links.containerUrl.href,a=new URL(r);return a.pathname=`${a.pathname}/${n}`,a.toString()}catch(o){let r=JSON.parse(o.response);if(o.statusCode===401){let a=r.error.details?.[0].code??"";throw new re(`Unauthorized, bad token, wrong scopes or headers bad. ${a}`)}else{if(o.statusCode===403)throw console.error(r.error.code,r.error.message),new re("Not allowed, forbidden");if(o.statusCode===404)throw new re(`Reality data not found: ${e}, ${t}`);if(o.statusCode===422)throw new re(`Unprocessable Entity:${r.error.code} ${r.error.message}`);if(o.statusCode===429)throw new re("Too many requests")}throw new re(`Unknown request failure ${o.statusCode}`)}};var os=is;var AV={};AV.createTilesetFromIModelId=async function({iModelId:e,changesetId:t,tilesetOptions:n}){let{exports:i}=await os.getExports(e,t);if(i.length>0&&i.every(c=>c.status===os.ExportStatus.Invalid))throw new re(`All exports for this iModel are Invalid: ${e}`);let o=i.find(c=>c.status===os.ExportStatus.Complete);if(!l(o))return;let r=new URL(o._links.mesh.href);r.pathname=`${r.pathname}/tileset.json`;let a=r.toString(),s=new De({url:a});return xa.fromUrl(s,n)};AV.createTilesetForRealityDataId=async function({iTwinId:e,realityDataId:t,type:n,rootDocument:i,tilesetOptions:o}){if(!l(n)||!l(i)){let c=await os.getRealityDataMetadata(e,t);i=c.rootDocument,n=c.type}if(![os.RealityDataType.Cesium3DTiles,os.RealityDataType.PNTS,os.RealityDataType.RealityMesh3DTiles,os.RealityDataType.Terrain3DTiles,os.RealityDataType.GaussianSplat3DTiles].includes(n))throw new re(`Reality data type is not a mesh type: ${n}`);let a=await os.getRealityDataURL(e,t,i),s={maximumScreenSpaceError:4,...o};return xa.fromUrl(a,s)};AV.createDataSourceForRealityDataId=async function({iTwinId:e,realityDataId:t,type:n,rootDocument:i}){if(!l(n)||!l(i)){let a=await os.getRealityDataMetadata(e,t);i=a.rootDocument,n=a.type}if(![os.RealityDataType.KML,os.RealityDataType.GeoJSON].includes(n))throw new re(`Reality data type is not a data source type: ${n}`);let r=await os.getRealityDataURL(e,t,i);return n===os.RealityDataType.GeoJSON?Ty.load(r):ZC.load(r)};AV.loadGeospatialFeatures=async function({iTwinId:e,collectionId:t,limit:n}){let i=n??1e4,o=`${os.apiEndpoint}geospatial-features/itwins/${e}/ogc/collections/${t}/items`,r=new De({url:o,headers:{Authorization:os._getAuthorizationHeader(),Accept:"application/vnd.bentley.itwin-platform.v1+json"},queryParameters:{limit:i,client:"CesiumJS"}});return Ty.load(r)};var wie=AV;function PRe(){}Object.defineProperties(PRe.prototype,{color:{get:_e.throwInstantiationError},intensity:{get:_e.throwInstantiationError}});var Iie=PRe;var pNt=0,gNt=14,_Nt=-1e3,ANt=1e4,yNt=2*Math.PI*te.WGS84.maximumRadius,xNt=256,bNt=new oe,CNt=new oe,Die=class{constructor(t,n){n=n??{},this._resource=De.createIfNeeded(t),this._urlTemplate=this._resource.url,this._extent=oe.clone(n.extent),this._minZoom=n.minZoom??pNt,this._maxZoom=n.maxZoom??gNt,this._featureIdProperty=n.featureIdProperty,this._show=!0,this._tileset=void 0,this._tilesetJsonUrl=void 0}static async fromUrl(t,n){let i=new this(t,n);return await i._initializeTileset(),i}get urlTemplate(){return this._urlTemplate}get resource(){return this._resource}get extent(){return this._extent}get tileset(){return this._tileset}get show(){return this._show}set show(t){this._show=t,l(this._tileset)&&(this._tileset.show=t)}_createRuntimeTilesetOptions(){return{minZoom:this._minZoom,maxZoom:this._maxZoom,extent:this._extent}}_createTilesetLoadOptions(){return{}}_configureTileset(t){}_createCodec(){}async _initializeTileset(){let t=TNt(this._resource,this._createRuntimeTilesetOptions()),n=new Blob([JSON.stringify(t)],{type:"application/json"}),i=URL.createObjectURL(n);this._tilesetJsonUrl=i;try{this._tileset=await xa.fromUrl(i,this._createTilesetLoadOptions())}catch(o){throw URL.revokeObjectURL(i),this._tilesetJsonUrl=void 0,o}URL.revokeObjectURL(i),this._tilesetJsonUrl=void 0,this._configureTileset(this._tileset),this._tileset._runtimeContentCodec=this._createCodec(),this._tileset.show=this._show}update(t){l(this._tileset)&&this._tileset.update(t)}prePassesUpdate(t){l(this._tileset)&&this._tileset.prePassesUpdate(t)}postPassesUpdate(t){l(this._tileset)&&this._tileset.postPassesUpdate(t)}updateForPass(t,n){l(this._tileset)&&this._tileset.updateForPass(t,n)}isDestroyed(){return!1}destroy(){return l(this._tileset)&&(this._tileset.destroy(),this._tileset=void 0),l(this._tilesetJsonUrl)&&(URL.revokeObjectURL(this._tilesetJsonUrl),this._tilesetJsonUrl=void 0),this._resource=void 0,this._extent=void 0,this._featureIdProperty=void 0,fe(this)}};function TNt(e,t){let n=new vr,i=l(t.extent)?oe.clone(t.extent):oe.clone(n.rectangle),o=vNt(n,i,t.minZoom),r={boundingVolume:{region:MRe(i)},geometricError:ORe(0),refine:"REPLACE",children:[]};for(let a=o.minY;a<=o.maxY;a++)for(let s=o.minX;s<=o.maxX;s++){let c=RRe(n,e,i,t.minZoom,t.maxZoom,s,a);l(c)&&r.children.push(c)}return r.children.length===0&&(r.geometricError=0),{asset:{version:"1.1"},geometricError:r.geometricError,root:r}}function RRe(e,t,n,i,o,r,a){if(!SNt(e,i,r,a,n,bNt,CNt))return;let s=e.tileXYToRectangle(r,a,i,new oe),c={boundingVolume:{region:MRe(s)},geometricError:i<o?ORe(i):0,refine:"REPLACE",content:{uri:ENt(t,i,r,a)}};if(i>=o)return c;let u=i+1,f=[];for(let d=a*2;d<=a*2+1;d++)for(let p=r*2;p<=r*2+1;p++){let g=RRe(e,t,n,u,o,p,d);l(g)&&f.push(g)}return f.length>0?c.children=f:c.geometricError=0,c}function ENt(e,t,n,i){let r=e.url.replace(/\{z\}/gi,`${t}`).replace(/\{x\}/gi,`${n}`).replace(/\{y\}/gi,`${i}`);return hd(r)}function ORe(e){return yNt/((1<<e)*xNt)}function MRe(e){return[e.west,e.south,e.east,e.north,_Nt,ANt]}function vNt(e,t,n){let i=(1<<n)-1,o=de.fromRadians(t.west,t.north),r=de.fromRadians(t.east,t.south),a=e.positionToTileXY(o,n),s=e.positionToTileXY(r,n);return!l(a)||!l(s)||t.west>t.east?{minX:0,maxX:i,minY:0,maxY:i}:{minX:D.clamp(Math.min(a.x,s.x),0,i),maxX:D.clamp(Math.max(a.x,s.x),0,i),minY:D.clamp(Math.min(a.y,s.y),0,i),maxY:D.clamp(Math.max(a.y,s.y),0,i)}}function SNt(e,t,n,i,o,r,a){let s=e.tileXYToRectangle(n,i,t,r);return l(oe.intersection(s,o,a))}var yV=Die;var Pie=0,BRe=new h,e9=new h,wNt=new vr;function INt(e,t,n){let i=t.tileX,o=t.tileY,r=t.tileZ,a=n?.featureIdProperty,s=wNt.tileXYToRectangle(i,o,r),c=oe.center(s),u=h.fromRadians(c.longitude,c.latitude,0),f=4294967295,d=f,p=f,g=new Map,m=new Map,A=[],y=[],x=[],b=0;function C(){let k=(4-b%4)%4;k>0&&(x.push(new Uint8Array(k)),b+=k)}function E(k,U){C();let F=b;x.push(new Uint8Array(k.buffer,k.byteOffset,k.byteLength)),b+=k.byteLength;let H=A.length;return A.push({buffer:0,byteOffset:F,byteLength:k.byteLength,target:U}),H}function S(k,U){let F=E(k,U.target),H=dt.getComponentCount(U.type),q={bufferView:F,byteOffset:0,componentType:U.componentType,count:k.length/H,type:U.type};l(U.min)&&(q.min=U.min),l(U.max)&&(q.max=U.max);let J=y.length;return y.push(q),J}function w(k){let U=Number.POSITIVE_INFINITY,F=Number.POSITIVE_INFINITY,H=Number.POSITIVE_INFINITY,q=Number.NEGATIVE_INFINITY,J=Number.NEGATIVE_INFINITY,W=Number.NEGATIVE_INFINITY;for(let Z=0;Z<k.length;Z+=3){let K=k[Z],le=k[Z+1],me=k[Z+2];K<U&&(U=K),le<F&&(F=le),me<H&&(H=me),K>q&&(q=K),le>J&&(J=le),me>W&&(W=me)}return{min:[U,F,H],max:[q,J,W]}}function P(k,U,F){if(F.length===0)return;let H=new Uint32Array(F),q=S(H,{type:"SCALAR",componentType:Y.UNSIGNED_INT,target:ee.ARRAY_BUFFER});k._FEATURE_ID_0=q;let J={featureCount:g.size,nullFeatureId:d,attribute:0};m.size>0&&(J.propertyTable=0),U.EXT_mesh_features={featureIds:[J]}}function R(k,U){U=U??4;let F=(U-b%U)%U;F>0&&(x.push(new Uint8Array(F)),b+=F);let H=b;x.push(k),b+=k.byteLength;let q=A.length;return A.push({buffer:0,byteOffset:H,byteLength:k.byteLength}),q}function B(){if(m.size===0)return;let k=new Map;for(let q of m.values())for(let[J,W]of Object.entries(q)){if(!l(W))continue;let Z=typeof W,K;Z==="string"?K="STRING":Z==="number"?K="SCALAR":Z==="boolean"?K="BOOLEAN":K="STRING";let le=k.get(J);l(le)?le!==K&&k.set(J,"STRING"):k.set(J,K)}if(k.size===0)return;let U={};for(let[q,J]of k)J==="SCALAR"?U[q]={type:"SCALAR",componentType:"FLOAT64"}:J==="BOOLEAN"?U[q]={type:"BOOLEAN"}:U[q]={type:"STRING"};let F={},H=g.size;for(let[q,J]of k)if(J==="SCALAR"){let W=new Float64Array(H);for(let K=0;K<H;K++){let me=m.get(K)?.[q];W[K]=typeof me=="number"&&Number.isFinite(me)?me:NaN}let Z=R(new Uint8Array(W.buffer,W.byteOffset,W.byteLength),8);F[q]={values:Z}}else if(J==="BOOLEAN"){let W=Math.ceil(H/8),Z=new Uint8Array(W);for(let le=0;le<H;le++)m.get(le)?.[q]&&(Z[le>>3]|=1<<(le&7));let K=R(Z);F[q]={values:K}}else{let W=new TextEncoder,Z=[],K=new Uint32Array(H+1),le=0;for(let we=0;we<H;we++){K[we]=le;let Be=m.get(we)?.[q],ke;Be==null?ke="":typeof Be=="string"?ke=Be:ke=String(Be);let Ge=W.encode(ke);Z.push(Ge),le+=Ge.byteLength}K[H]=le;let me=new Uint8Array(le),ae=0;for(let we of Z)me.set(we,ae),ae+=we.byteLength;let be=R(me),ge=R(new Uint8Array(K.buffer,K.byteOffset,K.byteLength));F[q]={values:be,stringOffsets:ge,stringOffsetType:"UINT32"}}return{schema:{classes:{mvt_feature:{properties:U}}},propertyTables:[{class:"mvt_feature",count:H,properties:F}]}}let L=[],_=[],T=[u.x,u.y,u.z];for(let k of e.layers){let U=k.extent,F=[],H=[],q=[],J=[],W=[],Z=0,K=[],le=[],me=[],ae=[],be=[],ge=[],we=[],Ee=0;for(let Ge of k.features){let rt=l(a)?PNt(Ge,a,g)??d:DNt(Ge,g);if(rt!==d&&!m.has(rt)){let et=Object.assign({},Ge.properties);et._layer=k.name??"",m.set(rt,et)}if(Ge.type==="Point"){let et=Ge.geometry;for(let Pe of et)Rie(Pe,i,o,r,U,Pie,u,F),H.push(rt);continue}if(Ge.type==="LineString"){let et=Ge.geometry;for(let Pe of et){let Ye=q.length/3;for(let ut of Pe)Rie(ut,i,o,r,U,Pie,u,q),J.push(rt);for(let ut=0;ut<Pe.length;ut++)W.push(Ye+ut);W.push(p),Z++}continue}if(Ge.type==="Polygon"){let et=Ge.geometry,Pe=RNt(et);for(let Ye of Pe){let ut=[Ye.outerRing,...Ye.holes],Tt=[],tn=[],Ht=[],xt=0;for(let st=0;st<ut.length;st++){let Ln=ut[st];st>0&&Ht.push(xt);for(let Nn of Ln)Tt.push(new z(Nn.x,Nn.y)),Rie(Nn,i,o,r,U,Pie,u,tn),xt++}if(Tt.length<3)continue;let Pt=ni.triangulate(Tt,Ht.length>0?Ht:void 0);if(!l(Pt)||Pt.length===0){_t("buildVectorGltfFromMVT-triangulation-failed","Polygon triangulation failed; skipping polygon.");continue}let bn=K.length/3,at=me.length;ae.push(bn),be.push(at),ge.push(Ht.length);for(let st=0;st<Ht.length;st++)we.push(bn+Ht[st]);for(let st=0;st<tn.length;st++)K.push(tn[st]);for(let st=0;st<tn.length/3;st++)le.push(rt);for(let st=0;st<Pt.length;st++)me.push(Pt[st]+bn);Ee++}}}if(F.length===0&&q.length===0&&K.length===0)continue;W.length>0&&W[W.length-1]===p&&W.pop();let Be=[];if(F.length>0){let Ge=new Float32Array(F),rt=w(Ge),Pe={POSITION:S(Ge,{type:"VEC3",componentType:Y.FLOAT,target:ee.ARRAY_BUFFER,min:rt.min,max:rt.max})},Ye={CESIUM_mesh_vector:{vector:!0,count:Ge.length/3}};P(Pe,Ye,H),Be.push({mode:Re.POINTS,attributes:Pe,extensions:Ye})}if(q.length>0&&W.length>1){let Ge=new Float32Array(q),rt=new Uint32Array(W),et=w(Ge),Pe=S(Ge,{type:"VEC3",componentType:Y.FLOAT,target:ee.ARRAY_BUFFER,min:et.min,max:et.max}),Ye=S(rt,{type:"SCALAR",componentType:Y.UNSIGNED_INT,target:ee.ELEMENT_ARRAY_BUFFER}),ut={POSITION:Pe},Tt={CESIUM_mesh_vector:{vector:!0,count:Z}};P(ut,Tt,J),Be.push({mode:Re.LINE_STRIP,indices:Ye,attributes:ut,extensions:Tt})}if(K.length>0&&me.length>=3){let Ge=new Float32Array(K),rt=new Uint32Array(me),et=new Uint32Array(ae),Pe=new Uint32Array(be),Ye=we.length>0,ut=Ye?new Uint32Array(ge):void 0,Tt=Ye?new Uint32Array(we):void 0,tn=w(Ge),Ht=S(Ge,{type:"VEC3",componentType:Y.FLOAT,target:ee.ARRAY_BUFFER,min:tn.min,max:tn.max}),xt=S(rt,{type:"SCALAR",componentType:Y.UNSIGNED_INT,target:ee.ELEMENT_ARRAY_BUFFER}),Pt=S(et,{type:"SCALAR",componentType:Y.UNSIGNED_INT,target:ee.ARRAY_BUFFER}),bn=S(Pe,{type:"SCALAR",componentType:Y.UNSIGNED_INT,target:ee.ARRAY_BUFFER}),at=l(ut)?S(ut,{type:"SCALAR",componentType:Y.UNSIGNED_INT,target:ee.ARRAY_BUFFER}):void 0,st=l(Tt)?S(Tt,{type:"SCALAR",componentType:Y.UNSIGNED_INT,target:ee.ARRAY_BUFFER}):void 0,Ln={POSITION:Ht},Nn={CESIUM_mesh_vector:{vector:!0,count:Ee,polygonAttributeOffsets:Pt,polygonIndicesOffsets:bn}};Ye&&(Nn.CESIUM_mesh_vector.polygonHoleCounts=at,Nn.CESIUM_mesh_vector.polygonHoleOffsets=st),P(Ln,Nn,le),Be.push({mode:Re.TRIANGLES,indices:xt,attributes:Ln,extensions:Nn})}if(Be.length===0)continue;let ke=L.length;L.push({primitives:Be}),_.push({name:k.name,mesh:ke,translation:T})}if(_.length===0)return;let v=B(),I=LNt(x,b),O=["CESIUM_mesh_vector"];g.size>0&&O.push("EXT_mesh_features"),l(v)&&O.push("EXT_structural_metadata");let N=_.map((k,U)=>U),j={asset:{version:"2.0"},extensionsUsed:O,scene:0,scenes:[{nodes:N}],nodes:_,meshes:L,accessors:y,bufferViews:A,buffers:[{byteLength:I.byteLength}],extensions:void 0};return l(v)&&(j.extensions={EXT_structural_metadata:v}),BNt(j,I)}function DNt(e,t){let n=t.get(e);return l(n)||(n=t.size,t.set(e,n)),n}function PNt(e,t,n){let i=e.properties;if(!l(i))return;let o=i[t];if(!l(o)||typeof o!="string"&&typeof o!="number"&&typeof o!="boolean"||typeof o=="number"&&!Number.isFinite(o))return;let r=`${typeof o}:${o}`,a=n.get(r);return l(a)||(a=n.size,n.set(r,a)),a}function RNt(e){let t=[];for(let n of e){let i=MNt(n);if(i.length<3)continue;ONt(i)<=0?t.push({outerRing:i,holes:[]}):t.length>0&&t[t.length-1].holes.push(i)}return t}function ONt(e){let t=0;for(let n=0,i=e.length-1;n<e.length;i=n++)t+=(e[i].x+e[n].x)*(e[i].y-e[n].y);return t/2}function MNt(e){return e.length>1&&e[0].x===e[e.length-1].x&&e[0].y===e[e.length-1].y?e.slice(0,e.length-1):e}function Rie(e,t,n,i,o,r,a,s){let c=1<<i,u=(t+e.x/o)/c,f=(n+e.y/o)/c,d=u*2*Math.PI-Math.PI,p=Math.atan(Math.sinh(Math.PI*(1-2*f)));h.fromRadians(d,p,r,void 0,BRe),h.subtract(BRe,a,e9),s.push(e9.x,e9.y,e9.z)}function BNt(e,t){let a=new TextEncoder().encode(JSON.stringify(e)),s=Math.ceil(a.length/4)*4,c=new Uint8Array(s);c.fill(32),c.set(a);let u=Math.ceil(t.byteLength/4)*4,f=new Uint8Array(u);f.set(t);let d=20+s+8+u,p=new Uint8Array(d),g=new DataView(p.buffer),m=0;return g.setUint32(m,1179937895,!0),m+=4,g.setUint32(m,2,!0),m+=4,g.setUint32(m,d,!0),m+=4,g.setUint32(m,s,!0),m+=4,g.setUint32(m,1313821514,!0),m+=4,p.set(c,m),m+=s,g.setUint32(m,u,!0),m+=4,g.setUint32(m,5130562,!0),m+=4,p.set(f,m),p}function LNt(e,t){let n=new Uint8Array(t),i=0;for(let o of e)n.set(o,i),i+=o.byteLength;return n}var xV=INt;var NNt=new TextDecoder,t9={UNKNOWN:0,POINT:1,LINESTRING:2,POLYGON:3},FNt={LAYERS:3},bV={NAME:1,FEATURES:2,KEYS:3,VALUES:4,EXTENT:5},Oie={TAGS:2,TYPE:3,GEOMETRY:4},qT={STRING:1,FLOAT:2,DOUBLE:3,INT64:4,UINT64:5,SINT64:6,BOOL:7},kNt=["Unknown","Point","LineString","Polygon"];function zNt(e){let t=new Uint8Array(e),n=[],i=0;for(;i<t.length;){let o=n9(t,i,t.length),r=o.fieldNumber,a=o.wireType;if(i=o.newPos,r===FNt.LAYERS&&a===2){let s=L_(t,i,t.length);i=s.newPos;let c=rf(i,s.value,t.length,"layer");n.push(UNt(t,i,c)),i=c}else i=i9(t,i,a,t.length)}return{layers:n}}function UNt(e,t,n){let i=t,o="",r=4096,a=[],s=[],c=[];for(;i<n;){let f=n9(e,i,n),d=f.fieldNumber,p=f.wireType;if(i=f.newPos,d===bV.NAME&&p===2){let g=L_(e,i,n);i=g.newPos;let m=rf(i,g.value,n,"layer name");o=Bie(e,i,g.value),i=m}else if(d===bV.FEATURES&&p===2){let g=L_(e,i,n);i=g.newPos;let m=rf(i,g.value,n,"feature");c.push({start:i,end:m}),i=m}else if(d===bV.KEYS&&p===2){let g=L_(e,i,n);i=g.newPos;let m=rf(i,g.value,n,"key");a.push(Bie(e,i,g.value)),i=m}else if(d===bV.VALUES&&p===2){let g=L_(e,i,n);i=g.newPos;let m=rf(i,g.value,n,"value"),A=GNt(e,i,m);s.push(A),i=m}else if(d===bV.EXTENT&&p===0){let g=vI(e,i,n);r=g.value,i=g.newPos}else i=i9(e,i,p,n)}let u=c.map(({start:f,end:d})=>VNt(e,f,d,a,s));return{name:o,extent:r,features:u}}function VNt(e,t,n,i,o){let r=t,a=t9.UNKNOWN,s=[],c=[];for(;r<n;){let d=n9(e,r,n),p=d.fieldNumber,g=d.wireType;if(r=d.newPos,p===Oie.TYPE&&g===0){let m=vI(e,r,n);a=m.value,r=m.newPos}else if(p===Oie.TAGS&&g===2){let m=L_(e,r,n);r=m.newPos;let A=rf(r,m.value,n,"feature tags");for(;r<A;){let y=vI(e,r,A);s.push(y.value),r=y.newPos}}else if(p===Oie.GEOMETRY&&g===2){let m=L_(e,r,n);r=m.newPos;let A=rf(r,m.value,n,"feature geometry");for(;r<A;){let y=vI(e,r,A);c.push(y.value),r=y.newPos}}else r=i9(e,r,g,n)}let u={};for(let d=0;d<s.length-1;d+=2){let p=i[s[d]],g=o[s[d+1]];typeof p!="string"||g===void 0||(u[p]=g)}let f=jNt(a,c);return{type:kNt[a]??"Unknown",geometry:f,properties:u}}function jNt(e,t){let n=0,i=0,o=0;if(e===t9.POINT){let r=[];for(;n<t.length;){let a=t[n++],s=a&7,c=a>>3;if(s===1)for(let u=0;u<c;u++)i+=E0(t[n++]),o+=E0(t[n++]),r.push({x:i,y:o})}return r}if(e===t9.LINESTRING){let r=[],a=null;for(;n<t.length;){let s=t[n++],c=s&7,u=s>>3;if(c===1)a!==null&&r.push(a),a=[],i+=E0(t[n++]),o+=E0(t[n++]),a.push({x:i,y:o});else if(c===2)for(let f=0;f<u;f++)i+=E0(t[n++]),o+=E0(t[n++]),a.push({x:i,y:o})}return a!==null&&r.push(a),r}if(e===t9.POLYGON){let r=[],a=null;for(;n<t.length;){let s=t[n++],c=s&7,u=s>>3;if(c===1)a!==null&&r.push(a),a=[],i+=E0(t[n++]),o+=E0(t[n++]),a.push({x:i,y:o});else if(c===2)for(let f=0;f<u;f++)i+=E0(t[n++]),o+=E0(t[n++]),a.push({x:i,y:o});else c===7&&a!==null&&a.length>0&&(a.push({x:a[0].x,y:a[0].y}),r.push(a),a=null)}return a!==null&&r.push(a),r}return[]}function GNt(e,t,n){let i=t;for(;i<n;){let o=n9(e,i,n),r=o.fieldNumber,a=o.wireType;if(i=o.newPos,r===qT.STRING&&a===2){let s=L_(e,i,n);i=s.newPos;let c=rf(i,s.value,n,"string value");return Bie(e,i,c-i)}else{if(r===qT.FLOAT&&a===5)return rf(i,4,n,"float value"),new DataView(e.buffer,e.byteOffset+i,4).getFloat32(0,!0);if(r===qT.DOUBLE&&a===1)return rf(i,8,n,"double value"),new DataView(e.buffer,e.byteOffset+i,8).getFloat64(0,!0);if(r===qT.INT64&&a===0){let s=SI(e,i,n);return Mie(s.value)}else if(r===qT.UINT64&&a===0){let s=SI(e,i,n);return Mie(s.value)}else if(r===qT.SINT64&&a===0){let s=SI(e,i,n);return Mie(HNt(s.value))}else if(r===qT.BOOL&&a===0)return vI(e,i,n).value!==0}i=i9(e,i,a,n)}}function n9(e,t,n){let i=vI(e,t,n);return{fieldNumber:i.value>>>3,wireType:i.value&7,newPos:i.newPos}}function vI(e,t,n){let i=SI(e,t,n,5);if(i.value>0xffffffffn)throw new re("Invalid MVT uint32 varint.");return{value:Number(i.value),newPos:i.newPos}}function L_(e,t,n){let i=SI(e,t,n);if(i.value>BigInt(Number.MAX_SAFE_INTEGER))throw new re("Invalid MVT length varint.");return{value:Number(i.value),newPos:i.newPos}}function SI(e,t,n,i){let o=0n,r=0n,a=0,s=i??10;for(;;){if(t>=n||t>=e.length)throw new re("Invalid MVT: truncated varint.");let c=e[t++];if(o|=BigInt(c&127)<<r,a++,(c&128)===0)break;if(a>=s)throw new re("Invalid MVT: varint is too long.");r+=7n}return{value:o,newPos:t}}function Bie(e,t,n){let i=rf(t,n,e.length,"string");return NNt.decode(e.subarray(t,i))}function rf(e,t,n,i){if(!Number.isFinite(t)||t<0)throw new re(`Invalid MVT ${i}: invalid length.`);let o=e+t;if(!Number.isFinite(o)||o<e||o>n)throw new re(`Invalid MVT ${i}: length exceeds available bytes.`);return o}function i9(e,t,n,i){if(n===0)return SI(e,t,i).newPos;if(n===1)return rf(t,8,i,"fixed64 field");if(n===2){let o=L_(e,t,i);return rf(o.newPos,o.value,i,"length-delimited field")}else if(n===5)return rf(t,4,i,"fixed32 field");throw new re(`Unsupported protobuf wire type: ${n}`)}function E0(e){return e>>>1^-(e&1)}function HNt(e){return e>>1n^-(e&1n)}function Mie(e){return e<=BigInt(Number.MAX_SAFE_INTEGER)&&e>=BigInt(Number.MIN_SAFE_INTEGER)?Number(e):e}var CV=zNt;var o9=class extends yV{static async fromUrl(t,n){return super.fromUrl(t,n)}_createTilesetLoadOptions(){return{skipLevelOfDetail:!1,enablePick:!0,featureIdLabel:"featureId_0",instanceFeatureIdLabel:"instanceFeatureId_0"}}_configureTileset(t){t._modelUpAxis=Li.Z,t._modelForwardAxis=Li.X}_createCodec(){let t=this._featureIdProperty;return{contentType:"mvt",missingTilePolicy:{statusCodes:[404,204]},createContent:async(n,i,o,r)=>{let a=CV(r),s=LRe(o.getUrlComponent(!0)),c=xV(a,s,{featureIdProperty:t});if(!l(c)){if(!WNt(a))return new Mp(n,i);throw new re("Decoded MVT tile did not produce vector glTF content.")}return ZA.fromGltf(n,i,o,c)}}}};function LRe(e){let t=e.match(/\/(\d+)\/(\d+)\/(\d+)(?:\.[^/?#]+)?(?:[?#]|$)/i);return t?{tileZ:parseInt(t[1],10),tileX:parseInt(t[2],10),tileY:parseInt(t[3],10)}:(_t("MVTDataProvider.parseTileCoordinates",`MVT tile URL did not match /{z}/{x}/{y} pattern. Falling back to z/x/y = 0/0/0. URL: ${e}`),{tileZ:0,tileX:0,tileY:0})}function WNt(e){let t=e.layers;for(let n=0;n<t.length;n++)if(t[n].features.length>0)return!0;return!1}o9._parseTileCoordinates=LRe;var Lie=o9;var qNt=/\/$/,NRe=new yt('© <a href="https://www.mapbox.com/about/maps/">Mapbox</a> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/">Improve this map</a></strong>');function wI(e){e=e??G.EMPTY_OBJECT;let t=e.styleId,n=e.accessToken;this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0;let i=De.createIfNeeded(e.url??"https://api.mapbox.com/styles/v1/");this._styleId=t,this._accessToken=n;let o=e.tilesize??512;this._tilesize=o;let r=e.username??"mapbox";this._username=r;let a=l(e.scaleFactor)?"@2x":"",s=i.getUrlComponent();qNt.test(s)||(s+="/"),s+=`${this._username}/${t}/tiles/${this._tilesize}/{z}/{x}/{y}${a}`,i.url=s,i.setQueryParameters({access_token:n});let c;l(e.credit)?(c=e.credit,typeof c=="string"&&(c=new yt(c))):c=NRe,this._resource=i,this._imageryProvider=new Aa({url:i,credit:c,ellipsoid:e.ellipsoid,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,rectangle:e.rectangle})}Object.defineProperties(wI.prototype,{url:{get:function(){return this._imageryProvider.url}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._imageryProvider.errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},proxy:{get:function(){return this._imageryProvider.proxy}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}}});wI.prototype.getTileCredits=function(e,t,n){};wI.prototype.requestImage=function(e,t,n,i){return this._imageryProvider.requestImage(e,t,n,i)};wI.prototype.pickFeatures=function(e,t,n,i,o){return this._imageryProvider.pickFeatures(e,t,n,i,o)};wI._defaultCredit=NRe;var Nie=wI;function Fie(e){}Fie.prototype.isReady=function(){return!0};Fie.prototype.shouldDiscardImage=function(e){return!1};var kie=Fie;var YNt=new yt("MapQuest, Open Street Map and contributors, CC-BY-SA");function r9(e){e=e??G.EMPTY_OBJECT;let t=De.createIfNeeded(e.url??"https://tile.openstreetmap.org/");t.appendForwardSlash(),t.url+=`{z}/{x}/{y}${e.retinaTiles?"@2x":""}.${e.fileExtension??"png"}`;let n=new vr({ellipsoid:e.ellipsoid}),i=256,o=256,r=e.minimumLevel??0,a=e.maximumLevel,s=e.rectangle??n.rectangle,c=n.positionToTileXY(oe.southwest(s),r),u=n.positionToTileXY(oe.northeast(s),r),f=(Math.abs(u.x-c.x)+1)*(Math.abs(u.y-c.y)+1),d=e.credit??YNt;typeof d=="string"&&(d=new yt(d)),Aa.call(this,{url:t,credit:d,tilingScheme:n,tileWidth:i,tileHeight:o,minimumLevel:r,maximumLevel:a,rectangle:s})}l(Object.create)&&(r9.prototype=Object.create(Aa.prototype),r9.prototype.constructor=r9);var N_=r9;function FRe(){_e.throwInstantiationError()}Object.defineProperties(FRe.prototype,{show:{get:_e.throwInstantiationError,set:_e.throwInstantiationError},transform:{get:_e.throwInstantiationError},credit:{get:_e.throwInstantiationError}});var zie=FRe;function a9(){_e.throwInstantiationError()}Object.defineProperties(a9.prototype,{});a9.fromUrl=function(e){_e.throwInstantiationError()};a9.prototype.loadPanorama=function(e){_e.throwInstantiationError()};var Uie=a9;var XNt=new z(1,1);function Vie(e){e=e??G.EMPTY_OBJECT,this.mass=e.mass??1,this.position=h.clone(e.position??h.ZERO),this.velocity=h.clone(e.velocity??h.ZERO),this.life=e.life??Number.MAX_VALUE,this.image=e.image,this.startColor=V.clone(e.startColor??V.WHITE),this.endColor=V.clone(e.endColor??V.WHITE),this.startScale=e.startScale??1,this.endScale=e.endScale??1,this.imageSize=z.clone(e.imageSize??XNt),this._age=0,this._normalizedAge=0,this._billboard=void 0}Object.defineProperties(Vie.prototype,{age:{get:function(){return this._age}},normalizedAge:{get:function(){return this._normalizedAge}}});var kRe=new h;Vie.prototype.update=function(e,t){return h.multiplyByScalar(this.velocity,e,kRe),h.add(this.position,kRe,this.position),l(t)&&t(this,e),this._age+=e,this.life===Number.MAX_VALUE?this._normalizedAge=0:this._normalizedAge=this._age/this.life,this._age<=this.life};var II=Vie;function zRe(e){e=e??G.EMPTY_OBJECT,this.time=e.time??0,this.minimum=e.minimum??0,this.maximum=e.maximum??50,this._complete=!1}Object.defineProperties(zRe.prototype,{complete:{get:function(){return this._complete}}});var jie=zRe;function URe(e){}URe.prototype.emit=function(e){_e.throwInstantiationError()};var Gie=URe;var VRe=new z(1,1);function TV(e){e=e??G.EMPTY_OBJECT,this.show=e.show??!0,this.updateCallback=e.updateCallback,this.loop=e.loop??!0,this.image=e.image??void 0;let t=e.emitter;l(t)||(t=new ZU(.5)),this._emitter=t,this._bursts=e.bursts,this._modelMatrix=M.clone(e.modelMatrix??M.IDENTITY),this._emitterModelMatrix=M.clone(e.emitterModelMatrix??M.IDENTITY),this._matrixDirty=!0,this._combinedMatrix=new M,this._startColor=V.clone(e.color??e.startColor??V.WHITE),this._endColor=V.clone(e.color??e.endColor??V.WHITE),this._startScale=e.scale??e.startScale??1,this._endScale=e.scale??e.endScale??1,this._emissionRate=e.emissionRate??5,this._minimumSpeed=e.speed??e.minimumSpeed??1,this._maximumSpeed=e.speed??e.maximumSpeed??1,this._minimumParticleLife=e.particleLife??e.minimumParticleLife??5,this._maximumParticleLife=e.particleLife??e.maximumParticleLife??5,this._minimumMass=e.mass??e.minimumMass??1,this._maximumMass=e.mass??e.maximumMass??1,this._minimumImageSize=z.clone(e.imageSize??e.minimumImageSize??VRe),this._maximumImageSize=z.clone(e.imageSize??e.maximumImageSize??VRe),this._sizeInMeters=e.sizeInMeters??!1,this._lifetime=e.lifetime??Number.MAX_VALUE,this._billboardCollection=void 0,this._particles=[],this._particlePool=[],this._previousTime=void 0,this._currentTime=0,this._carryOver=0,this._complete=new ye,this._isComplete=!1,this._updateParticlePool=!0,this._particleEstimate=0}Object.defineProperties(TV.prototype,{emitter:{get:function(){return this._emitter},set:function(e){this._emitter=e}},bursts:{get:function(){return this._bursts},set:function(e){this._bursts=e,this._updateParticlePool=!0}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._matrixDirty=this._matrixDirty||!M.equals(this._modelMatrix,e),M.clone(e,this._modelMatrix)}},emitterModelMatrix:{get:function(){return this._emitterModelMatrix},set:function(e){this._matrixDirty=this._matrixDirty||!M.equals(this._emitterModelMatrix,e),M.clone(e,this._emitterModelMatrix)}},startColor:{get:function(){return this._startColor},set:function(e){V.clone(e,this._startColor)}},endColor:{get:function(){return this._endColor},set:function(e){V.clone(e,this._endColor)}},startScale:{get:function(){return this._startScale},set:function(e){this._startScale=e}},endScale:{get:function(){return this._endScale},set:function(e){this._endScale=e}},emissionRate:{get:function(){return this._emissionRate},set:function(e){this._emissionRate=e,this._updateParticlePool=!0}},minimumSpeed:{get:function(){return this._minimumSpeed},set:function(e){this._minimumSpeed=e}},maximumSpeed:{get:function(){return this._maximumSpeed},set:function(e){this._maximumSpeed=e}},minimumParticleLife:{get:function(){return this._minimumParticleLife},set:function(e){this._minimumParticleLife=e}},maximumParticleLife:{get:function(){return this._maximumParticleLife},set:function(e){this._maximumParticleLife=e,this._updateParticlePool=!0}},minimumMass:{get:function(){return this._minimumMass},set:function(e){this._minimumMass=e}},maximumMass:{get:function(){return this._maximumMass},set:function(e){this._maximumMass=e}},minimumImageSize:{get:function(){return this._minimumImageSize},set:function(e){this._minimumImageSize=e}},maximumImageSize:{get:function(){return this._maximumImageSize},set:function(e){this._maximumImageSize=e}},sizeInMeters:{get:function(){return this._sizeInMeters},set:function(e){this._sizeInMeters=e}},lifetime:{get:function(){return this._lifetime},set:function(e){this._lifetime=e}},complete:{get:function(){return this._complete}},isComplete:{get:function(){return this._isComplete}}});function KNt(e){let t=e._emissionRate,n=e._maximumParticleLife,i=0,o=e._bursts;if(l(o)){let d=o.length;for(let p=0;p<d;++p)i+=o[p].maximum}let r=e._billboardCollection,a=e.image,s=Math.ceil(t*n+i),c=e._particles,u=e._particlePool,f=Math.max(s-c.length-u.length,0);for(let d=0;d<f;++d){let p=new II;p._billboard=r.add({image:a,show:!1}),u.push(p)}e._particleEstimate=s}function QNt(e){let t=e._particlePool.pop();return l(t)||(t=new II),t}function $Nt(e,t){e._particlePool.push(t)}function JNt(e){let t=e._particles,n=e._particlePool,i=e._billboardCollection,o=t.length,r=n.length,a=e._particleEstimate,s=r-Math.max(a-o-r,0);for(let c=s;c<r;++c){let u=n[c];i.remove(u._billboard)}n.length=s}function ZNt(e){l(e._billboard)&&(e._billboard.show=!1)}function jRe(e,t){let n=t._billboard;l(n)||(n=t._billboard=e._billboardCollection.add({image:t.image})),n.width=t.imageSize.x,n.height=t.imageSize.y,n.position=t.position,n.sizeInMeters=e.sizeInMeters,n.show=!0;let i=D.lerp(t.startColor.red,t.endColor.red,t.normalizedAge),o=D.lerp(t.startColor.green,t.endColor.green,t.normalizedAge),r=D.lerp(t.startColor.blue,t.endColor.blue,t.normalizedAge),a=D.lerp(t.startColor.alpha,t.endColor.alpha,t.normalizedAge);n.color=new V(i,o,r,a),n.scale=D.lerp(t.startScale,t.endScale,t.normalizedAge)}function eFt(e,t){t.startColor=V.clone(e._startColor,t.startColor),t.endColor=V.clone(e._endColor,t.endColor),t.startScale=e._startScale,t.endScale=e._endScale,t.image=e.image,t.life=D.randomBetween(e._minimumParticleLife,e._maximumParticleLife),t.mass=D.randomBetween(e._minimumMass,e._maximumMass),t.imageSize.x=D.randomBetween(e._minimumImageSize.x,e._maximumImageSize.x),t.imageSize.y=D.randomBetween(e._minimumImageSize.y,e._maximumImageSize.y),t._normalizedAge=0,t._age=0;let n=D.randomBetween(e._minimumSpeed,e._maximumSpeed);h.multiplyByScalar(t.velocity,n,t.velocity),e._particles.push(t)}function tFt(e,t){if(e._isComplete)return 0;t=D.mod(t,e._lifetime);let n=t*e._emissionRate,i=Math.floor(n);if(e._carryOver+=n-i,e._carryOver>1&&(i++,e._carryOver-=1),l(e.bursts)){let o=e.bursts.length;for(let r=0;r<o;r++){let a=e.bursts[r],s=e._currentTime;l(a)&&!a._complete&&s>a.time&&(i+=D.randomBetween(a.minimum,a.maximum),a._complete=!0)}}return i}var s9=new h;TV.prototype.update=function(e){if(!this.show)return;l(this._billboardCollection)||(this._billboardCollection=new Df),this._updateParticlePool&&(KNt(this),this._updateParticlePool=!1);let t=0;this._previousTime&&(t=Q.secondsDifference(e.time,this._previousTime)),t<0&&(t=0);let n=this._particles,i=this._emitter,o=this.updateCallback,r,a,s=n.length;for(r=0;r<s;++r)a=n[r],a.update(t,o)?jRe(this,a):(ZNt(a),$Nt(this,a),n[r]=n[s-1],--r,--s);n.length=s;let c=tFt(this,t);if(c>0&&l(i)){this._matrixDirty&&(this._combinedMatrix=M.multiply(this.modelMatrix,this.emitterModelMatrix,this._combinedMatrix),this._matrixDirty=!1);let u=this._combinedMatrix;for(r=0;r<c;r++)a=QNt(this),this._emitter.emit(a),h.add(a.position,a.velocity,s9),M.multiplyByPoint(u,s9,s9),a.position=M.multiplyByPoint(u,a.position,a.position),h.subtract(s9,a.position,a.velocity),h.normalize(a.velocity,a.velocity),eFt(this,a),jRe(this,a)}if(this._billboardCollection.update(e),this._previousTime=Q.clone(e.time,this._previousTime),this._currentTime+=t,this._lifetime!==Number.MAX_VALUE&&this._currentTime>this._lifetime)if(this.loop){if(this._currentTime=D.mod(this._currentTime,this._lifetime),this.bursts){let u=this.bursts.length;for(r=0;r<u;r++)this.bursts[r]._complete=!1}}else this._isComplete=!0,this._complete.raiseEvent(this);e.frameNumber%120===0&&JNt(this)};TV.prototype.isDestroyed=function(){return!1};TV.prototype.destroy=function(){return this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),fe(this)};var Hie=TV;var Wie=class{constructor(){lt(this,"quadtree");lt(this,"tilingScheme");lt(this,"errorEvent");_e.throwInstantiationError()}static computeDefaultLevelZeroMaximumGeometricError(t){return t.ellipsoid.maximumRadius*2*Math.PI*.25/(65*t.getNumberOfXTilesAtLevel(0))}update(t,n){_e.throwInstantiationError()}beginUpdate(t,n,i){_e.throwInstantiationError()}endUpdate(t,n,i){_e.throwInstantiationError()}getLevelMaximumGeometricError(t){_e.throwInstantiationError()}loadTile(t,n,i){_e.throwInstantiationError()}computeTileVisibility(t,n,i){_e.throwInstantiationError()}showTileThisFrame(t,n,i,o){_e.throwInstantiationError()}computeDistanceToTile(t,n){_e.throwInstantiationError()}isDestroyed(){_e.throwInstantiationError()}destroy(){_e.throwInstantiationError()}},qie=Wie;function Yie(e){e=e??1,this._radius=e??1}Object.defineProperties(Yie.prototype,{radius:{get:function(){return this._radius},set:function(e){this._radius=e}}});Yie.prototype.emit=function(e){let t=D.randomBetween(0,D.TWO_PI),n=D.randomBetween(0,D.PI),i=D.randomBetween(0,this._radius),o=i*Math.cos(t)*Math.sin(n),r=i*Math.sin(t)*Math.sin(n),a=i*Math.cos(n);e.position=h.fromElements(o,r,a,e.position),e.velocity=h.normalize(e.position,e.velocity)};var Xie=Yie;function EV(){}EV.prototype.evaluate=function(e,t){_e.throwInstantiationError()};EV.prototype.evaluateColor=function(e,t){_e.throwInstantiationError()};EV.prototype.getShaderFunction=function(e,t,n,i){_e.throwInstantiationError()};EV.prototype.getVariables=function(){_e.throwInstantiationError()};var Kie=EV;var c9={};c9.clipTriangleAtAxisAlignedThreshold=function(e,t,n,i,o,r){l(r)?r.length=0:r=[];let a,s,c;t?(a=n<e,s=i<e,c=o<e):(a=n>e,s=i>e,c=o>e);let u=a+s+c,f,d,p,g,m,A;return u===1?a?(f=(e-n)/(i-n),d=(e-n)/(o-n),r.push(1),r.push(2),d!==1&&(r.push(-1),r.push(0),r.push(2),r.push(d)),f!==1&&(r.push(-1),r.push(0),r.push(1),r.push(f))):s?(p=(e-i)/(o-i),g=(e-i)/(n-i),r.push(2),r.push(0),g!==1&&(r.push(-1),r.push(1),r.push(0),r.push(g)),p!==1&&(r.push(-1),r.push(1),r.push(2),r.push(p))):c&&(m=(e-o)/(n-o),A=(e-o)/(i-o),r.push(0),r.push(1),A!==1&&(r.push(-1),r.push(2),r.push(1),r.push(A)),m!==1&&(r.push(-1),r.push(2),r.push(0),r.push(m))):u===2?!a&&n!==e?(g=(e-i)/(n-i),m=(e-o)/(n-o),r.push(0),r.push(-1),r.push(1),r.push(0),r.push(g),r.push(-1),r.push(2),r.push(0),r.push(m)):!s&&i!==e?(A=(e-o)/(i-o),f=(e-n)/(i-n),r.push(1),r.push(-1),r.push(2),r.push(1),r.push(A),r.push(-1),r.push(0),r.push(1),r.push(f)):!c&&o!==e&&(d=(e-n)/(o-n),p=(e-i)/(o-i),r.push(2),r.push(-1),r.push(0),r.push(2),r.push(d),r.push(-1),r.push(1),r.push(2),r.push(p)):u!==3&&(r.push(0),r.push(1),r.push(2)),r};c9.computeBarycentricCoordinates=function(e,t,n,i,o,r,a,s,c){let u=n-a,f=a-o,d=r-s,p=i-s,g=1/(d*u+f*p),m=t-s,A=e-a,y=(d*A+f*m)*g,x=(-p*A+u*m)*g,b=1-y-x;return l(c)?(c.x=y,c.y=x,c.z=b,c):new h(y,x,b)};c9.computeLineSegmentLineSegmentIntersection=function(e,t,n,i,o,r,a,s,c){let u=(a-o)*(t-r)-(s-r)*(e-o),f=(n-e)*(t-r)-(i-t)*(e-o),d=(s-r)*(n-e)-(a-o)*(i-t);if(d===0)return;let p=u/d,g=f/d;if(p>=0&&p<=1&&g>=0&&g<=1)return l(c)||(c=new z),c.x=e+p*(n-e),c.y=t+p*(i-t),c};var Jm=c9;function $y(e){e=e??G.EMPTY_OBJECT,this._quantizedVertices=e.quantizedVertices,this._encodedNormals=e.encodedNormals,this._indices=e.indices,this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._boundingSphere=e.boundingSphere,this._orientedBoundingBox=e.orientedBoundingBox,this._horizonOcclusionPoint=e.horizonOcclusionPoint,this._credits=e.credits;let t=this._quantizedVertices.length/3,n=this._uValues=this._quantizedVertices.subarray(0,t),i=this._vValues=this._quantizedVertices.subarray(t,2*t);this._heightValues=this._quantizedVertices.subarray(2*t,3*t);function o(a,s){return i[a]-i[s]}function r(a,s){return n[a]-n[s]}this._westIndices=u9(e.westIndices,o,t),this._southIndices=u9(e.southIndices,r,t),this._eastIndices=u9(e.eastIndices,o,t),this._northIndices=u9(e.northIndices,r,t),this._westSkirtHeight=e.westSkirtHeight,this._southSkirtHeight=e.southSkirtHeight,this._eastSkirtHeight=e.eastSkirtHeight,this._northSkirtHeight=e.northSkirtHeight,this._childTileMask=e.childTileMask??15,this._createdByUpsampling=e.createdByUpsampling??!1,this._waterMask=e.waterMask,this._mesh=void 0}Object.defineProperties($y.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){return this._waterMask}},childTileMask:{get:function(){return this._childTileMask}},canUpsample:{get:function(){return l(this._mesh)}}});var l9=[];function u9(e,t,n){l9.length=e.length;let i=!1;for(let o=0,r=e.length;o<r;++o)l9[o]=e[o],i=i||o>0&&t(e[o-1],e[o])>0;return i?(l9.sort(t),Ue.createTypedArray(n,l9)):e}var GRe="createVerticesFromQuantizedTerrainMesh",nFt=new Gn(GRe),iFt=new Gn(GRe,Qu.maximumAsynchronousTasks);$y.prototype.createMesh=function(e){e=e??G.EMPTY_OBJECT;let t=e.tilingScheme,n=e.x,i=e.y,o=e.level,r=e.exaggeration??1,a=e.exaggerationRelativeHeight??0,s=e.throttle??!0,c=t.ellipsoid,u=t.tileXYToRectangle(n,i,o),d=(s?iFt:nFt).scheduleTask({minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,quantizedVertices:this._quantizedVertices,octEncodedNormals:this._encodedNormals,includeWebMercatorT:!0,indices:this._indices,westIndices:this._westIndices,southIndices:this._southIndices,eastIndices:this._eastIndices,northIndices:this._northIndices,westSkirtHeight:this._westSkirtHeight,southSkirtHeight:this._southSkirtHeight,eastSkirtHeight:this._eastSkirtHeight,northSkirtHeight:this._northSkirtHeight,rectangle:u,relativeToCenter:this._boundingSphere.center,ellipsoid:c,exaggeration:r,exaggerationRelativeHeight:a});if(!l(d))return;let p=this;return Promise.resolve(d).then(function(g){let m=p._quantizedVertices.length/3,A=m+p._westIndices.length+p._southIndices.length+p._eastIndices.length+p._northIndices.length,y=Ue.createTypedArray(A,g.indices),x=new Float32Array(g.vertices),b=g.center,C=g.minimumHeight,E=g.maximumHeight,S=p._boundingSphere,w=p._orientedBoundingBox,P=h.clone(g.occludeePointInScaledSpace)??p._horizonOcclusionPoint,R=g.vertexStride,B=dr.clone(g.encoding);return p._mesh=new pc(b,x,y,g.indexCountWithoutSkirts,m,C,E,u,S,P,R,w,B,g.westIndicesSouthToNorth,g.southIndicesEastToWest,g.eastIndicesNorthToSouth,g.northIndicesWestToEast),p._quantizedVertices=void 0,p._encodedNormals=void 0,p._indices=void 0,p._uValues=void 0,p._vValues=void 0,p._heightValues=void 0,p._westIndices=void 0,p._southIndices=void 0,p._eastIndices=void 0,p._northIndices=void 0,p._mesh})};var oFt=new Gn("upsampleQuantizedTerrainMesh",Qu.maximumAsynchronousTasks);$y.prototype.upsample=function(e,t,n,i,o,r,a){let s=this._mesh;if(!l(this._mesh))return;let c=t*2!==o,u=n*2===r,f=e.ellipsoid,d=e.tileXYToRectangle(o,r,a),p=oFt.scheduleTask({vertices:s.vertices,vertexCountWithoutSkirts:s.vertexCountWithoutSkirts,indices:s.indices,indexCountWithoutSkirts:s.indexCountWithoutSkirts,encoding:s.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,isEastChild:c,isNorthChild:u,childRectangle:d,ellipsoid:f});if(!l(p))return;let g=Math.min(this._westSkirtHeight,this._eastSkirtHeight);g=Math.min(g,this._southSkirtHeight),g=Math.min(g,this._northSkirtHeight);let m=c?g*.5:this._westSkirtHeight,A=u?g*.5:this._southSkirtHeight,y=c?this._eastSkirtHeight:g*.5,x=u?this._northSkirtHeight:g*.5,b=this._credits;return Promise.resolve(p).then(function(C){let E=new Uint16Array(C.vertices),S=Ue.createTypedArray(E.length/3,C.indices),w;return l(C.encodedNormals)&&(w=new Uint8Array(C.encodedNormals)),new $y({quantizedVertices:E,indices:S,encodedNormals:w,minimumHeight:C.minimumHeight,maximumHeight:C.maximumHeight,boundingSphere:ce.clone(C.boundingSphere),orientedBoundingBox:Qt.clone(C.orientedBoundingBox),horizonOcclusionPoint:h.clone(C.horizonOcclusionPoint),westIndices:C.westIndices,southIndices:C.southIndices,eastIndices:C.eastIndices,northIndices:C.northIndices,westSkirtHeight:m,southSkirtHeight:A,eastSkirtHeight:y,northSkirtHeight:x,childTileMask:0,credits:b,createdByUpsampling:!0})})};var Qie=32767,HRe=new h;$y.prototype.interpolateHeight=function(e,t,n){let i=D.clamp((t-e.west)/e.width,0,1);i*=Qie;let o=D.clamp((n-e.south)/e.height,0,1);return o*=Qie,l(this._mesh)?cFt(this,i,o):lFt(this,i,o)};function WRe(e,t,n,i,o,r,a,s){let c=Math.min(n,o,a),u=Math.max(n,o,a),f=Math.min(i,r,s),d=Math.max(i,r,s);return e>=c&&e<=u&&t>=f&&t<=d}var rFt=new z,aFt=new z,sFt=new z;function cFt(e,t,n){let i=e._mesh,o=i.vertices,r=i.encoding,a=i.indices;for(let s=0,c=a.length;s<c;s+=3){let u=a[s],f=a[s+1],d=a[s+2],p=r.decodeTextureCoordinates(o,u,rFt),g=r.decodeTextureCoordinates(o,f,aFt),m=r.decodeTextureCoordinates(o,d,sFt);if(WRe(t,n,p.x,p.y,g.x,g.y,m.x,m.y)){let A=Jm.computeBarycentricCoordinates(t,n,p.x,p.y,g.x,g.y,m.x,m.y,HRe);if(A.x>=-1e-15&&A.y>=-1e-15&&A.z>=-1e-15){let y=r.decodeHeight(o,u),x=r.decodeHeight(o,f),b=r.decodeHeight(o,d);return A.x*y+A.y*x+A.z*b}}}}function lFt(e,t,n){let i=e._uValues,o=e._vValues,r=e._heightValues,a=e._indices;for(let s=0,c=a.length;s<c;s+=3){let u=a[s],f=a[s+1],d=a[s+2],p=i[u],g=i[f],m=i[d],A=o[u],y=o[f],x=o[d];if(WRe(t,n,p,A,g,y,m,x)){let b=Jm.computeBarycentricCoordinates(t,n,p,A,g,y,m,x,HRe);if(b.x>=-1e-15&&b.y>=-1e-15&&b.z>=-1e-15){let C=b.x*r[u]+b.y*r[f]+b.z*r[d];return D.lerp(e._minimumHeight,e._maximumHeight,C/Qie)}}}}$y.prototype.isChildAvailable=function(e,t,n,i){let o=2;return n!==e*2&&++o,i!==t*2&&(o-=2),(this._childTileMask&1<<o)!==0};$y.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var YT=$y;function RI(e,t){this._tilingScheme=e,this._maximumLevel=t,this._rootNodes=[]}var XT=new oe;function uFt(e,t,n,i){let o=i.length;for(let r=0;r<o;++r){let a=i[r];if(a.x===t&&a.y===n&&a.level===e)return!0}return!1}RI.prototype.addAvailableTileRange=function(e,t,n,i,o){let r=this._tilingScheme,a=this._rootNodes;if(e===0)for(let p=n;p<=o;++p)for(let g=t;g<=i;++g)uFt(e,g,p,a)||a.push(new DI(r,void 0,0,g,p));r.tileXYToRectangle(t,n,e,XT);let s=XT.west,c=XT.north;r.tileXYToRectangle(i,o,e,XT);let u=XT.east,f=XT.south,d=new pFt(e,s,f,u,c);for(let p=0;p<a.length;++p){let g=a[p];$ie(g.extent,d)&&gFt(this._maximumLevel,g,d)}};RI.prototype.computeMaximumLevelAtPosition=function(e){let t;for(let n=0;n<this._rootNodes.length;++n){let i=this._rootNodes[n];if(PI(i.extent,e)){t=i;break}}return l(t)?vV(void 0,t,e):-1};var fFt=[],dFt=[],hFt=new oe,mFt=new oe;RI.prototype.computeBestAvailableLevelOverRectangle=function(e){let t=fFt;t.length=0,e.east<e.west?(t.push(oe.fromRadians(-Math.PI,e.south,e.east,e.north,hFt)),t.push(oe.fromRadians(e.west,e.south,Math.PI,e.north,mFt))):t.push(e);let n=dFt;n.length=0;let i;for(i=0;i<this._rootNodes.length;++i)SV(n,this._rootNodes[i],t);for(i=n.length-1;i>=0;--i)if(l(n[i])&&n[i].length===0)return i;return 0};var qRe=new de;RI.prototype.isTileAvailable=function(e,t,n){let i=this._tilingScheme.tileXYToRectangle(t,n,e,XT);return oe.center(i,qRe),this.computeMaximumLevelAtPosition(qRe)>=e};RI.prototype.computeChildMaskForTile=function(e,t,n){let i=e+1;if(i>=this._maximumLevel)return 0;let o=0;return o|=this.isTileAvailable(i,2*t,2*n+1)?1:0,o|=this.isTileAvailable(i,2*t+1,2*n+1)?2:0,o|=this.isTileAvailable(i,2*t,2*n)?4:0,o|=this.isTileAvailable(i,2*t+1,2*n)?8:0,o};function DI(e,t,n,i,o){this.tilingScheme=e,this.parent=t,this.level=n,this.x=i,this.y=o,this.extent=e.tileXYToRectangle(i,o,n),this.rectangles=[],this._sw=void 0,this._se=void 0,this._nw=void 0,this._ne=void 0}Object.defineProperties(DI.prototype,{nw:{get:function(){return this._nw||(this._nw=new DI(this.tilingScheme,this,this.level+1,this.x*2,this.y*2)),this._nw}},ne:{get:function(){return this._ne||(this._ne=new DI(this.tilingScheme,this,this.level+1,this.x*2+1,this.y*2)),this._ne}},sw:{get:function(){return this._sw||(this._sw=new DI(this.tilingScheme,this,this.level+1,this.x*2,this.y*2+1)),this._sw}},se:{get:function(){return this._se||(this._se=new DI(this.tilingScheme,this,this.level+1,this.x*2+1,this.y*2+1)),this._se}}});function pFt(e,t,n,i,o){this.level=e,this.west=t,this.south=n,this.east=i,this.north=o}function $ie(e,t){let n=Math.max(e.west,t.west),i=Math.max(e.south,t.south),o=Math.min(e.east,t.east),r=Math.min(e.north,t.north);return i<r&&n<o}function gFt(e,t,n){for(;t.level<e;)if(f9(t.nw.extent,n))t=t.nw;else if(f9(t.ne.extent,n))t=t.ne;else if(f9(t.sw.extent,n))t=t.sw;else if(f9(t.se.extent,n))t=t.se;else break;if(t.rectangles.length===0||t.rectangles[t.rectangles.length-1].level<=n.level)t.rectangles.push(n);else{let i=_o(t.rectangles,n.level,_Ft);i<0&&(i=~i),t.rectangles.splice(i,0,n)}}function _Ft(e,t){return e.level-t}function f9(e,t){return t.west>=e.west&&t.east<=e.east&&t.south>=e.south&&t.north<=e.north}function PI(e,t){return t.longitude>=e.west&&t.longitude<=e.east&&t.latitude>=e.south&&t.latitude<=e.north}function vV(e,t,n){let i=0,o=!1;for(;!o;){let r=t._nw&&PI(t._nw.extent,n),a=t._ne&&PI(t._ne.extent,n),s=t._sw&&PI(t._sw.extent,n),c=t._se&&PI(t._se.extent,n);if(r+a+s+c>1){r&&(i=Math.max(i,vV(t,t._nw,n))),a&&(i=Math.max(i,vV(t,t._ne,n))),s&&(i=Math.max(i,vV(t,t._sw,n))),c&&(i=Math.max(i,vV(t,t._se,n)));break}else r?t=t._nw:a?t=t._ne:s?t=t._sw:c?t=t._se:o=!0}for(;t!==e;){let r=t.rectangles;for(let a=r.length-1;a>=0&&r[a].level>i;--a){let s=r[a];PI(s,n)&&(i=s.level)}t=t.parent}return i}function SV(e,t,n){if(!t)return;let i,o=!1;for(i=0;i<n.length;++i)o=o||$ie(t.extent,n[i]);if(!o)return;let r=t.rectangles;for(i=0;i<r.length;++i){let a=r[i];e[a.level]||(e[a.level]=n),e[a.level]=AFt(e[a.level],a)}SV(e,t._nw,n),SV(e,t._ne,n),SV(e,t._sw,n),SV(e,t._se,n)}function AFt(e,t){let n=[];for(let i=0;i<e.length;++i){let o=e[i];$ie(o,t)?(o.west<t.west&&n.push(new oe(o.west,o.south,t.west,o.north)),o.east>t.east&&n.push(new oe(t.east,o.south,o.east,o.north)),o.south<t.south&&n.push(new oe(Math.max(t.west,o.west),o.south,Math.min(t.east,o.east),t.south)),o.north>t.north&&n.push(new oe(Math.max(t.west,o.west),t.north,Math.min(t.east,o.east),o.north))):n.push(o)}return n}var Zm=RI;function yFt(e){this.resource=e.resource,this.version=e.version,this.isHeightmap=e.isHeightmap,this.tileUrlTemplates=e.tileUrlTemplates,this.availability=e.availability,this.hasVertexNormals=e.hasVertexNormals,this.hasWaterMask=e.hasWaterMask,this.hasMetadata=e.hasMetadata,this.availabilityLevels=e.availabilityLevels,this.availabilityTilesLoaded=e.availabilityTilesLoaded,this.littleEndianExtensionSize=e.littleEndianExtensionSize,this.availabilityPromiseCache={}}function XRe(e){this.requestVertexNormals=e.requestVertexNormals??!1,this.requestWaterMask=e.requestWaterMask??!1,this.requestMetadata=e.requestMetadata??!0,this.ellipsoid=e.ellipsoid??te.default,this.heightmapWidth=65,this.heightmapStructure=void 0,this.hasWaterMask=!1,this.hasMetadata=!1,this.hasVertexNormals=!1,this.scheme=void 0,this.lastResource=void 0,this.layerJsonResource=void 0,this.previousError=void 0,this.availability=void 0,this.tilingScheme=void 0,this.levelZeroMaximumGeometricError=void 0,this.heightmapStructure=void 0,this.layers=[],this.attribution="",this.overallAvailability=[],this.overallMaxZoom=0,this.tileCredits=[]}XRe.prototype.build=function(e){e._heightmapWidth=this.heightmapWidth,e._scheme=this.scheme;let t=l(this.lastResource.credits)?this.lastResource.credits:[];e._tileCredits=t.concat(this.tileCredits),e._availability=this.availability,e._tilingScheme=this.tilingScheme,e._requestWaterMask=this.requestWaterMask,e._levelZeroMaximumGeometricError=this.levelZeroMaximumGeometricError,e._heightmapStructure=this.heightmapStructure,e._layers=this.layers,e._hasWaterMask=this.hasWaterMask,e._hasVertexNormals=this.hasVertexNormals,e._hasMetadata=this.hasMetadata};async function KRe(e,t,n){if(!t.format){let A="The tile format is not specified in the layer.json file.";throw e.previousError=Go.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,A),new re(A)}if(!t.tiles||t.tiles.length===0){let A="The layer.json file does not specify any tile URL templates.";throw e.previousError=Go.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,A),new re(A)}let i=!1,o=!1,r=!1,a=!0,s=!1;if(t.format==="heightmap-1.0")s=!0,l(e.heightmapStructure)||(e.heightmapStructure={heightScale:1/5,heightOffset:-1e3,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1,lowestEncodedHeight:0,highestEncodedHeight:256*256-1}),o=!0,e.requestWaterMask=!0;else if(t.format.indexOf("quantized-mesh-1.")!==0){let A=`The tile format "${t.format}" is invalid or not supported.`;throw e.previousError=Go.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,A),new re(A)}let c=t.tiles,u=t.maxzoom;if(e.overallMaxZoom=Math.max(e.overallMaxZoom,u),!t.projection||t.projection==="EPSG:4326")e.tilingScheme=new Wi({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:1,ellipsoid:e.ellipsoid});else if(t.projection==="EPSG:3857")e.tilingScheme=new vr({numberOfLevelZeroTilesX:1,numberOfLevelZeroTilesY:1,ellipsoid:e.ellipsoid});else{let A=`The projection "${t.projection}" is invalid or not supported.`;throw e.previousError=Go.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,A),new re(A)}if(e.levelZeroMaximumGeometricError=Uo.getEstimatedLevelZeroGeometricErrorForAHeightmap(e.tilingScheme.ellipsoid,e.heightmapWidth,e.tilingScheme.getNumberOfXTilesAtLevel(0)),!t.scheme||t.scheme==="tms"||t.scheme==="slippyMap")e.scheme=t.scheme;else{let A=`The scheme "${t.scheme}" is invalid or not supported.`;throw e.previousError=Go.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,A),new re(A)}let f;l(t.extensions)&&t.extensions.indexOf("octvertexnormals")!==-1?i=!0:l(t.extensions)&&t.extensions.indexOf("vertexnormals")!==-1&&(i=!0,a=!1),l(t.extensions)&&t.extensions.indexOf("watermask")!==-1&&(o=!0),l(t.extensions)&&t.extensions.indexOf("metadata")!==-1&&(r=!0);let d=t.metadataAvailability,p=t.available,g;if(l(p)&&!l(d)){g=new Zm(e.tilingScheme,p.length);for(let A=0;A<p.length;++A){let y=p[A],x=e.tilingScheme.getNumberOfYTilesAtLevel(A);l(e.overallAvailability[A])||(e.overallAvailability[A]=[]);for(let b=0;b<y.length;++b){let C=y[b],E=x-C.endY-1,S=x-C.startY-1;e.overallAvailability[A].push([C.startX,E,C.endX,S]),g.addAvailableTileRange(A,C.startX,E,C.endX,S)}}}else l(d)&&(f=new Zm(e.tilingScheme,u),g=new Zm(e.tilingScheme,u),e.overallAvailability[0]=[[0,0,1,0]],g.addAvailableTileRange(0,0,0,1,0));e.hasWaterMask=e.hasWaterMask||o,e.hasVertexNormals=e.hasVertexNormals||i,e.hasMetadata=e.hasMetadata||r,l(t.attribution)&&(e.attribution.length>0&&(e.attribution+=" "),e.attribution+=t.attribution),e.layers.push(new yFt({resource:e.lastResource,version:t.version,isHeightmap:s,tileUrlTemplates:c,availability:g,hasVertexNormals:i,hasWaterMask:o,hasMetadata:r,availabilityLevels:d,availabilityTilesLoaded:f,littleEndianExtensionSize:a}));let m=t.parentUrl;return l(m)?l(g)?(e.lastResource=e.lastResource.getDerivedResource({url:m}),e.lastResource.appendForwardSlash(),e.layerJsonResource=e.lastResource.getDerivedResource({url:"layer.json"}),await eoe(e),!0):(console.log("A layer.json can't have a parentUrl if it does't have an available array."),!0):!0}function xFt(e,t,n){let i=`An error occurred while accessing ${e.layerJsonResource.url}.`;if(l(t)&&(i+=`
- ${t.message}`),e.previousError=Go.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,i),e.previousError.retry)return eoe(e,n);throw new re(i)}async function bFt(e,t,n){await KRe(e,t,n);let i=e.overallAvailability.length;if(i>0){let o=e.availability=new Zm(e.tilingScheme,e.overallMaxZoom);for(let r=0;r<i;++r){let a=e.overallAvailability[r];for(let s=0;s<a.length;++s){let c=a[s];o.addAvailableTileRange(r,c[0],c[1],c[2],c[3])}}}if(e.attribution.length>0){let o=new yt(e.attribution);e.tileCredits.push(o)}return!0}async function eoe(e,t){try{let n=await e.layerJsonResource.fetchJson();return bFt(e,n,t)}catch(n){return l(n)&&n.statusCode===404?(await KRe(e,{tilejson:"2.1.0",format:"heightmap-1.0",version:"1.0.0",scheme:"tms",tiles:["{z}/{x}/{y}.terrain?v={version}"]},t),!0):xFt(e,n,t)}}function ep(e){e=e??G.EMPTY_OBJECT,this._heightmapWidth=void 0,this._heightmapStructure=void 0,this._hasWaterMask=!1,this._hasVertexNormals=!1,this._hasMetadata=!1,this._scheme=void 0,this._ellipsoid=e.ellipsoid,this._requestVertexNormals=e.requestVertexNormals??!1,this._requestWaterMask=e.requestWaterMask??!1,this._requestMetadata=e.requestMetadata??!0,this._errorEvent=new ye;let t=e.credit;typeof t=="string"&&(t=new yt(t)),this._credit=t,this._availability=void 0,this._tilingScheme=void 0,this._levelZeroMaximumGeometricError=void 0,this._layers=void 0,this._tileCredits=void 0}var Jie={OCT_VERTEX_NORMALS:1,WATER_MASK:2,METADATA:4};function YRe(e){return!l(e)||e.length===0?{Accept:"application/vnd.quantized-mesh,application/octet-stream;q=0.9,*/*;q=0.01"}:{Accept:`application/vnd.quantized-mesh;extensions=${e.join("-")},application/octet-stream;q=0.9,*/*;q=0.01`}}function CFt(e,t,n,i,o){let r=new Uint16Array(t,0,e._heightmapWidth*e._heightmapWidth);return new kc({buffer:r,childTileMask:new Uint8Array(t,r.byteLength,1)[0],waterMask:new Uint8Array(t,r.byteLength+1,t.byteLength-r.byteLength-1),width:e._heightmapWidth,height:e._heightmapWidth,structure:e._heightmapStructure,credits:e._tileCredits})}function TFt(e,t,n,i,o,r){let a=r.littleEndianExtensionSize,s=0,c=3,u=c+1,f=Float64Array.BYTES_PER_ELEMENT*c,d=Float64Array.BYTES_PER_ELEMENT*u,g=Uint16Array.BYTES_PER_ELEMENT*3,m=3,A=Uint16Array.BYTES_PER_ELEMENT,y=A*m,x=new DataView(t),b=new h(x.getFloat64(s,!0),x.getFloat64(s+8,!0),x.getFloat64(s+16,!0));s+=f;let C=x.getFloat32(s,!0);s+=Float32Array.BYTES_PER_ELEMENT;let E=x.getFloat32(s,!0);s+=Float32Array.BYTES_PER_ELEMENT;let S=new ce(new h(x.getFloat64(s,!0),x.getFloat64(s+8,!0),x.getFloat64(s+16,!0)),x.getFloat64(s+f,!0));s+=d;let w=new h(x.getFloat64(s,!0),x.getFloat64(s+8,!0),x.getFloat64(s+16,!0));s+=f;let P=x.getUint32(s,!0);s+=Uint32Array.BYTES_PER_ELEMENT;let R=new Uint16Array(t,s,P*3);s+=P*g,P>64*1024&&(A=Uint32Array.BYTES_PER_ELEMENT,y=A*m);let B=R.subarray(0,P),L=R.subarray(P,2*P),_=R.subarray(P*2,3*P);nn.zigZagDeltaDecode(B,L,_),s%A!==0&&(s+=A-s%A);let T=x.getUint32(s,!0);s+=Uint32Array.BYTES_PER_ELEMENT;let v=Ue.createTypedArrayFromArrayBuffer(P,t,s,T*m);s+=T*y;let I=0,O=v.length;for(let ae=0;ae<O;++ae){let be=v[ae];v[ae]=I-be,be===0&&++I}let N=x.getUint32(s,!0);s+=Uint32Array.BYTES_PER_ELEMENT;let j=Ue.createTypedArrayFromArrayBuffer(P,t,s,N);s+=N*A;let k=x.getUint32(s,!0);s+=Uint32Array.BYTES_PER_ELEMENT;let U=Ue.createTypedArrayFromArrayBuffer(P,t,s,k);s+=k*A;let F=x.getUint32(s,!0);s+=Uint32Array.BYTES_PER_ELEMENT;let H=Ue.createTypedArrayFromArrayBuffer(P,t,s,F);s+=F*A;let q=x.getUint32(s,!0);s+=Uint32Array.BYTES_PER_ELEMENT;let J=Ue.createTypedArrayFromArrayBuffer(P,t,s,q);s+=q*A;let W,Z;for(;s<x.byteLength;){let ae=x.getUint8(s,!0);s+=Uint8Array.BYTES_PER_ELEMENT;let be=x.getUint32(s,a);if(s+=Uint32Array.BYTES_PER_ELEMENT,ae===Jie.OCT_VERTEX_NORMALS&&e._requestVertexNormals)W=new Uint8Array(t,s,P*2);else if(ae===Jie.WATER_MASK&&e._requestWaterMask)Z=new Uint8Array(t,s,be);else if(ae===Jie.METADATA&&e._requestMetadata){let ge=x.getUint32(s,!0);if(ge>0){let Ee=Cr(new Uint8Array(t),s+Uint32Array.BYTES_PER_ELEMENT,ge).available;if(l(Ee))for(let Be=0;Be<Ee.length;++Be){let ke=n+Be+1,Ge=Ee[Be],rt=e._tilingScheme.getNumberOfYTilesAtLevel(ke);for(let et=0;et<Ge.length;++et){let Pe=Ge[et],Ye=rt-Pe.endY-1,ut=rt-Pe.startY-1;e.availability.addAvailableTileRange(ke,Pe.startX,Ye,Pe.endX,ut),r.availability.addAvailableTileRange(ke,Pe.startX,Ye,Pe.endX,ut)}}}r.availabilityTilesLoaded.addAvailableTileRange(n,i,o,i,o)}s+=be}let K=e.getLevelMaximumGeometricError(n)*5,le=e._tilingScheme.tileXYToRectangle(i,o,n),me=Qt.fromRectangle(le,C,E,e._tilingScheme.ellipsoid);return new YT({center:b,minimumHeight:C,maximumHeight:E,boundingSphere:S,orientedBoundingBox:me,horizonOcclusionPoint:w,quantizedVertices:R,encodedNormals:W,indices:v,westIndices:j,southIndices:U,eastIndices:H,northIndices:J,westSkirtHeight:K,southSkirtHeight:K,eastSkirtHeight:K,northSkirtHeight:K,childTileMask:e.availability.computeChildMaskForTile(n,i,o),waterMask:Z,credits:e._tileCredits})}ep.prototype.requestTileGeometry=function(e,t,n,i){let o=this._layers,r,a=o.length,s=!1,c=Promise.resolve();if(a===1)r=o[0];else for(let u=0;u<a;++u){let f=o[u];if(!l(f.availability)||f.availability.isTileAvailable(n,e,t)){r=f;break}let d=toe(this,e,t,n,f,u===0);d.result&&(s=!0,c=c.then(()=>d.promise))}return!l(r)&&s?c.then(()=>new Promise(u=>{setTimeout(()=>{let f=this.requestTileGeometry(e,t,n,i);u(f)},0)})):QRe(this,e,t,n,r,i)};function QRe(e,t,n,i,o,r){if(!l(o))return Promise.reject(new re("Terrain tile doesn't exist"));let a=o.tileUrlTemplates;if(a.length===0)return;let s;!e._scheme||e._scheme==="tms"?s=e._tilingScheme.getNumberOfYTilesAtLevel(i)-n-1:s=n;let c=[];e._requestVertexNormals&&o.hasVertexNormals&&c.push(o.littleEndianExtensionSize?"octvertexnormals":"vertexnormals"),e._requestWaterMask&&o.hasWaterMask&&c.push("watermask"),e._requestMetadata&&o.hasMetadata&&c.push("metadata");let u,f,d=a[(t+s+i)%a.length],p=o.resource;l(p._ionEndpoint)&&!l(p._ionEndpoint.externalType)?(c.length!==0&&(f={extensions:c.join("-")}),u=YRe(void 0)):u=YRe(c);let g=p.getDerivedResource({url:d,templateValues:{version:o.version,z:i,x:t,y:s},queryParameters:f,headers:u,request:r}).fetchArrayBuffer();if(l(g))return g.then(function(m){return l(m)?l(e._heightmapStructure)?CFt(e,m,i,t,n):TFt(e,m,i,t,n,o):Promise.reject(new re("Mesh buffer doesn't exist."))})}Object.defineProperties(ep.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},hasWaterMask:{get:function(){return this._hasWaterMask&&this._requestWaterMask}},hasVertexNormals:{get:function(){return this._hasVertexNormals&&this._requestVertexNormals}},hasMetadata:{get:function(){return this._hasMetadata&&this._requestMetadata}},requestVertexNormals:{get:function(){return this._requestVertexNormals}},requestWaterMask:{get:function(){return this._requestWaterMask}},requestMetadata:{get:function(){return this._requestMetadata}},availability:{get:function(){return this._availability}}});ep.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};ep.fromIonAssetId=async function(e,t){let n=await ha.fromAssetId(e);return ep.fromUrl(n,t)};ep.fromUrl=async function(e,t){t=t??G.EMPTY_OBJECT,e=await Promise.resolve(e);let n=De.createIfNeeded(e);n.appendForwardSlash();let i=new XRe(t);i.lastResource=n,i.layerJsonResource=i.lastResource.getDerivedResource({url:"layer.json"}),await eoe(i);let o=new ep(t);return i.build(o),o};ep.prototype.getTileDataAvailable=function(e,t,n){if(!l(this._availability))return;if(n>this._availability._maximumLevel)return!1;if(this._availability.isTileAvailable(n,e,t))return!0;if(!this._hasMetadata)return!1;let i=this._layers,o=i.length;for(let r=0;r<o;++r)if(toe(this,e,t,n,i[r],r===0).result)return;return!1};ep.prototype.loadTileDataAvailability=function(e,t,n){if(!l(this._availability)||n>this._availability._maximumLevel||this._availability.isTileAvailable(n,e,t)||!this._hasMetadata)return;let i=this._layers,o=i.length;for(let r=0;r<o;++r){let a=toe(this,e,t,n,i[r],r===0);if(l(a.promise))return a.promise}};function Zie(e,t,n,i){if(i===0)return;let o=e.availabilityLevels,r=i%o===0?i-o:(i/o|0)*o,a=1<<i-r,s=t/a|0,c=n/a|0;return{level:r,x:s,y:c}}function toe(e,t,n,i,o,r){if(!l(o.availabilityLevels))return{result:!1};let a,s=function(){delete o.availabilityPromiseCache[a]},c=o.availabilityTilesLoaded,u=o.availability,f=Zie(o,t,n,i);for(;l(f);){if(u.isTileAvailable(f.level,f.x,f.y)&&!c.isTileAvailable(f.level,f.x,f.y)){let d;if(!r&&(a=`${f.level}-${f.x}-${f.y}`,d=o.availabilityPromiseCache[a],!l(d))){let p=new _r({throttle:!1,throttleByServer:!0,type:qa.TERRAIN});d=QRe(e,f.x,f.y,f.level,o,p),l(d)&&(o.availabilityPromiseCache[a]=d,d.then(s))}return{result:!0,promise:d}}f=Zie(o,f.x,f.y,f.level)}return{result:!1}}ep._getAvailabilityTile=Zie;var KT=ep;function EFt(e){return e=e??G.EMPTY_OBJECT,KT.fromIonAssetId(2426648,{requestVertexNormals:e.requestVertexNormals??!1})}var wV=EFt;function vFt(e){return e=e??G.EMPTY_OBJECT,KT.fromIonAssetId(1,{requestVertexNormals:e.requestVertexNormals??!1,requestWaterMask:e.requestWaterMask??!1,ellipsoid:te.WGS84})}var QT=vFt;function OI(e){this._ready=!1,this._provider=void 0,this._errorEvent=new ye,this._readyEvent=new ye,wFt(this,e)}Object.defineProperties(OI.prototype,{errorEvent:{get:function(){return this._errorEvent}},readyEvent:{get:function(){return this._readyEvent}},ready:{get:function(){return this._ready}},provider:{get:function(){return this._provider}}});OI.fromWorldTerrain=function(e){return new OI(QT(e))};OI.fromWorldBathymetry=function(e){return new OI(wV(e))};function SFt(e,t){e.numberOfListeners>0?e.raiseEvent(t):console.error(t)}async function wFt(e,t){let n;try{n=await Promise.resolve(t),e._provider=n,e._ready=!0,e._readyEvent.raiseEvent(n)}catch(i){SFt(e._errorEvent,i)}}var IV=OI;function MI(){}MI.prototype.boundingVolume=void 0;MI.prototype.boundingSphere=void 0;MI.prototype.distanceToCamera=function(e){_e.throwInstantiationError()};MI.prototype.intersectPlane=function(e){_e.throwInstantiationError()};MI.prototype.createDebugVolume=function(e){_e.throwInstantiationError()};var noe=MI;function DV(e){e=e??G.EMPTY_OBJECT,this._tilingScheme=l(e.tilingScheme)?e.tilingScheme:new Wi({ellipsoid:e.ellipsoid}),this._color=e.color??V.YELLOW,this._errorEvent=new ye,this._tileWidth=e.tileWidth??256,this._tileHeight=e.tileHeight??256,this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0}Object.defineProperties(DV.prototype,{proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){}},minimumLevel:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}}});DV.prototype.getTileCredits=function(e,t,n){};DV.prototype.requestImage=function(e,t,n,i){let o=document.createElement("canvas");o.width=256,o.height=256;let r=o.getContext("2d"),a=this._color.toCssColorString();return r.strokeStyle=a,r.lineWidth=2,r.strokeRect(1,1,255,255),r.font="bold 25px Arial",r.textAlign="center",r.fillStyle=a,r.fillText(`L: ${n}`,124,86),r.fillText(`X: ${e}`,124,136),r.fillText(`Y: ${t}`,124,186),Promise.resolve(o)};DV.prototype.pickFeatures=function(e,t,n,i,o){};var PV=DV;function ioe(e){_e.throwInstantiationError()}ioe.prototype.isReady=_e.throwInstantiationError;ioe.prototype.shouldDiscardImage=_e.throwInstantiationError;var ooe=ioe;var $Re={START:0,LOADING:1,READY:2,UPSAMPLED_ONLY:3};Object.freeze($Re);var roe=$Re;function d9(e,t){this.show=!0,l(e)||(e=new Je),this.rectangle=Je.clone(e),l(t)||(t=Hi.fromType(Hi.ColorType,{color:new V(1,1,1,1)})),this.material=t,this._material=void 0,this._overlayCommand=void 0,this._rs=void 0}d9.prototype.update=function(e){if(!this.show)return;let t=this._rs;if((!l(t)||!Je.equals(t.viewport,this.rectangle))&&(this._rs=Ve.fromCache({blending:Jt.ALPHA_BLEND,viewport:this.rectangle})),e.passes.render){let i=e.context;if(this._material!==this.material||!l(this._overlayCommand)){this._material=this.material,l(this._overlayCommand)&&this._overlayCommand.shaderProgram.destroy();let o=new He({sources:[this._material.shaderSource,KU]});this._overlayCommand=i.createViewportQuadCommand(o,{renderState:this._rs,uniformMap:this._material._uniforms,owner:this}),this._overlayCommand.pass=Ie.OVERLAY}this._material.update(i),this._overlayCommand.renderState=this._rs,this._overlayCommand.uniformMap=this._material._uniforms,e.commandList.push(this._overlayCommand)}};d9.prototype.isDestroyed=function(){return!1};d9.prototype.destroy=function(){return l(this._overlayCommand)&&(this._overlayCommand.shaderProgram=this._overlayCommand.shaderProgram&&this._overlayCommand.shaderProgram.destroy()),fe(this)};var aoe=d9;var soe=class{constructor(){lt(this,"globalTransform");lt(this,"shapeTransform");lt(this,"shape");lt(this,"minBounds");lt(this,"maxBounds");lt(this,"dimensions");lt(this,"paddingBefore");lt(this,"paddingAfter");lt(this,"names");lt(this,"types");lt(this,"componentTypes");lt(this,"minimumValues");lt(this,"maximumValues");lt(this,"maximumTileCount");lt(this,"availableLevels");lt(this,"keyframeCount");lt(this,"timeIntervalCollection");_e.throwInstantiationError()}requestData(t){_e.throwInstantiationError()}},coe=soe;function F_(){_e.throwInstantiationError()}Object.defineProperties(F_.prototype,{orientedBoundingBox:{get:_e.throwInstantiationError},boundingSphere:{get:_e.throwInstantiationError},boundTransform:{get:_e.throwInstantiationError},shapeTransform:{get:_e.throwInstantiationError},shaderUniforms:{get:_e.throwInstantiationError},shaderDefines:{get:_e.throwInstantiationError},shaderMaximumIntersectionsLength:{get:_e.throwInstantiationError}});F_.prototype.update=_e.throwInstantiationError;F_.prototype.updateViewTransforms=_e.throwInstantiationError;F_.prototype.convertLocalToShapeUvSpace=_e.throwInstantiationError;F_.prototype.computeOrientedBoundingBoxForTile=_e.throwInstantiationError;F_.prototype.computeOrientedBoundingBoxForSample=_e.throwInstantiationError;F_.DefaultMinBounds=_e.throwInstantiationError;F_.DefaultMaxBounds=_e.throwInstantiationError;var loe=F_;var IFt=new V,DFt=new V,PFt=new V,RFt=new V,JRe=new se,RV=new Uint8Array(4);function ZRe(e,t,n,i){let o=t.height===n.height?0:(e-t.height)/(n.height-t.height);return V.lerp(t.color,n.color,o,i)}function h9(e,t){return{height:e,color:V.clone(t)}}function eOe(e){return e=e.filter(function(t,n,i){let o=n>0,r=n<i.length-1,a=o?t.height===i[n-1].height:!0,s=r?t.height===i[n+1].height:!0;return!a||!s}),e=e.filter(function(t,n,i){let o=n>0,r=n<i.length-1,a=o?V.equals(t.color,i[n-1].color):!1,s=r?V.equals(t.color,i[n+1].color):!1;return!a||!s}),e=e.filter(function(t,n,i){let o=n>0,r=o?V.equals(t.color,i[n-1].color):!1,a=o?t.height===i[n-1].height:!0;return!r||!a}),e}function OFt(e){let t,n,i=[],o=e.length;for(t=0;t<o;t++){let r=e[t],a=r.entries,s=a.length,c=[];for(n=0;n<s;n++){let g=a[n],m=D.clamp(g.height,af._minimumHeight,af._maximumHeight),A=V.clone(g.color,IFt);A.red*=A.alpha,A.green*=A.alpha,A.blue*=A.alpha,c.push(h9(m,A))}let u=!0,f=!0;for(n=0;n<s-1;n++){let g=c[n+0],m=c[n+1];u=u&&g.height<=m.height,f=f&&g.height>=m.height}f?c=c.reverse():u||s0(c,function(g,m){return D.sign(g.height-m.height)});let d=r.extendDownwards??!1,p=r.extendUpwards??!1;c.length===1&&!d&&!p&&(d=!0,p=!0),d&&c.splice(0,0,h9(af._minimumHeight,c[0].color)),p&&c.splice(c.length,0,h9(af._maximumHeight,c[c.length-1].color)),c=eOe(c),i.push(c)}return i}function MFt(e){let t=OFt(e),n=[],i=[],o;function r(u,f){n.push(h9(u,f))}function a(u,f,d){let p=V.multiplyByScalar(d,1-f.alpha,RFt);p=V.add(p,f,p),r(u,p)}let s=t.length;for(o=0;o<s;o++){let u=t[o],f=0,d=0;i=n,n=[];let p=u.length,g=i.length;for(;f<p||d<g;){let m=f<p?u[f]:void 0,A=f>0?u[f-1]:void 0,y=f<p-1?u[f+1]:void 0,x=d<g?i[d]:void 0,b=d>0?i[d-1]:void 0,C=d<g-1?i[d+1]:void 0;if(l(m)&&l(x)&&m.height===x.height){let E=l(C)&&x.height===C.height,S=!l(b),w=!l(C),P=l(y)&&m.height===y.height,R=!l(A),B=!l(y);E?P?(a(m.height,m.color,x.color),a(m.height,y.color,C.color)):R?(r(m.height,x.color),a(m.height,m.color,C.color)):B?(a(m.height,m.color,x.color),r(m.height,C.color)):(a(m.height,m.color,x.color),a(m.height,m.color,C.color)):S?P?(r(m.height,m.color),a(m.height,y.color,x.color)):B?(r(m.height,m.color),r(m.height,x.color)):(R||r(m.height,m.color),a(m.height,m.color,x.color)):w?P?(a(m.height,m.color,x.color),r(m.height,y.color)):R?(r(m.height,x.color),r(m.height,m.color)):B?a(m.height,m.color,x.color):(a(m.height,m.color,x.color),r(m.height,m.color)):P?(a(m.height,m.color,x.color),a(m.height,y.color,x.color)):R?(r(m.height,x.color),a(m.height,m.color,x.color)):B?(a(m.height,m.color,x.color),r(m.height,x.color)):a(m.height,m.color,x.color),f+=P?2:1,d+=E?2:1}else if(l(m)&&l(x)&&l(b)&&m.height<x.height){let E=ZRe(m.height,b,x,PFt);l(A)?l(y)?a(m.height,m.color,E):(a(m.height,m.color,E),r(m.height,E)):(r(m.height,E),a(m.height,m.color,E)),f++}else if(l(x)&&l(m)&&l(A)&&x.height<m.height){let E=ZRe(x.height,A,m,DFt);l(b)?l(C)?a(x.height,E,x.color):(a(x.height,E,x.color),r(x.height,E)):(r(x.height,E),a(x.height,E,x.color)),d++}else l(m)&&(!l(x)||m.height<x.height)?(l(x)&&!l(b)&&!l(y)?(r(m.height,m.color),r(m.height,af._emptyColor),r(x.height,af._emptyColor)):(!l(x)&&l(b)&&!l(A)&&(r(b.height,af._emptyColor),r(m.height,af._emptyColor)),r(m.height,m.color)),f++):l(x)&&(!l(m)||x.height<m.height)&&(r(x.height,x.color),d++)}}return eOe(n)}function af(e){let{scene:t,layers:n}=e??G.EMPTY_OBJECT,{context:i}=t,o=MFt(n),r=o.length,a,s,c;if(!af._useFloatTexture(i)){s=je.UNSIGNED_BYTE,c=Xe.RGBA,a=new Uint8Array(r*4);for(let g=0;g<r;g++)se.packFloat(o[g].height,JRe),se.pack(JRe,a,g*4)}else{s=je.FLOAT,c=i.webgl2?Xe.RED:Xe.LUMINANCE,a=new Float32Array(r);for(let g=0;g<r;g++)a[g]=o[g].height}let f=It.create({context:i,pixelFormat:c,pixelDatatype:s,source:{arrayBufferView:a,width:r,height:1},sampler:new jt({wrapS:un.CLAMP_TO_EDGE,wrapT:un.CLAMP_TO_EDGE,minificationFilter:Vt.NEAREST,magnificationFilter:ti.NEAREST})}),d=new Uint8Array(r*4);for(let g=0;g<r;g++)o[g].color.toBytes(RV),d[g*4+0]=RV[0],d[g*4+1]=RV[1],d[g*4+2]=RV[2],d[g*4+3]=RV[3];let p=It.create({context:i,pixelFormat:Xe.RGBA,pixelDatatype:je.UNSIGNED_BYTE,source:{arrayBufferView:d,width:r,height:1},sampler:new jt({wrapS:un.CLAMP_TO_EDGE,wrapT:un.CLAMP_TO_EDGE,minificationFilter:Vt.LINEAR,magnificationFilter:ti.LINEAR})});return Hi.fromType("ElevationBand",{heights:f,colors:p})}af._useFloatTexture=function(e){return e.floatingPointTexture};af._maximumHeight=5906376425472;af._minimumHeight=-5906376425472;af._emptyColor=new V(0,0,0,0);var uoe=af;async function BFt(e,t){t=t??{},t.cacheBytes=t.cacheBytes??1536*1024*1024,t.maximumCacheOverflowBytes=t.maximumCacheOverflowBytes??1024*1024*1024,t.enableCollision=t.enableCollision??!0,e=e??G.EMPTY_OBJECT,e.onlyUsingWithGoogleGeocoder||_t("google-tiles-with-google-geocoder","Only the Google geocoder can be used with Google Photorealistic 3D Tiles. Set the `geocode` property of Viewer constructor options. You can set additionalOptions.onlyUsingWithGoogleGeocoder to hide this warning once you have configured the geocoder.");let n=e.key??ps.defaultApiKey;if(!l(n))return LFt(t);let i,o=ps.getDefaultCredit();l(o)&&(i=[o]);let r=new De({url:`${ps.mapTilesApiEndpoint}v1/3dtiles/root.json`,queryParameters:{key:n},credits:i});return xa.fromUrl(r,t)}var tOe={};async function LFt(e){let i=tOe[2275207];l(i)||(i=ha.fromAssetId(2275207),tOe[2275207]=i);let o=await i;return xa.fromUrl(o,e)}var foe=BFt;async function NFt(e){let t=await xa.fromIonAssetId(96188,e);e=e??G.EMPTY_OBJECT;let n=e.style;if(!l(n)){let i=(e.defaultColor??V.WHITE).toCssColorString();n=new Fg({color:`Boolean(\${feature['cesium#color']}) ? color(\${feature['cesium#color']}) : ${i}`})}return t.style=n,t}var doe=NFt;function FFt(e){e=e??G.EMPTY_OBJECT;let t=[],n=e.geometry;(!l(n.attributes)||!l(n.primitiveType))&&(n=n.constructor.createGeometry(n));let i=n.attributes,o=M.clone(e.modelMatrix??M.IDENTITY),r=e.length??1e4;if(l(i.normal)&&t.push(new Ot({geometry:kn.createLineSegmentsForVectors(n,"normal",r),attributes:{color:new Yt(1,0,0,1)},modelMatrix:o})),l(i.tangent)&&t.push(new Ot({geometry:kn.createLineSegmentsForVectors(n,"tangent",r),attributes:{color:new Yt(0,1,0,1)},modelMatrix:o})),l(i.bitangent)&&t.push(new Ot({geometry:kn.createLineSegmentsForVectors(n,"bitangent",r),attributes:{color:new Yt(0,0,1,1)},modelMatrix:o})),t.length>0)return new Dn({asynchronous:!1,geometryInstances:t,appearance:new dn({flat:!0,translucent:!1})})}var hoe=FFt;var kFt=15;function nOe(e){this.ellipsoid=e.ellipsoid??te.default,this.credit=void 0,this.tilingScheme=void 0,this.height=void 0,this.width=void 0,this.encoding=void 0,this.lodCount=void 0,this.hasAvailability=!1,this.tilesAvailable=void 0,this.tilesAvailabilityLoaded=void 0,this.levelZeroMaximumGeometricError=void 0,this.terrainDataStructure=void 0}nOe.prototype.build=function(e){e._credit=this.credit,e._tilingScheme=this.tilingScheme,e._height=this.height,e._width=this.width,e._encoding=this.encoding,e._lodCount=this.lodCount,e._hasAvailability=this.hasAvailability,e._tilesAvailable=this.tilesAvailable,e._tilesAvailabilityLoaded=this.tilesAvailabilityLoaded,e._levelZeroMaximumGeometricError=this.levelZeroMaximumGeometricError,e._terrainDataStructure=this.terrainDataStructure};function zFt(e,t){let n=t.copyrightText;l(n)&&(e.credit=new yt(n));let i=t.spatialReference,o=i.latestWkid??i.wkid,r=t.extent,a={ellipsoid:e.ellipsoid};if(o===4326)a.rectangle=oe.fromDegrees(r.xmin,r.ymin,r.xmax,r.ymax),e.tilingScheme=new Wi(a);else if(o===3857){let u=Math.PI*e.ellipsoid.maximumRadius;t.extent.xmax>u&&(t.extent.xmax=u),t.extent.ymax>u&&(t.extent.ymax=u),t.extent.xmin<-u&&(t.extent.xmin=-u),t.extent.ymin<-u&&(t.extent.ymin=-u),a.rectangleSouthwestInMeters=new z(r.xmin,r.ymin),a.rectangleNortheastInMeters=new z(r.xmax,r.ymax),e.tilingScheme=new vr(a)}else throw new re("Invalid spatial reference");let s=t.tileInfo;if(!l(s))throw new re("tileInfo is required");e.width=s.rows+1,e.height=s.cols+1,e.encoding=s.format==="LERC"?sh.LERC:sh.NONE,e.lodCount=s.lods.length-1,(e.hasAvailability=t.capabilities.indexOf("Tilemap")!==-1)&&(e.tilesAvailable=new Zm(e.tilingScheme,e.lodCount),e.tilesAvailable.addAvailableTileRange(0,0,0,e.tilingScheme.getNumberOfXTilesAtLevel(0),e.tilingScheme.getNumberOfYTilesAtLevel(0)),e.tilesAvailabilityLoaded=new Zm(e.tilingScheme,e.lodCount)),e.levelZeroMaximumGeometricError=Uo.getEstimatedLevelZeroGeometricErrorForAHeightmap(e.tilingScheme.ellipsoid,e.width,e.tilingScheme.getNumberOfXTilesAtLevel(0)),t.bandCount>1&&console.log("ArcGISTiledElevationTerrainProvider: Terrain data has more than 1 band. Using the first one."),l(t.minValues)&&l(t.maxValues)?e.terrainDataStructure={elementMultiplier:1,lowestEncodedHeight:t.minValues[0],highestEncodedHeight:t.maxValues[0]}:e.terrainDataStructure={elementMultiplier:1}}async function UFt(e,t,n){try{let i=await t.fetchJson();zFt(e,i)}catch(i){let o=`An error occurred while accessing ${t}.`;throw Go.reportError(void 0,n,l(n)?n._errorEvent:void 0,o),i}}function Jy(e){e=e??G.EMPTY_OBJECT,this._resource=void 0,this._credit=void 0,this._tilingScheme=void 0,this._levelZeroMaximumGeometricError=void 0,this._maxLevel=void 0,this._terrainDataStructure=void 0,this._width=void 0,this._height=void 0,this._encoding=void 0,this._lodCount=void 0,this._hasAvailability=!1,this._tilesAvailable=void 0,this._tilesAvailabilityLoaded=void 0,this._availableCache={},this._errorEvent=new ye}Object.defineProperties(Jy.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){return this._tilesAvailable}}});Jy.fromUrl=async function(e,t){t=t??G.EMPTY_OBJECT,e=await Promise.resolve(e);let n=De.createIfNeeded(e);n.appendForwardSlash(),l(t.token)&&(n=n.getDerivedResource({queryParameters:{token:t.token}}));let i=n.getDerivedResource({queryParameters:{f:"pjson"}}),o=new nOe(t);await UFt(o,i);let r=new Jy(t);return o.build(r),r._resource=n,r};Jy.prototype.requestTileGeometry=function(e,t,n,i){let o=this._resource.getDerivedResource({url:`tile/${n}/${t}/${e}`,request:i}),r=this._hasAvailability,a=Promise.resolve(!0),s;if(r&&!l(moe(this,n+1,e*2,t*2))){let d=iOe(this,n+1,e*2,t*2);a=d.promise,s=d.request}let c=o.fetchArrayBuffer();if(!l(c)||!l(a))return;let u=this,f=this._tilesAvailable;return Promise.all([c,a]).then(function(d){return new kc({buffer:d[0],width:u._width,height:u._height,childTileMask:r?f.computeChildMaskForTile(n,e,t):kFt,structure:u._terrainDataStructure,encoding:u._encoding})}).catch(async function(d){if(l(s)&&s.state===di.CANCELLED){i.cancel();try{await i.deferred?.promise}catch{}return i.state=di.CANCELLED,Promise.reject(d)}return Promise.reject(d)})};function moe(e,t,n,i){if(!e._hasAvailability)return;let o=e._tilesAvailabilityLoaded,r=e._tilesAvailable;if(t>e._lodCount)return!1;if(r.isTileAvailable(t,n,i))return!0;if(o.isTileAvailable(t,n,i))return!1}Jy.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};Jy.prototype.getTileDataAvailable=function(e,t,n){if(!this._hasAvailability)return;let i=moe(this,n,e,t);if(l(i))return i;iOe(this,n,e,t)};Jy.prototype.loadTileDataAvailability=function(e,t,n){};function VFt(e,t,n,i){let o=t-1,r=n-1,a=i[e.y*t+e.x],s=[],c={startX:e.x,startY:e.y,endX:0,endY:0},u=new z(e.x+1,e.y+1),f=!1,d=!1;for(;!(f&&d);){let p=u.x,g=d?u.y+1:u.y;if(!f){for(let m=e.y;m<g;++m)if(i[m*t+u.x]!==a){f=!0;break}f?(s.push(new z(u.x,e.y)),--u.x,--p,c.endX=u.x):u.x===o?(c.endX=u.x,f=!0):++u.x}if(!d){let m=u.y*t;for(let A=e.x;A<=p;++A)if(i[m+A]!==a){d=!0;break}d?(s.push(new z(e.x,u.y)),--u.y,c.endY=u.y):u.y===r?(c.endY=u.y,d=!0):++u.y}}return{endingIndices:s,range:c,value:a}}function jFt(e,t,n,i,o){let r=[];if(o.every(function(c){return c===o[0]}))return o[0]===1&&r.push({startX:e,startY:t,endX:e+n-1,endY:t+i-1}),r;let s=[new z(0,0)];for(;s.length>0;){let c=s.pop(),u=VFt(c,n,i,o);if(u.value===1){let d=u.range;d.startX+=e,d.endX+=e,d.startY+=t,d.endY+=t,r.push(d)}let f=u.endingIndices;f.length>0&&(s=s.concat(f))}return r}function iOe(e,t,n,i){if(!e._hasAvailability)return{};let o=Math.floor(n/128)*128,r=Math.floor(i/128)*128,a=Math.min(1<<t,128),s=`tilemap/${t}/${r}/${o}/${a}/${a}`,c=e._availableCache;if(l(c[s]))return c[s];let u=new _r({throttle:!1,throttleByServer:!0,type:qa.TERRAIN}),d=e._resource.getDerivedResource({url:s,request:u}).fetchJson();return l(d)?(d=d.then(function(p){let g=jFt(o,r,a,a,p.data);e._tilesAvailabilityLoaded.addAvailableTileRange(t,o,r,o+a,r+a);let m=e._tilesAvailable;for(let A=0;A<g.length;++A){let y=g[A];m.addAvailableTileRange(t,y.startX,y.startY,y.endX,y.endY)}return moe(e,t,n,i)}),c[s]={promise:d,request:u},d=d.finally(function(p){return delete c[s],p}),{promise:d,request:u}):{}}var poe=Jy;var oOe="https://dev.virtualearth.net/REST/v1/Locations";function goe(e){e=e??G.EMPTY_OBJECT;let t=e.key;this._key=t;let n={key:t};l(e.culture)&&(n.culture=e.culture),this._resource=new De({url:oOe,queryParameters:n}),this._credit=new yt('<img src="http://dev.virtualearth.net/Branding/logo_powered_by.png"/>',!1)}Object.defineProperties(goe.prototype,{url:{get:function(){return oOe}},key:{get:function(){return this._key}},credit:{get:function(){return this._credit}}});goe.prototype.geocode=async function(e){return this._resource.getDerivedResource({queryParameters:{query:e}}).fetchJsonp("jsonp").then(function(n){return n.resourceSets.length===0?[]:n.resourceSets[0].resources.map(function(o){let r=o.bbox,a=r[0],s=r[1],c=r[2],u=r[3];return{displayName:o.name,destination:oe.fromDegrees(s,a,u,c)}})})};var _oe=goe;function Aoe(){}Object.defineProperties(Aoe.prototype,{credit:{get:function(){}}});Aoe.prototype.geocode=function(e){let t=e.match(/[^\s,\n]+/g);if(t.length===2||t.length===3){let n=+t[0],i=+t[1],o=t.length===3?+t[2]:300;if(isNaN(n)&&isNaN(i)){let r=/^(\d+.?\d*)([nsew])/i;for(let a=0;a<t.length;++a){let s=t[a].match(r);r.test(t[a])&&s.length===3&&(/^[ns]/i.test(s[2])?i=/^[n]/i.test(s[2])?+s[1]:-s[1]:/^[ew]/i.test(s[2])&&(n=/^[e]/i.test(s[2])?+s[1]:-s[1]))}}if(!isNaN(n)&&!isNaN(i)&&!isNaN(o)){let r={displayName:e,destination:h.fromDegrees(n,i,o)};return Promise.resolve([r])}}return Promise.resolve([])};var yoe=Aoe;var GFt=new se,rOe=new h,BI=new h;function HFt(e){let t=e.points,n=e.times;if(t.length<3){let i=n[0],o=1/(n[1]-i),r=t[0],a=t[1];return function(s,c){l(c)||(c=new h);let u=(s-i)*o;return h.lerp(r,a,u,c)}}return function(i,o){l(o)||(o=new h);let r=e._lastTimeIndex=e.findTimeInterval(i,e._lastTimeIndex),a=(i-n[r])/(n[r+1]-n[r]),s=GFt;s.z=a,s.y=a*a,s.x=s.y*a,s.w=1;let c,u,f,d,p;return r===0?(c=t[0],u=t[1],f=e.firstTangent,d=h.subtract(t[2],c,rOe),h.multiplyByScalar(d,.5,d),p=M.multiplyByVector(kA.hermiteCoefficientMatrix,s,s)):r===t.length-2?(c=t[r],u=t[r+1],d=e.lastTangent,f=h.subtract(u,t[r-1],rOe),h.multiplyByScalar(f,.5,f),p=M.multiplyByVector(kA.hermiteCoefficientMatrix,s,s)):(c=t[r-1],u=t[r],f=t[r+1],d=t[r+2],p=M.multiplyByVector(Zy.catmullRomCoefficientMatrix,s,s)),o=h.multiplyByScalar(c,p.x,o),h.multiplyByScalar(u,p.y,BI),h.add(o,BI,o),h.multiplyByScalar(f,p.z,BI),h.add(o,BI,o),h.multiplyByScalar(d,p.w,BI),h.add(o,BI,o)}}var WFt=new h,qFt=new h;function Zy(e){e=e??G.EMPTY_OBJECT;let t=e.points,n=e.times,i=e.firstTangent,o=e.lastTangent;if(t.length>2&&(l(i)||(i=WFt,h.multiplyByScalar(t[1],2,i),h.subtract(i,t[2],i),h.subtract(i,t[0],i),h.multiplyByScalar(i,.5,i)),!l(o))){let r=t.length-1;o=qFt,h.multiplyByScalar(t[r-1],2,o),h.subtract(t[r],o,o),h.add(o,t[r-2],o),h.multiplyByScalar(o,.5,o)}this._times=n,this._points=t,this._firstTangent=h.clone(i),this._lastTangent=h.clone(o),this._evaluateFunction=HFt(this),this._lastTimeIndex=0}Object.defineProperties(Zy.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},firstTangent:{get:function(){return this._firstTangent}},lastTangent:{get:function(){return this._lastTangent}}});Zy.catmullRomCoefficientMatrix=new M(-.5,1,-.5,0,1.5,-2.5,0,1,-1.5,2,.5,0,.5,-.5,0,0);Zy.prototype.findTimeInterval=xo.prototype.findTimeInterval;Zy.prototype.wrapTime=xo.prototype.wrapTime;Zy.prototype.clampTime=xo.prototype.clampTime;Zy.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)};var xoe=Zy;var boe={},YFt={positions:void 0,normals:void 0,indices:void 0,edgeIndicesWest:void 0,edgeIndicesSouth:void 0,edgeIndicesEast:void 0,edgeIndicesNorth:void 0},XFt=new de,KFt=new h,QFt=new M,$Ft=new M,JFt=new M,ZFt=new h,e2t=new h,t2t=new h,n2t=new h,i2t=new de,o2t=new z,OV=new h,r2t=new z,a2t=new h,s2t=new h,m9=function(e,t){return e-t};boe.createMesh=async function(e){e=e??G.EMPTY_OBJECT;let{exaggeration:t=1,exaggerationRelativeHeight:n=0,hasVertexNormals:i,hasWebMercatorT:o,gltf:r,minimumHeight:a,maximumHeight:s,skirtHeight:c}=e,f=t!==1,d=ce.clone(e.boundingSphere,new ce),p=Qt.clone(e.orientedBoundingBox,new Qt),g=h.clone(e.horizonOcclusionPoint,new h),m=te.clone(e.ellipsoid,new te),A=oe.clone(e.rectangle,new oe);await(r.extensionsRequired!==void 0&&r.extensionsRequired.indexOf("EXT_meshopt_compression")!==-1?bA.ready:Promise.resolve(void 0));let b=A.west,C=A.south,E=A.north,S=A.width,w=A.height,P=oe.center(A,XFt);P.height=.5*(a+s);let R=de.toCartesian(P,m,KFt),B=pt.eastNorthUpToFixedFrame(R,m,QFt),L=M.inverseTransformation(B,$Ft),_=M.unpack(r.nodes[0].matrix,0,JFt);_=M.multiply(Li.Y_UP_TO_Z_UP,_,_);let T=U2t(r,i,YFt),v=Uo.getSkirtVertexCount(T.edgeIndicesWest,T.edgeIndicesSouth,T.edgeIndicesEast,T.edgeIndicesNorth),I=T.positions,O=T.normals,N=T.indices,j=I.length/3,k=j+v,U=N.length,F=Uo.getSkirtIndexCountWithFilledCorners(v),H=k<=65535?Uint16Array:Uint32Array,q=new H(U+F);q.set(N);let J=new H(T.edgeIndicesWest),W=new H(T.edgeIndicesSouth),Z=new H(T.edgeIndicesEast),K=new H(T.edgeIndicesNorth),le=new H(J).sort(),me=new H(W).sort(),ae=new H(Z).sort(),be=new H(K).sort(),ge=li.geodeticLatitudeToMercatorAngle(C),Ee=1/(li.geodeticLatitudeToMercatorAngle(E)-ge),Be=h.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,ZFt),ke=h.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,e2t),Ge=new dr(d.center,void 0,void 0,void 0,void 0,i,o,f,t,n),rt=Ge.stride,et=new Float32Array(k*rt),Pe=0;for(let ut=0;ut<j;ut++){let Tt=h.unpack(I,ut*3,t2t),tn=M.multiplyByPoint(_,Tt,n2t),Ht=de.fromCartesian(tn,m,i2t),{longitude:xt,latitude:Pt,height:bn}=Ht,at=(xt-b)/S,st=(Pt-C)/w;at=D.clamp(at,0,1),st=D.clamp(st,0,1),_o(le,ut,m9)>=0?at=0:_o(ae,ut,m9)>=0&&(at=1),_o(me,ut,m9)>=0?st=0:_o(be,ut,m9)>=0&&(st=1);let Ln=z.fromElements(at,st,o2t),Nn;if(i){let ro=h.unpack(O,ut*3,OV);ro=M.multiplyByPointAsVector(_,ro,OV),ro=h.normalize(ro,OV),Nn=nn.octEncode(ro,r2t)}let uo;o&&(uo=(li.geodeticLatitudeToMercatorAngle(Pt)-ge)*Ee);let Yo;f&&(Yo=m.geodeticSurfaceNormal(tn,a2t)),Pe=Ge.encode(et,Pe,tn,Ln,bn,Nn,uo,Yo);let oo=M.multiplyByPoint(L,tn,s2t);Be=h.minimumByComponent(oo,Be,Be),ke=h.maximumByComponent(oo,ke,ke)}let Ye=new pc(h.clone(Ge.center,new h),et,q,U,j,a,s,A,ce.clone(d,new ce),h.clone(g,new h),rt,Qt.clone(p,new Qt),Ge,J,W,Z,K);return dOe(Ye,A,m,Be,ke,B,L,c),Promise.resolve(Ye)};var c2t=new z,l2t=new z,u2t=new Array(6),f2t=new z,d2t=new z,h2t=new z,m2t=new h,p2t=new h,g2t=new h,_2t=new de,A2t=new h,y2t=new de,x2t=new de,aOe=new h,b2t=new h,C2t=new h,T2t=new h,E2t=new h,v2t=new h,S2t=new h,w2t=new h,I2t=new M,D2t=new M,sOe=new z,P2t=new z,R2t=new h,O2t=new ce,M2t=new Qt,B2t=new gf,cOe=new h,lOe=new z,L2t=new z,uOe=new h,N2t=new h;function F2t(e){let t=e.meshes[0].primitives[0],n=e.accessors[t.attributes.POSITION],i=e.bufferViews[n.bufferView],o=n.count,r=i.extensions?i.extensions.EXT_meshopt_compression:void 0;if(r===void 0){let g=e.buffers[i.buffer].extras._pipeline.source;return new Float32Array(g.buffer,g.byteOffset+(i.byteOffset??0)+(n.byteOffset??0),o*3)}let a=e.buffers[r.buffer].extras._pipeline.source,s=new Uint8Array(a.buffer,a.byteOffset+(r.byteOffset??0)+(n.byteOffset??0),r.byteLength),c=r.byteStride,u=c===4?Uint8Array:Uint16Array,f=new u(o*4);bA.decodeVertexBuffer(new Uint8Array(f.buffer),o,c,s);let d=(1<<f.BYTES_PER_ELEMENT*8)-1,p=new Float32Array(o*3);for(let g=0;g<o;g++)p[g*3+0]=f[g*4+0]/d,p[g*3+1]=f[g*4+1]/d,p[g*3+2]=f[g*4+2]/d;return p}function k2t(e){let t=e.meshes[0].primitives[0],n=e.accessors[t.attributes.NORMAL],i=e.bufferViews[n.bufferView],o=n.count,r=i.extensions?i.extensions.EXT_meshopt_compression:void 0;if(r===void 0){let d=e.buffers[i.buffer].extras._pipeline.source;return new Float32Array(d.buffer,d.byteOffset+(i.byteOffset??0)+(n.byteOffset??0),o*3)}let a=e.buffers[r.buffer].extras._pipeline.source,s=new Uint8Array(a.buffer,a.byteOffset+(r.byteOffset??0)+(n.byteOffset??0),r.byteLength),c=r.byteStride,u=new Int8Array(o*c);bA.decodeVertexBuffer(new Uint8Array(u.buffer),o,c,s);let f=new Float32Array(o*3);for(let d=0;d<o;d++){let p=Math.max(u[d*4+0]/127,-1),g=Math.max(u[d*4+1]/127,-1),m=1-(Math.abs(p)+Math.abs(g));if(m<0){let y=p,x=g;p=(1-Math.abs(x))*D.signNotZero(y),g=(1-Math.abs(y))*D.signNotZero(x)}let A=OV;A.x=p,A.y=g,A.z=m,A=h.normalize(A,OV),f[d*3+0]=A.x,f[d*3+1]=A.y,f[d*3+2]=A.z}return f}function z2t(e){let t=e.meshes[0].primitives[0],n=e.accessors[t.indices],i=e.bufferViews[n.bufferView],o=n.count,r=n.componentType===Y.UNSIGNED_SHORT?Uint16Array:Uint32Array,a=i.extensions?i.extensions.EXT_meshopt_compression:void 0;if(a===void 0){let f=e.buffers[i.buffer].extras._pipeline.source;return new r(f.buffer,f.byteOffset+(i.byteOffset??0)+(n.byteOffset??0),o)}let s=e.buffers[a.buffer].extras._pipeline.source,c=new Uint8Array(s.buffer,s.byteOffset+(a.byteOffset??0)+(n.byteOffset??0),a.byteLength),u=new r(o);return bA.decodeIndexBuffer(new Uint8Array(u.buffer),o,a.byteStride,c),u}function p9(e,t){let n=e.meshes[0].primitives[0],i=e.accessors[n.extensions.CESIUM_tile_edges[t]],o=e.bufferViews[i.bufferView],r=i.count,a=i.componentType===Y.UNSIGNED_SHORT?Uint16Array:Uint32Array,s=o.extensions?o.extensions.EXT_meshopt_compression:void 0;if(s===void 0){let p=e.buffers[o.buffer].extras._pipeline.source;return new a(p.buffer,p.byteOffset+(o.byteOffset??0)+(i.byteOffset??0),r)}let c=e.buffers[s.buffer].extras._pipeline.source,u=new Uint8Array(c.buffer,c.byteOffset+(s.byteOffset??0)+(i.byteOffset??0),s.byteLength),f=new a(r),d=s.byteStride;return bA.decodeIndexSequence(new Uint8Array(f.buffer),r,d,u),f}function U2t(e,t,n){return n.positions=F2t(e),n.normals=t?k2t(e):void 0,n.indices=z2t(e),n.edgeIndicesWest=p9(e,"left"),n.edgeIndicesSouth=p9(e,"bottom"),n.edgeIndicesEast=p9(e,"right"),n.edgeIndicesNorth=p9(e,"top"),n}boe.upsampleMesh=function(e){e=e??G.EMPTY_OBJECT;let{isEastChild:t,isNorthChild:n,parentMinimumHeight:i,parentMaximumHeight:o,skirtHeight:r}=e,a=e.parentIndexCountWithoutSkirts,s=e.parentIndices,c=e.parentVertexCountWithoutSkirts,u=e.parentVertices,f=dr.clone(e.parentEncoding,new dr),d=f.hasVertexNormals,p=f.hasWebMercatorT,g=f.exaggeration,m=f.exaggerationRelativeHeight,y=g!==1,x=oe.clone(e.rectangle,new oe),b=te.clone(e.ellipsoid),C=[],E=[],S=[],w=[],P=[],R=[],B=[],L=[];Z2t(t,n,a,s,c,u,f,w,P,R,B,L,C,S,E);let _=oe.center(x,_2t);_.height=.5*(i+o);let T=de.toCartesian(_,b,A2t),v=C.length,I=new dr(T,void 0,void 0,void 0,void 0,d,p,y,g,m),O=I.stride,N=Uo.getSkirtVertexCount(P,R,B,L),j=v+N,k=w.length,U=Uo.getSkirtIndexCountWithFilledCorners(N),F=k+U,H=j<=65535?Uint16Array:Uint32Array,q=new H(F);q.set(w);let J=new H(P),W=new H(R),Z=new H(B),K=new H(L),le=new Float32Array(j*O),me=0,ae=pt.eastNorthUpToFixedFrame(T,b,I2t),be=M.inverseTransformation(ae,D2t),ge=x.west,we=x.east,Ee=x.south,Be=x.north,ke=li.geodeticLatitudeToMercatorAngle(Ee),rt=1/(li.geodeticLatitudeToMercatorAngle(Be)-ke),et=Number.POSITIVE_INFINITY,Pe=Number.NEGATIVE_INFINITY,Ye=h.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,S2t),ut=h.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,w2t);for(let bn=0;bn<v;bn++){let at=C[bn],st=s[at*3+0],Ln=s[at*3+1],Nn=s[at*3+2],uo=P2t;uo.x=E[bn*2+0],uo.y=E[bn*2+1];let Yo=uo.x,oo=uo.y,ro=S[bn*2+0],Xn=S[bn*2+1],Kn=1-ro-Xn,cn=f.decodeHeight(u,st),Jn=f.decodeHeight(u,Ln),Pr=f.decodeHeight(u,Nn),Da=cn*ro+Jn*Xn+Pr*Kn;et=Math.min(Da,et),Pe=Math.max(Da,Pe);let rs=D.lerp(ge,we,Yo),Ga=D.lerp(Ee,Be,oo),as=de.fromRadians(rs,Ga,Da,x2t),pr=de.toCartesian(as,b,b2t),ri=M.multiplyByPoint(be,pr,T2t);Ye=h.minimumByComponent(ri,Ye,Ye),ut=h.maximumByComponent(ri,ut,ut);let Gr;if(d){let ui=f.decodeNormal(u,st,m2t),Lo=f.decodeNormal(u,Ln,p2t),bc=f.decodeNormal(u,Nn,g2t),sa=h.fromElements(ui.x*ro+Lo.x*Xn+bc.x*Kn,ui.y*ro+Lo.y*Xn+bc.y*Kn,ui.z*ro+Lo.z*Xn+bc.z*Kn,cOe);sa=h.normalize(sa,cOe),Gr=nn.octEncode(sa,L2t)}let Po;p&&(Po=(li.geodeticLatitudeToMercatorAngle(Ga)-ke)*rt);let Ri;y&&(Ri=b.geodeticSurfaceNormal(pr,N2t)),me=I.encode(le,me,pr,uo,Da,Gr,Po,Ri)}let Tt=Qt.fromRectangle(x,et,Pe,b,M2t),tn=ce.fromVertices(le,I.center,O,O2t),xt=new bm(b).computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid(I.center,le,O,I.center,et,R2t),Pt=new pc(h.clone(I.center,new h),le,q,k,v,et,Pe,x,ce.clone(tn),h.clone(xt),O,Qt.clone(Tt),I,J,W,Z,K);return dOe(Pt,x,b,Ye,ut,ae,be,r),Pt};function dOe(e,t,n,i,o,r,a,s){let{encoding:c}=e,u=c.stride,f=e.vertices,{hasVertexNormals:d,hasWebMercatorT:p,exaggeration:g,exaggerationRelativeHeight:m}=c,y=g!==1,x=e.vertexCountWithoutSkirts,b=x*u,C=f.length/u,E=C-x,S=e.indices,w=e.indexCountWithoutSkirts,P=e.westIndicesSouthToNorth,R=e.southIndicesEastToWest,B=e.eastIndicesNorthToSouth,L=e.northIndicesWestToEast;Uo.addSkirtIndicesWithFilledCorners(P,R,B,L,x,S,w);let _=0,T=_+P.length,v=T+R.length,I=v+B.length,O=[P,R,B,L],N=[_,T,v,I],j=[-1,0,1,0],k=[0,-1,0,1],U=h.clone(i,E2t),F=h.clone(o,v2t),H=e.maximumHeight,q=e.minimumHeight-s;for(let Z=0;Z<E;Z++){let K=0;for(K=0;K<3&&!(Z<N[K+1]);K++);let le=O[K][Z-N[K]],me=c.decodeTextureCoordinates(f,le,sOe),ae=1e-4,be=me.x+j[K]*ae,ge=me.y+k[K]*ae,we=D.lerp(t.west,t.east,be),Ee=D.clamp(D.lerp(t.south,t.north,ge),-D.PI_OVER_TWO,+D.PI_OVER_TWO),ke=c.decodeHeight(f,le)-s,Ge=de.fromRadians(we,Ee,ke,y2t),rt=de.toCartesian(Ge,n,aOe),et;d&&(et=c.getOctEncodedNormal(f,le,lOe));let Pe;p&&(Pe=c.decodeWebMercatorT(f,le));let Ye;y&&(Ye=n.geodeticSurfaceNormal(rt,uOe)),b=c.encode(f,b,rt,me,ke,et,Pe,Ye);let ut=M.multiplyByPoint(a,rt,C2t);h.minimumByComponent(ut,U,U),h.maximumByComponent(ut,F,F)}let J=gf.fromCorners(U,F,B2t),W=new dr(c.center,J,q,H,r,c.hasVertexNormals,c.hasWebMercatorT,y,g,m);if(c.quantization!==W.quantization){let Z=W,K=Z.stride,le=new Float32Array(C*K),me=0;for(let ae=0;ae<C;ae++)me=Z.encode(le,me,c.decodePosition(f,ae,aOe),c.decodeTextureCoordinates(f,ae,sOe),c.decodeHeight(f,ae),c.hasVertexNormals?c.getOctEncodedNormal(f,ae,lOe):void 0,c.hasWebMercatorT?c.decodeWebMercatorT(f,ae):void 0,c.hasGeodeticSurfaceNormals?c.decodeGeodeticSurfaceNormal(f,ae,uOe):void 0);e.vertices=le,e.stride=K,e.encoding=Z}return e}var Coe=0,V2t=1,Toe=2,Eoe=3,j2t=4,G2t=new h,H2t=[new h,new h,new h,new h,new h,new h],W2t=[new z,new z,new z,new z,new z,new z],q2t=[new h,new h,new h,new h,new h,new h],Y2t=[new z,new z,new z,new z,new z,new z];function fOe(e,t,n,i){switch(n){case Coe:return D.sign(i.x-e.x);case Toe:return D.sign(t.x-i.x);case Eoe:return D.sign(i.y-e.y);default:return D.sign(t.y-i.y)}}function X2t(e,t,n,i,o,r){let a,s,c;switch(n){case Coe:a=(e.x-i.x)/(o.x-i.x),s=e.x,c=i.y+(o.y-i.y)*a;break;case Toe:a=(t.x-i.x)/(o.x-i.x),s=t.x,c=i.y+(o.y-i.y)*a;break;case Eoe:a=(e.y-i.y)/(o.y-i.y),s=i.x+(o.x-i.x)*a,c=e.y;break;default:a=(t.y-i.y)/(o.y-i.y),s=i.x+(o.x-i.x)*a,c=t.y;break}return h.fromElements(s,c,a,r)}var K2t={length:0,coordinates:[new z,new z,new z,new z,new z,new z],barycentricCoordinates:[new h,new h,new h,new h,new h,new h]};function Q2t(e,t,n,i,o,r,a,s){let c=0,u=W2t,f=H2t,d=3,p=Y2t;z.clone(o,p[0]),z.clone(r,p[1]),z.clone(a,p[2]);let g=q2t;h.fromElements(1,0,0,g[0]),h.fromElements(0,1,0,g[1]),h.fromElements(0,0,1,g[2]);for(let m=0;m<t;m++){let A=(e+m)%j2t,y=u,x=f;u=p,f=g,c=d,p=y,g=x,d=0;let b=c-1,C=u[b],E=f[b],S=fOe(n,i,A,C);for(let w=0;w<c;w++){let P=u[w],R=f[w],B=fOe(n,i,A,P);if(S*B===-1){let L=X2t(n,i,A,C,P,G2t),{x:_,y:T,z:v}=L,I=1-v,O=E.x*I+R.x*v,N=E.y*I+R.y*v,j=E.z*I+R.z*v;z.fromElements(_,T,p[d]),h.fromElements(O,N,j,g[d]),d++}B>=0&&(z.clone(P,p[d]),h.clone(R,g[d]),d++),b=w,C=P,E=R,S=B}if(d===0)break}s.length=d;for(let m=0;m<d;m++)z.clone(p[m],s.coordinates[m]),h.clone(g[m],s.barycentricCoordinates[m]);return s}function $2t(e,t,n,i,o,r,a,s){return Q2t(e?t?Eoe:Coe:t?Toe:V2t,2,n,i,o,r,a,s)}var J2t=[[],[0],[1],[0,1],[2],[0,2],[1,2],[0,1,2]];function Z2t(e,t,n,i,o,r,a,s,c,u,f,d,p,g,m){let A={},y=e?.5:0,x=e?1:.5,b=t?.5:0,C=t?1:.5,E=c2t;E.x=y,E.y=b;let S=l2t;S.x=x,S.y=C;let w=0;for(let P=0;P<n;P+=3){let R=i[P+0],B=i[P+1],L=i[P+2],_=a.decodeTextureCoordinates(r,R,f2t),T=a.decodeTextureCoordinates(r,B,d2t),v=a.decodeTextureCoordinates(r,L,h2t),I=$2t(e,t,E,S,_,T,v,K2t),O=I.length;if(O<3)continue;let N=u2t;for(let F=0;F<O;F++){let H=I.barycentricCoordinates[F],q=H.x,J=H.y,W=H.z,Z=Math.ceil(q)|Math.ceil(J)<<1|Math.ceil(W)<<2,K=J2t[Z],le,me=!1;if(K.length===1){let ae=K[0],ge=i[P+ae];le=A[ge],le===void 0&&(me=!0,le=w++,A[ge]=le)}else if(K.length===2){let ae=K[0],be=K[1],ge=i[P+ae],we=i[P+be],Ee=I.barycentricCoordinates[(F+O-1)%O],Be=Math.ceil(Ee.x)|Math.ceil(Ee.y)<<1|Math.ceil(Ee.z)<<2,ke=Z===Be,Ge=Math.min(ge,we),rt=Math.max(ge,we),et=o+2*(Ge*o+rt),Pe=et+0,Ye=et+1,ut=A[Pe],Tt=A[Ye],tn=!ke==(ut===void 0||Tt===void 0);if(le=tn?ut:Tt,le===void 0){me=!0,le=w++;let Ht=tn?Pe:Ye;A[Ht]=le}}else me=!0,le=w++;if(N[F]=le,me){let ae=P/3;p.push(ae);let be=I.coordinates[F],ge=(be.x-y)/(x-y),we=(be.y-b)/(C-b);m.push(ge,we),g.push(q,J),ge===0?c.push(le):ge===1&&f.push(le),we===0?u.push(le):we===1&&d.push(le)}}let j=N[0],k=N[1],U=N[2];s.push(j,k,U);for(let F=3;F<O;F++)k=U,U=N[F],s.push(j,k,U)}c.sort(function(P,R){return m[P*2+1]-m[R*2+1]}),u.sort(function(P,R){return m[R*2+0]-m[P*2+0]}),f.sort(function(P,R){return m[R*2+1]-m[P*2+1]}),d.sort(function(P,R){return m[P*2+0]-m[R*2+0]})}var LI=boe;function z_(e){e=e??G.EMPTY_OBJECT,this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._skirtHeight=e.skirtHeight,this._boundingSphere=ce.clone(e.boundingSphere,new ce),this._orientedBoundingBox=Qt.clone(e.orientedBoundingBox,new Qt),this._horizonOcclusionPoint=h.clone(e.horizonOcclusionPoint,new h),this._hasVertexNormals=e.requestVertexNormals??!1,this._hasWaterMask=e.requestWaterMask??!1,this._hasWebMercatorT=!0,this._credits=e.credits,this._childTileMask=e.childTileMask??15,this._gltf=e.gltf,this._mesh=void 0,this._waterMask=e.waterMask}Object.defineProperties(z_.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){return this._waterMask}}});z_.prototype.interpolateHeight=function(e,t,n){let i=this._mesh;return i===void 0?void 0:mOe(i,e,t,n)};z_.prototype.isChildAvailable=function(e,t,n,i){let o=2;return n!==e*2&&++o,i!==t*2&&(o-=2),(this._childTileMask&1<<o)!==0};var hOe="createVerticesFromCesium3DTilesTerrain",ekt=new Gn(hOe),tkt=new Gn(hOe,Qu.maximumAsynchronousTasks);z_.prototype.createMesh=function(e){e=e??G.EMPTY_OBJECT;let n=e.throttle??!0?tkt:ekt,i=e.tilingScheme,o=i.ellipsoid,r=e.x,a=e.y,s=e.level,c=i.tileXYToRectangle(r,a,s,new oe),u=this._gltf,f=n.scheduleTask({ellipsoid:o,rectangle:c,hasVertexNormals:this._hasVertexNormals,hasWaterMask:this._hasWaterMask,hasWebMercatorT:this._hasWebMercatorT,gltf:u,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,boundingSphere:this._boundingSphere,orientedBoundingBox:this._orientedBoundingBox,horizonOcclusionPoint:this._horizonOcclusionPoint,skirtHeight:this._skirtHeight,exaggeration:e.exaggeration,exaggerationRelativeHeight:e.exaggerationRelativeHeight});if(!l(f))return;let d=this;return Promise.resolve(f).then(function(p){let g=p,m=dr.clone(g.encoding,new dr),A=new Float32Array(g.verticesBuffer),y=A.length/m.stride,x=g.vertexCountWithoutSkirts,b=y<=65535?Uint16Array:Uint32Array,C=new b(g.indicesBuffer),E=new b(g.westIndicesBuffer),S=new b(g.eastIndicesBuffer),w=new b(g.southIndicesBuffer),P=new b(g.northIndicesBuffer),R=g.indexCountWithoutSkirts,B=d._minimumHeight,L=d._maximumHeight,_=h.clone(m.center,new h),T=ce.clone(d._boundingSphere,new ce),v=h.clone(d._horizonOcclusionPoint,new h),I=Qt.clone(d._orientedBoundingBox,new Qt),O=new pc(_,A,C,R,x,B,L,c,T,v,m.stride,I,m,E,w,S,P);return d._mesh=O,Promise.resolve(O)})};z_.prototype._createMeshSync=function(e){e=e??G.EMPTY_OBJECT;let t=e.tilingScheme,n=t.ellipsoid,i=e.x,o=e.y,r=e.level,a=t.tileXYToRectangle(i,o,r,new oe),s=LI.createMesh({ellipsoid:n,rectangle:a,hasVertexNormals:this._hasVertexNormals,hasWebMercatorT:this._hasWebMercatorT,gltf:this._gltf,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,boundingSphere:this._boundingSphere,orientedBoundingBox:this._orientedBoundingBox,horizonOcclusionPoint:this._horizonOcclusionPoint,skirtHeight:this._skirtHeight,exaggeration:e.exaggeration,exaggerationRelativeHeight:e.exaggerationRelativeHeight}),c=this;return Promise.resolve(s).then(function(u){return c._mesh=u,Promise.resolve(u)})};z_.prototype.upsample=function(e,t,n,i,o,r,a){let s=this._mesh;return s===void 0?void 0:g9(!1,s,this._skirtHeight,this._credits,e,t,n,i,o,r,a)};z_.prototype._upsampleSync=function(e,t,n,i,o,r,a){let s=this._mesh;return s===void 0?void 0:g9(!0,s,this._skirtHeight,this._credits,e,t,n,i,o,r,a)};z_.prototype.wasCreatedByUpsampling=function(){return!1};function k_(e){e=e??G.EMPTY_OBJECT,this._mesh=e.terrainMesh,this._skirtHeight=e.skirtHeight,this._credits=e.credits}k_.prototype.createMesh=function(e){return e=e??G.EMPTY_OBJECT,Promise.resolve(this._mesh)};k_.prototype.upsample=function(e,t,n,i,o,r,a){return g9(!1,this._mesh,this._skirtHeight,this._credits,e,t,n,i,o,r,a)};k_.prototype._upsampleSync=function(e,t,n,i,o,r,a){return g9(!0,this._mesh,this._skirtHeight,this._credits,e,t,n,i,o,r,a)};k_.prototype.interpolateHeight=function(e,t,n){let i=this._mesh;return mOe(i,e,t,n)};k_.prototype.wasCreatedByUpsampling=function(){return!0};k_.prototype.isChildAvailable=function(e,t,n,i){return!1};Object.defineProperties(k_.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){}}});var nkt=new Gn("upsampleVerticesFromCesium3DTilesTerrain",Qu.maximumAsynchronousTasks);function g9(e,t,n,i,o,r,a,s,c,u,f){if(f-s>1)throw new _e("Upsampling through more than one level at a time is not currently supported.");let p=n*.5,g=r*2!==c,m=a*2===u,A=o.tileXYToRectangle(c,u,f,new oe),y=o.ellipsoid,x={isEastChild:g,isNorthChild:m,rectangle:A,ellipsoid:y,skirtHeight:p,parentVertices:t.vertices,parentIndices:t.indices,parentVertexCountWithoutSkirts:t.vertexCountWithoutSkirts,parentIndexCountWithoutSkirts:t.indexCountWithoutSkirts,parentMinimumHeight:t.minimumHeight,parentMaximumHeight:t.maximumHeight,parentEncoding:t.encoding};if(e){let C=LI.upsampleMesh(x),E=new k_({terrainMesh:C,skirtHeight:p,credits:i});return Promise.resolve(E)}let b=nkt.scheduleTask(x);if(b!==void 0)return b.then(function(C){let E=dr.clone(C.encoding,new dr),S=E.stride,w=new Float32Array(C.verticesBuffer),P=w.length/S,R=C.vertexCountWithoutSkirts,B=P<=65535?Uint16Array:Uint32Array,L=new B(C.indicesBuffer),_=new B(C.westIndicesBuffer),T=new B(C.eastIndicesBuffer),v=new B(C.southIndicesBuffer),I=new B(C.northIndicesBuffer),O=C.indexCountWithoutSkirts,N=C.minimumHeight,j=C.maximumHeight,k=h.clone(E.center,new h),U=ce.clone(C.boundingSphere,new ce),F=h.clone(C.horizonOcclusionPoint,new h),H=Qt.clone(C.orientedBoundingBox,new Qt),q=new pc(k,w,L,O,R,N,j,A,U,F,S,H,E,_,v,T,I),J=new k_({terrainMesh:q,skirtHeight:p,credits:i});return Promise.resolve(J)})}var ikt=new z,okt=new z,rkt=new z,akt=new h;function mOe(e,t,n,i){let o=D.clamp((n-t.west)/t.width,0,1),r=D.clamp((i-t.south)/t.height,0,1),{vertices:a,encoding:s,indices:c}=e;for(let u=0;u<e.indexCountWithoutSkirts;u+=3){let f=c[u],d=c[u+1],p=c[u+2],g=s.decodeTextureCoordinates(a,f,ikt),m=s.decodeTextureCoordinates(a,d,okt),A=s.decodeTextureCoordinates(a,p,rkt),y=Math.min(g.x,m.x,A.x),x=Math.max(g.x,m.x,A.x),b=Math.min(g.y,m.y,A.y),C=Math.max(g.y,m.y,A.y);if(o>=y&&o<=x&&r>=b&&r<=C){let E=Jm.computeBarycentricCoordinates(o,r,g.x,g.y,m.x,m.y,A.x,A.y,akt);if(E.x>=0&&E.y>=0&&E.z>=0){let S=s.decodeHeight(a,f),w=s.decodeHeight(a,d),P=s.decodeHeight(a,p);return E.x*S+E.y*w+E.z*P}}}return 0}var MV=z_;function v0(e){e=e??G.EMPTY_OBJECT;let t=e.credit;typeof t=="string"&&(t=new yt(t)),this._credit=t,this._tileCredits=void 0,this._errorEvent=new ye,this._ellipsoid=e.ellipsoid??te.WGS84,this._tilingScheme=new Wi({ellipsoid:this._ellipsoid}),this._subtreeCache=new $T({provider:this}),this._tileset0=void 0,this._tileset1=void 0,this._resource=void 0,this._requestVertexNormals=e.requestVertexNormals??!1,this._requestWaterMask=e.requestWaterMask??!1}v0.fromUrl=async function(e,t){t=t??G.EMPTY_OBJECT,e=await Promise.resolve(e);let n=De.createIfNeeded(e),i;try{i=await n.fetchJson()}catch(f){throw new re("Could not load tileset JSON",f)}let o=new v0(t);o._tileCredits=n.credits,o._resource=n;let r=i.root.children,a=r[0],s=r[1],c=i.schema,u=Xl.fromJson(c);return o._tileset0=new Lp(n,a,u),o._tileset1=new Lp(n,s,u),o};v0.fromIonAssetId=async function(e,t){let n=await ha.fromAssetId(e);return v0.fromUrl(n,t)};var skt=new Array(3);v0.prototype.requestTileGeometry=async function(e,t,n,i){let o=gOe(n,e),r=o===0?this._tileset0:this._tileset1,a=_Oe(r,n,e,t),s=a.getSubtreeCoordinates(),c=this._subtreeCache,u=c.find(o,s),f=this._requestWaterMask,d=this,p;if(u===void 0){let b=r.subtreeUriTemplate.getDerivedResource({templateValues:s.getTemplateValues()});p=r.baseResource.getDerivedResource({url:b.url}).fetchArrayBuffer().then(async function(E){if(u=c.find(o,s),u===void 0){let S=new Uint8Array(E);u=await fg.fromSubtreeJson(d._resource,void 0,S,r,s),c.addSubtree(o,u)}return u})}else p=Promise.resolve(u);let g=r.contentUriTemplates[0].getDerivedResource({templateValues:a.getTemplateValues()}),m=r.baseResource.getDerivedResource({url:g.url}),A=m.fetchArrayBuffer();if(A===void 0)return;let y=A.then(b=>pb(new Uint8Array(b))),x=skt;x[0]=p,x[1]=y,x[2]=f?y.then(b=>ckt(b,m)):void 0;try{let b=await Promise.all(x),C=b[0],E=b[1],S=b[2],w=C.getTileMetadataView(a),P=w.getPropertyBySemantic(Pd.TILE_MINIMUM_HEIGHT),R=w.getPropertyBySemantic(Pd.TILE_MAXIMUM_HEIGHT),B=w.getPropertyBySemantic(Pd.TILE_BOUNDING_SPHERE),L=ce.unpack(B,0,new ce),_=w.getPropertyBySemantic(Pd.TILE_HORIZON_OCCLUSION_POINT),v=d._tilingScheme.tileXYToRectangle(e,t,n,new oe),I=d._ellipsoid,O=Qt.fromRectangle(v,P,R,I,new Qt),N=d.getLevelMaximumGeometricError(n)*5,j=_9(r,C,a,0,0),k=_9(r,C,a,1,0),U=_9(r,C,a,0,1),F=_9(r,C,a,1,1),H=(j?1:0)|(k?2:0)|(U?4:0)|(F?8:0),q=new MV({gltf:E,minimumHeight:P,maximumHeight:R,boundingSphere:L,orientedBoundingBox:O,horizonOcclusionPoint:_,skirtHeight:N,requestVertexNormals:d._requestVertexNormals,childTileMask:H,credits:d._tileCredits,waterMask:S});return Promise.resolve(q)}catch(b){console.log(`Could not load subtree: ${o} ${s.level} ${s.x} ${s.y}: ${b}`),console.log(`Could not load tile: ${o} ${a.level} ${a.x} ${a.y}: ${b}`);return}};v0.prototype.getTileDataAvailable=function(e,t,n){let i=this._subtreeCache,o=gOe(n,e),r=o===0?this._tileset0:this._tileset1,a=_Oe(r,n,e,t),s=a.getSubtreeCoordinates(),c=i.find(o,s);if(c!==void 0)return c.tileIsAvailableAtCoordinates(a);if(s.isImplicitTilesetRoot())return a.isSubtreeRoot()?!0:void 0;let u=s.getParentSubtreeCoordinates(),f=i.find(o,u);if(f!==void 0)return f.childSubtreeIsAvailableAtCoordinates(s)?a.isSubtreeRoot()?!0:void 0:!1};function gOe(e,t){let n=1<<e;return t/n|0}function _Oe(e,t,n,i){let o=1<<t,r=t,a=n%o,s=o-i-1,{subdivisionScheme:c,subtreeLevels:u}=e;return new Np({subdivisionScheme:c,subtreeLevels:u,level:r,x:a,y:s})}async function ckt(e,t){let n=e.extensions?.EXT_structural_metadata;if(!l(n)||!l(n.propertyTextures))return;let i=new SA({schema:n.schema});await i.load();let o=i.schema,r,a;if(l(o.classes)){for(let g in o.classes)if(o.classes.hasOwnProperty(g)&&(r=o.classes[g],a=r.propertiesBySemantic.WATERMASK,l(a)))break}if(!l(a))return;let s=n.propertyTextures.find(g=>g.class===r.id);if(!l(s))throw new _e(`Expected a propertyTexture with a class ${r.id}`);let c=s.properties[a.id],u=e.textures[c.index],f=e.images[u.source]?.bufferView,d=Ii.getBufferViewLoader({gltf:e,bufferViewId:f,gltfResource:t,baseResource:t});return await d.load(),await lg({uint8Array:new Uint8Array(d.typedArray),format:"image/png",flipY:!1,skipColorSpaceConversion:!0})}function _9(e,t,n,i,o){let r=n.isBottomOfSubtree(),s=voe(e,1,i,o),c=n.getDescendantCoordinates(s);return r?t.childSubtreeIsAvailableAtCoordinates(c):t.tileIsAvailableAtCoordinates(c)}function voe(e,t,n,i){let{subdivisionScheme:o,subtreeLevels:r}=e;return new Np({subdivisionScheme:o,subtreeLevels:r,level:t,x:n,y:i})}v0.prototype.loadTileDataAvailability=function(e,t,n){};v0.prototype.getLevelMaximumGeometricError=function(e){let t=this._ellipsoid;return Uo.getEstimatedLevelZeroGeometricErrorForAHeightmap(t,64,2)/(1<<e)};Object.defineProperties(v0.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},hasWaterMask:{get:function(){return this._requestWaterMask}},hasVertexNormals:{get:function(){return this._requestVertexNormals}},availability:{get:function(){return this._subtreeCache}}});function lkt(e,t,n){this.rootId=e,this.subtree=t,this.stamp=n}function $T(e){this._maximumSubtreeCount=e.maximumSubtreeCount??0,this._subtreeRequestCounter=0,this._queue=new O_({comparator:$T.comparator}),this._provider=e.provider}$T.comparator=function(e,t){let n=e.subtree.implicitCoordinates,i=t.subtree.implicitCoordinates;return n.isAncestor(i)?1:i.isAncestor(n)?-1:e.stamp-t.stamp};$T.prototype.addSubtree=function(e,t){let n=new lkt(e,t,this._subtreeRequestCounter);this._queue.insert(n),this._subtreeRequestCounter++;let i=t.implicitCoordinates;if(i.level>0){let o=i.getParentSubtreeCoordinates(),r=this.find(e,o)}if(this._maximumSubtreeCount>0)for(;this._queue.length>this._maximumSubtreeCount&&this._queue.getMinimum()!==n;)this._queue.removeMinimum()};$T.prototype.find=function(e,t){let n=this._queue,i=n.internalArray,{level:o,x:r,y:a}=t;for(let s=0;s<n.length;s++){let c=i[s],u=c.rootId,f=c.subtree.implicitCoordinates;if(u===e&&f.level===o&&f.x===r&&f.y===a)return c.subtree}};$T.prototype._computeMaximumImplicitTileCoordinatesAtPosition=function(e){let{longitude:t,latitude:n}=e,i=this._provider,o=t<0?0:1,r=o===0?i._tileset0:i._tileset1,a=r.subtreeLevels,s=voe(r,0,0,0),c=this.find(o,s);if(c===void 0)return;let u=c.implicitCoordinates,f=u.x,d=u.y,p=u.level,g=-D.PI,m=+D.PI,A=D.lerp(g,m,o/2),y=D.lerp(g,m,(o+1)/2),x=-D.PI*.5,b=+D.PI*.5,C=0,E=0,S=!0;for(;S;){let P=1/(1<<p),R=(y-A)*P,B=A+f*R,L=(b-x)*P,_=x+d*L;C=(t-B)/R,E=(n-_)/L;let T=pOe(r,u,C,E,a);if(c.childSubtreeIsAvailableAtCoordinates(T)){let v=this.find(o,T);if(v!==void 0)c=v,u=c.implicitCoordinates,f=u.x,d=u.y,p=u.level;else return T}else S=!1}let w;for(let P=0;P<a;P++){let R=pOe(r,u,C,E,P);if(c.tileIsAvailableAtCoordinates(R))w=R;else break}return w};function pOe(e,t,n,i,o){let r=1<<o,a=D.clamp(n*r|0,0,r-1),s=D.clamp(i*r|0,0,r-1),c=voe(e,o,a,s);return t.getDescendantCoordinates(c)}$T.prototype.computeMaximumLevelAtPosition=function(e){let t=this._computeMaximumImplicitTileCoordinatesAtPosition(e);return t===void 0?0:t.level};var Soe=v0;function U_(e){e=e??G.EMPTY_OBJECT;let t=e.radius,n={center:e.center,semiMajorAxis:t,semiMinorAxis:t,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,vertexFormat:e.vertexFormat,stRotation:e.stRotation,shadowVolume:e.shadowVolume};this._ellipseGeometry=new cu(n),this._workerName="createCircleGeometry"}U_.packedLength=cu.packedLength;U_.pack=function(e,t,n){return cu.pack(e._ellipseGeometry,t,n)};var AOe=new cu({center:new h,semiMajorAxis:1,semiMinorAxis:1}),Uc={center:new h,radius:void 0,ellipsoid:te.clone(te.default),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new Ne,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};U_.unpack=function(e,t,n){let i=cu.unpack(e,t,AOe);return Uc.center=h.clone(i._center,Uc.center),Uc.ellipsoid=te.clone(i._ellipsoid,Uc.ellipsoid),Uc.ellipsoid=te.clone(i._ellipsoid,AOe._ellipsoid),Uc.height=i._height,Uc.extrudedHeight=i._extrudedHeight,Uc.granularity=i._granularity,Uc.vertexFormat=Ne.clone(i._vertexFormat,Uc.vertexFormat),Uc.stRotation=i._stRotation,Uc.shadowVolume=i._shadowVolume,l(n)?(Uc.semiMajorAxis=i._semiMajorAxis,Uc.semiMinorAxis=i._semiMinorAxis,n._ellipseGeometry=new cu(Uc),n):(Uc.radius=i._semiMajorAxis,new U_(Uc))};U_.createGeometry=function(e){return cu.createGeometry(e._ellipseGeometry)};U_.createShadowVolume=function(e,t,n){let i=e._ellipseGeometry._granularity,o=e._ellipseGeometry._ellipsoid,r=t(i,o),a=n(i,o);return new U_({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:o,stRotation:e._ellipseGeometry._stRotation,granularity:i,extrudedHeight:r,height:a,vertexFormat:Ne.POSITION_ONLY,shadowVolume:!0})};Object.defineProperties(U_.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}});var woe=U_;function NI(e){e=e??G.EMPTY_OBJECT;let t=e.radius,n={center:e.center,semiMajorAxis:t,semiMinorAxis:t,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,numberOfVerticalLines:e.numberOfVerticalLines};this._ellipseGeometry=new Uf(n),this._workerName="createCircleOutlineGeometry"}NI.packedLength=Uf.packedLength;NI.pack=function(e,t,n){return Uf.pack(e._ellipseGeometry,t,n)};var ukt=new Uf({center:new h,semiMajorAxis:1,semiMinorAxis:1}),cd={center:new h,radius:void 0,ellipsoid:te.clone(te.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,numberOfVerticalLines:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0};NI.unpack=function(e,t,n){let i=Uf.unpack(e,t,ukt);return cd.center=h.clone(i._center,cd.center),cd.ellipsoid=te.clone(i._ellipsoid,cd.ellipsoid),cd.height=i._height,cd.extrudedHeight=i._extrudedHeight,cd.granularity=i._granularity,cd.numberOfVerticalLines=i._numberOfVerticalLines,l(n)?(cd.semiMajorAxis=i._semiMajorAxis,cd.semiMinorAxis=i._semiMinorAxis,n._ellipseGeometry=new Uf(cd),n):(cd.radius=i._semiMajorAxis,new NI(cd))};NI.createGeometry=function(e){return Uf.createGeometry(e._ellipseGeometry)};var Ioe=NI;function FI(e){e=e??G.EMPTY_OBJECT,this._callback=e.callback,this._tilingScheme=e.tilingScheme,l(this._tilingScheme)||(this._tilingScheme=new Wi({ellipsoid:e.ellipsoid??te.default})),this._width=e.width,this._height=e.height;let t=Math.max(this._width,this._height);this._levelZeroMaximumGeometricError=Uo.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,t,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._errorEvent=new ye;let n=e.credit;typeof n=="string"&&(n=new yt(n)),this._credit=n}Object.defineProperties(FI.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}});FI.prototype.requestTileGeometry=function(e,t,n,i){let o=this._callback(e,t,n);if(!l(o))return;let r=this._width,a=this._height;return Promise.resolve(o).then(function(s){let c=s;return Array.isArray(c)&&(c=new Float64Array(c)),new kc({buffer:c,width:r,height:a})})};FI.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};FI.prototype.getTileDataAvailable=function(e,t,n){};FI.prototype.loadTileDataAvailability=function(e,t,n){};var Doe=FI;function yOe(e){this.proxy=e}yOe.prototype.getURL=function(e){let t=this.proxy.indexOf("?")===-1?"?":"";return this.proxy+t+encodeURIComponent(e)};var Poe=yOe;var xOe={SEARCH:0,AUTOCOMPLETE:1};Object.freeze(xOe);var ex=xOe;function A9(){_e.throwInstantiationError()}Object.defineProperties(A9.prototype,{credit:{get:_e.throwInstantiationError}});A9.getCreditsFromResult=function(e){if(l(e.attributions))return e.attributions.map(yt.getIonCredit)};A9.prototype.geocode=_e.throwInstantiationError;var kI=A9;function bOe(){_e.throwInstantiationError()}bOe.createGeometry=function(e){_e.throwInstantiationError()};var Roe=bOe;function JT(e){e=e??G.EMPTY_OBJECT,this._buffer=e.buffer,this._credits=e.credits,this._negativeAltitudeExponentBias=e.negativeAltitudeExponentBias,this._negativeElevationThreshold=e.negativeElevationThreshold;let t=e.childTileMask??15,n=t&3;n|=t&4?8:0,n|=t&8?4:0,this._childTileMask=n,this._createdByUpsampling=e.createdByUpsampling??!1,this._skirtHeight=void 0,this._bufferType=this._buffer.constructor,this._mesh=void 0,this._minimumHeight=void 0,this._maximumHeight=void 0}Object.defineProperties(JT.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){}}});var EOe="createVerticesFromGoogleEarthEnterpriseBuffer",fkt=new Gn(EOe),dkt=new Gn(EOe,Qu.maximumAsynchronousTasks),COe=new oe,y9=new oe;JT.prototype.createMesh=function(e){e=e??G.EMPTY_OBJECT;let t=e.tilingScheme,n=e.x,i=e.y,o=e.level,r=e.exaggeration??1,a=e.exaggerationRelativeHeight??0,s=e.throttle??!0,c=t.ellipsoid;t.tileXYToNativeRectangle(n,i,o,COe),t.tileXYToRectangle(n,i,o,y9);let u=c.cartographicToCartesian(oe.center(y9)),d=40075.16/(1<<o);this._skirtHeight=Math.min(d*8,1e3);let g=(s?dkt:fkt).scheduleTask({buffer:this._buffer,nativeRectangle:COe,rectangle:y9,relativeToCenter:u,ellipsoid:c,skirtHeight:this._skirtHeight,exaggeration:r,exaggerationRelativeHeight:a,includeWebMercatorT:!0,negativeAltitudeExponentBias:this._negativeAltitudeExponentBias,negativeElevationThreshold:this._negativeElevationThreshold});if(!l(g))return;let m=this;return g.then(function(A){return m._mesh=new pc(u,new Float32Array(A.vertices),new Uint16Array(A.indices),A.indexCountWithoutSkirts,A.vertexCountWithoutSkirts,A.minimumHeight,A.maximumHeight,y9,ce.clone(A.boundingSphere3D),h.clone(A.occludeePointInScaledSpace),A.numberOfAttributes,Qt.clone(A.orientedBoundingBox),dr.clone(A.encoding),A.westIndicesSouthToNorth,A.southIndicesEastToWest,A.eastIndicesNorthToSouth,A.northIndicesWestToEast),m._minimumHeight=A.minimumHeight,m._maximumHeight=A.maximumHeight,m._buffer=void 0,m._mesh})};JT.prototype.interpolateHeight=function(e,t,n){let i=D.clamp((t-e.west)/e.width,0,1),o=D.clamp((n-e.south)/e.height,0,1);return l(this._mesh)?_kt(this,i,o):xkt(this,i,o,e)};var hkt=new Gn("upsampleQuantizedTerrainMesh",Qu.maximumAsynchronousTasks);JT.prototype.upsample=function(e,t,n,i,o,r,a){let s=this._mesh;if(!l(this._mesh))return;let c=t*2!==o,u=n*2===r,f=e.ellipsoid,d=e.tileXYToRectangle(o,r,a),p=hkt.scheduleTask({vertices:s.vertices,indices:s.indices,indexCountWithoutSkirts:s.indexCountWithoutSkirts,vertexCountWithoutSkirts:s.vertexCountWithoutSkirts,encoding:s.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,isEastChild:c,isNorthChild:u,childRectangle:d,ellipsoid:f});if(!l(p))return;let g=this;return p.then(function(m){let A=new Uint16Array(m.vertices),y=Ue.createTypedArray(A.length/3,m.indices),x=g._skirtHeight;return new YT({quantizedVertices:A,indices:y,minimumHeight:m.minimumHeight,maximumHeight:m.maximumHeight,boundingSphere:ce.clone(m.boundingSphere),orientedBoundingBox:Qt.clone(m.orientedBoundingBox),horizonOcclusionPoint:h.clone(m.horizonOcclusionPoint),westIndices:m.westIndices,southIndices:m.southIndices,eastIndices:m.eastIndices,northIndices:m.northIndices,westSkirtHeight:x,southSkirtHeight:x,eastSkirtHeight:x,northSkirtHeight:x,childTileMask:0,createdByUpsampling:!0,credits:g._credits})})};JT.prototype.isChildAvailable=function(e,t,n,i){let o=2;return n!==e*2&&++o,i!==t*2&&(o-=2),(this._childTileMask&1<<o)!==0};JT.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var mkt=new z,pkt=new z,gkt=new z,vOe=new h;function _kt(e,t,n){let i=e._mesh,o=i.vertices,r=i.encoding,a=i.indices;for(let s=0,c=a.length;s<c;s+=3){let u=a[s],f=a[s+1],d=a[s+2],p=r.decodeTextureCoordinates(o,u,mkt),g=r.decodeTextureCoordinates(o,f,pkt),m=r.decodeTextureCoordinates(o,d,gkt),A=Jm.computeBarycentricCoordinates(t,n,p.x,p.y,g.x,g.y,m.x,m.y,vOe);if(A.x>=-1e-15&&A.y>=-1e-15&&A.z>=-1e-15){let y=r.decodeHeight(o,u),x=r.decodeHeight(o,f),b=r.decodeHeight(o,d);return A.x*y+A.y*x+A.z*b}}}var Akt=Uint16Array.BYTES_PER_ELEMENT,TOe=Uint32Array.BYTES_PER_ELEMENT,Ooe=Int32Array.BYTES_PER_ELEMENT,ykt=Float32Array.BYTES_PER_ELEMENT,Moe=Float64Array.BYTES_PER_ELEMENT;function xkt(e,t,n,i){let o=e._buffer,r=0,a=0,s=0;n>.5?(t>.5?(r=2,a=.5):r=3,s=.5):t>.5&&(r=1,a=.5);let c=new DataView(o),u=0;for(let S=0;S<r;++S)u+=c.getUint32(u,!0),u+=TOe;u+=TOe,u+=2*Moe;let f=D.toRadians(c.getFloat64(u,!0)*180);u+=Moe;let d=D.toRadians(c.getFloat64(u,!0)*180);u+=Moe;let p=i.width/f/2,g=i.height/d/2,m=c.getInt32(u,!0);u+=Ooe;let A=c.getInt32(u,!0)*3;u+=Ooe,u+=Ooe;let y=new Array(m),x=new Array(m),b=new Array(m),C;for(C=0;C<m;++C)y[C]=a+c.getUint8(u++)*p,x[C]=s+c.getUint8(u++)*g,b[C]=c.getFloat32(u,!0)*6371010,u+=ykt;let E=new Array(A);for(C=0;C<A;++C)E[C]=c.getUint16(u,!0),u+=Akt;for(C=0;C<A;C+=3){let S=E[C],w=E[C+1],P=E[C+2],R=y[S],B=y[w],L=y[P],_=x[S],T=x[w],v=x[P],I=Jm.computeBarycentricCoordinates(t,n,R,_,B,T,L,v,vOe);if(I.x>=-1e-15&&I.y>=-1e-15&&I.z>=-1e-15)return I.x*b[S]+I.y*b[w]+I.z*b[P]}}var zI=JT;var _h={UNKNOWN:0,NONE:1,SELF:2,PARENT:3},x9=new Q;function b9(){this._terrainCache={},this._lastTidy=Q.now()}b9.prototype.add=function(e,t){this._terrainCache[e]={buffer:t,timestamp:Q.now()}};b9.prototype.get=function(e){let n=this._terrainCache[e];if(l(n))return delete this._terrainCache[e],n.buffer};b9.prototype.tidy=function(){if(Q.now(x9),Q.secondsDifference(x9,this._lastTidy)>10){let e=this._terrainCache,t=Object.keys(e),n=t.length;for(let i=0;i<n;++i){let o=t[i],r=e[o];Q.secondsDifference(x9,r.timestamp)>10&&delete e[o]}Q.clone(x9,this._lastTidy)}};function tx(e){e=e??G.EMPTY_OBJECT,this._tilingScheme=new Wi({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new oe(-D.PI,-D.PI,D.PI,D.PI),ellipsoid:e.ellipsoid});let t=e.credit;typeof t=="string"&&(t=new yt(t)),this._credit=t,this._levelZeroMaximumGeometricError=40075.16,this._terrainCache=new b9,this._terrainPromises={},this._terrainRequests={},this._errorEvent=new ye}Object.defineProperties(tx.prototype,{url:{get:function(){return this._metadata.url}},proxy:{get:function(){return this._metadata.proxy}},tilingScheme:{get:function(){return this._tilingScheme}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});tx.fromMetadata=function(e,t){if(!e.terrainPresent)throw new re(`The server ${e.url} doesn't have terrain`);let n=new tx(t);return n._metadata=e,n};var bkt=new Gn("decodeGoogleEarthEnterprisePacket");function SOe(e,t,n){let i=t.getChildBitmask();if(t.terrainState===_h.PARENT){i=0;for(let o=0;o<4;++o){let r=n.getTileInformationFromQuadKey(e+o.toString());l(r)&&r.hasTerrain()&&(i|=1<<o)}}return i}tx.prototype.requestTileGeometry=function(e,t,n,i){let o=M_.tileXYToQuadKey(e,t,n),r=this._terrainCache,a=this._metadata,s=a.getTileInformationFromQuadKey(o);if(!l(s))return Promise.reject(new re("Terrain tile doesn't exist"));let c=s.terrainState;l(c)||(c=s.terrainState=_h.UNKNOWN);let u=r.get(o);if(l(u)){let x=a.providers[s.terrainProvider];return Promise.resolve(new zI({buffer:u,childTileMask:SOe(o,s,a),credits:l(x)?[x]:void 0,negativeAltitudeExponentBias:a.negativeAltitudeExponentBias,negativeElevationThreshold:a.negativeAltitudeThreshold}))}if(r.tidy(),s.ancestorHasTerrain){if(c===_h.NONE)return Promise.reject(new re("Terrain tile doesn't exist"))}else return Promise.resolve(new kc({buffer:new Uint8Array(256),width:16,height:16}));let f,d=o,p=-1;switch(c){case _h.SELF:p=s.terrainVersion;break;case _h.PARENT:d=d.substring(0,d.length-1),f=a.getTileInformationFromQuadKey(d),p=f.terrainVersion;break;case _h.UNKNOWN:s.hasTerrain()?p=s.terrainVersion:(d=d.substring(0,d.length-1),f=a.getTileInformationFromQuadKey(d),l(f)&&f.hasTerrain()&&(p=f.terrainVersion));break}if(p<0)return Promise.reject(new re("Terrain tile doesn't exist"));let g=this._terrainPromises,m=this._terrainRequests,A,y;if(l(g[d]))A=g[d],y=m[d];else{y=i;let x=Ckt(this,d,p,y).fetchArrayBuffer();if(!l(x))return;A=x.then(function(b){return l(b)?bkt.scheduleTask({buffer:b,type:"Terrain",key:a.key},[b]).then(function(C){let E=a.getTileInformationFromQuadKey(d);E.terrainState=_h.SELF,r.add(d,C[0]);let S=E.terrainProvider,w=C.length-1;for(let P=0;P<w;++P){let R=d+P.toString(),B=a.getTileInformationFromQuadKey(R);l(B)&&(r.add(R,C[P+1]),B.terrainState=_h.PARENT,B.terrainProvider===0&&(B.terrainProvider=S))}}):Promise.reject(new re("Failed to load terrain."))}),g[d]=A,m[d]=y,A=A.finally(function(){delete g[d],delete m[d]})}return A.then(function(){let x=r.get(o);if(l(x)){let b=a.providers[s.terrainProvider];return new zI({buffer:x,childTileMask:SOe(o,s,a),credits:l(b)?[b]:void 0,negativeAltitudeExponentBias:a.negativeAltitudeExponentBias,negativeElevationThreshold:a.negativeAltitudeThreshold})}return Promise.reject(new re("Failed to load terrain."))}).catch(function(x){return y.state===di.CANCELLED?(i.state=y.state,Promise.reject(x)):(s.terrainState=_h.NONE,Promise.reject(x))})};tx.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};tx.prototype.getTileDataAvailable=function(e,t,n){let i=this._metadata,o=M_.tileXYToQuadKey(e,t,n),r=i.getTileInformation(e,t,n);if(r===null)return!1;if(l(r)){if(!r.ancestorHasTerrain)return!0;let a=r.terrainState;if(a===_h.NONE)return!1;if((!l(a)||a===_h.UNKNOWN)&&(r.terrainState=_h.UNKNOWN,!r.hasTerrain())){o=o.substring(0,o.length-1);let s=i.getTileInformationFromQuadKey(o);if(!l(s)||!s.hasTerrain())return!1}return!0}if(i.isValid(o)){let a=new _r({throttle:!1,throttleByServer:!0,type:qa.TERRAIN});i.populateSubtree(e,t,n,a)}return!1};tx.prototype.loadTileDataAvailability=function(e,t,n){};function Ckt(e,t,n,i){return n=l(n)&&n>0?n:1,e._metadata.resource.getDerivedResource({url:`flatfile?f1c-0${t}-t.${n.toString()}`,request:i})}var Boe=tx;var Tkt="https://maps.googleapis.com/maps/api/geocode/json",wOe='<img alt="Google" src="https://assets.ion.cesium.com/google-credit.png" style="vertical-align:-5px">';function Loe(e){e=e??G.EMPTY_OBJECT;let t=e.key;this._resource=new De({url:Tkt,queryParameters:{key:t}}),this._credit=new yt(wOe,!0)}Object.defineProperties(Loe.prototype,{credit:{get:function(){return this._credit}}});Loe.prototype.geocode=async function(e){let n=await this._resource.getDerivedResource({queryParameters:{address:e}}).fetchJson();if(n.status==="ZERO_RESULTS")return[];if(n.status!=="OK")throw new re(`GoogleGeocoderService got a bad response ${n.status}: ${n.error_message}`);return n.results.map(o=>{let r=o.geometry.viewport.southwest,a=o.geometry.viewport.northeast;return{displayName:o.formatted_address,destination:oe.fromDegrees(r.lng,r.lat,a.lng,a.lat),attribution:{html:wOe,collapsible:!1}}})};var Noe=Loe;var BV={};BV.type=void 0;BV.getRequiredDataPoints=_e.throwInstantiationError;BV.interpolateOrderZero=_e.throwInstantiationError;BV.interpolate=_e.throwInstantiationError;var Foe=BV;var IOe={GOOGLE:"GOOGLE",BING:"BING",DEFAULT:"DEFAULT"};Object.freeze(IOe);var V_=IOe;function koe(e){this._url=De.createIfNeeded(e),this._url.appendForwardSlash()}Object.defineProperties(koe.prototype,{url:{get:function(){return this._url}},credit:{get:function(){}}});koe.prototype.geocode=async function(e,t){return this._url.getDerivedResource({url:t===ex.AUTOCOMPLETE?"autocomplete":"search",queryParameters:{text:e}}).fetchJson().then(function(i){return i.features.map(function(o){let r,a=o.bbox;if(l(a))r=oe.fromDegrees(a[0],a[1],a[2],a[3]);else{let s=o.geometry.coordinates[0],c=o.geometry.coordinates[1];r=h.fromDegrees(s,c)}return{displayName:o.properties.label,destination:r,attributions:i.attributions}})})};var LV=koe;function Ekt(e){if(!Object.values(V_).some(t=>t===e))throw new _e(`Invalid geocodeProviderType: "${e}"`)}var DOe=Object.freeze({[V_.GOOGLE]:"google",[V_.BING]:"bing",[V_.DEFAULT]:void 0});function vkt(e){return DOe[e]}function Skt(e){return Object.entries(DOe).find(t=>t[1]===e)[0]}function zoe(e){e=e??G.EMPTY_OBJECT;let t=e.geocodeProviderType??V_.DEFAULT,n=e.accessToken??Hh.defaultAccessToken,i=De.createIfNeeded(e.server??Hh.defaultServer);i.appendForwardSlash();let o=Hh.getDefaultTokenCredit(n);l(o)&&e.scene.frameState.creditDisplay.addStaticCredit(yt.clone(o));let r=i.getDerivedResource({url:"v1/geocode"});l(n)&&r.appendQueryParameters({access_token:n}),this._accessToken=n,this._server=i,this._pelias=new LV(r),this.geocodeProviderType=t}Object.defineProperties(zoe.prototype,{credit:{get:function(){}},geocodeProviderType:{get:function(){return Skt(this._pelias.url.queryParameters.geocoder)},set:function(e){Ekt(e);let t={...this._pelias.url.queryParameters,geocoder:vkt(e)};l(t.geocoder)||delete t.geocoder,this._pelias.url.setQueryParameters(t)}}});zoe.prototype.geocode=async function(e,t){return this._pelias.geocode(e,t)};var ZT=zoe;var Uoe=class{constructor(){lt(this,"ellipsoid")}project(t,n){_e.throwInstantiationError()}unproject(t,n){_e.throwInstantiationError()}},Voe=Uoe;function UI(e){e=e??G.EMPTY_OBJECT;let t=e.weights,n=e.times;this._times=n,this._weights=t,this._count=t.length/n.length,this._lastTimeIndex=0}Object.defineProperties(UI.prototype,{times:{get:function(){return this._times}},weights:{get:function(){return this._weights}}});UI.prototype.findTimeInterval=xo.prototype.findTimeInterval;UI.prototype.wrapTime=xo.prototype.wrapTime;UI.prototype.clampTime=xo.prototype.clampTime;UI.prototype.evaluate=function(e,t){let n=this.weights,i=this.times,o=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),r=(e-i[o])/(i[o+1]-i[o]);l(t)||(t=new Array(this._count));for(let a=0;a<this._count;a++){let s=o*this._count+a;t[a]=n[s]*(1-r)+n[s+this._count]*r}return t};var joe=UI;function Goe(e,t,n){e=De.createIfNeeded(e),e.appendForwardSlash(),e.setQueryParameters({key:t}),this._url=e,this._params=n??{},this._credit=new yt('Geodata copyright <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors',!1)}Object.defineProperties(Goe.prototype,{url:{get:function(){return this._url}},params:{get:function(){return this._params}},credit:{get:function(){return this._credit}}});Goe.prototype.geocode=async function(e){return this._url.getDerivedResource({url:"json",queryParameters:wt(this._params,{q:e})}).fetchJson().then(function(n){return n.results.map(function(i){let o,r=i.bounds;if(l(r))o=oe.fromDegrees(r.southwest.lng,r.southwest.lat,r.northeast.lng,r.northeast.lat);else{let{lng:a,lat:s}=i.geometry;o=h.fromDegrees(a,s)}return{displayName:i.formatted,destination:o}})})};var Hoe=Goe;var wkt={packedLength:void 0,pack:_e.throwInstantiationError,unpack:_e.throwInstantiationError},Woe=wkt;var Ikt={packedInterpolationLength:void 0,convertPackedArrayForInterpolation:_e.throwInstantiationError,unpackInterpolationResult:_e.throwInstantiationError},qoe=Ikt;function POe(){_e.throwInstantiationError()}POe.prototype.getURL=_e.throwInstantiationError;var Yoe=POe;function Dkt(e,t,n,i,o,r,a){let s=Yi.numberOfPoints(e,t,o),c,u=n.red,f=n.green,d=n.blue,p=n.alpha,g=i.red,m=i.green,A=i.blue,y=i.alpha;if(V.equals(n,i)){for(c=0;c<s;c++)r[a++]=V.floatToByte(u),r[a++]=V.floatToByte(f),r[a++]=V.floatToByte(d),r[a++]=V.floatToByte(p);return a}let x=(g-u)/s,b=(m-f)/s,C=(A-d)/s,E=(y-p)/s,S=a;for(c=0;c<s;c++)r[S++]=V.floatToByte(u+c*x),r[S++]=V.floatToByte(f+c*b),r[S++]=V.floatToByte(d+c*C),r[S++]=V.floatToByte(p+c*E);return S}function NV(e){e=e??G.EMPTY_OBJECT;let t=e.positions,n=e.colors,i=e.colorsPerVertex??!1;this._positions=t,this._colors=n,this._colorsPerVertex=i,this._arcType=e.arcType??on.GEODESIC,this._granularity=e.granularity??D.RADIANS_PER_DEGREE,this._ellipsoid=e.ellipsoid??te.default,this._workerName="createSimplePolylineGeometry";let o=1+t.length*h.packedLength;o+=l(n)?1+n.length*V.packedLength:1,this.packedLength=o+te.packedLength+3}NV.pack=function(e,t,n){n=n??0;let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=h.packedLength)h.pack(o[i],t,n);let a=e._colors;for(r=l(a)?a.length:0,t[n++]=r,i=0;i<r;++i,n+=V.packedLength)V.pack(a[i],t,n);return te.pack(e._ellipsoid,t,n),n+=te.packedLength,t[n++]=e._colorsPerVertex?1:0,t[n++]=e._arcType,t[n]=e._granularity,t};NV.unpack=function(e,t,n){t=t??0;let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=h.packedLength)r[i]=h.unpack(e,t);o=e[t++];let a=o>0?new Array(o):void 0;for(i=0;i<o;++i,t+=V.packedLength)a[i]=V.unpack(e,t);let s=te.unpack(e,t);t+=te.packedLength;let c=e[t++]===1,u=e[t++],f=e[t];return l(n)?(n._positions=r,n._colors=a,n._ellipsoid=s,n._colorsPerVertex=c,n._arcType=u,n._granularity=f,n):new NV({positions:r,colors:a,ellipsoid:s,colorsPerVertex:c,arcType:u,granularity:f})};var C9=new Array(2),T9=new Array(2),Pkt={positions:C9,height:T9,ellipsoid:void 0,minDistance:void 0,granularity:void 0};NV.createGeometry=function(e){let t=e._positions,n=e._colors,i=e._colorsPerVertex,o=e._arcType,r=e._granularity,a=e._ellipsoid,s=D.chordLength(r,a.maximumRadius),c=l(n)&&!i,u,f=t.length,d,p,g,m,A=0;if(o===on.GEODESIC||o===on.RHUMB){let E,S,w;o===on.GEODESIC?(E=D.chordLength(r,a.maximumRadius),S=Yi.numberOfPoints,w=Yi.generateArc):(E=r,S=Yi.numberOfPointsRhumbLine,w=Yi.generateRhumbArc);let P=Yi.extractHeights(t,a),R=Pkt;if(o===on.GEODESIC?R.minDistance=s:R.granularity=r,R.ellipsoid=a,c){let B=0;for(u=0;u<f-1;u++)B+=S(t[u],t[u+1],E)+1;d=new Float64Array(B*3),g=new Uint8Array(B*4),R.positions=C9,R.height=T9;let L=0;for(u=0;u<f-1;++u){C9[0]=t[u],C9[1]=t[u+1],T9[0]=P[u],T9[1]=P[u+1];let _=w(R);if(l(n)){let T=_.length/3;m=n[u];for(let v=0;v<T;++v)g[L++]=V.floatToByte(m.red),g[L++]=V.floatToByte(m.green),g[L++]=V.floatToByte(m.blue),g[L++]=V.floatToByte(m.alpha)}d.set(_,A),A+=_.length}}else if(R.positions=t,R.height=P,d=new Float64Array(w(R)),l(n)){for(g=new Uint8Array(d.length/3*4),u=0;u<f-1;++u){let L=t[u],_=t[u+1],T=n[u],v=n[u+1];A=Dkt(L,_,T,v,s,g,A)}let B=n[f-1];g[A++]=V.floatToByte(B.red),g[A++]=V.floatToByte(B.green),g[A++]=V.floatToByte(B.blue),g[A++]=V.floatToByte(B.alpha)}}else{p=c?f*2-2:f,d=new Float64Array(p*3),g=l(n)?new Uint8Array(p*4):void 0;let E=0,S=0;for(u=0;u<f;++u){let w=t[u];if(c&&u>0&&(h.pack(w,d,E),E+=3,m=n[u-1],g[S++]=V.floatToByte(m.red),g[S++]=V.floatToByte(m.green),g[S++]=V.floatToByte(m.blue),g[S++]=V.floatToByte(m.alpha)),c&&u===f-1)break;h.pack(w,d,E),E+=3,l(n)&&(m=n[u],g[S++]=V.floatToByte(m.red),g[S++]=V.floatToByte(m.green),g[S++]=V.floatToByte(m.blue),g[S++]=V.floatToByte(m.alpha))}}let y=new pn;y.position=new Me({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:d}),l(n)&&(y.color=new Me({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:4,values:g,normalize:!0})),p=d.length/3;let x=(p-1)*2,b=Ue.createTypedArray(p,x),C=0;for(u=0;u<p-1;++u)b[C++]=u,b[C++]=u+1;return new At({attributes:y,indices:b,primitiveType:Re.LINES,boundingSphere:ce.fromPoints(t)})};var Xoe=NV;var Koe=class{constructor(t){lt(this,"ellipsoid");lt(this,"rectangle");lt(this,"projection")}getNumberOfXTilesAtLevel(t){_e.throwInstantiationError()}getNumberOfYTilesAtLevel(t){_e.throwInstantiationError()}rectangleToNativeRectangle(t,n){_e.throwInstantiationError()}tileXYToNativeRectangle(t,n,i,o){_e.throwInstantiationError()}tileXYToRectangle(t,n,i,o){_e.throwInstantiationError()}positionToTileXY(t,n,i){_e.throwInstantiationError()}},Qoe=Koe;function Rkt(e,t){this.rectangle=e,this.maxLevel=t}function ROe(e){this.ellipsoid=e.ellipsoid??te.default,this.tilingScheme=void 0,this.heightmapWidth=void 0,this.heightmapHeight=void 0,this.levelZeroMaximumGeometricError=void 0,this.rectangles=[]}ROe.prototype.build=function(e){e._tilingScheme=this.tilingScheme,e._heightmapWidth=this.heightmapWidth,e._heightmapHeight=this.heightmapHeight,e._levelZeroMaximumGeometricError=this.levelZeroMaximumGeometricError,e._rectangles=this.rectangles};function Okt(e,t){let n=t.getElementsByTagName("SRS")[0].textContent;if(n==="EPSG:4326")e.tilingScheme=new Wi({ellipsoid:e.ellipsoid});else throw new re(`SRS ${n} is not supported`);let i=t.getElementsByTagName("TileFormat")[0];e.heightmapWidth=parseInt(i.getAttribute("width"),10),e.heightmapHeight=parseInt(i.getAttribute("height"),10),e.levelZeroMaximumGeometricError=Uo.getEstimatedLevelZeroGeometricErrorForAHeightmap(e.ellipsoid,Math.min(e.heightmapWidth,e.heightmapHeight),e.tilingScheme.getNumberOfXTilesAtLevel(0));let o=t.getElementsByTagName("DataExtent");for(let r=0;r<o.length;++r){let a=o[r],s=D.toRadians(parseFloat(a.getAttribute("minx"))),c=D.toRadians(parseFloat(a.getAttribute("miny"))),u=D.toRadians(parseFloat(a.getAttribute("maxx"))),f=D.toRadians(parseFloat(a.getAttribute("maxy"))),d=parseInt(a.getAttribute("maxlevel"),10);e.rectangles.push(new Rkt(new oe(s,c,u,f),d))}}function Mkt(e,t,n){let i=`An error occurred while accessing ${e.url}`;throw l(t)&&l(t.message)&&(i=`${i}: ${t.message}`),Go.reportError(void 0,n,l(n)?n._errorEvent:void 0,i),new re(i)}async function Bkt(e,t,n){try{let i=await t.fetchXML();Okt(e,i)}catch(i){Mkt(t,i,n)}}function nx(e){e=e??G.EMPTY_OBJECT,this._errorEvent=new ye,this._terrainDataStructure={heightScale:1/1e3,heightOffset:-1e3,elementsPerHeight:3,stride:4,elementMultiplier:256,isBigEndian:!0,lowestEncodedHeight:0,highestEncodedHeight:256*256*256-1};let t=e.credit;typeof t=="string"&&(t=new yt(t)),this._credit=t,this._tilingScheme=void 0,this._rectangles=[]}Object.defineProperties(nx.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});nx.fromUrl=async function(e,t){t=t??G.EMPTY_OBJECT;let n=new ROe(t),i=De.createIfNeeded(e);await Bkt(n,i);let o=new nx(t);return n.build(o),o._resource=i,o};nx.prototype.requestTileGeometry=function(e,t,n,i){let o=this._tilingScheme.getNumberOfYTilesAtLevel(n),a=this._resource.getDerivedResource({url:`${n}/${e}/${o-t-1}.tif`,queryParameters:{cesium:!0},request:i}).fetchImage({preferImageBitmap:!0});if(!l(a))return;let s=this;return Promise.resolve(a).then(function(c){return new kc({buffer:vh(c),width:s._heightmapWidth,height:s._heightmapHeight,childTileMask:Lkt(s,e,t,n),structure:s._terrainDataStructure})})};nx.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};var OOe=new oe;function Lkt(e,t,n,i){let o=e._tilingScheme,r=e._rectangles,a=o.tileXYToRectangle(t,n,i),s=0;for(let c=0;c<r.length&&s!==15;++c){let u=r[c];if(u.maxLevel<=i)continue;let f=u.rectangle,d=oe.intersection(f,a,OOe);l(d)&&(E9(o,f,t*2,n*2,i+1)&&(s|=4),E9(o,f,t*2+1,n*2,i+1)&&(s|=8),E9(o,f,t*2,n*2+1,i+1)&&(s|=1),E9(o,f,t*2+1,n*2+1,i+1)&&(s|=2))}return s}function E9(e,t,n,i,o){let r=e.tileXYToRectangle(n,i,o);return l(oe.intersection(r,t,OOe))}nx.prototype.getTileDataAvailable=function(e,t,n){};nx.prototype.loadTileDataAvailability=function(e,t,n){};var $oe=nx;function eE(e){e=e??G.EMPTY_OBJECT,this._clock=void 0,this._element=void 0,this._clockSubscription=void 0,this._seekFunction=void 0,this._lastPlaybackRate=void 0,this.clock=e.clock,this.element=e.element,this.epoch=e.epoch??Qe.MINIMUM_VALUE,this.tolerance=e.tolerance??1,this._seeking=!1,this._seekFunction=void 0,this._firstTickAfterSeek=!1}Object.defineProperties(eE.prototype,{clock:{get:function(){return this._clock},set:function(e){let t=this._clock;t!==e&&(l(t)&&(this._clockSubscription(),this._clockSubscription=void 0),l(e)&&(this._clockSubscription=e.onTick.addEventListener(eE.prototype._onTick,this)),this._clock=e)}},element:{get:function(){return this._element},set:function(e){let t=this._element;t!==e&&(l(t)&&t.removeEventListener("seeked",this._seekFunction,!1),l(e)&&(this._seeking=!1,this._seekFunction=Nkt(this),e.addEventListener("seeked",this._seekFunction,!1)),this._element=e,this._seeking=!1,this._firstTickAfterSeek=!1)}}});eE.prototype.destroy=function(){return this.element=void 0,this.clock=void 0,fe(this)};eE.prototype.isDestroyed=function(){return!1};eE.prototype._trySetPlaybackRate=function(e){if(this._lastPlaybackRate===e.multiplier)return;let t=this._element;try{t.playbackRate=e.multiplier}catch{t.playbackRate=0}this._lastPlaybackRate=e.multiplier};eE.prototype._onTick=function(e){let t=this._element;if(!l(t)||t.readyState<2)return;let n=t.paused,i=e.shouldAnimate;if(i===n&&(i?t.play():t.pause()),this._seeking||this._firstTickAfterSeek){this._firstTickAfterSeek=!1;return}this._trySetPlaybackRate(e);let o=e.currentTime,r=this.epoch??Qe.MINIMUM_VALUE,a=Q.secondsDifference(o,r),s=t.duration,c,u=t.currentTime;t.loop?(a=a%s,a<0&&(a=s-a),c=a):a>s?c=s:a<0?c=0:c=a;let f=i?this.tolerance??1:.001;Math.abs(c-u)>f&&(this._seeking=!0,t.currentTime=c)};function Nkt(e){return function(){e._seeking=!1,e._firstTickAfterSeek=!0}}var Joe=eE;var MOe={VK_FORMAT_UNDEFINED:0,VK_FORMAT_R4G4_UNORM_PACK8:1,VK_FORMAT_R4G4B4A4_UNORM_PACK16:2,VK_FORMAT_B4G4R4A4_UNORM_PACK16:3,VK_FORMAT_R5G6B5_UNORM_PACK16:4,VK_FORMAT_B5G6R5_UNORM_PACK16:5,VK_FORMAT_R5G5B5A1_UNORM_PACK16:6,VK_FORMAT_B5G5R5A1_UNORM_PACK16:7,VK_FORMAT_A1R5G5B5_UNORM_PACK16:8,VK_FORMAT_R8_UNORM:9,VK_FORMAT_R8_SNORM:10,VK_FORMAT_R8_USCALED:11,VK_FORMAT_R8_SSCALED:12,VK_FORMAT_R8_UINT:13,VK_FORMAT_R8_SINT:14,VK_FORMAT_R8_SRGB:15,VK_FORMAT_R8G8_UNORM:16,VK_FORMAT_R8G8_SNORM:17,VK_FORMAT_R8G8_USCALED:18,VK_FORMAT_R8G8_SSCALED:19,VK_FORMAT_R8G8_UINT:20,VK_FORMAT_R8G8_SINT:21,VK_FORMAT_R8G8_SRGB:22,VK_FORMAT_R8G8B8_UNORM:23,VK_FORMAT_R8G8B8_SNORM:24,VK_FORMAT_R8G8B8_USCALED:25,VK_FORMAT_R8G8B8_SSCALED:26,VK_FORMAT_R8G8B8_UINT:27,VK_FORMAT_R8G8B8_SINT:28,VK_FORMAT_R8G8B8_SRGB:29,VK_FORMAT_B8G8R8_UNORM:30,VK_FORMAT_B8G8R8_SNORM:31,VK_FORMAT_B8G8R8_USCALED:32,VK_FORMAT_B8G8R8_SSCALED:33,VK_FORMAT_B8G8R8_UINT:34,VK_FORMAT_B8G8R8_SINT:35,VK_FORMAT_B8G8R8_SRGB:36,VK_FORMAT_R8G8B8A8_UNORM:37,VK_FORMAT_R8G8B8A8_SNORM:38,VK_FORMAT_R8G8B8A8_USCALED:39,VK_FORMAT_R8G8B8A8_SSCALED:40,VK_FORMAT_R8G8B8A8_UINT:41,VK_FORMAT_R8G8B8A8_SINT:42,VK_FORMAT_R8G8B8A8_SRGB:43,VK_FORMAT_B8G8R8A8_UNORM:44,VK_FORMAT_B8G8R8A8_SNORM:45,VK_FORMAT_B8G8R8A8_USCALED:46,VK_FORMAT_B8G8R8A8_SSCALED:47,VK_FORMAT_B8G8R8A8_UINT:48,VK_FORMAT_B8G8R8A8_SINT:49,VK_FORMAT_B8G8R8A8_SRGB:50,VK_FORMAT_A8B8G8R8_UNORM_PACK32:51,VK_FORMAT_A8B8G8R8_SNORM_PACK32:52,VK_FORMAT_A8B8G8R8_USCALED_PACK32:53,VK_FORMAT_A8B8G8R8_SSCALED_PACK32:54,VK_FORMAT_A8B8G8R8_UINT_PACK32:55,VK_FORMAT_A8B8G8R8_SINT_PACK32:56,VK_FORMAT_A8B8G8R8_SRGB_PACK32:57,VK_FORMAT_A2R10G10B10_UNORM_PACK32:58,VK_FORMAT_A2R10G10B10_SNORM_PACK32:59,VK_FORMAT_A2R10G10B10_USCALED_PACK32:60,VK_FORMAT_A2R10G10B10_SSCALED_PACK32:61,VK_FORMAT_A2R10G10B10_UINT_PACK32:62,VK_FORMAT_A2R10G10B10_SINT_PACK32:63,VK_FORMAT_A2B10G10R10_UNORM_PACK32:64,VK_FORMAT_A2B10G10R10_SNORM_PACK32:65,VK_FORMAT_A2B10G10R10_USCALED_PACK32:66,VK_FORMAT_A2B10G10R10_SSCALED_PACK32:67,VK_FORMAT_A2B10G10R10_UINT_PACK32:68,VK_FORMAT_A2B10G10R10_SINT_PACK32:69,VK_FORMAT_R16_UNORM:70,VK_FORMAT_R16_SNORM:71,VK_FORMAT_R16_USCALED:72,VK_FORMAT_R16_SSCALED:73,VK_FORMAT_R16_UINT:74,VK_FORMAT_R16_SINT:75,VK_FORMAT_R16_SFLOAT:76,VK_FORMAT_R16G16_UNORM:77,VK_FORMAT_R16G16_SNORM:78,VK_FORMAT_R16G16_USCALED:79,VK_FORMAT_R16G16_SSCALED:80,VK_FORMAT_R16G16_UINT:81,VK_FORMAT_R16G16_SINT:82,VK_FORMAT_R16G16_SFLOAT:83,VK_FORMAT_R16G16B16_UNORM:84,VK_FORMAT_R16G16B16_SNORM:85,VK_FORMAT_R16G16B16_USCALED:86,VK_FORMAT_R16G16B16_SSCALED:87,VK_FORMAT_R16G16B16_UINT:88,VK_FORMAT_R16G16B16_SINT:89,VK_FORMAT_R16G16B16_SFLOAT:90,VK_FORMAT_R16G16B16A16_UNORM:91,VK_FORMAT_R16G16B16A16_SNORM:92,VK_FORMAT_R16G16B16A16_USCALED:93,VK_FORMAT_R16G16B16A16_SSCALED:94,VK_FORMAT_R16G16B16A16_UINT:95,VK_FORMAT_R16G16B16A16_SINT:96,VK_FORMAT_R16G16B16A16_SFLOAT:97,VK_FORMAT_R32_UINT:98,VK_FORMAT_R32_SINT:99,VK_FORMAT_R32_SFLOAT:100,VK_FORMAT_R32G32_UINT:101,VK_FORMAT_R32G32_SINT:102,VK_FORMAT_R32G32_SFLOAT:103,VK_FORMAT_R32G32B32_UINT:104,VK_FORMAT_R32G32B32_SINT:105,VK_FORMAT_R32G32B32_SFLOAT:106,VK_FORMAT_R32G32B32A32_UINT:107,VK_FORMAT_R32G32B32A32_SINT:108,VK_FORMAT_R32G32B32A32_SFLOAT:109,VK_FORMAT_R64_UINT:110,VK_FORMAT_R64_SINT:111,VK_FORMAT_R64_SFLOAT:112,VK_FORMAT_R64G64_UINT:113,VK_FORMAT_R64G64_SINT:114,VK_FORMAT_R64G64_SFLOAT:115,VK_FORMAT_R64G64B64_UINT:116,VK_FORMAT_R64G64B64_SINT:117,VK_FORMAT_R64G64B64_SFLOAT:118,VK_FORMAT_R64G64B64A64_UINT:119,VK_FORMAT_R64G64B64A64_SINT:120,VK_FORMAT_R64G64B64A64_SFLOAT:121,VK_FORMAT_B10G11R11_UFLOAT_PACK32:122,VK_FORMAT_E5B9G9R9_UFLOAT_PACK32:123,VK_FORMAT_D16_UNORM:124,VK_FORMAT_X8_D24_UNORM_PACK32:125,VK_FORMAT_D32_SFLOAT:126,VK_FORMAT_S8_UINT:127,VK_FORMAT_D16_UNORM_S8_UINT:128,VK_FORMAT_D24_UNORM_S8_UINT:129,VK_FORMAT_D32_SFLOAT_S8_UINT:130,VK_FORMAT_BC1_RGB_UNORM_BLOCK:131,VK_FORMAT_BC1_RGB_SRGB_BLOCK:132,VK_FORMAT_BC1_RGBA_UNORM_BLOCK:133,VK_FORMAT_BC1_RGBA_SRGB_BLOCK:134,VK_FORMAT_BC2_UNORM_BLOCK:135,VK_FORMAT_BC2_SRGB_BLOCK:136,VK_FORMAT_BC3_UNORM_BLOCK:137,VK_FORMAT_BC3_SRGB_BLOCK:138,VK_FORMAT_BC4_UNORM_BLOCK:139,VK_FORMAT_BC4_SNORM_BLOCK:140,VK_FORMAT_BC5_UNORM_BLOCK:141,VK_FORMAT_BC5_SNORM_BLOCK:142,VK_FORMAT_BC6H_UFLOAT_BLOCK:143,VK_FORMAT_BC6H_SFLOAT_BLOCK:144,VK_FORMAT_BC7_UNORM_BLOCK:145,VK_FORMAT_BC7_SRGB_BLOCK:146,VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK:147,VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK:148,VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK:149,VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK:150,VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK:151,VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK:152,VK_FORMAT_EAC_R11_UNORM_BLOCK:153,VK_FORMAT_EAC_R11_SNORM_BLOCK:154,VK_FORMAT_EAC_R11G11_UNORM_BLOCK:155,VK_FORMAT_EAC_R11G11_SNORM_BLOCK:156,VK_FORMAT_ASTC_4x4_UNORM_BLOCK:157,VK_FORMAT_ASTC_4x4_SRGB_BLOCK:158,VK_FORMAT_ASTC_5x4_UNORM_BLOCK:159,VK_FORMAT_ASTC_5x4_SRGB_BLOCK:160,VK_FORMAT_ASTC_5x5_UNORM_BLOCK:161,VK_FORMAT_ASTC_5x5_SRGB_BLOCK:162,VK_FORMAT_ASTC_6x5_UNORM_BLOCK:163,VK_FORMAT_ASTC_6x5_SRGB_BLOCK:164,VK_FORMAT_ASTC_6x6_UNORM_BLOCK:165,VK_FORMAT_ASTC_6x6_SRGB_BLOCK:166,VK_FORMAT_ASTC_8x5_UNORM_BLOCK:167,VK_FORMAT_ASTC_8x5_SRGB_BLOCK:168,VK_FORMAT_ASTC_8x6_UNORM_BLOCK:169,VK_FORMAT_ASTC_8x6_SRGB_BLOCK:170,VK_FORMAT_ASTC_8x8_UNORM_BLOCK:171,VK_FORMAT_ASTC_8x8_SRGB_BLOCK:172,VK_FORMAT_ASTC_10x5_UNORM_BLOCK:173,VK_FORMAT_ASTC_10x5_SRGB_BLOCK:174,VK_FORMAT_ASTC_10x6_UNORM_BLOCK:175,VK_FORMAT_ASTC_10x6_SRGB_BLOCK:176,VK_FORMAT_ASTC_10x8_UNORM_BLOCK:177,VK_FORMAT_ASTC_10x8_SRGB_BLOCK:178,VK_FORMAT_ASTC_10x10_UNORM_BLOCK:179,VK_FORMAT_ASTC_10x10_SRGB_BLOCK:180,VK_FORMAT_ASTC_12x10_UNORM_BLOCK:181,VK_FORMAT_ASTC_12x10_SRGB_BLOCK:182,VK_FORMAT_ASTC_12x12_UNORM_BLOCK:183,VK_FORMAT_ASTC_12x12_SRGB_BLOCK:184,VK_FORMAT_G8B8G8R8_422_UNORM:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM:1000156006,VK_FORMAT_R10X6_UNORM_PACK16:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16:1000156016,VK_FORMAT_R12X4_UNORM_PACK16:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM:1000156033,VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG:1000054e3,VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG:1000054001,VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG:1000054002,VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG:1000054003,VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG:1000054004,VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG:1000054005,VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG:1000054006,VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG:1000054007,VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT:1000066e3,VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT:1000066001,VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT:1000066002,VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT:1000066003,VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT:1000066004,VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT:1000066005,VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT:1000066006,VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT:1000066007,VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT:1000066008,VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT:1000066009,VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT:1000066010,VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT:1000066011,VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT:1000066012,VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT:1000066013,VK_FORMAT_G8B8G8R8_422_UNORM_KHR:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM_KHR:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR:1000156006,VK_FORMAT_R10X6_UNORM_PACK16_KHR:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR:1000156016,VK_FORMAT_R12X4_UNORM_PACK16_KHR:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM_KHR:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM_KHR:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR:1000156033};Object.freeze(MOe);var Zoe=MOe;var Fkt=new h;function kkt(e,t,n,i){let o=bx(e,t,n,i,Fkt);return l(o)?o.x>0&&o.y>0&&o.z>0:!1}var ere=kkt;function zkt(e){switch(e){case ee.FLOAT:return"float";case ee.FLOAT_VEC2:return"vec2";case ee.FLOAT_VEC3:return"vec3";case ee.FLOAT_VEC4:return"vec4";case ee.FLOAT_MAT2:return"mat2";case ee.FLOAT_MAT3:return"mat3";case ee.FLOAT_MAT4:return"mat4";case ee.SAMPLER_2D:return"sampler2D";case ee.BOOL:return"bool"}}var tre=zkt;function Ukt(e,t,n){return function(){n.apply(e,arguments),t.apply(e,arguments)}}var FV=Ukt;var nre=`uniform sampler2D u_depthTexture;
-
- in vec2 v_textureCoordinates;
-
- void main()
- {
- float z_window = czm_unpackDepth(texture(u_depthTexture, v_textureCoordinates));
- z_window = czm_reverseLogDepth(z_window);
- float n_range = czm_depthRange.near;
- float f_range = czm_depthRange.far;
- float z_ndc = (2.0 * z_window - n_range - f_range) / (f_range - n_range);
- float scale = pow(z_ndc * 0.5 + 0.5, 8.0);
- out_FragColor = vec4(mix(vec3(0.0), vec3(1.0), scale), 1.0);
- }
- `;var BOe={FLOAT:"float",VEC2:"vec2",VEC3:"vec3",VEC4:"vec4",MAT2:"mat2",MAT3:"mat3",MAT4:"mat4"};Object.freeze(BOe);var ire=BOe;var LOe={SIGX:"SIGX",SIGY:"SIGY",SIGZ:"SIGZ",VARX:"VARX",VARY:"VARY",VARZ:"VARZ",SIGR:"VARZ"};Object.freeze(LOe);var ore=LOe;function Vkt(e){async function t({data:i}){let o=[],r={id:i.id,result:void 0,error:void 0};self.CESIUM_BASE_URL=i.baseUrl;try{let a=await e(i.parameters,o);r.result=a}catch(a){a instanceof Error?r.error={name:a.name,message:a.message,stack:a.stack}:r.error=a}i.canTransferArrayBuffer||(o.length=0);try{postMessage(r,o)}catch(a){r.result=void 0,r.error=`postMessage failed with error: ${Sp(a)}
- with responseMessage: ${JSON.stringify(r)}`,postMessage(r)}}function n(i){postMessage({id:i.data?.id,error:`postMessage failed with error: ${JSON.stringify(i)}`})}return self.onmessage=t,self.onmessageerror=n,self}var rre=Vkt;globalThis.CESIUM_VERSION="1.142.0";var kV;typeof ko<"u"&&(kV=ko);(function(){/*!
- * Knockout JavaScript library v3.5.1
- * (c) The Knockout.js team - http://knockoutjs.com/
- * License: MIT (http://www.opensource.org/licenses/mit-license.php)
- */(function(){(function(e){var t=this||(0,eval)("this"),n=t.document,i=t.navigator,o=t.jQuery,r=t.JSON;o||typeof jQuery>"u"||(o=jQuery),(function(a){a(t.ko={})})(function(a,s){function c(_,T){return _===null||typeof _ in A?_===T:!1}function u(_,T){var v;return function(){v||(v=m.a.setTimeout(function(){v=e,_()},T))}}function f(_,T){var v;return function(){clearTimeout(v),v=m.a.setTimeout(_,T)}}function d(_,T){T&&T!=="change"?T==="beforeChange"?this.pc(_):this.gb(_,T):this.qc(_)}function p(_,T){T!==null&&T.s&&T.s()}function g(_,T){var v=this.qd,I=v[E];I.ra||(this.Qb&&this.mb[T]?(v.uc(T,_,this.mb[T]),this.mb[T]=null,--this.Qb):I.I[T]||v.uc(T,_,I.J?{da:_}:v.$c(_)),_.Ja&&_.gd())}var m=typeof a<"u"?a:{};m.b=function(_,T){for(var v=_.split("."),I=m,O=0;O<v.length-1;O++)I=I[v[O]];I[v[v.length-1]]=T},m.L=function(_,T,v){_[T]=v},m.version="3.5.1",m.b("version",m.version),m.options={deferUpdates:!1,useOnlyNativeEvents:!1,foreachHidesDestroyed:!1},m.a=(function(){function _(W,Z){for(var K in W)O.call(W,K)&&Z(K,W[K])}function T(W,Z){if(Z)for(var K in Z)O.call(Z,K)&&(W[K]=Z[K]);return W}function v(W,Z){return W.__proto__=Z,W}function I(W,Z,K,le){var me=W[Z].match(q)||[];m.a.D(K.match(q),function(ae){m.a.Na(me,ae,le)}),W[Z]=me.join(" ")}var O=Object.prototype.hasOwnProperty,N={__proto__:[]}instanceof Array,j=typeof Symbol=="function",k={},U={};k[i&&/Firefox\/2/i.test(i.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"],k.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" "),_(k,function(W,Z){if(Z.length)for(var K=0,le=Z.length;K<le;K++)U[Z[K]]=W});var F={propertychange:!0},H=n&&(function(){for(var W=3,Z=n.createElement("div"),K=Z.getElementsByTagName("i");Z.innerHTML="<!--[if gt IE "+ ++W+"]><i></i><![endif]-->",K[0];);return 4<W?W:e})(),q=/\S+/g,J;return{Jc:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],D:function(W,Z,K){for(var le=0,me=W.length;le<me;le++)Z.call(K,W[le],le,W)},A:typeof Array.prototype.indexOf=="function"?function(W,Z){return Array.prototype.indexOf.call(W,Z)}:function(W,Z){for(var K=0,le=W.length;K<le;K++)if(W[K]===Z)return K;return-1},Lb:function(W,Z,K){for(var le=0,me=W.length;le<me;le++)if(Z.call(K,W[le],le,W))return W[le];return e},Pa:function(W,Z){var K=m.a.A(W,Z);0<K?W.splice(K,1):K===0&&W.shift()},wc:function(W){var Z=[];return W&&m.a.D(W,function(K){0>m.a.A(Z,K)&&Z.push(K)}),Z},Mb:function(W,Z,K){var le=[];if(W)for(var me=0,ae=W.length;me<ae;me++)le.push(Z.call(K,W[me],me));return le},jb:function(W,Z,K){var le=[];if(W)for(var me=0,ae=W.length;me<ae;me++)Z.call(K,W[me],me)&&le.push(W[me]);return le},Nb:function(W,Z){if(Z instanceof Array)W.push.apply(W,Z);else for(var K=0,le=Z.length;K<le;K++)W.push(Z[K]);return W},Na:function(W,Z,K){var le=m.a.A(m.a.bc(W),Z);0>le?K&&W.push(Z):K||W.splice(le,1)},Ba:N,extend:T,setPrototypeOf:v,Ab:N?v:T,P:_,Ga:function(W,Z,K){if(!W)return W;var le={},me;for(me in W)O.call(W,me)&&(le[me]=Z.call(K,W[me],me,W));return le},Tb:function(W){for(;W.firstChild;)m.removeNode(W.firstChild)},Yb:function(W){W=m.a.la(W);for(var Z=(W[0]&&W[0].ownerDocument||n).createElement("div"),K=0,le=W.length;K<le;K++)Z.appendChild(m.oa(W[K]));return Z},Ca:function(W,Z){for(var K=0,le=W.length,me=[];K<le;K++){var ae=W[K].cloneNode(!0);me.push(Z?m.oa(ae):ae)}return me},va:function(W,Z){if(m.a.Tb(W),Z)for(var K=0,le=Z.length;K<le;K++)W.appendChild(Z[K])},Xc:function(W,Z){var K=W.nodeType?[W]:W;if(0<K.length){for(var le=K[0],me=le.parentNode,ae=0,be=Z.length;ae<be;ae++)me.insertBefore(Z[ae],le);for(ae=0,be=K.length;ae<be;ae++)m.removeNode(K[ae])}},Ua:function(W,Z){if(W.length){for(Z=Z.nodeType===8&&Z.parentNode||Z;W.length&&W[0].parentNode!==Z;)W.splice(0,1);for(;1<W.length&&W[W.length-1].parentNode!==Z;)W.length--;if(1<W.length){var K=W[0],le=W[W.length-1];for(W.length=0;K!==le;)W.push(K),K=K.nextSibling;W.push(le)}}return W},Zc:function(W,Z){7>H?W.setAttribute("selected",Z):W.selected=Z},Db:function(W){return W===null||W===e?"":W.trim?W.trim():W.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Ud:function(W,Z){return W=W||"",Z.length>W.length?!1:W.substring(0,Z.length)===Z},vd:function(W,Z){if(W===Z)return!0;if(W.nodeType===11)return!1;if(Z.contains)return Z.contains(W.nodeType!==1?W.parentNode:W);if(Z.compareDocumentPosition)return(Z.compareDocumentPosition(W)&16)==16;for(;W&&W!=Z;)W=W.parentNode;return!!W},Sb:function(W){return m.a.vd(W,W.ownerDocument.documentElement)},kd:function(W){return!!m.a.Lb(W,m.a.Sb)},R:function(W){return W&&W.tagName&&W.tagName.toLowerCase()},Ac:function(W){return m.onError?function(){try{return W.apply(this,arguments)}catch(Z){throw m.onError&&m.onError(Z),Z}}:W},setTimeout:function(W,Z){return setTimeout(m.a.Ac(W),Z)},Gc:function(W){setTimeout(function(){throw m.onError&&m.onError(W),W},0)},B:function(W,Z,K){var le=m.a.Ac(K);if(K=F[Z],m.options.useOnlyNativeEvents||K||!o)if(K||typeof W.addEventListener!="function")if(typeof W.attachEvent<"u"){var me=function(be){le.call(W,be)},ae="on"+Z;W.attachEvent(ae,me),m.a.K.za(W,function(){W.detachEvent(ae,me)})}else throw Error("Browser doesn't support addEventListener or attachEvent");else W.addEventListener(Z,le,!1);else J||(J=typeof o(W).on=="function"?"on":"bind"),o(W)[J](Z,le)},Fb:function(W,Z){if(!W||!W.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var K;if(m.a.R(W)==="input"&&W.type&&Z.toLowerCase()=="click"?(K=W.type,K=K=="checkbox"||K=="radio"):K=!1,m.options.useOnlyNativeEvents||!o||K)if(typeof n.createEvent=="function")if(typeof W.dispatchEvent=="function")K=n.createEvent(U[Z]||"HTMLEvents"),K.initEvent(Z,!0,!0,t,0,0,0,0,0,!1,!1,!1,!1,0,W),W.dispatchEvent(K);else throw Error("The supplied element doesn't support dispatchEvent");else if(K&&W.click)W.click();else if(typeof W.fireEvent<"u")W.fireEvent("on"+Z);else throw Error("Browser doesn't support triggering events");else o(W).trigger(Z)},f:function(W){return m.O(W)?W():W},bc:function(W){return m.O(W)?W.v():W},Eb:function(W,Z,K){var le;Z&&(typeof W.classList=="object"?(le=W.classList[K?"add":"remove"],m.a.D(Z.match(q),function(me){le.call(W.classList,me)})):typeof W.className.baseVal=="string"?I(W.className,"baseVal",Z,K):I(W,"className",Z,K))},Bb:function(W,Z){var K=m.a.f(Z);(K===null||K===e)&&(K="");var le=m.h.firstChild(W);!le||le.nodeType!=3||m.h.nextSibling(le)?m.h.va(W,[W.ownerDocument.createTextNode(K)]):le.data=K,m.a.Ad(W)},Yc:function(W,Z){if(W.name=Z,7>=H)try{var K=W.name.replace(/[&<>'"]/g,function(le){return"&#"+le.charCodeAt(0)+";"});W.mergeAttributes(n.createElement("<input name='"+K+"'/>"),!1)}catch{}},Ad:function(W){9<=H&&(W=W.nodeType==1?W:W.parentNode,W.style&&(W.style.zoom=W.style.zoom))},wd:function(W){if(H){var Z=W.style.width;W.style.width=0,W.style.width=Z}},Pd:function(W,Z){W=m.a.f(W),Z=m.a.f(Z);for(var K=[],le=W;le<=Z;le++)K.push(le);return K},la:function(W){for(var Z=[],K=0,le=W.length;K<le;K++)Z.push(W[K]);return Z},Da:function(W){return j?Symbol(W):W},Zd:H===6,$d:H===7,W:H,Lc:function(W,Z){for(var K=m.a.la(W.getElementsByTagName("input")).concat(m.a.la(W.getElementsByTagName("textarea"))),le=typeof Z=="string"?function(be){return be.name===Z}:function(be){return Z.test(be.name)},me=[],ae=K.length-1;0<=ae;ae--)le(K[ae])&&me.push(K[ae]);return me},Nd:function(W){return typeof W=="string"&&(W=m.a.Db(W))?r&&r.parse?r.parse(W):new Function("return "+W)():null},hc:function(W,Z,K){if(!r||!r.stringify)throw Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js");return r.stringify(m.a.f(W),Z,K)},Od:function(W,Z,K){K=K||{};var le=K.params||{},me=K.includeFields||this.Jc,ae=W;if(typeof W=="object"&&m.a.R(W)==="form")for(var ae=W.action,be=me.length-1;0<=be;be--)for(var ge=m.a.Lc(W,me[be]),we=ge.length-1;0<=we;we--)le[ge[we].name]=ge[we].value;Z=m.a.f(Z);var Ee=n.createElement("form");Ee.style.display="none",Ee.action=ae,Ee.method="post";for(var Be in Z)W=n.createElement("input"),W.type="hidden",W.name=Be,W.value=m.a.hc(m.a.f(Z[Be])),Ee.appendChild(W);_(le,function(ke,Ge){var rt=n.createElement("input");rt.type="hidden",rt.name=ke,rt.value=Ge,Ee.appendChild(rt)}),n.body.appendChild(Ee),K.submitter?K.submitter(Ee):Ee.submit(),setTimeout(function(){Ee.parentNode.removeChild(Ee)},0)}}})(),m.b("utils",m.a),m.b("utils.arrayForEach",m.a.D),m.b("utils.arrayFirst",m.a.Lb),m.b("utils.arrayFilter",m.a.jb),m.b("utils.arrayGetDistinctValues",m.a.wc),m.b("utils.arrayIndexOf",m.a.A),m.b("utils.arrayMap",m.a.Mb),m.b("utils.arrayPushAll",m.a.Nb),m.b("utils.arrayRemoveItem",m.a.Pa),m.b("utils.cloneNodes",m.a.Ca),m.b("utils.createSymbolOrString",m.a.Da),m.b("utils.extend",m.a.extend),m.b("utils.fieldsIncludedWithJsonPost",m.a.Jc),m.b("utils.getFormFields",m.a.Lc),m.b("utils.objectMap",m.a.Ga),m.b("utils.peekObservable",m.a.bc),m.b("utils.postJson",m.a.Od),m.b("utils.parseJson",m.a.Nd),m.b("utils.registerEventHandler",m.a.B),m.b("utils.stringifyJson",m.a.hc),m.b("utils.range",m.a.Pd),m.b("utils.toggleDomNodeCssClass",m.a.Eb),m.b("utils.triggerEvent",m.a.Fb),m.b("utils.unwrapObservable",m.a.f),m.b("utils.objectForEach",m.a.P),m.b("utils.addOrRemoveItem",m.a.Na),m.b("utils.setTextContent",m.a.Bb),m.b("unwrap",m.a.f),Function.prototype.bind||(Function.prototype.bind=function(_){var T=this;if(arguments.length===1)return function(){return T.apply(_,arguments)};var v=Array.prototype.slice.call(arguments,1);return function(){var I=v.slice(0);return I.push.apply(I,arguments),T.apply(_,I)}}),m.a.g=new function(){var _=0,T="__ko__"+new Date().getTime(),v={},I,O;return m.a.W?(I=function(N,j){var k=N[T];if(!k||k==="null"||!v[k]){if(!j)return e;k=N[T]="ko"+_++,v[k]={}}return v[k]},O=function(N){var j=N[T];return j?(delete v[j],N[T]=null,!0):!1}):(I=function(N,j){var k=N[T];return!k&&j&&(k=N[T]={}),k},O=function(N){return N[T]?(delete N[T],!0):!1}),{get:function(N,j){var k=I(N,!1);return k&&k[j]},set:function(N,j,k){(N=I(N,k!==e))&&(N[j]=k)},Ub:function(N,j,k){return N=I(N,!0),N[j]||(N[j]=k)},clear:O,Z:function(){return _+++T}}},m.b("utils.domData",m.a.g),m.b("utils.domData.clear",m.a.g.clear),m.a.K=new function(){function _(j,k){var U=m.a.g.get(j,I);return U===e&&k&&(U=[],m.a.g.set(j,I,U)),U}function T(j){var k=_(j,!1);if(k)for(var k=k.slice(0),U=0;U<k.length;U++)k[U](j);m.a.g.clear(j),m.a.K.cleanExternalData(j),N[j.nodeType]&&v(j.childNodes,!0)}function v(j,k){for(var U=[],F,H=0;H<j.length;H++)if((!k||j[H].nodeType===8)&&(T(U[U.length]=F=j[H]),j[H]!==F))for(;H--&&m.a.A(U,j[H])==-1;);}var I=m.a.g.Z(),O={1:!0,8:!0,9:!0},N={1:!0,9:!0};return{za:function(j,k){if(typeof k!="function")throw Error("Callback must be a function");_(j,!0).push(k)},yb:function(j,k){var U=_(j,!1);U&&(m.a.Pa(U,k),U.length==0&&m.a.g.set(j,I,e))},oa:function(j){return m.u.G(function(){O[j.nodeType]&&(T(j),N[j.nodeType]&&v(j.getElementsByTagName("*")))}),j},removeNode:function(j){m.oa(j),j.parentNode&&j.parentNode.removeChild(j)},cleanExternalData:function(j){o&&typeof o.cleanData=="function"&&o.cleanData([j])}}},m.oa=m.a.K.oa,m.removeNode=m.a.K.removeNode,m.b("cleanNode",m.oa),m.b("removeNode",m.removeNode),m.b("utils.domNodeDisposal",m.a.K),m.b("utils.domNodeDisposal.addDisposeCallback",m.a.K.za),m.b("utils.domNodeDisposal.removeDisposeCallback",m.a.K.yb),(function(){var _=[0,"",""],T=[1,"<table>","</table>"],v=[3,"<table><tbody><tr>","</tr></tbody></table>"],I=[1,"<select multiple='multiple'>","</select>"],O={thead:T,tbody:T,tfoot:T,tr:[2,"<table><tbody>","</tbody></table>"],td:v,th:v,option:I,optgroup:I},N=8>=m.a.W;m.a.ua=function(j,k){var U;if(o){if(o.parseHTML)U=o.parseHTML(j,k)||[];else if((U=o.clean([j],k))&&U[0]){for(var F=U[0];F.parentNode&&F.parentNode.nodeType!==11;)F=F.parentNode;F.parentNode&&F.parentNode.removeChild(F)}}else{(U=k)||(U=n);var F=U.parentWindow||U.defaultView||t,H=m.a.Db(j).toLowerCase(),q=U.createElement("div"),J;for(J=(H=H.match(/^(?:\x3c!--.*?--\x3e\s*?)*?<([a-z]+)[\s>]/))&&O[H[1]]||_,H=J[0],J="ignored<div>"+J[1]+j+J[2]+"</div>",typeof F.innerShiv=="function"?q.appendChild(F.innerShiv(J)):(N&&U.body.appendChild(q),q.innerHTML=J,N&&q.parentNode.removeChild(q));H--;)q=q.lastChild;U=m.a.la(q.lastChild.childNodes)}return U},m.a.Md=function(j,k){var U=m.a.ua(j,k);return U.length&&U[0].parentElement||m.a.Yb(U)},m.a.fc=function(j,k){if(m.a.Tb(j),k=m.a.f(k),k!==null&&k!==e)if(typeof k!="string"&&(k=k.toString()),o)o(j).html(k);else for(var U=m.a.ua(k,j.ownerDocument),F=0;F<U.length;F++)j.appendChild(U[F])}})(),m.b("utils.parseHtmlFragment",m.a.ua),m.b("utils.setHtml",m.a.fc),m.aa=(function(){function _(v,I){if(v){if(v.nodeType==8){var O=m.aa.Uc(v.nodeValue);O!=null&&I.push({ud:v,Kd:O})}else if(v.nodeType==1)for(var O=0,N=v.childNodes,j=N.length;O<j;O++)_(N[O],I)}}var T={};return{Xb:function(v){if(typeof v!="function")throw Error("You can only pass a function to ko.memoization.memoize()");var I=(4294967296*(1+Math.random())|0).toString(16).substring(1)+(4294967296*(1+Math.random())|0).toString(16).substring(1);return T[I]=v,"<!--[ko_memo:"+I+"]-->"},bd:function(v,I){var O=T[v];if(O===e)throw Error("Couldn't find any memo with ID "+v+". Perhaps it's already been unmemoized.");try{return O.apply(null,I||[]),!0}finally{delete T[v]}},cd:function(v,I){var O=[];_(v,O);for(var N=0,j=O.length;N<j;N++){var k=O[N].ud,U=[k];I&&m.a.Nb(U,I),m.aa.bd(O[N].Kd,U),k.nodeValue="",k.parentNode&&k.parentNode.removeChild(k)}},Uc:function(v){return(v=v.match(/^\[ko_memo\:(.*?)\]$/))?v[1]:null}}})(),m.b("memoization",m.aa),m.b("memoization.memoize",m.aa.Xb),m.b("memoization.unmemoize",m.aa.bd),m.b("memoization.parseMemoText",m.aa.Uc),m.b("memoization.unmemoizeDomNodeAndDescendants",m.aa.cd),m.na=(function(){function _(){if(O){for(var k=O,U=0,F;j<O;)if(F=I[j++]){if(j>k){if(5e3<=++U){j=O,m.a.Gc(Error("'Too much recursion' after processing "+U+" task groups."));break}k=O}try{F()}catch(H){m.a.Gc(H)}}}}function T(){_(),j=O=I.length=0}var v,I=[],O=0,N=1,j=0;return t.MutationObserver?v=(function(k){var U=n.createElement("div");return new MutationObserver(k).observe(U,{attributes:!0}),function(){U.classList.toggle("foo")}})(T):v=n&&"onreadystatechange"in n.createElement("script")?function(k){var U=n.createElement("script");U.onreadystatechange=function(){U.onreadystatechange=null,n.documentElement.removeChild(U),U=null,k()},n.documentElement.appendChild(U)}:function(k){setTimeout(k,0)},{scheduler:v,zb:function(k){return O||m.na.scheduler(T),I[O++]=k,N++},cancel:function(k){k=k-(N-O),k>=j&&k<O&&(I[k]=null)},resetForTesting:function(){var k=O-j;return j=O=I.length=0,k},Sd:_}})(),m.b("tasks",m.na),m.b("tasks.schedule",m.na.zb),m.b("tasks.runEarly",m.na.Sd),m.Ta={throttle:function(_,T){_.throttleEvaluation=T;var v=null;return m.$({read:_,write:function(I){clearTimeout(v),v=m.a.setTimeout(function(){_(I)},T)}})},rateLimit:function(_,T){var v,I,O;typeof T=="number"?v=T:(v=T.timeout,I=T.method),_.Hb=!1,O=typeof I=="function"?I:I=="notifyWhenChangesStop"?f:u,_.ub(function(N){return O(N,v,T)})},deferred:function(_,T){if(T!==!0)throw Error("The 'deferred' extender only accepts the value 'true', because it is not supported to turn deferral off once enabled.");_.Hb||(_.Hb=!0,_.ub(function(v){var I,O=!1;return function(){if(!O){m.na.cancel(I),I=m.na.zb(v);try{O=!0,_.notifySubscribers(e,"dirty")}finally{O=!1}}}}))},notify:function(_,T){_.equalityComparer=T=="always"?null:c}};var A={undefined:1,boolean:1,number:1,string:1};m.b("extenders",m.Ta),m.ic=function(_,T,v){this.da=_,this.lc=T,this.mc=v,this.Ib=!1,this.fb=this.Jb=null,m.L(this,"dispose",this.s),m.L(this,"disposeWhenNodeIsRemoved",this.l)},m.ic.prototype.s=function(){this.Ib||(this.fb&&m.a.K.yb(this.Jb,this.fb),this.Ib=!0,this.mc(),this.da=this.lc=this.mc=this.Jb=this.fb=null)},m.ic.prototype.l=function(_){this.Jb=_,m.a.K.za(_,this.fb=this.s.bind(this))},m.T=function(){m.a.Ab(this,y),y.qb(this)};var y={qb:function(_){_.U={change:[]},_.sc=1},subscribe:function(_,T,v){var I=this;v=v||"change";var O=new m.ic(I,T?_.bind(T):_,function(){m.a.Pa(I.U[v],O),I.hb&&I.hb(v)});return I.Qa&&I.Qa(v),I.U[v]||(I.U[v]=[]),I.U[v].push(O),O},notifySubscribers:function(_,T){if(T=T||"change",T==="change"&&this.Gb(),this.Wa(T)){var v=T==="change"&&this.ed||this.U[T].slice(0);try{m.u.xc();for(var I=0,O;O=v[I];++I)O.Ib||O.lc(_)}finally{m.u.end()}}},ob:function(){return this.sc},Dd:function(_){return this.ob()!==_},Gb:function(){++this.sc},ub:function(_){var T=this,v=m.O(T),I,O,N,j,k;T.gb||(T.gb=T.notifySubscribers,T.notifySubscribers=d);var U=_(function(){T.Ja=!1,v&&j===T&&(j=T.nc?T.nc():T());var F=O||k&&T.sb(N,j);k=O=I=!1,F&&T.gb(N=j)});T.qc=function(F,H){H&&T.Ja||(k=!H),T.ed=T.U.change.slice(0),T.Ja=I=!0,j=F,U()},T.pc=function(F){I||(N=F,T.gb(F,"beforeChange"))},T.rc=function(){k=!0},T.gd=function(){T.sb(N,T.v(!0))&&(O=!0)}},Wa:function(_){return this.U[_]&&this.U[_].length},Bd:function(_){if(_)return this.U[_]&&this.U[_].length||0;var T=0;return m.a.P(this.U,function(v,I){v!=="dirty"&&(T+=I.length)}),T},sb:function(_,T){return!this.equalityComparer||!this.equalityComparer(_,T)},toString:function(){return"[object Object]"},extend:function(_){var T=this;return _&&m.a.P(_,function(v,I){var O=m.Ta[v];typeof O=="function"&&(T=O(T,I)||T)}),T}};m.L(y,"init",y.qb),m.L(y,"subscribe",y.subscribe),m.L(y,"extend",y.extend),m.L(y,"getSubscriptionsCount",y.Bd),m.a.Ba&&m.a.setPrototypeOf(y,Function.prototype),m.T.fn=y,m.Qc=function(_){return _!=null&&typeof _.subscribe=="function"&&typeof _.notifySubscribers=="function"},m.b("subscribable",m.T),m.b("isSubscribable",m.Qc),m.S=m.u=(function(){function _(N){v.push(I),I=N}function T(){I=v.pop()}var v=[],I,O=0;return{xc:_,end:T,cc:function(N){if(I){if(!m.Qc(N))throw Error("Only subscribable things can act as dependencies");I.od.call(I.pd,N,N.fd||(N.fd=++O))}},G:function(N,j,k){try{return _(),N.apply(j,k||[])}finally{T()}},qa:function(){if(I)return I.o.qa()},Va:function(){if(I)return I.o.Va()},Ya:function(){if(I)return I.Ya},o:function(){if(I)return I.o}}})(),m.b("computedContext",m.S),m.b("computedContext.getDependenciesCount",m.S.qa),m.b("computedContext.getDependencies",m.S.Va),m.b("computedContext.isInitial",m.S.Ya),m.b("computedContext.registerDependency",m.S.cc),m.b("ignoreDependencies",m.Yd=m.u.G);var x=m.a.Da("_latestValue");m.ta=function(_){function T(){return 0<arguments.length?(T.sb(T[x],arguments[0])&&(T.ya(),T[x]=arguments[0],T.xa()),this):(m.u.cc(T),T[x])}return T[x]=_,m.a.Ba||m.a.extend(T,m.T.fn),m.T.fn.qb(T),m.a.Ab(T,b),m.options.deferUpdates&&m.Ta.deferred(T,!0),T};var b={equalityComparer:c,v:function(){return this[x]},xa:function(){this.notifySubscribers(this[x],"spectate"),this.notifySubscribers(this[x])},ya:function(){this.notifySubscribers(this[x],"beforeChange")}};m.a.Ba&&m.a.setPrototypeOf(b,m.T.fn);var C=m.ta.Ma="__ko_proto__";b[C]=m.ta,m.O=function(_){if((_=typeof _=="function"&&_[C])&&_!==b[C]&&_!==m.o.fn[C])throw Error("Invalid object that looks like an observable; possibly from another Knockout instance");return!!_},m.Za=function(_){return typeof _=="function"&&(_[C]===b[C]||_[C]===m.o.fn[C]&&_.Nc)},m.b("observable",m.ta),m.b("isObservable",m.O),m.b("isWriteableObservable",m.Za),m.b("isWritableObservable",m.Za),m.b("observable.fn",b),m.L(b,"peek",b.v),m.L(b,"valueHasMutated",b.xa),m.L(b,"valueWillMutate",b.ya),m.Ha=function(_){if(_=_||[],typeof _!="object"||!("length"in _))throw Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");return _=m.ta(_),m.a.Ab(_,m.Ha.fn),_.extend({trackArrayChanges:!0})},m.Ha.fn={remove:function(_){for(var T=this.v(),v=[],I=typeof _!="function"||m.O(_)?function(j){return j===_}:_,O=0;O<T.length;O++){var N=T[O];if(I(N)){if(v.length===0&&this.ya(),T[O]!==N)throw Error("Array modified during remove; cannot remove item");v.push(N),T.splice(O,1),O--}}return v.length&&this.xa(),v},removeAll:function(_){if(_===e){var T=this.v(),v=T.slice(0);return this.ya(),T.splice(0,T.length),this.xa(),v}return _?this.remove(function(I){return 0<=m.a.A(_,I)}):[]},destroy:function(_){var T=this.v(),v=typeof _!="function"||m.O(_)?function(N){return N===_}:_;this.ya();for(var I=T.length-1;0<=I;I--){var O=T[I];v(O)&&(O._destroy=!0)}this.xa()},destroyAll:function(_){return _===e?this.destroy(function(){return!0}):_?this.destroy(function(T){return 0<=m.a.A(_,T)}):[]},indexOf:function(_){var T=this();return m.a.A(T,_)},replace:function(_,T){var v=this.indexOf(_);0<=v&&(this.ya(),this.v()[v]=T,this.xa())},sorted:function(_){var T=this().slice(0);return _?T.sort(_):T.sort()},reversed:function(){return this().slice(0).reverse()}},m.a.Ba&&m.a.setPrototypeOf(m.Ha.fn,m.ta.fn),m.a.D("pop push reverse shift sort splice unshift".split(" "),function(_){m.Ha.fn[_]=function(){var T=this.v();this.ya(),this.zc(T,_,arguments);var v=T[_].apply(T,arguments);return this.xa(),v===T?this:v}}),m.a.D(["slice"],function(_){m.Ha.fn[_]=function(){var T=this();return T[_].apply(T,arguments)}}),m.Pc=function(_){return m.O(_)&&typeof _.remove=="function"&&typeof _.push=="function"},m.b("observableArray",m.Ha),m.b("isObservableArray",m.Pc),m.Ta.trackArrayChanges=function(_,T){function v(){function q(){if(k){var J=[].concat(_.v()||[]),W;_.Wa("arrayChange")&&((!O||1<k)&&(O=m.a.Pb(U,J,_.Ob)),W=O),U=J,O=null,k=0,W&&W.length&&_.notifySubscribers(W,"arrayChange")}}I?q():(I=!0,j=_.subscribe(function(){++k},null,"spectate"),U=[].concat(_.v()||[]),O=null,N=_.subscribe(q))}if(_.Ob={},T&&typeof T=="object"&&m.a.extend(_.Ob,T),_.Ob.sparse=!0,!_.zc){var I=!1,O=null,N,j,k=0,U,F=_.Qa,H=_.hb;_.Qa=function(q){F&&F.call(_,q),q==="arrayChange"&&v()},_.hb=function(q){H&&H.call(_,q),q!=="arrayChange"||_.Wa("arrayChange")||(N&&N.s(),j&&j.s(),j=N=null,I=!1,U=e)},_.zc=function(q,J,W){function Z(Ee,Be,ke){return K[K.length]={status:Ee,value:Be,index:ke}}if(I&&!k){var K=[],le=q.length,me=W.length,ae=0;switch(J){case"push":ae=le;case"unshift":for(J=0;J<me;J++)Z("added",W[J],ae+J);break;case"pop":ae=le-1;case"shift":le&&Z("deleted",q[ae],ae);break;case"splice":J=Math.min(Math.max(0,0>W[0]?le+W[0]:W[0]),le);for(var le=me===1?le:Math.min(J+(W[1]||0),le),me=J+me-2,ae=Math.max(le,me),be=[],ge=[],we=2;J<ae;++J,++we)J<le&&ge.push(Z("deleted",q[J],J)),J<me&&be.push(Z("added",W[we],J));m.a.Kc(ge,be);break;default:return}O=K}}}};var E=m.a.Da("_state");m.o=m.$=function(_,T,v){function I(){if(0<arguments.length){if(typeof O=="function")O.apply(N.nb,arguments);else throw Error("Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.");return this}return N.ra||m.u.cc(I),(N.ka||N.J&&I.Xa())&&I.ha(),N.X}if(typeof _=="object"?v=_:(v=v||{},_&&(v.read=_)),typeof v.read!="function")throw Error("Pass a function that returns the value of the ko.computed");var O=v.write,N={X:e,sa:!0,ka:!0,rb:!1,jc:!1,ra:!1,wb:!1,J:!1,Wc:v.read,nb:T||v.owner,l:v.disposeWhenNodeIsRemoved||v.l||null,Sa:v.disposeWhen||v.Sa,Rb:null,I:{},V:0,Ic:null};return I[E]=N,I.Nc=typeof O=="function",m.a.Ba||m.a.extend(I,m.T.fn),m.T.fn.qb(I),m.a.Ab(I,S),v.pure?(N.wb=!0,N.J=!0,m.a.extend(I,w)):v.deferEvaluation&&m.a.extend(I,P),m.options.deferUpdates&&m.Ta.deferred(I,!0),N.l&&(N.jc=!0,N.l.nodeType||(N.l=null)),N.J||v.deferEvaluation||I.ha(),N.l&&I.ja()&&m.a.K.za(N.l,N.Rb=function(){I.s()}),I};var S={equalityComparer:c,qa:function(){return this[E].V},Va:function(){var _=[];return m.a.P(this[E].I,function(T,v){_[v.Ka]=v.da}),_},Vb:function(_){if(!this[E].V)return!1;var T=this.Va();return m.a.A(T,_)!==-1?!0:!!m.a.Lb(T,function(v){return v.Vb&&v.Vb(_)})},uc:function(_,T,v){if(this[E].wb&&T===this)throw Error("A 'pure' computed must not be called recursively");this[E].I[_]=v,v.Ka=this[E].V++,v.La=T.ob()},Xa:function(){var _,T,v=this[E].I;for(_ in v)if(Object.prototype.hasOwnProperty.call(v,_)&&(T=v[_],this.Ia&&T.da.Ja||T.da.Dd(T.La)))return!0},Jd:function(){this.Ia&&!this[E].rb&&this.Ia(!1)},ja:function(){var _=this[E];return _.ka||0<_.V},Rd:function(){this.Ja?this[E].ka&&(this[E].sa=!0):this.Hc()},$c:function(_){if(_.Hb){var T=_.subscribe(this.Jd,this,"dirty"),v=_.subscribe(this.Rd,this);return{da:_,s:function(){T.s(),v.s()}}}return _.subscribe(this.Hc,this)},Hc:function(){var _=this,T=_.throttleEvaluation;T&&0<=T?(clearTimeout(this[E].Ic),this[E].Ic=m.a.setTimeout(function(){_.ha(!0)},T)):_.Ia?_.Ia(!0):_.ha(!0)},ha:function(_){var T=this[E],v=T.Sa,I=!1;if(!T.rb&&!T.ra){if(T.l&&!m.a.Sb(T.l)||v&&v()){if(!T.jc){this.s();return}}else T.jc=!1;T.rb=!0;try{I=this.zd(_)}finally{T.rb=!1}return I}},zd:function(_){var T=this[E],I=!1,v=T.wb?e:!T.V,I={qd:this,mb:T.I,Qb:T.V};m.u.xc({pd:I,od:g,o:this,Ya:v}),T.I={},T.V=0;var O=this.yd(T,I);return T.V?I=this.sb(T.X,O):(this.s(),I=!0),I&&(T.J?this.Gb():this.notifySubscribers(T.X,"beforeChange"),T.X=O,this.notifySubscribers(T.X,"spectate"),!T.J&&_&&this.notifySubscribers(T.X),this.rc&&this.rc()),v&&this.notifySubscribers(T.X,"awake"),I},yd:function(_,T){try{var v=_.Wc;return _.nb?v.call(_.nb):v()}finally{m.u.end(),T.Qb&&!_.J&&m.a.P(T.mb,p),_.sa=_.ka=!1}},v:function(_){var T=this[E];return(T.ka&&(_||!T.V)||T.J&&this.Xa())&&this.ha(),T.X},ub:function(_){m.T.fn.ub.call(this,_),this.nc=function(){return this[E].J||(this[E].sa?this.ha():this[E].ka=!1),this[E].X},this.Ia=function(T){this.pc(this[E].X),this[E].ka=!0,T&&(this[E].sa=!0),this.qc(this,!T)}},s:function(){var _=this[E];!_.J&&_.I&&m.a.P(_.I,function(T,v){v.s&&v.s()}),_.l&&_.Rb&&m.a.K.yb(_.l,_.Rb),_.I=e,_.V=0,_.ra=!0,_.sa=!1,_.ka=!1,_.J=!1,_.l=e,_.Sa=e,_.Wc=e,this.Nc||(_.nb=e)}},w={Qa:function(_){var T=this,v=T[E];if(!v.ra&&v.J&&_=="change"){if(v.J=!1,v.sa||T.Xa())v.I=null,v.V=0,T.ha()&&T.Gb();else{var I=[];m.a.P(v.I,function(O,N){I[N.Ka]=O}),m.a.D(I,function(O,N){var j=v.I[O],k=T.$c(j.da);k.Ka=N,k.La=j.La,v.I[O]=k}),T.Xa()&&T.ha()&&T.Gb()}v.ra||T.notifySubscribers(v.X,"awake")}},hb:function(_){var T=this[E];T.ra||_!="change"||this.Wa("change")||(m.a.P(T.I,function(v,I){I.s&&(T.I[v]={da:I.da,Ka:I.Ka,La:I.La},I.s())}),T.J=!0,this.notifySubscribers(e,"asleep"))},ob:function(){var _=this[E];return _.J&&(_.sa||this.Xa())&&this.ha(),m.T.fn.ob.call(this)}},P={Qa:function(_){_!="change"&&_!="beforeChange"||this.v()}};m.a.Ba&&m.a.setPrototypeOf(S,m.T.fn);var R=m.ta.Ma;S[R]=m.o,m.Oc=function(_){return typeof _=="function"&&_[R]===S[R]},m.Fd=function(_){return m.Oc(_)&&_[E]&&_[E].wb},m.b("computed",m.o),m.b("dependentObservable",m.o),m.b("isComputed",m.Oc),m.b("isPureComputed",m.Fd),m.b("computed.fn",S),m.L(S,"peek",S.v),m.L(S,"dispose",S.s),m.L(S,"isActive",S.ja),m.L(S,"getDependenciesCount",S.qa),m.L(S,"getDependencies",S.Va),m.xb=function(_,T){return typeof _=="function"?m.o(_,T,{pure:!0}):(_=m.a.extend({},_),_.pure=!0,m.o(_,T))},m.b("pureComputed",m.xb),(function(){function _(I,O,N){if(N=N||new v,I=O(I),typeof I!="object"||I===null||I===e||I instanceof RegExp||I instanceof Date||I instanceof String||I instanceof Number||I instanceof Boolean)return I;var j=I instanceof Array?[]:{};return N.save(I,j),T(I,function(k){var U=O(I[k]);switch(typeof U){case"boolean":case"number":case"string":case"function":j[k]=U;break;case"object":case"undefined":var F=N.get(U);j[k]=F!==e?F:_(U,O,N)}}),j}function T(I,O){if(I instanceof Array){for(var N=0;N<I.length;N++)O(N);typeof I.toJSON=="function"&&O("toJSON")}else for(N in I)O(N)}function v(){this.keys=[],this.values=[]}m.ad=function(I){if(arguments.length==0)throw Error("When calling ko.toJS, pass the object you want to convert.");return _(I,function(O){for(var N=0;m.O(O)&&10>N;N++)O=O();return O})},m.toJSON=function(I,O,N){return I=m.ad(I),m.a.hc(I,O,N)},v.prototype={constructor:v,save:function(I,O){var N=m.a.A(this.keys,I);0<=N?this.values[N]=O:(this.keys.push(I),this.values.push(O))},get:function(I){return I=m.a.A(this.keys,I),0<=I?this.values[I]:e}}})(),m.b("toJS",m.ad),m.b("toJSON",m.toJSON),m.Wd=function(_,T,v){function I(O){var N=m.xb(_,v).extend({ma:"always"}),j=N.subscribe(function(k){k&&(j.s(),O(k))});return N.notifySubscribers(N.v()),j}return typeof Promise!="function"||T?I(T.bind(v)):new Promise(I)},m.b("when",m.Wd),(function(){m.w={M:function(_){switch(m.a.R(_)){case"option":return _.__ko__hasDomDataOptionValue__===!0?m.a.g.get(_,m.c.options.$b):7>=m.a.W?_.getAttributeNode("value")&&_.getAttributeNode("value").specified?_.value:_.text:_.value;case"select":return 0<=_.selectedIndex?m.w.M(_.options[_.selectedIndex]):e;default:return _.value}},cb:function(_,T,v){switch(m.a.R(_)){case"option":typeof T=="string"?(m.a.g.set(_,m.c.options.$b,e),"__ko__hasDomDataOptionValue__"in _&&delete _.__ko__hasDomDataOptionValue__,_.value=T):(m.a.g.set(_,m.c.options.$b,T),_.__ko__hasDomDataOptionValue__=!0,_.value=typeof T=="number"?T:"");break;case"select":(T===""||T===null)&&(T=e);for(var I=-1,O=0,N=_.options.length,j;O<N;++O)if(j=m.w.M(_.options[O]),j==T||j===""&&T===e){I=O;break}(v||0<=I||T===e&&1<_.size)&&(_.selectedIndex=I,m.a.W===6&&m.a.setTimeout(function(){_.selectedIndex=I},0));break;default:(T===null||T===e)&&(T=""),_.value=T}}}})(),m.b("selectExtensions",m.w),m.b("selectExtensions.readValue",m.w.M),m.b("selectExtensions.writeValue",m.w.cb),m.m=(function(){function _(k){k=m.a.Db(k),k.charCodeAt(0)===123&&(k=k.slice(1,-1)),k+=`
- ,`;var U=[],F=k.match(I),H,q=[],J=0;if(1<F.length){for(var W=0,Z;Z=F[W];++W){var K=Z.charCodeAt(0);if(K===44){if(0>=J){U.push(H&&q.length?{key:H,value:q.join("")}:{unknown:H||q.join("")}),H=J=0,q=[];continue}}else if(K===58){if(!J&&!H&&q.length===1){H=q.pop();continue}}else{if(K===47&&1<Z.length&&(Z.charCodeAt(1)===47||Z.charCodeAt(1)===42))continue;K===47&&W&&1<Z.length?(K=F[W-1].match(O))&&!N[K[0]]&&(k=k.substr(k.indexOf(Z)+1),F=k.match(I),W=-1,Z="/"):K===40||K===123||K===91?++J:K===41||K===125||K===93?--J:H||q.length||K!==34&&K!==39||(Z=Z.slice(1,-1))}q.push(Z)}if(0<J)throw Error("Unbalanced parentheses, braces, or brackets")}return U}var T=["true","false","null","undefined"],v=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,I=RegExp(`"(?:\\\\.|[^"])*"|'(?:\\\\.|[^'])*'|\`(?:\\\\.|[^\`])*\`|/\\*(?:[^*]|\\*+[^*/])*\\*+/|//.*
- |/(?:\\\\.|[^/])+/w*|[^\\s:,/][^,"'\`{}()/:[\\]]*[^\\s,"'\`{}()/:[\\]]|[^\\s]`,"g"),O=/[\])"'A-Za-z0-9_$]+$/,N={in:1,return:1,typeof:1},j={};return{Ra:[],wa:j,ac:_,vb:function(k,U){function F(K,le){var me;if(!W){var ae=m.getBindingHandler(K);if(ae&&ae.preprocess&&!(le=ae.preprocess(le,K,F)))return;(ae=j[K])&&(me=le,0<=m.a.A(T,me)?me=!1:(ae=me.match(v),me=ae===null?!1:ae[1]?"Object("+ae[1]+")"+ae[2]:me),ae=me),ae&&q.push("'"+(typeof j[K]=="string"?j[K]:K)+"':function(_z){"+me+"=_z}")}J&&(le="function(){return "+le+" }"),H.push("'"+K+"':"+le)}U=U||{};var H=[],q=[],J=U.valueAccessors,W=U.bindingParams,Z=typeof k=="string"?_(k):k;return m.a.D(Z,function(K){F(K.key||K.unknown,K.value)}),q.length&&F("_ko_property_writers","{"+q.join(",")+" }"),H.join(",")},Id:function(k,U){for(var F=0;F<k.length;F++)if(k[F].key==U)return!0;return!1},eb:function(k,U,F,H,q){k&&m.O(k)?!m.Za(k)||q&&k.v()===H||k(H):(k=U.get("_ko_property_writers"))&&k[F]&&k[F](H)}}})(),m.b("expressionRewriting",m.m),m.b("expressionRewriting.bindingRewriteValidators",m.m.Ra),m.b("expressionRewriting.parseObjectLiteral",m.m.ac),m.b("expressionRewriting.preProcessBindings",m.m.vb),m.b("expressionRewriting._twoWayBindings",m.m.wa),m.b("jsonExpressionRewriting",m.m),m.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",m.m.vb),(function(){function _(F){return F.nodeType==8&&N.test(O?F.text:F.nodeValue)}function T(F){return F.nodeType==8&&j.test(O?F.text:F.nodeValue)}function v(F,H){for(var q=F,J=1,W=[];q=q.nextSibling;){if(T(q)&&(m.a.g.set(q,U,!0),J--,J===0))return W;W.push(q),_(q)&&J++}if(!H)throw Error("Cannot find closing comment tag to match: "+F.nodeValue);return null}function I(F,H){var q=v(F,H);return q?0<q.length?q[q.length-1].nextSibling:F.nextSibling:null}var O=n&&n.createComment("test").text==="<!--test-->",N=O?/^\x3c!--\s*ko(?:\s+([\s\S]+))?\s*--\x3e$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,j=O?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,k={ul:!0,ol:!0},U="__ko_matchedEndComment__";m.h={ea:{},childNodes:function(F){return _(F)?v(F):F.childNodes},Ea:function(F){if(_(F)){F=m.h.childNodes(F);for(var H=0,q=F.length;H<q;H++)m.removeNode(F[H])}else m.a.Tb(F)},va:function(F,H){if(_(F)){m.h.Ea(F);for(var q=F.nextSibling,J=0,W=H.length;J<W;J++)q.parentNode.insertBefore(H[J],q)}else m.a.va(F,H)},Vc:function(F,H){var q;_(F)?(q=F.nextSibling,F=F.parentNode):q=F.firstChild,q?H!==q&&F.insertBefore(H,q):F.appendChild(H)},Wb:function(F,H,q){q?(q=q.nextSibling,_(F)&&(F=F.parentNode),q?H!==q&&F.insertBefore(H,q):F.appendChild(H)):m.h.Vc(F,H)},firstChild:function(F){if(_(F))return!F.nextSibling||T(F.nextSibling)?null:F.nextSibling;if(F.firstChild&&T(F.firstChild))throw Error("Found invalid end comment, as the first child of "+F);return F.firstChild},nextSibling:function(F){if(_(F)&&(F=I(F)),F.nextSibling&&T(F.nextSibling)){var H=F.nextSibling;if(T(H)&&!m.a.g.get(H,U))throw Error("Found end comment without a matching opening comment, as child of "+F);return null}return F.nextSibling},Cd:_,Vd:function(F){return(F=(O?F.text:F.nodeValue).match(N))?F[1]:null},Sc:function(F){if(k[m.a.R(F)]){var H=F.firstChild;if(H)do if(H.nodeType===1){var q;q=H.firstChild;var J=null;if(q)do if(J)J.push(q);else if(_(q)){var W=I(q,!0);W?q=W:J=[q]}else T(q)&&(J=[q]);while(q=q.nextSibling);if(q=J)for(J=H.nextSibling,W=0;W<q.length;W++)J?F.insertBefore(q[W],J):F.appendChild(q[W])}while(H=H.nextSibling)}}}})(),m.b("virtualElements",m.h),m.b("virtualElements.allowedBindings",m.h.ea),m.b("virtualElements.emptyNode",m.h.Ea),m.b("virtualElements.insertAfter",m.h.Wb),m.b("virtualElements.prepend",m.h.Vc),m.b("virtualElements.setDomNodeChildren",m.h.va),(function(){m.ga=function(){this.nd={}},m.a.extend(m.ga.prototype,{nodeHasBindings:function(_){switch(_.nodeType){case 1:return _.getAttribute("data-bind")!=null||m.j.getComponentNameForNode(_);case 8:return m.h.Cd(_);default:return!1}},getBindings:function(_,T){var v=this.getBindingsString(_,T),v=v?this.parseBindingsString(v,T,_):null;return m.j.tc(v,_,T,!1)},getBindingAccessors:function(_,T){var v=this.getBindingsString(_,T),v=v?this.parseBindingsString(v,T,_,{valueAccessors:!0}):null;return m.j.tc(v,_,T,!0)},getBindingsString:function(_){switch(_.nodeType){case 1:return _.getAttribute("data-bind");case 8:return m.h.Vd(_);default:return null}},parseBindingsString:function(_,T,v,I){try{var O=this.nd,N=_+(I&&I.valueAccessors||""),j;if(!(j=O[N])){var k,U="with($context){with($data||{}){return{"+m.m.vb(_,I)+"}}}";k=new Function("$context","$element",U),j=O[N]=k}return j(T,v)}catch(F){throw F.message=`Unable to parse bindings.
- Bindings value: `+_+`
- Message: `+F.message,F}}}),m.ga.instance=new m.ga})(),m.b("bindingProvider",m.ga),(function(){function _(ae){var be=(ae=m.a.g.get(ae,me))&&ae.N;be&&(ae.N=null,be.Tc())}function T(ae,be,ge){this.node=ae,this.yc=be,this.kb=[],this.H=!1,be.N||m.a.K.za(ae,_),ge&&ge.N&&(ge.N.kb.push(ae),this.Kb=ge)}function v(ae){return function(){return ae}}function I(ae){return ae()}function O(ae){return m.a.Ga(m.u.G(ae),function(be,ge){return function(){return ae()[ge]}})}function N(ae,be,ge){return typeof ae=="function"?O(ae.bind(null,be,ge)):m.a.Ga(ae,v)}function j(ae,be){return O(this.getBindings.bind(this,ae,be))}function k(ae,be){var ge=m.h.firstChild(be);if(ge){var we,Ee=m.ga.instance,Be=Ee.preprocessNode;if(Be){for(;we=ge;)ge=m.h.nextSibling(we),Be.call(Ee,we);ge=m.h.firstChild(be)}for(;we=ge;)ge=m.h.nextSibling(we),U(ae,we)}m.i.ma(be,m.i.H)}function U(ae,be){var ge=ae,we=be.nodeType===1;we&&m.h.Sc(be),(we||m.ga.instance.nodeHasBindings(be))&&(ge=H(be,null,ae).bindingContextForDescendants),ge&&!K[m.a.R(be)]&&k(ge,be)}function F(ae){var be=[],ge={},we=[];return m.a.P(ae,function Ee(Be){if(!ge[Be]){var ke=m.getBindingHandler(Be);ke&&(ke.after&&(we.push(Be),m.a.D(ke.after,function(Ge){if(ae[Ge]){if(m.a.A(we,Ge)!==-1)throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+we.join(", "));Ee(Ge)}}),we.length--),be.push({key:Be,Mc:ke})),ge[Be]=!0}}),be}function H(ae,be,ge){var we=m.a.g.Ub(ae,me,{}),Ee=we.hd;if(!be){if(Ee)throw Error("You cannot apply bindings multiple times to the same element.");we.hd=!0}Ee||(we.context=ge),we.Zb||(we.Zb={});var Be;if(be&&typeof be!="function")Be=be;else{var ke=m.ga.instance,Ge=ke.getBindingAccessors||j,rt=m.$(function(){return(Be=be?be(ge,ae):Ge.call(ke,ae,ge))&&(ge[J]&&ge[J](),ge[Z]&&ge[Z]()),Be},null,{l:ae});Be&&rt.ja()||(rt=null)}var et=ge,Pe;if(Be){var Ye=function(){return m.a.Ga(rt?rt():Be,I)},ut=rt?function(Tt){return function(){return I(rt()[Tt])}}:function(Tt){return Be[Tt]};Ye.get=function(Tt){return Be[Tt]&&I(ut(Tt))},Ye.has=function(Tt){return Tt in Be},m.i.H in Be&&m.i.subscribe(ae,m.i.H,function(){var Tt=(0,Be[m.i.H])();if(Tt){var tn=m.h.childNodes(ae);tn.length&&Tt(tn,m.Ec(tn[0]))}}),m.i.pa in Be&&(et=m.i.Cb(ae,ge),m.i.subscribe(ae,m.i.pa,function(){var Tt=(0,Be[m.i.pa])();Tt&&m.h.firstChild(ae)&&Tt(ae)})),we=F(Be),m.a.D(we,function(Tt){var tn=Tt.Mc.init,Ht=Tt.Mc.update,xt=Tt.key;if(ae.nodeType===8&&!m.h.ea[xt])throw Error("The binding '"+xt+"' cannot be used with virtual elements");try{typeof tn=="function"&&m.u.G(function(){var Pt=tn(ae,ut(xt),Ye,et.$data,et);if(Pt&&Pt.controlsDescendantBindings){if(Pe!==e)throw Error("Multiple bindings ("+Pe+" and "+xt+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");Pe=xt}}),typeof Ht=="function"&&m.$(function(){Ht(ae,ut(xt),Ye,et.$data,et)},null,{l:ae})}catch(Pt){throw Pt.message='Unable to process binding "'+xt+": "+Be[xt]+`"
- Message: `+Pt.message,Pt}})}return we=Pe===e,{shouldBindDescendants:we,bindingContextForDescendants:we&&et}}function q(ae,be){return ae&&ae instanceof m.fa?ae:new m.fa(ae,e,e,be)}var J=m.a.Da("_subscribable"),W=m.a.Da("_ancestorBindingInfo"),Z=m.a.Da("_dataDependency");m.c={};var K={script:!0,textarea:!0,template:!0};m.getBindingHandler=function(ae){return m.c[ae]};var le={};m.fa=function(ae,be,ge,we,Ee){function Be(){var ut=et?rt():rt,Tt=m.a.f(ut);return be?(m.a.extend(ke,be),W in be&&(ke[W]=be[W])):(ke.$parents=[],ke.$root=Tt,ke.ko=m),ke[J]=Pe,Ge?Tt=ke.$data:(ke.$rawData=ut,ke.$data=Tt),ge&&(ke[ge]=Tt),we&&we(ke,be,Tt),be&&be[J]&&!m.S.o().Vb(be[J])&&be[J](),Ye&&(ke[Z]=Ye),ke.$data}var ke=this,Ge=ae===le,rt=Ge?e:ae,et=typeof rt=="function"&&!m.O(rt),Pe,Ye=Ee&&Ee.dataDependency;Ee&&Ee.exportDependencies?Be():(Pe=m.xb(Be),Pe.v(),Pe.ja()?Pe.equalityComparer=null:ke[J]=e)},m.fa.prototype.createChildContext=function(ae,be,ge,we){if(!we&&be&&typeof be=="object"&&(we=be,be=we.as,ge=we.extend),be&&we&&we.noChildContext){var Ee=typeof ae=="function"&&!m.O(ae);return new m.fa(le,this,null,function(Be){ge&&ge(Be),Be[be]=Ee?ae():ae},we)}return new m.fa(ae,this,be,function(Be,ke){Be.$parentContext=ke,Be.$parent=ke.$data,Be.$parents=(ke.$parents||[]).slice(0),Be.$parents.unshift(Be.$parent),ge&&ge(Be)},we)},m.fa.prototype.extend=function(ae,be){return new m.fa(le,this,null,function(ge){m.a.extend(ge,typeof ae=="function"?ae(ge):ae)},be)};var me=m.a.g.Z();T.prototype.Tc=function(){this.Kb&&this.Kb.N&&this.Kb.N.sd(this.node)},T.prototype.sd=function(ae){m.a.Pa(this.kb,ae),!this.kb.length&&this.H&&this.Cc()},T.prototype.Cc=function(){this.H=!0,this.yc.N&&!this.kb.length&&(this.yc.N=null,m.a.K.yb(this.node,_),m.i.ma(this.node,m.i.pa),this.Tc())},m.i={H:"childrenComplete",pa:"descendantsComplete",subscribe:function(ae,be,ge,we,Ee){var Be=m.a.g.Ub(ae,me,{});return Be.Fa||(Be.Fa=new m.T),Ee&&Ee.notifyImmediately&&Be.Zb[be]&&m.u.G(ge,we,[ae]),Be.Fa.subscribe(ge,we,be)},ma:function(ae,be){var ge=m.a.g.get(ae,me);if(ge&&(ge.Zb[be]=!0,ge.Fa&&ge.Fa.notifySubscribers(ae,be),be==m.i.H)){if(ge.N)ge.N.Cc();else if(ge.N===e&&ge.Fa&&ge.Fa.Wa(m.i.pa))throw Error("descendantsComplete event not supported for bindings on this node")}},Cb:function(ae,be){var ge=m.a.g.Ub(ae,me,{});return ge.N||(ge.N=new T(ae,ge,be[W])),be[W]==ge?be:be.extend(function(we){we[W]=ge})}},m.Td=function(ae){return(ae=m.a.g.get(ae,me))&&ae.context},m.ib=function(ae,be,ge){return ae.nodeType===1&&m.h.Sc(ae),H(ae,be,q(ge))},m.ld=function(ae,be,ge){return ge=q(ge),m.ib(ae,N(be,ge,ae),ge)},m.Oa=function(ae,be){be.nodeType!==1&&be.nodeType!==8||k(q(ae),be)},m.vc=function(ae,be,ge){if(!o&&t.jQuery&&(o=t.jQuery),2>arguments.length){if(be=n.body,!be)throw Error("ko.applyBindings: could not find document.body; has the document been loaded?")}else if(!be||be.nodeType!==1&&be.nodeType!==8)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");U(q(ae,ge),be)},m.Dc=function(ae){return!ae||ae.nodeType!==1&&ae.nodeType!==8?e:m.Td(ae)},m.Ec=function(ae){return(ae=m.Dc(ae))?ae.$data:e},m.b("bindingHandlers",m.c),m.b("bindingEvent",m.i),m.b("bindingEvent.subscribe",m.i.subscribe),m.b("bindingEvent.startPossiblyAsyncContentBinding",m.i.Cb),m.b("applyBindings",m.vc),m.b("applyBindingsToDescendants",m.Oa),m.b("applyBindingAccessorsToNode",m.ib),m.b("applyBindingsToNode",m.ld),m.b("contextFor",m.Dc),m.b("dataFor",m.Ec)})(),(function(_){function T(j,k){var U=Object.prototype.hasOwnProperty.call(O,j)?O[j]:_,F;U?U.subscribe(k):(U=O[j]=new m.T,U.subscribe(k),v(j,function(H,q){var J=!(!q||!q.synchronous);N[j]={definition:H,Gd:J},delete O[j],F||J?U.notifySubscribers(H):m.na.zb(function(){U.notifySubscribers(H)})}),F=!0)}function v(j,k){I("getConfig",[j],function(U){U?I("loadComponent",[j,U],function(F){k(F,U)}):k(null,null)})}function I(j,k,U,F){F||(F=m.j.loaders.slice(0));var H=F.shift();if(H){var q=H[j];if(q){var J=!1;if(q.apply(H,k.concat(function(W){J?U(null):W!==null?U(W):I(j,k,U,F)}))!==_&&(J=!0,!H.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.")}else I(j,k,U,F)}else U(null)}var O={},N={};m.j={get:function(j,k){var U=Object.prototype.hasOwnProperty.call(N,j)?N[j]:_;U?U.Gd?m.u.G(function(){k(U.definition)}):m.na.zb(function(){k(U.definition)}):T(j,k)},Bc:function(j){delete N[j]},oc:I},m.j.loaders=[],m.b("components",m.j),m.b("components.get",m.j.get),m.b("components.clearCachedDefinition",m.j.Bc)})(),(function(){function _(U,F,H,q){function J(){--Z===0&&q(W)}var W={},Z=2,K=H.template;H=H.viewModel,K?O(F,K,function(le){m.j.oc("loadTemplate",[U,le],function(me){W.template=me,J()})}):J(),H?O(F,H,function(le){m.j.oc("loadViewModel",[U,le],function(me){W[k]=me,J()})}):J()}function T(U,F,H){if(typeof F=="function")H(function(J){return new F(J)});else if(typeof F[k]=="function")H(F[k]);else if("instance"in F){var q=F.instance;H(function(){return q})}else"viewModel"in F?T(U,F.viewModel,H):U("Unknown viewModel value: "+F)}function v(U){switch(m.a.R(U)){case"script":return m.a.ua(U.text);case"textarea":return m.a.ua(U.value);case"template":if(I(U.content))return m.a.Ca(U.content.childNodes)}return m.a.Ca(U.childNodes)}function I(U){return t.DocumentFragment?U instanceof DocumentFragment:U&&U.nodeType===11}function O(U,F,H){typeof F.require=="string"?s||t.require?(s||t.require)([F.require],function(q){q&&typeof q=="object"&&q.Xd&&q.default&&(q=q.default),H(q)}):U("Uses require, but no AMD loader is present"):H(F)}function N(U){return function(F){throw Error("Component '"+U+"': "+F)}}var j={};m.j.register=function(U,F){if(!F)throw Error("Invalid configuration for "+U);if(m.j.tb(U))throw Error("Component "+U+" is already registered");j[U]=F},m.j.tb=function(U){return Object.prototype.hasOwnProperty.call(j,U)},m.j.unregister=function(U){delete j[U],m.j.Bc(U)},m.j.Fc={getConfig:function(U,F){F(m.j.tb(U)?j[U]:null)},loadComponent:function(U,F,H){var q=N(U);O(q,F,function(J){_(U,q,J,H)})},loadTemplate:function(U,F,H){if(U=N(U),typeof F=="string")H(m.a.ua(F));else if(F instanceof Array)H(F);else if(I(F))H(m.a.la(F.childNodes));else if(F.element)if(F=F.element,t.HTMLElement?F instanceof HTMLElement:F&&F.tagName&&F.nodeType===1)H(v(F));else if(typeof F=="string"){var q=n.getElementById(F);q?H(v(q)):U("Cannot find element with ID "+F)}else U("Unknown element type: "+F);else U("Unknown template value: "+F)},loadViewModel:function(U,F,H){T(N(U),F,H)}};var k="createViewModel";m.b("components.register",m.j.register),m.b("components.isRegistered",m.j.tb),m.b("components.unregister",m.j.unregister),m.b("components.defaultLoader",m.j.Fc),m.j.loaders.push(m.j.Fc),m.j.dd=j})(),(function(){function _(v,I){var O=v.getAttribute("params");if(O){var O=T.parseBindingsString(O,I,v,{valueAccessors:!0,bindingParams:!0}),O=m.a.Ga(O,function(k){return m.o(k,null,{l:v})}),N=m.a.Ga(O,function(k){var U=k.v();return k.ja()?m.o({read:function(){return m.a.f(k())},write:m.Za(U)&&function(F){k()(F)},l:v}):U});return Object.prototype.hasOwnProperty.call(N,"$raw")||(N.$raw=O),N}return{$raw:{}}}m.j.getComponentNameForNode=function(v){var I=m.a.R(v);if(m.j.tb(I)&&(I.indexOf("-")!=-1||""+v=="[object HTMLUnknownElement]"||8>=m.a.W&&v.tagName===I))return I},m.j.tc=function(v,I,O,N){if(I.nodeType===1){var j=m.j.getComponentNameForNode(I);if(j){if(v=v||{},v.component)throw Error('Cannot use the "component" binding on a custom element matching a component');var k={name:j,params:_(I,O)};v.component=N?function(){return k}:k}}return v};var T=new m.ga;9>m.a.W&&(m.j.register=(function(v){return function(I){return v.apply(this,arguments)}})(m.j.register),n.createDocumentFragment=(function(v){return function(){var I=v(),O=m.j.dd,N;for(N in O);return I}})(n.createDocumentFragment))})(),(function(){function _(I,O,N){if(O=O.template,!O)throw Error("Component '"+I+"' has no template");I=m.a.Ca(O),m.h.va(N,I)}function T(I,O,N){var j=I.createViewModel;return j?j.call(I,O,N):O}var v=0;m.c.component={init:function(I,O,N,j,k){function U(){var W=F&&F.dispose;typeof W=="function"&&W.call(F),q&&q.s(),H=F=q=null}var F,H,q,J=m.a.la(m.h.childNodes(I));return m.h.Ea(I),m.a.K.za(I,U),m.o(function(){var W=m.a.f(O()),Z,K;if(typeof W=="string"?Z=W:(Z=m.a.f(W.name),K=m.a.f(W.params)),!Z)throw Error("No component name specified");var le=m.i.Cb(I,k),me=H=++v;m.j.get(Z,function(ae){if(H===me){if(U(),!ae)throw Error("Unknown component '"+Z+"'");_(Z,ae,I);var be=T(ae,K,{element:I,templateNodes:J});ae=le.createChildContext(be,{extend:function(ge){ge.$component=be,ge.$componentTemplateNodes=J}}),be&&be.koDescendantsComplete&&(q=m.i.subscribe(I,m.i.pa,be.koDescendantsComplete,be)),F=be,m.Oa(ae,I)}})},null,{l:I}),{controlsDescendantBindings:!0}}},m.h.ea.component=!0})();var B={class:"className",for:"htmlFor"};m.c.attr={update:function(_,T){var v=m.a.f(T())||{};m.a.P(v,function(I,O){O=m.a.f(O);var N=I.indexOf(":"),N="lookupNamespaceURI"in _&&0<N&&_.lookupNamespaceURI(I.substr(0,N)),j=O===!1||O===null||O===e;j?N?_.removeAttributeNS(N,I):_.removeAttribute(I):O=O.toString(),8>=m.a.W&&I in B?(I=B[I],j?_.removeAttribute(I):_[I]=O):j||(N?_.setAttributeNS(N,I,O):_.setAttribute(I,O)),I==="name"&&m.a.Yc(_,j?"":O)})}},(function(){m.c.checked={after:["value","attr"],init:function(_,T,v){function I(){var W=_.checked,Z=N();if(!m.S.Ya()&&(W||!k&&!m.S.qa())){var K=m.u.G(T);if(F){var le=H?K.v():K,me=J;J=Z,me!==Z?W&&(m.a.Na(le,Z,!0),m.a.Na(le,me,!1)):m.a.Na(le,Z,W),H&&m.Za(K)&&K(le)}else j&&(Z===e?Z=W:W||(Z=e)),m.m.eb(K,v,"checked",Z,!0)}}function O(){var W=m.a.f(T()),Z=N();F?(_.checked=0<=m.a.A(W,Z),J=Z):_.checked=j&&Z===e?!!W:N()===W}var N=m.xb(function(){if(v.has("checkedValue"))return m.a.f(v.get("checkedValue"));if(q)return v.has("value")?m.a.f(v.get("value")):_.value}),j=_.type=="checkbox",k=_.type=="radio";if(j||k){var U=T(),F=j&&m.a.f(U)instanceof Array,H=!(F&&U.push&&U.splice),q=k||F,J=F?N():e;k&&!_.name&&m.c.uniqueName.init(_,function(){return!0}),m.o(I,null,{l:_}),m.a.B(_,"click",I),m.o(O,null,{l:_}),U=e}}},m.m.wa.checked=!0,m.c.checkedValue={update:function(_,T){_.value=m.a.f(T())}}})(),m.c.class={update:function(_,T){var v=m.a.Db(m.a.f(T()));m.a.Eb(_,_.__ko__cssValue,!1),_.__ko__cssValue=v,m.a.Eb(_,v,!0)}},m.c.css={update:function(_,T){var v=m.a.f(T());v!==null&&typeof v=="object"?m.a.P(v,function(I,O){O=m.a.f(O),m.a.Eb(_,I,O)}):m.c.class.update(_,T)}},m.c.enable={update:function(_,T){var v=m.a.f(T());v&&_.disabled?_.removeAttribute("disabled"):v||_.disabled||(_.disabled=!0)}},m.c.disable={update:function(_,T){m.c.enable.update(_,function(){return!m.a.f(T())})}},m.c.event={init:function(_,T,v,I,O){var N=T()||{};m.a.P(N,function(j){typeof j=="string"&&m.a.B(_,j,function(k){var U,F=T()[j];if(F){try{var H=m.a.la(arguments);I=O.$data,H.unshift(I),U=F.apply(I,H)}finally{U!==!0&&(k.preventDefault?k.preventDefault():k.returnValue=!1)}v.get(j+"Bubble")===!1&&(k.cancelBubble=!0,k.stopPropagation&&k.stopPropagation())}})})}},m.c.foreach={Rc:function(_){return function(){var T=_(),v=m.a.bc(T);return!v||typeof v.length=="number"?{foreach:T,templateEngine:m.ba.Ma}:(m.a.f(T),{foreach:v.data,as:v.as,noChildContext:v.noChildContext,includeDestroyed:v.includeDestroyed,afterAdd:v.afterAdd,beforeRemove:v.beforeRemove,afterRender:v.afterRender,beforeMove:v.beforeMove,afterMove:v.afterMove,templateEngine:m.ba.Ma})}},init:function(_,T){return m.c.template.init(_,m.c.foreach.Rc(T))},update:function(_,T,v,I,O){return m.c.template.update(_,m.c.foreach.Rc(T),v,I,O)}},m.m.Ra.foreach=!1,m.h.ea.foreach=!0,m.c.hasfocus={init:function(_,T,v){function I(j){_.__ko_hasfocusUpdating=!0;var k=_.ownerDocument;if("activeElement"in k){var U;try{U=k.activeElement}catch{U=k.body}j=U===_}k=T(),m.m.eb(k,v,"hasfocus",j,!0),_.__ko_hasfocusLastValue=j,_.__ko_hasfocusUpdating=!1}var O=I.bind(null,!0),N=I.bind(null,!1);m.a.B(_,"focus",O),m.a.B(_,"focusin",O),m.a.B(_,"blur",N),m.a.B(_,"focusout",N),_.__ko_hasfocusLastValue=!1},update:function(_,T){var v=!!m.a.f(T());_.__ko_hasfocusUpdating||_.__ko_hasfocusLastValue===v||(v?_.focus():_.blur(),!v&&_.__ko_hasfocusLastValue&&_.ownerDocument.body.focus(),m.u.G(m.a.Fb,null,[_,v?"focusin":"focusout"]))}},m.m.wa.hasfocus=!0,m.c.hasFocus=m.c.hasfocus,m.m.wa.hasFocus="hasfocus",m.c.html={init:function(){return{controlsDescendantBindings:!0}},update:function(_,T){m.a.fc(_,T())}},(function(){function _(T,v,I){m.c[T]={init:function(O,N,j,k,U){var F,H,q={},J,W,Z;if(v){k=j.get("as");var K=j.get("noChildContext");Z=!(k&&K),q={as:k,noChildContext:K,exportDependencies:Z}}return W=(J=j.get("completeOn")=="render")||j.has(m.i.pa),m.o(function(){var le=m.a.f(N()),me=!I!=!le,ae=!H,be;(Z||me!==F)&&(W&&(U=m.i.Cb(O,U)),me&&((!v||Z)&&(q.dataDependency=m.S.o()),be=v?U.createChildContext(typeof le=="function"?le:N,q):m.S.qa()?U.extend(null,q):U),ae&&m.S.qa()&&(H=m.a.Ca(m.h.childNodes(O),!0)),me?(ae||m.h.va(O,m.a.Ca(H)),m.Oa(be,O)):(m.h.Ea(O),J||m.i.ma(O,m.i.H)),F=me)},null,{l:O}),{controlsDescendantBindings:!0}}},m.m.Ra[T]=!1,m.h.ea[T]=!0}_("if"),_("ifnot",!1,!0),_("with",!0)})(),m.c.let={init:function(_,T,v,I,O){return T=O.extend(T),m.Oa(T,_),{controlsDescendantBindings:!0}}},m.h.ea.let=!0;var L={};m.c.options={init:function(_){if(m.a.R(_)!=="select")throw Error("options binding applies only to SELECT elements");for(;0<_.length;)_.remove(0);return{controlsDescendantBindings:!0}},update:function(_,T,v){function I(){return m.a.jb(_.options,function(K){return K.selected})}function O(K,le,me){var ae=typeof le;return ae=="function"?le(K):ae=="string"?K[le]:me}function N(K,le){if(W&&F)m.i.ma(_,m.i.H);else if(J.length){var me=0<=m.a.A(J,m.w.M(le[0]));m.a.Zc(le[0],me),W&&!me&&m.u.G(m.a.Fb,null,[_,"change"])}}var j=_.multiple,k=_.length!=0&&j?_.scrollTop:null,U=m.a.f(T()),F=v.get("valueAllowUnset")&&v.has("value"),H=v.get("optionsIncludeDestroyed");T={};var q,J=[];F||(j?J=m.a.Mb(I(),m.w.M):0<=_.selectedIndex&&J.push(m.w.M(_.options[_.selectedIndex]))),U&&(typeof U.length>"u"&&(U=[U]),q=m.a.jb(U,function(K){return H||K===e||K===null||!m.a.f(K._destroy)}),v.has("optionsCaption")&&(U=m.a.f(v.get("optionsCaption")),U!==null&&U!==e&&q.unshift(L)));var W=!1;if(T.beforeRemove=function(K){_.removeChild(K)},U=N,v.has("optionsAfterRender")&&typeof v.get("optionsAfterRender")=="function"&&(U=function(K,le){N(0,le),m.u.G(v.get("optionsAfterRender"),null,[le[0],K!==L?K:e])}),m.a.ec(_,q,function(K,le,me){return me.length&&(J=!F&&me[0].selected?[m.w.M(me[0])]:[],W=!0),le=_.ownerDocument.createElement("option"),K===L?(m.a.Bb(le,v.get("optionsCaption")),m.w.cb(le,e)):(me=O(K,v.get("optionsValue"),K),m.w.cb(le,m.a.f(me)),K=O(K,v.get("optionsText"),me),m.a.Bb(le,K)),[le]},T,U),!F){var Z;j?Z=J.length&&I().length<J.length:Z=J.length&&0<=_.selectedIndex?m.w.M(_.options[_.selectedIndex])!==J[0]:J.length||0<=_.selectedIndex,Z&&m.u.G(m.a.Fb,null,[_,"change"])}(F||m.S.Ya())&&m.i.ma(_,m.i.H),m.a.wd(_),k&&20<Math.abs(k-_.scrollTop)&&(_.scrollTop=k)}},m.c.options.$b=m.a.g.Z(),m.c.selectedOptions={init:function(_,T,v){function I(){var j=T(),k=[];m.a.D(_.getElementsByTagName("option"),function(U){U.selected&&k.push(m.w.M(U))}),m.m.eb(j,v,"selectedOptions",k)}function O(){var j=m.a.f(T()),k=_.scrollTop;j&&typeof j.length=="number"&&m.a.D(_.getElementsByTagName("option"),function(U){var F=0<=m.a.A(j,m.w.M(U));U.selected!=F&&m.a.Zc(U,F)}),_.scrollTop=k}if(m.a.R(_)!="select")throw Error("selectedOptions binding applies only to SELECT elements");var N;m.i.subscribe(_,m.i.H,function(){N?I():(m.a.B(_,"change",I),N=m.o(O,null,{l:_}))},null,{notifyImmediately:!0})},update:function(){}},m.m.wa.selectedOptions=!0,m.c.style={update:function(_,T){var v=m.a.f(T()||{});m.a.P(v,function(I,O){if(O=m.a.f(O),(O===null||O===e||O===!1)&&(O=""),o)o(_).css(I,O);else if(/^--/.test(I))_.style.setProperty(I,O);else{I=I.replace(/-(\w)/g,function(j,k){return k.toUpperCase()});var N=_.style[I];_.style[I]=O,O===N||_.style[I]!=N||isNaN(O)||(_.style[I]=O+"px")}})}},m.c.submit={init:function(_,T,v,I,O){if(typeof T()!="function")throw Error("The value for a submit binding must be a function");m.a.B(_,"submit",function(N){var j,k=T();try{j=k.call(O.$data,_)}finally{j!==!0&&(N.preventDefault?N.preventDefault():N.returnValue=!1)}})}},m.c.text={init:function(){return{controlsDescendantBindings:!0}},update:function(_,T){m.a.Bb(_,T())}},m.h.ea.text=!0,(function(){if(t&&t.navigator){var _=function(q){if(q)return parseFloat(q[1])},T=t.navigator.userAgent,v,I,O,N,j;(v=t.opera&&t.opera.version&&parseInt(t.opera.version()))||(j=_(T.match(/Edge\/([^ ]+)$/)))||_(T.match(/Chrome\/([^ ]+)/))||(I=_(T.match(/Version\/([^ ]+) Safari/)))||(O=_(T.match(/Firefox\/([^ ]+)/)))||(N=m.a.W||_(T.match(/MSIE ([^ ]+)/)))||(N=_(T.match(/rv:([^ )]+)/)))}if(8<=N&&10>N)var k=m.a.g.Z(),U=m.a.g.Z(),F=function(q){var J=this.activeElement;(J=J&&m.a.g.get(J,U))&&J(q)},H=function(q,J){var W=q.ownerDocument;m.a.g.get(W,k)||(m.a.g.set(W,k,!0),m.a.B(W,"selectionchange",F)),m.a.g.set(q,U,J)};m.c.textInput={init:function(q,J,W){function Z(Be,ke){m.a.B(q,Be,ke)}function K(){var Be=m.a.f(J());(Be===null||Be===e)&&(Be=""),ge!==e&&Be===ge?m.a.setTimeout(K,4):q.value!==Be&&(Ee=!0,q.value=Be,Ee=!1,ae=q.value)}function le(){be||(ge=q.value,be=m.a.setTimeout(me,4))}function me(){clearTimeout(be),ge=be=e;var Be=q.value;ae!==Be&&(ae=Be,m.m.eb(J(),W,"textInput",Be))}var ae=q.value,be,ge,we=m.a.W==9?le:me,Ee=!1;N&&Z("keypress",me),11>N&&Z("propertychange",function(Be){Ee||Be.propertyName!=="value"||we(Be)}),N==8&&(Z("keyup",me),Z("keydown",me)),H&&(H(q,we),Z("dragend",le)),(!N||9<=N)&&Z("input",we),5>I&&m.a.R(q)==="textarea"?(Z("keydown",le),Z("paste",le),Z("cut",le)):11>v?Z("keydown",le):4>O?(Z("DOMAutoComplete",me),Z("dragdrop",me),Z("drop",me)):j&&q.type==="number"&&Z("keydown",le),Z("change",me),Z("blur",me),m.o(K,null,{l:q})}},m.m.wa.textInput=!0,m.c.textinput={preprocess:function(q,J,W){W("textInput",q)}}})(),m.c.uniqueName={init:function(_,T){if(T()){var v="ko_unique_"+ ++m.c.uniqueName.rd;m.a.Yc(_,v)}}},m.c.uniqueName.rd=0,m.c.using={init:function(_,T,v,I,O){var N;return v.has("as")&&(N={as:v.get("as"),noChildContext:v.get("noChildContext")}),T=O.createChildContext(T,N),m.Oa(T,_),{controlsDescendantBindings:!0}}},m.h.ea.using=!0,m.c.value={init:function(_,T,v){var I=m.a.R(_),O=I=="input";if(!O||_.type!="checkbox"&&_.type!="radio"){var N=[],j=v.get("valueUpdate"),k=!1,U=null;j&&(typeof j=="string"?N=[j]:N=m.a.wc(j),m.a.Pa(N,"change"));var F=function(){U=null,k=!1;var J=T(),W=m.w.M(_);m.m.eb(J,v,"value",W)};!m.a.W||!O||_.type!="text"||_.autocomplete=="off"||_.form&&_.form.autocomplete=="off"||m.a.A(N,"propertychange")!=-1||(m.a.B(_,"propertychange",function(){k=!0}),m.a.B(_,"focus",function(){k=!1}),m.a.B(_,"blur",function(){k&&F()})),m.a.D(N,function(J){var W=F;m.a.Ud(J,"after")&&(W=function(){U=m.w.M(_),m.a.setTimeout(F,0)},J=J.substring(5)),m.a.B(_,J,W)});var H;if(H=O&&_.type=="file"?function(){var J=m.a.f(T());J===null||J===e||J===""?_.value="":m.u.G(F)}:function(){var J=m.a.f(T()),W=m.w.M(_);U!==null&&J===U?m.a.setTimeout(H,0):(J!==W||W===e)&&(I==="select"?(W=v.get("valueAllowUnset"),m.w.cb(_,J,W),W||J===m.w.M(_)||m.u.G(F)):m.w.cb(_,J))},I==="select"){var q;m.i.subscribe(_,m.i.H,function(){q?v.get("valueAllowUnset")?H():F():(m.a.B(_,"change",F),q=m.o(H,null,{l:_}))},null,{notifyImmediately:!0})}else m.a.B(_,"change",F),m.o(H,null,{l:_})}else m.ib(_,{checkedValue:T})},update:function(){}},m.m.wa.value=!0,m.c.visible={update:function(_,T){var v=m.a.f(T()),I=_.style.display!="none";v&&!I?_.style.display="":!v&&I&&(_.style.display="none")}},m.c.hidden={update:function(_,T){m.c.visible.update(_,function(){return!m.a.f(T())})}},(function(_){m.c[_]={init:function(T,v,I,O,N){return m.c.event.init.call(this,T,function(){var j={};return j[_]=v(),j},I,O,N)}}})("click"),m.ca=function(){},m.ca.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource")},m.ca.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock")},m.ca.prototype.makeTemplateSource=function(_,T){if(typeof _=="string"){T=T||n;var v=T.getElementById(_);if(!v)throw Error("Cannot find template with ID "+_);return new m.C.F(v)}if(_.nodeType==1||_.nodeType==8)return new m.C.ia(_);throw Error("Unknown template type: "+_)},m.ca.prototype.renderTemplate=function(_,T,v,I){return _=this.makeTemplateSource(_,I),this.renderTemplateSource(_,T,v,I)},m.ca.prototype.isTemplateRewritten=function(_,T){return this.allowTemplateRewriting===!1?!0:this.makeTemplateSource(_,T).data("isRewritten")},m.ca.prototype.rewriteTemplate=function(_,T,v){_=this.makeTemplateSource(_,v),T=T(_.text()),_.text(T),_.data("isRewritten",!0)},m.b("templateEngine",m.ca),m.kc=(function(){function _(I,O,N,j){I=m.m.ac(I);for(var k=m.m.Ra,U=0;U<I.length;U++){var F=I[U].key;if(Object.prototype.hasOwnProperty.call(k,F)){var H=k[F];if(typeof H=="function"){if(F=H(I[U].value))throw Error(F)}else if(!H)throw Error("This template engine does not support the '"+F+"' binding within its templates")}}return N="ko.__tr_ambtns(function($context,$element){return(function(){return{ "+m.m.vb(I,{valueAccessors:!0})+" } })()},'"+N.toLowerCase()+"')",j.createJavaScriptEvaluatorBlock(N)+O}var T=/(<([a-z]+\d*)(?:\s+(?!data-bind\s*=\s*)[a-z0-9\-]+(?:=(?:\"[^\"]*\"|\'[^\']*\'|[^>]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,v=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{xd:function(I,O,N){O.isTemplateRewritten(I,N)||O.rewriteTemplate(I,function(j){return m.kc.Ld(j,O)},N)},Ld:function(I,O){return I.replace(T,function(N,j,k,U,F){return _(F,j,k,O)}).replace(v,function(N,j){return _(j,"<!-- ko -->","#comment",O)})},md:function(I,O){return m.aa.Xb(function(N,j){var k=N.nextSibling;k&&k.nodeName.toLowerCase()===O&&m.ib(k,I,j)})}}})(),m.b("__tr_ambtns",m.kc.md),(function(){m.C={},m.C.F=function(v){if(this.F=v){var I=m.a.R(v);this.ab=I==="script"?1:I==="textarea"?2:I=="template"&&v.content&&v.content.nodeType===11?3:4}},m.C.F.prototype.text=function(){var v=this.ab===1?"text":this.ab===2?"value":"innerHTML";if(arguments.length==0)return this.F[v];var I=arguments[0];v==="innerHTML"?m.a.fc(this.F,I):this.F[v]=I};var _=m.a.g.Z()+"_";m.C.F.prototype.data=function(v){if(arguments.length===1)return m.a.g.get(this.F,_+v);m.a.g.set(this.F,_+v,arguments[1])};var T=m.a.g.Z();m.C.F.prototype.nodes=function(){var v=this.F;if(arguments.length==0){var I=m.a.g.get(v,T)||{},O=I.lb||(this.ab===3?v.content:this.ab===4?v:e);if(!O||I.jd){var N=this.text();N&&N!==I.bb&&(O=m.a.Md(N,v.ownerDocument),m.a.g.set(v,T,{lb:O,bb:N,jd:!0}))}return O}I=arguments[0],this.ab!==e&&this.text(""),m.a.g.set(v,T,{lb:I})},m.C.ia=function(v){this.F=v},m.C.ia.prototype=new m.C.F,m.C.ia.prototype.constructor=m.C.ia,m.C.ia.prototype.text=function(){if(arguments.length==0){var v=m.a.g.get(this.F,T)||{};return v.bb===e&&v.lb&&(v.bb=v.lb.innerHTML),v.bb}m.a.g.set(this.F,T,{bb:arguments[0]})},m.b("templateSources",m.C),m.b("templateSources.domElement",m.C.F),m.b("templateSources.anonymousTemplate",m.C.ia)})(),(function(){function _(U,F,H){var q;for(F=m.h.nextSibling(F);U&&(q=U)!==F;)U=m.h.nextSibling(q),H(q,U)}function T(U,F){if(U.length){var H=U[0],q=U[U.length-1],J=H.parentNode,W=m.ga.instance,Z=W.preprocessNode;if(Z){if(_(H,q,function(K,le){var me=K.previousSibling,ae=Z.call(W,K);ae&&(K===H&&(H=ae[0]||le),K===q&&(q=ae[ae.length-1]||me))}),U.length=0,!H)return;H===q?U.push(H):(U.push(H,q),m.a.Ua(U,J))}_(H,q,function(K){K.nodeType!==1&&K.nodeType!==8||m.vc(F,K)}),_(H,q,function(K){K.nodeType!==1&&K.nodeType!==8||m.aa.cd(K,[F])}),m.a.Ua(U,J)}}function v(U){return U.nodeType?U:0<U.length?U[0]:null}function I(U,F,H,q,J){J=J||{};var W=(U&&v(U)||H||{}).ownerDocument,Z=J.templateEngine||N;if(m.kc.xd(H,Z,W),H=Z.renderTemplate(H,q,J,W),typeof H.length!="number"||0<H.length&&typeof H[0].nodeType!="number")throw Error("Template engine must return an array of DOM nodes");switch(W=!1,F){case"replaceChildren":m.h.va(U,H),W=!0;break;case"replaceNode":m.a.Xc(U,H),W=!0;break;case"ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+F)}return W&&(T(H,q),J.afterRender&&m.u.G(J.afterRender,null,[H,q[J.as||"$data"]]),F=="replaceChildren"&&m.i.ma(U,m.i.H)),H}function O(U,F,H){return m.O(U)?U():typeof U=="function"?U(F,H):U}var N;m.gc=function(U){if(U!=e&&!(U instanceof m.ca))throw Error("templateEngine must inherit from ko.templateEngine");N=U},m.dc=function(U,F,H,q,J){if(H=H||{},(H.templateEngine||N)==e)throw Error("Set a template engine before calling renderTemplate");if(J=J||"replaceChildren",q){var W=v(q);return m.$(function(){var K=F&&F instanceof m.fa?F:new m.fa(F,null,null,null,{exportDependencies:!0}),Z=O(U,K.$data,K),K=I(q,J,Z,K,H);J=="replaceNode"&&(q=K,W=v(q))},null,{Sa:function(){return!W||!m.a.Sb(W)},l:W&&J=="replaceNode"?W.parentNode:W})}return m.aa.Xb(function(Z){m.dc(U,F,H,Z,"replaceNode")})},m.Qd=function(U,F,H,q,J){function W(ge,we){m.u.G(m.a.ec,null,[q,ge,K,H,Z,we]),m.i.ma(q,m.i.H)}function Z(ge,we){T(we,le),H.afterRender&&H.afterRender(we,ge),le=null}function K(ge,we){le=J.createChildContext(ge,{as:me,noChildContext:H.noChildContext,extend:function(Be){Be.$index=we,me&&(Be[me+"Index"]=we)}});var Ee=O(U,ge,le);return I(q,"ignoreTargetNode",Ee,le,H)}var le,me=H.as,ae=H.includeDestroyed===!1||m.options.foreachHidesDestroyed&&!H.includeDestroyed;if(ae||H.beforeRemove||!m.Pc(F))return m.$(function(){var ge=m.a.f(F)||[];typeof ge.length>"u"&&(ge=[ge]),ae&&(ge=m.a.jb(ge,function(we){return we===e||we===null||!m.a.f(we._destroy)})),W(ge)},null,{l:q});W(F.v());var be=F.subscribe(function(ge){W(F(),ge)},null,"arrayChange");return be.l(q),be};var j=m.a.g.Z(),k=m.a.g.Z();m.c.template={init:function(U,F){var H=m.a.f(F());if(typeof H=="string"||"name"in H)m.h.Ea(U);else if("nodes"in H){if(H=H.nodes||[],m.O(H))throw Error('The "nodes" option must be a plain, non-observable array.');var q=H[0]&&H[0].parentNode;q&&m.a.g.get(q,k)||(q=m.a.Yb(H),m.a.g.set(q,k,!0)),new m.C.ia(U).nodes(q)}else if(H=m.h.childNodes(U),0<H.length)q=m.a.Yb(H),new m.C.ia(U).nodes(q);else throw Error("Anonymous template defined, but no template content was provided");return{controlsDescendantBindings:!0}},update:function(U,F,H,q,J){var W=F();F=m.a.f(W),H=!0,q=null,typeof F=="string"?F={}:(W="name"in F?F.name:U,"if"in F&&(H=m.a.f(F.if)),H&&"ifnot"in F&&(H=!m.a.f(F.ifnot)),H&&!W&&(H=!1)),"foreach"in F?q=m.Qd(W,H&&F.foreach||[],F,U,J):H?(H=J,"data"in F&&(H=J.createChildContext(F.data,{as:F.as,noChildContext:F.noChildContext,exportDependencies:!0})),q=m.dc(W,H,F,U)):m.h.Ea(U),J=q,(F=m.a.g.get(U,j))&&typeof F.s=="function"&&F.s(),m.a.g.set(U,j,!J||J.ja&&!J.ja()?e:J)}},m.m.Ra.template=function(U){return U=m.m.ac(U),U.length==1&&U[0].unknown||m.m.Id(U,"name")?null:"This template engine does not support anonymous templates nested within its templates"},m.h.ea.template=!0})(),m.b("setTemplateEngine",m.gc),m.b("renderTemplate",m.dc),m.a.Kc=function(_,T,v){if(_.length&&T.length){var I,O,N,j,k;for(I=O=0;(!v||I<v)&&(j=_[O]);++O){for(N=0;k=T[N];++N)if(j.value===k.value){j.moved=k.index,k.moved=j.index,T.splice(N,1),I=N=0;break}I+=N}}},m.a.Pb=(function(){function _(T,v,I,O,N){var j=Math.min,k=Math.max,U=[],F,H=T.length,q,J=v.length,W=J-H||1,Z=H+J+1,K,le,me;for(F=0;F<=H;F++)for(le=K,U.push(K=[]),me=j(J,F+W),q=k(0,F-1);q<=me;q++)K[q]=q?F?T[F-1]===v[q-1]?le[q-1]:j(le[q]||Z,K[q-1]||Z)+1:q+1:F+1;for(j=[],k=[],W=[],F=H,q=J;F||q;)J=U[F][q]-1,q&&J===U[F][q-1]?k.push(j[j.length]={status:I,value:v[--q],index:q}):F&&J===U[F-1][q]?W.push(j[j.length]={status:O,value:T[--F],index:F}):(--q,--F,N.sparse||j.push({status:"retained",value:v[q]}));return m.a.Kc(W,k,!N.dontLimitMoves&&10*H),j.reverse()}return function(T,v,I){return I=typeof I=="boolean"?{dontLimitMoves:I}:I||{},T=T||[],v=v||[],T.length<v.length?_(T,v,"added","deleted",I):_(v,T,"deleted","added",I)}})(),m.b("utils.compareArrays",m.a.Pb),(function(){function _(I,O,N,j,k){var U=[],F=m.$(function(){var H=O(N,k,m.a.Ua(U,I))||[];0<U.length&&(m.a.Xc(U,H),j&&m.u.G(j,null,[N,H,k])),U.length=0,m.a.Nb(U,H)},null,{l:I,Sa:function(){return!m.a.kd(U)}});return{Y:U,$:F.ja()?F:e}}var T=m.a.g.Z(),v=m.a.g.Z();m.a.ec=function(I,O,N,j,k,U){function F(Tt){Ee={Aa:Tt,pb:m.ta(le++)},Z.push(Ee),W||we.push(Ee)}function H(Tt){Ee=J[Tt],le!==Ee.pb.v()&&ge.push(Ee),Ee.pb(le++),m.a.Ua(Ee.Y,I),Z.push(Ee)}function q(Tt,tn){if(Tt)for(var Ht=0,xt=tn.length;Ht<xt;Ht++)m.a.D(tn[Ht].Y,function(Pt){Tt(Pt,Ht,tn[Ht].Aa)})}O=O||[],typeof O.length>"u"&&(O=[O]),j=j||{};var J=m.a.g.get(I,T),W=!J,Z=[],K=0,le=0,me=[],ae=[],be=[],ge=[],we=[],Ee,Be=0;if(W)m.a.D(O,F);else{if(!U||J&&J._countWaitingForRemove){var ke=m.a.Mb(J,function(Tt){return Tt.Aa});U=m.a.Pb(ke,O,{dontLimitMoves:j.dontLimitMoves,sparse:!0})}for(var ke=0,Ge,rt,et;Ge=U[ke];ke++)switch(rt=Ge.moved,et=Ge.index,Ge.status){case"deleted":for(;K<et;)H(K++);rt===e&&(Ee=J[K],Ee.$&&(Ee.$.s(),Ee.$=e),m.a.Ua(Ee.Y,I).length&&(j.beforeRemove&&(Z.push(Ee),Be++,Ee.Aa===v?Ee=null:be.push(Ee)),Ee&&me.push.apply(me,Ee.Y))),K++;break;case"added":for(;le<et;)H(K++);rt!==e?(ae.push(Z.length),H(rt)):F(Ge.value)}for(;le<O.length;)H(K++);Z._countWaitingForRemove=Be}m.a.g.set(I,T,Z),q(j.beforeMove,ge),m.a.D(me,j.beforeRemove?m.oa:m.removeNode);var Pe,Ye,ut;try{ut=I.ownerDocument.activeElement}catch{}if(ae.length)for(;(ke=ae.shift())!=e;){for(Ee=Z[ke],Pe=e;ke;)if((Ye=Z[--ke].Y)&&Ye.length){Pe=Ye[Ye.length-1];break}for(O=0;K=Ee.Y[O];Pe=K,O++)m.h.Wb(I,K,Pe)}for(ke=0;Ee=Z[ke];ke++){for(Ee.Y||m.a.extend(Ee,_(I,N,Ee.Aa,k,Ee.pb)),O=0;K=Ee.Y[O];Pe=K,O++)m.h.Wb(I,K,Pe);!Ee.Ed&&k&&(k(Ee.Aa,Ee.Y,Ee.pb),Ee.Ed=!0,Pe=Ee.Y[Ee.Y.length-1])}for(ut&&I.ownerDocument.activeElement!=ut&&ut.focus(),q(j.beforeRemove,be),ke=0;ke<be.length;++ke)be[ke].Aa=v;q(j.afterMove,ge),q(j.afterAdd,we)}})(),m.b("utils.setDomNodeChildrenFromArrayMapping",m.a.ec),m.ba=function(){this.allowTemplateRewriting=!1},m.ba.prototype=new m.ca,m.ba.prototype.constructor=m.ba,m.ba.prototype.renderTemplateSource=function(_,T,v,I){return(T=!(9>m.a.W)&&_.nodes?_.nodes():null)?m.a.la(T.cloneNode(!0).childNodes):(_=_.text(),m.a.ua(_,I))},m.ba.Ma=new m.ba,m.gc(m.ba.Ma),m.b("nativeTemplateEngine",m.ba),(function(){m.$a=function(){var T=this.Hd=(function(){if(!o||!o.tmpl)return 0;try{if(0<=o.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch{}return 1})();this.renderTemplateSource=function(v,I,O,N){if(N=N||n,O=O||{},2>T)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var j=v.data("precompiled");return j||(j=v.text()||"",j=o.template(null,"{{ko_with $item.koBindingContext}}"+j+"{{/ko_with}}"),v.data("precompiled",j)),v=[I.$data],I=o.extend({koBindingContext:I},O.templateOptions),I=o.tmpl(j,v,I),I.appendTo(N.createElement("div")),o.fragments={},I},this.createJavaScriptEvaluatorBlock=function(v){return"{{ko_code ((function() { return "+v+" })()) }}"},this.addTemplate=function(v,I){n.write("<script type='text/html' id='"+v+"'>"+I+"</script>")},0<T&&(o.tmpl.tag.ko_code={open:"__.push($1 || '');"},o.tmpl.tag.ko_with={open:"with($1) {",close:"} "})},m.$a.prototype=new m.ca,m.$a.prototype.constructor=m.$a;var _=new m.$a;0<_.Hd&&m.gc(_),m.b("jqueryTmplTemplateEngine",m.$a)})()})})()})()})();var jkt=ko;typeof window<"u"?(ko=window.ko,typeof kV<"u"?window.ko=kV:delete window.ko):(ko=global.ko,typeof kV<"u"?global.ko=kV:delete global.ko);var tE=jkt;/**
- * @license
- * Knockout ES5 plugin - https://github.com/SteveSanderson/knockout-es5
- * Copyright (c) Steve Sanderson
- * MIT license
- */var are="__knockoutObservables",sre="__knockoutSubscribable";function NOe(e,t){if(!e)throw new Error("When calling ko.track, you must pass an object as the first parameter.");var n=this,i=FOe(e,!0);return t=t||Object.getOwnPropertyNames(e),t.forEach(function(o){if(!(o===are||o===sre)&&!(o in i)){var r=e[o],a=r instanceof Array,s=n.isObservable(r)?r:a?n.observableArray(r):n.observable(r);Object.defineProperty(e,o,{configurable:!0,enumerable:!0,get:s,set:n.isWriteableObservable(s)?s:void 0}),i[o]=s,a&&Hkt(n,s)}}),e}function FOe(e,t){var n=e[are];return!n&&t&&(n={},Object.defineProperty(e,are,{value:n})),n}function Gkt(e,t,n){var i=this,o={owner:e,deferEvaluation:!0};if(typeof n=="function")o.read=n;else{if("value"in n)throw new Error('For ko.defineProperty, you must not specify a "value" for the property. You must provide a "get" function.');if(typeof n.get!="function")throw new Error('For ko.defineProperty, the third parameter must be either an evaluator function, or an options object containing a function called "get".');o.read=n.get,o.write=n.set}return e[t]=i.computed(o),NOe.call(i,e,[t]),e}function Hkt(e,t){var n=null;e.computed(function(){n&&(n.dispose(),n=null);var i=t();i instanceof Array&&(n=Wkt(e,t,i))})}function Wkt(e,t,n){var i=qkt(e,n);return i.subscribe(t)}function qkt(e,t){var n=t[sre];if(!n){n=new e.subscribable,Object.defineProperty(t,sre,{value:n});var i={};Ykt(t,n,i),Xkt(e,t,n,i)}return n}function Ykt(e,t,n){["pop","push","reverse","shift","sort","splice","unshift"].forEach(function(i){var o=e[i];e[i]=function(){var r=o.apply(this,arguments);return n.pause!==!0&&t.notifySubscribers(this),r}})}function Xkt(e,t,n,i){["remove","removeAll","destroy","destroyAll","replace"].forEach(function(o){Object.defineProperty(t,o,{enumerable:!1,value:function(){var r;i.pause=!0;try{r=e.observableArray.fn[o].apply(e.observableArray(t),arguments)}finally{i.pause=!1}return n.notifySubscribers(t),r}})})}function kOe(e,t){if(!e)return null;var n=FOe(e,!1);return n&&n[t]||null}function Kkt(e,t){var n=kOe(e,t);n&&n.valueHasMutated()}function Qkt(e){e.track=NOe,e.getObservable=kOe,e.valueHasMutated=Kkt,e.defineProperty=Gkt}var zV={attachToKo:Qkt};var zOe="http://www.w3.org/2000/svg",UOe="cesium-svgPath-svg",$kt={register:function(e){e.bindingHandlers.cesiumSvgPath={init:function(t,n){let i=document.createElementNS(zOe,"svg:svg");i.setAttribute("class",UOe);let o=document.createElementNS(zOe,"path");return i.appendChild(o),e.virtualElements.setDomNodeChildren(t,[i]),e.computed({read:function(){let r=e.unwrap(n());o.setAttribute("d",e.unwrap(r.path));let a=e.unwrap(r.width),s=e.unwrap(r.height);i.setAttribute("width",a),i.setAttribute("height",s),i.setAttribute("viewBox",`0 0 ${a} ${s}`),r.css&&i.setAttribute("class",`${UOe} ${e.unwrap(r.css)}`)},disposeWhenNodeIsRemoved:t}),{controlsDescendantBindings:!0}}},e.virtualElements.allowedBindings.cesiumSvgPath=!0}},UV=$kt;zV.attachToKo(tE);UV.register(tE);var ve=tE;function VV(e){l(e)||(e=new Tm),this._clock=e,this._eventHelper=new Nr,this._eventHelper.add(e.onTick,this.synchronize,this),this.systemTime=ve.observable(Q.now()),this.systemTime.equalityComparer=Q.equals,this.startTime=ve.observable(e.startTime),this.startTime.equalityComparer=Q.equals,this.startTime.subscribe(function(t){e.startTime=t,this.synchronize()},this),this.stopTime=ve.observable(e.stopTime),this.stopTime.equalityComparer=Q.equals,this.stopTime.subscribe(function(t){e.stopTime=t,this.synchronize()},this),this.currentTime=ve.observable(e.currentTime),this.currentTime.equalityComparer=Q.equals,this.currentTime.subscribe(function(t){e.currentTime=t,this.synchronize()},this),this.multiplier=ve.observable(e.multiplier),this.multiplier.subscribe(function(t){e.multiplier=t,this.synchronize()},this),this.clockStep=ve.observable(e.clockStep),this.clockStep.subscribe(function(t){e.clockStep=t,this.synchronize()},this),this.clockRange=ve.observable(e.clockRange),this.clockRange.subscribe(function(t){e.clockRange=t,this.synchronize()},this),this.canAnimate=ve.observable(e.canAnimate),this.canAnimate.subscribe(function(t){e.canAnimate=t,this.synchronize()},this),this.shouldAnimate=ve.observable(e.shouldAnimate),this.shouldAnimate.subscribe(function(t){e.shouldAnimate=t,this.synchronize()},this),ve.track(this,["systemTime","startTime","stopTime","currentTime","multiplier","clockStep","clockRange","canAnimate","shouldAnimate"])}Object.defineProperties(VV.prototype,{clock:{get:function(){return this._clock}}});VV.prototype.synchronize=function(){let e=this._clock;this.systemTime=Q.now(),this.startTime=e.startTime,this.stopTime=e.stopTime,this.currentTime=e.currentTime,this.multiplier=e.multiplier,this.clockStep=e.clockStep,this.clockRange=e.clockRange,this.canAnimate=e.canAnimate,this.shouldAnimate=e.shouldAnimate};VV.prototype.isDestroyed=function(){return!1};VV.prototype.destroy=function(){this._eventHelper.removeAll(),fe(this)};var jV=VV;function Jkt(){this.canExecute=void 0,this.beforeExecute=void 0,this.afterExecute=void 0,_e.throwInstantiationError()}var cre=Jkt;var VI={};VI.createCheckbox=function(e,t,n){let i=document.createElement("div"),o=document.createElement("label"),r=document.createElement("input");r.type="checkbox";let a=`checked: ${t}`;return l(n)&&(a+=`, enable: ${n}`),r.setAttribute("data-bind",a),o.appendChild(r),o.appendChild(document.createTextNode(e)),i.appendChild(o),i};VI.createSection=function(e,t,n,i){let o=document.createElement("div");o.className="cesium-cesiumInspector-section",o.setAttribute("data-bind",`css: { "cesium-cesiumInspector-section-collapsed": !${n} }`),e.appendChild(o);let r=document.createElement("h3");r.className="cesium-cesiumInspector-sectionHeader",r.appendChild(document.createTextNode(t)),r.setAttribute("data-bind",`click: ${i}`),o.appendChild(r);let a=document.createElement("div");return a.className="cesium-cesiumInspector-sectionContent",o.appendChild(a),a};VI.createRangeInput=function(e,t,n,i,o,r){r=r??t;let a=document.createElement("input");a.setAttribute("data-bind",`value: ${r}`),a.type="number";let s=document.createElement("input");s.type="range",s.min=n,s.max=i,s.step=o??"any",s.setAttribute("data-bind",`valueUpdate: "input", value: ${t}`);let c=document.createElement("div");c.appendChild(s);let u=document.createElement("div");return u.className="cesium-cesiumInspector-slider",u.appendChild(document.createTextNode(e)),u.appendChild(a),u.appendChild(c),u};VI.createRangeInputWithDynamicMinMax=function(e,t,n,i){i=i??t;let o=document.createElement("input");o.setAttribute("data-bind",`value: ${i}`),o.type="number";let r=document.createElement("input");r.type="range",r.step=n??"any",r.setAttribute("data-bind",`valueUpdate: "input", value: ${t}, attr: { min: ${t}Min, max: ${t}Max }`);let a=document.createElement("div");a.appendChild(r);let s=document.createElement("div");return s.className="cesium-cesiumInspector-slider",s.appendChild(document.createTextNode(e)),s.appendChild(o),s.appendChild(a),s};VI.createButton=function(e,t,n){let i=document.createElement("button");i.type="button",i.textContent=e,i.className="cesium-cesiumInspector-pickButton";let o=`click: ${t}`;return l(n)&&(o+=`, css: {"cesium-cesiumInspector-pickButtonHighlight" : ${n}}`),i.setAttribute("data-bind",o),i};var sf=VI;function VOe(e,t){this._command=e,t=t??G.EMPTY_OBJECT,this.toggled=t.toggled??!1,this.tooltip=t.tooltip??"",ve.track(this,["toggled","tooltip"])}Object.defineProperties(VOe.prototype,{command:{get:function(){return this._command}}});var ix=VOe;function Zkt(e,t){t=t??!0;let n=new ye,i=new ye;function o(){let r={args:arguments,cancel:!1},a;return n.raiseEvent(r),r.cancel||(a=e.apply(null,arguments),i.raiseEvent(a)),a}return o.canExecute=t,ve.track(o,["canExecute"]),Object.defineProperties(o,{beforeExecute:{value:n},afterExecute:{value:i}}),o}var In=Zkt;function e3t(e,t,n,i,o){return n.call(i,e[t]),ve.getObservable(e,t).subscribe(n,i,o)}var yc=e3t;var nE="http://www.w3.org/2000/svg",HOe="http://www.w3.org/1999/xlink",v9,GV=V.fromCssColorString("rgba(247,250,255,0.384)"),S9=V.fromCssColorString("rgba(143,191,255,0.216)"),lre=V.fromCssColorString("rgba(153,197,255,0.098)"),w9=V.fromCssColorString("rgba(255,255,255,0.086)"),t3t=V.fromCssColorString("rgba(255,255,255,0.267)"),n3t=V.fromCssColorString("rgba(255,255,255,0)"),jOe=V.fromCssColorString("rgba(66,67,68,0.3)"),GOe=V.fromCssColorString("rgba(0,0,0,0.5)");function ox(e){return V.fromCssColorString(window.getComputedStyle(e).getPropertyValue("color"))}var HV={animation_pathReset:{tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M24.316,5.318,9.833,13.682,9.833,5.5,5.5,5.5,5.5,25.5,9.833,25.5,9.833,17.318,24.316,25.682z"},animation_pathPause:{tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M13,5.5,7.5,5.5,7.5,25.5,13,25.5zM24.5,5.5,19,5.5,19,25.5,24.5,25.5z"},animation_pathPlay:{tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M6.684,25.682L24.316,15.5L6.684,5.318V25.682z"},animation_pathPlayReverse:{tagName:"path",transform:"translate(16,16) scale(-0.85,0.85) translate(-16,-16)",d:"M6.684,25.682L24.316,15.5L6.684,5.318V25.682z"},animation_pathLoop:{tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M24.249,15.499c-0.009,4.832-3.918,8.741-8.75,8.75c-2.515,0-4.768-1.064-6.365-2.763l2.068-1.442l-7.901-3.703l0.744,8.694l2.193-1.529c2.244,2.594,5.562,4.242,9.26,4.242c6.767,0,12.249-5.482,12.249-12.249H24.249zM15.499,6.75c2.516,0,4.769,1.065,6.367,2.764l-2.068,1.443l7.901,3.701l-0.746-8.693l-2.192,1.529c-2.245-2.594-5.562-4.245-9.262-4.245C8.734,3.25,3.25,8.734,3.249,15.499H6.75C6.758,10.668,10.668,6.758,15.499,6.75z"},animation_pathClock:{tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-15.5)",d:"M15.5,2.374C8.251,2.375,2.376,8.251,2.374,15.5C2.376,22.748,8.251,28.623,15.5,28.627c7.249-0.004,13.124-5.879,13.125-13.127C28.624,8.251,22.749,2.375,15.5,2.374zM15.5,25.623C9.909,25.615,5.385,21.09,5.375,15.5C5.385,9.909,9.909,5.384,15.5,5.374c5.59,0.01,10.115,4.535,10.124,10.125C25.615,21.09,21.091,25.615,15.5,25.623zM8.625,15.5c-0.001-0.552-0.448-0.999-1.001-1c-0.553,0-1,0.448-1,1c0,0.553,0.449,1,1,1C8.176,16.5,8.624,16.053,8.625,15.5zM8.179,18.572c-0.478,0.277-0.642,0.889-0.365,1.367c0.275,0.479,0.889,0.641,1.365,0.365c0.479-0.275,0.643-0.887,0.367-1.367C9.27,18.461,8.658,18.297,8.179,18.572zM9.18,10.696c-0.479-0.276-1.09-0.112-1.366,0.366s-0.111,1.09,0.365,1.366c0.479,0.276,1.09,0.113,1.367-0.366C9.821,11.584,9.657,10.973,9.18,10.696zM22.822,12.428c0.478-0.275,0.643-0.888,0.366-1.366c-0.275-0.478-0.89-0.642-1.366-0.366c-0.479,0.278-0.642,0.89-0.366,1.367C21.732,12.54,22.344,12.705,22.822,12.428zM12.062,21.455c-0.478-0.275-1.089-0.111-1.366,0.367c-0.275,0.479-0.111,1.09,0.366,1.365c0.478,0.277,1.091,0.111,1.365-0.365C12.704,22.344,12.54,21.732,12.062,21.455zM12.062,9.545c0.479-0.276,0.642-0.888,0.366-1.366c-0.276-0.478-0.888-0.642-1.366-0.366s-0.642,0.888-0.366,1.366C10.973,9.658,11.584,9.822,12.062,9.545zM22.823,18.572c-0.48-0.275-1.092-0.111-1.367,0.365c-0.275,0.479-0.112,1.092,0.367,1.367c0.477,0.275,1.089,0.113,1.365-0.365C23.464,19.461,23.3,18.848,22.823,18.572zM19.938,7.813c-0.477-0.276-1.091-0.111-1.365,0.366c-0.275,0.48-0.111,1.091,0.366,1.367s1.089,0.112,1.366-0.366C20.581,8.702,20.418,8.089,19.938,7.813zM23.378,14.5c-0.554,0.002-1.001,0.45-1.001,1c0.001,0.552,0.448,1,1.001,1c0.551,0,1-0.447,1-1C24.378,14.949,23.929,14.5,23.378,14.5zM15.501,6.624c-0.552,0-1,0.448-1,1l-0.466,7.343l-3.004,1.96c-0.478,0.277-0.642,0.889-0.365,1.365c0.275,0.479,0.889,0.643,1.365,0.367l3.305-1.676C15.39,16.99,15.444,17,15.501,17c0.828,0,1.5-0.671,1.5-1.5l-0.5-7.876C16.501,7.072,16.053,6.624,15.501,6.624zM15.501,22.377c-0.552,0-1,0.447-1,1s0.448,1,1,1s1-0.447,1-1S16.053,22.377,15.501,22.377zM18.939,21.455c-0.479,0.277-0.643,0.889-0.366,1.367c0.275,0.477,0.888,0.643,1.366,0.365c0.478-0.275,0.642-0.889,0.366-1.365C20.028,21.344,19.417,21.18,18.939,21.455z"},animation_pathWingButton:{tagName:"path",d:"m 4.5,0.5 c -2.216,0 -4,1.784 -4,4 l 0,24 c 0,2.216 1.784,4 4,4 l 13.71875,0 C 22.478584,27.272785 27.273681,22.511272 32.5,18.25 l 0,-13.75 c 0,-2.216 -1.784,-4 -4,-4 l -24,0 z"},animation_pathPointer:{tagName:"path",d:"M-15,-65,-15,-55,15,-55,15,-65,0,-95z"},animation_pathSwooshFX:{tagName:"path",d:"m 85,0 c 0,16.617 -4.813944,35.356 -13.131081,48.4508 h 6.099803 c 8.317138,-13.0948 13.13322,-28.5955 13.13322,-45.2124 0,-46.94483 -38.402714,-85.00262 -85.7743869,-85.00262 -1.0218522,0 -2.0373001,0.0241 -3.0506131,0.0589 45.958443,1.59437 82.723058,35.77285 82.723058,81.70532 z"}};function tp(e){let t=document.createElementNS(nE,e.tagName);for(let n in e)if(e.hasOwnProperty(n)&&n!=="tagName")if(n==="children"){let i=e.children.length;for(let o=0;o<i;++o)t.appendChild(tp(e.children[o]))}else n.indexOf("xlink:")===0?t.setAttributeNS(HOe,n.substring(6),e[n]):n==="textContent"?t.textContent=e[n]:t.setAttribute(n,e[n]);return t}function ure(e,t,n){let i=document.createElementNS(nE,"text");i.setAttribute("x",e),i.setAttribute("y",t),i.setAttribute("class","cesium-animation-svgText");let o=document.createElementNS(nE,"tspan");return o.textContent=n,i.appendChild(o),i}function i3t(e,t,n){e.setAttribute("transform",`translate(100,100) rotate(${n})`),t.setAttribute("transform",`rotate(${n})`)}var I9=new V;function ja(e,t){let n=t.alpha,i=1-n;return I9.red=e.red*i+t.red*n,I9.green=e.green*i+t.green*n,I9.blue=e.blue*i+t.blue*n,I9.toCssColorString()}function fre(e,t,n){let i=HV[n],o={tagName:"g",class:"cesium-animation-rectButton",transform:`translate(${e},${t})`,children:[{tagName:"rect",class:"cesium-animation-buttonGlow",width:32,height:32,rx:2,ry:2},{tagName:"rect",class:"cesium-animation-buttonMain",width:32,height:32,rx:4,ry:4},{class:"cesium-animation-buttonPath",id:n,tagName:i.tagName,transform:i.transform,d:i.d},{tagName:"title",textContent:""}]};return tp(o)}function o3t(e,t,n){let i=HV[n],o=HV.animation_pathWingButton,r={tagName:"g",class:"cesium-animation-rectButton",transform:`translate(${e},${t})`,children:[{class:"cesium-animation-buttonGlow",id:"animation_pathWingButton",tagName:o.tagName,d:o.d},{class:"cesium-animation-buttonMain",id:"animation_pathWingButton",tagName:o.tagName,d:o.d},{class:"cesium-animation-buttonPath",id:n,tagName:i.tagName,transform:i.transform,d:i.d},{tagName:"title",textContent:""}]};return tp(r)}function r3t(e,t){let n=e._viewModel,i=n.shuttleRingDragging;if(!(i&&v9!==e))if(t.type==="mousedown"||i&&t.type==="mousemove"||t.type==="touchstart"&&t.touches.length===1||i&&t.type==="touchmove"&&t.touches.length===1){let o=e._centerX,r=e._centerY,s=e._svgNode.getBoundingClientRect(),c,u;if(t.type==="touchstart"||t.type==="touchmove"?(c=t.touches[0].clientX,u=t.touches[0].clientY):(c=t.clientX,u=t.clientY),!i&&(c>s.right||c<s.left||u<s.top||u>s.bottom))return;let f=e._shuttleRingPointer.getBoundingClientRect(),d=c-o-s.left,p=u-r-s.top,g=Math.atan2(p,d)*180/Math.PI+90;g>180&&(g-=360);let m=n.shuttleRingAngle;i||c<f.right&&c>f.left&&u>f.top&&u<f.bottom?(v9=e,n.shuttleRingDragging=!0,n.shuttleRingAngle=g):g<m?n.slower():g>m&&n.faster(),t.preventDefault()}else e===v9&&(v9=void 0),n.shuttleRingDragging=!1}function j_(e,t){this._viewModel=t,this.svgElement=e,this._enabled=void 0,this._toggled=void 0;let n=this;this._clickFunction=function(){let i=n._viewModel.command;i.canExecute&&i()},e.addEventListener("click",this._clickFunction,!0),this._subscriptions=[yc(t,"toggled",this.setToggled,this),yc(t,"tooltip",this.setTooltip,this),yc(t.command,"canExecute",this.setEnabled,this)]}j_.prototype.destroy=function(){this.svgElement.removeEventListener("click",this._clickFunction,!0);let e=this._subscriptions;for(let t=0,n=e.length;t<n;t++)e[t].dispose();fe(this)};j_.prototype.isDestroyed=function(){return!1};j_.prototype.setEnabled=function(e){if(this._enabled!==e){if(this._enabled=e,!e){this.svgElement.setAttribute("class","cesium-animation-buttonDisabled");return}if(this._toggled){this.svgElement.setAttribute("class","cesium-animation-rectButton cesium-animation-buttonToggled");return}this.svgElement.setAttribute("class","cesium-animation-rectButton")}};j_.prototype.setToggled=function(e){this._toggled!==e&&(this._toggled=e,this._enabled&&(e?this.svgElement.setAttribute("class","cesium-animation-rectButton cesium-animation-buttonToggled"):this.svgElement.setAttribute("class","cesium-animation-rectButton")))};j_.prototype.setTooltip=function(e){this.svgElement.getElementsByTagName("title")[0].textContent=e};function jI(e,t){e=On(e),this._viewModel=t,this._container=e,this._centerX=0,this._centerY=0,this._defsElement=void 0,this._svgNode=void 0,this._topG=void 0,this._lastHeight=void 0,this._lastWidth=void 0;let n=e.ownerDocument,i=document.createElement("style");i.textContent=".cesium-animation-rectButton .cesium-animation-buttonGlow { filter: url(#animation_blurred); }.cesium-animation-rectButton .cesium-animation-buttonMain { fill: url(#animation_buttonNormal); }.cesium-animation-buttonToggled .cesium-animation-buttonMain { fill: url(#animation_buttonToggled); }.cesium-animation-rectButton:hover .cesium-animation-buttonMain { fill: url(#animation_buttonHovered); }.cesium-animation-buttonDisabled .cesium-animation-buttonMain { fill: url(#animation_buttonDisabled); }.cesium-animation-shuttleRingG .cesium-animation-shuttleRingSwoosh { fill: url(#animation_shuttleRingSwooshGradient); }.cesium-animation-shuttleRingG:hover .cesium-animation-shuttleRingSwoosh { fill: url(#animation_shuttleRingSwooshHovered); }.cesium-animation-shuttleRingPointer { fill: url(#animation_shuttleRingPointerGradient); }.cesium-animation-shuttleRingPausePointer { fill: url(#animation_shuttleRingPointerPaused); }.cesium-animation-knobOuter { fill: url(#animation_knobOuter); }.cesium-animation-knobInner { fill: url(#animation_knobInner); }",n.head.insertBefore(i,n.head.childNodes[0]);let o=document.createElement("div");o.className="cesium-animation-theme",o.innerHTML='<div class="cesium-animation-themeNormal"></div><div class="cesium-animation-themeHover"></div><div class="cesium-animation-themeSelect"></div><div class="cesium-animation-themeDisabled"></div><div class="cesium-animation-themeKnob"></div><div class="cesium-animation-themePointer"></div><div class="cesium-animation-themeSwoosh"></div><div class="cesium-animation-themeSwooshHover"></div>',this._theme=o,this._themeNormal=o.childNodes[0],this._themeHover=o.childNodes[1],this._themeSelect=o.childNodes[2],this._themeDisabled=o.childNodes[3],this._themeKnob=o.childNodes[4],this._themePointer=o.childNodes[5],this._themeSwoosh=o.childNodes[6],this._themeSwooshHover=o.childNodes[7];let r=document.createElementNS(nE,"svg:svg");this._svgNode=r,r.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",HOe);let a=document.createElementNS(nE,"g");this._topG=a,this._realtimeSVG=new j_(o3t(3,4,"animation_pathClock"),t.playRealtimeViewModel),this._playReverseSVG=new j_(fre(44,99,"animation_pathPlayReverse"),t.playReverseViewModel),this._playForwardSVG=new j_(fre(124,99,"animation_pathPlay"),t.playForwardViewModel),this._pauseSVG=new j_(fre(84,99,"animation_pathPause"),t.pauseViewModel);let s=document.createElementNS(nE,"g");s.appendChild(this._realtimeSVG.svgElement),s.appendChild(this._playReverseSVG.svgElement),s.appendChild(this._playForwardSVG.svgElement),s.appendChild(this._pauseSVG.svgElement);let c=tp({tagName:"circle",class:"cesium-animation-shuttleRingBack",cx:100,cy:100,r:99});this._shuttleRingBackPanel=c;let u=HV.animation_pathSwooshFX,f=HV.animation_pathPointer,d=tp({tagName:"g",class:"cesium-animation-shuttleRingSwoosh",children:[{tagName:u.tagName,transform:"translate(100,97) scale(-1,1)",id:"animation_pathSwooshFX",d:u.d},{tagName:u.tagName,transform:"translate(100,97)",id:"animation_pathSwooshFX",d:u.d},{tagName:"line",x1:100,y1:8,x2:100,y2:22}]});this._shuttleRingSwooshG=d,this._shuttleRingPointer=tp({class:"cesium-animation-shuttleRingPointer",id:"animation_pathPointer",tagName:f.tagName,d:f.d});let p=tp({tagName:"g",transform:"translate(100,100)"});this._knobOuter=tp({tagName:"circle",class:"cesium-animation-knobOuter",cx:0,cy:0,r:71});let g=61,m=tp({tagName:"circle",class:"cesium-animation-knobInner",cx:0,cy:0,r:g});this._knobDate=ure(0,-24,""),this._knobTime=ure(0,-7,""),this._knobStatus=ure(0,-41,"");let A=tp({tagName:"circle",class:"cesium-animation-blank",cx:0,cy:0,r:g}),y=document.createElementNS(nE,"g");y.setAttribute("class","cesium-animation-shuttleRingG"),e.appendChild(o),a.appendChild(y),a.appendChild(p),a.appendChild(s),y.appendChild(c),y.appendChild(d),y.appendChild(this._shuttleRingPointer),p.appendChild(this._knobOuter),p.appendChild(m),p.appendChild(this._knobDate),p.appendChild(this._knobTime),p.appendChild(this._knobStatus),p.appendChild(A),r.appendChild(a),e.appendChild(r);let x=this;function b(P){r3t(x,P)}this._mouseCallback=b,c.addEventListener("mousedown",b,!0),c.addEventListener("touchstart",b,!0),d.addEventListener("mousedown",b,!0),d.addEventListener("touchstart",b,!0),n.addEventListener("mousemove",b,!0),n.addEventListener("touchmove",b,!0),n.addEventListener("mouseup",b,!0),n.addEventListener("touchend",b,!0),n.addEventListener("touchcancel",b,!0),this._shuttleRingPointer.addEventListener("mousedown",b,!0),this._shuttleRingPointer.addEventListener("touchstart",b,!0),this._knobOuter.addEventListener("mousedown",b,!0),this._knobOuter.addEventListener("touchstart",b,!0);let C=this._knobTime.childNodes[0],E=this._knobDate.childNodes[0],S=this._knobStatus.childNodes[0],w;this._subscriptions=[yc(t.pauseViewModel,"toggled",function(P){w!==P&&(w=P,w?x._shuttleRingPointer.setAttribute("class","cesium-animation-shuttleRingPausePointer"):x._shuttleRingPointer.setAttribute("class","cesium-animation-shuttleRingPointer"))}),yc(t,"shuttleRingAngle",function(P){i3t(x._shuttleRingPointer,x._knobOuter,P)}),yc(t,"dateLabel",function(P){E.textContent!==P&&(E.textContent=P)}),yc(t,"timeLabel",function(P){C.textContent!==P&&(C.textContent=P)}),yc(t,"multiplierLabel",function(P){S.textContent!==P&&(S.textContent=P)})],this.applyThemeChanges(),this.resize()}Object.defineProperties(jI.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});jI.prototype.isDestroyed=function(){return!1};jI.prototype.destroy=function(){l(this._observer)&&(this._observer.disconnect(),this._observer=void 0);let e=this._container.ownerDocument,t=this._mouseCallback;this._shuttleRingBackPanel.removeEventListener("mousedown",t,!0),this._shuttleRingBackPanel.removeEventListener("touchstart",t,!0),this._shuttleRingSwooshG.removeEventListener("mousedown",t,!0),this._shuttleRingSwooshG.removeEventListener("touchstart",t,!0),e.removeEventListener("mousemove",t,!0),e.removeEventListener("touchmove",t,!0),e.removeEventListener("mouseup",t,!0),e.removeEventListener("touchend",t,!0),e.removeEventListener("touchcancel",t,!0),this._shuttleRingPointer.removeEventListener("mousedown",t,!0),this._shuttleRingPointer.removeEventListener("touchstart",t,!0),this._knobOuter.removeEventListener("mousedown",t,!0),this._knobOuter.removeEventListener("touchstart",t,!0),this._container.removeChild(this._svgNode),this._container.removeChild(this._theme),this._realtimeSVG.destroy(),this._playReverseSVG.destroy(),this._playForwardSVG.destroy(),this._pauseSVG.destroy();let n=this._subscriptions;for(let i=0,o=n.length;i<o;i++)n[i].dispose();return fe(this)};jI.prototype.resize=function(){let e=this._container.clientWidth,t=this._container.clientHeight;if(e===this._lastWidth&&t===this._lastHeight)return;let n=this._svgNode,i=200,o=132,r=e,a=t;e===0&&t===0?(r=i,a=o):e===0?(a=t,r=i*(t/o)):t===0&&(r=e,a=o*(e/i));let s=r/i,c=a/o;n.style.cssText=`width: ${r}px; height: ${a}px; position: absolute; bottom: 0; left: 0; overflow: hidden;`,n.setAttribute("width",r),n.setAttribute("height",a),n.setAttribute("viewBox",`0 0 ${r} ${a}`),this._topG.setAttribute("transform",`scale(${s},${c})`),this._centerX=Math.max(1,100*s),this._centerY=Math.max(1,100*c),this._lastHeight=e,this._lastWidth=t};jI.prototype.applyThemeChanges=function(){let e=this._container.ownerDocument;if(!e.body.contains(this._container)){if(l(this._observer))return;let f=this;f._observer=new MutationObserver(function(){e.body.contains(f._container)&&(f._observer.disconnect(),f._observer=void 0,f.applyThemeChanges())}),f._observer.observe(e,{childList:!0,subtree:!0});return}let t=ox(this._themeNormal),n=ox(this._themeHover),i=ox(this._themeSelect),o=ox(this._themeDisabled),r=ox(this._themeKnob),a=ox(this._themePointer),s=ox(this._themeSwoosh),c=ox(this._themeSwooshHover),u=tp({tagName:"defs",children:[{id:"animation_buttonNormal",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":ja(t,GV)},{tagName:"stop",offset:"12%","stop-color":ja(t,S9)},{tagName:"stop",offset:"46%","stop-color":ja(t,lre)},{tagName:"stop",offset:"81%","stop-color":ja(t,w9)}]},{id:"animation_buttonHovered",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":ja(n,GV)},{tagName:"stop",offset:"12%","stop-color":ja(n,S9)},{tagName:"stop",offset:"46%","stop-color":ja(n,lre)},{tagName:"stop",offset:"81%","stop-color":ja(n,w9)}]},{id:"animation_buttonToggled",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":ja(i,GV)},{tagName:"stop",offset:"12%","stop-color":ja(i,S9)},{tagName:"stop",offset:"46%","stop-color":ja(i,lre)},{tagName:"stop",offset:"81%","stop-color":ja(i,w9)}]},{id:"animation_buttonDisabled",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":ja(o,t3t)},{tagName:"stop",offset:"75%","stop-color":ja(o,n3t)}]},{id:"animation_blurred",tagName:"filter",width:"200%",height:"200%",x:"-50%",y:"-50%",children:[{tagName:"feGaussianBlur",stdDeviation:4,in:"SourceGraphic"}]},{id:"animation_shuttleRingSwooshGradient",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-opacity":.2,"stop-color":s.toCssColorString()},{tagName:"stop",offset:"85%","stop-opacity":.85,"stop-color":s.toCssColorString()},{tagName:"stop",offset:"95%","stop-opacity":.05,"stop-color":s.toCssColorString()}]},{id:"animation_shuttleRingSwooshHovered",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-opacity":.2,"stop-color":c.toCssColorString()},{tagName:"stop",offset:"85%","stop-opacity":.85,"stop-color":c.toCssColorString()},{tagName:"stop",offset:"95%","stop-opacity":.05,"stop-color":c.toCssColorString()}]},{id:"animation_shuttleRingPointerGradient",tagName:"linearGradient",x1:"0%",y1:"50%",x2:"100%",y2:"50%",children:[{tagName:"stop",offset:"0%","stop-color":a.toCssColorString()},{tagName:"stop",offset:"40%","stop-color":a.toCssColorString()},{tagName:"stop",offset:"60%","stop-color":ja(a,GOe)},{tagName:"stop",offset:"100%","stop-color":ja(a,GOe)}]},{id:"animation_shuttleRingPointerPaused",tagName:"linearGradient",x1:"0%",y1:"50%",x2:"100%",y2:"50%",children:[{tagName:"stop",offset:"0%","stop-color":"#CCC"},{tagName:"stop",offset:"40%","stop-color":"#CCC"},{tagName:"stop",offset:"60%","stop-color":"#555"},{tagName:"stop",offset:"100%","stop-color":"#555"}]},{id:"animation_knobOuter",tagName:"linearGradient",x1:"20%",y1:"0%",x2:"90%",y2:"100%",children:[{tagName:"stop",offset:"5%","stop-color":ja(r,GV)},{tagName:"stop",offset:"60%","stop-color":ja(r,jOe)},{tagName:"stop",offset:"85%","stop-color":ja(r,S9)}]},{id:"animation_knobInner",tagName:"linearGradient",x1:"20%",y1:"0%",x2:"90%",y2:"100%",children:[{tagName:"stop",offset:"5%","stop-color":ja(r,jOe)},{tagName:"stop",offset:"60%","stop-color":ja(r,GV)},{tagName:"stop",offset:"85%","stop-color":ja(r,w9)}]}]});l(this._defsElement)?this._svgNode.replaceChild(u,this._defsElement):this._svgNode.appendChild(u),this._defsElement=u};var WV=jI;var a3t=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],rx=15,GI=105;function WOe(e,t){return e-t}function dre(e,t){let n=_o(t,e,WOe);return n<0?~n:n}function s3t(e,t){if(Math.abs(e)<=rx)return e/rx;let n=rx,i=GI,o,r=0,a;return e>0?(o=Math.log(t[t.length-1]),a=(o-r)/(i-n),Math.exp(r+a*(e-n))):(o=Math.log(-t[0]),a=(o-r)/(i-n),-Math.exp(r+a*(Math.abs(e)-n)))}function c3t(e,t,n){if(n.clockStep===Oo.SYSTEM_CLOCK)return rx;if(Math.abs(e)<=1)return e*rx;let i=t[t.length-1];e>i?e=i:e<-i&&(e=-i);let o=rx,r=GI,a,s=0,c;return e>0?(a=Math.log(i),c=(a-s)/(r-o),(Math.log(e)-s)/c+o):(a=Math.log(-t[0]),c=(a-s)/(r-o),-((Math.log(Math.abs(e))-s)/c+o))}function Ah(e){let t=this;this._clockViewModel=e,this._allShuttleRingTicks=[],this._dateFormatter=Ah.defaultDateFormatter,this._timeFormatter=Ah.defaultTimeFormatter,this.shuttleRingDragging=!1,this.snapToTicks=!1,ve.track(this,["_allShuttleRingTicks","_dateFormatter","_timeFormatter","shuttleRingDragging","snapToTicks"]),this._sortedFilteredPositiveTicks=[],this.setShuttleRingTicks(Ah.defaultTicks),this.timeLabel=void 0,ve.defineProperty(this,"timeLabel",function(){return t._timeFormatter(t._clockViewModel.currentTime,t)}),this.dateLabel=void 0,ve.defineProperty(this,"dateLabel",function(){return t._dateFormatter(t._clockViewModel.currentTime,t)}),this.multiplierLabel=void 0,ve.defineProperty(this,"multiplierLabel",function(){let a=t._clockViewModel;if(a.clockStep===Oo.SYSTEM_CLOCK)return"Today";let s=a.multiplier;return s%1===0?`${s.toFixed(0)}x`:`${s.toFixed(3).replace(/0{0,3}$/,"")}x`}),this.shuttleRingAngle=void 0,ve.defineProperty(this,"shuttleRingAngle",{get:function(){return c3t(e.multiplier,t._allShuttleRingTicks,e)},set:function(a){a=Math.max(Math.min(a,GI),-GI);let s=t._allShuttleRingTicks,c=t._clockViewModel;if(c.clockStep=Oo.SYSTEM_CLOCK_MULTIPLIER,Math.abs(a)===GI){c.multiplier=a>0?s[s.length-1]:s[0];return}let u=s3t(a,s);if(t.snapToTicks)u=s[dre(u,s)];else if(u!==0){let f=Math.abs(u);if(f>100){let d=f.toFixed(0).length-2,p=Math.pow(10,d);u=Math.round(u/p)*p|0}else f>rx?u=Math.round(u):f>1?u=+u.toFixed(1):f>0&&(u=+u.toFixed(2))}c.multiplier=u}}),this._canAnimate=void 0,ve.defineProperty(this,"_canAnimate",function(){let a=t._clockViewModel,s=a.clockRange;if(t.shuttleRingDragging||s===va.UNBOUNDED)return!0;let c=a.multiplier,u=a.currentTime,f=a.startTime,d=!1;if(s===va.LOOP_STOP)d=Q.greaterThan(u,f)||u.equals(f)&&c>0;else{let p=a.stopTime;d=Q.greaterThan(u,f)&&Q.lessThan(u,p)||u.equals(f)&&c>0||u.equals(p)&&c<0}return d||(a.shouldAnimate=!1),d}),this._isSystemTimeAvailable=void 0,ve.defineProperty(this,"_isSystemTimeAvailable",function(){let a=t._clockViewModel;if(a.clockRange===va.UNBOUNDED)return!0;let c=a.systemTime;return Q.greaterThanOrEquals(c,a.startTime)&&Q.lessThanOrEquals(c,a.stopTime)}),this._isAnimating=void 0,ve.defineProperty(this,"_isAnimating",function(){return t._clockViewModel.shouldAnimate&&(t._canAnimate||t.shuttleRingDragging)});let n=In(function(){let a=t._clockViewModel;a.shouldAnimate?a.shouldAnimate=!1:t._canAnimate&&(a.shouldAnimate=!0)});this._pauseViewModel=new ix(n,{toggled:ve.computed(function(){return!t._isAnimating}),tooltip:"Pause"});let i=In(function(){let a=t._clockViewModel,s=a.multiplier;s>0&&(a.multiplier=-s),a.shouldAnimate=!0});this._playReverseViewModel=new ix(i,{toggled:ve.computed(function(){return t._isAnimating&&e.multiplier<0}),tooltip:"Play Reverse"});let o=In(function(){let a=t._clockViewModel,s=a.multiplier;s<0&&(a.multiplier=-s),a.shouldAnimate=!0});this._playForwardViewModel=new ix(o,{toggled:ve.computed(function(){return t._isAnimating&&e.multiplier>0&&e.clockStep!==Oo.SYSTEM_CLOCK}),tooltip:"Play Forward"});let r=In(function(){t._clockViewModel.clockStep=Oo.SYSTEM_CLOCK},ve.getObservable(this,"_isSystemTimeAvailable"));this._playRealtimeViewModel=new ix(r,{toggled:ve.computed(function(){return e.clockStep===Oo.SYSTEM_CLOCK}),tooltip:ve.computed(function(){return t._isSystemTimeAvailable?"Today (real-time)":"Current time not in range"})}),this._slower=In(function(){let a=t._clockViewModel,s=t._allShuttleRingTicks,c=a.multiplier,u=dre(c,s)-1;u>=0&&(a.multiplier=s[u])}),this._faster=In(function(){let a=t._clockViewModel,s=t._allShuttleRingTicks,c=a.multiplier,u=dre(c,s)+1;u<s.length&&(a.multiplier=s[u])})}Ah.defaultDateFormatter=function(e,t){let n=Q.toGregorianDate(e);return`${a3t[n.month-1]} ${n.day} ${n.year}`};Ah.defaultTicks=[.001,.002,.005,.01,.02,.05,.1,.25,.5,1,2,5,10,15,30,60,120,300,600,900,1800,3600,7200,14400,21600,43200,86400,172800,345600,604800];Ah.defaultTimeFormatter=function(e,t){let n=Q.toGregorianDate(e),i=Math.round(n.millisecond);return Math.abs(t._clockViewModel.multiplier)<1?`${n.hour.toString().padStart(2,"0")}:${n.minute.toString().padStart(2,"0")}:${n.second.toString().padStart(2,"0")}.${i.toString().padStart(3,"0")}`:`${n.hour.toString().padStart(2,"0")}:${n.minute.toString().padStart(2,"0")}:${n.second.toString().padStart(2,"0")} UTC`};Ah.prototype.getShuttleRingTicks=function(){return this._sortedFilteredPositiveTicks.slice(0)};Ah.prototype.setShuttleRingTicks=function(e){let t,n,i,o={},r=this._sortedFilteredPositiveTicks;for(r.length=0,t=0,n=e.length;t<n;++t)i=e[t],o.hasOwnProperty(i)||(o[i]=!0,r.push(i));r.sort(WOe);let a=[];for(n=r.length,t=n-1;t>=0;--t)i=r[t],i!==0&&a.push(-i);Qn(a,r),this._allShuttleRingTicks=a};Object.defineProperties(Ah.prototype,{slower:{get:function(){return this._slower}},faster:{get:function(){return this._faster}},clockViewModel:{get:function(){return this._clockViewModel}},pauseViewModel:{get:function(){return this._pauseViewModel}},playReverseViewModel:{get:function(){return this._playReverseViewModel}},playForwardViewModel:{get:function(){return this._playForwardViewModel}},playRealtimeViewModel:{get:function(){return this._playRealtimeViewModel}},dateFormatter:{get:function(){return this._dateFormatter},set:function(e){this._dateFormatter=e}},timeFormatter:{get:function(){return this._timeFormatter},set:function(e){this._timeFormatter=e}}});Ah._maxShuttleRingAngle=GI;Ah._realtimeShuttleRingAngle=rx;var qV=Ah;function qOe(e){e=e??G.EMPTY_OBJECT;let t=e.globe,n=e.imageryProviderViewModels??G.EMPTY_ARRAY,i=e.terrainProviderViewModels??G.EMPTY_ARRAY;this._globe=t,this.imageryProviderViewModels=n.slice(0),this.terrainProviderViewModels=i.slice(0),this.dropDownVisible=!1,ve.track(this,["imageryProviderViewModels","terrainProviderViewModels","dropDownVisible"]);let o=ve.getObservable(this,"imageryProviderViewModels"),r=ve.pureComputed(function(){let d=o(),p={},g;for(g=0;g<d.length;g++){let y=d[g],x=y.category;l(p[x])?p[x].push(y):p[x]=[y]}let m=Object.keys(p),A=[];for(g=0;g<m.length;g++){let y=m[g];A.push({name:y,providers:p[y]})}return A});this._imageryProviders=r;let a=ve.getObservable(this,"terrainProviderViewModels"),s=ve.pureComputed(function(){let d=a(),p={},g;for(g=0;g<d.length;g++){let y=d[g],x=y.category;l(p[x])?p[x].push(y):p[x]=[y]}let m=Object.keys(p),A=[];for(g=0;g<m.length;g++){let y=m[g];A.push({name:y,providers:p[y]})}return A});this._terrainProviders=s,this.buttonTooltip=void 0,ve.defineProperty(this,"buttonTooltip",function(){let d=this.selectedImagery,p=this.selectedTerrain,g=l(d)?d.name:void 0,m=l(p)?p.name:void 0;return l(g)&&l(m)?`${g}
- ${m}`:l(g)?g:m}),this.buttonImageUrl=void 0,ve.defineProperty(this,"buttonImageUrl",function(){let d=this.selectedImagery;if(l(d))return d.iconUrl}),this.selectedImagery=void 0;let c=ve.observable();this._currentImageryLayers=[],ve.defineProperty(this,"selectedImagery",{get:function(){return c()},set:function(d){if(c()===d){this.dropDownVisible=!1;return}let p,g=this._currentImageryLayers,m=g.length,A=this._globe.imageryLayers,y=!1;for(p=0;p<m;p++){let x=A.length;for(let b=0;b<x;b++){let C=A.get(b);if(C===g[p]){A.remove(C),y=!0;break}}}if(l(d)){let x=d.creationCommand();if(Array.isArray(x)){let b=x.length;for(this._currentImageryLayers=[],p=b-1;p>=0;p--){let C=ya.fromProviderAsync(x[p]);A.add(C,0),this._currentImageryLayers.push(C)}}else{this._currentImageryLayers=[];let b=ya.fromProviderAsync(x);if(b.name=d.name,y)A.add(b,0);else{let C=A.get(0);l(C)&&A.remove(C),A.add(b,0)}this._currentImageryLayers.push(b)}}c(d),this.dropDownVisible=!1}}),this.selectedTerrain=void 0;let u=ve.observable();ve.defineProperty(this,"selectedTerrain",{get:function(){return u()},set:function(d){if(u()===d){this.dropDownVisible=!1;return}let p;if(l(d)&&(p=d.creationCommand()),l(p)&&!l(p.then))this._globe.depthTestAgainstTerrain=!(p instanceof a0),this._globe.terrainProvider=p;else if(l(p)){let g=!1,m=this._globe.terrainProviderChanged.addEventListener(()=>{g=!0,m()}),y=new IV(p).readyEvent.addEventListener(x=>{g||(this._globe.depthTestAgainstTerrain=!(x instanceof a0),this._globe.terrainProvider=x,y())})}u(d),this.dropDownVisible=!1}});let f=this;this._toggleDropDown=In(function(){f.dropDownVisible=!f.dropDownVisible}),this.selectedImagery=e.selectedImageryProviderViewModel??n[0],this.selectedTerrain=e.selectedTerrainProviderViewModel}Object.defineProperties(qOe.prototype,{toggleDropDown:{get:function(){return this._toggleDropDown}},globe:{get:function(){return this._globe}}});var YV=qOe;function D9(e,t){e=On(e);let n=new YV(t),i=document.createElement("button");i.type="button",i.className="cesium-button cesium-toolbar-button",i.setAttribute("data-bind","attr: { title: buttonTooltip },click: toggleDropDown"),e.appendChild(i);let o=document.createElement("img");o.setAttribute("draggable","false"),o.className="cesium-baseLayerPicker-selected",o.setAttribute("data-bind","attr: { src: buttonImageUrl }, visible: !!buttonImageUrl"),i.appendChild(o);let r=document.createElement("div");r.className="cesium-baseLayerPicker-dropDown",r.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-dropDown-visible" : dropDownVisible }'),e.appendChild(r);let a=document.createElement("div");a.className="cesium-baseLayerPicker-sectionTitle",a.setAttribute("data-bind","visible: imageryProviderViewModels.length > 0"),a.innerHTML="Imagery",r.appendChild(a);let s=document.createElement("div");s.className="cesium-baseLayerPicker-section",s.setAttribute("data-bind","foreach: _imageryProviders"),r.appendChild(s);let c=document.createElement("div");c.className="cesium-baseLayerPicker-category",s.appendChild(c);let u=document.createElement("div");u.className="cesium-baseLayerPicker-categoryTitle",u.setAttribute("data-bind","text: name"),c.appendChild(u);let f=document.createElement("div");f.className="cesium-baseLayerPicker-choices",f.setAttribute("data-bind","foreach: providers"),c.appendChild(f);let d=document.createElement("div");d.className="cesium-baseLayerPicker-item",d.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-selectedItem" : $data === $parents[1].selectedImagery },attr: { title: tooltip },visible: creationCommand.canExecute,click: function($data) { $parents[1].selectedImagery = $data; }'),f.appendChild(d);let p=document.createElement("img");p.className="cesium-baseLayerPicker-itemIcon",p.setAttribute("data-bind","attr: { src: iconUrl }"),p.setAttribute("draggable","false"),d.appendChild(p);let g=document.createElement("div");g.className="cesium-baseLayerPicker-itemLabel",g.setAttribute("data-bind","text: name"),d.appendChild(g);let m=document.createElement("div");m.className="cesium-baseLayerPicker-sectionTitle",m.setAttribute("data-bind","visible: terrainProviderViewModels.length > 0"),m.innerHTML="Terrain",r.appendChild(m);let A=document.createElement("div");A.className="cesium-baseLayerPicker-section",A.setAttribute("data-bind","foreach: _terrainProviders"),r.appendChild(A);let y=document.createElement("div");y.className="cesium-baseLayerPicker-category",A.appendChild(y);let x=document.createElement("div");x.className="cesium-baseLayerPicker-categoryTitle",x.setAttribute("data-bind","text: name"),y.appendChild(x);let b=document.createElement("div");b.className="cesium-baseLayerPicker-choices",b.setAttribute("data-bind","foreach: providers"),y.appendChild(b);let C=document.createElement("div");C.className="cesium-baseLayerPicker-item",C.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-selectedItem" : $data === $parents[1].selectedTerrain },attr: { title: tooltip },visible: creationCommand.canExecute,click: function($data) { $parents[1].selectedTerrain = $data; }'),b.appendChild(C);let E=document.createElement("img");E.className="cesium-baseLayerPicker-itemIcon",E.setAttribute("data-bind","attr: { src: iconUrl }"),E.setAttribute("draggable","false"),C.appendChild(E);let S=document.createElement("div");S.className="cesium-baseLayerPicker-itemLabel",S.setAttribute("data-bind","text: name"),C.appendChild(S),ve.applyBindings(n,i),ve.applyBindings(n,r),this._viewModel=n,this._container=e,this._element=i,this._dropPanel=r,this._closeDropDown=function(w){i.contains(w.target)||r.contains(w.target)||(n.dropDownVisible=!1)},sn.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(D9.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});D9.prototype.isDestroyed=function(){return!1};D9.prototype.destroy=function(){return sn.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),ve.cleanNode(this._element),ve.cleanNode(this._dropPanel),this._container.removeChild(this._element),this._container.removeChild(this._dropPanel),fe(this)};var XV=D9;function YOe(e){let t=e.creationFunction;l(t.canExecute)||(t=In(t)),this._creationCommand=t,this.name=e.name,this.tooltip=e.tooltip,this.iconUrl=e.iconUrl,this._category=e.category??"",ve.track(this,["name","tooltip","iconUrl"])}Object.defineProperties(YOe.prototype,{creationCommand:{get:function(){return this._creationCommand}},category:{get:function(){return this._category}}});var ir=YOe;function l3t(){let e=[],t=devicePixelRatio>=2;return e.push(new ir({name:"Bing Maps Aerial",iconUrl:Xt("Widgets/Images/ImageryProviders/bingAerial.png"),tooltip:"Bing Maps aerial imagery, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return Dg({style:Ig.AERIAL})}})),e.push(new ir({name:"Bing Maps Aerial with Labels",iconUrl:Xt("Widgets/Images/ImageryProviders/bingAerialLabels.png"),tooltip:"Bing Maps aerial imagery with labels, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return Dg({style:Ig.AERIAL_WITH_LABELS})}})),e.push(new ir({name:"Bing Maps Roads",iconUrl:Xt("Widgets/Images/ImageryProviders/bingRoads.png"),tooltip:"Bing Maps standard road maps, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return Dg({style:Ig.ROAD})}})),e.push(new ir({name:"ArcGIS World Imagery",iconUrl:Xt("Widgets/Images/ImageryProviders/ArcGisMapServiceWorldImagery.png"),tooltip:`ArcGIS World Imagery provides one meter or better satellite and aerial imagery in many parts of the world and lower resolution satellite imagery worldwide. The map includes 15m TerraColor imagery at small and mid-scales (~1:591M down to ~1:288k) for the world. The map features Maxar imagery at 0.3m resolution for select metropolitan areas around the world, 0.5m resolution across the United States and parts of Western Europe, and 1m resolution imagery across the rest of the world. In addition to commercial sources, the World Imagery map features high-resolution aerial photography contributed by the GIS User Community. This imagery ranges from 0.3m to 0.03m resolution (down to ~1:280 nin select communities). For more information on this map, including the terms of use, visit us online at
- https://www.arcgis.com/home/item.html?id=10df2279f9684e4a9f6a7f08febac2a9`,category:"Other",creationFunction:function(){return Sg.fromBasemapType(im.SATELLITE,{enablePickFeatures:!1})}})),e.push(new ir({name:"ArcGIS World Hillshade",iconUrl:Xt("Widgets/Images/ImageryProviders/ArcGisMapServiceWorldHillshade.png"),tooltip:`ArcGIS World Hillshade map portrays elevation as an artistic hillshade. This map is designed to be used as a backdrop for topographical, soil, hydro, landcover or other outdoor recreational maps. The map was compiled from a variety of sources from several data providers. The basemap has global coverage down to a scale of ~1:72k. In select areas of the United States and Europe, coverage is available down to ~1:9k. For more information on this map, including the terms of use, visit us online at
- https://www.arcgis.com/home/item.html?id=1b243539f4514b6ba35e7d995890db1d`,category:"Other",creationFunction:function(){return Sg.fromBasemapType(im.HILLSHADE,{enablePickFeatures:!1})}})),e.push(new ir({name:"Esri World Ocean",iconUrl:Xt("Widgets/Images/ImageryProviders/ArcGisMapServiceWorldOcean.png"),tooltip:`ArcGIS World Ocean map is designed to be used as a base map by marine GIS professionals and as a reference map by anyone interested in ocean data. The base map features marine bathymetry. Land features include inland waters and roads overlaid on land cover and shaded relief imagery. The map was compiled from a variety of best available sources from several data providers, including General Bathymetric Chart of the Oceans GEBCO_08 Grid, National Oceanic and Atmospheric Administration (NOAA), and National Geographic, Garmin, HERE, Geonames.org, and Esri, and various other contributors. The base map currently provides coverage for the world down to a scale of ~1:577k, and coverage down to 1:72k in US coastal areas, and various other areas. Coverage down to ~ 1:9k is available limited areas based on regional hydrographic survey data. The base map was designed and developed by Esri. For more information on this map, including our terms of use, visit us online at
- https://www.arcgis.com/home/item.html?id=1e126e7520f9466c9ca28b8f28b5e500`,category:"Other",creationFunction:function(){return Sg.fromBasemapType(im.OCEANS,{enablePickFeatures:!1})}})),e.push(new ir({name:"Open\xADStreet\xADMap",iconUrl:Xt("Widgets/Images/ImageryProviders/openStreetMap.png"),tooltip:`OpenStreetMap (OSM) is a collaborative project to create a free editable map of the world.
- http://www.openstreetmap.org`,category:"Other",creationFunction:function(){return new N_({url:"https://tile.openstreetmap.org/"})}})),e.push(new ir({name:"Stadia x Stamen Watercolor",iconUrl:Xt("Widgets/Images/ImageryProviders/stamenWatercolor.png"),tooltip:`Based on the original basemaps created for the Knight Foundation and reminiscent of hand drawn maps, the watercolor maps from Stamen Design apply raster effect area washes and organic edges over a paper texture to add warm pop to any map.
- https://docs.stadiamaps.com/map-styles/stamen-watercolor/`,category:"Other",creationFunction:function(){return new N_({url:"https://tiles.stadiamaps.com/tiles/stamen_watercolor/",fileExtension:"jpg",credit:`© <a href="https://stamen.com/" target="_blank">Stamen Design</a>
- © <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a>
- © <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a>
- © <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>`})}})),e.push(new ir({name:"Stadia x Stamen Toner",iconUrl:Xt("Widgets/Images/ImageryProviders/stamenToner.png"),tooltip:`Based on the original basemaps created for the Knight Foundation and the most popular of the excellent styles from Stamen Design, these high-contrast B+W (black and white) maps are the perfect backdrop for your colorful and eye-catching overlays.
- https://docs.stadiamaps.com/map-styles/stamen-toner/`,category:"Other",creationFunction:function(){return new N_({url:"https://tiles.stadiamaps.com/tiles/stamen_toner/",retinaTiles:t,credit:`© <a href="https://stamen.com/" target="_blank">Stamen Design</a>
- © <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a>
- © <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a>
- © <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>`})}})),e.push(new ir({name:"Stadia Alidade Smooth",iconUrl:Xt("Widgets/Images/ImageryProviders/stadiaAlidadeSmooth.png"),tooltip:`Stadia's custom Alidade Smooth style is designed for maps that use a lot of markers or overlays. It features a muted color scheme and fewer points of interest to allow your added data to shine.
- https://docs.stadiamaps.com/map-styles/alidade-smooth/`,category:"Other",creationFunction:function(){return new N_({url:"https://tiles.stadiamaps.com/tiles/alidade_smooth/",retinaTiles:t,credit:`© <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a>
- © <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a>
- © <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>`})}})),e.push(new ir({name:"Stadia Alidade Smooth Dark",iconUrl:Xt("Widgets/Images/ImageryProviders/stadiaAlidadeSmoothDark.png"),tooltip:`Stadia Alidade Smooth Dark, like its lighter cousin, is also designed to stay out of the way. It just flips the dark mode switch on the color scheme. With the lights out, your data can now literally shine.
- https://docs.stadiamaps.com/map-styles/alidade-smooth-dark/`,category:"Other",creationFunction:function(){return new N_({url:"https://tiles.stadiamaps.com/tiles/alidade_smooth_dark/",retinaTiles:t,credit:`© <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a>
- © <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a>
- © <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>`})}})),e.push(new ir({name:"Sentinel-2",iconUrl:Xt("Widgets/Images/ImageryProviders/sentinel-2.png"),tooltip:"Sentinel-2 cloudless by EOX IT Services GmbH (Contains modified Copernicus Sentinel data 2016 and 2017).",category:"Cesium ion",creationFunction:function(){return Jl.fromAssetId(3954)}})),e.push(new ir({name:"Blue Marble",iconUrl:Xt("Widgets/Images/ImageryProviders/blueMarble.png"),tooltip:"Blue Marble Next Generation July, 2004 imagery from NASA.",category:"Cesium ion",creationFunction:function(){return Jl.fromAssetId(3845)}})),e.push(new ir({name:"Earth at night",iconUrl:Xt("Widgets/Images/ImageryProviders/earthAtNight.png"),tooltip:"The Earth at night, also known as The Black Marble, is a 500 meter resolution global composite imagery layer released by NASA.",category:"Cesium ion",creationFunction:function(){return Jl.fromAssetId(3812)}})),e.push(new ir({name:"Natural Earth\xA0II",iconUrl:Xt("Widgets/Images/ImageryProviders/naturalEarthII.png"),tooltip:`Natural Earth II, darkened for contrast.
- http://www.naturalearthdata.com/`,category:"Cesium ion",creationFunction:function(){return GA.fromUrl(Xt("Assets/Textures/NaturalEarthII"))}})),e.push(new ir({name:"Google Maps Satellite",iconUrl:Xt("Widgets/Images/ImageryProviders/googleSatellite.png"),tooltip:"Imagery from Google Maps",category:"Cesium ion",creationFunction:function(){return Jl.fromAssetId(3830182)}})),e.push(new ir({name:"Google Maps Satellite with Labels",iconUrl:Xt("Widgets/Images/ImageryProviders/googleSatelliteLabels.png"),tooltip:"Imagery with place labels from Google Maps",category:"Cesium ion",creationFunction:function(){return Jl.fromAssetId(3830183)}})),e.push(new ir({name:"Google Maps Roadmap",iconUrl:Xt("Widgets/Images/ImageryProviders/googleRoadmap.png"),tooltip:"Labeled roads and other features on a base landscape from Google Maps",category:"Cesium ion",creationFunction:function(){return Jl.fromAssetId(3830184)}})),e.push(new ir({name:"Google Maps Contour",iconUrl:Xt("Widgets/Images/ImageryProviders/googleContour.png"),tooltip:"Hillshade mapping, contour lines, natural features (roadmap features hidden) from Google Maps",category:"Cesium ion",creationFunction:function(){return Jl.fromAssetId(3830186)}})),e.push(new ir({name:"Azure Maps Aerial",iconUrl:Xt("Widgets/Images/ImageryProviders/azureAerial.png"),tooltip:"Imagery from Azure Maps",category:"Cesium ion",creationFunction:function(){return Jl.fromAssetId(3891168)}})),e.push(new ir({name:"Azure Maps Roads",iconUrl:Xt("Widgets/Images/ImageryProviders/azureRoads.png"),tooltip:"Labeled roads and other features on a base landscape from Azure Maps",category:"Cesium ion",creationFunction:function(){return Jl.fromAssetId(3891169)}})),e}var KV=l3t;function u3t(){let e=[];return e.push(new ir({name:"WGS84 Ellipsoid",iconUrl:Xt("Widgets/Images/TerrainProviders/Ellipsoid.png"),tooltip:"WGS84 standard ellipsoid, also known as EPSG:4326",category:"Cesium ion",creationFunction:function(){return new a0({ellipsoid:te.WGS84})}})),e.push(new ir({name:"Cesium World Terrain",iconUrl:Xt("Widgets/Images/TerrainProviders/CesiumWorldTerrain.png"),tooltip:"High-resolution global terrain tileset curated from several datasources and hosted by Cesium ion",category:"Cesium ion",creationFunction:function(){return QT({requestWaterMask:!0,requestVertexNormals:!0})}})),e}var QV=u3t;function f3t(e){return function(t){let n=e._scene.pick(t.position);l(n)&&n.primitive instanceof xa&&(e.tileset=n.primitive),e.pickActive=!1}}function KOe(e,t){t?e._eventHandler.setInputAction(function(n){let i=e._scene.pick(n.endPosition);l(i)&&i.primitive instanceof xa&&(e.tileset=i.primitive)},Sn.MOUSE_MOVE):(e._eventHandler.removeInputAction(Sn.MOUSE_MOVE),e.picking=e.picking)}var d3t={maximumFractionDigits:3};function $V(e){let t=e/1048576;return t<1?t.toLocaleString(void 0,d3t):Math.round(t).toLocaleString()}function JV(e,t){if(!l(e))return"";let n=t?e._statisticsPerPass[tr.PICK]:e._statisticsPerPass[tr.RENDER],i='<ul class="cesium-cesiumInspector-statistics">';return i+=`<li><strong>Visited: </strong>${n.visited.toLocaleString()}</li><li><strong>Selected: </strong>${n.selected.toLocaleString()}</li><li><strong>Commands: </strong>${n.numberOfCommands.toLocaleString()}</li>`,i+="</ul>",t||(i+='<ul class="cesium-cesiumInspector-statistics">',i+=`<li><strong>Requests: </strong>${n.numberOfPendingRequests.toLocaleString()}</li><li><strong>Attempted: </strong>${n.numberOfAttemptedRequests.toLocaleString()}</li><li><strong>Processing: </strong>${n.numberOfTilesProcessing.toLocaleString()}</li><li><strong>Content Ready: </strong>${n.numberOfTilesWithContentReady.toLocaleString()}</li><li><strong>Total: </strong>${n.numberOfTilesTotal.toLocaleString()}</li>`,i+="</ul>",i+='<ul class="cesium-cesiumInspector-statistics">',i+=`<li><strong>Features Selected: </strong>${n.numberOfFeaturesSelected.toLocaleString()}</li><li><strong>Features Loaded: </strong>${n.numberOfFeaturesLoaded.toLocaleString()}</li><li><strong>Points Selected: </strong>${n.numberOfPointsSelected.toLocaleString()}</li><li><strong>Points Loaded: </strong>${n.numberOfPointsLoaded.toLocaleString()}</li><li><strong>Triangles Selected: </strong>${n.numberOfTrianglesSelected.toLocaleString()}</li>`,i+="</ul>",i+='<ul class="cesium-cesiumInspector-statistics">',i+=`<li><strong>Tiles styled: </strong>${n.numberOfTilesStyled.toLocaleString()}</li><li><strong>Features styled: </strong>${n.numberOfFeaturesStyled.toLocaleString()}</li>`,i+="</ul>",i+='<ul class="cesium-cesiumInspector-statistics">',i+=`<li><strong>Children Union Culled: </strong>${n.numberOfTilesCulledWithChildrenUnion.toLocaleString()}</li>`,i+="</ul>",i+='<ul class="cesium-cesiumInspector-statistics">',i+=`<li><strong>Geometry Memory (MB): </strong>${$V(n.geometryByteLength)}</li><li><strong>Texture Memory (MB): </strong>${$V(n.texturesByteLength)}</li><li><strong>Batch Table Memory (MB): </strong>${$V(n.batchTableByteLength)}</li>`,i+="</ul>"),i}function QOe(){let e=Ii.statistics;return`
- <ul class="cesium-cesiumInspector-statistics">
- <li><strong>Geometry Memory (MB): </strong>${$V(e.geometryByteLength)}</li>
- <li><strong>Texture Memory (MB): </strong>${$V(e.texturesByteLength)}</li>
- </ul>
- `}var h3t=[{text:"Highlight",value:Iu.HIGHLIGHT},{text:"Replace",value:Iu.REPLACE},{text:"Mix",value:Iu.MIX}],XOe=new V(1,1,0,.4),m3t=new V,P9=new V;function xc(e,t){let n=this,i=e.canvas;this._eventHandler=new td(i),this._scene=e,this._performanceContainer=t,this._canvas=i,this._performanceDisplay=new C_({container:t}),this._statisticsText="",this._pickStatisticsText="",this._resourceCacheStatisticsText="",this._editorError="",this.performance=!1,this.showStatistics=!0,this.showPickStatistics=!0,this.showResourceCacheStatistics=!1,this.inspectorVisible=!0,this.tilesetVisible=!1,this.displayVisible=!1,this.updateVisible=!1,this.loggingVisible=!1,this.styleVisible=!1,this.tileDebugLabelsVisible=!1,this.optimizationVisible=!1,this.styleString="{}",this.hasEnabledWireframe=!1,this._tileset=void 0,this._feature=void 0,this._tile=void 0,ve.track(this,["performance","inspectorVisible","_statisticsText","_pickStatisticsText","_resourceCacheStatisticsText","_editorError","showPickStatistics","showStatistics","showResourceCacheStatistics","tilesetVisible","displayVisible","updateVisible","loggingVisible","styleVisible","optimizationVisible","tileDebugLabelsVisible","styleString","_feature","_tile","_tileset","hasEnabledWireframe"]),this._properties=ve.observable({}),this.properties=[],ve.defineProperty(this,"properties",function(){let F=[],H=n._properties();for(let q in H)H.hasOwnProperty(q)&&F.push(q);return F});let o=ve.observable();ve.defineProperty(this,"dynamicScreenSpaceError",{get:function(){return o()},set:function(F){o(F),l(n._tileset)&&(n._tileset.dynamicScreenSpaceError=F)}}),this.dynamicScreenSpaceError=!1;let r=ve.observable();ve.defineProperty(this,"colorBlendMode",{get:function(){return r()},set:function(F){r(F),l(n._tileset)&&(n._tileset.colorBlendMode=F,n._scene.requestRender())}}),this.colorBlendMode=Iu.HIGHLIGHT;let a=ve.observable(),s=ve.observable();ve.defineProperty(this,"picking",{get:function(){return s()},set:function(F){s(F),F?n._eventHandler.setInputAction(function(H){let q=e.pick(H.endPosition);if(q instanceof Qa?(n.feature=q,n.tile=q.content.tile):l(q)&&l(q.content)?(n.feature=void 0,n.tile=q.content.tile):(n.feature=void 0,n.tile=void 0),!!l(n._tileset)){if(a&&l(q)&&l(q.content)){let J;e.pickPositionSupported&&(J=e.pickPosition(H.endPosition),l(J)&&(n._tileset.debugPickPosition=J)),n._tileset.debugPickedTile=q.content.tile}else n._tileset.debugPickedTile=void 0;n._scene.requestRender()}},Sn.MOUSE_MOVE):(n.feature=void 0,n.tile=void 0,n._eventHandler.removeInputAction(Sn.MOUSE_MOVE))}}),this.picking=!0;let c=ve.observable();ve.defineProperty(this,"colorize",{get:function(){return c()},set:function(F){c(F),l(n._tileset)&&(n._tileset.debugColorizeTiles=F,n._scene.requestRender())}}),this.colorize=!1;let u=ve.observable();ve.defineProperty(this,"wireframe",{get:function(){return u()},set:function(F){u(F),l(n._tileset)&&(n._tileset.debugWireframe=F,n._scene.requestRender())}}),this.wireframe=!1;let f=ve.observable();ve.defineProperty(this,"showBoundingVolumes",{get:function(){return f()},set:function(F){f(F),l(n._tileset)&&(n._tileset.debugShowBoundingVolume=F,n._scene.requestRender())}}),this.showBoundingVolumes=!1;let d=ve.observable();ve.defineProperty(this,"showContentBoundingVolumes",{get:function(){return d()},set:function(F){d(F),l(n._tileset)&&(n._tileset.debugShowContentBoundingVolume=F,n._scene.requestRender())}}),this.showContentBoundingVolumes=!1;let p=ve.observable();ve.defineProperty(this,"showRequestVolumes",{get:function(){return p()},set:function(F){p(F),l(n._tileset)&&(n._tileset.debugShowViewerRequestVolume=F,n._scene.requestRender())}}),this.showRequestVolumes=!1;let g=ve.observable();ve.defineProperty(this,"freezeFrame",{get:function(){return g()},set:function(F){g(F),l(n._tileset)&&(n._tileset.debugFreezeFrame=F,n._scene.debugShowFrustumPlanes=F,n._scene.requestRender())}}),this.freezeFrame=!1,ve.defineProperty(this,"showOnlyPickedTileDebugLabel",{get:function(){return a()},set:function(F){a(F),l(n._tileset)&&(n._tileset.debugPickedTileLabelOnly=F,n._scene.requestRender())}}),this.showOnlyPickedTileDebugLabel=!1;let m=ve.observable();ve.defineProperty(this,"showGeometricError",{get:function(){return m()},set:function(F){m(F),l(n._tileset)&&(n._tileset.debugShowGeometricError=F,n._scene.requestRender())}}),this.showGeometricError=!1;let A=ve.observable();ve.defineProperty(this,"showRenderingStatistics",{get:function(){return A()},set:function(F){A(F),l(n._tileset)&&(n._tileset.debugShowRenderingStatistics=F,n._scene.requestRender())}}),this.showRenderingStatistics=!1;let y=ve.observable();ve.defineProperty(this,"showMemoryUsage",{get:function(){return y()},set:function(F){y(F),l(n._tileset)&&(n._tileset.debugShowMemoryUsage=F,n._scene.requestRender())}}),this.showMemoryUsage=!1;let x=ve.observable();ve.defineProperty(this,"showUrl",{get:function(){return x()},set:function(F){x(F),l(n._tileset)&&(n._tileset.debugShowUrl=F,n._scene.requestRender())}}),this.showUrl=!1;let b=ve.observable();ve.defineProperty(this,"maximumScreenSpaceError",{get:function(){return b()},set:function(F){F=Number(F),isNaN(F)||(b(F),l(n._tileset)&&(n._tileset.maximumScreenSpaceError=F))}}),this.maximumScreenSpaceError=16;let C=ve.observable();ve.defineProperty(this,"dynamicScreenSpaceErrorDensity",{get:function(){return C()},set:function(F){F=Number(F),isNaN(F)||(C(F),l(n._tileset)&&(n._tileset.dynamicScreenSpaceErrorDensity=F))}}),this.dynamicScreenSpaceErrorDensity=2e-4,this.dynamicScreenSpaceErrorDensitySliderValue=void 0,ve.defineProperty(this,"dynamicScreenSpaceErrorDensitySliderValue",{get:function(){return Math.pow(C(),1/6)},set:function(F){let H=Math.pow(F,6);C(H),l(n._tileset)&&(n._tileset.dynamicScreenSpaceErrorDensity=H)}});let E=ve.observable();ve.defineProperty(this,"dynamicScreenSpaceErrorFactor",{get:function(){return E()},set:function(F){F=Number(F),isNaN(F)||(E(F),l(n._tileset)&&(n._tileset.dynamicScreenSpaceErrorFactor=F))}}),this.dynamicScreenSpaceErrorFactor=24;let S=f3t(this),w=ve.observable();ve.defineProperty(this,"pickActive",{get:function(){return w()},set:function(F){w(F),F?n._eventHandler.setInputAction(S,Sn.LEFT_CLICK):n._eventHandler.removeInputAction(Sn.LEFT_CLICK)}});let P=ve.observable();ve.defineProperty(this,"pointCloudShading",{get:function(){return P()},set:function(F){P(F),l(n._tileset)&&(n._tileset.pointCloudShading.attenuation=F)}}),this.pointCloudShading=!1;let R=ve.observable();ve.defineProperty(this,"geometricErrorScale",{get:function(){return R()},set:function(F){F=Number(F),isNaN(F)||(R(F),l(n._tileset)&&(n._tileset.pointCloudShading.geometricErrorScale=F))}}),this.geometricErrorScale=1;let B=ve.observable();ve.defineProperty(this,"maximumAttenuation",{get:function(){return B()},set:function(F){F=Number(F),isNaN(F)||(B(F),l(n._tileset)&&(n._tileset.pointCloudShading.maximumAttenuation=F===0?void 0:F))}}),this.maximumAttenuation=0;let L=ve.observable();ve.defineProperty(this,"baseResolution",{get:function(){return L()},set:function(F){F=Number(F),isNaN(F)||(L(F),l(n._tileset)&&(n._tileset.pointCloudShading.baseResolution=F===0?void 0:F))}}),this.baseResolution=0;let _=ve.observable();ve.defineProperty(this,"eyeDomeLighting",{get:function(){return _()},set:function(F){_(F),l(n._tileset)&&(n._tileset.pointCloudShading.eyeDomeLighting=F)}}),this.eyeDomeLighting=!1;let T=ve.observable();ve.defineProperty(this,"eyeDomeLightingStrength",{get:function(){return T()},set:function(F){F=Number(F),isNaN(F)||(T(F),l(n._tileset)&&(n._tileset.pointCloudShading.eyeDomeLightingStrength=F))}}),this.eyeDomeLightingStrength=1;let v=ve.observable();ve.defineProperty(this,"eyeDomeLightingRadius",{get:function(){return v()},set:function(F){F=Number(F),isNaN(F)||(v(F),l(n._tileset)&&(n._tileset.pointCloudShading.eyeDomeLightingRadius=F))}}),this.eyeDomeLightingRadius=1,this.pickActive=!1;let I=ve.observable();ve.defineProperty(this,"skipLevelOfDetail",{get:function(){return I()},set:function(F){I(F),l(n._tileset)&&(n._tileset.skipLevelOfDetail=F)}}),this.skipLevelOfDetail=!0;let O=ve.observable();ve.defineProperty(this,"skipScreenSpaceErrorFactor",{get:function(){return O()},set:function(F){F=Number(F),isNaN(F)||(O(F),l(n._tileset)&&(n._tileset.skipScreenSpaceErrorFactor=F))}}),this.skipScreenSpaceErrorFactor=16;let N=ve.observable();ve.defineProperty(this,"baseScreenSpaceError",{get:function(){return N()},set:function(F){F=Number(F),isNaN(F)||(N(F),l(n._tileset)&&(n._tileset.baseScreenSpaceError=F))}}),this.baseScreenSpaceError=1024;let j=ve.observable();ve.defineProperty(this,"skipLevels",{get:function(){return j()},set:function(F){F=Number(F),isNaN(F)||(j(F),l(n._tileset)&&(n._tileset.skipLevels=F))}}),this.skipLevels=1;let k=ve.observable();ve.defineProperty(this,"immediatelyLoadDesiredLevelOfDetail",{get:function(){return k()},set:function(F){k(F),l(n._tileset)&&(n._tileset.immediatelyLoadDesiredLevelOfDetail=F)}}),this.immediatelyLoadDesiredLevelOfDetail=!1;let U=ve.observable();ve.defineProperty(this,"loadSiblings",{get:function(){return U()},set:function(F){U(F),l(n._tileset)&&(n._tileset.loadSiblings=F)}}),this.loadSiblings=!1,this._style=void 0,this._shouldStyle=!1,this._definedProperties=["properties","dynamicScreenSpaceError","colorBlendMode","picking","colorize","wireframe","showBoundingVolumes","showContentBoundingVolumes","showRequestVolumes","freezeFrame","maximumScreenSpaceError","dynamicScreenSpaceErrorDensity","baseScreenSpaceError","skipScreenSpaceErrorFactor","skipLevelOfDetail","skipLevels","immediatelyLoadDesiredLevelOfDetail","loadSiblings","dynamicScreenSpaceErrorDensitySliderValue","dynamicScreenSpaceErrorFactor","pickActive","showOnlyPickedTileDebugLabel","showGeometricError","showRenderingStatistics","showMemoryUsage","showUrl","pointCloudShading","geometricErrorScale","maximumAttenuation","baseResolution","eyeDomeLighting","eyeDomeLightingStrength","eyeDomeLightingRadius"],this._removePostRenderEvent=e.postRender.addEventListener(function(){n._update()}),l(this._tileset)||KOe(this,!0)}Object.defineProperties(xc.prototype,{scene:{get:function(){return this._scene}},performanceContainer:{get:function(){return this._performanceContainer}},statisticsText:{get:function(){return this._statisticsText}},pickStatisticsText:{get:function(){return this._pickStatisticsText}},resourceCacheStatisticsText:{get:function(){return this._resourceCacheStatisticsText}},colorBlendModes:{get:function(){return h3t}},editorError:{get:function(){return this._editorError}},tileset:{get:function(){return this._tileset},set:function(e){if(this._tileset=e,this._style=void 0,this.styleString="{}",this.feature=void 0,this.tile=void 0,l(e)){this._properties(e.properties);let t=["colorize","wireframe","showBoundingVolumes","showContentBoundingVolumes","showRequestVolumes","freezeFrame","showOnlyPickedTileDebugLabel","showGeometricError","showRenderingStatistics","showMemoryUsage","showUrl"],n=t.length;for(let o=0;o<n;++o){let r=t[o];this[r]=this[r]}this.maximumScreenSpaceError=e.maximumScreenSpaceError,this.dynamicScreenSpaceError=e.dynamicScreenSpaceError,this.dynamicScreenSpaceErrorDensity=e.dynamicScreenSpaceErrorDensity,this.dynamicScreenSpaceErrorFactor=e.dynamicScreenSpaceErrorFactor,this.colorBlendMode=e.colorBlendMode,this.skipLevelOfDetail=e.skipLevelOfDetail,this.skipScreenSpaceErrorFactor=e.skipScreenSpaceErrorFactor,this.baseScreenSpaceError=e.baseScreenSpaceError,this.skipLevels=e.skipLevels,this.immediatelyLoadDesiredLevelOfDetail=e.immediatelyLoadDesiredLevelOfDetail,this.loadSiblings=e.loadSiblings,this.hasEnabledWireframe=e._enableDebugWireframe;let i=e.pointCloudShading;this.pointCloudShading=i.attenuation,this.geometricErrorScale=i.geometricErrorScale,this.maximumAttenuation=i.maximumAttenuation?i.maximumAttenuation:0,this.baseResolution=i.baseResolution?i.baseResolution:0,this.eyeDomeLighting=i.eyeDomeLighting,this.eyeDomeLightingStrength=i.eyeDomeLightingStrength,this.eyeDomeLightingRadius=i.eyeDomeLightingRadius,this._scene.requestRender()}else this._properties({});this._statisticsText=JV(e,!1),this._pickStatisticsText=JV(e,!0),this._resourceCacheStatisticsText=QOe(),KOe(this,!1)}},feature:{get:function(){return this._feature},set:function(e){if(this._feature===e)return;let t=this._feature;l(t)&&!t.content.isDestroyed()&&(!this.colorize&&l(this._style)?t.color=l(this._style.color)?this._style.color.evaluateColor(t,m3t):V.WHITE:t.color=P9,this._scene.requestRender()),l(e)&&(V.clone(e.color,P9),e.color=XOe,this._scene.requestRender()),this._feature=e}},tile:{get:function(){return this._tile},set:function(e){if(this._tile===e)return;let t=this._tile;l(t)&&!t.isDestroyed()&&!hre(t.content)&&(t.color=P9,this._scene.requestRender()),l(e)&&!hre(e.content)&&(V.clone(e.color,P9),e.color=XOe,this._scene.requestRender()),this._tile=e}}});function hre(e){if(!l(e))return!1;if(e.featuresLength>0)return!0;let t=e.innerContents;if(l(t)){let n=t.length;for(let i=0;i<n;++i)if(!hre(t[i]))return!1;return!0}return!1}xc.prototype.togglePickTileset=function(){this.pickActive=!this.pickActive};xc.prototype.toggleInspector=function(){this.inspectorVisible=!this.inspectorVisible};xc.prototype.toggleTileset=function(){this.tilesetVisible=!this.tilesetVisible};xc.prototype.toggleDisplay=function(){this.displayVisible=!this.displayVisible};xc.prototype.toggleUpdate=function(){this.updateVisible=!this.updateVisible};xc.prototype.toggleLogging=function(){this.loggingVisible=!this.loggingVisible};xc.prototype.toggleStyle=function(){this.styleVisible=!this.styleVisible};xc.prototype.toggleTileDebugLabels=function(){this.tileDebugLabelsVisible=!this.tileDebugLabelsVisible};xc.prototype.toggleOptimization=function(){this.optimizationVisible=!this.optimizationVisible};xc.prototype.trimTilesCache=function(){l(this._tileset)&&this._tileset.trimLoadedTiles()};xc.prototype.compileStyle=function(){let e=this._tileset;if(!(!l(e)||this.styleString===JSON.stringify(e.style))){this._editorError="";try{this.styleString.length===0&&(this.styleString="{}"),this._style=new Fg(JSON.parse(this.styleString)),this._shouldStyle=!0,this._scene.requestRender()}catch(t){this._editorError=t.toString()}this.feature=this._feature,this.tile=this._tile}};xc.prototype.styleEditorKeyPress=function(e,t){if(t.keyCode===9){t.preventDefault();let n=t.target,i=n.selectionStart,o=n.selectionEnd,r=o,s=n.value.slice(i,o).split(`
- `),c=s.length,u;if(t.shiftKey)for(u=0;u<c;++u)s[u][0]===" "&&(s[u][1]===" "?(s[u]=s[u].substr(2),r-=2):(s[u]=s[u].substr(1),r-=1));else for(u=0;u<c;++u)s[u]=` ${s[u]}`,r+=2;let f=s.join(`
- `);n.value=n.value.slice(0,i)+f+n.value.slice(o),n.selectionStart=i!==o?i:r,n.selectionEnd=r}else t.ctrlKey&&(t.keyCode===10||t.keyCode===13)&&this.compileStyle();return!0};xc.prototype._update=function(){let e=this._tileset;if(this.performance&&this._performanceDisplay.update(),l(e)){if(e.isDestroyed()){this.tile=void 0,this.feature=void 0,this.tileset=void 0;return}let t=e.style;this._style!==e.style&&(this._shouldStyle?(e.style=this._style,this._shouldStyle=!1):(this._style=t,this.styleString=JSON.stringify(t.style,null," ")))}this.showStatistics&&(this._statisticsText=JV(e,!1),this._pickStatisticsText=JV(e,!0),this._resourceCacheStatisticsText=QOe())};xc.prototype.isDestroyed=function(){return!1};xc.prototype.destroy=function(){this._eventHandler.destroy(),this._removePostRenderEvent();let e=this;return this._definedProperties.forEach(function(t){ve.getObservable(e,t).dispose()}),fe(this)};xc.getStatistics=JV;var ZV=xc;function R9(e,t){e=On(e);let n=document.createElement("div"),i=document.createElement("div");i.setAttribute("data-bind","visible: performance");let o=new ZV(t,i);this._viewModel=o,this._container=e,this._element=n;let r=document.createElement("div");r.textContent="3D Tiles Inspector",r.className="cesium-cesiumInspector-button",r.setAttribute("data-bind","click: toggleInspector"),n.appendChild(r),n.className="cesium-cesiumInspector cesium-3DTilesInspector",n.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : inspectorVisible, "cesium-cesiumInspector-hidden" : !inspectorVisible}'),e.appendChild(n);let a=document.createElement("div");a.className="cesium-cesiumInspector-dropDown",n.appendChild(a);let s=sf.createSection,c=sf.createCheckbox,u=sf.createRangeInput,f=sf.createButton,d=s(a,"Tileset","tilesetVisible","toggleTileset"),p=s(a,"Display","displayVisible","toggleDisplay"),g=s(a,"Update","updateVisible","toggleUpdate"),m=s(a,"Logging","loggingVisible","toggleLogging"),A=s(a,"Tile Debug Labels","tileDebugLabelsVisible","toggleTileDebugLabels"),y=s(a,"Style","styleVisible","toggleStyle"),x=s(a,"Optimization","optimizationVisible","toggleOptimization"),b=document.createElement("div");b.className="field-group";let C=document.createElement("label");C.className="field-label",C.appendChild(document.createTextNode("Properties: "));let E=document.createElement("div");E.setAttribute("data-bind","text: properties"),b.appendChild(C),b.appendChild(E),d.appendChild(b),d.appendChild(f("Pick Tileset","togglePickTileset","pickActive")),d.appendChild(f("Trim Tiles Cache","trimTilesCache")),d.appendChild(c("Enable Picking","picking")),p.appendChild(c("Colorize","colorize"));let S=p.appendChild(c("Wireframe","wireframe","_tileset === undefined || hasEnabledWireframe")),w=document.createElement("p");w.setAttribute("data-bind","visible: _tileset !== undefined && !hasEnabledWireframe"),w.setAttribute("class","cesium-3DTilesInspector-disabledElementsInfo"),w.innerText="Set enableDebugWireframe to true in the tileset constructor to enable this option.",S.appendChild(w),p.appendChild(c("Bounding Volumes","showBoundingVolumes")),p.appendChild(c("Content Volumes","showContentBoundingVolumes")),p.appendChild(c("Request Volumes","showRequestVolumes")),p.appendChild(c("Point Cloud Shading","pointCloudShading"));let P=document.createElement("div");P.setAttribute("data-bind","visible: pointCloudShading"),P.appendChild(u("Geometric Error Scale","geometricErrorScale",0,2,.01)),P.appendChild(u("Maximum Attenuation","maximumAttenuation",0,32,1)),P.appendChild(u("Base Resolution","baseResolution",0,1,.01)),P.appendChild(c("Eye Dome Lighting (EDL)","eyeDomeLighting")),p.appendChild(P);let R=document.createElement("div");R.setAttribute("data-bind","visible: eyeDomeLighting"),R.appendChild(u("EDL Strength","eyeDomeLightingStrength",0,2,.1)),R.appendChild(u("EDL Radius","eyeDomeLightingRadius",0,4,.1)),P.appendChild(R),g.appendChild(c("Freeze Frame","freezeFrame")),g.appendChild(c("Dynamic Screen Space Error","dynamicScreenSpaceError"));let B=document.createElement("div");B.appendChild(u("Maximum Screen Space Error","maximumScreenSpaceError",0,128,1)),g.appendChild(B);let L=document.createElement("div");L.setAttribute("data-bind","visible: dynamicScreenSpaceError"),L.appendChild(u("Screen Space Error Density","dynamicScreenSpaceErrorDensitySliderValue",0,1,.005,"dynamicScreenSpaceErrorDensity")),L.appendChild(u("Screen Space Error Factor","dynamicScreenSpaceErrorFactor",1,32,.1)),g.appendChild(L),m.appendChild(c("Performance","performance")),m.appendChild(i),m.appendChild(c("Statistics","showStatistics"));let _=document.createElement("div");_.className="cesium-3dTilesInspector-statistics",_.setAttribute("data-bind","html: statisticsText, visible: showStatistics"),m.appendChild(_),m.appendChild(c("Pick Statistics","showPickStatistics"));let T=document.createElement("div");T.className="cesium-3dTilesInspector-statistics",T.setAttribute("data-bind","html: pickStatisticsText, visible: showPickStatistics"),m.appendChild(T),m.appendChild(c("Resource Cache Statistics","showResourceCacheStatistics"));let v=document.createElement("div");v.className="cesium-3dTilesInspector-statistics",v.setAttribute("data-bind","html: resourceCacheStatisticsText, visible: showResourceCacheStatistics"),m.appendChild(v);let I=document.createElement("div");y.appendChild(I),I.appendChild(document.createTextNode("Color Blend Mode: "));let O=document.createElement("select");O.setAttribute("data-bind",'options: colorBlendModes, optionsText: "text", optionsValue: "value", value: colorBlendMode'),I.appendChild(O);let N=document.createElement("textarea");N.setAttribute("data-bind","textInput: styleString, event: { keydown: styleEditorKeyPress }"),I.className="cesium-cesiumInspector-styleEditor",I.appendChild(N);let j=f("Compile (Ctrl+Enter)","compileStyle");I.appendChild(j);let k=document.createElement("div");k.className="cesium-cesiumInspector-error",k.setAttribute("data-bind","text: editorError"),I.appendChild(k),A.appendChild(c("Show Picked Only","showOnlyPickedTileDebugLabel")),A.appendChild(c("Geometric Error","showGeometricError")),A.appendChild(c("Rendering Statistics","showRenderingStatistics")),A.appendChild(c("Memory Usage (MB)","showMemoryUsage")),A.appendChild(c("Url","showUrl")),x.appendChild(c("Skip Tile LODs","skipLevelOfDetail"));let U=document.createElement("div");U.appendChild(u("Skip SSE Factor","skipScreenSpaceErrorFactor",1,50,1)),x.appendChild(U);let F=document.createElement("div");F.appendChild(u("SSE before skipping LOD","baseScreenSpaceError",0,4096,1)),x.appendChild(F);let H=document.createElement("div");H.appendChild(u("Min. levels to skip","skipLevels",0,10,1)),x.appendChild(H),x.appendChild(c("Load only tiles that meet the max SSE.","immediatelyLoadDesiredLevelOfDetail")),x.appendChild(c("Load siblings of visible tiles","loadSiblings")),ve.applyBindings(o,n)}Object.defineProperties(R9.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});R9.prototype.isDestroyed=function(){return!1};R9.prototype.destroy=function(){return ve.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),fe(this)};var e4=R9;function p3t(e){let t;if(l(e)){t="Command Statistics";let n=e.commandsInFrustums;for(let i in n)if(n.hasOwnProperty(i)){let o=parseInt(i,10),r;if(o===7)r="1, 2 and 3";else{let a=[];for(let s=2;s>=0;s--){let c=Math.pow(2,s);o>=c&&(a.push(s+1),o-=c)}r=a.reverse().join(" and ")}t+=`<br> ${n[i]} in frustum ${r}`}t+=`<br>Total: ${e.totalCommands}`}return t}function mre(e,t,n){let i=Math.min(n,t);return i=Math.max(i,e),i}var g3t=new gn,_3t=new h;function t4(e,t){let n=this,i=e.canvas,o=new td(i);this._eventHandler=o,this._scene=e,this._canvas=i,this._primitive=void 0,this._tile=void 0,this._modelMatrixPrimitive=void 0,this._performanceDisplay=void 0,this._performanceContainer=t;let r=this._scene.globe;r.depthTestAgainstTerrain=!0,this.frustums=!1,this.frustumPlanes=!1,this.performance=!1,this.shaderCacheText="",this.primitiveBoundingSphere=!1,this.primitiveReferenceFrame=!1,this.filterPrimitive=!1,this.tileBoundingSphere=!1,this.filterTile=!1,this.wireframe=!1,this.depthFrustum=1,this._numberOfFrustums=1,this.suspendUpdates=!1,this.tileCoordinates=!1,this.frustumStatisticText=!1,this.tileText="",this.hasPickedPrimitive=!1,this.hasPickedTile=!1,this.pickPrimitiveActive=!1,this.pickTileActive=!1,this.dropDownVisible=!0,this.generalVisible=!0,this.primitivesVisible=!1,this.terrainVisible=!1,this.depthFrustumText="",ve.track(this,["frustums","frustumPlanes","performance","shaderCacheText","primitiveBoundingSphere","primitiveReferenceFrame","filterPrimitive","tileBoundingSphere","filterTile","wireframe","depthFrustum","suspendUpdates","tileCoordinates","frustumStatisticText","tileText","hasPickedPrimitive","hasPickedTile","pickPrimitiveActive","pickTileActive","dropDownVisible","generalVisible","primitivesVisible","terrainVisible","depthFrustumText"]),this._toggleDropDown=In(function(){n.dropDownVisible=!n.dropDownVisible}),this._toggleGeneral=In(function(){n.generalVisible=!n.generalVisible}),this._togglePrimitives=In(function(){n.primitivesVisible=!n.primitivesVisible}),this._toggleTerrain=In(function(){n.terrainVisible=!n.terrainVisible}),this._frustumsSubscription=ve.getObservable(this,"frustums").subscribe(function(u){n._scene.debugShowFrustums=u,n._scene.requestRender()}),this._frustumPlanesSubscription=ve.getObservable(this,"frustumPlanes").subscribe(function(u){n._scene.debugShowFrustumPlanes=u,n._scene.requestRender()}),this._performanceSubscription=ve.getObservable(this,"performance").subscribe(function(u){u?n._performanceDisplay=new C_({container:n._performanceContainer}):n._performanceContainer.innerHTML=""}),this._showPrimitiveBoundingSphere=In(function(){return n._primitive.debugShowBoundingVolume=n.primitiveBoundingSphere,n._scene.requestRender(),!0}),this._primitiveBoundingSphereSubscription=ve.getObservable(this,"primitiveBoundingSphere").subscribe(function(){n._showPrimitiveBoundingSphere()}),this._showPrimitiveReferenceFrame=In(function(){if(n.primitiveReferenceFrame){let u=n._primitive.modelMatrix;n._modelMatrixPrimitive=new tV({modelMatrix:u}),n._scene.primitives.add(n._modelMatrixPrimitive)}else l(n._modelMatrixPrimitive)&&(n._scene.primitives.remove(n._modelMatrixPrimitive),n._modelMatrixPrimitive=void 0);return n._scene.requestRender(),!0}),this._primitiveReferenceFrameSubscription=ve.getObservable(this,"primitiveReferenceFrame").subscribe(function(){n._showPrimitiveReferenceFrame()}),this._doFilterPrimitive=In(function(){return n.filterPrimitive?n._scene.debugCommandFilter=function(u){return l(n._modelMatrixPrimitive)&&u.owner===n._modelMatrixPrimitive._primitive?!0:l(n._primitive)?u.owner===n._primitive||u.owner===n._primitive._billboardCollection||u.owner.primitive===n._primitive:!1}:n._scene.debugCommandFilter=void 0,!0}),this._filterPrimitiveSubscription=ve.getObservable(this,"filterPrimitive").subscribe(function(){n._doFilterPrimitive(),n._scene.requestRender()}),this._wireframeSubscription=ve.getObservable(this,"wireframe").subscribe(function(u){r._surface.tileProvider._debug.wireframe=u,n._scene.requestRender()}),this._depthFrustumSubscription=ve.getObservable(this,"depthFrustum").subscribe(function(u){n._scene.debugShowDepthFrustum=u,n._scene.requestRender()}),this._incrementDepthFrustum=In(function(){let u=n.depthFrustum+1;return n.depthFrustum=mre(1,n._numberOfFrustums,u),n._scene.requestRender(),!0}),this._decrementDepthFrustum=In(function(){let u=n.depthFrustum-1;return n.depthFrustum=mre(1,n._numberOfFrustums,u),n._scene.requestRender(),!0}),this._suspendUpdatesSubscription=ve.getObservable(this,"suspendUpdates").subscribe(function(u){r._surface._debug.suspendLodUpdate=u,u||(n.filterTile=!1)});let a;this._showTileCoordinates=In(function(){return n.tileCoordinates&&!l(a)?a=e.imageryLayers.addImageryProvider(new PV({tilingScheme:e.terrainProvider.tilingScheme})):!n.tileCoordinates&&l(a)&&(e.imageryLayers.remove(a),a=void 0),!0}),this._tileCoordinatesSubscription=ve.getObservable(this,"tileCoordinates").subscribe(function(){n._showTileCoordinates(),n._scene.requestRender()}),this._tileBoundingSphereSubscription=ve.getObservable(this,"tileBoundingSphere").subscribe(function(){n._showTileBoundingSphere(),n._scene.requestRender()}),this._showTileBoundingSphere=In(function(){return n.tileBoundingSphere?r._surface.tileProvider._debug.boundingSphereTile=n._tile:r._surface.tileProvider._debug.boundingSphereTile=void 0,n._scene.requestRender(),!0}),this._doFilterTile=In(function(){return n.filterTile?(n.suspendUpdates=!0,r._surface._tilesToRender=[],l(n._tile)&&n._tile.renderable&&r._surface._tilesToRender.push(n._tile)):n.suspendUpdates=!1,!0}),this._filterTileSubscription=ve.getObservable(this,"filterTile").subscribe(function(){n.doFilterTile(),n._scene.requestRender()});function s(u){let f=n._scene.pick({x:u.position.x,y:u.position.y});l(f)&&(n.primitive=l(f.collection)?f.collection:f.primitive),n._scene.requestRender(),n.pickPrimitiveActive=!1}this._pickPrimitive=In(function(){n.pickPrimitiveActive=!n.pickPrimitiveActive}),this._pickPrimitiveActiveSubscription=ve.getObservable(this,"pickPrimitiveActive").subscribe(function(u){u?o.setInputAction(s,Sn.LEFT_CLICK):o.removeInputAction(Sn.LEFT_CLICK)});function c(u){let f,d=r.ellipsoid,p=n._scene.camera.getPickRay(u.position,g3t),g=r.pick(p,n._scene,_3t);if(l(g)){let m=d.cartesianToCartographic(g),A=r._surface.tileProvider._tilesToRenderByTextureCount;for(let y=0;!f&&y<A.length;++y){let x=A[y];if(l(x))for(let b=0;!f&&b<x.length;++b){let C=x[b];oe.contains(C.rectangle,m)&&(f=C)}}}n.tile=f,n.pickTileActive=!1}this._pickTile=In(function(){n.pickTileActive=!n.pickTileActive}),this._pickTileActiveSubscription=ve.getObservable(this,"pickTileActive").subscribe(function(u){u?o.setInputAction(c,Sn.LEFT_CLICK):o.removeInputAction(Sn.LEFT_CLICK)}),this._removePostRenderEvent=e.postRender.addEventListener(function(){n._update()})}Object.defineProperties(t4.prototype,{scene:{get:function(){return this._scene}},performanceContainer:{get:function(){return this._performanceContainer}},toggleDropDown:{get:function(){return this._toggleDropDown}},showPrimitiveBoundingSphere:{get:function(){return this._showPrimitiveBoundingSphere}},showPrimitiveReferenceFrame:{get:function(){return this._showPrimitiveReferenceFrame}},doFilterPrimitive:{get:function(){return this._doFilterPrimitive}},incrementDepthFrustum:{get:function(){return this._incrementDepthFrustum}},decrementDepthFrustum:{get:function(){return this._decrementDepthFrustum}},showTileCoordinates:{get:function(){return this._showTileCoordinates}},showTileBoundingSphere:{get:function(){return this._showTileBoundingSphere}},doFilterTile:{get:function(){return this._doFilterTile}},toggleGeneral:{get:function(){return this._toggleGeneral}},togglePrimitives:{get:function(){return this._togglePrimitives}},toggleTerrain:{get:function(){return this._toggleTerrain}},pickPrimitive:{get:function(){return this._pickPrimitive}},pickTile:{get:function(){return this._pickTile}},selectParent:{get:function(){let e=this;return In(function(){e.tile=e.tile.parent})}},selectNW:{get:function(){let e=this;return In(function(){e.tile=e.tile.northwestChild})}},selectNE:{get:function(){let e=this;return In(function(){e.tile=e.tile.northeastChild})}},selectSW:{get:function(){let e=this;return In(function(){e.tile=e.tile.southwestChild})}},selectSE:{get:function(){let e=this;return In(function(){e.tile=e.tile.southeastChild})}},primitive:{get:function(){return this._primitive},set:function(e){let t=this._primitive;e!==t&&(this.hasPickedPrimitive=!0,l(t)&&(t.debugShowBoundingVolume=!1),this._scene.debugCommandFilter=void 0,l(this._modelMatrixPrimitive)&&(this._scene.primitives.remove(this._modelMatrixPrimitive),this._modelMatrixPrimitive=void 0),this._primitive=e,e.show=!1,setTimeout(function(){e.show=!0},50),this.showPrimitiveBoundingSphere(),this.showPrimitiveReferenceFrame(),this.doFilterPrimitive())}},tile:{get:function(){return this._tile},set:function(e){if(l(e)){this.hasPickedTile=!0;let t=this._tile;if(e!==t){this.tileText=`L: ${e.level} X: ${e.x} Y: ${e.y}`,this.tileText+=`<br>SW corner: ${e.rectangle.west}, ${e.rectangle.south}`,this.tileText+=`<br>NE corner: ${e.rectangle.east}, ${e.rectangle.north}`;let n=e.data;l(n)&&l(n.tileBoundingRegion)?this.tileText+=`<br>Min: ${n.tileBoundingRegion.minimumHeight} Max: ${n.tileBoundingRegion.maximumHeight}`:this.tileText+="<br>(Tile is not loaded)"}this._tile=e,this.showTileBoundingSphere(),this.doFilterTile()}else this.hasPickedTile=!1,this._tile=void 0}}});t4.prototype._update=function(){this.frustums&&(this.frustumStatisticText=p3t(this._scene.debugFrustumStatistics));let e=this._scene.numberOfFrustums;this._numberOfFrustums=e,this.depthFrustum=mre(1,e,this.depthFrustum),this.depthFrustumText=`${this.depthFrustum} of ${e}`,this.performance&&this._performanceDisplay.update(),this.primitiveReferenceFrame&&(this._modelMatrixPrimitive.modelMatrix=this._primitive.modelMatrix),this.shaderCacheText=`Cached shaders: ${this._scene.context.shaderCache.numberOfShaders}`};t4.prototype.isDestroyed=function(){return!1};t4.prototype.destroy=function(){return this._eventHandler.destroy(),this._removePostRenderEvent(),this._frustumsSubscription.dispose(),this._frustumPlanesSubscription.dispose(),this._performanceSubscription.dispose(),this._primitiveBoundingSphereSubscription.dispose(),this._primitiveReferenceFrameSubscription.dispose(),this._filterPrimitiveSubscription.dispose(),this._wireframeSubscription.dispose(),this._depthFrustumSubscription.dispose(),this._suspendUpdatesSubscription.dispose(),this._tileCoordinatesSubscription.dispose(),this._tileBoundingSphereSubscription.dispose(),this._filterTileSubscription.dispose(),this._pickPrimitiveActiveSubscription.dispose(),this._pickTileActiveSubscription.dispose(),fe(this)};var n4=t4;function O9(e,t){e=On(e);let n=document.createElement("div"),i=new n4(t,n);this._viewModel=i,this._container=e;let o=document.createElement("div");this._element=o;let r=document.createElement("div");r.textContent="Cesium Inspector",r.className="cesium-cesiumInspector-button",r.setAttribute("data-bind","click: toggleDropDown"),o.appendChild(r),o.className="cesium-cesiumInspector",o.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : dropDownVisible, "cesium-cesiumInspector-hidden" : !dropDownVisible }'),e.appendChild(this._element);let a=document.createElement("div");a.className="cesium-cesiumInspector-dropDown",o.appendChild(a);let s=sf.createSection,c=sf.createCheckbox,u=s(a,"General","generalVisible","toggleGeneral"),f=c("Show Frustums","frustums"),d=document.createElement("div");d.className="cesium-cesiumInspector-frustumStatistics",d.setAttribute("data-bind","visible: frustums, html: frustumStatisticText"),f.appendChild(d),u.appendChild(f),u.appendChild(c("Show Frustum Planes","frustumPlanes")),u.appendChild(c("Performance Display","performance")),n.className="cesium-cesiumInspector-performanceDisplay",u.appendChild(n);let p=document.createElement("div");p.className="cesium-cesiumInspector-shaderCache",p.setAttribute("data-bind","html: shaderCacheText"),u.appendChild(p);let g=document.createElement("div");u.appendChild(g);let m=document.createElement("span");m.setAttribute("data-bind",'html: " Frustum:"'),g.appendChild(m);let A=document.createElement("span");A.setAttribute("data-bind","text: depthFrustumText"),g.appendChild(A);let y=document.createElement("input");y.type="button",y.value="-",y.className="cesium-cesiumInspector-pickButton",y.setAttribute("data-bind","click: decrementDepthFrustum"),g.appendChild(y);let x=document.createElement("input");x.type="button",x.value="+",x.className="cesium-cesiumInspector-pickButton",x.setAttribute("data-bind","click: incrementDepthFrustum"),g.appendChild(x);let b=s(a,"Primitives","primitivesVisible","togglePrimitives"),C=document.createElement("div");C.className="cesium-cesiumInspector-pickSection",b.appendChild(C);let E=document.createElement("input");E.type="button",E.value="Pick a primitive",E.className="cesium-cesiumInspector-pickButton",E.setAttribute("data-bind",'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickPrimitiveActive}, click: pickPrimitive');let S=document.createElement("div");S.className="cesium-cesiumInspector-center",S.appendChild(E),C.appendChild(S),C.appendChild(c("Show bounding sphere","primitiveBoundingSphere","hasPickedPrimitive")),C.appendChild(c("Show reference frame","primitiveReferenceFrame","hasPickedPrimitive")),this._primitiveOnly=c("Show only selected","filterPrimitive","hasPickedPrimitive"),C.appendChild(this._primitiveOnly);let w=s(a,"Terrain","terrainVisible","toggleTerrain"),P=document.createElement("div");P.className="cesium-cesiumInspector-pickSection",w.appendChild(P);let R=document.createElement("input");R.type="button",R.value="Pick a tile",R.className="cesium-cesiumInspector-pickButton",R.setAttribute("data-bind",'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickTileActive}, click: pickTile'),S=document.createElement("div"),S.appendChild(R),S.className="cesium-cesiumInspector-center",P.appendChild(S);let B=document.createElement("div");P.appendChild(B);let L=document.createElement("input");L.type="button",L.value="Parent",L.className="cesium-cesiumInspector-pickButton",L.setAttribute("data-bind","click: selectParent");let _=document.createElement("input");_.type="button",_.value="NW",_.className="cesium-cesiumInspector-pickButton",_.setAttribute("data-bind","click: selectNW");let T=document.createElement("input");T.type="button",T.value="NE",T.className="cesium-cesiumInspector-pickButton",T.setAttribute("data-bind","click: selectNE");let v=document.createElement("input");v.type="button",v.value="SW",v.className="cesium-cesiumInspector-pickButton",v.setAttribute("data-bind","click: selectSW");let I=document.createElement("input");I.type="button",I.value="SE",I.className="cesium-cesiumInspector-pickButton",I.setAttribute("data-bind","click: selectSE");let O=document.createElement("div");O.className="cesium-cesiumInspector-tileText",B.className="cesium-cesiumInspector-frustumStatistics",B.appendChild(O),B.setAttribute("data-bind","visible: hasPickedTile"),O.setAttribute("data-bind","html: tileText");let N=document.createElement("div");N.className="cesium-cesiumInspector-relativeText",N.textContent="Select relative:",B.appendChild(N);let j=document.createElement("table"),k=document.createElement("tr"),U=document.createElement("tr"),F=document.createElement("td");F.appendChild(L);let H=document.createElement("td");H.appendChild(_);let q=document.createElement("td");q.appendChild(T),k.appendChild(F),k.appendChild(H),k.appendChild(q);let J=document.createElement("td"),W=document.createElement("td");W.appendChild(v);let Z=document.createElement("td");Z.appendChild(I),U.appendChild(J),U.appendChild(W),U.appendChild(Z),j.appendChild(k),j.appendChild(U),B.appendChild(j),P.appendChild(c("Show bounding volume","tileBoundingSphere","hasPickedTile")),P.appendChild(c("Show only selected","filterTile","hasPickedTile")),w.appendChild(c("Wireframe","wireframe")),w.appendChild(c("Suspend LOD update","suspendUpdates")),w.appendChild(c("Show tile coordinates","tileCoordinates")),ve.applyBindings(i,this._element)}Object.defineProperties(O9.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});O9.prototype.isDestroyed=function(){return!1};O9.prototype.destroy=function(){return ve.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),fe(this)};var i4=O9;function M9(e,t){l(t)||(t=document.body),t=On(t);let n=this,i=ve.observable(Xr.fullscreen),o=ve.observable(Xr.enabled),r=t.ownerDocument;this.isFullscreen=void 0,ve.defineProperty(this,"isFullscreen",{get:function(){return i()}}),this.isFullscreenEnabled=void 0,ve.defineProperty(this,"isFullscreenEnabled",{get:function(){return o()},set:function(a){o(a&&Xr.enabled)}}),this.tooltip=void 0,ve.defineProperty(this,"tooltip",function(){return this.isFullscreenEnabled?i()?"Exit full screen":"Full screen":"Full screen unavailable"}),this._command=In(function(){Xr.fullscreen?Xr.exitFullscreen():Xr.requestFullscreen(n._fullscreenElement)},ve.getObservable(this,"isFullscreenEnabled")),this._fullscreenElement=On(e)??r.body,this._callback=function(){i(Xr.fullscreen)},r.addEventListener(Xr.changeEventName,this._callback)}Object.defineProperties(M9.prototype,{fullscreenElement:{get:function(){return this._fullscreenElement},set:function(e){this._fullscreenElement=e}},command:{get:function(){return this._command}}});M9.prototype.isDestroyed=function(){return!1};M9.prototype.destroy=function(){document.removeEventListener(Xr.changeEventName,this._callback),fe(this)};var o4=M9;var A3t="M 83.96875 17.5625 L 83.96875 17.59375 L 76.65625 24.875 L 97.09375 24.96875 L 76.09375 45.96875 L 81.9375 51.8125 L 102.78125 30.9375 L 102.875 51.15625 L 110.15625 43.875 L 110.1875 17.59375 L 83.96875 17.5625 z M 44.125 17.59375 L 17.90625 17.625 L 17.9375 43.90625 L 25.21875 51.1875 L 25.3125 30.96875 L 46.15625 51.8125 L 52 45.96875 L 31 25 L 51.4375 24.90625 L 44.125 17.59375 z M 46.0625 76.03125 L 25.1875 96.875 L 25.09375 76.65625 L 17.8125 83.9375 L 17.8125 110.21875 L 44 110.25 L 51.3125 102.9375 L 30.90625 102.84375 L 51.875 81.875 L 46.0625 76.03125 z M 82 76.15625 L 76.15625 82 L 97.15625 103 L 76.71875 103.0625 L 84.03125 110.375 L 110.25 110.34375 L 110.21875 84.0625 L 102.9375 76.8125 L 102.84375 97 L 82 76.15625 z",y3t="M 104.34375 17.5625 L 83.5 38.4375 L 83.40625 18.21875 L 76.125 25.5 L 76.09375 51.78125 L 102.3125 51.8125 L 102.3125 51.78125 L 109.625 44.5 L 89.1875 44.40625 L 110.1875 23.40625 L 104.34375 17.5625 z M 23.75 17.59375 L 17.90625 23.4375 L 38.90625 44.4375 L 18.5 44.53125 L 25.78125 51.8125 L 52 51.78125 L 51.96875 25.53125 L 44.6875 18.25 L 44.625 38.46875 L 23.75 17.59375 z M 25.6875 76.03125 L 18.375 83.3125 L 38.78125 83.40625 L 17.8125 104.40625 L 23.625 110.25 L 44.5 89.375 L 44.59375 109.59375 L 51.875 102.3125 L 51.875 76.0625 L 25.6875 76.03125 z M 102.375 76.15625 L 76.15625 76.1875 L 76.1875 102.4375 L 83.46875 109.71875 L 83.5625 89.53125 L 104.40625 110.375 L 110.25 104.53125 L 89.25 83.53125 L 109.6875 83.46875 L 102.375 76.15625 z";function B9(e,t){e=On(e);let n=new o4(t,e);n._exitFullScreenPath=y3t,n._enterFullScreenPath=A3t;let i=document.createElement("button");i.type="button",i.className="cesium-button cesium-fullscreenButton",i.setAttribute("data-bind","attr: { title: tooltip },click: command,enable: isFullscreenEnabled,cesiumSvgPath: { path: isFullscreen ? _exitFullScreenPath : _enterFullScreenPath, width: 128, height: 128 }"),e.appendChild(i),ve.applyBindings(n,i),this._container=e,this._viewModel=n,this._element=i}Object.defineProperties(B9.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});B9.prototype.isDestroyed=function(){return!1};B9.prototype.destroy=function(){return this._viewModel.destroy(),ve.cleanNode(this._element),this._container.removeChild(this._element),fe(this)};var r4=B9;var $Oe=1e3;function yh(e){l(e.geocoderServices)?this._geocoderServices=e.geocoderServices:this._geocoderServices=[new ZT({scene:e.scene})],this._viewContainer=e.container,this._scene=e.scene,this._flightDuration=e.flightDuration,this._searchText="",this._isSearchInProgress=!1,this._wasGeocodeCancelled=!1,this._previousCredits=[],this._complete=new ye,this._suggestions=[],this._selectedSuggestion=void 0,this._showSuggestions=!0,this._handleArrowDown=ZOe,this._handleArrowUp=JOe;let t=this;this._suggestionsVisible=ve.pureComputed(function(){let o=ve.getObservable(t,"_suggestions")().length>0,r=ve.getObservable(t,"_showSuggestions")();return o&&r}),this._searchCommand=In(function(i){if(i=i??ex.SEARCH,t._focusTextbox=!1,l(t._selectedSuggestion))return t.activateSuggestion(t._selectedSuggestion),!1;if(t.hideSuggestions(),t.isSearchInProgress)v3t(t);else return T3t(t,t._geocoderServices,i)}),this.deselectSuggestion=function(){t._selectedSuggestion=void 0},this.handleKeyDown=function(i,o){let r=o.key==="ArrowDown"||o.key==="Down"||o.keyCode===40,a=o.key==="ArrowUp"||o.key==="Up"||o.keyCode===38;return(r||a)&&o.preventDefault(),!0},this.handleKeyUp=function(i,o){let r=o.key==="ArrowDown"||o.key==="Down"||o.keyCode===40,a=o.key==="ArrowUp"||o.key==="Up"||o.keyCode===38,s=o.key==="Enter"||o.keyCode===13;return a?JOe(t):r?ZOe(t):s&&t._searchCommand(),!0},this.activateSuggestion=function(i){t.hideSuggestions(),t._searchText=i.displayName;let o=i.destination;nMe(t),t.destinationFound(t,o)},this.hideSuggestions=function(){t._showSuggestions=!1,t._selectedSuggestion=void 0},this.showSuggestions=function(){t._showSuggestions=!0},this.handleMouseover=function(i,o){i!==t._selectedSuggestion&&(t._selectedSuggestion=i)},this.keepExpanded=!1,this.autoComplete=e.autocomplete??!0,this.destinationFound=e.destinationFound??yh.flyToDestination,this._focusTextbox=!1,ve.track(this,["_searchText","_isSearchInProgress","keepExpanded","_suggestions","_selectedSuggestion","_showSuggestions","_focusTextbox"]);let n=ve.getObservable(this,"_searchText");n.extend({rateLimit:{timeout:500}}),this._suggestionSubscription=n.subscribe(function(){yh._updateSearchSuggestions(t)}),this.isSearchInProgress=void 0,ve.defineProperty(this,"isSearchInProgress",{get:function(){return this._isSearchInProgress}}),this.searchText=void 0,ve.defineProperty(this,"searchText",{get:function(){return this.isSearchInProgress?"Searching...":this._searchText},set:function(i){this._searchText=i}}),this.flightDuration=void 0,ve.defineProperty(this,"flightDuration",{get:function(){return this._flightDuration},set:function(i){this._flightDuration=i}})}Object.defineProperties(yh.prototype,{complete:{get:function(){return this._complete}},scene:{get:function(){return this._scene}},search:{get:function(){return this._searchCommand}},selectedSuggestion:{get:function(){return this._selectedSuggestion}},suggestions:{get:function(){return this._suggestions}}});yh.prototype.destroy=function(){this._suggestionSubscription.dispose()};function JOe(e){if(e._suggestions.length===0)return;let t=e._suggestions.indexOf(e._selectedSuggestion);if(t===-1||t===0){e._selectedSuggestion=void 0;return}let n=t-1;e._selectedSuggestion=e._suggestions[n],yh._adjustSuggestionsScroll(e,n)}function ZOe(e){if(e._suggestions.length===0)return;let t=e._suggestions.length,i=(e._suggestions.indexOf(e._selectedSuggestion)+1)%t;e._selectedSuggestion=e._suggestions[i],yh._adjustSuggestionsScroll(e,i)}function x3t(e,t){let n=l(t)?t.availability:void 0;return l(n)?iT(t,[e]).then(function(i){return e=i[0],e.height+=$Oe,e}):(e.height+=$Oe,Promise.resolve(e))}function b3t(e,t){let n=e._scene,i=n.ellipsoid,o=n.camera,r=n.terrainProvider,a=t,s;return t instanceof oe?D.equalsEpsilon(t.south,t.north,D.EPSILON7)&&D.equalsEpsilon(t.east,t.west,D.EPSILON7)?t=oe.center(t):s=oT(t,n):t=i.cartesianToCartographic(t),l(s)||(s=x3t(t,r)),s.then(function(c){a=i.cartographicToCartesian(c)}).finally(function(){o.flyTo({destination:a,complete:function(){e._complete.raiseEvent()},duration:e._flightDuration,endTransform:M.IDENTITY})})}async function C3t(e,t,n){try{return{state:"fulfilled",value:await e.geocode(t,n),credits:e.credit}}catch(i){return{state:"rejected",reason:i}}}async function T3t(e,t,n){let i=e._searchText;if(tMe(i)){e.showSuggestions();return}e._isSearchInProgress=!0,e._wasGeocodeCancelled=!1;let o,r;for(o=0;o<t.length;o++){if(e._wasGeocodeCancelled)return;if(r=await C3t(t[o],i,n),l(r)&&r.state==="fulfilled"&&r.value.length>0)break}if(e._wasGeocodeCancelled)return;e._isSearchInProgress=!1,gre(e);let a=r.value;if(r.state==="fulfilled"&&l(a)&&a.length>0){e._searchText=a[0].displayName,e.destinationFound(e,a[0].destination);let s=eMe(e,kI.getCreditsFromResult(a[0]));l(s)||pre(e,t[o].credit);return}e._searchText=`${i} (not found)`}function pre(e,t){l(t)&&!e._scene.isDestroyed()&&!e._scene.frameState.creditDisplay.isDestroyed()&&(e._scene.frameState.creditDisplay.addStaticCredit(t),e._previousCredits.push(t))}function eMe(e,t){return l(t)&&t.forEach(n=>pre(e,n)),t}function gre(e){!e._scene.isDestroyed()&&!e._scene.frameState.creditDisplay.isDestroyed()&&e._previousCredits.forEach(t=>{e._scene.frameState.creditDisplay.removeStaticCredit(t)}),e._previousCredits.length=0}function E3t(e,t){let n=On(e._viewContainer),i=n.getElementsByClassName("search-results")[0],r=n.getElementsByTagName("li")[t];if(t===0){i.scrollTop=0;return}let a=r.offsetTop;a+r.clientHeight>i.clientHeight?i.scrollTop=a+r.clientHeight:a<i.scrollTop&&(i.scrollTop=a)}function v3t(e){e._isSearchInProgress&&(e._isSearchInProgress=!1,e._wasGeocodeCancelled=!0)}function tMe(e){return/^\s*$/.test(e)}function nMe(e){ve.getObservable(e,"_suggestions").removeAll()}async function S3t(e){if(!e.autoComplete)return;let t=e._searchText;if(nMe(e),gre(e),!tMe(t))for(let n of e._geocoderServices){let i=await n.geocode(t,ex.AUTOCOMPLETE);if(e._suggestions=e._suggestions.concat(i),i.length>0){let o=!0;i.forEach(r=>{let a=kI.getCreditsFromResult(r);o=o&&!l(a),eMe(e,a)}),o&&pre(e,n.credit)}if(e._suggestions.length>=5)return}}yh.flyToDestination=b3t;yh._updateSearchSuggestions=S3t;yh._adjustSuggestionsScroll=E3t;yh.prototype.isDestroyed=function(){return!1};yh.prototype.destroy=function(){return gre(this),fe(this)};var a4=yh;var w3t="M29.772,26.433l-7.126-7.126c0.96-1.583,1.523-3.435,1.524-5.421C24.169,8.093,19.478,3.401,13.688,3.399C7.897,3.401,3.204,8.093,3.204,13.885c0,5.789,4.693,10.481,10.484,10.481c1.987,0,3.839-0.563,5.422-1.523l7.128,7.127L29.772,26.433zM7.203,13.885c0.006-3.582,2.903-6.478,6.484-6.486c3.579,0.008,6.478,2.904,6.484,6.486c-0.007,3.58-2.905,6.476-6.484,6.484C10.106,20.361,7.209,17.465,7.203,13.885z",I3t="M24.778,21.419 19.276,15.917 24.777,10.415 21.949,7.585 16.447,13.087 10.945,7.585 8.117,10.415 13.618,15.917 8.116,21.419 10.946,24.248 16.447,18.746 21.948,24.248z";function L9(e){let t=On(e.container),n=new a4(e);n._startSearchPath=w3t,n._stopSearchPath=I3t;let i=document.createElement("form");i.setAttribute("data-bind","submit: search");let o=document.createElement("input");o.type="search",o.className="cesium-geocoder-input",o.setAttribute("placeholder","Enter an address or landmark..."),o.setAttribute("data-bind",'textInput: searchText,disable: isSearchInProgress,event: { keyup: handleKeyUp, keydown: handleKeyDown, mouseover: deselectSuggestion },css: { "cesium-geocoder-input-wide" : keepExpanded || searchText.length > 0 },hasFocus: _focusTextbox'),this._onTextBoxFocus=function(){setTimeout(function(){o.select()},0)},o.addEventListener("focus",this._onTextBoxFocus,!1),i.appendChild(o),this._textBox=o;let r=document.createElement("span");r.className="cesium-geocoder-searchButton",r.setAttribute("data-bind","click: search,cesiumSvgPath: { path: isSearchInProgress ? _stopSearchPath : _startSearchPath, width: 32, height: 32 }"),i.appendChild(r),t.appendChild(i);let a=document.createElement("div");a.className="search-results",a.setAttribute("data-bind","visible: _suggestionsVisible");let s=document.createElement("ul");s.setAttribute("data-bind","foreach: _suggestions");let c=document.createElement("li");s.appendChild(c),c.setAttribute("data-bind","text: $data.displayName, click: $parent.activateSuggestion, event: { mouseover: $parent.handleMouseover}, css: { active: $data === $parent._selectedSuggestion }"),a.appendChild(s),t.appendChild(a),ve.applyBindings(n,i),ve.applyBindings(n,a),this._container=t,this._searchSuggestionsContainer=a,this._viewModel=n,this._form=i,this._onInputBegin=function(u){let f=u.target;typeof u.composedPath=="function"&&(f=u.composedPath()[0]),t.contains(f)||(n._focusTextbox=!1,n.hideSuggestions())},this._onInputEnd=function(u){n._focusTextbox=!0,n.showSuggestions()},sn.supportsPointerEvents()?(document.addEventListener("pointerdown",this._onInputBegin,!0),t.addEventListener("pointerup",this._onInputEnd,!0),t.addEventListener("pointercancel",this._onInputEnd,!0)):(document.addEventListener("mousedown",this._onInputBegin,!0),t.addEventListener("mouseup",this._onInputEnd,!0),document.addEventListener("touchstart",this._onInputBegin,!0),t.addEventListener("touchend",this._onInputEnd,!0),t.addEventListener("touchcancel",this._onInputEnd,!0))}Object.defineProperties(L9.prototype,{container:{get:function(){return this._container}},searchSuggestionsContainer:{get:function(){return this._searchSuggestionsContainer}},viewModel:{get:function(){return this._viewModel}}});L9.prototype.isDestroyed=function(){return!1};L9.prototype.destroy=function(){let e=this._container;return sn.supportsPointerEvents()?(document.removeEventListener("pointerdown",this._onInputBegin,!0),e.removeEventListener("pointerup",this._onInputEnd,!0)):(document.removeEventListener("mousedown",this._onInputBegin,!0),e.removeEventListener("mouseup",this._onInputEnd,!0),document.removeEventListener("touchstart",this._onInputBegin,!0),e.removeEventListener("touchend",this._onInputEnd,!0)),this._viewModel.destroy(),ve.cleanNode(this._form),ve.cleanNode(this._searchSuggestionsContainer),e.removeChild(this._form),e.removeChild(this._searchSuggestionsContainer),this._textBox.removeEventListener("focus",this._onTextBoxFocus,!1),fe(this)};var s4=L9;function iMe(e,t){this._scene=e,this._duration=t;let n=this;this._command=In(function(){n._scene.camera.flyHome(n._duration)}),this.tooltip="View Home",ve.track(this,["tooltip"])}Object.defineProperties(iMe.prototype,{scene:{get:function(){return this._scene}},command:{get:function(){return this._command}},duration:{get:function(){return this._duration},set:function(e){this._duration=e}}});var c4=iMe;function N9(e,t,n){e=On(e);let i=new c4(t,n);i._svgPath="M14,4l-10,8.75h20l-4.25-3.7188v-4.6562h-2.812v2.1875l-2.938-2.5625zm-7.0938,9.906v10.094h14.094v-10.094h-14.094zm2.1876,2.313h3.3122v4.25h-3.3122v-4.25zm5.8442,1.281h3.406v6.438h-3.406v-6.438z";let o=document.createElement("button");o.type="button",o.className="cesium-button cesium-toolbar-button cesium-home-button",o.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 28, height: 28 }"),e.appendChild(o),ve.applyBindings(i,o),this._container=e,this._viewModel=i,this._element=o}Object.defineProperties(N9.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});N9.prototype.isDestroyed=function(){return!1};N9.prototype.destroy=function(){return ve.cleanNode(this._element),this._container.removeChild(this._element),fe(this)};var l4=N9;function D3t(e,t){t.currentTarget.parentElement.parentElement.querySelector(`#${e.name}-expander`).classList.toggle("active"),t.currentTarget.textContent=t.currentTarget.textContent==="+"?"-":"+"}function rMe(e,t){ve.track(e);for(let n=0;n<e.sublayers.length;n++)rMe(e.sublayers[n],t)}function F9(e){return e.modelName==="FullModel"}function aMe(e){return e.modelName==="Overview"}function sMe(e){return aMe(e)||F9(e)}function oMe(e,t){if(sMe(e)){e.visibility=!1;for(let i=0;i<e.sublayers.length;i++)e.sublayers[i].visibility=!0;let n={name:e.name,modelName:e.modelName,disable:ve.observable(!1),index:t.sublayers.length};return t.topLayers.push(n),t.sublayers.push(e),n}}function P3t(e,t){if(sMe(e)){t.sublayers.forEach(i=>i.visibility=!1),t.sublayers[e.index].visibility=!0;let n=document.getElementById("bsl-wrapper");F9(e)?(t.currentLevel=t.selectedLevel,n.style.display="block"):(t.selectedLevel=t.currentLevel,t.currentLevel="All",n.style.display="none")}}async function R3t(e,t){try{let n=e.getAttributeNames();for(let i=0;i<n.length;i++)if(n[i]==="BldgLevel"){let o=e.getAttributeValues(n[i]);for(let r=0;r<o.length;r++)t.push(o[r])}t.sort((i,o)=>i-o),t.unshift("All")}catch(n){console.log(`There was an error getting attributes: ${n}`)}}function O3t(e){let t=this;this.levels=[],this.viewModel={sublayers:[],levels:this.levels,currentLevel:ve.observable(),selectedLevel:"All",topLayers:[{name:"Select a layer to explore...",disable:ve.observable(!0),index:-1}],currentLayer:ve.observable(),expandClickHandler:D3t,setOptionDisable:function(i,o){ve.applyBindingsToNode(i,{disable:o.disable},o)},defaultLayer:void 0},this.viewModel.currentLayer.subscribe(function(i){P3t(i,t.viewModel)});let n=e.sublayers;for(let i=0;i<n.length;i++){rMe(n[i],this.viewModel);let o=oMe(n[i],this.viewModel);l(o)&&(aMe(o)||!l(this.viewModel.defaultLayer)&&F9(o))&&(this.viewModel.defaultLayer=o)}if(this.viewModel.topLayers.length===1&&n.length>0){e.show=!1;let i={name:"Full Model",modelName:"FullModel",visibility:e.show,sublayers:e.sublayers};this.viewModel.defaultLayer=oMe(i,this.viewModel),this.viewModel.currentLayer.subscribe(function(o){e.show=F9(o)})}else this.viewModel.topLayers.length===1&&(this.viewModel.topLayers[0].name="Building layers not found");return R3t(e,this.levels),this.viewModel.currentLevel.subscribe(function(i){i!=="All"?e.filterByAttributes([{name:"BldgLevel",values:[i]}]):e.filterByAttributes()}),this.viewModel}var u4=O3t;function M3t(e,t){let n=document.getElementById(e),i=document.createElement("div");i.classList.add("cesium-viewer-i3s-explorer"),i.innerHTML=`
- <h3>Building explorer</h3>
- <select
- data-bind="options: topLayers, optionsText: 'name', optionsAfterRender: setOptionDisable, value: currentLayer"
- ></select>
- <div id="bsl-wrapper">
- <h3>Select Level</h3>
- <select data-bind="options: levels, value: currentLevel"></select>
- <h3>Disciplines & Categories</h3>
- <ul class="layersList" data-bind="foreach: sublayers">
- <ul class="layersList" data-bind="foreach: sublayers.sort(function (l, r) { return l.name.localeCompare(r.name) })">
- <li>
- <div class="li-wrapper">
- <span
- class="expandItem"
- data-bind="click: $root.expandClickHandler"
- >+</span
- >
- <input
- type="checkbox"
- data-bind="checked: visibility, valueUpdate: 'input', attr: { id: name}"
- />
- <label data-bind="attr: { for: name}">
- <span data-bind="text: name"></span>
- </label>
- </div>
- <ul class="nested" data-bind="attr: { id: name + '-expander'}">
- <li data-bind="foreach: sublayers.sort(function (l, r) { return l.name.localeCompare(r.name) })">
- <div class="li-wrapper">
- <input
- type="checkbox"
- data-bind="checked: visibility, valueUpdate: 'input', attr: { id: name}"
- />
- <label data-bind="attr: { for: name}">
- <span data-bind="text: name"></span>
- </label>
- </div>
- </li>
- </ul>
- </li>
- </ul>
- </ul>
- </div>`,n.appendChild(i);let o=new u4(t);ve.track(o),ve.applyBindings(o,n),l(o.defaultLayer)&&(o.currentLayer=o.defaultLayer)}var _re=M3t;var B3t="M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4853444 22.104033 11.423165 24.0625 13.84375 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 8.975298 28.305952 7.03125 25.875 7.03125 L 13.84375 7.03125 z",L3t="M 27.34375 1.65625 L 5.28125 27.9375 L 8.09375 30.3125 L 30.15625 4.03125 L 27.34375 1.65625 z M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4724893 20.232036 9.5676108 20.7379 9.75 21.21875 L 21.65625 7.03125 L 13.84375 7.03125 z M 28.21875 7.71875 L 14.53125 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 9.8371439 29.456025 8.4902779 28.21875 7.71875 z";function Are(){this._cameraClicked=new ye,this._closeClicked=new ye,this.maxHeight=500,this.enableCamera=!1,this.isCameraTracking=!1,this.showInfo=!1,this.titleText="",this.description="",ve.track(this,["showInfo","titleText","description","maxHeight","enableCamera","isCameraTracking"]),this._loadingIndicatorHtml='<div class="cesium-infoBox-loadingContainer"><span class="cesium-infoBox-loading"></span></div>',this.cameraIconPath=void 0,ve.defineProperty(this,"cameraIconPath",{get:function(){return!this.enableCamera||this.isCameraTracking?L3t:B3t}}),ve.defineProperty(this,"_bodyless",{get:function(){return!l(this.description)||this.description.length===0}})}Are.prototype.maxHeightOffset=function(e){return`${this.maxHeight-e}px`};Object.defineProperties(Are.prototype,{cameraClicked:{get:function(){return this._cameraClicked}},closeClicked:{get:function(){return this._closeClicked}}});var f4=Are;function k9(e){e=On(e);let t=document.createElement("div");t.className="cesium-infoBox",t.setAttribute("data-bind",'css: { "cesium-infoBox-visible" : showInfo, "cesium-infoBox-bodyless" : _bodyless }'),e.appendChild(t);let n=document.createElement("div");n.className="cesium-infoBox-title",n.setAttribute("data-bind","text: titleText"),t.appendChild(n);let i=document.createElement("button");i.type="button",i.className="cesium-button cesium-infoBox-camera",i.setAttribute("data-bind",'attr: { title: "Focus camera on object" },click: function () { cameraClicked.raiseEvent(this); },enable: enableCamera,cesiumSvgPath: { path: cameraIconPath, width: 32, height: 32 }'),t.appendChild(i);let o=document.createElement("button");o.type="button",o.className="cesium-infoBox-close",o.setAttribute("data-bind","click: function () { closeClicked.raiseEvent(this); }"),o.innerHTML="×",t.appendChild(o);let r=document.createElement("iframe");r.className="cesium-infoBox-iframe",r.setAttribute("sandbox","allow-same-origin allow-popups allow-forms"),r.setAttribute("data-bind","style : { maxHeight : maxHeightOffset(40) }"),r.setAttribute("allowfullscreen",!0),t.appendChild(r);let a=new f4;ve.applyBindings(a,t),this._container=e,this._element=t,this._frame=r,this._viewModel=a,this._descriptionSubscription=void 0;let s=this;r.addEventListener("load",function(){let c=r.contentDocument,u=c.createElement("link");u.href=Xt("Widgets/InfoBox/InfoBoxDescription.css"),u.rel="stylesheet",u.type="text/css";let f=c.createElement("div");f.className="cesium-infoBox-description",c.head.appendChild(u),c.body.appendChild(f),s._descriptionSubscription=yc(a,"description",function(d){r.style.height="5px",f.innerHTML=d;let p=null,g=f.firstElementChild;if(g!==null&&f.childNodes.length===1){let A=window.getComputedStyle(g);if(A!==null){let y=A["background-color"],x=V.fromCssColorString(y);l(x)&&x.alpha!==0&&(p=A["background-color"])}}t.style["background-color"]=p;let m=f.getBoundingClientRect().height;r.style.height=`${m}px`})}),r.setAttribute("src","about:blank")}Object.defineProperties(k9.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}},frame:{get:function(){return this._frame}}});k9.prototype.isDestroyed=function(){return!1};k9.prototype.destroy=function(){let e=this._container;return ve.cleanNode(this._element),e.removeChild(this._element),l(this._descriptionSubscription)&&this._descriptionSubscription.dispose(),fe(this)};var d4=k9;function cMe(){this.showInstructions=!1;let e=this;this._command=In(function(){e.showInstructions=!e.showInstructions}),this._showClick=In(function(){e._touch=!1}),this._showTouch=In(function(){e._touch=!0}),this._touch=!1,this.tooltip="Navigation Instructions",ve.track(this,["tooltip","showInstructions","_touch"])}Object.defineProperties(cMe.prototype,{command:{get:function(){return this._command}},showClick:{get:function(){return this._showClick}},showTouch:{get:function(){return this._showTouch}}});var h4=cMe;function z9(e){let t=On(e.container),n=new h4,i=e.instructionsInitiallyVisible??!1;n.showInstructions=i,n._svgPath="M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466z M17.328,24.371h-2.707v-2.596h2.707V24.371zM17.328,19.003v0.858h-2.707v-1.057c0-3.19,3.63-3.696,3.63-5.963c0-1.034-0.924-1.826-2.134-1.826c-1.254,0-2.354,0.924-2.354,0.924l-1.541-1.915c0,0,1.519-1.584,4.137-1.584c2.487,0,4.796,1.54,4.796,4.136C21.156,16.208,17.328,16.627,17.328,19.003z";let o=document.createElement("span");o.className="cesium-navigationHelpButton-wrapper",t.appendChild(o);let r=document.createElement("button");r.type="button",r.className="cesium-button cesium-toolbar-button cesium-navigation-help-button",r.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }"),o.appendChild(r);let a=document.createElement("div");a.className="cesium-navigation-help",a.setAttribute("data-bind",'css: { "cesium-navigation-help-visible" : showInstructions}'),o.appendChild(a);let s=document.createElement("button");s.type="button",s.className="cesium-navigation-button cesium-navigation-button-left",s.setAttribute("data-bind",'click: showClick, css: {"cesium-navigation-button-selected": !_touch, "cesium-navigation-button-unselected": _touch}');let c=document.createElement("img");c.src=Xt("Widgets/Images/NavigationHelp/Mouse.svg"),c.className="cesium-navigation-button-icon",c.style.width="25px",c.style.height="25px",s.appendChild(c),s.appendChild(document.createTextNode("Mouse"));let u=document.createElement("button");u.type="button",u.className="cesium-navigation-button cesium-navigation-button-right",u.setAttribute("data-bind",'click: showTouch, css: {"cesium-navigation-button-selected": _touch, "cesium-navigation-button-unselected": !_touch}');let f=document.createElement("img");f.src=Xt("Widgets/Images/NavigationHelp/Touch.svg"),f.className="cesium-navigation-button-icon",f.style.width="25px",f.style.height="25px",u.appendChild(f),u.appendChild(document.createTextNode("Touch")),a.appendChild(s),a.appendChild(u);let d=document.createElement("div");d.className="cesium-click-navigation-help cesium-navigation-help-instructions",d.setAttribute("data-bind",'css: { "cesium-click-navigation-help-visible" : !_touch}'),d.innerHTML=` <table> <tr> <td><img src="${Xt("Widgets/Images/NavigationHelp/MouseLeft.svg")}" width="48" height="48" /></td> <td> <div class="cesium-navigation-help-pan">Pan view</div> <div class="cesium-navigation-help-details">Left click + drag</div> </td> </tr> <tr> <td><img src="${Xt("Widgets/Images/NavigationHelp/MouseRight.svg")}" width="48" height="48" /></td> <td> <div class="cesium-navigation-help-zoom">Zoom view</div> <div class="cesium-navigation-help-details">Right click + drag, or</div> <div class="cesium-navigation-help-details">Mouse wheel scroll</div> </td> </tr> <tr> <td><img src="${Xt("Widgets/Images/NavigationHelp/MouseMiddle.svg")}" width="48" height="48" /></td> <td> <div class="cesium-navigation-help-rotate">Rotate view</div> <div class="cesium-navigation-help-details">Middle click + drag, or</div> <div class="cesium-navigation-help-details">CTRL + Left/Right click + drag</div> </td> </tr> </table>`,a.appendChild(d);let p=document.createElement("div");p.className="cesium-touch-navigation-help cesium-navigation-help-instructions",p.setAttribute("data-bind",'css: { "cesium-touch-navigation-help-visible" : _touch}'),p.innerHTML=` <table> <tr> <td><img src="${Xt("Widgets/Images/NavigationHelp/TouchDrag.svg")}" width="70" height="48" /></td> <td> <div class="cesium-navigation-help-pan">Pan view</div> <div class="cesium-navigation-help-details">One finger drag</div> </td> </tr> <tr> <td><img src="${Xt("Widgets/Images/NavigationHelp/TouchZoom.svg")}" width="70" height="48" /></td> <td> <div class="cesium-navigation-help-zoom">Zoom view</div> <div class="cesium-navigation-help-details">Two finger pinch</div> </td> </tr> <tr> <td><img src="${Xt("Widgets/Images/NavigationHelp/TouchTilt.svg")}" width="70" height="48" /></td> <td> <div class="cesium-navigation-help-rotate">Tilt view</div> <div class="cesium-navigation-help-details">Two finger drag, same direction</div> </td> </tr> <tr> <td><img src="${Xt("Widgets/Images/NavigationHelp/TouchRotate.svg")}" width="70" height="48" /></td> <td> <div class="cesium-navigation-help-tilt">Rotate view</div> <div class="cesium-navigation-help-details">Two finger drag, opposite direction</div> </td> </tr> </table>`,a.appendChild(p),ve.applyBindings(n,o),this._container=t,this._viewModel=n,this._wrapper=o,this._closeInstructions=function(g){o.contains(g.target)||(n.showInstructions=!1)},sn.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeInstructions,!0):(document.addEventListener("mousedown",this._closeInstructions,!0),document.addEventListener("touchstart",this._closeInstructions,!0))}Object.defineProperties(z9.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});z9.prototype.isDestroyed=function(){return!1};z9.prototype.destroy=function(){return sn.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeInstructions,!0):(document.removeEventListener("mousedown",this._closeInstructions,!0),document.removeEventListener("touchstart",this._closeInstructions,!0)),ve.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),fe(this)};var m4=z9;function yre(e){this._scene=e.scene,this.lowFrameRateMessage=e.lowFrameRateMessage??"This application appears to be performing poorly on your system. Please try using a different web browser or updating your video drivers.",this.lowFrameRateMessageDismissed=!1,this.showingLowFrameRateMessage=!1,ve.track(this,["lowFrameRateMessage","lowFrameRateMessageDismissed","showingLowFrameRateMessage"]);let t=this;this._dismissMessage=In(function(){t.showingLowFrameRateMessage=!1,t.lowFrameRateMessageDismissed=!0});let n=aV.fromScene(e.scene);this._unsubscribeLowFrameRate=n.lowFrameRate.addEventListener(function(){t.lowFrameRateMessageDismissed||(t.showingLowFrameRateMessage=!0)}),this._unsubscribeNominalFrameRate=n.nominalFrameRate.addEventListener(function(){t.showingLowFrameRateMessage=!1})}Object.defineProperties(yre.prototype,{scene:{get:function(){return this._scene}},dismissMessage:{get:function(){return this._dismissMessage}}});yre.prototype.destroy=function(){return this._unsubscribeLowFrameRate(),this._unsubscribeNominalFrameRate(),fe(this)};var p4=yre;function U9(e){let t=On(e.container),n=new p4(e),i=document.createElement("div");i.className="cesium-performance-watchdog-message-area",i.setAttribute("data-bind","visible: showingLowFrameRateMessage");let o=document.createElement("button");o.setAttribute("type","button"),o.className="cesium-performance-watchdog-message-dismiss",o.innerHTML="×",o.setAttribute("data-bind","click: dismissMessage"),i.appendChild(o);let r=document.createElement("div");r.className="cesium-performance-watchdog-message",r.setAttribute("data-bind","html: lowFrameRateMessage"),i.appendChild(r),t.appendChild(i),ve.applyBindings(n,i),this._container=t,this._viewModel=n,this._element=i}Object.defineProperties(U9.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});U9.prototype.isDestroyed=function(){return!1};U9.prototype.destroy=function(){return this._viewModel.destroy(),ve.cleanNode(this._element),this._container.removeChild(this._element),fe(this)};var g4=U9;function V9(e){this._scene=e,this._orthographic=e.camera.frustum instanceof fn,this._flightInProgress=!1,this.dropDownVisible=!1,this.tooltipPerspective="Perspective Projection",this.tooltipOrthographic="Orthographic Projection",this.selectedTooltip=void 0,this.sceneMode=e.mode,ve.track(this,["_orthographic","_flightInProgress","sceneMode","dropDownVisible","tooltipPerspective","tooltipOrthographic"]);let t=this;ve.defineProperty(this,"selectedTooltip",function(){return t._orthographic?t.tooltipOrthographic:t.tooltipPerspective}),this._toggleDropDown=In(function(){t.sceneMode===ie.SCENE2D||t._flightInProgress||(t.dropDownVisible=!t.dropDownVisible)}),this._eventHelper=new Nr,this._eventHelper.add(e.morphComplete,function(n,i,o,r){t.sceneMode=o,t._orthographic=o===ie.SCENE2D||t._scene.camera.frustum instanceof fn}),this._eventHelper.add(e.preRender,function(){t._flightInProgress=l(e.camera._currentFlight)}),this._switchToPerspective=In(function(){t.sceneMode!==ie.SCENE2D&&(t._scene.camera.switchToPerspectiveFrustum(),t._orthographic=!1,t.dropDownVisible=!1)}),this._switchToOrthographic=In(function(){t.sceneMode!==ie.SCENE2D&&(t._scene.camera.switchToOrthographicFrustum(),t._orthographic=!0,t.dropDownVisible=!1)}),this._sceneMode=ie}Object.defineProperties(V9.prototype,{scene:{get:function(){return this._scene}},toggleDropDown:{get:function(){return this._toggleDropDown}},switchToPerspective:{get:function(){return this._switchToPerspective}},switchToOrthographic:{get:function(){return this._switchToOrthographic}},isOrthographicProjection:{get:function(){return this._orthographic}}});V9.prototype.isDestroyed=function(){return!1};V9.prototype.destroy=function(){this._eventHelper.removeAll(),fe(this)};var _4=V9;var N3t="M 28.15625,10.4375 9.125,13.21875 13.75,43.25 41.75,55.09375 50.8125,37 54.5,11.9375 z m 0.125,3 19.976451,0.394265 L 43.03125,16.875 22.6875,14.28125 z M 50.971746,15.705477 47.90625,36.03125 42.53125,46 44.84375,19.3125 z M 12.625,16.03125 l 29.15625,3.6875 -2.65625,31 L 16.4375,41.125 z",F3t="m 31.560594,6.5254438 -20.75,12.4687502 0.1875,24.5625 22.28125,11.8125 19.5,-12 0.65625,-0.375 0,-0.75 0.0312,-23.21875 z m 0.0625,3.125 16.65625,9.5000002 -16.125,10.28125 -17.34375,-9.71875 z m 18.96875,11.1875002 0.15625,20.65625 -17.46875,10.59375 0.15625,-20.28125 z m -37.0625,1.25 17.21875,9.625 -0.15625,19.21875 -16.9375,-9 z";function j9(e,t){e=On(e);let n=new _4(t);n._perspectivePath=N3t,n._orthographicPath=F3t;let i=document.createElement("span");i.className="cesium-projectionPicker-wrapper cesium-toolbar-button",e.appendChild(i);let o=document.createElement("button");o.type="button",o.className="cesium-button cesium-toolbar-button",o.setAttribute("data-bind",'css: { "cesium-projectionPicker-buttonPerspective": !_orthographic, "cesium-projectionPicker-buttonOrthographic": _orthographic, "cesium-button-disabled" : sceneMode === _sceneMode.SCENE2D || _flightInProgress, "cesium-projectionPicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),o.innerHTML='<!-- ko cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64, css: "cesium-projectionPicker-iconPerspective" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64, css: "cesium-projectionPicker-iconOrthographic" } --><!-- /ko -->',i.appendChild(o);let r=document.createElement("button");r.type="button",r.className="cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon",r.setAttribute("data-bind",'css: { "cesium-projectionPicker-visible" : (dropDownVisible && _orthographic), "cesium-projectionPicker-none" : !_orthographic, "cesium-projectionPicker-hidden" : !dropDownVisible },attr: { title: tooltipPerspective },click: switchToPerspective,cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64 }'),i.appendChild(r);let a=document.createElement("button");a.type="button",a.className="cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon",a.setAttribute("data-bind",'css: { "cesium-projectionPicker-visible" : (dropDownVisible && !_orthographic), "cesium-projectionPicker-none" : _orthographic, "cesium-projectionPicker-hidden" : !dropDownVisible},attr: { title: tooltipOrthographic },click: switchToOrthographic,cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64 }'),i.appendChild(a),ve.applyBindings(n,i),this._viewModel=n,this._container=e,this._wrapper=i,this._closeDropDown=function(s){i.contains(s.target)||(n.dropDownVisible=!1)},sn.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(j9.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});j9.prototype.isDestroyed=function(){return!1};j9.prototype.destroy=function(){return this._viewModel.destroy(),sn.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),ve.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),fe(this)};var A4=j9;var k3t=new z,G9="-1000px";function y4(e,t,n){this._scene=e,this._screenPositionX=G9,this._screenPositionY=G9,this._tweens=e.tweens,this._container=n??document.body,this._selectionIndicatorElement=t,this._scale=1,this.position=void 0,this.showSelection=!1,ve.track(this,["position","_screenPositionX","_screenPositionY","_scale","showSelection"]),this.isVisible=void 0,ve.defineProperty(this,"isVisible",{get:function(){return this.showSelection&&l(this.position)}}),ve.defineProperty(this,"_transform",{get:function(){return`scale(${this._scale})`}}),this.computeScreenSpacePosition=function(i,o){return eo.worldToWindowCoordinates(e,i,o)}}y4.prototype.update=function(){if(this.showSelection&&l(this.position)){let e=this.computeScreenSpacePosition(this.position,k3t);if(!l(e))this._screenPositionX=G9,this._screenPositionY=G9;else{let t=this._container,n=t.parentNode.clientWidth,i=t.parentNode.clientHeight,o=this._selectionIndicatorElement.clientWidth,r=o*.5;e.x=Math.min(Math.max(e.x,-o),n+o)-r,e.y=Math.min(Math.max(e.y,-o),i+o)-r,this._screenPositionX=`${Math.floor(e.x+.25)}px`,this._screenPositionY=`${Math.floor(e.y+.25)}px`}}};y4.prototype.animateAppear=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:2,stopValue:1,duration:.8,easingFunction:wa.EXPONENTIAL_OUT})};y4.prototype.animateDepart=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:this._scale,stopValue:1.5,duration:.8,easingFunction:wa.EXPONENTIAL_OUT})};Object.defineProperties(y4.prototype,{container:{get:function(){return this._container}},selectionIndicatorElement:{get:function(){return this._selectionIndicatorElement}},scene:{get:function(){return this._scene}}});var x4=y4;function H9(e,t){e=On(e),this._container=e;let n=document.createElement("div");n.className="cesium-selection-wrapper",n.setAttribute("data-bind",'style: { "top" : _screenPositionY, "left" : _screenPositionX },css: { "cesium-selection-wrapper-visible" : isVisible }'),e.appendChild(n),this._element=n;let i="http://www.w3.org/2000/svg",o="M -34 -34 L -34 -11.25 L -30 -15.25 L -30 -30 L -15.25 -30 L -11.25 -34 L -34 -34 z M 11.25 -34 L 15.25 -30 L 30 -30 L 30 -15.25 L 34 -11.25 L 34 -34 L 11.25 -34 z M -34 11.25 L -34 34 L -11.25 34 L -15.25 30 L -30 30 L -30 15.25 L -34 11.25 z M 34 11.25 L 30 15.25 L 30 30 L 15.25 30 L 11.25 34 L 34 34 L 34 11.25 z",r=document.createElementNS(i,"svg:svg");r.setAttribute("width",160),r.setAttribute("height",160),r.setAttribute("viewBox","0 0 160 160");let a=document.createElementNS(i,"g");a.setAttribute("transform","translate(80,80)"),r.appendChild(a);let s=document.createElementNS(i,"path");s.setAttribute("data-bind","attr: { transform: _transform }"),s.setAttribute("d",o),a.appendChild(s),n.appendChild(r);let c=new x4(t,this._element,this._container);this._viewModel=c,ve.applyBindings(this._viewModel,this._element)}Object.defineProperties(H9.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});H9.prototype.isDestroyed=function(){return!1};H9.prototype.destroy=function(){let e=this._container;return ve.cleanNode(this._element),e.removeChild(this._element),fe(this)};var b4=H9;function iE(e,t,n){this._color=e,this._height=t,this._base=n??0}iE.prototype.getHeight=function(){return this._height};iE.prototype.getBase=function(){return this._base};iE.prototype.getStartTime=function(){return this._start};iE.prototype.getStopTime=function(){return this._stop};iE.prototype.setRange=function(e,t){this._start=e,this._stop=t};iE.prototype.render=function(e){let t="";if(this._start&&this._stop&&this._color){let n=Q.secondsDifference(this._start,e.epochJulian),i=Math.round(e.timeBarWidth*e.getAlpha(n)),o=Q.secondsDifference(this._stop,e.epochJulian),r=Math.round(e.timeBarWidth*e.getAlpha(o))-i;i<0&&(r+=i,i=0),i+r>e.timeBarWidth&&(r=e.timeBarWidth-i),r>0&&(t=`<span class="cesium-timeline-highlight" style="left: ${i.toString()}px; width: ${r.toString()}px; bottom: ${this._base.toString()}px; height: ${this._height}px; background-color: ${this._color};"></span>`)}return t};var C4=iE;function lMe(e,t,n,i){this.interval=e,this.height=t,this.color=n||new V(.5,.5,.5,1),this.backgroundColor=i||new V(0,0,0,0)}lMe.prototype.render=function(e,t){let n=this.interval.start,i=this.interval.stop,o=t.startJulian,r=Q.addSeconds(t.startJulian,t.duration,new Q);if(Q.lessThan(n,o)&&Q.greaterThan(i,r))e.fillStyle=this.color.toCssColorString(),e.fillRect(0,t.y,t.timeBarWidth,this.height);else if(Q.lessThanOrEquals(n,r)&&Q.greaterThanOrEquals(i,o)){let a,s,c;for(a=0;a<t.timeBarWidth;++a){let u=Q.addSeconds(t.startJulian,a/t.timeBarWidth*t.duration,new Q);!l(s)&&Q.greaterThanOrEquals(u,n)?s=a:!l(c)&&Q.greaterThanOrEquals(u,i)&&(c=a)}e.fillStyle=this.backgroundColor.toCssColorString(),e.fillRect(0,t.y,t.timeBarWidth,this.height),l(s)&&(l(c)||(c=t.timeBarWidth),e.fillStyle=this.color.toCssColorString(),e.fillRect(s,t.y,Math.max(c-s,1),this.height))}};var T4=lMe;var xre=1e12,xh={none:0,scrub:1,slide:2,zoom:3,touchOnly:4},gu={none:0,scrub:1,slideZoom:2,singleTap:3,ignore:4},ax=[.001,.002,.005,.01,.02,.05,.1,.25,.5,1,2,5,10,15,30,60,120,300,600,900,1800,3600,7200,14400,21600,43200,86400,172800,345600,604800,1296e3,2592e3,5184e3,7776e3,15552e3,31536e3,63072e3,126144e3,15768e4,31536e4,63072e4,126144e4,15768e5,31536e5,63072e5,126144e5,15768e6,31536e6],z3t=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function _u(e,t){e=On(e);let n=e.ownerDocument;this.container=e;let i=n.createElement("div");i.className="cesium-timeline-main",e.appendChild(i),this._topDiv=i,this._endJulian=void 0,this._epochJulian=void 0,this._lastXPos=void 0,this._scrubElement=void 0,this._startJulian=void 0,this._timeBarSecondsSpan=void 0,this._clock=t,this._scrubJulian=t.currentTime,this._mainTicSpan=-1,this._mouseMode=xh.none,this._touchMode=gu.none,this._touchState={centerX:0,spanX:0},this._mouseX=0,this._timelineDrag=0,this._timelineDragLocation=void 0,this._lastHeight=void 0,this._lastWidth=void 0,this._topDiv.innerHTML='<div class="cesium-timeline-bar"></div><div class="cesium-timeline-trackContainer"><canvas class="cesium-timeline-tracks" width="10" height="1"></canvas></div><div class="cesium-timeline-needle"></div><span class="cesium-timeline-ruler"></span>',this._timeBarEle=this._topDiv.childNodes[0],this._trackContainer=this._topDiv.childNodes[1],this._trackListEle=this._topDiv.childNodes[1].childNodes[0],this._needleEle=this._topDiv.childNodes[2],this._rulerEle=this._topDiv.childNodes[3],this._context=this._trackListEle.getContext("2d"),this._trackList=[],this._highlightRanges=[],this.zoomTo(t.startTime,t.stopTime),this._onMouseDown=U3t(this),this._onMouseUp=V3t(this),this._onMouseMove=j3t(this),this._onMouseWheel=G3t(this),this._onTouchStart=H3t(this),this._onTouchMove=q3t(this),this._onTouchEnd=W3t(this);let o=this._timeBarEle;n.addEventListener("mouseup",this._onMouseUp,!1),n.addEventListener("mousemove",this._onMouseMove,!1),o.addEventListener("mousedown",this._onMouseDown,!1),o.addEventListener("DOMMouseScroll",this._onMouseWheel,!1),o.addEventListener("mousewheel",this._onMouseWheel,!1),o.addEventListener("touchstart",this._onTouchStart,!1),o.addEventListener("touchmove",this._onTouchMove,!1),o.addEventListener("touchend",this._onTouchEnd,!1),o.addEventListener("touchcancel",this._onTouchEnd,!1),this._topDiv.oncontextmenu=function(){return!1},t.onTick.addEventListener(this.updateFromClock,this),this.updateFromClock()}_u.prototype.addEventListener=function(e,t,n){this._topDiv.addEventListener(e,t,n)};_u.prototype.removeEventListener=function(e,t,n){this._topDiv.removeEventListener(e,t,n)};_u.prototype.isDestroyed=function(){return!1};_u.prototype.destroy=function(){this._clock.onTick.removeEventListener(this.updateFromClock,this);let e=this.container.ownerDocument;e.removeEventListener("mouseup",this._onMouseUp,!1),e.removeEventListener("mousemove",this._onMouseMove,!1);let t=this._timeBarEle;t.removeEventListener("mousedown",this._onMouseDown,!1),t.removeEventListener("DOMMouseScroll",this._onMouseWheel,!1),t.removeEventListener("mousewheel",this._onMouseWheel,!1),t.removeEventListener("touchstart",this._onTouchStart,!1),t.removeEventListener("touchmove",this._onTouchMove,!1),t.removeEventListener("touchend",this._onTouchEnd,!1),t.removeEventListener("touchcancel",this._onTouchEnd,!1),this.container.removeChild(this._topDiv),fe(this)};_u.prototype.addHighlightRange=function(e,t,n){let i=new C4(e,t,n);return this._highlightRanges.push(i),this.resize(),i};_u.prototype.addTrack=function(e,t,n,i){let o=new T4(e,t,n,i);return this._trackList.push(o),this._lastHeight=void 0,this.resize(),o};_u.prototype.zoomTo=function(e,t){if(this._startJulian=e,this._endJulian=t,this._timeBarSecondsSpan=Q.secondsDifference(t,e),this._clock&&this._clock.clockRange!==va.UNBOUNDED){let i=this._clock.startTime,o=this._clock.stopTime,r=Q.secondsDifference(o,i),a=Q.secondsDifference(i,this._startJulian),s=Q.secondsDifference(o,this._endJulian);this._timeBarSecondsSpan>=r?(this._timeBarSecondsSpan=r,this._startJulian=this._clock.startTime,this._endJulian=this._clock.stopTime):a>0?(this._endJulian=Q.addSeconds(this._endJulian,a,new Q),this._startJulian=i,this._timeBarSecondsSpan=Q.secondsDifference(this._endJulian,this._startJulian)):s<0&&(this._startJulian=Q.addSeconds(this._startJulian,s,new Q),this._endJulian=o,this._timeBarSecondsSpan=Q.secondsDifference(this._endJulian,this._startJulian))}this._makeTics();let n=document.createEvent("Event");n.initEvent("setzoom",!0,!0),n.startJulian=this._startJulian,n.endJulian=this._endJulian,n.epochJulian=this._epochJulian,n.totalSpan=this._timeBarSecondsSpan,n.mainTicSpan=this._mainTicSpan,this._topDiv.dispatchEvent(n)};_u.prototype.zoomFrom=function(e){let t=Q.secondsDifference(this._scrubJulian,this._startJulian);e>1||t<0||t>this._timeBarSecondsSpan?t=this._timeBarSecondsSpan*.5:t+=t-this._timeBarSecondsSpan*.5;let n=this._timeBarSecondsSpan-t;this.zoomTo(Q.addSeconds(this._startJulian,t-t*e,new Q),Q.addSeconds(this._endJulian,n*e-n,new Q))};function bre(e){return e<10?`0${e.toString()}`:e.toString()}_u.prototype.makeLabel=function(e){let t=Q.toGregorianDate(e),n=t.millisecond,i=" UTC";if(n>0&&this._timeBarSecondsSpan<3600){for(i=Math.floor(n).toString();i.length<3;)i=`0${i}`;i=`.${i}`}return`${z3t[t.month-1]} ${t.day} ${t.year} ${bre(t.hour)}:${bre(t.minute)}:${bre(t.second)}${i}`};_u.prototype.smallestTicInPixels=7;_u.prototype._makeTics=function(){let e=this._timeBarEle,t=Q.secondsDifference(this._scrubJulian,this._startJulian),n=Math.round(t*this._topDiv.clientWidth/this._timeBarSecondsSpan),i=n-8,o,r=this;this._needleEle.style.left=`${n.toString()}px`;let a="",s=.01,c=31536e6,u=1e-10,f=0,d=this._timeBarSecondsSpan;d<s?(d=s,this._timeBarSecondsSpan=s,this._endJulian=Q.addSeconds(this._startJulian,s,new Q)):d>c&&(d=c,this._timeBarSecondsSpan=c,this._endJulian=Q.addSeconds(this._startJulian,c,new Q));let p=this._timeBarEle.clientWidth;p<10&&(p=10);let g=this._startJulian,m=Math.min(d/p*1e-5,.4),A,y=Q.toGregorianDate(g);d>31536e4?A=Q.fromDate(new Date(Date.UTC(Math.floor(y.year/100)*100,0))):d>31536e3?A=Q.fromDate(new Date(Date.UTC(Math.floor(y.year/10)*10,0))):d>86400?A=Q.fromDate(new Date(Date.UTC(y.year,0))):A=Q.fromDate(new Date(Date.UTC(y.year,y.month,y.day)));let x=Q.secondsDifference(this._startJulian,Q.addSeconds(A,m,new Q)),b=x+d;this._epochJulian=A;function C(F){return Math.floor(x/F)*F}function E(F,H){return Math.ceil(F/H+.5)*H}function S(F){return(F-x)/d}function w(F,H){return F-H*Math.round(F/H)}this._rulerEle.innerHTML=this.makeLabel(Q.addSeconds(this._endJulian,-s,new Q));let P=this._rulerEle.offsetWidth+20;P<30&&(P=180);let R=f;f-=u;let B={startTime:x,startJulian:g,epochJulian:A,duration:d,timeBarWidth:p,getAlpha:S};this._highlightRanges.forEach(function(F){a+=F.render(B)});let L=0,_=0,T=0,v=P/p;v>1&&(v=1),v*=this._timeBarSecondsSpan;let I=-1,O=-1,N=ax.length,j;for(j=0;j<N;++j){let F=ax[j];if(++I,L=F,F>v&&F>f)break;O<0&&p*(F/this._timeBarSecondsSpan)>=this.smallestTicInPixels&&(O=I)}if(I>0){for(;I>0;)if(--I,Math.abs(w(L,ax[I]))<1e-5){ax[I]>=f&&(_=ax[I]);break}if(O>=0)for(;O<I;){if(Math.abs(w(_,ax[O]))<1e-5&&ax[O]>=f){T=ax[O];break}++O}}f=R,f>u&&T<1e-5&&Math.abs(f-L)>u&&(T=f,f<=L+u&&(_=0));let k=-999999,U;if(p*(T/this._timeBarSecondsSpan)>=3)for(o=C(T);o<=b;o=E(o,T))a+=`<span class="cesium-timeline-ticTiny" style="left: ${Math.round(p*S(o)).toString()}px;"></span>`;if(p*(_/this._timeBarSecondsSpan)>=3)for(o=C(_);o<=b;o=E(o,_))a+=`<span class="cesium-timeline-ticSub" style="left: ${Math.round(p*S(o)).toString()}px;"></span>`;if(p*(L/this._timeBarSecondsSpan)>=2){this._mainTicSpan=L,b+=L,o=C(L);let F=Q.computeTaiMinusUtc(A);for(;o<=b;){let H=Q.addSeconds(g,o-x,new Q);if(L>2.1){let Z=Q.computeTaiMinusUtc(H);Math.abs(Z-F)>.1&&(o+=Z-F,H=Q.addSeconds(g,o-x,new Q))}let q=Math.round(p*S(o)),J=this.makeLabel(H);this._rulerEle.innerHTML=J,U=this._rulerEle.offsetWidth,U<10&&(U=P);let W=q-(U/2-1);W>k?(k=W+U+5,a+=`<span class="cesium-timeline-ticMain" style="left: ${q.toString()}px;"></span><span class="cesium-timeline-ticLabel" style="left: ${W.toString()}px;">${J}</span>`):a+=`<span class="cesium-timeline-ticSub" style="left: ${q.toString()}px;"></span>`,o=E(o,L)}}else this._mainTicSpan=-1;a+=`<span class="cesium-timeline-icon16" style="left:${i}px;bottom:0;background-position: 0 0;"></span>`,e.innerHTML=a,this._scrubElement=e.lastChild,this._context.clearRect(0,0,this._trackListEle.width,this._trackListEle.height),B.y=0,this._trackList.forEach(function(F){F.render(r._context,B),B.y+=F.height})};_u.prototype.updateFromClock=function(){this._scrubJulian=this._clock.currentTime;let e=this._scrubElement;if(l(this._scrubElement)){let t=Q.secondsDifference(this._scrubJulian,this._startJulian),n=Math.round(t*this._topDiv.clientWidth/this._timeBarSecondsSpan);this._lastXPos!==n&&(this._lastXPos=n,e.style.left=`${n-8}px`,this._needleEle.style.left=`${n}px`)}l(this._timelineDragLocation)&&(this._setTimeBarTime(this._timelineDragLocation,this._timelineDragLocation*this._timeBarSecondsSpan/this._topDiv.clientWidth),this.zoomTo(Q.addSeconds(this._startJulian,this._timelineDrag,new Q),Q.addSeconds(this._endJulian,this._timelineDrag,new Q)))};_u.prototype._setTimeBarTime=function(e,t){if(e=Math.round(e),this._scrubJulian=Q.addSeconds(this._startJulian,t,new Q),this._scrubElement){let i=e-8;this._scrubElement.style.left=`${i.toString()}px`,this._needleEle.style.left=`${e.toString()}px`}let n=document.createEvent("Event");n.initEvent("settime",!0,!0),n.clientX=e,n.timeSeconds=t,n.timeJulian=this._scrubJulian,n.clock=this._clock,this._topDiv.dispatchEvent(n)};function U3t(e){return function(t){e._mouseMode!==xh.touchOnly&&(t.button===0?(e._mouseMode=xh.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition="-16px 0"),e._onMouseMove(t)):(e._mouseX=t.clientX,t.button===2?e._mouseMode=xh.zoom:e._mouseMode=xh.slide)),t.preventDefault()}}function V3t(e){return function(t){e._mouseMode=xh.none,e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0"),e._timelineDrag=0,e._timelineDragLocation=void 0}}function j3t(e){return function(t){let n;if(e._mouseMode===xh.scrub){t.preventDefault();let i=t.clientX-e._topDiv.getBoundingClientRect().left;i<0?(e._timelineDragLocation=0,e._timelineDrag=-.01*e._timeBarSecondsSpan):i>e._topDiv.clientWidth?(e._timelineDragLocation=e._topDiv.clientWidth,e._timelineDrag=.01*e._timeBarSecondsSpan):(e._timelineDragLocation=void 0,e._setTimeBarTime(i,i*e._timeBarSecondsSpan/e._topDiv.clientWidth))}else if(e._mouseMode===xh.slide){if(n=e._mouseX-t.clientX,e._mouseX=t.clientX,n!==0){let i=n*e._timeBarSecondsSpan/e._topDiv.clientWidth;e.zoomTo(Q.addSeconds(e._startJulian,i,new Q),Q.addSeconds(e._endJulian,i,new Q))}}else e._mouseMode===xh.zoom&&(n=e._mouseX-t.clientX,e._mouseX=t.clientX,n!==0&&e.zoomFrom(Math.pow(1.01,n)))}}function G3t(e){return function(t){let n=t.wheelDeltaY||t.wheelDelta||-t.detail;xre=Math.max(Math.min(Math.abs(n),xre),1),n/=xre,e.zoomFrom(Math.pow(1.05,-n))}}function H3t(e){return function(t){let n=t.touches.length,i,o,r=e._topDiv.getBoundingClientRect().left;t.preventDefault(),e._mouseMode=xh.touchOnly,n===1?(i=Q.secondsDifference(e._scrubJulian,e._startJulian),o=Math.round(i*e._topDiv.clientWidth/e._timeBarSecondsSpan+r),Math.abs(t.touches[0].clientX-o)<50?(e._touchMode=gu.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition=n===1?"-16px 0":"0 0")):(e._touchMode=gu.singleTap,e._touchState.centerX=t.touches[0].clientX-r)):n===2?(e._touchMode=gu.slideZoom,e._touchState.centerX=(t.touches[0].clientX+t.touches[1].clientX)*.5-r,e._touchState.spanX=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):e._touchMode=gu.ignore}}function W3t(e){return function(t){let n=t.touches.length,i=e._topDiv.getBoundingClientRect().left;e._touchMode===gu.singleTap?(e._touchMode=gu.scrub,e._onTouchMove(t)):e._touchMode===gu.scrub&&e._onTouchMove(t),e._mouseMode=xh.touchOnly,n!==1?e._touchMode=n>0?gu.ignore:gu.none:e._touchMode===gu.slideZoom&&(e._touchState.centerX=t.touches[0].clientX-i),e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0")}}function q3t(e){return function(t){let n,i,o,r,a,s,c=1,u=e._topDiv.getBoundingClientRect().left;e._touchMode===gu.singleTap&&(e._touchMode=gu.slideZoom),e._mouseMode=xh.touchOnly,e._touchMode===gu.scrub?(t.preventDefault(),t.changedTouches.length===1&&(i=t.changedTouches[0].clientX-u,i>=0&&i<=e._topDiv.clientWidth&&e._setTimeBarTime(i,i*e._timeBarSecondsSpan/e._topDiv.clientWidth))):e._touchMode===gu.slideZoom&&(o=t.touches.length,o===2?(r=(t.touches[0].clientX+t.touches[1].clientX)*.5-u,a=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):o===1&&(r=t.touches[0].clientX-u,a=0),l(r)&&(a>0&&e._touchState.spanX>0?(c=e._touchState.spanX/a,s=Q.addSeconds(e._startJulian,(e._touchState.centerX*e._timeBarSecondsSpan-r*e._timeBarSecondsSpan*c)/e._topDiv.clientWidth,new Q)):(n=e._touchState.centerX-r,s=Q.addSeconds(e._startJulian,n*e._timeBarSecondsSpan/e._topDiv.clientWidth,new Q)),e.zoomTo(s,Q.addSeconds(s,e._timeBarSecondsSpan*c,new Q)),e._touchState.centerX=r,e._touchState.spanX=a))}}_u.prototype.resize=function(){let e=this.container.clientWidth,t=this.container.clientHeight;if(e===this._lastWidth&&t===this._lastHeight)return;this._trackContainer.style.height=`${t}px`;let n=1;this._trackList.forEach(function(i){n+=i.height}),this._trackListEle.style.height=`${n.toString()}px`,this._trackListEle.width=this._trackListEle.clientWidth,this._trackListEle.height=n,this._makeTics(),this._lastXPos=void 0,this._lastWidth=e,this._lastHeight=t};var E4=_u;var fMe=Yr(uMe(),1);function Y3t(e){let t=!1,n=window.screen;return l(n)&&(l(n.lockOrientation)?t=n.lockOrientation(e):l(n.mozLockOrientation)?t=n.mozLockOrientation(e):l(n.msLockOrientation)?t=n.msLockOrientation(e):l(n.orientation&&n.orientation.lock)&&(t=n.orientation.lock(e))),t}function dMe(){let e=window.screen;l(e)&&(l(e.unlockOrientation)?e.unlockOrientation():l(e.mozUnlockOrientation)?e.mozUnlockOrientation():l(e.msUnlockOrientation)?e.msUnlockOrientation():l(e.orientation&&e.orientation.unlock)&&e.orientation.unlock())}function X3t(e,t,n,i){i()||(n()?(t.useWebVR=!1,e._locked&&(dMe(),e._locked=!1),e._noSleep.disable(),Xr.exitFullscreen(),n(!1)):(Xr.fullscreen||Xr.requestFullscreen(e._vrElement),e._noSleep.enable(),e._locked||(e._locked=Y3t("landscape")),t.useWebVR=!0,n(!0)))}function W9(e,t){let n=this,i=ve.observable(Xr.enabled),o=ve.observable(!1);this.isVRMode=void 0,ve.defineProperty(this,"isVRMode",{get:function(){return o()}}),this.isVREnabled=void 0,ve.defineProperty(this,"isVREnabled",{get:function(){return i()},set:function(a){i(a&&Xr.enabled)}}),this.tooltip=void 0,ve.defineProperty(this,"tooltip",function(){return i()?o()?"Exit VR mode":"Enter VR mode":"VR mode is unavailable"});let r=ve.observable(!1);this._isOrthographic=void 0,ve.defineProperty(this,"_isOrthographic",{get:function(){return r()}}),this._eventHelper=new Nr,this._eventHelper.add(e.preRender,function(){r(e.camera.frustum instanceof fn)}),this._locked=!1,this._noSleep=new fMe.default,this._command=In(function(){X3t(n,e,o,r)},ve.getObservable(this,"isVREnabled")),this._vrElement=On(t)??document.body,this._callback=function(){!Xr.fullscreen&&o()&&(e.useWebVR=!1,n._locked&&(dMe(),n._locked=!1),n._noSleep.disable(),o(!1))},document.addEventListener(Xr.changeEventName,this._callback)}Object.defineProperties(W9.prototype,{vrElement:{get:function(){return this._vrElement},set:function(e){this._vrElement=e}},command:{get:function(){return this._command}}});W9.prototype.isDestroyed=function(){return!1};W9.prototype.destroy=function(){this._eventHelper.removeAll(),document.removeEventListener(Xr.changeEventName,this._callback),fe(this)};var S4=W9;var K3t="M 5.3125 6.375 C 4.008126 6.375 2.96875 7.4141499 2.96875 8.71875 L 2.96875 19.5 C 2.96875 20.8043 4.008126 21.875 5.3125 21.875 L 13.65625 21.875 C 13.71832 20.0547 14.845166 18.59375 16.21875 18.59375 C 17.592088 18.59375 18.71881 20.0552 18.78125 21.875 L 27.09375 21.875 C 28.398125 21.875 29.4375 20.8043 29.4375 19.5 L 29.4375 8.71875 C 29.4375 7.4141499 28.398125 6.375 27.09375 6.375 L 5.3125 6.375 z M 9.625 10.4375 C 11.55989 10.4375 13.125 12.03385 13.125 13.96875 C 13.125 15.90365 11.55989 17.46875 9.625 17.46875 C 7.69011 17.46875 6.125 15.90365 6.125 13.96875 C 6.125 12.03385 7.69011 10.4375 9.625 10.4375 z M 22.46875 10.4375 C 24.40364 10.4375 25.96875 12.03385 25.96875 13.96875 C 25.96875 15.90365 24.40364 17.46875 22.46875 17.46875 C 20.53386 17.46875 18.96875 15.90365 18.96875 13.96875 C 18.96875 12.03385 20.53386 10.4375 22.46875 10.4375 z",Q3t="M 25.770585,2.4552065 C 15.72282,13.962707 10.699956,19.704407 8.1768352,22.580207 c -1.261561,1.4379 -1.902282,2.1427 -2.21875,2.5 -0.141624,0.1599 -0.208984,0.2355 -0.25,0.2813 l 0.6875,0.75 c 10e-5,-10e-5 0.679191,0.727 0.6875,0.7187 0.01662,-0.016 0.02451,-0.024 0.03125,-0.031 0.01348,-0.014 0.04013,-0.038 0.0625,-0.062 0.04474,-0.05 0.120921,-0.1315 0.28125,-0.3126 0.320657,-0.3619 0.956139,-1.0921 2.2187499,-2.5312 2.5252219,-2.8781 7.5454589,-8.6169 17.5937499,-20.1250005 l -1.5,-1.3125 z m -20.5624998,3.9063 c -1.304375,0 -2.34375,1.0391 -2.34375,2.3437 l 0,10.8125005 c 0,1.3043 1.039375,2.375 2.34375,2.375 l 2.25,0 c 1.9518039,-2.2246 7.4710958,-8.5584 13.5624998,-15.5312005 l -15.8124998,0 z m 21.1249998,0 c -1.855467,2.1245 -2.114296,2.4005 -3.59375,4.0936995 1.767282,0.1815 3.15625,1.685301 3.15625,3.500001 0,1.9349 -1.56511,3.5 -3.5,3.5 -1.658043,0 -3.043426,-1.1411 -3.40625,-2.6875 -1.089617,1.2461 -2.647139,2.9988 -3.46875,3.9375 0.191501,-0.062 0.388502,-0.094 0.59375,-0.094 1.373338,0 2.50006,1.4614 2.5625,3.2812 l 8.3125,0 c 1.304375,0 2.34375,-1.0707 2.34375,-2.375 l 0,-10.8125005 c 0,-1.3046 -1.039375,-2.3437 -2.34375,-2.3437 l -0.65625,0 z M 9.5518351,10.423906 c 1.9348899,0 3.4999999,1.596401 3.4999999,3.531301 0,1.9349 -1.56511,3.5 -3.4999999,3.5 -1.9348899,0 -3.4999999,-1.5651 -3.4999999,-3.5 0,-1.9349 1.56511,-3.531301 3.4999999,-3.531301 z m 4.2187499,10.312601 c -0.206517,0.2356 -0.844218,0.9428 -1.03125,1.1562 l 0.8125,0 c 0.01392,-0.4081 0.107026,-0.7968 0.21875,-1.1562 z";function q9(e,t,n){e=On(e);let i=new S4(t,n);i._exitVRPath=Q3t,i._enterVRPath=K3t;let o=document.createElement("button");o.type="button",o.className="cesium-button cesium-vrButton",o.setAttribute("data-bind",'css: { "cesium-button-disabled" : _isOrthographic }, attr: { title: tooltip },click: command,enable: isVREnabled,cesiumSvgPath: { path: isVRMode ? _exitVRPath : _enterVRPath, width: 32, height: 32 }'),e.appendChild(o),ve.applyBindings(i,o),this._container=e,this._viewModel=i,this._element=o}Object.defineProperties(q9.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});q9.prototype.isDestroyed=function(){return!1};q9.prototype.destroy=function(){return this._viewModel.destroy(),ve.cleanNode(this._element),this._container.removeChild(this._element),fe(this)};var w4=q9;function Y9(e,t){this._scene=e;let n=this,i=function(o,r,a,s){n.sceneMode=a,n.dropDownVisible=!1};this._eventHelper=new Nr,this._eventHelper.add(e.morphStart,i),this._duration=t??2,this.sceneMode=e.mode,this.dropDownVisible=!1,this.tooltip2D="2D",this.tooltip3D="3D",this.tooltipColumbusView="Columbus View",ve.track(this,["sceneMode","dropDownVisible","tooltip2D","tooltip3D","tooltipColumbusView"]),this.selectedTooltip=void 0,ve.defineProperty(this,"selectedTooltip",function(){let o=n.sceneMode;return o===ie.SCENE2D?n.tooltip2D:o===ie.SCENE3D?n.tooltip3D:n.tooltipColumbusView}),this._toggleDropDown=In(function(){n.dropDownVisible=!n.dropDownVisible}),this._morphTo2D=In(function(){e.morphTo2D(n._duration)}),this._morphTo3D=In(function(){e.morphTo3D(n._duration)}),this._morphToColumbusView=In(function(){e.morphToColumbusView(n._duration)}),this._sceneMode=ie}Object.defineProperties(Y9.prototype,{scene:{get:function(){return this._scene}},duration:{get:function(){return this._duration},set:function(e){this._duration=e}},toggleDropDown:{get:function(){return this._toggleDropDown}},morphTo2D:{get:function(){return this._morphTo2D}},morphTo3D:{get:function(){return this._morphTo3D}},morphToColumbusView:{get:function(){return this._morphToColumbusView}}});Y9.prototype.isDestroyed=function(){return!1};Y9.prototype.destroy=function(){this._eventHelper.removeAll(),fe(this)};var I4=Y9;var $3t="m 32.401392,4.9330437 c -7.087603,0 -14.096095,2.884602 -19.10793,7.8946843 -5.0118352,5.010083 -7.9296167,11.987468 -7.9296167,19.072999 0,7.085531 2.9177815,14.097848 7.9296167,19.107931 4.837653,4.835961 11.541408,7.631372 18.374354,7.82482 0.05712,0.01231 0.454119,0.139729 0.454119,0.139729 l 0.03493,-0.104797 c 0.08246,7.84e-4 0.162033,0.03493 0.244525,0.03493 0.08304,0 0.161515,-0.03414 0.244526,-0.03493 l 0.03493,0.104797 c 0,0 0.309474,-0.129487 0.349323,-0.139729 6.867765,-0.168094 13.582903,-2.965206 18.444218,-7.82482 2.558195,-2.5573 4.551081,-5.638134 5.903547,-8.977584 1.297191,-3.202966 2.02607,-6.661489 2.02607,-10.130347 0,-6.237309 -2.366261,-12.31219 -6.322734,-17.116794 -0.0034,-0.02316 0.0049,-0.04488 0,-0.06986 -0.01733,-0.08745 -0.104529,-0.278855 -0.104797,-0.279458 -5.31e-4,-0.0012 -0.522988,-0.628147 -0.523984,-0.62878 -3.47e-4,-2.2e-4 -0.133444,-0.03532 -0.244525,-0.06987 C 51.944299,13.447603 51.751076,13.104317 51.474391,12.827728 46.462556,7.8176457 39.488996,4.9330437 32.401392,4.9330437 z m -2.130866,3.5281554 0.104797,9.6762289 c -4.111695,-0.08361 -7.109829,-0.423664 -9.257041,-0.943171 1.198093,-2.269271 2.524531,-4.124404 3.91241,-5.414496 2.167498,-2.0147811 3.950145,-2.8540169 5.239834,-3.3185619 z m 2.794579,0 c 1.280302,0.4754953 3.022186,1.3285948 5.065173,3.2486979 1.424667,1.338973 2.788862,3.303645 3.982275,5.728886 -2.29082,0.403367 -5.381258,0.621049 -8.942651,0.698645 L 33.065105,8.4611991 z m 5.728886,0.2445256 c 4.004072,1.1230822 7.793098,3.1481363 10.724195,6.0782083 0.03468,0.03466 0.07033,0.06991 0.104797,0.104797 -0.45375,0.313891 -0.923054,0.663002 -1.956205,1.082899 -0.647388,0.263114 -1.906242,0.477396 -2.829511,0.733577 -1.382296,-2.988132 -3.027146,-5.368585 -4.785716,-7.0213781 -0.422866,-0.397432 -0.835818,-0.6453247 -1.25756,-0.9781032 z m -15.33525,0.7685092 c -0.106753,0.09503 -0.207753,0.145402 -0.31439,0.244526 -1.684973,1.5662541 -3.298068,3.8232211 -4.680919,6.5672591 -0.343797,-0.14942 -1.035052,-0.273198 -1.292493,-0.419186 -0.956528,-0.542427 -1.362964,-1.022024 -1.537018,-1.292493 -0.0241,-0.03745 -0.01868,-0.0401 -0.03493,-0.06986 2.250095,-2.163342 4.948824,-3.869984 7.859752,-5.0302421 z m -9.641296,7.0912431 c 0.464973,0.571618 0.937729,1.169056 1.956205,1.746612 0.349907,0.198425 1.107143,0.335404 1.537018,0.523983 -1.20166,3.172984 -1.998037,7.051901 -2.165798,11.772162 C 14.256557,30.361384 12.934823,30.161483 12.280427,29.90959 10.644437,29.279855 9.6888882,28.674891 9.1714586,28.267775 8.6540289,27.860658 8.6474751,27.778724 8.6474751,27.778724 l -0.069864,0.03493 C 9.3100294,23.691285 11.163248,19.798527 13.817445,16.565477 z m 37.552149,0.523984 c 2.548924,3.289983 4.265057,7.202594 4.890513,11.318043 -0.650428,0.410896 -1.756876,1.001936 -3.563088,1.606882 -1.171552,0.392383 -3.163859,0.759153 -4.960377,1.117832 -0.04367,-4.752703 -0.784809,-8.591423 -1.88634,-11.807094 0.917574,-0.263678 2.170552,-0.486495 2.864443,-0.76851 1.274693,-0.518066 2.003942,-1.001558 2.654849,-1.467153 z m -31.439008,2.619917 c 2.487341,0.672766 5.775813,1.137775 10.479669,1.222628 l 0.104797,10.689263 0,0.03493 0,0.733577 c -5.435005,-0.09059 -9.512219,-0.519044 -12.610536,-1.117831 0.106127,-4.776683 0.879334,-8.55791 2.02607,-11.562569 z m 23.264866,0.31439 c 1.073459,3.067541 1.833795,6.821314 1.816476,11.702298 -3.054474,0.423245 -7.062018,0.648559 -11.702298,0.698644 l 0,-0.838373 -0.104796,-10.654331 c 4.082416,-0.0864 7.404468,-0.403886 9.990618,-0.908238 z M 8.2632205,30.922625 c 0.7558676,0.510548 1.5529563,1.013339 3.0041715,1.57195 0.937518,0.360875 2.612202,0.647642 3.91241,0.978102 0.112814,3.85566 0.703989,7.107756 1.606883,9.920754 -1.147172,-0.324262 -2.644553,-0.640648 -3.423359,-0.978102 -1.516688,-0.657177 -2.386627,-1.287332 -2.864443,-1.71168 -0.477816,-0.424347 -0.489051,-0.489051 -0.489051,-0.489051 L 9.8002387,40.319395 C 8.791691,37.621767 8.1584238,34.769583 8.1584238,31.900727 c 0,-0.330153 0.090589,-0.648169 0.1047967,-0.978102 z m 48.2763445,0.419186 c 0.0047,0.188973 0.06986,0.36991 0.06986,0.558916 0,2.938869 -0.620228,5.873558 -1.676747,8.628261 -0.07435,0.07583 -0.06552,0.07411 -0.454119,0.349323 -0.606965,0.429857 -1.631665,1.042044 -3.318562,1.676747 -1.208528,0.454713 -3.204964,0.850894 -5.135038,1.25756 0.84593,-2.765726 1.41808,-6.005357 1.606883,-9.815957 2.232369,-0.413371 4.483758,-0.840201 5.938479,-1.327425 1.410632,-0.472457 2.153108,-0.89469 2.96924,-1.327425 z m -38.530252,2.864443 c 3.208141,0.56697 7.372279,0.898588 12.575603,0.978103 l 0.174662,9.885821 c -4.392517,-0.06139 -8.106722,-0.320566 -10.863925,-0.803441 -1.051954,-2.664695 -1.692909,-6.043794 -1.88634,-10.060483 z m 26.793022,0.31439 c -0.246298,3.923551 -0.877762,7.263679 -1.816476,9.885822 -2.561957,0.361954 -5.766249,0.560708 -9.431703,0.62878 l -0.174661,-9.815957 c 4.491734,-0.04969 8.334769,-0.293032 11.42284,-0.698645 z M 12.035901,44.860585 c 0.09977,0.04523 0.105535,0.09465 0.209594,0.139729 1.337656,0.579602 3.441099,1.058072 5.589157,1.537018 1.545042,3.399208 3.548524,5.969402 5.589157,7.789888 -3.034411,-1.215537 -5.871615,-3.007978 -8.174142,-5.309699 -1.245911,-1.245475 -2.271794,-2.662961 -3.213766,-4.156936 z m 40.69605,0 c -0.941972,1.493975 -1.967855,2.911461 -3.213765,4.156936 -2.74253,2.741571 -6.244106,4.696717 -9.955686,5.868615 0.261347,-0.241079 0.507495,-0.394491 0.768509,-0.663713 1.674841,-1.727516 3.320792,-4.181056 4.645987,-7.265904 2.962447,-0.503021 5.408965,-1.122293 7.161107,-1.781544 0.284034,-0.106865 0.337297,-0.207323 0.593848,-0.31439 z m -31.404076,2.305527 c 2.645807,0.376448 5.701178,0.649995 9.466635,0.698645 l 0.139729,7.789888 c -1.38739,-0.480844 -3.316218,-1.29837 -5.659022,-3.388427 -1.388822,-1.238993 -2.743668,-3.0113 -3.947342,-5.100106 z m 20.365491,0.104797 c -1.04872,2.041937 -2.174337,3.779068 -3.353494,4.995309 -1.853177,1.911459 -3.425515,2.82679 -4.611055,3.353494 l -0.139729,-7.789887 c 3.13091,-0.05714 5.728238,-0.278725 8.104278,-0.558916 z",J3t="m 2.9825053,17.550598 0,1.368113 0,26.267766 0,1.368113 1.36811,0 54.9981397,0 1.36811,0 0,-1.368113 0,-26.267766 0,-1.368113 -1.36811,0 -54.9981397,0 -1.36811,0 z m 2.73623,2.736226 10.3292497,0 0,10.466063 -10.3292497,0 0,-10.466063 z m 13.0654697,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 10.32926,0 0,10.466063 -10.32926,0 0,-10.466063 z m -41.9326497,13.202288 10.3292497,0 0,10.329252 -10.3292497,0 0,-10.329252 z m 13.0654697,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 10.32926,0 0,10.329252 -10.32926,0 0,-10.329252 z",Z3t="m 14.723969,17.675598 -0.340489,0.817175 -11.1680536,26.183638 -0.817175,1.872692 2.076986,0 54.7506996,0 2.07698,0 -0.81717,-1.872692 -11.16805,-26.183638 -0.34049,-0.817175 -0.91933,0 -32.414586,0 -0.919322,0 z m 1.838643,2.723916 6.196908,0 -2.928209,10.418977 -7.729111,0 4.460412,-10.418977 z m 9.02297,0 4.903049,0 0,10.418977 -7.831258,0 2.928209,-10.418977 z m 7.626964,0 5.584031,0 2.62176,10.418977 -8.205791,0 0,-10.418977 z m 8.410081,0 5.51593,0 4.46042,10.418977 -7.38863,0 -2.58772,-10.418977 z m -30.678091,13.142892 8.103649,0 -2.89416,10.282782 -9.6018026,0 4.3923136,-10.282782 z m 10.929711,0 8.614384,0 0,10.282782 -11.508544,0 2.89416,-10.282782 z m 11.338299,0 8.852721,0 2.58772,10.282782 -11.440441,0 0,-10.282782 z m 11.678781,0 7.86531,0 4.39231,10.282782 -9.6699,0 -2.58772,-10.282782 z";function X9(e,t,n){e=On(e);let i=new I4(t,n);i._globePath=$3t,i._flatMapPath=J3t,i._columbusViewPath=Z3t;let o=document.createElement("span");o.className="cesium-sceneModePicker-wrapper cesium-toolbar-button",e.appendChild(o);let r=document.createElement("button");r.type="button",r.className="cesium-button cesium-toolbar-button",r.setAttribute("data-bind",'css: { "cesium-sceneModePicker-button2D": sceneMode === _sceneMode.SCENE2D, "cesium-sceneModePicker-button3D": sceneMode === _sceneMode.SCENE3D, "cesium-sceneModePicker-buttonColumbusView": sceneMode === _sceneMode.COLUMBUS_VIEW, "cesium-sceneModePicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),r.innerHTML='<!-- ko cesiumSvgPath: { path: _globePath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon3D" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon2D" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-iconColumbusView" } --><!-- /ko -->',o.appendChild(r);let a=document.createElement("button");a.type="button",a.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",a.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE3D)) || (!dropDownVisible && (sceneMode === _sceneMode.SCENE3D)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE3D, "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip3D },click: morphTo3D,cesiumSvgPath: { path: _globePath, width: 64, height: 64 }'),o.appendChild(a);let s=document.createElement("button");s.type="button",s.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",s.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE2D)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE2D, "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip2D },click: morphTo2D,cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64 }'),o.appendChild(s);let c=document.createElement("button");c.type="button",c.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",c.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.COLUMBUS_VIEW)) || (!dropDownVisible && (sceneMode === _sceneMode.COLUMBUS_VIEW)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.COLUMBUS_VIEW, "cesium-sceneModePicker-hidden" : !dropDownVisible},attr: { title: tooltipColumbusView },click: morphToColumbusView,cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64 }'),o.appendChild(c),ve.applyBindings(i,o),this._viewModel=i,this._container=e,this._wrapper=o,this._closeDropDown=function(u){o.contains(u.target)||(i.dropDownVisible=!1)},sn.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(X9.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});X9.prototype.isDestroyed=function(){return!1};X9.prototype.destroy=function(){return this._viewModel.destroy(),sn.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),ve.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),fe(this)};var D4=X9;var hMe=new ce;function gMe(e){let t=e.clock;t.currentTime=e.timeJulian,t.shouldAnimate=!1}function ezt(e){let t=e.getPropertyIds(),n="";return t.forEach(function(i){let o=e.getProperty(i);l(o)&&(n+=`<tr><th>${i}</th><td>${o}</td></tr>`)}),n.length>0&&(n=`<table class="cesium-infoBox-defaultTable"><tbody>${n}</tbody></table>`),n}function tzt(e){let t,n=[],i=e.getPropertyIds();for(t=0;t<i.length;t++){let r=i[t];/^name$/i.test(r)?n[0]=e.getProperty(r):/name/i.test(r)?n[1]=e.getProperty(r):/^title$/i.test(r)?n[2]=e.getProperty(r):/^(id|identifier)$/i.test(r)?n[3]=e.getProperty(r):/element/i.test(r)?n[4]=e.getProperty(r):/(id|identifier)$/i.test(r)&&(n[5]=e.getProperty(r))}let o=n.length;for(t=0;t<o;t++){let r=n[t];if(l(r)&&r!=="")return r}return"Unnamed Feature"}function mMe(e,t){let n=e.scene.pick(t.position);if(l(n)){let i=n.id??n.primitive.id;if(i instanceof jo)return i;if(n instanceof Qa||n instanceof eC)return new jo({name:tzt(n),description:ezt(n),feature:n})}if(l(e.scene.globe))return ozt(e,t.position)}var nzt=new Q;function Tre(e,t){if(l(t)){let n=t.clock;if(l(n)&&l(e)){let i=n.startTime,o=n.stopTime;Q.equals(i,o)&&(o=Q.addSeconds(i,D.EPSILON2,nzt)),e.updateFromClock(),e.zoomTo(i,o)}}}var izt=new h;function ozt(e,t){let n=e.scene,i=n.camera.getPickRay(t),o=n.imageryLayers.pickImageryLayerFeatures(i,n);if(!l(o))return;let r=new jo({id:"Loading...",description:"Loading feature information..."});return o.then(function(a){if(e.selectedEntity!==r)return;if(!l(a)||a.length===0){e.selectedEntity=pMe();return}let s=a[0],c=new jo({id:s.name,description:s.description});if(l(s.position)){let u=e.scene.ellipsoid.cartographicToCartesian(s.position,izt);c.position=new zl(u)}e.selectedEntity=c},function(){e.selectedEntity===r&&(e.selectedEntity=pMe())}),r}function pMe(){return new jo({id:"None",description:"No features found."})}function rzt(e,t){let n=e._geocoder,i=e._homeButton,o=e._sceneModePicker,r=e._projectionPicker,a=e._baseLayerPicker,s=e._animation,c=e._timeline,u=e._fullscreenButton,f=e._infoBox,d=e._selectionIndicator,p=t?"hidden":"visible";if(l(n)&&(n.container.style.visibility=p),l(i)&&(i.container.style.visibility=p),l(o)&&(o.container.style.visibility=p),l(r)&&(r.container.style.visibility=p),l(a)&&(a.container.style.visibility=p),l(s)&&(s.container.style.visibility=p),l(c)&&(c.container.style.visibility=p),l(u)&&u.viewModel.isFullscreenEnabled&&(u.container.style.visibility=p),l(f)&&(f.container.style.visibility=p),l(d)&&(d.container.style.visibility=p),e._container){let g=t||!l(u)?0:u.container.clientWidth;e._vrButton.container.style.right=`${g}px`,e.forceResize()}}function lo(e,t){e=On(e),t=t??G.EMPTY_OBJECT;let n=(!l(t.globe)||t.globe!==!1)&&(!l(t.baseLayerPicker)||t.baseLayerPicker!==!1),i=this,o=document.createElement("div");o.className="cesium-viewer",e.appendChild(o);let r=document.createElement("div");r.className="cesium-viewer-cesiumWidgetContainer",o.appendChild(r);let a=document.createElement("div");a.className="cesium-viewer-bottom",o.appendChild(a);let s=t.scene3DOnly??!1,c,u,f=!1;l(t.clockViewModel)?(u=t.clockViewModel,c=u.clock):(c=new Tm,u=new jV(c),f=!0);let d=new HU(r,{baseLayer:n&&l(t.selectedImageryProviderViewModel)||l(t.baseLayer)||l(t.imageryProvider)?!1:void 0,clock:c,shouldAnimate:t.shouldAnimate,skyBox:t.skyBox,skyAtmosphere:t.skyAtmosphere,sceneMode:t.sceneMode,ellipsoid:t.ellipsoid,mapProjection:t.mapProjection,globe:t.globe,orderIndependentTranslucency:t.orderIndependentTranslucency,automaticallyTrackDataSourceClocks:t.automaticallyTrackDataSourceClocks,contextOptions:t.contextOptions,useDefaultRenderLoop:t.useDefaultRenderLoop,targetFrameRate:t.targetFrameRate,showRenderLoopErrors:t.showRenderLoopErrors,useBrowserRecommendedResolution:t.useBrowserRecommendedResolution,creditContainer:l(t.creditContainer)?t.creditContainer:a,creditViewport:t.creditViewport,dataSources:t.dataSources,scene3DOnly:s,shadows:t.shadows,terrainShadows:t.terrainShadows,mapMode2D:t.mapMode2D,blurActiveElementOnCanvasFocus:t.blurActiveElementOnCanvasFocus,requestRenderMode:t.requestRenderMode,maximumRenderTimeChange:t.maximumRenderTimeChange,depthPlaneEllipsoidOffset:t.depthPlaneEllipsoidOffset,msaaSamples:t.msaaSamples}),p=d.scene,g=new Nr;g.add(c.onTick,lo.prototype._onTick,this);let m;if(!l(t.selectionIndicator)||t.selectionIndicator!==!1){let H=document.createElement("div");H.className="cesium-viewer-selectionIndicatorContainer",o.appendChild(H),m=new b4(H,p)}let A;if(!l(t.infoBox)||t.infoBox!==!1){let H=document.createElement("div");H.className="cesium-viewer-infoBoxContainer",o.appendChild(H),A=new d4(H);let q=A.viewModel;g.add(q.cameraClicked,lo.prototype._onInfoBoxCameraClicked,this),g.add(q.closeClicked,lo.prototype._onInfoBoxClockClicked,this)}let y=document.createElement("div");y.className="cesium-viewer-toolbar",o.appendChild(y);let x;if(!l(t.geocoder)||t.geocoder!==!1){let H=document.createElement("div");H.className="cesium-viewer-geocoderContainer",y.appendChild(H);let q;typeof t.geocoder=="string"?q=[new ZT({scene:p,geocodeProviderType:t.geocoder})]:l(t.geocoder)&&typeof t.geocoder!="boolean"&&(q=Array.isArray(t.geocoder)?t.geocoder:[t.geocoder]),x=new s4({container:H,geocoderServices:q,scene:p}),g.add(x.viewModel.search.beforeExecute,lo.prototype._clearObjects,this)}let b;(!l(t.homeButton)||t.homeButton!==!1)&&(b=new l4(y,p),l(x)&&g.add(b.viewModel.command.afterExecute,function(){let H=x.viewModel;H.searchText="",H.isSearchInProgress&&H.search()}),g.add(b.viewModel.command.beforeExecute,lo.prototype._clearTrackedObject,this));let C;!s&&(!l(t.sceneModePicker)||t.sceneModePicker!==!1)&&(C=new D4(y,p));let E;t.projectionPicker&&(E=new A4(y,p));let S,w;if(n){let H=t.imageryProviderViewModels??KV(),q=t.terrainProviderViewModels??QV();S=new XV(y,{globe:p.globe,imageryProviderViewModels:H,selectedImageryProviderViewModel:t.selectedImageryProviderViewModel,terrainProviderViewModels:q,selectedTerrainProviderViewModel:t.selectedTerrainProviderViewModel}),w=y.getElementsByClassName("cesium-baseLayerPicker-dropDown")[0]}l(t.baseLayer)&&t.baseLayer!==!1&&(n&&(S.viewModel.selectedImagery=void 0),p.imageryLayers.removeAll(),p.imageryLayers.add(t.baseLayer)),l(t.terrainProvider)&&(n&&(S.viewModel.selectedTerrain=void 0),p.terrainProvider=t.terrainProvider),l(t.terrain)&&(n&&(p.globe.depthTestAgainstTerrain=!0),p.setTerrain(t.terrain));let P;if(!l(t.navigationHelpButton)||t.navigationHelpButton!==!1){let H=!0;try{if(l(window.localStorage)){let q=window.localStorage.getItem("cesium-hasSeenNavHelp");l(q)&&q?H=!1:window.localStorage.setItem("cesium-hasSeenNavHelp","true")}}catch{}P=new m4({container:y,instructionsInitiallyVisible:t.navigationInstructionsInitiallyVisible??H})}let R;if(!l(t.animation)||t.animation!==!1){let H=document.createElement("div");H.className="cesium-viewer-animationContainer",o.appendChild(H),R=new WV(H,new qV(u))}let B;if(!l(t.timeline)||t.timeline!==!1){let H=document.createElement("div");H.className="cesium-viewer-timelineContainer",o.appendChild(H),B=new E4(H,c),B.addEventListener("settime",gMe,!1),B.zoomTo(c.startTime,c.stopTime)}let L,_,T;(!l(t.fullscreenButton)||t.fullscreenButton!==!1)&&(T=document.createElement("div"),T.className="cesium-viewer-fullscreenContainer",o.appendChild(T),L=new r4(T,t.fullscreenElement),_=yc(L.viewModel,"isFullscreenEnabled",function(H){T.style.display=H?"block":"none",l(B)&&(B.container.style.right=`${T.clientWidth}px`,B.resize())}));let v,I,O;if(t.vrButton){let H=document.createElement("div");H.className="cesium-viewer-vrContainer",o.appendChild(H),v=new w4(H,p,t.fullScreenElement),I=yc(v.viewModel,"isVREnabled",function(q){H.style.display=q?"block":"none",l(L)&&(H.style.right=`${T.clientWidth}px`),l(B)&&(B.container.style.right=`${H.clientWidth}px`,B.resize())}),O=yc(v.viewModel,"isVRMode",function(q){rzt(i,q)})}this._baseLayerPickerDropDown=w,this._fullscreenSubscription=_,this._vrSubscription=I,this._vrModeSubscription=O,this._dataSourceChangedListeners={},this._container=e,this._bottomContainer=a,this._element=o,this._cesiumWidget=d,this._selectionIndicator=m,this._infoBox=A,this._clockViewModel=u,this._destroyClockViewModel=f,this._toolbar=y,this._homeButton=b,this._sceneModePicker=C,this._projectionPicker=E,this._baseLayerPicker=S,this._navigationHelpButton=P,this._animation=R,this._timeline=B,this._fullscreenButton=L,this._vrButton=v,this._geocoder=x,this._eventHelper=g,this._lastWidth=0,this._lastHeight=0,this._enableInfoOrSelection=l(A)||l(m),this._selectedEntity=void 0,this._selectedEntityChanged=new ye;let N=this._cesiumWidget.dataSources,j=this._cesiumWidget.dataSourceDisplay;g.add(N.dataSourceAdded,lo.prototype._onDataSourceAdded,this),g.add(N.dataSourceRemoved,lo.prototype._onDataSourceRemoved,this),g.add(p.postUpdate,lo.prototype.resize,this);let k=N.length;for(let H=0;H<k;H++)this._dataSourceAdded(N,N.get(H));this._dataSourceAdded(void 0,j.defaultDataSource),g.add(N.dataSourceAdded,lo.prototype._dataSourceAdded,this),g.add(N.dataSourceRemoved,lo.prototype._dataSourceRemoved,this);function U(H){let q=mMe(i,H);l(q)?X.getValueOrUndefined(q.position,i.clock.currentTime)?i.trackedEntity=q:i.zoomTo(q):l(i.trackedEntity)&&(i.trackedEntity=void 0)}function F(H){i.selectedEntity=mMe(i,H)}d.screenSpaceEventHandler.setInputAction(F,Sn.LEFT_CLICK),d.screenSpaceEventHandler.setInputAction(U,Sn.LEFT_DOUBLE_CLICK),d._canAnimateUpdateCallback=this._updateCanAnimate(this)}Object.defineProperties(lo.prototype,{container:{get:function(){return this._container}},creditDisplay:{get:function(){return this._cesiumWidget.creditDisplay}},bottomContainer:{get:function(){return this._bottomContainer}},cesiumWidget:{get:function(){return this._cesiumWidget}},selectionIndicator:{get:function(){return this._selectionIndicator}},infoBox:{get:function(){return this._infoBox}},geocoder:{get:function(){return this._geocoder}},homeButton:{get:function(){return this._homeButton}},sceneModePicker:{get:function(){return this._sceneModePicker}},projectionPicker:{get:function(){return this._projectionPicker}},baseLayerPicker:{get:function(){return this._baseLayerPicker}},navigationHelpButton:{get:function(){return this._navigationHelpButton}},animation:{get:function(){return this._animation}},timeline:{get:function(){return this._timeline}},fullscreenButton:{get:function(){return this._fullscreenButton}},vrButton:{get:function(){return this._vrButton}},dataSourceDisplay:{get:function(){return this._cesiumWidget.dataSourceDisplay}},entities:{get:function(){return this._cesiumWidget.entities}},dataSources:{get:function(){return this._cesiumWidget.dataSources}},canvas:{get:function(){return this._cesiumWidget.canvas}},scene:{get:function(){return this._cesiumWidget.scene}},shadows:{get:function(){return this.scene.shadowMap.enabled},set:function(e){this.scene.shadowMap.enabled=e}},terrainShadows:{get:function(){return this.scene.globe.shadows},set:function(e){this.scene.globe.shadows=e}},shadowMap:{get:function(){return this.scene.shadowMap}},imageryLayers:{get:function(){return this.scene.imageryLayers}},terrainProvider:{get:function(){return this.scene.terrainProvider},set:function(e){this.scene.terrainProvider=e}},camera:{get:function(){return this.scene.camera}},ellipsoid:{get:function(){return this.scene.ellipsoid}},postProcessStages:{get:function(){return this.scene.postProcessStages}},clock:{get:function(){return this._clockViewModel.clock}},clockViewModel:{get:function(){return this._clockViewModel}},screenSpaceEventHandler:{get:function(){return this._cesiumWidget.screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._cesiumWidget.targetFrameRate},set:function(e){this._cesiumWidget.targetFrameRate=e}},useDefaultRenderLoop:{get:function(){return this._cesiumWidget.useDefaultRenderLoop},set:function(e){this._cesiumWidget.useDefaultRenderLoop=e}},resolutionScale:{get:function(){return this._cesiumWidget.resolutionScale},set:function(e){this._cesiumWidget.resolutionScale=e}},useBrowserRecommendedResolution:{get:function(){return this._cesiumWidget.useBrowserRecommendedResolution},set:function(e){this._cesiumWidget.useBrowserRecommendedResolution=e}},allowDataSourcesToSuspendAnimation:{get:function(){return this._cesiumWidget.allowDataSourcesToSuspendAnimation},set:function(e){this._cesiumWidget.allowDataSourcesToSuspendAnimation=e}},trackedEntity:{get:function(){return this._cesiumWidget.trackedEntity},set:function(e){this._cesiumWidget.trackedEntity=e}},selectedEntity:{get:function(){return this._selectedEntity},set:function(e){if(this._selectedEntity!==e){this._selectedEntity=e;let t=l(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;l(e)?l(t)&&t.animateAppear():l(t)&&t.animateDepart(),this._selectedEntityChanged.raiseEvent(e)}}},selectedEntityChanged:{get:function(){return this._selectedEntityChanged}},trackedEntityChanged:{get:function(){return this._cesiumWidget.trackedEntityChanged}},clockTrackedDataSource:{get:function(){return this._cesiumWidget.clockTrackedDataSource},set:function(e){this._cesiumWidget.clockTrackedDataSource!==e&&(this._cesiumWidget.clockTrackedDataSource=e,Tre(this._timeline,e))}}});lo.prototype.extend=function(e,t){e(this,t)};lo.prototype.resize=function(){let e=this._cesiumWidget,t=this._container,n=t.clientWidth,i=t.clientHeight,o=l(this._animation),r=l(this._timeline);if(e.resize(),n===this._lastWidth&&i===this._lastHeight)return;let a=i-125,s=this._baseLayerPickerDropDown;if(l(s)&&(s.style.maxHeight=`${a}px`),l(this._geocoder)){let m=this._geocoder.searchSuggestionsContainer;m.style.maxHeight=`${a}px`}l(this._infoBox)&&(this._infoBox.viewModel.maxHeight=a);let c=this._timeline,u,f=0,d=5,p=3,g=0;if(o&&window.getComputedStyle(this._animation.container).visibility!=="hidden"){let m=this._lastWidth;u=this._animation.container,n>900?(f=169,m<=900&&(u.style.width="169px",u.style.height="112px",this._animation.resize())):n>=600?(f=136,(m<600||m>900)&&(u.style.width="136px",u.style.height="90px",this._animation.resize())):(f=106,(m>600||m===0)&&(u.style.width="106px",u.style.height="70px",this._animation.resize())),d=f+5}if(r&&window.getComputedStyle(this._timeline.container).visibility!=="hidden"){let m=this._fullscreenButton,A=this._vrButton,y=c.container,x=y.style;p=y.clientHeight+3,x.left=`${f}px`;let b=0;l(m)&&(b+=m.container.clientWidth),l(A)&&(b+=A.container.clientWidth),x.right=`${b}px`,c.resize()}!r&&l(this._fullscreenButton)&&(g=this._fullscreenButton.container.clientWidth),this._bottomContainer.style.left=`${d}px`,this._bottomContainer.style.bottom=`${p}px`,this._bottomContainer.style.right=`${g}px`,this._lastWidth=n,this._lastHeight=i};lo.prototype.forceResize=function(){this._lastWidth=0,this.resize()};lo.prototype.render=function(){this._cesiumWidget.render()};lo.prototype.isDestroyed=function(){return!1};lo.prototype.destroy=function(){return l(this.screenSpaceEventHandler)&&!this.screenSpaceEventHandler.isDestroyed()&&(this.screenSpaceEventHandler.removeInputAction(Sn.LEFT_CLICK),this.screenSpaceEventHandler.removeInputAction(Sn.LEFT_DOUBLE_CLICK)),this._container.removeChild(this._element),this._element.removeChild(this._toolbar),this._eventHelper.removeAll(),l(this._geocoder)&&(this._geocoder=this._geocoder.destroy()),l(this._homeButton)&&(this._homeButton=this._homeButton.destroy()),l(this._sceneModePicker)&&(this._sceneModePicker=this._sceneModePicker.destroy()),l(this._projectionPicker)&&(this._projectionPicker=this._projectionPicker.destroy()),l(this._baseLayerPicker)&&(this._baseLayerPicker=this._baseLayerPicker.destroy()),l(this._animation)&&(this._element.removeChild(this._animation.container),this._animation=this._animation.destroy()),l(this._timeline)&&(this._timeline.removeEventListener("settime",gMe,!1),this._element.removeChild(this._timeline.container),this._timeline=this._timeline.destroy()),l(this._fullscreenButton)&&(this._fullscreenSubscription.dispose(),this._element.removeChild(this._fullscreenButton.container),this._fullscreenButton=this._fullscreenButton.destroy()),l(this._vrButton)&&(this._vrSubscription.dispose(),this._vrModeSubscription.dispose(),this._element.removeChild(this._vrButton.container),this._vrButton=this._vrButton.destroy()),l(this._infoBox)&&(this._element.removeChild(this._infoBox.container),this._infoBox=this._infoBox.destroy()),l(this._selectionIndicator)&&(this._element.removeChild(this._selectionIndicator.container),this._selectionIndicator=this._selectionIndicator.destroy()),this._destroyClockViewModel&&(this._clockViewModel=this._clockViewModel.destroy()),this._cesiumWidget=this._cesiumWidget.destroy(),fe(this)};lo.prototype._dataSourceAdded=function(e,t){t.entities.collectionChanged.addEventListener(lo.prototype._onEntityCollectionChanged,this)};lo.prototype._dataSourceRemoved=function(e,t){let n=t.entities;n.collectionChanged.removeEventListener(lo.prototype._onEntityCollectionChanged,this),l(this.selectedEntity)&&n.getById(this.selectedEntity.id)===this.selectedEntity&&(this.selectedEntity=void 0)};lo.prototype._updateCanAnimate=function(e){return function(t){e._clockViewModel.canAnimate=t}};lo.prototype._onTick=function(e){let t=e.currentTime,n,i=!1,o=this.selectedEntity,r=l(o)&&this._enableInfoOrSelection;r&&o.isShowing&&o.isAvailable(t)&&(this._cesiumWidget.dataSourceDisplay.getBoundingSphere(o,!0,hMe)!==bt.FAILED?n=hMe.center:l(o.position)&&(n=o.position.getValue(t,n)),i=l(n));let a=l(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;l(a)&&(a.position=h.clone(n,a.position),a.showSelection=r&&i,a.update());let s=l(this._infoBox)?this._infoBox.viewModel:void 0;l(s)&&(s.showInfo=r,s.enableCamera=i,s.isCameraTracking=this.trackedEntity===this.selectedEntity,r?(s.titleText=o.name??o.id,s.description=X.getValueOrDefault(o.description,t,"")):(s.titleText="",s.description=""))};lo.prototype._onEntityCollectionChanged=function(e,t,n){let i=n.length;for(let o=0;o<i;o++){let r=n[o];this.selectedEntity===r&&(this.selectedEntity=void 0)}};lo.prototype._onInfoBoxCameraClicked=function(e){if(e.isCameraTracking&&this.trackedEntity===this.selectedEntity)this.trackedEntity=void 0;else{let n=this.selectedEntity.position;l(n)?this.trackedEntity=this.selectedEntity:this.zoomTo(this.selectedEntity)}};lo.prototype._clearTrackedObject=function(){this.trackedEntity=void 0};lo.prototype._onInfoBoxClockClicked=function(e){this.selectedEntity=void 0};lo.prototype._clearObjects=function(){this.trackedEntity=void 0,this.selectedEntity=void 0};lo.prototype._onDataSourceChanged=function(e){this.clockTrackedDataSource===e&&Tre(this.timeline,e)};lo.prototype._onDataSourceAdded=function(e,t){this._cesiumWidget._automaticallyTrackDataSourceClocks&&t===this.clockTrackedDataSource&&Tre(this._timeline,t);let n=t.entities.id,i=this._eventHelper.add(t.changedEvent,lo.prototype._onDataSourceChanged,this);this._dataSourceChangedListeners[n]=i};lo.prototype._onDataSourceRemoved=function(e,t){let n=t.entities.id;this._dataSourceChangedListeners[n](),this._dataSourceChangedListeners[n]=void 0};lo.prototype.zoomTo=function(e,t){return this._cesiumWidget.zoomTo(e,t)};lo.prototype.flyTo=function(e,t){return this._cesiumWidget.flyTo(e,t)};var Ere=lo;function azt(e){let t=document.createElement("div");t.className="cesium-viewer-cesium3DTilesInspectorContainer",e.container.appendChild(t);let n=new e4(t,e.scene);Object.defineProperties(e,{cesium3DTilesInspector:{get:function(){return n}}})}var vre=azt;function szt(e){let t=document.createElement("div");t.className="cesium-viewer-cesiumInspectorContainer",e.container.appendChild(t);let n=new i4(t,e.scene);Object.defineProperties(e,{cesiumInspector:{get:function(){return n}}})}var Sre=szt;function czt(e,t){t=t??G.EMPTY_OBJECT;let n=!0,i=t.flyToOnDrop??!0,o=new ye,r=t.clearOnDrop??!0,a=t.dropTarget??e.container,s=t.clampToGround??!0,c=t.proxy;a=On(a),Object.defineProperties(e,{dropTarget:{get:function(){return a},set:function(f){_Me(a,u),a=f,wre(a,u)}},dropEnabled:{get:function(){return n},set:function(f){f!==n&&(f?wre(a,u):_Me(a,u),n=f)}},dropError:{get:function(){return o}},clearOnDrop:{get:function(){return r},set:function(f){r=f}},flyToOnDrop:{get:function(){return i},set:function(f){i=f}},proxy:{get:function(){return c},set:function(f){c=f}},clampToGround:{get:function(){return s},set:function(f){s=f}}});function u(f){oE(f),r&&(e.entities.removeAll(),e.dataSources.removeAll());let d=f.dataTransfer.files,p=d.length;for(let g=0;g<p;g++){let m=d[g],A=new FileReader;A.onload=lzt(e,m,c,s),A.onerror=uzt(e,m),A.readAsText(m)}}wre(a,u),e.destroy=FV(e,e.destroy,function(){e.dropEnabled=!1}),e._handleDrop=u}function oE(e){e.stopPropagation(),e.preventDefault()}function _Me(e,t){let n=e;l(n)&&(n.removeEventListener("drop",t,!1),n.removeEventListener("dragenter",oE,!1),n.removeEventListener("dragover",oE,!1),n.removeEventListener("dragexit",oE,!1))}function wre(e,t){e.addEventListener("drop",t,!1),e.addEventListener("dragenter",oE,!1),e.addEventListener("dragover",oE,!1),e.addEventListener("dragexit",oE,!1)}function lzt(e,t,n,i){let o=e.scene;return function(r){let a=t.name;try{let s;if(/\.czml$/i.test(a))s=f2.load(JSON.parse(r.target.result),{sourceUri:a});else if(/\.geojson$/i.test(a)||/\.json$/i.test(a)||/\.topojson$/i.test(a))s=Ty.load(JSON.parse(r.target.result),{sourceUri:a,clampToGround:i});else if(/\.(kml|kmz)$/i.test(a))s=ZC.load(t,{sourceUri:a,proxy:n,camera:o.camera,canvas:o.canvas,clampToGround:i,screenOverlayContainer:e.container});else if(/\.gpx$/i.test(a))s=uk.load(t,{sourceUri:a,proxy:n});else{e.dropError.raiseEvent(e,a,`Unrecognized file: ${a}`);return}l(s)&&e.dataSources.add(s).then(function(c){e.flyToOnDrop&&e.flyTo(c)}).catch(function(c){e.dropError.raiseEvent(e,a,c)})}catch(s){e.dropError.raiseEvent(e,a,s)}}}function uzt(e,t){return function(n){e.dropError.raiseEvent(e,t.name,n.target.error)}}var Ire=czt;function fzt(e,t){t=t??G.EMPTY_OBJECT;let n=new g4({scene:e.scene,container:e.bottomContainer,lowFrameRateMessage:t.lowFrameRateMessage});Object.defineProperties(e,{performanceWatchdog:{get:function(){return n}}})}var Dre=fzt;function AMe(e){let t=e.split(`
- `),n;for(n=0;n<t.length&&!t[n].match(/\S/);n++);if(n===t.length)return"";let i="",o=/^\s*/,a=t[n].match(o)[0].length;for(let s=n;s<t.length;s++){let c=t[s];c.match(o)[0].length>=a&&(c=c.slice(a)),i+=`${c}
- `}return i}function bh(e){this._scene=e,this._voxelPrimitive=void 0,this._customShaderCompilationRemoveCallback=void 0,this._definedProperties=[],this._getPrimitiveFunctions=[],this._modelMatrixReady=!1;let t=this;function n(o){let{name:r,initialValue:a}=o;t._definedProperties.push(r);let s=o.setPrimitiveFunction;s===!0&&(s=function(f){t._voxelPrimitive[r]=f});let c=o.getPrimitiveFunction;c===!0&&(c=function(){t[r]=t._voxelPrimitive[r]}),l(c)&&t._getPrimitiveFunctions.push(c);let u=ve.observable();return ve.defineProperty(t,r,{get:function(){return u()},set:function(f){typeof a=="number"&&typeof f=="string"&&(f=Number(f),isNaN(f)&&(f=a)),typeof a=="boolean"&&typeof f=="number"&&(f=f===1),u(f),l(s)&&l(t._voxelPrimitive)&&(s(f),e.requestRender())}}),t[r]=a,u}function i(o,r){return function(a){let s=t._voxelPrimitive[o].clone();s[r]=a,t._voxelPrimitive[o]=s}}n({name:"inspectorVisible",initialValue:!0}),n({name:"displayVisible",initialValue:!1}),n({name:"transformVisible",initialValue:!1}),n({name:"boundsVisible",initialValue:!1}),n({name:"clippingVisible",initialValue:!1}),n({name:"shaderVisible",initialValue:!1}),n({name:"shaderString",initialValue:"",getPrimitiveFunction:function(){let o=t._voxelPrimitive.customShader.fragmentShaderText;t.shaderString=AMe(o)}}),n({name:"shaderCompilationMessage",initialValue:""}),n({name:"shaderCompilationSuccess",initialValue:!0}),n({name:"depthTest",initialValue:!1,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),n({name:"show",initialValue:!0,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),n({name:"disableUpdate",initialValue:!1,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),n({name:"debugDraw",initialValue:!1,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),n({name:"jitter",initialValue:!0,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),n({name:"nearestSampling",initialValue:!0,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),n({name:"screenSpaceError",initialValue:4,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),n({name:"stepSize",initialValue:1,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),n({name:"shapeIsBox",getPrimitiveFunction:function(){let o=t._voxelPrimitive.shape;t.shapeIsBox=o===Ac.BOX}}),n({name:"shapeIsEllipsoid",getPrimitiveFunction:function(){let o=t._voxelPrimitive.shape;t.shapeIsEllipsoid=o===Ac.ELLIPSOID}}),n({name:"shapeIsCylinder",getPrimitiveFunction:function(){let o=t._voxelPrimitive.shape;t.shapeIsCylinder=o===Ac.CYLINDER}}),n({name:"clippingBoxMaxXMin",initialValue:0,getPrimitiveFunction:function(){t.clippingBoxMaxXMin=t._voxelPrimitive.minBounds.x}}),n({name:"clippingBoxMaxXMax",initialValue:1,getPrimitiveFunction:function(){t.clippingBoxMaxXMax=t._voxelPrimitive.maxBounds.x}}),n({name:"clippingBoxMaxX",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","x"),getPrimitiveFunction:function(){t.clippingBoxMaxX=t._voxelPrimitive.maxClippingBounds.x}}),n({name:"clippingBoxMinXMin",initialValue:0,getPrimitiveFunction:function(){t.clippingBoxMinXMin=t._voxelPrimitive.minBounds.x}}),n({name:"clippingBoxMinXMax",initialValue:1,getPrimitiveFunction:function(){t.clippingBoxMinXMax=t._voxelPrimitive.maxBounds.x}}),n({name:"clippingBoxMinX",initialValue:0,setPrimitiveFunction:i("minClippingBounds","x"),getPrimitiveFunction:function(){t.clippingBoxMinX=t._voxelPrimitive.minClippingBounds.x}}),n({name:"clippingBoxMaxYMin",initialValue:0,getPrimitiveFunction:function(){t.clippingBoxMaxYMin=t._voxelPrimitive.minBounds.y}}),n({name:"clippingBoxMaxYMax",initialValue:1,getPrimitiveFunction:function(){t.clippingBoxMaxYMax=t._voxelPrimitive.maxBounds.y}}),n({name:"clippingBoxMaxY",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","y"),getPrimitiveFunction:function(){t.clippingBoxMaxY=t._voxelPrimitive.maxClippingBounds.y}}),n({name:"clippingBoxMinYMin",initialValue:0,getPrimitiveFunction:function(){t.clippingBoxMinYMin=t._voxelPrimitive.minBounds.y}}),n({name:"clippingBoxMinYMax",initialValue:1,getPrimitiveFunction:function(){t.clippingBoxMinYMax=t._voxelPrimitive.maxBounds.y}}),n({name:"clippingBoxMinY",initialValue:0,setPrimitiveFunction:i("minClippingBounds","y"),getPrimitiveFunction:function(){t.clippingBoxMinY=t._voxelPrimitive.minClippingBounds.y}}),n({name:"clippingBoxMaxZMin",initialValue:0,getPrimitiveFunction:function(){t.clippingBoxMaxZMin=t._voxelPrimitive.minBounds.z}}),n({name:"clippingBoxMaxZMax",initialValue:1,getPrimitiveFunction:function(){t.clippingBoxMaxZMax=t._voxelPrimitive.maxBounds.z}}),n({name:"clippingBoxMaxZ",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","z"),getPrimitiveFunction:function(){t.clippingBoxMaxZ=t._voxelPrimitive.maxClippingBounds.z}}),n({name:"clippingBoxMinZMin",initialValue:0,getPrimitiveFunction:function(){t.clippingBoxMinZMin=t._voxelPrimitive.minBounds.z}}),n({name:"clippingBoxMinZMax",initialValue:1,getPrimitiveFunction:function(){t.clippingBoxMinZMax=t._voxelPrimitive.maxBounds.z}}),n({name:"clippingBoxMinZ",initialValue:0,setPrimitiveFunction:i("minClippingBounds","z"),getPrimitiveFunction:function(){t.clippingBoxMinZ=t._voxelPrimitive.minClippingBounds.z}}),n({name:"clippingEllipsoidMaxLongitudeMin",initialValue:-D.PI,getPrimitiveFunction:function(){t.clippingEllipsoidMaxLongitudeMin=t._voxelPrimitive.minBounds.x}}),n({name:"clippingEllipsoidMaxLongitudeMax",initialValue:D.PI,getPrimitiveFunction:function(){t.clippingEllipsoidMaxLongitudeMax=t._voxelPrimitive.maxBounds.x}}),n({name:"clippingEllipsoidMaxLongitude",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","x"),getPrimitiveFunction:function(){t.clippingEllipsoidMaxLongitude=t._voxelPrimitive.maxClippingBounds.x}}),n({name:"clippingEllipsoidMinLongitudeMin",initialValue:-D.PI,getPrimitiveFunction:function(){t.clippingEllipsoidMinLongitudeMin=t._voxelPrimitive.minBounds.x}}),n({name:"clippingEllipsoidMinLongitudeMax",initialValue:D.PI,getPrimitiveFunction:function(){t.clippingEllipsoidMinLongitudeMax=t._voxelPrimitive.maxBounds.x}}),n({name:"clippingEllipsoidMinLongitude",initialValue:0,setPrimitiveFunction:i("minClippingBounds","x"),getPrimitiveFunction:function(){t.clippingEllipsoidMinLongitude=t._voxelPrimitive.minClippingBounds.x}}),n({name:"clippingEllipsoidMaxLatitudeMin",initialValue:-D.PI_OVER_TWO,getPrimitiveFunction:function(){t.clippingEllipsoidMaxLatitudeMin=t._voxelPrimitive.minBounds.y}}),n({name:"clippingEllipsoidMaxLatitudeMax",initialValue:D.PI_OVER_TWO,getPrimitiveFunction:function(){t.clippingEllipsoidMaxLatitudeMax=t._voxelPrimitive.maxBounds.y}}),n({name:"clippingEllipsoidMaxLatitude",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","y"),getPrimitiveFunction:function(){t.clippingEllipsoidMaxLatitude=t._voxelPrimitive.maxClippingBounds.y}}),n({name:"clippingEllipsoidMinLatitudeMin",initialValue:-D.PI_OVER_TWO,getPrimitiveFunction:function(){t.clippingEllipsoidMinLatitudeMin=t._voxelPrimitive.minBounds.y}}),n({name:"clippingEllipsoidMinLatitudeMax",initialValue:D.PI_OVER_TWO,getPrimitiveFunction:function(){t.clippingEllipsoidMinLatitudeMax=t._voxelPrimitive.maxBounds.y}}),n({name:"clippingEllipsoidMinLatitude",initialValue:0,setPrimitiveFunction:i("minClippingBounds","y"),getPrimitiveFunction:function(){t.clippingEllipsoidMinLatitude=t._voxelPrimitive.minClippingBounds.y}}),n({name:"clippingEllipsoidMaxHeightMin",initialValue:0,getPrimitiveFunction:function(){t.clippingEllipsoidMaxHeightMin=t._voxelPrimitive.minBounds.z}}),n({name:"clippingEllipsoidMaxHeightMax",initialValue:1e5,getPrimitiveFunction:function(){t.clippingEllipsoidMaxHeightMax=t._voxelPrimitive.maxBounds.z}}),n({name:"clippingEllipsoidMaxHeight",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","z"),getPrimitiveFunction:function(){t.clippingEllipsoidMaxHeight=t._voxelPrimitive.maxClippingBounds.z}}),n({name:"clippingEllipsoidMinHeightMin",initialValue:-1e5,getPrimitiveFunction:function(){t.clippingEllipsoidMinHeightMin=t._voxelPrimitive.minBounds.z}}),n({name:"clippingEllipsoidMinHeightMax",initialValue:0,getPrimitiveFunction:function(){t.clippingEllipsoidMinHeightMax=t._voxelPrimitive.maxBounds.z}}),n({name:"clippingEllipsoidMinHeight",initialValue:0,setPrimitiveFunction:i("minClippingBounds","z"),getPrimitiveFunction:function(){t.clippingEllipsoidMinHeight=t._voxelPrimitive.minClippingBounds.z}}),n({name:"clippingCylinderMaxRadiusMin",initialValue:0,getPrimitiveFunction:function(){t.clippingCylinderMaxRadiusMin=t._voxelPrimitive.minBounds.x}}),n({name:"clippingCylinderMaxRadiusMax",initialValue:1,getPrimitiveFunction:function(){t.clippingCylinderMaxRadiusMax=t._voxelPrimitive.maxBounds.x}}),n({name:"clippingCylinderMaxRadius",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","x"),getPrimitiveFunction:function(){t.clippingCylinderMaxRadius=t._voxelPrimitive.maxClippingBounds.x}}),n({name:"clippingCylinderMinRadiusMin",initialValue:0,getPrimitiveFunction:function(){t.clippingCylinderMinRadiusMin=t._voxelPrimitive.minBounds.x}}),n({name:"clippingCylinderMinRadiusMax",initialValue:1,getPrimitiveFunction:function(){t.clippingCylinderMinRadiusMax=t._voxelPrimitive.maxBounds.x}}),n({name:"clippingCylinderMinRadius",initialValue:0,setPrimitiveFunction:i("minClippingBounds","x"),getPrimitiveFunction:function(){t.clippingCylinderMinRadius=t._voxelPrimitive.minClippingBounds.x}}),n({name:"clippingCylinderMaxAngleMin",initialValue:-D.PI,getPrimitiveFunction:function(){t.clippingCylinderMaxAngleMin=t._voxelPrimitive.minBounds.y}}),n({name:"clippingCylinderMaxAngleMax",initialValue:D.PI,getPrimitiveFunction:function(){t.clippingCylinderMaxAngleMax=t._voxelPrimitive.maxBounds.y}}),n({name:"clippingCylinderMaxAngle",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","y"),getPrimitiveFunction:function(){t.clippingCylinderMaxAngle=t._voxelPrimitive.maxClippingBounds.y}}),n({name:"clippingCylinderMinAngleMin",initialValue:-D.PI}),n({name:"clippingCylinderMinAngleMax",initialValue:D.PI}),n({name:"clippingCylinderMinAngle",initialValue:0,setPrimitiveFunction:i("minClippingBounds","y"),getPrimitiveFunction:function(){t.clippingCylinderMinAngle=t._voxelPrimitive.minClippingBounds.y}}),n({name:"clippingCylinderMaxHeightMin",initialValue:-1,getPrimitiveFunction:function(){t.clippingCylinderMaxHeightMin=t._voxelPrimitive.minBounds.z}}),n({name:"clippingCylinderMaxHeightMax",initialValue:1,getPrimitiveFunction:function(){t.clippingCylinderMaxHeightMax=t._voxelPrimitive.maxBounds.z}}),n({name:"clippingCylinderMaxHeight",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","z"),getPrimitiveFunction:function(){t.clippingCylinderMaxHeight=t._voxelPrimitive.maxClippingBounds.z}}),n({name:"clippingCylinderMinHeightMin",initialValue:-1,getPrimitiveFunction:function(){t.clippingCylinderMinHeightMin=t._voxelPrimitive.minBounds.z}}),n({name:"clippingCylinderMinHeightMax",initialValue:1,getPrimitiveFunction:function(){t.clippingCylinderMinHeightMax=t._voxelPrimitive.maxBounds.z}}),n({name:"clippingCylinderMinHeight",initialValue:0,setPrimitiveFunction:i("minClippingBounds","z"),getPrimitiveFunction:function(){t.clippingCylinderMinHeight=t._voxelPrimitive.minClippingBounds.z}}),n({name:"translationX",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&S0(t)},getPrimitiveFunction:function(){t.translationX=M.getTranslation(t._voxelPrimitive.modelMatrix,new h).x}}),n({name:"translationY",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&S0(t)},getPrimitiveFunction:function(){t.translationY=M.getTranslation(t._voxelPrimitive.modelMatrix,new h).y}}),n({name:"translationZ",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&S0(t)},getPrimitiveFunction:function(){t.translationZ=M.getTranslation(t._voxelPrimitive.modelMatrix,new h).z}}),n({name:"scaleX",initialValue:1,setPrimitiveFunction:function(){t._modelMatrixReady&&S0(t)},getPrimitiveFunction:function(){t.scaleX=M.getScale(t._voxelPrimitive.modelMatrix,new h).x}}),n({name:"scaleY",initialValue:1,setPrimitiveFunction:function(){t._modelMatrixReady&&S0(t)},getPrimitiveFunction:function(){t.scaleY=M.getScale(t._voxelPrimitive.modelMatrix,new h).y}}),n({name:"scaleZ",initialValue:1,setPrimitiveFunction:function(){t._modelMatrixReady&&S0(t)},getPrimitiveFunction:function(){t.scaleZ=M.getScale(t._voxelPrimitive.modelMatrix,new h).z}}),n({name:"angleX",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&S0(t)}}),n({name:"angleY",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&S0(t)}}),n({name:"angleZ",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&S0(t)}})}var dzt=new h,hzt=new h,mzt=new Tc,pzt=new $;function S0(e){let t=h.fromElements(e.translationX,e.translationY,e.translationZ,dzt),n=h.fromElements(e.scaleX,e.scaleY,e.scaleZ,hzt),i=mzt;i.heading=e.angleX,i.pitch=e.angleY,i.roll=e.angleZ;let o=$.fromHeadingPitchRoll(i,pzt),r=$.multiplyByScale(o,n,o);e._voxelPrimitive.modelMatrix=M.fromRotationTranslation(r,t,e._voxelPrimitive.modelMatrix)}Object.defineProperties(bh.prototype,{scene:{get:function(){return this._scene}},voxelPrimitive:{get:function(){return this._voxelPrimitive},set:function(e){if(l(this._customShaderCompilationRemoveCallback)&&this._customShaderCompilationRemoveCallback(),!l(e))return;this._voxelPrimitive=e;let t=this;t._customShaderCompilationRemoveCallback=t._voxelPrimitive.customShaderCompilationEvent.addEventListener(function(n){let i=t._voxelPrimitive.customShader.fragmentShaderText;t.shaderString=AMe(i),l(n)?(t.shaderCompilationMessage=n.message,t.shaderCompilationSuccess=!1):(t.shaderCompilationMessage="Shader compiled successfully!",t.shaderCompilationSuccess=!0)}),t._modelMatrixReady=!1;for(let n=0;n<t._getPrimitiveFunctions.length;n++)t._getPrimitiveFunctions[n]();t._modelMatrixReady=!0,S0(t)}}});bh.prototype.toggleInspector=function(){this.inspectorVisible=!this.inspectorVisible};bh.prototype.toggleDisplay=function(){this.displayVisible=!this.displayVisible};bh.prototype.toggleTransform=function(){this.transformVisible=!this.transformVisible};bh.prototype.toggleBounds=function(){this.boundsVisible=!this.boundsVisible};bh.prototype.toggleClipping=function(){this.clippingVisible=!this.clippingVisible};bh.prototype.toggleShader=function(){this.shaderVisible=!this.shaderVisible};bh.prototype.compileShader=function(){l(this._voxelPrimitive)&&(this._voxelPrimitive.customShader=new A0({fragmentShaderText:this.shaderString,uniforms:this._voxelPrimitive.customShader.uniforms}))};bh.prototype.shaderEditorKeyPress=function(e,t){if(t.keyCode===9){t.preventDefault();let n=t.target,i=n.selectionStart,o=n.selectionEnd,r=o,s=n.value.slice(i,o).split(`
- `),c=s.length,u;if(t.shiftKey)for(u=0;u<c;++u)s[u][0]===" "&&(s[u][1]===" "?(s[u]=s[u].substr(2),r-=2):(s[u]=s[u].substr(1),r-=1));else for(u=0;u<c;++u)s[u]=` ${s[u]}`,r+=2;let f=s.join(`
- `);n.value=n.value.slice(0,i)+f+n.value.slice(o),n.selectionStart=i!==o?i:r,n.selectionEnd=r}else t.ctrlKey&&(t.keyCode===10||t.keyCode===13)&&this.compileShader();return!0};bh.prototype.isDestroyed=function(){return!1};bh.prototype.destroy=function(){let e=this;return this._definedProperties.forEach(function(t){ve.getObservable(e,t).dispose()}),fe(this)};var P4=bh;function K9(e,t){e=On(e);let n=document.createElement("div"),i=new P4(t);this._viewModel=i,this._container=e,this._element=n;let o=document.createElement("div");o.textContent="Voxel Inspector",o.className="cesium-cesiumInspector-button",o.setAttribute("data-bind","click: toggleInspector"),n.appendChild(o),n.className="cesium-cesiumInspector cesium-VoxelInspector",n.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : inspectorVisible, "cesium-cesiumInspector-hidden" : !inspectorVisible}'),e.appendChild(n);let r=document.createElement("div");r.className="cesium-cesiumInspector-dropDown",n.appendChild(r);let{createSection:a,createCheckbox:s,createRangeInput:c,createButton:u}=sf,f=a(r,"Display","displayVisible","toggleDisplay"),d=a(r,"Transform","transformVisible","toggleTransform"),p=a(r,"Clipping","clippingVisible","toggleClipping"),g=a(r,"Shader","shaderVisible","toggleShader");f.appendChild(s("Depth Test","depthTest")),f.appendChild(s("Show","show")),f.appendChild(s("Disable Update","disableUpdate")),f.appendChild(s("Debug Draw","debugDraw")),f.appendChild(s("Jitter","jitter")),f.appendChild(s("Nearest Sampling","nearestSampling")),f.appendChild(c("Screen Space Error","screenSpaceError",0,128)),f.appendChild(c("Step Size","stepSize",0,2));let m=10,A=10,y=D.PI;d.appendChild(c("Translation X","translationX",-m,+m)),d.appendChild(c("Translation Y","translationY",-m,+m)),d.appendChild(c("Translation Z","translationZ",-m,+m)),d.appendChild(c("Scale X","scaleX",0,+A)),d.appendChild(c("Scale Y","scaleY",0,+A)),d.appendChild(c("Scale Z","scaleZ",0,+A)),d.appendChild(c("Heading","angleX",-y,+y)),d.appendChild(c("Pitch","angleY",-y,+y)),d.appendChild(c("Roll","angleZ",-y,+y)),Pre("Max X","Min X","Max Y","Min Y","Max Z","Min Z","clippingBoxMaxX","clippingBoxMinX","clippingBoxMaxY","clippingBoxMinY","clippingBoxMaxZ","clippingBoxMinZ","shapeIsBox",p),Pre("Max Longitude","Min Longitude","Max Latitude","Min Latitude","Max Height","Min Height","clippingEllipsoidMaxLongitude","clippingEllipsoidMinLongitude","clippingEllipsoidMaxLatitude","clippingEllipsoidMinLatitude","clippingEllipsoidMaxHeight","clippingEllipsoidMinHeight","shapeIsEllipsoid",p),Pre("Max Radius","Min Radius","Max Angle","Min Angle","Max Height","Min Height","clippingCylinderMaxRadius","clippingCylinderMinRadius","clippingCylinderMaxAngle","clippingCylinderMinAngle","clippingCylinderMaxHeight","clippingCylinderMinHeight","shapeIsCylinder",p);let x=document.createElement("div");g.appendChild(x);let b=document.createElement("textarea");b.setAttribute("data-bind","textInput: shaderString, event: { keydown: shaderEditorKeyPress }"),x.className="cesium-cesiumInspector-styleEditor",x.appendChild(b);let C=u("Compile (Ctrl+Enter)","compileShader");x.appendChild(C);let E=document.createElement("label");E.style.display="block",E.setAttribute("data-bind","text: shaderCompilationMessage, style: {color: shaderCompilationSuccess ? 'green' : 'red'}"),x.appendChild(E),ve.applyBindings(i,n)}Object.defineProperties(K9.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});K9.prototype.isDestroyed=function(){return!1};K9.prototype.destroy=function(){return ve.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),fe(this)};function Pre(e,t,n,i,o,r,a,s,c,u,f,d,p,g){let m=sf.createRangeInputWithDynamicMinMax,A=g.appendChild(document.createElement("div"));A.setAttribute("data-bind",`if: ${p}`),A.appendChild(m(e,a)),A.appendChild(m(t,s)),A.appendChild(m(n,c)),A.appendChild(m(i,u)),A.appendChild(m(o,f)),A.appendChild(m(r,d))}var R4=K9;function gzt(e){let t=document.createElement("div");t.className="cesium-viewer-voxelInspectorContainer",e.container.appendChild(t);let n=new R4(t,e.scene);Object.defineProperties(e,{voxelInspector:{get:function(){return n}}})}var Rre=gzt;globalThis.CESIUM_VERSION="1.142.0";var _zt="1.142.0";0&&(module.exports={AlphaMode,AlphaPipelineStage,AnchorPointDirect,AnchorPointIndirect,Animation,AnimationViewModel,Appearance,ApproximateTerrainHeights,ArcGISTiledElevationTerrainProvider,ArcGisBaseMapType,ArcGisMapServerImageryProvider,ArcGisMapService,ArcType,ArticulationStageType,AssociativeArray,Atmosphere,AtmospherePipelineStage,AttributeCompression,AttributeType,AutoExposure,AutomaticUniforms,Axis,AxisAlignedBoundingBox,Azure2DImageryProvider,B3dmLoader,B3dmParser,BaseLayerPicker,BaseLayerPickerViewModel,BatchTable,BatchTableHierarchy,BatchTexture,BatchTexturePipelineStage,Billboard,BillboardCollection,BillboardGraphics,BillboardLoadState,BillboardTexture,BillboardVisualizer,BingMapsGeocoderService,BingMapsImageryProvider,BingMapsStyle,BlendEquation,BlendFunction,BlendOption,BlendingState,BoundingRectangle,BoundingSphere,BoundingSphereState,BoundingVolumeSemantics,BoxEmitter,BoxGeometry,BoxGeometryUpdater,BoxGraphics,BoxOutlineGeometry,BrdfLutGenerator,Buffer,BufferLoader,BufferPoint,BufferPointCollection,BufferPointMaterial,BufferPolygon,BufferPolygonCollection,BufferPolygonMaterial,BufferPolyline,BufferPolylineCollection,BufferPolylineMaterial,BufferPrimitive,BufferPrimitiveCollection,BufferPrimitiveMaterial,BufferUsage,CPUStylingPipelineStage,CallbackPositionProperty,CallbackProperty,Camera,CameraEventAggregator,CameraEventType,CameraFlightPath,Cartesian2,Cartesian3,Cartesian4,CartesianRectangle,Cartographic,CartographicGeocoderService,CatmullRomSpline,Cesium3DContentGroup,Cesium3DTile,Cesium3DTileBatchTable,Cesium3DTileColorBlendMode,Cesium3DTileContent,Cesium3DTileContentFactory,Cesium3DTileContentState,Cesium3DTileContentType,Cesium3DTileFeature,Cesium3DTileFeatureTable,Cesium3DTileOptimizationHint,Cesium3DTileOptimizations,Cesium3DTilePass,Cesium3DTilePassState,Cesium3DTilePointFeature,Cesium3DTileRefine,Cesium3DTileStyle,Cesium3DTileStyleEngine,Cesium3DTileVectorFeature,Cesium3DTilesInspector,Cesium3DTilesInspectorViewModel,Cesium3DTilesTerrainData,Cesium3DTilesTerrainGeometryProcessor,Cesium3DTilesTerrainProvider,Cesium3DTilesVoxelProvider,Cesium3DTileset,Cesium3DTilesetBaseTraversal,Cesium3DTilesetCache,Cesium3DTilesetGraphics,Cesium3DTilesetHeatmap,Cesium3DTilesetMetadata,Cesium3DTilesetMostDetailedTraversal,Cesium3DTilesetSkipTraversal,Cesium3DTilesetStatistics,Cesium3DTilesetTraversal,Cesium3DTilesetVisualizer,CesiumInspector,CesiumInspectorViewModel,CesiumTerrainProvider,CesiumWidget,Check,CheckerboardMaterialProperty,CircleEmitter,CircleGeometry,CircleOutlineGeometry,ClassificationModelDrawCommand,ClassificationPipelineStage,ClassificationPrimitive,ClassificationType,ClearCommand,ClippingPlane,ClippingPlaneCollection,ClippingPolygon,ClippingPolygonCollection,Clock,ClockRange,ClockStep,ClockViewModel,CloudCollection,CloudType,Color,ColorBlendMode,ColorGeometryInstanceAttribute,ColorMaterialProperty,Command,ComponentDatatype,Composite3DTileContent,CompositeEntityCollection,CompositeMaterialProperty,CompositePositionProperty,CompositeProperty,CompressedTextureBuffer,ComputeCommand,ComputeEngine,ConditionsExpression,ConeEmitter,ConstantPositionProperty,ConstantProperty,ConstantSpline,ContentMetadata,Context,ContextLimits,CoplanarPolygonGeometry,CoplanarPolygonGeometryLibrary,CoplanarPolygonOutlineGeometry,CornerType,CorrelationGroup,CorridorGeometry,CorridorGeometryLibrary,CorridorGeometryUpdater,CorridorGraphics,CorridorOutlineGeometry,Credit,CreditDisplay,CubeMap,CubeMapFace,CubeMapPanorama,CubicRealPolynomial,CullFace,CullingVolume,CumulusCloud,CustomDataSource,CustomHeightmapTerrainProvider,CustomShader,CustomShaderMode,CustomShaderPipelineStage,CustomShaderTranslucencyMode,CylinderGeometry,CylinderGeometryLibrary,CylinderGeometryUpdater,CylinderGraphics,CylinderOutlineGeometry,CzmlDataSource,DataSource,DataSourceClock,DataSourceCollection,DataSourceDisplay,DebugAppearance,DebugCameraPrimitive,DebugInspector,DebugModelMatrixPrimitive,DefaultProxy,DepthFunction,DepthPlane,DequantizationPipelineStage,DerivedCommand,DeveloperError,DeviceOrientationCameraController,DirectionalLight,DiscardEmptyTileImagePolicy,DiscardMissingTileImagePolicy,DistanceDisplayCondition,DistanceDisplayConditionGeometryInstanceAttribute,DoubleEndedPriorityQueue,DoublyLinkedList,DracoLoader,DrawCommand,DynamicAtmosphereLightingType,DynamicEnvironmentMapManager,DynamicGeometryBatch,DynamicGeometryUpdater,EarthOrientationParameters,EarthOrientationParametersSample,EasingFunction,EdgeDetectionPipelineStage,EdgeDisplayMode,EdgeFramebuffer,EdgeVisibilityPipelineStage,EllipseGeometry,EllipseGeometryLibrary,EllipseGeometryUpdater,EllipseGraphics,EllipseOutlineGeometry,Ellipsoid,EllipsoidGeodesic,EllipsoidGeometry,EllipsoidGeometryUpdater,EllipsoidGraphics,EllipsoidOutlineGeometry,EllipsoidPrimitive,EllipsoidRhumbLine,EllipsoidSurfaceAppearance,EllipsoidTangentPlane,EllipsoidTerrainProvider,EllipsoidalOccluder,Empty3DTileContent,EncodedCartesian3,Entity,EntityCluster,EntityCollection,EntityView,EquirectangularPanorama,Event,EventHelper,Expression,ExpressionNodeType,ExtrapolationType,FeatureDetection,FeatureIdPipelineStage,Fog,ForEach,FrameRateMonitor,FrameState,Framebuffer,FramebufferManager,Frozen,FrustumCommands,FrustumGeometry,FrustumOutlineGeometry,Fullscreen,FullscreenButton,FullscreenButtonViewModel,GaussianSplat3DTileContent,GaussianSplatPrimitive,GaussianSplatRenderResources,GaussianSplatSorter,GaussianSplatTextureGenerator,GeoJsonDataSource,GeoJsonLoader,GeoJsonPrimitive,GeocodeType,Geocoder,GeocoderService,GeocoderViewModel,GeographicProjection,GeographicTilingScheme,Geometry,Geometry3DTileContent,GeometryAttribute,GeometryAttributes,GeometryFactory,GeometryInstance,GeometryInstanceAttribute,GeometryOffsetAttribute,GeometryPipeline,GeometryPipelineStage,GeometryType,GeometryUpdater,GeometryUpdaterSet,GeometryVisualizer,GetFeatureInfoFormat,Globe,GlobeDepth,GlobeSurfaceShaderSet,GlobeSurfaceTile,GlobeSurfaceTileProvider,GlobeTranslucency,GlobeTranslucencyFramebuffer,GlobeTranslucencyState,GltfBufferViewLoader,GltfDracoLoader,GltfGpmLoader,GltfGpmLocal,GltfImageLoader,GltfIndexBufferLoader,GltfJsonLoader,GltfLoader,GltfLoaderUtil,GltfMeshPrimitiveGpmLoader,GltfSpzLoader,GltfStructuralMetadataLoader,GltfTextureLoader,GltfVertexBufferLoader,Google2DImageryProvider,GoogleEarthEnterpriseImageryProvider,GoogleEarthEnterpriseMapsProvider,GoogleEarthEnterpriseMetadata,GoogleEarthEnterpriseTerrainData,GoogleEarthEnterpriseTerrainProvider,GoogleEarthEnterpriseTileInformation,GoogleGeocoderService,GoogleMaps,GoogleStreetViewCubeMapPanoramaProvider,GpxDataSource,GregorianDate,GridImageryProvider,GridMaterialProperty,GroundGeometryUpdater,GroundPolylineGeometry,GroundPolylinePrimitive,GroundPrimitive,GroupMetadata,HeadingPitchRange,HeadingPitchRoll,Heap,HeightReference,HeightmapEncoding,HeightmapTerrainData,HeightmapTessellator,HermitePolynomialApproximation,HermiteSpline,HilbertOrder,HomeButton,HomeButtonViewModel,HorizontalOrigin,I3SBuildingSceneLayerExplorer,I3SBuildingSceneLayerExplorerViewModel,I3SDataProvider,I3SDecoder,I3SFeature,I3SField,I3SGeometry,I3SLayer,I3SNode,I3SStatistics,I3SSublayer,I3SSymbology,I3dmLoader,I3dmParser,ITwinData,ITwinPlatform,Iau2000Orientation,Iau2006XysData,Iau2006XysSample,IauOrientationAxes,IauOrientationParameters,ImageBasedLighting,ImageBasedLightingPipelineStage,ImageMaterialProperty,Imagery,ImageryConfiguration,ImageryCoverage,ImageryFlags,ImageryInput,ImageryLayer,ImageryLayerCollection,ImageryLayerFeatureInfo,ImageryPipelineStage,ImageryProvider,ImageryState,Implicit3DTileContent,ImplicitAvailabilityBitstream,ImplicitMetadataView,ImplicitSubdivisionScheme,ImplicitSubtree,ImplicitSubtreeCache,ImplicitSubtreeMetadata,ImplicitTileCoordinates,ImplicitTileset,IndexDatatype,InfoBox,InfoBoxViewModel,InspectorShared,InstanceAttributeSemantic,InstancingPipelineStage,InterpolationAlgorithm,InterpolationType,Intersect,IntersectionTests,Intersections2D,Interval,InvertClassification,Ion,IonGeocodeProviderType,IonGeocoderService,IonImageryProvider,IonImageryProviderFactory,IonResource,IonWorldImageryStyle,Iso8601,JobScheduler,JobType,JsonMetadataTable,JulianDate,KTX2Transcoder,KeyboardEventModifier,KeyframeNode,KmlCamera,KmlDataSource,KmlLookAt,KmlTour,KmlTourFlyTo,KmlTourWait,Label,LabelCollection,LabelGraphics,LabelStyle,LabelVisualizer,LagrangePolynomialApproximation,LeapSecond,Light,LightingModel,LightingPipelineStage,LinearApproximation,LinearSpline,MVTDataProvider,ManagedArray,MapMode2D,MapProjection,MapboxImageryProvider,MapboxStyleImageryProvider,MappedPositions,Material,MaterialAppearance,MaterialPipelineStage,MaterialProperty,Math,Matrix2,Matrix3,Matrix4,Megatexture,MeshPrimitiveGpmLocal,MetadataClass,MetadataClassProperty,MetadataComponentType,MetadataEntity,MetadataEnum,MetadataEnumValue,MetadataPicking,MetadataPickingPipelineStage,MetadataPipelineStage,MetadataSchema,MetadataSchemaLoader,MetadataSemantic,MetadataTable,MetadataTableProperty,MetadataType,MipmapHint,Model,Model3DTileContent,ModelAlphaOptions,ModelAnimation,ModelAnimationChannel,ModelAnimationCollection,ModelAnimationLoop,ModelAnimationState,ModelArticulation,ModelArticulationStage,ModelClippingPlanesPipelineStage,ModelClippingPolygonsPipelineStage,ModelColorPipelineStage,ModelComponents,ModelDrawCommand,ModelDrawCommands,ModelFeature,ModelFeatureTable,ModelGraphics,ModelImagery,ModelImageryMapping,ModelLightingOptions,ModelMatrixUpdateStage,ModelNode,ModelPrimitiveImagery,ModelReader,ModelRenderResources,ModelRuntimeNode,ModelRuntimePrimitive,ModelSceneGraph,ModelSilhouettePipelineStage,ModelSkin,ModelSplitterPipelineStage,ModelStatistics,ModelType,ModelUtility,ModelVisualizer,Moon,MorphTargetsPipelineStage,MorphWeightSpline,MortonOrder,Multiple3DTileContent,MultisampleFramebuffer,NavigationHelpButton,NavigationHelpButtonViewModel,NearFarScalar,NeverTileDiscardPolicy,NodeRenderResources,NodeStatisticsPipelineStage,NodeTransformationProperty,OIT,Occluder,OffsetGeometryInstanceAttribute,OpenCageGeocoderService,OpenStreetMapImageryProvider,OrderedGroundPrimitiveCollection,OrientedBoundingBox,OrthographicFrustum,OrthographicOffCenterFrustum,Packable,PackableForInterpolation,Panorama,PanoramaProvider,Particle,ParticleBurst,ParticleEmitter,ParticleSystem,Pass,PassState,PathGraphics,PathVisualizer,PeliasGeocoderService,PerInstanceColorAppearance,PerformanceDisplay,PerformanceWatchdog,PerformanceWatchdogViewModel,PerspectiveFrustum,PerspectiveOffCenterFrustum,PickDepth,PickDepthFramebuffer,PickFramebuffer,PickId,PickedMetadataInfo,Picking,PickingPipelineStage,PinBuilder,PixelDatatype,PixelFormat,Plane,PlaneGeometry,PlaneGeometryUpdater,PlaneGraphics,PlaneOutlineGeometry,PntsLoader,PntsParser,PointCloud,PointCloudEyeDomeLighting,PointCloudShading,PointCloudStylingPipelineStage,PointGraphics,PointPrimitive,PointPrimitiveCollection,PointVisualizer,PolygonGeometry,PolygonGeometryLibrary,PolygonGeometryUpdater,PolygonGraphics,PolygonHierarchy,PolygonOutlineGeometry,PolygonPipeline,Polyline,PolylineArrowMaterialProperty,PolylineCollection,PolylineColorAppearance,PolylineDashMaterialProperty,PolylineGeometry,PolylineGeometryUpdater,PolylineGlowMaterialProperty,PolylineGraphics,PolylineMaterialAppearance,PolylineOutlineMaterialProperty,PolylinePipeline,PolylineVisualizer,PolylineVolumeGeometry,PolylineVolumeGeometryLibrary,PolylineVolumeGeometryUpdater,PolylineVolumeGraphics,PolylineVolumeOutlineGeometry,PositionProperty,PositionPropertyArray,PostProcessStage,PostProcessStageCollection,PostProcessStageComposite,PostProcessStageLibrary,PostProcessStageSampleMode,PostProcessStageTextureCache,PpeMetadata,PpeSource,PpeTexture,Primitive,PrimitiveCollection,PrimitiveLoadPlan,PrimitiveOutlineGenerator,PrimitiveOutlinePipelineStage,PrimitivePipeline,PrimitiveRenderResources,PrimitiveState,PrimitiveStatisticsPipelineStage,PrimitiveType,ProjectionPicker,ProjectionPickerViewModel,Property,PropertyArray,PropertyAttribute,PropertyAttributeProperty,PropertyBag,PropertyTable,PropertyTexture,PropertyTextureProperty,ProviderViewModel,Proxy,QuadraticRealPolynomial,QuadtreeOccluders,QuadtreePrimitive,QuadtreeTile,QuadtreeTileLoadState,QuadtreeTileProvider,QuantizedMeshTerrainData,QuarticRealPolynomial,Quaternion,QuaternionSpline,Queue,Ray,Rectangle,RectangleCollisionChecker,RectangleGeometry,RectangleGeometryLibrary,RectangleGeometryUpdater,RectangleGraphics,RectangleOutlineGeometry,ReferenceFrame,ReferenceProperty,RenderState,Renderbuffer,RenderbufferFormat,Request,RequestErrorEvent,RequestScheduler,RequestState,RequestType,Resource,ResourceCache,ResourceCacheKey,ResourceCacheStatistics,ResourceLoader,ResourceLoaderState,Rotation,RuntimeError,S2Cell,SDFSettings,SampledPositionProperty,SampledProperty,Sampler,ScaledPositionProperty,Scene,SceneFramebuffer,SceneMode,SceneMode2DPipelineStage,SceneModePicker,SceneModePickerViewModel,SceneTransforms,SceneTransitioner,ScreenSpaceCameraController,ScreenSpaceEventHandler,ScreenSpaceEventType,SelectedFeatureIdPipelineStage,SelectionIndicator,SelectionIndicatorViewModel,SensorVolumePortionToDisplay,ShaderBuilder,ShaderCache,ShaderDestination,ShaderFunction,ShaderProgram,ShaderSource,ShaderStruct,ShadowMap,ShadowMapShader,ShadowMode,ShadowVolumeAppearance,SharedContext,ShowGeometryInstanceAttribute,Simon1994PlanetaryPositions,SimplePolylineGeometry,SingleTileImageryProvider,SkinningPipelineStage,SkyAtmosphere,SkyBox,SpatialNode,Spdcf,SpecularEnvironmentCubeMap,SphereEmitter,SphereGeometry,SphereOutlineGeometry,Spherical,Spline,SplitDirection,Splitter,StaticGeometryColorBatch,StaticGeometryPerMaterialBatch,StaticGroundGeometryColorBatch,StaticGroundGeometryPerMaterialBatch,StaticGroundPolylinePerMaterialBatch,StaticOutlineGeometryBatch,StencilConstants,StencilFunction,StencilOperation,SteppedSpline,Stereographic,StorageType,StripeMaterialProperty,StripeOrientation,StructuralMetadata,StyleCommandsNeeded,StyleExpression,Sun,SunLight,SunPostProcess,SupportedImageFormats,SvgPathBindingHandler,Sync,TaskProcessor,Terrain,TerrainData,TerrainEncoding,TerrainFillMesh,TerrainMesh,TerrainOffsetProperty,TerrainPicker,TerrainProvider,TerrainQuantization,TerrainState,Texture,Texture3D,TextureAtlas,TextureCache,TextureMagnificationFilter,TextureManager,TextureMinificationFilter,TexturePacker,TextureUniform,TextureWrap,TileAvailability,TileBoundingRegion,TileBoundingS2Cell,TileBoundingSphere,TileBoundingVolume,TileCoordinatesImageryProvider,TileDiscardPolicy,TileEdge,TileImagery,TileMapServiceImageryProvider,TileMetadata,TileOrientedBoundingBox,TileProviderError,TileReplacementQueue,TileSelectionResult,TileState,Tileset3DTileContent,TilesetMetadata,TilesetPipelineStage,TilingScheme,TimeConstants,TimeDynamicImagery,TimeDynamicPointCloud,TimeInterval,TimeIntervalCollection,TimeIntervalCollectionPositionProperty,TimeIntervalCollectionProperty,TimeStandard,Timeline,TimelineHighlightRange,TimelineTrack,Tipsify,ToggleButtonViewModel,Tonemapper,TrackingReferenceFrame,Transforms,TranslationRotationScale,TranslucentTileClassification,TridiagonalSystemSolver,TrustedServers,TweenCollection,UniformState,UniformType,UrlTemplate3DTilesDataProvider,UrlTemplateImageryProvider,VERSION,VRButton,VRButtonViewModel,VRTheWorldTerrainProvider,VaryingType,Vector3DTileBatch,Vector3DTileClampedPolylines,Vector3DTileContent,Vector3DTileGeometry,Vector3DTilePoints,Vector3DTilePolygons,Vector3DTilePolylines,Vector3DTilePrimitive,VectorGltf3DTileContent,VelocityOrientationProperty,VelocityVectorProperty,VertexArray,VertexArrayFacade,VertexAttributeSemantic,VertexFormat,VerticalExaggeration,VerticalExaggerationPipelineStage,VerticalOrigin,VideoSynchronizer,View,Viewer,ViewportQuad,Visibility,Visualizer,VoxelBoundsCollection,VoxelBoxShape,VoxelCell,VoxelContent,VoxelCylinderShape,VoxelEllipsoidShape,VoxelInspector,VoxelInspectorViewModel,VoxelMetadataOrder,VoxelPrimitive,VoxelProvider,VoxelRenderResources,VoxelShape,VoxelShapeType,VoxelTraversal,VulkanConstants,WallGeometry,WallGeometryLibrary,WallGeometryUpdater,WallGraphics,WallOutlineGeometry,WebGLConstants,WebMapServiceImageryProvider,WebMapTileServiceImageryProvider,WebMercatorProjection,WebMercatorTilingScheme,WindingOrder,WireframeIndexGenerator,WireframePipelineStage,_shadersAcesTonemappingStage,_shadersAdditiveBlend,_shadersAdjustTranslucentFS,_shadersAllMaterialAppearanceFS,_shadersAllMaterialAppearanceVS,_shadersAmbientOcclusionGenerate,_shadersAmbientOcclusionModulate,_shadersAspectRampMaterial,_shadersAtmosphereCommon,_shadersAtmosphereStageFS,_shadersAtmosphereStageVS,_shadersBasicMaterialAppearanceFS,_shadersBasicMaterialAppearanceVS,_shadersBillboardCollectionFS,_shadersBillboardCollectionVS,_shadersBlackAndWhite,_shadersBloomComposite,_shadersBrdfLutGeneratorFS,_shadersBrightPass,_shadersBrightness,_shadersBufferPointMaterialFS,_shadersBufferPointMaterialVS,_shadersBufferPolygonMaterialFS,_shadersBufferPolygonMaterialVS,_shadersBufferPolylineMaterialFS,_shadersBufferPolylineMaterialVS,_shadersBumpMapMaterial,_shadersCPUStylingStageFS,_shadersCPUStylingStageVS,_shadersCheckerboardMaterial,_shadersCloudCollectionFS,_shadersCloudCollectionVS,_shadersCloudNoiseFS,_shadersCloudNoiseVS,_shadersCompareAndPackTranslucentDepth,_shadersCompositeOITFS,_shadersCompositeTranslucentClassification,_shadersComputeIrradianceFS,_shadersComputeRadianceMapFS,_shadersConstantLodStageFS,_shadersConstantLodStageVS,_shadersContrastBias,_shadersConvolveSpecularMapFS,_shadersConvolveSpecularMapVS,_shadersCubeMapPanoramaVS,_shadersCustomShaderStageFS,_shadersCustomShaderStageVS,_shadersCzmBuiltins,_shadersDepthOfField,_shadersDepthPlaneFS,_shadersDepthPlaneVS,_shadersDepthView,_shadersDepthViewPacked,_shadersDotMaterial,_shadersEdgeDetection,_shadersEdgeDetectionStageFS,_shadersEdgeVisibilityStageFS,_shadersEdgeVisibilityStageVS,_shadersElevationBandMaterial,_shadersElevationContourMaterial,_shadersElevationRampMaterial,_shadersEllipsoidFS,_shadersEllipsoidSurfaceAppearanceFS,_shadersEllipsoidSurfaceAppearanceVS,_shadersEllipsoidVS,_shadersFXAA,_shadersFXAA3_11,_shadersFadeMaterial,_shadersFeatureIdStageFS,_shadersFeatureIdStageVS,_shadersFilmicTonemapping,_shadersGaussianBlur1D,_shadersGeometryStageFS,_shadersGeometryStageVS,_shadersGlobeFS,_shadersGlobeVS,_shadersGridMaterial,_shadersGroundAtmosphere,_shadersHSBToRGB,_shadersHSLToRGB,_shadersImageBasedLightingStageFS,_shadersInstancingStageCommon,_shadersInstancingStageVS,_shadersIntersectBox,_shadersIntersectCylinder,_shadersIntersectDepth,_shadersIntersectEllipsoid,_shadersIntersectLongitude,_shadersIntersectPlane,_shadersIntersection,_shadersIntersectionUtils,_shadersLegacyInstancingStageVS,_shadersLensFlare,_shadersLightingStageFS,_shadersMaterialStageFS,_shadersMegatexture,_shadersMetadataStageFS,_shadersMetadataStageVS,_shadersModelClippingPlanesStageFS,_shadersModelClippingPolygonsStageFS,_shadersModelClippingPolygonsStageVS,_shadersModelColorStageFS,_shadersModelFS,_shadersModelSilhouetteStageFS,_shadersModelSilhouetteStageVS,_shadersModelSplitterStageFS,_shadersModelVS,_shadersModifiedReinhardTonemapping,_shadersMorphTargetsStageVS,_shadersNightVision,_shadersNormalMapMaterial,_shadersOctree,_shadersPassThrough,_shadersPassThroughDepth,_shadersPbrNeutralTonemapping,_shadersPerInstanceColorAppearanceFS,_shadersPerInstanceColorAppearanceVS,_shadersPerInstanceFlatColorAppearanceFS,_shadersPerInstanceFlatColorAppearanceVS,_shadersPointCloudEyeDomeLighting,_shadersPointCloudStylingStageVS,_shadersPointPrimitiveCollectionFS,_shadersPointPrimitiveCollectionVS,_shadersPolygonSignedDistanceFS,_shadersPolylineArrowMaterial,_shadersPolylineColorAppearanceVS,_shadersPolylineCommon,_shadersPolylineDashMaterial,_shadersPolylineFS,_shadersPolylineGlowMaterial,_shadersPolylineMaterialAppearanceVS,_shadersPolylineOutlineMaterial,_shadersPolylineShadowVolumeFS,_shadersPolylineShadowVolumeMorphFS,_shadersPolylineShadowVolumeMorphVS,_shadersPolylineShadowVolumeVS,_shadersPolylineVS,_shadersPrimitiveGaussianSplatFS,_shadersPrimitiveGaussianSplatVS,_shadersPrimitiveOutlineStageFS,_shadersPrimitiveOutlineStageVS,_shadersRGBToHSB,_shadersRGBToHSL,_shadersRGBToXYZ,_shadersReinhardTonemapping,_shadersReprojectWebMercatorFS,_shadersReprojectWebMercatorVS,_shadersRimLightingMaterial,_shadersSelectedFeatureIdStageCommon,_shadersShadowVolumeAppearanceFS,_shadersShadowVolumeAppearanceVS,_shadersShadowVolumeFS,_shadersSilhouette,_shadersSkinningStageVS,_shadersSkyAtmosphereCommon,_shadersSkyAtmosphereFS,_shadersSkyAtmosphereVS,_shadersSkyBoxFS,_shadersSkyBoxVS,_shadersSlopeRampMaterial,_shadersStripeMaterial,_shadersSunFS,_shadersSunTextureFS,_shadersSunVS,_shadersTexturedMaterialAppearanceFS,_shadersTexturedMaterialAppearanceVS,_shadersVector3DTileClampedPolylinesFS,_shadersVector3DTileClampedPolylinesVS,_shadersVector3DTilePolylinesVS,_shadersVectorTileVS,_shadersVerticalExaggerationStageVS,_shadersViewportQuadFS,_shadersViewportQuadVS,_shadersVoxelFS,_shadersVoxelUtils,_shadersVoxelVS,_shadersWater,_shadersWaterMaskMaterial,_shadersXYZToRGB,_shadersacesTonemapping,_shadersalphaWeight,_shadersantialias,_shadersapplyHSBShift,_shadersapproximateSphericalCoordinates,_shadersapproximateTanh,_shadersbackFacing,_shadersbranchFreeTernary,_shaderscascadeColor,_shaderscascadeDistance,_shaderscascadeMatrix,_shaderscascadeWeights,_shadersclipPolygons,_shaderscolumbusViewMorph,_shaderscomputeAtmosphereColor,_shaderscomputeGroundAtmosphereScattering,_shaderscomputePosition,_shaderscomputeScattering,_shaderscomputeTextureTransform,_shadersconvertLocalToBoxUv,_shadersconvertLocalToCylinderUv,_shadersconvertLocalToEllipsoidUv,_shaderscosineAndSine,_shadersdecodeRGB8,_shadersdecompressTextureCoordinates,_shadersdegreesPerRadian,_shadersdepthClamp,_shadersdepthRange,_shadersdepthRangeStruct,_shaderseastNorthUpToEyeCoordinates,_shadersellipsoidContainsPoint,_shadersellipsoidTextureCoordinates,_shadersepsilon1,_shadersepsilon2,_shadersepsilon3,_shadersepsilon4,_shadersepsilon5,_shadersepsilon6,_shadersepsilon7,_shadersequalsEpsilon,_shaderseyeOffset,_shaderseyeToWindowCoordinates,_shadersfastApproximateAtan,_shadersfog,_shadersgammaCorrect,_shadersgeodeticSurfaceNormal,_shadersgetDefaultMaterial,_shadersgetDynamicAtmosphereLightDirection,_shadersgetLambertDiffuse,_shadersgetSpecular,_shadersgetWaterNoise,_shadershue,_shadersinfinity,_shadersinverseGamma,_shadersisEmpty,_shadersisFull,_shaderslatitudeToWebMercatorFraction,_shaderslineDistance,_shaderslinearToSrgb,_shadersluminance,_shadersmaterial,_shadersmaterialInput,_shadersmaximumComponent,_shadersmetersPerPixel,_shadersmodelMaterial,_shadersmodelToWindowCoordinates,_shadersmodelVertexOutput,_shadersmultiplyWithColorBalance,_shadersnearFarScalar,_shadersoctDecode,_shadersoneOverPi,_shadersoneOverTwoPi,_shaderspackDepth,_shaderspassCesium3DTile,_shaderspassCesium3DTileClassification,_shaderspassCesium3DTileClassificationIgnoreShow,_shaderspassCesium3DTileEdges,_shaderspassCesium3DTileEdgesDirect,_shaderspassClassification,_shaderspassCompute,_shaderspassEnvironment,_shaderspassGaussianSplats,_shaderspassGlobe,_shaderspassOpaque,_shaderspassOverlay,_shaderspassTerrainClassification,_shaderspassTranslucent,_shaderspassVoxels,_shaderspbrLighting,_shaderspbrNeutralTonemapping,_shadersphong,_shaderspi,_shaderspiOverFour,_shaderspiOverSix,_shaderspiOverThree,_shaderspiOverTwo,_shadersplaneDistance,_shaderspointAlongRay,_shadersradiansPerDegree,_shadersray,_shadersrayEllipsoidIntersectionInterval,_shadersraySegment,_shadersraySphereIntersectionInterval,_shadersreadDepth,_shadersreadNonPerspective,_shadersreverseLogDepth,_shadersround,_shaderssaturation,_shaderssceneMode2D,_shaderssceneMode3D,_shaderssceneModeColumbusView,_shaderssceneModeMorphing,_shadersshadowDepthCompare,_shadersshadowParameters,_shadersshadowVisibility,_shaderssignNotZero,_shaderssolarRadius,_shaderssphericalHarmonics,_shaderssrgbToLinear,_shaderstangentToEyeSpaceMatrix,_shaderstextureCube,_shadersthreePiOver2,_shaderstransformPlane,_shaderstranslateRelativeToEye,_shaderstranslucentPhong,_shaderstranspose,_shaderstwoPi,_shadersunpackClippingExtents,_shadersunpackDepth,_shadersunpackFloat,_shadersunpackTexture,_shadersunpackUint,_shadersvalueTransform,_shadersvertexLogDepth,_shaderswebMercatorMaxLatitude,_shaderswindowToEyeCoordinates,_shaderswriteDepthClamp,_shaderswriteLogDepth,_shaderswriteNonPerspective,addAllToArray,addBuffer,addDefaults,addExtensionsRequired,addExtensionsUsed,addPipelineExtras,addToArray,appendForwardSlash,arrayRemoveDuplicates,assert,barycentricCoordinates,binarySearch,buildModuleUrl,buildVectorGltfFromMVT,buildVoxelCustomShader,buildVoxelDrawCommands,clone,combine,computeFlyToLocationForRectangle,createBillboardPointCallback,createColorRamp,createCommand,createDefaultImageryProviderViewModels,createDefaultTerrainProviderViewModels,createElevationBandMaterial,createGooglePhotorealistic3DTileset,createGuid,createMaterialPropertyDescriptor,createOsmBuildingsAsync,createPropertyDescriptor,createRawPropertyDescriptor,createTangentSpaceDebugPrimitive,createTaskProcessorWorker,createUniform,createUniformArray,createVectorTileBuffersFromModelComponents,createWorldBathymetryAsync,createWorldImageryAsync,createWorldTerrainAsync,decodeGoogleEarthEnterpriseData,decodeMVT,decodeVectorPolylinePositions,defer,defined,demodernizeShader,deprecationWarning,destroyObject,exportKml,findAccessorMinMax,findContentMetadata,findGroupMetadata,findTileMetadata,forEachTextureInMaterial,formatError,freezeRenderState,getAbsoluteUri,getAccessorByteStride,getBaseUri,getBinaryAccessor,getClipAndStyleCode,getClippingFunction,getComponentReader,getElement,getExtensionFromUri,getFilenameFromUri,getImageFromTypedArray,getImagePixels,getJsonFromTypedArray,getMagic,getMeshPrimitives,getMetadataClassProperty,getMetadataProperty,getStringFromTypedArray,getTimestamp,hasExtension,heightReferenceOnEntityPropertyChanged,isBitSet,isBlobUri,isCrossOriginUrl,isDataUri,isLeapYear,knockout,knockout_3_5_1,knockout_es5,loadAndExecuteScript,loadCubeMap,loadImageFromTypedArray,loadKTX2,mergeSort,moveTechniqueRenderStates,moveTechniquesToExtension,numberOfComponentsForType,objectToQuery,oneTimeWarning,parseBatchTable,parseFeatureMetadataLegacy,parseGlb,parseResponseHeaders,parseStructuralMetadata,pickModel,pointInsideTriangle,preprocess3DTileContent,processVoxelProperties,queryToObject,readAccessorPacked,removeExtension,removeExtensionsRequired,removeExtensionsUsed,removePipelineExtras,removeUnusedElements,renderBufferPointCollection,renderBufferPolygonCollection,renderBufferPolylineCollection,resizeImageToNextPowerOfTwo,sampleTerrain,sampleTerrainMostDetailed,scaleToGeodeticSurface,srgbToLinear,subdivideArray,subscribeAndEvaluate,updateAccessorComponentTypes,updateVersion,usesExtension,viewerCesium3DTilesInspectorMixin,viewerCesiumInspectorMixin,viewerDragDropMixin,viewerPerformanceWatchdogMixin,viewerVoxelInspectorMixin,webGLConstantToGlslType,wrapFunction,writeTextToCanvas});
|