@arcgis_core_views_MapView.js 425 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640
  1. import {
  2. a as a13,
  3. c as c11,
  4. e as e7,
  5. e2 as e10,
  6. g as g3,
  7. i as i8
  8. } from "./chunk-RATJTB73.js";
  9. import {
  10. Gt,
  11. H,
  12. St,
  13. Y,
  14. Z,
  15. _ as _2,
  16. e as e8,
  17. ft,
  18. gt,
  19. ht,
  20. jt,
  21. lt,
  22. ot,
  23. pt,
  24. tt,
  25. u as u5,
  26. ut,
  27. wt,
  28. xt,
  29. yt
  30. } from "./chunk-NXMKH642.js";
  31. import {
  32. e as e9
  33. } from "./chunk-ZHRMTKME.js";
  34. import "./chunk-YHA24SWX.js";
  35. import "./chunk-Z6GWVH7Z.js";
  36. import "./chunk-ZVHTCCQC.js";
  37. import "./chunk-PCGDLSZ4.js";
  38. import "./chunk-CAYFEZCR.js";
  39. import {
  40. t as t10
  41. } from "./chunk-MFFE4I2S.js";
  42. import {
  43. n as n8
  44. } from "./chunk-XBH7TGC2.js";
  45. import {
  46. e as e6,
  47. f as f4,
  48. i as i4,
  49. r as r9
  50. } from "./chunk-K3NA3LQS.js";
  51. import {
  52. l as l10
  53. } from "./chunk-TYZ4SNOQ.js";
  54. import "./chunk-LMCIAW5S.js";
  55. import {
  56. h as h5
  57. } from "./chunk-OTS3UE5B.js";
  58. import "./chunk-6RAL4JPQ.js";
  59. import "./chunk-VAY3LZG7.js";
  60. import {
  61. l as l9
  62. } from "./chunk-4E6K4P67.js";
  63. import {
  64. r as r11,
  65. t as t11
  66. } from "./chunk-EZZVK4K6.js";
  67. import {
  68. M as M4,
  69. N,
  70. j2 as j5,
  71. x2 as x
  72. } from "./chunk-S3AKUCX7.js";
  73. import "./chunk-TRK7CKWP.js";
  74. import "./chunk-EGVIPYN2.js";
  75. import {
  76. a as a9,
  77. c as c8,
  78. m as m9
  79. } from "./chunk-P75K44PT.js";
  80. import {
  81. o as o8
  82. } from "./chunk-LGW7TID4.js";
  83. import {
  84. l as l8
  85. } from "./chunk-FXKC6XZV.js";
  86. import {
  87. l as l6,
  88. s as s6
  89. } from "./chunk-ICMZOYI5.js";
  90. import "./chunk-YASLQAXE.js";
  91. import {
  92. Ke
  93. } from "./chunk-UBE36KEX.js";
  94. import {
  95. v as v5
  96. } from "./chunk-524XACB7.js";
  97. import "./chunk-XKHC7KKF.js";
  98. import "./chunk-6XTLDPQ5.js";
  99. import "./chunk-GD5TMIPM.js";
  100. import "./chunk-EC47EYSJ.js";
  101. import {
  102. c as c9
  103. } from "./chunk-37ASLV6R.js";
  104. import "./chunk-HGJGOAK6.js";
  105. import "./chunk-3OHML7FO.js";
  106. import "./chunk-JGOAMEPM.js";
  107. import {
  108. c as c4,
  109. d as d3
  110. } from "./chunk-Z64YKYHD.js";
  111. import "./chunk-5WMG6O4B.js";
  112. import {
  113. n as n9
  114. } from "./chunk-G5AI6ZNE.js";
  115. import {
  116. l as l7,
  117. r as r10,
  118. s as s7,
  119. w as w3
  120. } from "./chunk-5JK4DCPE.js";
  121. import "./chunk-F37AVPUF.js";
  122. import "./chunk-H6ETEALK.js";
  123. import "./chunk-FIYKFRB2.js";
  124. import {
  125. L as L3,
  126. Q
  127. } from "./chunk-ROWZMUVJ.js";
  128. import "./chunk-7IKYLNB5.js";
  129. import "./chunk-FYNVVMWY.js";
  130. import {
  131. M as M3,
  132. h as h4,
  133. i as i3,
  134. r as r8,
  135. s as s5
  136. } from "./chunk-CRGVDJI6.js";
  137. import "./chunk-QOV6ITMI.js";
  138. import {
  139. An,
  140. en,
  141. rn,
  142. tn
  143. } from "./chunk-DH2OBAUC.js";
  144. import {
  145. a as a5,
  146. m as m5,
  147. o as o6,
  148. r as r7,
  149. z
  150. } from "./chunk-6P6NA7JB.js";
  151. import "./chunk-GS2NUWMB.js";
  152. import "./chunk-FUEX356Y.js";
  153. import "./chunk-54AOZV5X.js";
  154. import "./chunk-PK35UGFJ.js";
  155. import "./chunk-P4UZNLD5.js";
  156. import "./chunk-Q52DVFYK.js";
  157. import "./chunk-HBMVUVZX.js";
  158. import "./chunk-TNLRDNTC.js";
  159. import {
  160. O as O2,
  161. e as e3,
  162. e2 as e4,
  163. e3 as e5,
  164. n as n7,
  165. o as o3,
  166. r as r5,
  167. r2 as r6,
  168. t as t6,
  169. t2 as t7,
  170. t3 as t8,
  171. t4 as t9
  172. } from "./chunk-E6CBEY54.js";
  173. import "./chunk-P6MX663D.js";
  174. import {
  175. f as f3,
  176. h as h3,
  177. i as i2,
  178. n2 as n6,
  179. p as p2,
  180. v as v4,
  181. w as w2
  182. } from "./chunk-7256PFPA.js";
  183. import "./chunk-QY775BFA.js";
  184. import {
  185. s as s4
  186. } from "./chunk-2SJEIKRW.js";
  187. import {
  188. Me
  189. } from "./chunk-25BNEBXZ.js";
  190. import "./chunk-3ZFH4KQV.js";
  191. import {
  192. L as L4
  193. } from "./chunk-GJIJLOAS.js";
  194. import "./chunk-T5B2N2CV.js";
  195. import "./chunk-CZG5S62M.js";
  196. import "./chunk-4YMGIMYW.js";
  197. import "./chunk-4FQG6M7Q.js";
  198. import "./chunk-PHRSJJ3U.js";
  199. import {
  200. o as o7
  201. } from "./chunk-WR32EHFC.js";
  202. import {
  203. S as S2,
  204. p as p3
  205. } from "./chunk-RBZL6SRZ.js";
  206. import "./chunk-OSNKP4CI.js";
  207. import "./chunk-MS4AO5ZF.js";
  208. import "./chunk-T3EUPDKL.js";
  209. import "./chunk-5MVUZO4F.js";
  210. import "./chunk-VVBOYBFX.js";
  211. import "./chunk-S7R5EXHN.js";
  212. import "./chunk-FMKGHOGD.js";
  213. import "./chunk-6URTNEGN.js";
  214. import "./chunk-KN7TOKVN.js";
  215. import "./chunk-QHSP2IXH.js";
  216. import "./chunk-FPWDEBK7.js";
  217. import "./chunk-7O56JPWQ.js";
  218. import "./chunk-6B2LQBKM.js";
  219. import "./chunk-6MBZCUTA.js";
  220. import {
  221. a as a8
  222. } from "./chunk-GXVYXYQ6.js";
  223. import {
  224. o as o9
  225. } from "./chunk-V7YYFSRJ.js";
  226. import "./chunk-O2BDAP4B.js";
  227. import "./chunk-MFUAILAT.js";
  228. import "./chunk-HZJYXMI6.js";
  229. import "./chunk-W674J6QK.js";
  230. import "./chunk-2EKIELVX.js";
  231. import "./chunk-PU77IHUM.js";
  232. import "./chunk-5NKYXKIA.js";
  233. import "./chunk-RHPR46MQ.js";
  234. import "./chunk-FTI5VP6T.js";
  235. import {
  236. g as g2
  237. } from "./chunk-ZGOTQNST.js";
  238. import {
  239. I,
  240. a as a11,
  241. a2 as a12,
  242. c2 as c5,
  243. c3 as c6,
  244. c4 as c7,
  245. c5 as c10,
  246. i2 as i5,
  247. i3 as i6,
  248. i4 as i7,
  249. u as u4
  250. } from "./chunk-2JD5MAFR.js";
  251. import {
  252. S2 as S3
  253. } from "./chunk-IN4AAEPU.js";
  254. import "./chunk-3D3QEPRE.js";
  255. import "./chunk-VBNMTM7L.js";
  256. import "./chunk-JWB47MRZ.js";
  257. import {
  258. b as b2,
  259. m as m6
  260. } from "./chunk-UD63WBG3.js";
  261. import {
  262. m as m7
  263. } from "./chunk-X7DBH4KK.js";
  264. import "./chunk-LY74KTXV.js";
  265. import "./chunk-EWE6EXPY.js";
  266. import "./chunk-KUXNUNAI.js";
  267. import "./chunk-HKIEQAJZ.js";
  268. import "./chunk-522WBHUO.js";
  269. import "./chunk-WNCU6BFU.js";
  270. import {
  271. L as L2,
  272. S,
  273. m as m2,
  274. u as u2
  275. } from "./chunk-PIGRDDRG.js";
  276. import "./chunk-BJHM4JNS.js";
  277. import "./chunk-F6A2QQ26.js";
  278. import "./chunk-XLV7RUSE.js";
  279. import "./chunk-NTUXR253.js";
  280. import "./chunk-EOSZHC5H.js";
  281. import "./chunk-C43UE3Z5.js";
  282. import {
  283. p as p4
  284. } from "./chunk-V7H6CJ37.js";
  285. import "./chunk-H2KDMZTR.js";
  286. import {
  287. a as a6,
  288. c as c3,
  289. d as d2
  290. } from "./chunk-RMX2AZ4P.js";
  291. import {
  292. u as u3
  293. } from "./chunk-NE3ESGA6.js";
  294. import {
  295. U,
  296. a as a3,
  297. f as f2,
  298. h as h2,
  299. j as j4,
  300. l as l4,
  301. w
  302. } from "./chunk-YIS6BAC3.js";
  303. import {
  304. l as l5
  305. } from "./chunk-7XXXCK2A.js";
  306. import "./chunk-7ZIDBK7B.js";
  307. import "./chunk-K7BLHWGD.js";
  308. import "./chunk-DNIUTMMR.js";
  309. import "./chunk-77MD2JQC.js";
  310. import "./chunk-I3OBGWNS.js";
  311. import "./chunk-FONIFA5N.js";
  312. import {
  313. y as y2
  314. } from "./chunk-EG5OI4V4.js";
  315. import "./chunk-65BYCSII.js";
  316. import {
  317. B,
  318. de,
  319. ye
  320. } from "./chunk-2XEIO3HG.js";
  321. import {
  322. a as a10
  323. } from "./chunk-H6V2GHM5.js";
  324. import "./chunk-6A4U74YA.js";
  325. import "./chunk-CYI7KFYB.js";
  326. import "./chunk-5LXROFTA.js";
  327. import "./chunk-GJXW4HL5.js";
  328. import "./chunk-WJW5DUN6.js";
  329. import "./chunk-W72F6AS3.js";
  330. import "./chunk-PJ7ZQ4VD.js";
  331. import "./chunk-WDLTDV2L.js";
  332. import "./chunk-TERAW6FT.js";
  333. import "./chunk-N2663GRX.js";
  334. import "./chunk-O4FY3ITT.js";
  335. import {
  336. c as c2
  337. } from "./chunk-WEMIK25H.js";
  338. import {
  339. b as b3
  340. } from "./chunk-SSYBG3FG.js";
  341. import "./chunk-7N4X6GF3.js";
  342. import "./chunk-JXW4QTJA.js";
  343. import {
  344. m as m4,
  345. o2 as o5,
  346. q
  347. } from "./chunk-XNLG7T2T.js";
  348. import {
  349. o as o4
  350. } from "./chunk-IR4PV7VK.js";
  351. import "./chunk-UXF37FQ4.js";
  352. import "./chunk-ZOEK6QHJ.js";
  353. import "./chunk-2Z6LERTI.js";
  354. import {
  355. o as o2,
  356. v2 as v3
  357. } from "./chunk-OWVBLVP3.js";
  358. import "./chunk-AFZ7XSEW.js";
  359. import "./chunk-ZT2KFSF4.js";
  360. import "./chunk-5CF2NXNR.js";
  361. import "./chunk-YPCUUKFE.js";
  362. import "./chunk-ATPLLI5W.js";
  363. import {
  364. a as a7
  365. } from "./chunk-WJ3OEUD3.js";
  366. import {
  367. a as a4
  368. } from "./chunk-MXB2XLKV.js";
  369. import {
  370. l as l3
  371. } from "./chunk-XH7RUGVZ.js";
  372. import {
  373. m as m8
  374. } from "./chunk-TBBTRX4O.js";
  375. import {
  376. _,
  377. m as m3
  378. } from "./chunk-YBSUITLL.js";
  379. import {
  380. j as j3
  381. } from "./chunk-ALDCDSPV.js";
  382. import {
  383. n as n5
  384. } from "./chunk-DT6EAZQ5.js";
  385. import "./chunk-HNOZUNJ4.js";
  386. import {
  387. U as U2
  388. } from "./chunk-VNFRAYHO.js";
  389. import "./chunk-R5IG2D6H.js";
  390. import "./chunk-VBRY5KJM.js";
  391. import "./chunk-PDKDCAAD.js";
  392. import {
  393. M,
  394. M2,
  395. R,
  396. c2 as c,
  397. j2,
  398. r as r4
  399. } from "./chunk-ECW2QABR.js";
  400. import {
  401. s as s3
  402. } from "./chunk-GCDJLKH4.js";
  403. import {
  404. E as E2,
  405. k2
  406. } from "./chunk-MRJEICT6.js";
  407. import {
  408. A,
  409. d,
  410. e,
  411. l3 as l2,
  412. n as n2,
  413. n2 as n3,
  414. n6 as n4,
  415. t as t2,
  416. t2 as t3,
  417. v2,
  418. y3 as y
  419. } from "./chunk-Y3WMVFTW.js";
  420. import "./chunk-SAS7RONY.js";
  421. import {
  422. t as t4
  423. } from "./chunk-WSRBH7BF.js";
  424. import {
  425. n,
  426. r as r3
  427. } from "./chunk-IHXECKQQ.js";
  428. import {
  429. C,
  430. E,
  431. L,
  432. O,
  433. T,
  434. b,
  435. f,
  436. g,
  437. i,
  438. j,
  439. k,
  440. p,
  441. t as t5,
  442. v
  443. } from "./chunk-ULGDPLM2.js";
  444. import {
  445. s,
  446. s3 as s2
  447. } from "./chunk-EMJ4ZSM2.js";
  448. import {
  449. m,
  450. r as r2
  451. } from "./chunk-IKP3YN53.js";
  452. import {
  453. a,
  454. a2,
  455. e as e2,
  456. h,
  457. l,
  458. o,
  459. r,
  460. t,
  461. u
  462. } from "./chunk-GZT4BVFP.js";
  463. import "./chunk-A5ICIBVI.js";
  464. // node_modules/@arcgis/core/views/BreakpointsOwner.js
  465. var n10 = { widthBreakpoint: { getValue(e23) {
  466. const i32 = e23.viewSize[0], s30 = e23.breakpoints, a34 = this.values;
  467. return i32 <= s30.xsmall ? a34.xsmall : i32 <= s30.small ? a34.small : i32 <= s30.medium ? a34.medium : i32 <= s30.large ? a34.large : a34.xlarge;
  468. }, values: { xsmall: "xsmall", small: "small", medium: "medium", large: "large", xlarge: "xlarge" }, valueToClassName: { xsmall: "esri-view-width-xsmall esri-view-width-less-than-small esri-view-width-less-than-medium esri-view-width-less-than-large esri-view-width-less-than-xlarge", small: "esri-view-width-small esri-view-width-greater-than-xsmall esri-view-width-less-than-medium esri-view-width-less-than-large esri-view-width-less-than-xlarge", medium: "esri-view-width-medium esri-view-width-greater-than-xsmall esri-view-width-greater-than-small esri-view-width-less-than-large esri-view-width-less-than-xlarge", large: "esri-view-width-large esri-view-width-greater-than-xsmall esri-view-width-greater-than-small esri-view-width-greater-than-medium esri-view-width-less-than-xlarge", xlarge: "esri-view-width-xlarge esri-view-width-greater-than-xsmall esri-view-width-greater-than-small esri-view-width-greater-than-medium esri-view-width-greater-than-large" } }, heightBreakpoint: { getValue(e23) {
  469. const i32 = e23.viewSize[1], s30 = e23.breakpoints, a34 = this.values;
  470. return i32 <= s30.xsmall ? a34.xsmall : i32 <= s30.small ? a34.small : i32 <= s30.medium ? a34.medium : i32 <= s30.large ? a34.large : a34.xlarge;
  471. }, values: { xsmall: "xsmall", small: "small", medium: "medium", large: "large", xlarge: "xlarge" }, valueToClassName: { xsmall: "esri-view-height-xsmall esri-view-height-less-than-small esri-view-height-less-than-medium esri-view-height-less-than-large esri-view-height-less-than-xlarge", small: "esri-view-height-small esri-view-height-greater-than-xsmall esri-view-height-less-than-medium esri-view-height-less-than-large esri-view-height-less-than-xlarge", medium: "esri-view-height-medium esri-view-height-greater-than-xsmall esri-view-height-greater-than-small esri-view-height-less-than-large esri-view-height-less-than-xlarge", large: "esri-view-height-large esri-view-height-greater-than-xsmall esri-view-height-greater-than-small esri-view-height-greater-than-medium esri-view-height-less-than-xlarge", xlarge: "esri-view-height-xlarge esri-view-height-greater-than-xsmall esri-view-height-greater-than-small esri-view-height-greater-than-medium esri-view-height-greater-than-large" } }, orientation: { getValue(e23) {
  472. const i32 = e23.viewSize, s30 = i32[0], a34 = i32[1], t25 = this.values;
  473. return a34 >= s30 ? t25.portrait : t25.landscape;
  474. }, values: { portrait: "portrait", landscape: "landscape" }, valueToClassName: { portrait: "esri-view-orientation-portrait", landscape: "esri-view-orientation-landscape" } } };
  475. var o10 = { xsmall: 544, small: 768, medium: 992, large: 1200 };
  476. function m10(e23) {
  477. const i32 = e23;
  478. return i32 && i32.xsmall < i32.small && i32.small < i32.medium && i32.medium < i32.large;
  479. }
  480. function g4(e23, i32) {
  481. return i32 ? n10[e23].valueToClassName[i32].split(" ") : [];
  482. }
  483. var w4 = (w13) => {
  484. let d20 = class extends w13 {
  485. constructor(...e23) {
  486. super(...e23), this._breakpointsHandles = new u3(), this.orientation = null, this.widthBreakpoint = null, this.heightBreakpoint = null, this.breakpoints = o10;
  487. }
  488. initialize() {
  489. this._breakpointsHandles.add(l4(() => [this.breakpoints, this.size], () => this._updateClassNames(), h2));
  490. }
  491. destroy() {
  492. this.destroyed || (this._removeActiveClassNames(), this._breakpointsHandles = l(this._breakpointsHandles));
  493. }
  494. set breakpoints(e23) {
  495. if (e23 === this._get("breakpoints"))
  496. return;
  497. const i32 = m10(e23);
  498. if (!i32) {
  499. const e24 = JSON.stringify(o10, null, 2);
  500. console.warn("provided breakpoints are not valid, using defaults:" + e24);
  501. }
  502. e23 = i32 ? e23 : o10, this._set("breakpoints", { ...e23 });
  503. }
  504. _updateClassNames() {
  505. if (!this.container)
  506. return;
  507. const e23 = t4.acquire(), s30 = t4.acquire();
  508. let a34, t25 = false;
  509. for (a34 in n10) {
  510. const i32 = this[a34], r24 = n10[a34].getValue({ viewSize: this.size, breakpoints: this.breakpoints });
  511. i32 !== r24 && (t25 = true, this[a34] = r24, g4(a34, i32).forEach((e24) => s30.push(e24)), g4(a34, r24).forEach((i33) => e23.push(i33)));
  512. }
  513. t25 && (this._applyClassNameChanges(e23, s30), t4.release(e23), t4.release(s30));
  514. }
  515. _applyClassNameChanges(e23, i32) {
  516. const s30 = this.container;
  517. s30 && (i32.forEach((e24) => s30.classList.remove(e24)), e23.forEach((e24) => s30.classList.add(e24)));
  518. }
  519. _removeActiveClassNames() {
  520. const e23 = this.container;
  521. if (!e23)
  522. return;
  523. let i32;
  524. for (i32 in n10)
  525. g4(i32, this[i32]).forEach((i33) => e23.classList.remove(i33));
  526. }
  527. };
  528. return e([d()], d20.prototype, "breakpoints", null), e([d()], d20.prototype, "orientation", void 0), e([d()], d20.prototype, "widthBreakpoint", void 0), e([d()], d20.prototype, "heightBreakpoint", void 0), d20 = e([n3("esri.views.BreakpointsOwner")], d20), d20;
  529. };
  530. // node_modules/@arcgis/core/views/overlay/ViewOverlay.js
  531. var c12 = class extends y {
  532. constructor() {
  533. super(...arguments), this.items = new j3(), this._watchUpdatingTracking = new c3(), this._callbacks = new Map(), this._projector = i2(), this._hiddenProjector = i2();
  534. }
  535. get needsRender() {
  536. return this.items.length > 0;
  537. }
  538. initialize() {
  539. const t25 = document.createElement("div");
  540. t25.className = "esri-overlay-surface", this._set("surface", t25), this._hiddenSurface = document.createElement("div"), this._hiddenSurface.setAttribute("style", "visibility: hidden;"), t25.appendChild(this._hiddenSurface), this._watchUpdatingTracking.addOnCollectionChange(() => this.items, (t26) => {
  541. for (const e23 of t26.added) {
  542. const t27 = () => e23.render();
  543. this._callbacks.set(e23, t27), this._projector.append(this.surface, t27);
  544. }
  545. for (const e23 of t26.removed) {
  546. const t27 = this._projector.detach(this._callbacks.get(e23));
  547. this.surface.removeChild(t27.domNode), this._callbacks.delete(e23);
  548. }
  549. });
  550. }
  551. addItem(t25) {
  552. this.items.add(t25);
  553. }
  554. removeItem(t25) {
  555. this.items.remove(t25);
  556. }
  557. destroy() {
  558. this.items.removeAll(), this._callbacks.forEach((t25) => this._projector.detach(t25)), this._callbacks = null, this._projector = null, this._watchUpdatingTracking.destroy();
  559. }
  560. render() {
  561. this._projector.renderNow();
  562. }
  563. computeBoundingRect(t25) {
  564. const e23 = this._hiddenSurface, r24 = this._hiddenProjector;
  565. let o30 = null;
  566. const s30 = () => (o30 = t25.render(), o30);
  567. r24.append(e23, s30), r24.renderNow();
  568. const i32 = { left: 0, top: 0, right: 0, bottom: 0 };
  569. if (o30 && o30.domNode) {
  570. const t26 = o30.domNode.getBoundingClientRect();
  571. i32.left = t26.left, i32.top = t26.top, i32.right = t26.right, i32.bottom = t26.bottom;
  572. }
  573. for (r24.detach(s30); e23.firstChild; )
  574. e23.removeChild(e23.firstChild);
  575. return i32;
  576. }
  577. overlaps(t25, e23) {
  578. const r24 = this.computeBoundingRect(t25), o30 = this.computeBoundingRect(e23);
  579. return Math.max(r24.left, o30.left) <= Math.min(r24.right, o30.right) && Math.max(r24.top, o30.top) <= Math.min(r24.bottom, o30.bottom);
  580. }
  581. get hasVisibleItems() {
  582. return this.items.some((t25) => t25.visible);
  583. }
  584. renderCanvas(t25) {
  585. if (!this.items.some((t26) => t26.visible))
  586. return;
  587. const e23 = t25.getContext("2d");
  588. e23.save(), e23.font = `10px ${getComputedStyle(this.surface).fontFamily}`, this.items.forEach((t26) => {
  589. e23.save(), t26.renderCanvas(e23), e23.restore();
  590. }), e23.restore();
  591. }
  592. };
  593. e([d({ readOnly: true })], c12.prototype, "surface", void 0), e([d({ readOnly: true })], c12.prototype, "items", void 0), e([d({ readOnly: true })], c12.prototype, "needsRender", null), e([d({ readOnly: true })], c12.prototype, "_watchUpdatingTracking", void 0), e([d({ readOnly: true, aliasOf: "_watchUpdatingTracking.updating" })], c12.prototype, "updating", void 0), c12 = e([n3("esri.views.overlay.ViewOverlay")], c12);
  594. var n11 = c12;
  595. // node_modules/@arcgis/core/core/unitFormatUtils.js
  596. var K2 = ["B", "kB", "MB", "GB", "TB"];
  597. function L5(n34, r24) {
  598. let e23 = r24 === 0 ? 0 : Math.floor(Math.log(r24) / Math.log(o7.KILOBYTES));
  599. e23 = o5(e23, 0, K2.length - 1);
  600. const u23 = m2(r24 / o7.KILOBYTES ** e23, { maximumFractionDigits: 2 });
  601. return r2(n34.units.bytes[K2[e23]], { fileSize: u23 });
  602. }
  603. // node_modules/@arcgis/core/widgets/Feature/support/featureUtils.js
  604. var d4 = "esri.widgets.Feature.support.featureUtils";
  605. var p5 = s.getLogger(d4);
  606. var m11 = /href=(""|'')/gi;
  607. var y3 = /(\{([^\{\r\n]+)\})/g;
  608. var g5 = /\'/g;
  609. var h6 = /^\s*expression\//i;
  610. var I2 = /(\n)/gi;
  611. var b4 = /[\u00A0-\u9999<>\&]/gim;
  612. var F = /href\s*=\s*(?:\"([^\"]+)\"|\'([^\']+)\')/gi;
  613. var w5 = /^(?:mailto:|tel:)/;
  614. var N3 = "relationships/";
  615. var E3 = S("short-date-short-time");
  616. function j6(e23) {
  617. if (!t(e23))
  618. return e23.get("sourceLayer") || e23.get("layer");
  619. }
  620. async function x2(e23, t25) {
  621. return typeof e23 == "function" ? e23.call(null, t25) : e23;
  622. }
  623. function T3(e23 = "") {
  624. if (e23)
  625. return !w5.test(e23.trim().toLowerCase());
  626. }
  627. function C2(e23) {
  628. return !!e23 && h6.test(e23);
  629. }
  630. function M5(e23, t25) {
  631. if (!C2(t25) || !e23)
  632. return null;
  633. const r24 = t25.replace(h6, "").toLowerCase();
  634. let n34;
  635. return e23.some((e24) => e24.name.toLowerCase() === r24 && (n34 = e24, true)), n34;
  636. }
  637. function q2(e23, t25) {
  638. const r24 = M5(t25, e23?.fieldName);
  639. return r24 ? r24.title || null : e23 ? e23.label || e23.fieldName : null;
  640. }
  641. function R3(e23, t25) {
  642. const r24 = t25.get(e23.toLowerCase());
  643. return `{${r24 && r24.fieldName || e23}}`;
  644. }
  645. function v6(e23) {
  646. return e23.replace(m11, "");
  647. }
  648. function D(e23, t25) {
  649. const r24 = L6(t25, e23);
  650. return r24 ? r24.name : e23;
  651. }
  652. function A3(e23, t25) {
  653. return e23 && e23.map((e24) => D(e24, t25));
  654. }
  655. function L6(e23, t25) {
  656. return e23 && typeof e23.getField == "function" ? e23.getField(t25) : null;
  657. }
  658. function U3(e23) {
  659. return `${e23}`.trim();
  660. }
  661. function $({ attributes: e23, globalAttributes: t25, layer: r24, text: n34, expressionAttributes: i32, fieldInfoMap: o30 }) {
  662. return n34 ? S4({ formattedAttributes: t25, template: _3(n34, { ...t25, ...i32, ...e23 }, r24), fieldInfoMap: o30 }) : "";
  663. }
  664. function S4({ formattedAttributes: e23, template: t25, fieldInfoMap: r24 }) {
  665. return U3(v6(r2(r2(t25, (e24) => R3(e24, r24)), e23)));
  666. }
  667. function G(e23, t25, r24 = false) {
  668. const n34 = t25[e23];
  669. if (typeof n34 == "string") {
  670. const i32 = "%27", o30 = (r24 ? encodeURIComponent(n34) : n34).replace(g5, i32);
  671. t25[e23] = o30;
  672. }
  673. }
  674. function k3(e23, t25 = false) {
  675. const r24 = { ...e23 };
  676. return Object.keys(r24).forEach((e24) => G(e24, r24, t25)), r24;
  677. }
  678. function O3(e23, t25, r24) {
  679. const i32 = (t25 = U3(t25)) && t25[0] !== "{";
  680. return r2(e23, k3(r24, i32));
  681. }
  682. function P(e23, t25) {
  683. return e23.replace(y3, (e24, r24, n34) => {
  684. const i32 = L6(t25, n34);
  685. return i32 ? `{${i32.name}}` : r24;
  686. });
  687. }
  688. function _3(e23, t25, r24) {
  689. const n34 = P(e23, r24);
  690. return n34 ? n34.replace(F, (e24, r25, n35) => O3(e24, r25 || n35, t25)) : n34;
  691. }
  692. function z2(e23, t25) {
  693. if (typeof e23 == "string" && t25 && t25.dateFormat == null && (t25.places != null || t25.digitSeparator != null)) {
  694. const t26 = Number(e23);
  695. if (!isNaN(t26))
  696. return t26;
  697. }
  698. return e23;
  699. }
  700. function H2(e23) {
  701. return e23?.type === "feature";
  702. }
  703. function Q2(e23) {
  704. return !!e23?.layer;
  705. }
  706. function Z2(e23) {
  707. return e23?.type === "map-image";
  708. }
  709. function V(e23, t25) {
  710. const r24 = t25.fieldInfos, n34 = t25.fieldName, i32 = B2(r24, n34)?.clone(), o30 = t25.preventPlacesFormatting, s30 = t25.layer, c42 = L6(s30, n34);
  711. if (i32 && c42?.type === "date") {
  712. const e24 = i32.format || new u4();
  713. e24.dateFormat = e24.dateFormat || "short-date-short-time", e24.dateTimeFormatOptions = !Q2(s30) && H2(s30) && s30.datesInUnknownTimezone || Q2(s30) && Z2(s30.layer) && s30.layer.datesInUnknownTimezone ? { timeZone: "UTC" } : null, i32.format = e24;
  714. }
  715. const d20 = i32 && i32.format;
  716. return typeof e23 == "string" && ye(n34) && d20 ? d20.formatRasterPixelValue(e23) : typeof (e23 = z2(e23, d20)) == "string" || e23 == null || d20 == null ? te(e23) : o30 ? m2(e23, { ...u2(d20), minimumFractionDigits: 0, maximumFractionDigits: 20 }) : d20.format(e23);
  717. }
  718. function B2(e23, t25) {
  719. if (!e23 || !e23.length || !t25)
  720. return;
  721. const r24 = t25.toLowerCase();
  722. let n34;
  723. return e23.some((e24) => !(!e24.fieldName || e24.fieldName.toLowerCase() !== r24) && (n34 = e24, true)), n34;
  724. }
  725. function J2({ fieldName: e23, graphic: t25, layer: r24 }) {
  726. if (ue(e23))
  727. return null;
  728. if (!r24 || typeof r24.getFeatureType != "function")
  729. return null;
  730. const { typeIdField: n34 } = r24;
  731. if (!n34 || e23 !== n34)
  732. return null;
  733. const i32 = r24.getFeatureType(t25);
  734. return i32 ? i32.name : null;
  735. }
  736. function K3({ fieldName: e23, value: t25, graphic: r24, layer: n34 }) {
  737. if (ue(e23))
  738. return null;
  739. if (!n34 || typeof n34.getFieldDomain != "function")
  740. return null;
  741. const i32 = n34.getFieldDomain(e23, { feature: r24 });
  742. return i32 && i32.type === "coded-value" ? i32.getName(t25) : null;
  743. }
  744. function W(e23, t25) {
  745. const { creatorField: r24, creationDateField: n34, editorField: o30, editDateField: a34 } = e23;
  746. if (!t25)
  747. return;
  748. const u23 = t25[a34];
  749. if (typeof u23 == "number") {
  750. const e24 = t25[o30];
  751. return { type: "edit", date: L2(u23, E3), user: e24 };
  752. }
  753. const l27 = t25[n34];
  754. if (typeof l27 == "number") {
  755. const e24 = t25[r24];
  756. return { type: "create", date: L2(l27, E3), user: e24 };
  757. }
  758. return null;
  759. }
  760. function X(e23, t25) {
  761. const r24 = new Map();
  762. return e23 && e23.forEach((e24) => {
  763. const n34 = D(e24.fieldName, t25);
  764. e24.fieldName = n34, r24.set(n34.toLowerCase(), e24);
  765. }), r24;
  766. }
  767. function Y3(e23) {
  768. const t25 = [];
  769. if (!e23)
  770. return t25;
  771. const { fieldInfos: r24, content: n34 } = e23;
  772. return r24 && t25.push(...r24), n34 && Array.isArray(n34) ? (n34.forEach((e24) => {
  773. if (e24.type === "fields") {
  774. const r25 = e24 && e24.fieldInfos;
  775. r25 && t25.push(...r25);
  776. }
  777. }), t25) : t25;
  778. }
  779. function ee(e23) {
  780. return e23.replace(b4, (e24) => `&#${e24.charCodeAt(0)};`);
  781. }
  782. function te(e23) {
  783. return typeof e23 == "string" ? e23.replace(I2, '<br class="esri-text-new-line" />') : e23;
  784. }
  785. function re(e23) {
  786. const { value: t25, fieldName: r24, fieldInfos: n34, fieldInfoMap: o30, layer: a34, graphic: u23 } = e23;
  787. if (t25 == null)
  788. return "";
  789. const l27 = K3({ fieldName: r24, value: t25, graphic: u23, layer: a34 });
  790. if (l27)
  791. return l27;
  792. const s30 = J2({ fieldName: r24, graphic: u23, layer: a34 });
  793. if (s30)
  794. return s30;
  795. if (o30.get(r24.toLowerCase()))
  796. return V(t25, { fieldInfos: n34 || Array.from(o30.values()), fieldName: r24, layer: a34 });
  797. const f14 = a34 && a34.fieldsIndex;
  798. return f14 && f14.isDateField(r24) ? L2(t25, E3) : te(t25);
  799. }
  800. function ne({ fieldInfos: e23, attributes: t25, layer: r24, graphic: n34, fieldInfoMap: i32, relatedInfos: o30 }) {
  801. const a34 = {};
  802. return o30?.forEach((t26) => fe({ attributes: a34, relatedInfo: t26, fieldInfoMap: i32, fieldInfos: e23, layer: r24 })), Object.keys(t25).forEach((o31) => {
  803. const u23 = t25[o31];
  804. a34[o31] = re({ fieldName: o31, fieldInfos: e23, fieldInfoMap: i32, layer: r24, value: u23, graphic: n34 });
  805. }), a34;
  806. }
  807. async function ie(e23, t25) {
  808. const { layer: r24, graphic: n34, outFields: i32, objectIds: o30, returnGeometry: a34, spatialReference: u23 } = e23, l27 = o30[0];
  809. if (typeof l27 != "number" && typeof l27 != "string") {
  810. const e24 = "Could not query required fields for the specified feature. The feature's ID is invalid.", t26 = { layer: r24, graphic: n34, objectId: l27, requiredFields: i32 };
  811. return p5.warn(e24, t26), null;
  812. }
  813. if (!r24.capabilities?.operations?.supportsQuery) {
  814. const e24 = "The specified layer cannot be queried. The following fields will not be available.", t26 = { layer: r24, graphic: n34, requiredFields: i32, returnGeometry: a34 };
  815. return p5.warn(e24, t26), null;
  816. }
  817. const s30 = r24.createQuery();
  818. s30.objectIds = o30, s30.outFields = i32?.length ? i32 : [r24.objectIdField], s30.returnGeometry = !!a34, s30.returnZ = !!a34, s30.returnM = !!a34, s30.outSpatialReference = u23;
  819. return (await r24.queryFeatures(s30, t25)).features[0];
  820. }
  821. async function oe(e23) {
  822. if (!e23.expressionInfos?.length)
  823. return false;
  824. const t25 = await a10(), { arcadeUtils: { hasGeometryFunctions: r24 } } = t25;
  825. return r24(e23);
  826. }
  827. async function ae({ graphic: e23, popupTemplate: t25, layer: r24, spatialReference: n34 }, i32) {
  828. if (!r24 || !t25)
  829. return;
  830. if (typeof r24.load == "function" && await r24.load(i32), !e23.attributes)
  831. return;
  832. const o30 = e23.attributes[r24.objectIdField];
  833. if (o30 == null)
  834. return;
  835. const a34 = [o30], u23 = await t25.getRequiredFields(r24.fieldsIndex), l27 = de(u23, e23), f14 = l27 ? [] : u23, c42 = t25.returnGeometry || await oe(t25);
  836. if (l27 && !c42)
  837. return;
  838. const d20 = await ie({ layer: r24, graphic: e23, outFields: f14, objectIds: a34, returnGeometry: c42, spatialReference: n34 }, i32);
  839. d20 && (d20.geometry && (e23.geometry = d20.geometry), d20.attributes && (e23.attributes = { ...e23.attributes, ...d20.attributes }));
  840. }
  841. function ue(e23 = "") {
  842. return !!e23 && e23.includes(N3);
  843. }
  844. function le(e23) {
  845. return e23 ? `${N3}${e23.layerId}/${e23.fieldName}` : "";
  846. }
  847. function se({ attributes: e23, graphic: t25, relatedInfo: r24, fieldInfos: n34, fieldInfoMap: i32, layer: o30 }) {
  848. e23 && t25 && r24 && Object.keys(t25.attributes).forEach((a34) => {
  849. const u23 = le({ layerId: r24.relation.id.toString(), fieldName: a34 }), l27 = t25.attributes[a34];
  850. e23[u23] = re({ fieldName: u23, fieldInfos: n34, fieldInfoMap: i32, layer: o30, value: l27, graphic: t25 });
  851. });
  852. }
  853. function fe({ attributes: e23, relatedInfo: t25, fieldInfoMap: r24, fieldInfos: n34, layer: i32 }) {
  854. e23 && t25 && (t25.relatedFeatures && t25.relatedFeatures && t25.relatedFeatures.forEach((o30) => se({ attributes: e23, graphic: o30, relatedInfo: t25, fieldInfoMap: r24, fieldInfos: n34, layer: i32 })), t25.relatedStatsFeatures && t25.relatedStatsFeatures && t25.relatedStatsFeatures.forEach((o30) => se({ attributes: e23, graphic: o30, relatedInfo: t25, fieldInfoMap: r24, fieldInfos: n34, layer: i32 })));
  855. }
  856. var ce = (e23) => {
  857. if (!e23)
  858. return false;
  859. const t25 = e23.toUpperCase();
  860. return t25.includes("CURRENT_TIMESTAMP") || t25.includes("CURRENT_DATE") || t25.includes("CURRENT_TIME");
  861. };
  862. var de2 = ({ layer: e23, method: t25, query: n34, definitionExpression: i32 }) => {
  863. if (!e23.capabilities?.query?.supportsCacheHint || t25 === "attachments")
  864. return;
  865. const o30 = r(n34.where) && n34.where, a34 = r(n34.geometry) && n34.geometry;
  866. ce(i32) || ce(o30) || a34?.type === "extent" || n34.resultType === "tile" || (n34.cacheHint = true);
  867. };
  868. var pe = ({ query: e23, layer: t25, method: r24 }) => {
  869. de2({ layer: t25, method: r24, query: e23, definitionExpression: `${t25.definitionExpression} ${t25.serviceDefinitionExpression}` });
  870. };
  871. var me = ({ queryPayload: e23, layer: t25, method: r24 }) => {
  872. de2({ layer: t25, method: r24, query: e23, definitionExpression: `${t25.definitionExpression} ${t25.serviceDefinitionExpression}` });
  873. };
  874. // node_modules/@arcgis/core/widgets/Attachments/AttachmentsViewModel.js
  875. var u6 = { editing: false, operations: { add: true, update: true, delete: true } };
  876. var y4 = j3.ofType(l6);
  877. var A4 = "graphic.layer.capabilities.operations.supportsResizeAttachments";
  878. var f5 = class extends y {
  879. constructor(t25) {
  880. super(t25), this._getAttachmentsPromise = null, this._attachmentLayer = null, this.abilities = { ...u6 }, this.activeAttachmentInfo = null, this.attachmentInfos = new y4(), this.graphic = null, this.mode = "view", this.own(l4(() => this.graphic, () => this._graphicChanged(), h2));
  881. }
  882. destroy() {
  883. this._attachmentLayer = null, this.graphic = null;
  884. }
  885. castAbilities(t25) {
  886. return { ...u6, ...t25 };
  887. }
  888. get state() {
  889. return this._getAttachmentsPromise ? "loading" : this.graphic ? "ready" : "disabled";
  890. }
  891. get supportsResizeAttachments() {
  892. return this.get(A4) || false;
  893. }
  894. async getAttachments() {
  895. const { _attachmentLayer: t25, attachmentInfos: e23 } = this;
  896. if (!t25 || typeof t25.queryAttachments != "function")
  897. throw new s2("invalid-layer", "getAttachments(): A valid layer is required.");
  898. const a34 = this._getFeatureId(), i32 = new c4({ objectIds: [a34], returnMetadata: true }), n34 = [], s30 = t25.queryAttachments(i32).then((t26) => t26[a34] || n34).catch(() => n34);
  899. this._getAttachmentsPromise = s30, this.notifyChange("state");
  900. const o30 = await s30;
  901. return e23.removeAll(), o30.length && e23.addMany(o30), this._getAttachmentsPromise = null, this.notifyChange("state"), o30;
  902. }
  903. async addAttachment(t25) {
  904. const { _attachmentLayer: e23, attachmentInfos: a34, graphic: i32, abilities: n34 } = this;
  905. if (!t25)
  906. throw new s2("invalid-attachment", "addAttachment(): An attachment is required.", { attachment: t25 });
  907. if (!n34.operations.add)
  908. throw new s2("invalid-abilities", "addAttachment(): add abilities are required.");
  909. if (!e23 || typeof e23.addAttachment != "function")
  910. throw new s2("invalid-layer", "addAttachment(): A valid layer is required.");
  911. const s30 = e23.addAttachment(i32, t25).then((t26) => this._queryAttachment(t26.objectId)), o30 = await s30;
  912. return a34.add(o30), o30;
  913. }
  914. async deleteAttachment(t25) {
  915. const { _attachmentLayer: e23, attachmentInfos: a34, graphic: i32, abilities: n34 } = this;
  916. if (!t25)
  917. throw new s2("invalid-attachment-info", "deleteAttachment(): An attachmentInfo is required.", { attachmentInfo: t25 });
  918. if (!n34.operations.delete)
  919. throw new s2("invalid-abilities", "deleteAttachment(): delete abilities are required.");
  920. if (!e23 || typeof e23.deleteAttachments != "function")
  921. throw new s2("invalid-layer", "deleteAttachment(): A valid layer is required.");
  922. const s30 = e23.deleteAttachments(i32, [t25.id]).then(() => t25), o30 = await s30;
  923. return a34.remove(o30), o30;
  924. }
  925. async updateAttachment(t25, e23 = this.activeAttachmentInfo) {
  926. const { _attachmentLayer: a34, attachmentInfos: i32, graphic: n34, abilities: s30 } = this;
  927. if (!t25)
  928. throw new s2("invalid-attachment", "updateAttachment(): An attachment is required.", { attachment: t25 });
  929. if (!e23)
  930. throw new s2("invalid-attachment-info", "updateAttachment(): An attachmentInfo is required.", { attachmentInfo: e23 });
  931. if (!s30.operations.update)
  932. throw new s2("invalid-abilities", "updateAttachment(): Update abilities are required.");
  933. const o30 = i32.findIndex((t26) => t26 === e23);
  934. if (!a34 || typeof a34.updateAttachment != "function")
  935. throw new s2("invalid-layer", "updateAttachment(): A valid layer is required.");
  936. const c42 = a34.updateAttachment(n34, e23.id, t25).then((t26) => this._queryAttachment(t26.objectId)), h19 = await c42;
  937. return i32.splice(o30, 1, h19), h19;
  938. }
  939. async _queryAttachment(t25) {
  940. if (!t25)
  941. throw new s2("invalid-attachment-id", "Could not query attachment.");
  942. const { _attachmentLayer: e23 } = this, a34 = this._getFeatureId(), i32 = new c4({ objectIds: [a34], attachmentsWhere: `AttachmentId=${t25}`, returnMetadata: true });
  943. return e23.queryAttachments(i32).then((t26) => t26[a34][0]);
  944. }
  945. _getFeatureId() {
  946. const { _attachmentLayer: t25, graphic: e23 } = this;
  947. if (!t25 || !e23)
  948. return null;
  949. const { objectIdField: a34 } = t25, { attributes: i32 } = e23;
  950. return i32 && i32[a34];
  951. }
  952. _graphicChanged() {
  953. this.graphic && (this._setAttachmentLayer(), this.getAttachments().catch(() => {
  954. }));
  955. }
  956. _setAttachmentLayer() {
  957. const { graphic: t25 } = this, e23 = j6(t25);
  958. this._attachmentLayer = e23 ? e23.type === "scene" && r(e23.associatedLayer) ? e23.associatedLayer : e23 : null;
  959. }
  960. };
  961. e([d()], f5.prototype, "abilities", void 0), e([s3("abilities")], f5.prototype, "castAbilities", null), e([d()], f5.prototype, "activeAttachmentInfo", void 0), e([d({ readOnly: true, type: y4 })], f5.prototype, "attachmentInfos", void 0), e([d({ type: g2 })], f5.prototype, "graphic", void 0), e([d()], f5.prototype, "mode", void 0), e([d({ readOnly: true })], f5.prototype, "state", null), e([d({ readOnly: true })], f5.prototype, "supportsResizeAttachments", null), f5 = e([n3("esri.widgets.Attachments.AttachmentsViewModel")], f5);
  962. var g6 = f5;
  963. // node_modules/@arcgis/core/widgets/Attachments/support/attachmentUtils.js
  964. function e11(i32) {
  965. const e23 = i32.toLowerCase();
  966. return e23 === "image/bmp" || e23 === "image/emf" || e23 === "image/exif" || e23 === "image/gif" || e23 === "image/x-icon" || e23 === "image/jpeg" || e23 === "image/png" || e23 === "image/tiff" || e23 === "image/x-wmf";
  967. }
  968. function p6(e23) {
  969. const p36 = a4("esri/themes/base/images/files/");
  970. return e23 ? e23 === "text/plain" ? `${p36}text-32.svg` : e23 === "application/pdf" ? `${p36}pdf-32.svg` : e23 === "text/csv" ? `${p36}csv-32.svg` : e23 === "application/gpx+xml" ? `${p36}gpx-32.svg` : e23 === "application/x-dwf" ? `${p36}cad-32.svg` : e23 === "application/postscript" || e23 === "application/json" || e23 === "text/xml" || e23 === "model/vrml" ? `${p36}code-32.svg` : e23 === "application/x-zip-compressed" || e23 === "application/x-7z-compressed" || e23 === "application/x-gzip" || e23 === "application/x-tar" || e23 === "application/x-gtar" || e23 === "application/x-bzip2" || e23 === "application/gzip" || e23 === "application/x-compress" || e23 === "application/x-apple-diskimage" || e23 === "application/x-rar-compressed" || e23 === "application/zip" ? `${p36}zip-32.svg` : e23.includes("image/") ? `${p36}image-32.svg` : e23.includes("audio/") ? `${p36}sound-32.svg` : e23.includes("video/") ? `${p36}video-32.svg` : e23.includes("msexcel") || e23.includes("ms-excel") || e23.includes("spreadsheetml") ? `${p36}excel-32.svg` : e23.includes("msword") || e23.includes("ms-word") || e23.includes("wordprocessingml") ? `${p36}word-32.svg` : e23.includes("powerpoint") || e23.includes("presentationml") ? `${p36}report-32.svg` : `${p36}generic-32.svg` : `${p36}generic-32.svg`;
  971. }
  972. // node_modules/@arcgis/core/widgets/Attachments.js
  973. var v7 = { addButton: true, addSubmitButton: true, cancelAddButton: true, cancelUpdateButton: true, deleteButton: true, errorMessage: true, progressBar: true, updateButton: true };
  974. var y5 = { base: "esri-attachments", loaderContainer: "esri-attachments__loader-container", loader: "esri-attachments__loader", fadeIn: "esri-attachments--fade-in", container: "esri-attachments__container", containerList: "esri-attachments__container--list", containerPreview: "esri-attachments__container--preview", actions: "esri-attachments__actions", deleteButton: "esri-attachments__delete-button", addAttachmentButton: "esri-attachments__add-attachment-button", errorMessage: "esri-attachments__error-message", items: "esri-attachments__items", item: "esri-attachments__item", itemButton: "esri-attachments__item-button", itemMask: "esri-attachments__item-mask", itemMaskIcon: "esri-attachments__item-mask--icon", itemImage: "esri-attachments__image", itemImageResizable: "esri-attachments__image--resizable", itemLabel: "esri-attachments__label", itemFilename: "esri-attachments__filename", itemChevronIcon: "esri-attachments__item-chevron-icon", itemLink: "esri-attachments__item-link", itemLinkOverlay: "esri-attachments__item-link-overlay", itemLinkOverlayIcon: "esri-attachments__item-link-overlay-icon", itemEditIcon: "esri-attachments__item-edit-icon", itemAddIcon: "esri-attachments__item-add-icon", itemAddButton: "esri-attachments__item-add-button", formNode: "esri-attachments__form-node", fileFieldset: "esri-attachments__file-fieldset", fileLabel: "esri-attachments__file-label", fileName: "esri-attachments__file-name", fileInput: "esri-attachments__file-input", metadata: "esri-attachments__metadata", metadataFieldset: "esri-attachments__metadata-fieldset", progressBar: "esri-attachments__progress-bar", esriWidget: "esri-widget", esriButton: "esri-button", buttonDisabled: "esri-button--disabled", esriButtonSecondary: "esri-button--secondary", esriButtonTertiary: "esri-button--tertiary", esriButtonThird: "esri-button--third", esriButtonSmall: "esri-button--small", esriButtonHalf: "esri-button--half", empty: "esri-widget__content--empty", iconExternalLink: "esri-icon-link-external", iconEdit: "esri-icon-edit", iconRight: "esri-icon-right", iconLeft: "esri-icon-left", iconPlus: "esri-icon-plus" };
  975. var B3 = window.CSS;
  976. var A5 = class extends O2 {
  977. constructor(t25, e23) {
  978. super(t25, e23), this.abilities = null, this.displayType = "auto", this.graphic = null, this.label = void 0, this.messages = null, this.messagesUnits = null, this.selectedFile = null, this.submitting = false, this.viewModel = new g6(), this.visibleElements = { ...v7 }, this._supportsImageOrientation = B3 && B3.supports && B3.supports("image-orientation", "from-image"), this._addAttachmentForm = null, this._updateAttachmentForm = null;
  979. }
  980. initialize() {
  981. this.own([a3(() => this.viewModel?.attachmentInfos, "change", () => this.scheduleRender()), l4(() => this.viewModel?.mode, () => this._modeChanged(), h2)]);
  982. }
  983. get effectiveDisplayType() {
  984. const { displayType: t25 } = this;
  985. return t25 && t25 !== "auto" ? t25 : this.viewModel.supportsResizeAttachments ? "preview" : "list";
  986. }
  987. castVisibleElements(t25) {
  988. return { ...v7, ...t25 };
  989. }
  990. addAttachment() {
  991. const { _addAttachmentForm: t25, viewModel: s30 } = this;
  992. return this._set("submitting", true), this._set("error", null), s30.addAttachment(t25).then((t26) => (this._set("submitting", false), this._set("error", null), s30.mode = "view", t26)).catch((t26) => {
  993. throw this._set("submitting", false), this._set("error", new s2("attachments:add-attachment", this.messages.addErrorMessage, t26)), t26;
  994. });
  995. }
  996. deleteAttachment(t25) {
  997. const { viewModel: s30 } = this;
  998. return this._set("submitting", true), this._set("error", null), s30.deleteAttachment(t25).then((t26) => (this._set("submitting", false), this._set("error", null), s30.mode = "view", t26)).catch((t26) => {
  999. throw this._set("submitting", false), this._set("error", new s2("attachments:delete-attachment", this.messages.deleteErrorMessage, t26)), t26;
  1000. });
  1001. }
  1002. updateAttachment() {
  1003. const { viewModel: t25 } = this, { _updateAttachmentForm: s30 } = this;
  1004. return this._set("submitting", true), this._set("error", null), t25.updateAttachment(s30).then((e23) => (this._set("submitting", false), this._set("error", null), t25.mode = "view", e23)).catch((t26) => {
  1005. throw this._set("submitting", false), this._set("error", new s2("attachments:update-attachment", this.messages.updateErrorMessage, t26)), t26;
  1006. });
  1007. }
  1008. render() {
  1009. const { submitting: t25, viewModel: e23 } = this, { state: s30 } = e23;
  1010. return n6("div", { class: this.classes(y5.base, y5.esriWidget) }, t25 ? this.renderProgressBar() : null, s30 === "loading" ? this.renderLoading() : this.renderAttachments(), this.renderErrorMessage());
  1011. }
  1012. renderErrorMessage() {
  1013. const { error: t25, visibleElements: e23 } = this;
  1014. return t25 && e23.errorMessage ? n6("div", { key: "error-message", class: y5.errorMessage }, t25.message) : null;
  1015. }
  1016. renderAttachments() {
  1017. const { mode: t25, activeAttachmentInfo: e23 } = this.viewModel;
  1018. return t25 === "add" ? this.renderAddForm() : t25 === "edit" ? this.renderDetailsForm(e23) : this.renderAttachmentContainer();
  1019. }
  1020. renderLoading() {
  1021. return n6("div", { class: y5.loaderContainer, key: "loader" }, n6("div", { class: y5.loader }));
  1022. }
  1023. renderProgressBar() {
  1024. return this.visibleElements.progressBar ? n6("div", { class: y5.progressBar, key: "progress-bar" }) : null;
  1025. }
  1026. renderAddForm() {
  1027. const { submitting: t25, selectedFile: e23 } = this, s30 = t25 || !e23, i32 = this.visibleElements.cancelAddButton ? n6("button", { type: "button", bind: this, disabled: t25, onclick: this._cancelForm, class: this.classes(y5.esriButton, y5.esriButtonTertiary, y5.esriButtonSmall, y5.esriButtonHalf, t25 && y5.buttonDisabled) }, this.messages.cancel) : null, a34 = this.visibleElements.addSubmitButton ? n6("button", { type: "submit", disabled: s30, class: this.classes(y5.esriButton, y5.esriButtonSecondary, y5.esriButtonSmall, y5.esriButtonHalf, { [y5.buttonDisabled]: s30 }) }, this.messages.add) : null, n34 = e23 ? n6("span", { key: "file-name", class: y5.fileName }, e23.name) : null, r24 = n6("form", { bind: this, afterCreate: v4, afterRemoved: h3, "data-node-ref": "_addAttachmentForm", onsubmit: this._submitAddAttachment }, n6("fieldset", { class: y5.fileFieldset }, n34, n6("label", { class: this.classes(y5.fileLabel, y5.esriButton, y5.esriButtonSecondary) }, e23 ? this.messages.changeFile : this.messages.selectFile, n6("input", { class: y5.fileInput, type: "file", name: "attachment", bind: this, onchange: this._handleFileInputChange }))), a34, i32);
  1028. return n6("div", { key: "add-form-container", class: y5.formNode }, r24);
  1029. }
  1030. renderDetailsForm(t25) {
  1031. const { visibleElements: e23, viewModel: s30, selectedFile: i32, submitting: a34 } = this, { contentType: r24, size: o30, url: l27 } = t25, { abilities: m29 } = s30, d20 = a34 || !i32, c42 = m29.editing && m29.operations.delete && e23.deleteButton ? n6("button", { key: "delete-button", type: "button", disabled: a34, bind: this, onclick: (e24) => this._submitDeleteAttachment(e24, t25), class: this.classes(y5.esriButton, y5.esriButtonSmall, y5.esriButtonTertiary, y5.deleteButton, { [y5.buttonDisabled]: a34 }) }, this.messages.delete) : null, h19 = m29.editing && m29.operations.update && e23.updateButton ? n6("button", { disabled: d20, key: "update-button", type: "submit", class: this.classes(y5.esriButton, y5.esriButtonSmall, y5.esriButtonThird, { [y5.buttonDisabled]: d20 }) }, this.messages.update) : null, u23 = this.visibleElements.cancelUpdateButton ? n6("button", { disabled: a34, key: "cancel-button", type: "button", bind: this, onclick: this._cancelForm, class: this.classes(y5.esriButton, y5.esriButtonSmall, y5.esriButtonTertiary, y5.esriButtonThird, { [y5.buttonDisabled]: a34 }) }, this.messages.cancel) : null, _9 = i32 ? n6("span", { key: "file-name", class: y5.fileName }, i32.name) : null, g20 = m29.editing && m29.operations.update ? n6("fieldset", { key: "file", class: y5.fileFieldset }, _9, n6("label", { class: this.classes(y5.fileLabel, y5.esriButton, y5.esriButtonSecondary) }, this.messages.changeFile, n6("input", { class: y5.fileInput, type: "file", name: "attachment", bind: this, onchange: this._handleFileInputChange }))) : null, v15 = n6("fieldset", { key: "size", class: y5.metadataFieldset }, n6("label", null, L5(this.messagesUnits, o30))), B7 = n6("fieldset", { key: "content-type", class: y5.metadataFieldset }, n6("label", null, r24)), A7 = n6("form", { bind: this, afterCreate: v4, afterRemoved: h3, "data-node-ref": "_updateAttachmentForm", onsubmit: this._submitUpdateAttachment }, n6("div", { class: y5.metadata }, v15, B7), g20, n6("div", { class: y5.actions }, c42, u23, h19));
  1032. return n6("div", { key: "edit-form-container", class: y5.formNode }, n6("a", { class: y5.itemLink, href: l27, rel: "noreferrer", target: "_blank" }, this.renderImageMask({ attachmentInfo: t25, size: 400 }), n6("div", { class: y5.itemLinkOverlay }, n6("span", { class: y5.itemLinkOverlayIcon }, n6("svg", { xmlns: "http://www.w3.org/2000/svg", width: "32", height: "32", viewBox: "0 0 32 32" }, n6("path", { d: "M28 13h1v16H3V3h16v1H4v24h24zm-5-9h4.293L15.646 15.638l.707.707L28 4.707V9h1V3h-6z" }), n6("path", { fill: "none", d: "M0 0h32v32H0z" }))))), A7);
  1033. }
  1034. renderImageMask({ attachmentInfo: t25, size: e23 }) {
  1035. const { supportsResizeAttachments: s30 } = this.viewModel, { contentType: i32, name: a34, url: n34 } = t25, r24 = s30 && e11(i32), o30 = this._getCSSTransform(t25, r24), l27 = o30 ? { transform: o30, "image-orientation": "none" } : {}, m29 = n34.includes("?") ? "&" : "?", d20 = r24 ? `${n34}${m29}w=${e23}` : p6(i32), c42 = { [y5.itemMaskIcon]: !r24 }, p36 = { [y5.itemImageResizable]: s30 };
  1036. return n6("div", { class: this.classes(c42, y5.itemMask) }, n6("img", { styles: l27, alt: a34, src: d20, class: this.classes(p36, y5.itemImage) }));
  1037. }
  1038. renderAttachmentInfo({ attachmentInfo: t25, displayType: e23 }) {
  1039. const { viewModel: s30 } = this, { abilities: i32 } = s30, { name: a34, url: n34 } = t25, r24 = this.renderImageMask({ attachmentInfo: t25, size: e23 === "list" ? 48 : 400 }), o30 = i32.editing ? n6("span", { "aria-hidden": "true", class: this.classes(y5.itemChevronIcon, f3(this.container) ? y5.iconLeft : y5.iconRight) }) : null, l27 = [r24, n6("label", { class: y5.itemLabel }, n6("span", { class: y5.itemFilename }, a34 || this.messages.noTitle), o30)], m29 = i32.editing ? n6("button", { key: "details-button", bind: this, class: y5.itemButton, title: this.messages.attachmentDetails, "aria-label": this.messages.attachmentDetails, "data-attachment-info-id": t25.id, onclick: () => this._startEditAttachment(t25), type: "button" }, l27) : n6("a", { key: "details-link", class: y5.itemButton, href: n34, target: "_blank" }, l27);
  1040. return n6("li", { class: y5.item, key: t25 }, m29);
  1041. }
  1042. renderAttachmentContainer() {
  1043. const { effectiveDisplayType: t25, viewModel: e23, visibleElements: s30 } = this, { attachmentInfos: i32, abilities: a34 } = e23, n34 = i32 && i32.length, r24 = { [y5.containerList]: t25 !== "preview", [y5.containerPreview]: t25 === "preview" }, o30 = a34.editing && a34.operations.add && s30.addButton ? n6("button", { bind: this, onclick: () => this._startAddAttachment(), class: this.classes(y5.esriButton, y5.esriButtonTertiary, y5.addAttachmentButton), type: "button" }, n6("span", { "aria-hidden": "true", class: this.classes(y5.itemAddIcon, y5.iconPlus) }), this.messages.add) : null, l27 = n34 ? n6("ul", { class: y5.items }, i32.toArray().map((e24) => this.renderAttachmentInfo({ attachmentInfo: e24, displayType: t25 }))) : n6("div", { class: y5.empty }, this.messages.noAttachments);
  1044. return n6("div", { key: "attachments-container", class: this.classes(y5.container, r24) }, l27, o30);
  1045. }
  1046. _modeChanged() {
  1047. this._set("error", null), this._set("selectedFile", null);
  1048. }
  1049. _handleFileInputChange(t25) {
  1050. const e23 = t25.target, s30 = e23 && e23.files && e23.files.item(0);
  1051. this._set("selectedFile", s30);
  1052. }
  1053. _submitDeleteAttachment(t25, e23) {
  1054. t25.preventDefault(), this.deleteAttachment(e23);
  1055. }
  1056. _submitAddAttachment(t25) {
  1057. t25.preventDefault(), this.addAttachment();
  1058. }
  1059. _submitUpdateAttachment(t25) {
  1060. t25.preventDefault(), this.updateAttachment();
  1061. }
  1062. _startEditAttachment(t25) {
  1063. const { viewModel: e23 } = this;
  1064. e23.activeAttachmentInfo = t25, e23.mode = "edit";
  1065. }
  1066. _startAddAttachment() {
  1067. this.viewModel.mode = "add";
  1068. }
  1069. _cancelForm(t25) {
  1070. t25.preventDefault(), this.viewModel.mode = "view";
  1071. }
  1072. _getCSSTransform(t25, e23) {
  1073. const { orientationInfo: s30 } = t25;
  1074. return !this._supportsImageOrientation && e23 && s30 ? [s30.rotation ? `rotate(${s30.rotation}deg)` : "", s30.mirrored ? "scaleX(-1)" : ""].join(" ") : "";
  1075. }
  1076. };
  1077. e([o9("viewModel.abilities")], A5.prototype, "abilities", void 0), e([d()], A5.prototype, "displayType", void 0), e([d({ readOnly: true })], A5.prototype, "effectiveDisplayType", null), e([o9("viewModel.graphic")], A5.prototype, "graphic", void 0), e([d({ aliasOf: { source: "messages.widgetLabel", overridable: true } })], A5.prototype, "label", void 0), e([d(), e4("esri/widgets/Attachments/t9n/Attachments")], A5.prototype, "messages", void 0), e([d(), e4("esri/core/t9n/Units")], A5.prototype, "messagesUnits", void 0), e([d({ readOnly: true })], A5.prototype, "selectedFile", void 0), e([d({ readOnly: true })], A5.prototype, "submitting", void 0), e([d({ readOnly: true })], A5.prototype, "error", void 0), e([d({ type: g6 })], A5.prototype, "viewModel", void 0), e([d()], A5.prototype, "visibleElements", void 0), e([s3("visibleElements")], A5.prototype, "castVisibleElements", null), A5 = e([n3("esri.widgets.Attachments")], A5);
  1078. var w6 = A5;
  1079. // node_modules/@arcgis/core/widgets/Feature/FeatureAttachments/FeatureAttachmentsViewModel.js
  1080. var o11 = class extends g6 {
  1081. constructor(t25) {
  1082. super(t25), this.description = null, this.title = null;
  1083. }
  1084. };
  1085. e([d()], o11.prototype, "description", void 0), e([d()], o11.prototype, "title", void 0), o11 = e([n3("esri.widgets.Feature.FeatureAttachments.FeatureAttachmentsViewModel")], o11);
  1086. var c14 = o11;
  1087. // node_modules/@arcgis/core/widgets/support/Heading.js
  1088. var i9 = { heading: "esri-widget__heading" };
  1089. function n12(e23, n34) {
  1090. const l27 = o12(e23.level), s30 = `h${l27}`;
  1091. return delete e23.level, n6(s30, { ...e23, class: p2(i9.heading, e23.class), role: "heading", "aria-level": String(l27) }, n34);
  1092. }
  1093. function o12(t25) {
  1094. return o5(Math.ceil(t25), 1, 6);
  1095. }
  1096. // node_modules/@arcgis/core/widgets/Feature/support/FeatureElementInfo.js
  1097. var p7 = { base: "esri-feature-element-info", title: "esri-feature-element-info__title", description: "esri-feature-element-info__description" };
  1098. var n13 = class extends O2 {
  1099. constructor(e23, t25) {
  1100. super(e23, t25), this.description = null, this.headingLevel = 2, this.title = null;
  1101. }
  1102. render() {
  1103. return n6("div", { class: p7.base }, this.renderTitle(), this.renderDescription());
  1104. }
  1105. renderTitle() {
  1106. const { title: e23 } = this;
  1107. return e23 ? n6(n12, { level: this.headingLevel, class: p7.title }, e23) : null;
  1108. }
  1109. renderDescription() {
  1110. const { description: e23 } = this;
  1111. return e23 ? n6("div", { key: "description", class: p7.description }, e23) : null;
  1112. }
  1113. };
  1114. e([d()], n13.prototype, "description", void 0), e([d()], n13.prototype, "headingLevel", void 0), e([d()], n13.prototype, "title", void 0), n13 = e([n3("esri.widgets.Feature.support.FeatureElementInfo")], n13);
  1115. var c15 = n13;
  1116. // node_modules/@arcgis/core/widgets/Feature/FeatureAttachments.js
  1117. var d5 = { base: "esri-feature-attachments" };
  1118. var h7 = class extends O2 {
  1119. constructor(e23, t25) {
  1120. super(e23, t25), this._featureElementInfo = null, this.attachmentsWidget = new w6(), this.description = null, this.displayType = null, this.graphic = null, this.headingLevel = 2, this.title = null, this.viewModel = new c14();
  1121. }
  1122. initialize() {
  1123. this._featureElementInfo = new c15(), this.own([l4(() => [this.viewModel?.description, this.viewModel?.title, this.headingLevel], () => this._setupFeatureElementInfo(), h2), l4(() => this.viewModel?.graphic, (e23) => this.attachmentsWidget.graphic = e23, h2)]);
  1124. }
  1125. destroy() {
  1126. this.attachmentsWidget.destroy(), this._featureElementInfo.destroy();
  1127. }
  1128. render() {
  1129. const { attachmentsWidget: e23 } = this;
  1130. return n6("div", { class: d5.base }, this._featureElementInfo?.render(), e23?.render());
  1131. }
  1132. _setupFeatureElementInfo() {
  1133. const { description: e23, title: t25, headingLevel: s30 } = this;
  1134. this._featureElementInfo.set({ description: e23, title: t25, headingLevel: s30 });
  1135. }
  1136. };
  1137. e([d({ readOnly: true })], h7.prototype, "attachmentsWidget", void 0), e([o9("viewModel.description")], h7.prototype, "description", void 0), e([o9("attachmentsWidget.displayType")], h7.prototype, "displayType", void 0), e([o9("viewModel.graphic")], h7.prototype, "graphic", void 0), e([d()], h7.prototype, "headingLevel", void 0), e([o9("viewModel.title")], h7.prototype, "title", void 0), e([d({ type: c14 })], h7.prototype, "viewModel", void 0), h7 = e([n3("esri.widgets.Feature.FeatureAttachments")], h7);
  1138. var m12 = h7;
  1139. // node_modules/@arcgis/core/widgets/Feature/FeatureContent/FeatureContentViewModel.js
  1140. var p8 = class extends a6(y) {
  1141. constructor(t25) {
  1142. super(t25), this._loadingPromise = null, this.created = null, this.creator = null, this.destroyer = null, this.graphic = null, this.handles.add(l4(() => this.creator, (t26) => {
  1143. this._destroyContent(), this._createContent(t26);
  1144. }, h2));
  1145. }
  1146. destroy() {
  1147. this._destroyContent();
  1148. }
  1149. get state() {
  1150. return this._loadingPromise ? "loading" : "ready";
  1151. }
  1152. _destroyContent() {
  1153. const { created: t25, graphic: e23, destroyer: r24 } = this;
  1154. t25 && (x2(r24, { graphic: e23 }).catch(() => null), this._set("created", null));
  1155. }
  1156. async _createContent(t25) {
  1157. const { graphic: e23 } = this, r24 = x2(t25, { graphic: e23 }).catch(() => null);
  1158. this._loadingPromise = r24, this.notifyChange("state");
  1159. const o30 = await r24;
  1160. r24 === this._loadingPromise && (this._loadingPromise = null, this.notifyChange("state"), this._set("created", o30));
  1161. }
  1162. };
  1163. e([d({ readOnly: true })], p8.prototype, "created", void 0), e([d()], p8.prototype, "creator", void 0), e([d()], p8.prototype, "destroyer", void 0), e([d({ type: g2 })], p8.prototype, "graphic", void 0), e([d({ readOnly: true })], p8.prototype, "state", null), p8 = e([n3("esri.widgets.Feature.FeatureContent.FeatureContentViewModel")], p8);
  1164. var l11 = p8;
  1165. // node_modules/@arcgis/core/widgets/Feature/FeatureContent.js
  1166. var c16 = { base: "esri-feature-content", loaderContainer: "esri-feature-content__loader-container", loader: "esri-feature-content__loader" };
  1167. var p9 = class extends O2 {
  1168. constructor(e23, r24) {
  1169. super(e23, r24), this.creator = null, this.graphic = null, this.viewModel = null, this._addTargetToAnchors = (e24) => {
  1170. Array.from(e24.querySelectorAll("a")).forEach((e25) => {
  1171. T3(e25.href) && !e25.hasAttribute("target") && e25.setAttribute("target", "_blank");
  1172. });
  1173. };
  1174. }
  1175. renderLoading() {
  1176. return n6("div", { class: c16.loaderContainer, key: "loader" }, n6("div", { class: c16.loader }));
  1177. }
  1178. renderCreated() {
  1179. const e23 = this.viewModel?.created;
  1180. return e23 ? e23 instanceof HTMLElement ? n6("div", { key: e23, bind: e23, afterCreate: this._attachToNode }) : e5(e23) ? n6("div", { key: e23 }, !e23.destroyed && e23.render()) : n6("div", { key: e23, innerHTML: e23, afterCreate: this._addTargetToAnchors }) : null;
  1181. }
  1182. render() {
  1183. const e23 = this.viewModel?.state;
  1184. return n6("div", { class: c16.base }, e23 === "loading" ? this.renderLoading() : this.renderCreated());
  1185. }
  1186. _attachToNode(e23) {
  1187. const r24 = this;
  1188. e23.appendChild(r24);
  1189. }
  1190. };
  1191. e([o9("viewModel.creator")], p9.prototype, "creator", void 0), e([o9("viewModel.graphic")], p9.prototype, "graphic", void 0), e([d({ type: l11 })], p9.prototype, "viewModel", void 0), p9 = e([n3("esri.widgets.Feature.FeatureContent")], p9);
  1192. var l12 = p9;
  1193. // node_modules/@arcgis/core/widgets/Feature/FeatureFields/FeatureFieldsViewModel.js
  1194. var l13 = class extends y {
  1195. constructor(o30) {
  1196. super(o30), this.attributes = null, this.expressionInfos = null, this.description = null, this.fieldInfos = null, this.title = null;
  1197. }
  1198. get formattedFieldInfos() {
  1199. const { expressionInfos: o30, fieldInfos: e23 } = this, s30 = [];
  1200. return e23?.forEach((e24) => {
  1201. if (!(!e24.hasOwnProperty("visible") || e24.visible))
  1202. return;
  1203. const t25 = e24.clone();
  1204. t25.label = q2(t25, o30), s30.push(t25);
  1205. }), s30;
  1206. }
  1207. };
  1208. e([d()], l13.prototype, "attributes", void 0), e([d({ type: [i7] })], l13.prototype, "expressionInfos", void 0), e([d()], l13.prototype, "description", void 0), e([d({ type: [c5] })], l13.prototype, "fieldInfos", void 0), e([d({ readOnly: true })], l13.prototype, "formattedFieldInfos", null), e([d()], l13.prototype, "title", void 0), l13 = e([n3("esri.widgets.Feature.FeatureFields.FeatureFieldsViewModel")], l13);
  1209. var n14 = l13;
  1210. // node_modules/@arcgis/core/widgets/support/uriUtils.js
  1211. var s9 = [{ pattern: /^\s*(https?:\/\/([^\s]+))\s*$/i, target: "_blank", label: "{messages.view}" }, { pattern: /^\s*(tel:([^\s]+))\s*$/i, label: "{hierPart}" }, { pattern: /^\s*(mailto:([^\s]+))\s*$/i, label: "{hierPart}" }, { pattern: /^\s*(arcgis-appstudio-player:\/\/([^\s]+))\s*$/i, label: "{messages.openInApp}", appName: "App Studio Player" }, { pattern: /^\s*(arcgis-collector:\/\/([^\s]+))\s*$/i, label: "{messages.openInApp}", appName: "Collector" }, { pattern: /^\s*(arcgis-explorer:\/\/([^\s]+))\s*$/i, label: "{messages.openInApp}", appName: "Explorer" }, { pattern: /^\s*(arcgis-navigator:\/\/([^\s]+))\s*$/i, label: "{messages.openInApp}", appName: "Navigator" }, { pattern: /^\s*(arcgis-survey123:\/\/([^\s]+))\s*$/i, label: "{messages.openInApp}", appName: "Survey123" }, { pattern: /^\s*(arcgis-trek2there:\/\/([^\s]+))\s*$/i, label: "{messages.openInApp}", appName: "Trek2There" }, { pattern: /^\s*(arcgis-workforce:\/\/([^\s]+))\s*$/i, label: "{messages.openInApp}", appName: "Workforce" }, { pattern: /^\s*(iform:\/\/([^\s]+))\s*$/i, label: "{messages.openInApp}", appName: "iForm" }, { pattern: /^\s*(flow:\/\/([^\s]+))\s*$/i, label: "{messages.openInApp}", appName: "FlowFinity" }, { pattern: /^\s*(lfmobile:\/\/([^\s]+))\s*$/i, label: "{messages.openInApp}", appName: "Laserfische" }, { pattern: /^\s*(mspbi:\/\/([^\s]+))\s*$/i, label: "{messages.openInApp}", appName: "Microsoft Power Bi" }];
  1212. function a14(e23) {
  1213. let a34 = null;
  1214. return s9.some((s30) => (s30.pattern.test(e23) && (a34 = s30), !!a34)), a34;
  1215. }
  1216. function p10(s30, p36) {
  1217. if (typeof p36 != "string" || !p36)
  1218. return p36;
  1219. const r24 = a14(p36);
  1220. if (!r24)
  1221. return p36;
  1222. const t25 = p36.match(r24.pattern), n34 = t25 && t25[2], l27 = r2(r2(r24.label, { messages: s30, hierPart: n34 }), { appName: r24.appName }), i32 = r24.target ? ` target="${r24.target}"` : "", o30 = r24.target === "_blank" ? ' rel="noreferrer"' : "";
  1223. return p36.replace(r24.pattern, `<a${i32} href="$1"${o30}>${l27}</a>`);
  1224. }
  1225. // node_modules/@arcgis/core/widgets/Feature/FeatureFields.js
  1226. var u7 = { base: "esri-feature-fields", fieldHeader: "esri-feature-fields__field-header", fieldData: "esri-feature-fields__field-data", fieldDataDate: "esri-feature-fields__field-data--date", esriTable: "esri-widget__table" };
  1227. var m13 = class extends O2 {
  1228. constructor(e23, t25) {
  1229. super(e23, t25), this._featureElementInfo = null, this.attributes = null, this.description = null, this.expressionInfos = null, this.fieldInfos = null, this.title = null, this.viewModel = new n14(), this.messages = null, this.messagesURIUtils = null;
  1230. }
  1231. initialize() {
  1232. this._featureElementInfo = new c15(), this.own(l4(() => [this.viewModel?.description, this.viewModel?.title], () => this._setupFeatureElementInfo(), h2));
  1233. }
  1234. destroy() {
  1235. this._featureElementInfo.destroy();
  1236. }
  1237. renderFieldInfo(e23, t25) {
  1238. const { attributes: s30 } = this.viewModel, r24 = e23.fieldName, i32 = e23.label || r24, o30 = s30 ? s30[r24] == null ? "" : s30[r24] : "", l27 = !(!e23.format || !e23.format.dateFormat), a34 = typeof o30 == "number" && !l27 ? this._forceLTR(o30) : p10(this.messagesURIUtils, o30), d20 = { [u7.fieldDataDate]: l27 };
  1239. return n6("tr", { key: `fields-element-info-row-${r24}-${t25}` }, n6("th", { key: `fields-element-info-row-header-${r24}-${t25}`, class: u7.fieldHeader, innerHTML: i32 }), n6("td", { key: `fields-element-info-row-data-${r24}-${t25}`, class: this.classes(u7.fieldData, d20), innerHTML: a34 }));
  1240. }
  1241. renderFields() {
  1242. const { formattedFieldInfos: e23 } = this.viewModel;
  1243. return e23?.length ? n6("table", { class: u7.esriTable, summary: this.messages.fieldsSummary }, n6("tbody", null, e23.map((e24, t25) => this.renderFieldInfo(e24, t25)))) : null;
  1244. }
  1245. render() {
  1246. return n6("div", { class: u7.base }, this._featureElementInfo?.render(), this.renderFields());
  1247. }
  1248. _setupFeatureElementInfo() {
  1249. const { description: e23, title: t25 } = this;
  1250. this._featureElementInfo.set({ description: e23, title: t25 });
  1251. }
  1252. _forceLTR(e23) {
  1253. return `&lrm;${e23}`;
  1254. }
  1255. };
  1256. e([o9("viewModel.attributes")], m13.prototype, "attributes", void 0), e([o9("viewModel.description")], m13.prototype, "description", void 0), e([o9("viewModel.expressionInfos")], m13.prototype, "expressionInfos", void 0), e([o9("viewModel.fieldInfos")], m13.prototype, "fieldInfos", void 0), e([o9("viewModel.title")], m13.prototype, "title", void 0), e([d({ type: n14 })], m13.prototype, "viewModel", void 0), e([d(), e4("esri/widgets/Feature/t9n/Feature")], m13.prototype, "messages", void 0), e([d(), e4("esri/widgets/support/t9n/uriUtils")], m13.prototype, "messagesURIUtils", void 0), m13 = e([n3("esri.widgets.Feature.FeatureFields")], m13);
  1257. var c17 = m13;
  1258. // node_modules/@arcgis/core/renderers/support/numberUtils.js
  1259. var s10 = { maximumFractionDigits: 20 };
  1260. function c18(n34) {
  1261. return m2(n34, s10);
  1262. }
  1263. // node_modules/@arcgis/core/widgets/Legend/support/utils.js
  1264. var s11 = "<";
  1265. var i10 = ">";
  1266. var r12 = S("short-date");
  1267. function o13(t25, l27, o30, e23) {
  1268. let n34 = "";
  1269. l27 === 0 ? n34 = `${s11} ` : l27 === o30 && (n34 = `${i10} `);
  1270. let u23 = null;
  1271. return u23 = e23 ? L2(t25, r12) : c18(t25), n34 + u23;
  1272. }
  1273. // node_modules/@arcgis/core/widgets/Legend/support/colorRampUtils.js
  1274. var o14 = new l5([64, 64, 64]);
  1275. function n15(l27, o30) {
  1276. const n34 = [], r24 = l27.length - 1;
  1277. return l27.length === 5 ? n34.push(0, 2, 4) : n34.push(0, r24), l27.map((l28, t25) => n34.includes(t25) ? o13(l28, t25, r24, o30) : null);
  1278. }
  1279. async function r13(l27, e23, o30) {
  1280. let r24 = false, a34 = [], u23 = [];
  1281. if (l27.stops) {
  1282. const e24 = l27.stops;
  1283. a34 = e24.map((l28) => l28.value), r24 = e24.some((l28) => !!l28.label), r24 && (u23 = e24.map((l28) => l28.label));
  1284. }
  1285. const s30 = a34[0], i32 = a34[a34.length - 1];
  1286. if (s30 == null && i32 == null)
  1287. return null;
  1288. const c42 = r24 ? null : n15(a34, o30);
  1289. return (await Promise.all(a34.map(async (o31, n34) => ({ value: o31, color: l27.type === "opacity" ? await t12(o31, l27, e23) : (await import("./visualVariableUtils-ABC432IV.js")).getColor(l27, o31), label: r24 ? u23[n34] : c42[n34] })))).reverse();
  1290. }
  1291. async function t12(e23, n34, r24 = o14) {
  1292. const t25 = new l5(r24), a34 = (await import("./visualVariableUtils-ABC432IV.js")).getOpacity(n34, e23);
  1293. return a34 != null && (t25.a = a34), t25;
  1294. }
  1295. // node_modules/@arcgis/core/widgets/Legend/support/heatmapRampUtils.js
  1296. function r14(r24) {
  1297. if (!r24.colorStops)
  1298. return [];
  1299. const e23 = [...r24.colorStops].filter((o30) => o30.color?.a > 0);
  1300. let t25 = e23.length - 1;
  1301. if (e23 && e23[0]) {
  1302. const r25 = e23[t25];
  1303. r25 && r25.ratio !== 1 && (e23.push(new a8({ ratio: 1, color: r25.color })), t25++);
  1304. }
  1305. return e23.map((o30, e24) => {
  1306. let l27 = "";
  1307. return e24 === 0 ? l27 = r24.legendOptions?.minLabel || "low" : e24 === t25 && (l27 = r24.legendOptions?.maxLabel || "high"), { color: o30.color, label: l27, ratio: o30.ratio };
  1308. }).reverse();
  1309. }
  1310. // node_modules/@arcgis/core/renderers/support/utils.js
  1311. var d6 = s.getLogger("esri.renderers.support.utils");
  1312. var y6 = S("short-date");
  1313. function g7(e23, l27, t25) {
  1314. r3(e23, l27, () => []).push(...t25);
  1315. }
  1316. async function h8(l27) {
  1317. const n34 = new Map();
  1318. if ("visualVariables" in l27 && l27.visualVariables) {
  1319. const e23 = l27.visualVariables.filter((e24) => e24.type === "color");
  1320. for (const l28 of e23) {
  1321. const e24 = l28.field || l28.valueExpression, t25 = (await r13(l28)).map((e25) => e25.color);
  1322. g7(n34, e24, t25);
  1323. }
  1324. }
  1325. if (l27.type === "heatmap") {
  1326. const e23 = r14(l27).map((e24) => e24.color);
  1327. g7(n34, l27.field, e23);
  1328. } else if (l27.type === "pie-chart") {
  1329. for (const e23 of l27.attributes)
  1330. g7(n34, e23.field, [e23.color]);
  1331. g7(n34, null, [l27?.othersCategory?.color, j5(l27.backgroundFillSymbol, null)]);
  1332. } else if (l27.type === "dot-density") {
  1333. for (const e23 of l27.attributes)
  1334. g7(n34, e23.field, [e23.color]);
  1335. g7(n34, null, [l27.backgroundColor]);
  1336. } else if (l27.type === "unique-value")
  1337. if (l27.authoringInfo?.type === "predominance")
  1338. for (const e23 of l27.uniqueValueInfos)
  1339. g7(n34, e23.value.toString(), [j5(e23.symbol, null)]);
  1340. else {
  1341. const e23 = l27.uniqueValueInfos.map((e24) => j5(e24.symbol, null)), { field: t25, field2: o30, field3: i32, valueExpression: a34 } = l27;
  1342. (t25 || a34) && g7(n34, t25 || a34, e23), o30 && g7(n34, o30, e23), i32 && g7(n34, i32, e23);
  1343. }
  1344. else if (l27.type === "class-breaks") {
  1345. const e23 = l27.classBreakInfos.map((e24) => j5(e24.symbol, null));
  1346. g7(n34, l27.field || l27.valueExpression, e23);
  1347. } else
  1348. l27.type === "simple" && g7(n34, null, [j5(l27.symbol, null)]);
  1349. return "defaultSymbol" in l27 && l27.defaultSymbol && g7(n34, null, [j5(l27.defaultSymbol, null)]), n34.forEach((l28, t25) => {
  1350. const o30 = u(l28.filter(Boolean), (e23, l29) => JSON.stringify(e23) === JSON.stringify(l29));
  1351. n34.set(t25, o30);
  1352. }), n34;
  1353. }
  1354. // node_modules/@arcgis/core/widgets/Feature/support/relatedFeatureUtils.js
  1355. var p11 = "esri.widgets.Feature.support.relatedFeatureUtils";
  1356. var c19 = s.getLogger(p11);
  1357. var f6 = new Map();
  1358. function d7(e23) {
  1359. if (!ue(e23))
  1360. return null;
  1361. const [t25, r24] = e23.split("/").slice(1);
  1362. return { layerId: t25, fieldName: r24 };
  1363. }
  1364. function m15(e23, t25) {
  1365. if (!t25.relationships)
  1366. return null;
  1367. let r24 = null;
  1368. const { relationships: s30 } = t25;
  1369. return s30.some((t26) => t26.id === parseInt(e23, 10) && (r24 = t26, true)), r24;
  1370. }
  1371. function y7({ originRelationship: e23, relationships: t25, layerId: r24 }) {
  1372. let s30;
  1373. return t25 && t25.some((t26) => (`${t26.relatedTableId}` === r24 && t26.id === e23.id && (s30 = t26), !!s30)), s30;
  1374. }
  1375. function j7(e23, t25) {
  1376. const r24 = t25.toLowerCase();
  1377. for (const s30 in e23)
  1378. if (s30.toLowerCase() === r24)
  1379. return e23[s30];
  1380. return null;
  1381. }
  1382. function h9(e23, t25) {
  1383. const r24 = m15(e23, t25);
  1384. if (!r24)
  1385. return;
  1386. return { url: `${t25.url}/${r24.relatedTableId}`, sourceSpatialReference: t25.spatialReference, relation: r24, relatedFields: [], outStatistics: [] };
  1387. }
  1388. function F2(e23, t25) {
  1389. if (!t25)
  1390. return;
  1391. if (!e23)
  1392. return;
  1393. const { features: r24, statsFeatures: s30 } = e23, o30 = r24 && r24.value;
  1394. t25.relatedFeatures = o30 ? o30.features : [];
  1395. const i32 = s30 && s30.value;
  1396. t25.relatedStatsFeatures = i32 ? i32.features : [];
  1397. }
  1398. function g8(e23, t25, r24, s30) {
  1399. const o30 = new d3();
  1400. return o30.outFields = ["*"], o30.relationshipId = typeof t25.id == "number" ? t25.id : parseInt(t25.id, 10), o30.objectIds = [e23.attributes[r24.objectIdField]], r24.queryRelatedFeatures(o30, s30);
  1401. }
  1402. function I3(e23, t25, r24) {
  1403. let s30 = 0;
  1404. const o30 = [];
  1405. for (; s30 < t25.length; )
  1406. o30.push(`${e23} IN (${t25.slice(s30, r24 + s30)})`), s30 += r24;
  1407. return o30.join(" OR ");
  1408. }
  1409. async function S5(e23, t25, r24, a34) {
  1410. const l27 = r24.layerId.toString(), { layerInfo: u23, relation: p36, relatedFields: c42, outStatistics: f14, url: d20, sourceSpatialReference: m29 } = t25, h19 = y7({ originRelationship: p36, relationships: u23.relationships, layerId: l27 });
  1411. if (h19.relationshipTableId && h19.keyFieldInRelationshipTable) {
  1412. const t26 = (await g8(e23, h19, r24, a34))[e23.attributes[r24.objectIdField]];
  1413. if (!t26)
  1414. return null;
  1415. const o30 = t26.features.map((e24) => e24.attributes[u23.objectIdField]);
  1416. if (f14?.length > 0 && u23.supportsStatistics) {
  1417. const e24 = new b2();
  1418. e24.where = I3(u23.objectIdField, o30, 1e3), e24.outFields = c42, e24.outStatistics = f14, e24.sourceSpatialReference = m29;
  1419. const r25 = { features: Promise.resolve(t26), statsFeatures: s6(d20, e24) };
  1420. return E(r25);
  1421. }
  1422. }
  1423. const F4 = h19?.keyField;
  1424. if (F4) {
  1425. const r25 = B(U4(u23.fields, F4)), l28 = j7(e23.attributes, p36.keyField), c43 = r25 ? `${F4}=${l28}` : `${F4}='${l28}'`, f15 = s6(d20, new b2({ where: c43, outFields: t25.relatedFields, sourceSpatialReference: m29 }), a34), y17 = t25.outStatistics && t25.outStatistics.length > 0 && u23.supportsStatistics ? s6(d20, new b2({ where: c43, outFields: t25.relatedFields, outStatistics: t25.outStatistics, sourceSpatialReference: m29 }), a34) : null, h20 = { features: f15 };
  1426. return y17 && (h20.statsFeatures = y17), E(h20);
  1427. }
  1428. return null;
  1429. }
  1430. function w7(t25, r24) {
  1431. return U2(t25, { query: { f: "json" }, signal: r24 && r24.signal });
  1432. }
  1433. function b5({ relatedInfos: e23, layer: r24 }, o30) {
  1434. const i32 = {};
  1435. return e23.forEach((e24, s30) => {
  1436. const { relation: n34 } = e24;
  1437. if (!n34) {
  1438. const e25 = new s2("relation-required", "A relation is required on a layer to retrieve related records.");
  1439. throw c19.error(e25), e25;
  1440. }
  1441. const { relatedTableId: a34 } = n34;
  1442. if (typeof a34 != "number") {
  1443. const e25 = new s2("A related table ID is required on a layer to retrieve related records.");
  1444. throw c19.error(e25), e25;
  1445. }
  1446. const l27 = `${r24.url}/${a34}`, u23 = f6.get(l27), p36 = u23 || w7(l27, o30);
  1447. u23 || f6.set(l27, p36), i32[s30] = p36;
  1448. }), E(i32);
  1449. }
  1450. function R4({ graphic: e23, relatedInfos: t25, layer: r24 }, o30) {
  1451. const i32 = {};
  1452. return t25.forEach((t26, s30) => {
  1453. t26.layerInfo && (i32[s30] = S5(e23, t26, r24, o30));
  1454. }), E(i32);
  1455. }
  1456. function $2({ relatedInfo: e23, fieldName: t25, fieldInfo: r24 }) {
  1457. if (e23.relatedFields.push(t25), r24.statisticType) {
  1458. const s30 = new m6({ statisticType: r24.statisticType, onStatisticField: t25, outStatisticFieldName: t25 });
  1459. e23.outStatistics.push(s30);
  1460. }
  1461. }
  1462. function U4(e23, t25) {
  1463. if (e23 != null) {
  1464. t25 = t25.toLowerCase();
  1465. for (const r24 of e23)
  1466. if (r24 && r24.name.toLowerCase() === t25)
  1467. return r24;
  1468. }
  1469. return null;
  1470. }
  1471. // node_modules/@arcgis/core/widgets/Feature/FeatureMedia/FeatureMediaViewModel.js
  1472. var y8 = { chartAnimation: true };
  1473. var I4 = class extends y {
  1474. constructor(t25) {
  1475. super(t25), this.abilities = { ...y8 }, this.activeMediaInfoIndex = 0, this.attributes = null, this.description = null, this.fieldInfoMap = null, this.formattedAttributes = null, this.expressionAttributes = null, this.layer = null, this.mediaInfos = null, this.popupTemplate = null, this.relatedInfos = null, this.title = null;
  1476. }
  1477. castAbilities(t25) {
  1478. return { ...y8, ...t25 };
  1479. }
  1480. get activeMediaInfo() {
  1481. return this.formattedMediaInfos[this.activeMediaInfoIndex] || null;
  1482. }
  1483. get formattedMediaInfos() {
  1484. return this._formatMediaInfos() || [];
  1485. }
  1486. get formattedMediaInfoCount() {
  1487. return this.formattedMediaInfos.length;
  1488. }
  1489. setActiveMedia(t25) {
  1490. this._setContentElementMedia(t25);
  1491. }
  1492. next() {
  1493. this._pageContentElementMedia(1);
  1494. }
  1495. previous() {
  1496. this._pageContentElementMedia(-1);
  1497. }
  1498. _setContentElementMedia(t25) {
  1499. const { formattedMediaInfoCount: e23 } = this, o30 = (t25 + e23) % e23;
  1500. this.activeMediaInfoIndex = o30;
  1501. }
  1502. _pageContentElementMedia(t25) {
  1503. const { activeMediaInfoIndex: e23 } = this, o30 = e23 + t25;
  1504. this._setContentElementMedia(o30);
  1505. }
  1506. _formatMediaInfos() {
  1507. const { attributes: t25, mediaInfos: e23, formattedAttributes: o30, expressionAttributes: i32, fieldInfoMap: r24, layer: a34 } = this;
  1508. return e23?.map((e24) => {
  1509. const s30 = e24?.clone();
  1510. if (!s30)
  1511. return null;
  1512. if (s30.title = $({ attributes: t25, fieldInfoMap: r24, globalAttributes: o30, expressionAttributes: i32, layer: a34, text: s30.title }), s30.caption = $({ attributes: t25, fieldInfoMap: r24, globalAttributes: o30, expressionAttributes: i32, layer: a34, text: s30.caption }), s30.altText = $({ attributes: t25, fieldInfoMap: r24, globalAttributes: o30, expressionAttributes: i32, layer: a34, text: s30.altText }), s30.type === "image") {
  1513. const { value: t26 } = s30;
  1514. return this._setImageValue({ value: t26, formattedAttributes: o30, layer: a34 }), s30.value.sourceURL ? s30 : void 0;
  1515. }
  1516. if (s30.type === "pie-chart" || s30.type === "line-chart" || s30.type === "column-chart" || s30.type === "bar-chart") {
  1517. const { value: e25 } = s30;
  1518. return this._setChartValue({ value: e25, chartType: s30.type, attributes: t25, formattedAttributes: o30, layer: a34 }), s30;
  1519. }
  1520. return null;
  1521. }).filter(Boolean);
  1522. }
  1523. _setImageValue(t25) {
  1524. const { fieldInfoMap: e23 } = this, { value: o30, formattedAttributes: i32, layer: r24 } = t25, { linkURL: a34, sourceURL: s30 } = o30;
  1525. if (s30) {
  1526. const t26 = P(s30, r24);
  1527. o30.sourceURL = S4({ formattedAttributes: i32, template: t26, fieldInfoMap: e23 });
  1528. }
  1529. if (a34) {
  1530. const t26 = P(a34, r24);
  1531. o30.linkURL = S4({ formattedAttributes: i32, template: t26, fieldInfoMap: e23 });
  1532. }
  1533. }
  1534. _setChartValue(t25) {
  1535. const { value: e23, attributes: o30, formattedAttributes: i32, chartType: r24, layer: a34 } = t25, { popupTemplate: s30, relatedInfos: l27 } = this, { fields: n34, normalizeField: p36 } = e23;
  1536. e23.fields = A3(n34, a34), p36 && (e23.normalizeField = D(p36, a34));
  1537. if (!n34.some((t26) => !!(i32[t26] != null || ue(t26) && l27.size)))
  1538. return;
  1539. const c42 = s30?.fieldInfos;
  1540. n34.forEach((t26) => {
  1541. if (ue(t26))
  1542. return void (e23.series = [...e23.series, ...this._getRelatedChartInfos({ fieldInfos: c42, fieldName: t26, formattedAttributes: i32, chartType: r24, value: e23 })]);
  1543. const a35 = this._getChartOption({ value: e23, attributes: o30, chartType: r24, formattedAttributes: i32, fieldName: t26, fieldInfos: c42 });
  1544. e23.series.push(a35);
  1545. });
  1546. }
  1547. _getRelatedChartInfos(t25) {
  1548. const { fieldInfos: e23, fieldName: o30, formattedAttributes: i32, chartType: r24, value: a34 } = t25, s30 = [], l27 = d7(o30), { layerId: n34, fieldName: p36 } = l27, d20 = this.relatedInfos?.get(n34.toString());
  1549. if (!d20)
  1550. return s30;
  1551. const { relatedFeatures: u23, relation: f14 } = d20;
  1552. if (!f14 || !u23)
  1553. return s30;
  1554. const { cardinality: c42 } = f14;
  1555. u23.forEach((t26) => {
  1556. const { attributes: l28 } = t26;
  1557. l28 && Object.keys(l28).forEach((t27) => {
  1558. t27 === p36 && s30.push(this._getChartOption({ value: a34, attributes: l28, formattedAttributes: i32, fieldName: o30, chartType: r24, relatedFieldName: t27, fieldInfos: e23 }));
  1559. });
  1560. });
  1561. return c42 === "one-to-many" || c42 === "many-to-many" ? s30 : [s30[0]];
  1562. }
  1563. _getTooltip({ label: t25, value: e23, chartType: o30 }) {
  1564. return o30 === "pie-chart" ? `${t25}` : `${t25}: ${e23}`;
  1565. }
  1566. _getChartOption(t25) {
  1567. const { value: e23, attributes: o30, formattedAttributes: i32, fieldName: r24, relatedFieldName: l27, fieldInfos: n34, chartType: p36 } = t25, { layer: d20, fieldInfoMap: y17 } = this, { normalizeField: I6, tooltipField: b10 } = e23, v15 = I6 ? ue(I6) ? o30[d7(I6).fieldName] : o30[I6] : null, M9 = l27 && o30[l27] !== void 0 ? o30[l27] : o30[r24] !== void 0 ? o30[r24] : i32[r24], A7 = new i6({ fieldName: r24, value: M9 === void 0 ? null : M9 && v15 ? M9 / v15 : M9 });
  1568. if (ue(r24)) {
  1569. const t26 = y17.get(r24.toLowerCase()), e24 = y17.get(b10.toLowerCase()), o31 = t26?.fieldName ?? r24, a34 = i32[e24?.fieldName ?? b10] ?? t26?.label ?? t26?.fieldName ?? l27, s30 = i32[o31];
  1570. return A7.tooltip = this._getTooltip({ label: a34, value: s30, chartType: p36 }), A7;
  1571. }
  1572. const g20 = B2(n34, r24), _9 = D(r24, d20), x5 = b10 && i32[b10] !== void 0 ? i32[b10] : q2(g20 || new c5({ fieldName: _9 }), this.popupTemplate?.expressionInfos), C5 = i32[_9];
  1573. return A7.tooltip = this._getTooltip({ label: x5, value: C5, chartType: p36 }), A7;
  1574. }
  1575. };
  1576. e([d()], I4.prototype, "abilities", void 0), e([s3("abilities")], I4.prototype, "castAbilities", null), e([d()], I4.prototype, "activeMediaInfoIndex", void 0), e([d({ readOnly: true })], I4.prototype, "activeMediaInfo", null), e([d()], I4.prototype, "attributes", void 0), e([d()], I4.prototype, "description", void 0), e([d()], I4.prototype, "fieldInfoMap", void 0), e([d()], I4.prototype, "formattedAttributes", void 0), e([d()], I4.prototype, "expressionAttributes", void 0), e([d({ readOnly: true })], I4.prototype, "formattedMediaInfos", null), e([d()], I4.prototype, "layer", void 0), e([d({ readOnly: true })], I4.prototype, "formattedMediaInfoCount", null), e([d()], I4.prototype, "mediaInfos", void 0), e([d()], I4.prototype, "popupTemplate", void 0), e([d()], I4.prototype, "relatedInfos", void 0), e([d()], I4.prototype, "title", void 0), I4 = e([n3("esri.widgets.Feature.FeatureMedia.FeatureMediaViewModel")], I4);
  1577. var b6 = I4;
  1578. // node_modules/@esri/calcite-colors/dist/colors.module.js
  1579. var f7 = ["#ffffff", "#858585", "#ffbebe", "#ffebbe", "#ffebaf", "#ffffbe", "#e9ffbe", "#d3ffbe", "#beffe8", "#bee8ff", "#bed2ff", "#e8beff", "#ffbee8", "#ebebeb", "#707070", "#ff7f7f", "#ffa77f", "#ffd37f", "#ffff73", "#d1ff73", "#a3ff73", "#73ffdf", "#73dfff", "#73b2ff", "#df73ff", "#ff73df", "#d6d6d6", "#5c5c5c", "#ff0000", "#ff5500", "#ffaa00", "#ffff00", "#aaff00", "#55ff00", "#00ffc5", "#00c5ff", "#0070ff", "#c500ff", "#ff00c5", "#c2c2c2", "#474747", "#e60000", "#e64c00", "#e69800", "#e6e600", "#98e600", "#4ce600", "#00e6a9", "#00a9e6", "#005ce6", "#a900e6", "#e600a9", "#adadad", "#242424", "#a80000", "#a83800", "#a87000", "#a8a800", "#70a800", "#38a800", "#00a884", "#0084a8", "#004da8", "#8400a8", "#a80084", "#999999", "#1a1a1a", "#730000", "#732600", "#734c00", "#737300", "#4c7300", "#267300", "#00734c", "#004c73", "#002673", "#4c0073", "#73004"];
  1580. var b7 = [].concat(f7.slice(30, 39), f7.slice(28, 30).reverse());
  1581. var e12 = [{ name: "default", colors: b7 }, { name: "cat-dark", colors: ["#ed5151", "#149ece", "#a7c636", "#9e559c", "#fc921f", "#ffde3e", "#f789d8", "#b7814a", "#3caf99", "#6b6bd6", "#b54779", "#7f7f7f"] }, { name: "tropical-bliss", colors: ["#fce138", "#ff9399", "#fcd27e", "#f1983c", "#a553b7", "#b1a9d0", "#6ecffc", "#4c81cd", "#fc6f84", "#fc3e5a", "#6af689", "#48885c"] }, { name: "desert-blooms", colors: ["#102432", "#144d59", "#ffc730", "#ed9310", "#a64f1b", "#661510", "#d9351a", "#b31515", "#4a0932", "#8c213f", "#18382e", "#2c6954"] }, { name: "under-the-sea", colors: ["#bf9727", "#607100", "#00734c", "#704489", "#01acca", "#024e76", "#f09100", "#ea311f", "#c6004b", "#7570b3", "#666666", "#333333"] }, { name: "vibrant-rainbow", colors: ["#fffb00", "#f5cb11", "#9fd40c", "#46e39c", "#32b8a6", "#7ff2fa", "#ac08cc", "#dd33ff", "#eb7200", "#e8a784", "#bf2e2e", "#6c7000"] }, { name: "ocean-bay", colors: ["#191921", "#11495c", "#78b1c2", "#454f4b", "#8f8f82", "#9be0c0", "#87b051", "#f7ec88", "#ebdcc1", "#dbb658", "#c43541", "#75351e"] }, { name: "prairie-summer", colors: ["#332424", "#751555", "#d47013", "#d68989", "#211173", "#82aad6", "#7bfaeb", "#6ec9a8", "#6b6408", "#eada40", "#ccc54a", "#1fc235"] }, { name: "pastel-chalk", colors: ["#fffd99", "#f5e6a4", "#c1d48c", "#b8e3d0", "#a0b8b5", "#cbf7fa", "#d791f2", "#dfc1eb", "#f2b983", "#e8c4b2", "#bf8e8e", "#94995c"] }, { name: "seq-yellow-orange-red-bright", colors: ["#910000", "#b1260b", "#c0370f", "#e05919", "#ef6a1d", "#ff7b22", "#ffa143", "#ffb454", "#ffda74", "#ffed85"] }, { name: "seq-reds-bright", colors: ["#57453b", "#7b4238", "#9f4036", "#c23d33", "#d7483c", "#ec5244", "#f3696c", "#f9816c", "#ffc4ae", "#fff0dc"] }, { name: "seq-purples-bright", colors: ["#4e465c", "#5a4a78", "#695291", "#775baa", "#8663c3", "#946bdc", "#aa89e8", "#c1a6f3", "#d7c4ff", "#e6e1ff"] }, { name: "seq-blues-bright", colors: ["#404d54", "#435c6c", "#48799d", "#4b88b6", "#4d96ce", "#50a5e7", "#74bbed", "#98d0f3", "#bce6f9", "#e6faff"] }, { name: "seq-greens-bright", colors: ["#39544c", "#386757", "#368165", "#359b73", "#33b581", "#4bc392", "#64d2a2", "#7ce0b3", "#cbf6d9", "#f4ffea"] }, { name: "seq-browns-bright", colors: ["#524834", "#715b38", "#8f6e3c", "#ae8140", "#cc9444", "#eba748", "#eeb664", "#f0c47f", "#f9e0b7", "#fff8eb"] }];
  1582. // node_modules/@arcgis/core/widgets/support/chartUtils.js
  1583. var n16 = "en-us";
  1584. var h10 = new Map([["ar", () => import("./ar-TQHN4MOQ.js").then((t25) => t25.a)], ["bg-bg", () => import("./bg_BG-WYH7X6PJ.js").then((t25) => t25.b)], ["bs-ba", () => import("./bs_BA-MH3CELJQ.js").then((t25) => t25.b)], ["ca-es", () => import("./ca_ES-VIIOWGYP.js").then((t25) => t25.c)], ["cs-cz", () => import("./cs_CZ-PQJHXI2U.js").then((t25) => t25.c)], ["da-dk", () => import("./da_DK-LU4CXISV.js").then((t25) => t25.d)], ["de-de", () => import("./de_DE-3UFBKLTH.js").then((t25) => t25.d)], ["de-ch", () => import("./de_CH-ZGPNWPCT.js").then((t25) => t25.d)], ["el-gr", () => import("./el_GR-LAC2XCRL.js").then((t25) => t25.e)], ["en-us", () => import("./en_US-H4DEFW2S.js").then((t25) => t25.e)], ["en-ca", () => import("./en_CA-ZAIOOIDR.js").then((t25) => t25.e)], ["es-es", () => import("./es_ES-SWGL2U3X.js").then((t25) => t25.e)], ["et-ee", () => import("./et_EE-2MTCK7RO.js").then((t25) => t25.e)], ["fi-fi", () => import("./fi_FI-NLAF6TGN.js").then((t25) => t25.f)], ["fr-fr", () => import("./fr_FR-TMHVVCA5.js").then((t25) => t25.f)], ["he-il", () => import("./he_IL-PZLTATBT.js").then((t25) => t25.h)], ["hr-hr", () => import("./hr_HR-CZUNMVWX.js").then((t25) => t25.h)], ["hu-hu", () => import("./hu_HU-X42EPEWR.js").then((t25) => t25.h)], ["id-id", () => import("./id_ID-EOIVOSFK.js").then((t25) => t25.i)], ["it-it", () => import("./it_IT-RSNHF7HF.js").then((t25) => t25.i)], ["ja-jp", () => import("./ja_JP-DKLDGY3C.js").then((t25) => t25.j)], ["ko-kr", () => import("./ko_KR-4XWTGQHU.js").then((t25) => t25.k)], ["lt-lt", () => import("./lt_LT-TJ472TRQ.js").then((t25) => t25.l)], ["lv-lv", () => import("./lv_LV-ISYZ3547.js").then((t25) => t25.l)], ["nb-no", () => import("./nb_NO-NCOGLT26.js").then((t25) => t25.n)], ["nl-nl", () => import("./nl_NL-RYMYW4YH.js").then((t25) => t25.n)], ["pl-pl", () => import("./pl_PL-QVJBIAKG.js").then((t25) => t25.p)], ["pt-br", () => import("./pt_BR-57JVBOAG.js").then((t25) => t25.p)], ["pt-pt", () => import("./pt_PT-4EZ3DA3M.js").then((t25) => t25.p)], ["ro-ro", () => import("./ro_RO-VVI4JUHA.js").then((t25) => t25.r)], ["ru-ru", () => import("./ru_RU-2MHIWPEY.js").then((t25) => t25.r)], ["sk-sk", () => import("./sk_SK-DEQOCIQX.js").then((t25) => t25.s)], ["sl-sl", () => import("./sl_SL-DVTELK2A.js").then((t25) => t25.s)], ["sr-rs", () => import("./sr_RS-B3RB5B3Y.js").then((t25) => t25.s)], ["sv-se", () => import("./sv_SE-L5ZLNI46.js").then((t25) => t25.s)], ["th-th", () => import("./th_TH-HGNW4HTF.js").then((t25) => t25.t)], ["tr-tr", () => import("./tr_TR-AQ5OQWY5.js").then((t25) => t25.t)], ["uk-ua", () => import("./uk_UA-5LEB4DXP.js").then((t25) => t25.u)], ["vi-vn", () => import("./vi_VN-2E2J6SWD.js").then((t25) => t25.v)], ["zh-cn", () => import("./zh_Hans-RUNTGXF2.js").then((t25) => t25.z)], ["zh-hk", () => import("./zh_Hant-U6L3OFVY.js").then((t25) => t25.z)], ["zh-tw", () => import("./zh_Hant-U6L3OFVY.js").then((t25) => t25.z)]]);
  1585. function e13(t25) {
  1586. const s30 = t25.split("-")[0].toLowerCase();
  1587. let n34 = null;
  1588. for (const e23 of h10.keys())
  1589. if (e23.startsWith(s30)) {
  1590. n34 = e23;
  1591. break;
  1592. }
  1593. return n34;
  1594. }
  1595. function r15(t25) {
  1596. return t25 ? h10.has(t25.toLowerCase()) ? t25.toLowerCase() : e13(t25) || n16 : n16;
  1597. }
  1598. var o15;
  1599. var i11;
  1600. async function c20(t25 = l3()) {
  1601. if (t25 = r15(t25), o15 && t25 === i11)
  1602. return o15;
  1603. o15 = import("./chunks-SZQ34Y5K.js").then((t26) => t26.i), i11 = t25;
  1604. try {
  1605. const [s30, n34] = await Promise.all([o15, h10.get(i11)()]);
  1606. i11 === t25 && (s30.am4core.options.defaultLocale = n34.default), s30.am4core.options.suppressWarnings = true, s30.am4core.options.autoDispose = true;
  1607. } catch {
  1608. return o15 = null, i11 = null, null;
  1609. }
  1610. return o15;
  1611. }
  1612. function u9(s30, n34 = "default") {
  1613. const h19 = e12.find((t25) => t25.name === n34);
  1614. return h19 ? h19.colors.map((t25) => s30.color(t25)) : null;
  1615. }
  1616. // node_modules/@arcgis/core/widgets/Feature/FeatureMedia.js
  1617. var M6 = { base: "esri-feature-media", mediaContainer: "esri-feature-media__container", mediaItemContainer: "esri-feature-media__item-container", mediaItem: "esri-feature-media__item", mediaItemTitle: "esri-feature-media__item-title", mediaItemCaption: "esri-feature-media__item-caption", mediaPrevious: "esri-feature-media__previous", mediaPreviousIconLTR: "esri-feature-media__previous-icon", mediaPreviousIconRTL: "esri-feature-media__previous-icon--rtl", mediaNext: "esri-feature-media__next", mediaNextIconLTR: "esri-feature-media__next-icon", mediaNextIconRTL: "esri-feature-media__next-icon--rtl", mediaChart: "esri-feature-media__chart", mediaButton: "esri-feature-media__button", mediaIcon: "esri-feature-media__icon", iconLeftTriangleArrow: "esri-icon-left-triangle-arrow", iconRightTriangleArrow: "esri-icon-right-triangle-arrow" };
  1618. var I5 = 0.05;
  1619. var y9 = 0.95;
  1620. var w8 = 15;
  1621. var g9 = "color";
  1622. var b8 = "tooltip";
  1623. var C3 = "value";
  1624. var T4 = "default-line-value";
  1625. var x3 = class extends O2 {
  1626. constructor(e23, t25) {
  1627. super(e23, t25), this._refreshTimer = null, this._refreshIntervalInfo = null, this._featureElementInfo = null, this.attributes = null, this.activeMediaInfoIndex = null, this.description = null, this.fieldInfoMap = null, this.layer = null, this.mediaInfos = null, this.popupTemplate = null, this.relatedInfos = null, this.title = null, this.viewModel = new b6(), this.messages = null, this._getChartDependencies = async (e24) => {
  1628. const t26 = await c20(), { destroyed: i32, viewModel: r24 } = this;
  1629. if (i32 || !r24 || !e24)
  1630. return;
  1631. const { activeMediaInfo: a34 } = r24, o30 = await this._getRendererColors(t26);
  1632. this._renderChart({ chartDiv: e24, mediaInfo: a34, chartsModule: t26, colorMap: o30 });
  1633. };
  1634. }
  1635. initialize() {
  1636. this._featureElementInfo = new c15(), this.own([l4(() => [this.viewModel?.activeMediaInfo, this.viewModel?.activeMediaInfoIndex], () => this._setupMediaRefreshTimer(), h2), l4(() => [this.viewModel?.description, this.viewModel?.title], () => this._setupFeatureElementInfo(), h2)]);
  1637. }
  1638. destroy() {
  1639. this._clearMediaRefreshTimer(), this._featureElementInfo.destroy();
  1640. }
  1641. render() {
  1642. return n6("div", { bind: this, class: M6.base, onkeyup: this._handleMediaKeyup }, this._featureElementInfo?.render(), this.renderMedia());
  1643. }
  1644. renderMedia() {
  1645. const { formattedMediaInfoCount: e23 } = this.viewModel;
  1646. return e23 ? n6("div", { key: "media-element-container", class: M6.mediaContainer }, this.renderMediaPageButton("previous"), this.renderMediaInfo(), this.renderMediaPageButton("next")) : null;
  1647. }
  1648. renderImageMediaInfo(e23) {
  1649. const { _refreshIntervalInfo: t25 } = this, { activeMediaInfoIndex: i32, formattedMediaInfoCount: r24 } = this.viewModel, { value: a34, refreshInterval: o30, altText: s30, title: n34, type: l27 } = e23, { sourceURL: d20, linkURL: c42 } = a34, u23 = T3(c42) ? "_blank" : "_self", p36 = u23 === "_blank" ? "noreferrer" : "", h19 = o30 ? t25 : null, f14 = h19 ? h19.timestamp : 0, _9 = h19 ? h19.sourceURL : d20, M9 = n6("img", { alt: s30 || n34, key: `media-${l27}-${i32}-${r24}-${f14}`, src: _9 }), I6 = c42 ? n6("a", { title: n34, href: c42, rel: p36, target: u23 }, M9) : null;
  1650. return I6 || M9;
  1651. }
  1652. renderChartMediaInfo(e23) {
  1653. const { activeMediaInfoIndex: t25, formattedMediaInfoCount: i32 } = this.viewModel;
  1654. return n6("div", { key: `media-${e23.type}-${t25}-${i32}`, bind: this, class: M6.mediaChart, afterCreate: this._getChartDependencies });
  1655. }
  1656. renderMediaInfoType() {
  1657. const { activeMediaInfo: e23 } = this.viewModel;
  1658. return e23 ? e23.type === "image" ? this.renderImageMediaInfo(e23) : e23.type.includes("chart") ? this.renderChartMediaInfo(e23) : null : null;
  1659. }
  1660. renderMediaInfo() {
  1661. const { activeMediaInfo: e23 } = this.viewModel;
  1662. if (!e23)
  1663. return null;
  1664. const t25 = e23.title ? n6("div", { key: "media-title", class: M6.mediaItemTitle, innerHTML: e23.title }) : null, i32 = e23.caption ? n6("div", { key: "media-caption", class: M6.mediaItemCaption, innerHTML: e23.caption }) : null;
  1665. return n6("div", { key: "media-container", class: M6.mediaItemContainer }, n6("div", { key: "media-item-container", class: M6.mediaItem }, this.renderMediaInfoType()), t25, i32);
  1666. }
  1667. renderMediaPageButton(e23) {
  1668. if (this.viewModel.formattedMediaInfoCount < 2)
  1669. return null;
  1670. const t25 = e23 === "previous", i32 = t25 ? this.messages.previous : this.messages.next, r24 = t25 ? this.classes(M6.mediaButton, M6.mediaPrevious) : this.classes(M6.mediaButton, M6.mediaNext), a34 = t25 ? this.classes(M6.mediaIcon, M6.mediaPreviousIconLTR, M6.iconLeftTriangleArrow) : this.classes(M6.mediaIcon, M6.mediaNextIconLTR, M6.iconRightTriangleArrow), o30 = t25 ? this.classes(M6.mediaIcon, M6.mediaPreviousIconRTL, M6.iconRightTriangleArrow) : this.classes(M6.mediaIcon, M6.mediaNextIconRTL, M6.iconLeftTriangleArrow), s30 = t25 ? "media-previous" : "media-next", n34 = t25 ? this._previous : this._next;
  1671. return n6("button", { type: "button", key: s30, title: i32, "aria-label": i32, tabIndex: 0, class: r24, bind: this, onclick: n34 }, n6("span", { "aria-hidden": "true", class: a34 }), n6("span", { "aria-hidden": "true", class: o30 }));
  1672. }
  1673. _setupFeatureElementInfo() {
  1674. const { description: e23, title: t25 } = this;
  1675. this._featureElementInfo.set({ description: e23, title: t25 });
  1676. }
  1677. _next() {
  1678. this.viewModel.next();
  1679. }
  1680. _previous() {
  1681. this.viewModel.previous();
  1682. }
  1683. async _getRendererColors(e23) {
  1684. const { am4core: t25 } = e23, i32 = this.viewModel?.layer, r24 = new Map();
  1685. if (!i32)
  1686. return r24;
  1687. const a34 = await h8(i32.renderer);
  1688. a34.delete(null);
  1689. return Array.from(a34.values()).every((e24) => e24?.length === 1) ? (r24.set(T4, t25.color({ r: 50, g: 50, b: 50, a: 1 })), Array.from(a34.keys()).forEach((e24) => {
  1690. e24 && r24.set(e24, t25.color(a34.get(e24)[0].toCss(true)));
  1691. }), r24) : r24;
  1692. }
  1693. _handleMediaKeyup(e23) {
  1694. const i32 = i(e23);
  1695. i32 === "ArrowLeft" && (e23.stopPropagation(), this.viewModel.previous()), i32 === "ArrowRight" && (e23.stopPropagation(), this.viewModel.next());
  1696. }
  1697. _renderChart(e23) {
  1698. const { abilities: t25 } = this.viewModel, { chartsModule: i32, chartDiv: r24, mediaInfo: a34, colorMap: o30 } = e23, { value: s30, type: n34 } = a34, { am4core: l27 } = i32, d20 = u9(l27);
  1699. function c42(e24) {
  1700. e24 instanceof l27.ColorSet && d20 && (e24.list = d20);
  1701. }
  1702. r6() && l27.useTheme(i32.am4themes_dark);
  1703. const m29 = window.matchMedia("(prefers-reduced-motion: reduce)");
  1704. t25.chartAnimation && !m29.matches ? l27.useTheme(i32.am4themes_animated) : l27.unuseTheme(i32.am4themes_animated), l27.useTheme(c42);
  1705. const u23 = n34 === "pie-chart" ? this._createPieChart(e23) : this._createXYChart(e23);
  1706. r24.setAttribute("aria-label", a34.altText || a34.title), u23.data = s30.series.map((e24) => ({ [b8]: e24.tooltip, [C3]: e24.value, [g9]: o30.get(e24.fieldName) })).filter((e24) => n34 !== "pie-chart" || e24.value > 0);
  1707. }
  1708. _customizeChartTooltip(e23, t25) {
  1709. e23.label.wrap = true, e23.label.maxWidth = 200, e23.autoTextColor = false, e23.getFillFromObject = false, e23.label.fill = t25.color("#ffffff"), e23.background.fill = t25.color({ r: 0, g: 0, b: 0, a: 0.7 });
  1710. }
  1711. _createPieChart(e23) {
  1712. const { chartDiv: t25, chartsModule: i32 } = e23, { am4core: r24, am4charts: a34 } = i32, o30 = r24.create(t25, a34.PieChart);
  1713. o30.rtl = f3(this.container);
  1714. const s30 = o30.series.push(new a34.PieSeries());
  1715. return s30.labels.template.disabled = true, s30.ticks.template.disabled = true, s30.dataFields.value = C3, s30.dataFields.category = b8, this._customizeChartTooltip(s30.tooltip, r24), s30.slices.template.tooltipText = o30.rtl ? "{category}: %{value.percent.formatNumber('#.0')}" : "{category}: {value.percent.formatNumber('#.0')}%", s30.slices.template.propertyFields.fill = g9, s30.slices.template.propertyFields.stroke = g9, o30;
  1716. }
  1717. _getMinSeriesValue(e23) {
  1718. let t25 = 0;
  1719. return e23.forEach((e24) => t25 = Math.min(e24.value, t25)), t25;
  1720. }
  1721. _createColumnChart(e23, t25) {
  1722. const { chartsModule: i32, mediaInfo: r24 } = t25, { value: a34 } = r24, { am4core: o30, am4charts: s30 } = i32, n34 = e23.xAxes.push(new s30.CategoryAxis());
  1723. n34.dataFields.category = b8, n34.renderer.labels.template.disabled = true, this._customizeChartTooltip(n34.tooltip, o30), n34.tooltip.events.on("sizechanged", () => {
  1724. n34.tooltip.dy = -n34.tooltip.contentHeight;
  1725. });
  1726. const l27 = e23.yAxes.push(new s30.ValueAxis()), d20 = l27.renderer.labels.template;
  1727. l27.renderer.minLabelPosition = I5, l27.renderer.maxLabelPosition = y9, l27.min = this._getMinSeriesValue(a34.series), this._customizeChartTooltip(l27.tooltip, o30), d20.wrap = true;
  1728. const c42 = e23.series.push(new s30.ColumnSeries());
  1729. c42.dataFields.valueY = C3, c42.dataFields.categoryX = b8, c42.columns.template.propertyFields.fill = g9, c42.columns.template.propertyFields.stroke = g9, e23.cursor = new s30.XYCursor(), a34.series.length > w8 && (e23.scrollbarX = new o30.Scrollbar());
  1730. }
  1731. _createBarChart(e23, t25) {
  1732. const { chartsModule: i32, mediaInfo: r24 } = t25, { value: a34 } = r24, { am4core: o30, am4charts: s30 } = i32, n34 = e23.yAxes.push(new s30.CategoryAxis());
  1733. n34.dataFields.category = b8, n34.renderer.inversed = true, n34.renderer.labels.template.disabled = true, this._customizeChartTooltip(n34.tooltip, o30), n34.tooltip.events.on("sizechanged", () => {
  1734. n34.tooltip.dx = n34.tooltip.contentWidth;
  1735. });
  1736. const l27 = e23.xAxes.push(new s30.ValueAxis()), d20 = l27.renderer.labels.template;
  1737. l27.renderer.minLabelPosition = I5, l27.renderer.maxLabelPosition = y9, l27.min = this._getMinSeriesValue(a34.series), this._customizeChartTooltip(l27.tooltip, o30), d20.wrap = true;
  1738. const c42 = e23.series.push(new s30.ColumnSeries());
  1739. c42.dataFields.valueX = C3, c42.dataFields.categoryY = b8, c42.columns.template.propertyFields.fill = g9, c42.columns.template.propertyFields.stroke = g9, e23.cursor = new s30.XYCursor(), a34.series.length > w8 && (e23.scrollbarY = new o30.Scrollbar());
  1740. }
  1741. _createLineChart(e23, t25) {
  1742. const { chartsModule: i32, mediaInfo: r24, colorMap: a34 } = t25, { value: o30 } = r24, { am4core: s30, am4charts: n34 } = i32, l27 = e23.xAxes.push(new n34.CategoryAxis());
  1743. l27.dataFields.category = b8, l27.renderer.labels.template.disabled = true, this._customizeChartTooltip(l27.tooltip, s30), l27.tooltip.events.on("sizechanged", () => {
  1744. l27.tooltip.dy = -l27.tooltip.contentHeight;
  1745. });
  1746. const d20 = e23.yAxes.push(new n34.ValueAxis()), c42 = d20.renderer.labels.template;
  1747. d20.renderer.minLabelPosition = I5, d20.renderer.maxLabelPosition = y9, d20.min = this._getMinSeriesValue(o30.series), this._customizeChartTooltip(d20.tooltip, s30), c42.wrap = true;
  1748. const m29 = e23.series.push(new n34.LineSeries());
  1749. m29.dataFields.categoryX = b8, m29.dataFields.valueY = C3, m29.strokeWidth = 1;
  1750. const u23 = a34.get(T4);
  1751. u23 && (m29.stroke = u23);
  1752. const p36 = m29.bullets.push(new n34.CircleBullet());
  1753. p36.propertyFields.fill = g9, p36.propertyFields.stroke = g9, e23.cursor = new n34.XYCursor(), o30.series.length > w8 && (e23.scrollbarX = new s30.Scrollbar());
  1754. }
  1755. _createXYChart(e23) {
  1756. const { chartDiv: t25, chartsModule: i32, mediaInfo: r24 } = e23, { type: a34 } = r24, { am4core: o30, am4charts: s30 } = i32, n34 = o30.create(t25, s30.XYChart);
  1757. return n34.rtl = f3(this.container), a34 === "column-chart" && this._createColumnChart(n34, e23), a34 === "bar-chart" && this._createBarChart(n34, e23), a34 === "line-chart" && this._createLineChart(n34, e23), n34;
  1758. }
  1759. _clearMediaRefreshTimer() {
  1760. const { _refreshTimer: e23 } = this;
  1761. e23 && (clearTimeout(e23), this._refreshTimer = null);
  1762. }
  1763. _updateMediaInfoTimestamp(e23) {
  1764. const t25 = Date.now();
  1765. this._refreshIntervalInfo = { timestamp: t25, sourceURL: this._getImageSource(e23, t25) }, this.scheduleRender();
  1766. }
  1767. _setupMediaRefreshTimer() {
  1768. this._clearMediaRefreshTimer();
  1769. const { activeMediaInfo: e23 } = this.viewModel;
  1770. e23 && e23.type === "image" && e23.refreshInterval && this._setRefreshTimeout(e23);
  1771. }
  1772. _setRefreshTimeout(e23) {
  1773. const { refreshInterval: t25, value: i32 } = e23;
  1774. if (!t25)
  1775. return;
  1776. const r24 = 6e4 * t25;
  1777. this._updateMediaInfoTimestamp(i32.sourceURL);
  1778. const a34 = setInterval(() => {
  1779. this._updateMediaInfoTimestamp(i32.sourceURL);
  1780. }, r24);
  1781. this._refreshTimer = a34;
  1782. }
  1783. _getImageSource(e23, t25) {
  1784. const i32 = e23.includes("?") ? "&" : "?", [r24, a34 = ""] = e23.split("#");
  1785. return `${r24}${i32}timestamp=${t25}${a34 ? "#" : ""}${a34}`;
  1786. }
  1787. };
  1788. e([o9("viewModel.attributes")], x3.prototype, "attributes", void 0), e([o9("viewModel.activeMediaInfoIndex")], x3.prototype, "activeMediaInfoIndex", void 0), e([o9("viewModel.description")], x3.prototype, "description", void 0), e([o9("viewModel.fieldInfoMap")], x3.prototype, "fieldInfoMap", void 0), e([o9("viewModel.layer")], x3.prototype, "layer", void 0), e([o9("viewModel.mediaInfos")], x3.prototype, "mediaInfos", void 0), e([o9("viewModel.popupTemplate")], x3.prototype, "popupTemplate", void 0), e([o9("viewModel.relatedInfos")], x3.prototype, "relatedInfos", void 0), e([o9("viewModel.title")], x3.prototype, "title", void 0), e([d({ type: b6 })], x3.prototype, "viewModel", void 0), e([d(), e4("esri/widgets/Feature/t9n/Feature")], x3.prototype, "messages", void 0), x3 = e([n3("esri.widgets.Feature.FeatureMedia")], x3);
  1789. var F3 = x3;
  1790. // node_modules/@arcgis/core/widgets/Feature/support/arcadeFeatureUtils.js
  1791. var s12 = ["$datastore", "$map", "$layer", "$aggregatedfeatures"];
  1792. var n17 = "esri.widgets.Feature.support.arcadeFeatureUtils";
  1793. var o16 = s.getLogger(n17);
  1794. function c21(e23) {
  1795. return typeof e23 == "string" ? te(ee(e23)) : Array.isArray(e23) ? p12(e23) : e23?.declaredClass === "esri.arcade.Dictionary" ? l14(e23) : e23;
  1796. }
  1797. function p12(e23) {
  1798. return `<ul class="esri-widget__list">${e23.map((e24) => `<li>${typeof e24 == "string" ? te(ee(e24)) : e24}</li>`).join("")}</ul>`;
  1799. }
  1800. function l14(e23) {
  1801. return `<table class="esri-widget__table">${e23.keys().map((r24) => {
  1802. const t25 = e23.field(r24);
  1803. return `<tr><th>${r24}</th><td>${typeof t25 == "string" ? te(ee(t25)) : t25}</td></tr>`;
  1804. }).join("")}</table>`;
  1805. }
  1806. function u10({ aggregatedFeatures: e23, arcadeUtils: r24, featureSetVars: a34, context: i32, viewInfo: s30, map: n34, graphic: o30, interceptor: c42 }) {
  1807. a34.forEach((a35) => {
  1808. const p36 = a35.toLowerCase(), l27 = { map: n34, spatialReference: s30.sr, interceptor: c42 };
  1809. if (p36 === "$map" && (i32.vars[p36] = r24.convertMapToFeatureSetCollection(l27)), p36 === "$layer" && (i32.vars[p36] = r24.convertFeatureLayerToFeatureSet({ layer: o30.sourceLayer, spatialReference: s30.sr, interceptor: c42 })), p36 === "$datastore" && (i32.vars[p36] = r24.convertServiceUrlToWorkspace({ url: o30.sourceLayer.url, spatialReference: s30.sr, interceptor: c42 })), p36 === "$aggregatedfeatures") {
  1810. const a36 = o30.layer, { fields: n35, objectIdField: l28, geometryType: u23, spatialReference: f14, displayField: g20 } = a36, y17 = new Ke({ fields: n35, objectIdField: l28, geometryType: u23, spatialReference: f14, displayField: g20, ...a36.type === "feature" ? { templates: a36.templates, typeIdField: a36.typeIdField, types: a36.types } : null, source: e23 });
  1811. i32.vars[p36] = r24.convertFeatureLayerToFeatureSet({ layer: y17, spatialReference: s30.sr, interceptor: c42 });
  1812. }
  1813. });
  1814. }
  1815. function f8() {
  1816. return import("./arcadeUtils-B4URZJQW.js");
  1817. }
  1818. async function g10({ graphic: e23, view: r24 }) {
  1819. const { isAggregate: t25, layer: a34 } = e23;
  1820. if (!t25 || !a34 || r24?.type !== "2d")
  1821. return [];
  1822. const i32 = await r24.whenLayerView(a34);
  1823. if (!i32.createQuery || !i32.queryFeatures)
  1824. return [];
  1825. const s30 = i32.createQuery();
  1826. s30.aggregateIds = [e23.getObjectId()];
  1827. const { features: n34 } = await i32.queryFeatures(s30);
  1828. return n34;
  1829. }
  1830. async function y10({ expressionInfo: e23, arcadeUtils: r24, interceptor: t25, spatialReference: a34, map: i32, graphic: n34, view: c42 }) {
  1831. if (!e23 || !e23.expression)
  1832. return null;
  1833. const p36 = r24.createSyntaxTree(e23.expression), l27 = s12.filter((e24) => r24.hasVariable(p36, e24)), [f14] = await Promise.all([g10({ graphic: n34, view: c42 }), r24.loadScriptDependencies(p36, true, l27)]), y17 = r24.getViewInfo({ spatialReference: a34 }), d20 = r24.createExecContext(n34, y17);
  1834. d20.interceptor = t25, d20.useAsync = true, u10({ aggregatedFeatures: f14, arcadeUtils: r24, featureSetVars: l27, context: d20, viewInfo: y17, map: i32, graphic: n34, interceptor: t25 });
  1835. const m29 = r24.createFunction(p36, d20);
  1836. return r24.executeAsyncFunction(m29, d20).catch((r25) => o16.error("arcade-execution-error", { error: r25, graphic: n34, expressionInfo: e23 }));
  1837. }
  1838. async function d8({ expressionInfos: e23, spatialReference: t25, graphic: a34, interceptor: i32, map: s30, view: n34 }) {
  1839. if (!e23 || !e23.length)
  1840. return {};
  1841. const o30 = await f8(), p36 = {};
  1842. for (const r24 of e23)
  1843. p36[`expression/${r24.name}`] = y10({ expressionInfo: r24, arcadeUtils: o30, interceptor: i32, spatialReference: t25, map: s30, graphic: a34, view: n34 });
  1844. const l27 = await E(p36), u23 = {};
  1845. for (const r24 in l27)
  1846. u23[r24] = c21(l27[r24].value);
  1847. return u23;
  1848. }
  1849. // node_modules/@arcgis/core/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js
  1850. var j8 = 1;
  1851. var v8 = class extends a6(y) {
  1852. constructor(e23) {
  1853. super(e23), this._abortController = null, this.expressionInfo = null, this.graphic = null, this.contentElement = null, this.contentElementViewModel = null, this.interceptor = null, this.view = null, this._cancelQuery = () => {
  1854. const { _abortController: e24 } = this;
  1855. e24 && e24.abort(), this._abortController = null;
  1856. }, this._createVM = () => {
  1857. const e24 = this.contentElement?.type;
  1858. this.contentElementViewModel?.destroy();
  1859. const t25 = e24 === "fields" ? new n14() : e24 === "media" ? new b6() : e24 === "text" ? new l11() : null;
  1860. this._set("contentElementViewModel", t25);
  1861. }, this._compile = async () => {
  1862. this._cancelQuery();
  1863. const e24 = new AbortController();
  1864. this._abortController = e24, await this._compileExpression(), this._abortController === e24 && (this._abortController = null);
  1865. }, this._compileThrottled = e7(this._compile, j8, this), this._compileExpression = async () => {
  1866. const { expressionInfo: e24, graphic: t25, interceptor: r24, spatialReference: n34, map: s30, view: i32, _abortController: l27 } = this;
  1867. if (!(e24 && t25 && n34 && s30))
  1868. return void this._set("contentElement", null);
  1869. const p36 = await f8();
  1870. if (l27 !== this._abortController)
  1871. return;
  1872. const a34 = await y10({ arcadeUtils: p36, expressionInfo: e24, graphic: t25, interceptor: r24, map: s30, spatialReference: n34, view: i32 });
  1873. if (!a34 || a34.declaredClass !== "esri.arcade.Dictionary")
  1874. return void this._set("contentElement", null);
  1875. const h19 = await Me(a34, l27.signal), u23 = h19?.type, f14 = u23 === "media" ? I.fromJSON(h19) : u23 === "text" ? c7.fromJSON(h19) : u23 === "fields" ? c6.fromJSON(h19) : null;
  1876. this._set("contentElement", f14);
  1877. }, this.handles.add([l4(() => [this.expressionInfo, this.graphic, this.map, this.spatialReference, this.view], () => this._compileThrottled(), h2), l4(() => [this.contentElement], () => this._createVM(), h2)]);
  1878. }
  1879. destroy() {
  1880. this._cancelQuery(), this.contentElementViewModel?.destroy(), this._set("contentElementViewModel", null), this._set("contentElement", null);
  1881. }
  1882. get spatialReference() {
  1883. return this.view?.spatialReference || null;
  1884. }
  1885. set spatialReference(e23) {
  1886. e23 !== void 0 ? this._override("spatialReference", e23) : this._clearOverride("spatialReference");
  1887. }
  1888. get state() {
  1889. const { _abortController: e23, contentElement: t25, contentElementViewModel: o30 } = this;
  1890. return e23 ? "loading" : t25 || o30 ? "ready" : "disabled";
  1891. }
  1892. get map() {
  1893. return this.view?.map || null;
  1894. }
  1895. set map(e23) {
  1896. e23 !== void 0 ? this._override("map", e23) : this._clearOverride("map");
  1897. }
  1898. };
  1899. e([d()], v8.prototype, "_abortController", void 0), e([d({ type: i5 })], v8.prototype, "expressionInfo", void 0), e([d({ type: g2 })], v8.prototype, "graphic", void 0), e([d({ readOnly: true })], v8.prototype, "contentElement", void 0), e([d({ readOnly: true })], v8.prototype, "contentElementViewModel", void 0), e([d()], v8.prototype, "interceptor", void 0), e([d()], v8.prototype, "spatialReference", null), e([d({ readOnly: true })], v8.prototype, "state", null), e([d()], v8.prototype, "map", null), e([d()], v8.prototype, "view", void 0), v8 = e([n3("esri.widgets.Feature.FeatureExpression.FeatureExpressionViewModel")], v8);
  1900. var E4 = v8;
  1901. // node_modules/@arcgis/core/widgets/Feature/FeatureExpression.js
  1902. var c22 = { iconLoading: "esri-icon-loading-indicator esri-rotating", base: "esri-feature-expression", loadingSpinnerContainer: "esri-feature__loading-container", spinner: "esri-feature__loading-spinner" };
  1903. var u11 = class extends O2 {
  1904. constructor(e23, t25) {
  1905. super(e23, t25), this.viewModel = new E4();
  1906. }
  1907. initialize() {
  1908. this.own(l4(() => this.viewModel?.contentElementViewModel, () => this._setupExpressionWidget(), h2));
  1909. }
  1910. destroy() {
  1911. this._destroyContentWidget();
  1912. }
  1913. renderLoading() {
  1914. return n6("div", { key: "loading-container", class: c22.loadingSpinnerContainer }, n6("span", { class: this.classes(c22.iconLoading, c22.spinner) }));
  1915. }
  1916. render() {
  1917. const { state: e23 } = this.viewModel;
  1918. return n6("div", { class: c22.base }, e23 === "loading" ? this.renderLoading() : e23 === "disabled" ? null : this._contentWidget?.render());
  1919. }
  1920. _destroyContentWidget() {
  1921. const { _contentWidget: e23 } = this;
  1922. e23 && (e23.viewModel = null, e23.destroy()), this._contentWidget = null;
  1923. }
  1924. _setupExpressionWidget() {
  1925. const { contentElementViewModel: e23, contentElement: t25 } = this.viewModel, o30 = t25?.type;
  1926. this._destroyContentWidget();
  1927. const s30 = e23 ? o30 === "fields" ? new c17({ viewModel: e23 }) : o30 === "media" ? new F3({ viewModel: e23 }) : o30 === "text" ? new l12({ viewModel: e23 }) : null : null;
  1928. this._contentWidget = s30, this.scheduleRender();
  1929. }
  1930. };
  1931. e([d({ type: E4 })], u11.prototype, "viewModel", void 0), u11 = e([n3("esri.widgets.Feature.FeatureExpression")], u11);
  1932. var m16 = u11;
  1933. // node_modules/@arcgis/core/arcade/featureset/support/FeatureSetQueryInterceptor.js
  1934. var e14 = class {
  1935. constructor(e23, a34) {
  1936. this.preLayerQueryCallback = e23, this.preRequestCallback = a34, this.preLayerQueryCallback || (this.preLayerQueryCallback = (e24) => {
  1937. }), this.preRequestCallback || (this.preLayerQueryCallback = (e24) => {
  1938. });
  1939. }
  1940. };
  1941. // node_modules/@arcgis/core/widgets/Feature/FeatureViewModel.js
  1942. var q3;
  1943. var D2 = 1;
  1944. var Q3 = "content-view-models";
  1945. var B4 = "esri.widgets.FeatureViewModel";
  1946. var G2 = s.getLogger(B4);
  1947. var H3 = { attachmentsContent: true, chartAnimation: true, customContent: true, expressionContent: true, fieldsContent: true, mediaContent: true, textContent: true };
  1948. var z3 = q3 = class extends y {
  1949. constructor(e23) {
  1950. super(e23), this._handles = new u3(), this._error = null, this._featureAbortController = null, this.graphicChangedThrottled = e7(this._graphicChanged, D2, this), this._expressionAttributes = null, this._graphicExpressionAttributes = null, this.abilities = { ...H3 }, this.content = null, this.contentViewModels = [], this.defaultPopupTemplateEnabled = false, this.formattedAttributes = null, this.lastEditInfo = null, this.relatedInfos = new Map(), this.title = "", this.view = null, this._isAllowedContentType = (e24) => {
  1951. const { abilities: t25 } = this;
  1952. return e24.type === "attachments" && t25.attachmentsContent || e24.type === "custom" && t25.customContent || e24.type === "fields" && t25.fieldsContent || e24.type === "media" && t25.mediaContent || e24.type === "text" && t25.textContent || e24.type === "expression" && t25.expressionContent;
  1953. }, this._handles.add(l4(() => [this.graphic, this._effectivePopupTemplate, this.abilities], () => this.graphicChangedThrottled(), h2));
  1954. }
  1955. destroy() {
  1956. this._clear(), this._cancelFeatureQuery(), this._error = null, this._handles.destroy(), this._handles = null, this.graphic = null, this._destroyContentViewModels(), this.relatedInfos.clear();
  1957. }
  1958. get _effectivePopupTemplate() {
  1959. return r(this.graphic) ? this.graphic.getEffectivePopupTemplate(this.defaultPopupTemplateEnabled) : null;
  1960. }
  1961. get _fieldInfoMap() {
  1962. return X(Y3(this._effectivePopupTemplate), this._sourceLayer);
  1963. }
  1964. get _sourceLayer() {
  1965. return j6(this.graphic);
  1966. }
  1967. castAbilities(e23) {
  1968. return { ...H3, ...e23 };
  1969. }
  1970. get state() {
  1971. return this.graphic ? this._error ? "error" : this.waitingForContent ? "loading" : "ready" : "disabled";
  1972. }
  1973. set graphic(e23) {
  1974. this._set("graphic", e23 ? e23.clone() : null);
  1975. }
  1976. get spatialReference() {
  1977. return this.get("view.spatialReference") || null;
  1978. }
  1979. set spatialReference(e23) {
  1980. e23 !== void 0 ? this._override("spatialReference", e23) : this._clearOverride("spatialReference");
  1981. }
  1982. get map() {
  1983. return this.get("view.map") || null;
  1984. }
  1985. set map(e23) {
  1986. e23 !== void 0 ? this._override("map", e23) : this._clearOverride("map");
  1987. }
  1988. get waitingForContent() {
  1989. return !!this._featureAbortController;
  1990. }
  1991. setActiveMedia(e23, t25) {
  1992. const r24 = this.contentViewModels[e23];
  1993. r24 instanceof b6 && r24.setActiveMedia(t25);
  1994. }
  1995. nextMedia(e23) {
  1996. const t25 = this.contentViewModels[e23];
  1997. t25 instanceof b6 && t25.next();
  1998. }
  1999. previousMedia(e23) {
  2000. const t25 = this.contentViewModels[e23];
  2001. t25 instanceof b6 && t25.previous();
  2002. }
  2003. _clear() {
  2004. this._set("title", ""), this._set("content", null), this._set("formattedAttributes", null);
  2005. }
  2006. async _graphicChanged() {
  2007. this._cancelFeatureQuery(), this._error = null, this._clear();
  2008. const { graphic: e23 } = this;
  2009. if (!e23)
  2010. return;
  2011. const t25 = new AbortController();
  2012. this._featureAbortController = t25;
  2013. try {
  2014. await this._queryFeature({ signal: t25.signal });
  2015. } catch (r24) {
  2016. g(r24) || (this._error = r24, G2.error("error", "The popupTemplate could not be displayed for this feature.", { error: r24, graphic: e23, popupTemplate: this._effectivePopupTemplate }));
  2017. }
  2018. this._featureAbortController === t25 && (this._featureAbortController = null);
  2019. }
  2020. _cancelFeatureQuery() {
  2021. const { _featureAbortController: e23 } = this;
  2022. e23 && e23.abort(), this._featureAbortController = null;
  2023. }
  2024. _compileContentElement(e23, t25) {
  2025. return e23.type === "attachments" ? this._compileAttachments(e23, t25) : e23.type === "custom" ? this._compileCustom(e23, t25) : e23.type === "fields" ? this._compileFields(e23, t25) : e23.type === "media" ? this._compileMedia(e23, t25) : e23.type === "text" ? this._compileText(e23, t25) : e23.type === "expression" ? this._compileExpression(e23, t25) : void 0;
  2026. }
  2027. _compileContent(e23) {
  2028. if (this._destroyContentViewModels(), this.graphic)
  2029. return Array.isArray(e23) ? e23.filter(this._isAllowedContentType).map((e24, t25) => this._compileContentElement(e24, t25)) : typeof e23 == "string" ? this._compileText(new c7({ text: e23 }), 0).text : e23;
  2030. }
  2031. _destroyContentViewModels() {
  2032. this._handles?.remove(Q3), this.contentViewModels.forEach((e23) => e23 && !e23.destroyed && e23.destroy()), this._set("contentViewModels", []);
  2033. }
  2034. _setExpressionContentVM(e23, t25) {
  2035. const { formattedAttributes: r24 } = this, { contentElement: i32, contentElementViewModel: o30 } = e23, s30 = i32?.type;
  2036. o30 && s30 && (s30 === "fields" && (this._createFieldsFormattedAttributes({ contentElement: i32, contentElementIndex: t25, formattedAttributes: r24 }), o30.set(this._createFieldsVMParams(i32, t25))), s30 === "media" && (this._createMediaFormattedAttributes({ contentElement: i32, contentElementIndex: t25, formattedAttributes: r24 }), o30.set(this._createMediaVMParams(i32, t25))), s30 === "text" && o30.set(this._createTextVMParams(i32)));
  2037. }
  2038. _compileExpression(e23, t25) {
  2039. const { expressionInfo: r24 } = e23, { graphic: i32, map: o30, spatialReference: s30, view: n34 } = this, a34 = new E4({ expressionInfo: r24, graphic: i32, interceptor: q3.interceptor, map: o30, spatialReference: s30, view: n34 });
  2040. return this.contentViewModels[t25] = a34, this._handles.add(l4(() => a34.contentElementViewModel, () => this._setExpressionContentVM(a34, t25), h2), Q3), e23;
  2041. }
  2042. _compileAttachments(e23, t25) {
  2043. const { graphic: r24 } = this, { description: i32, title: o30 } = e23;
  2044. return this.contentViewModels[t25] = new c14({ graphic: r24, ...this._compileTitleAndDesc({ title: o30, description: i32 }) }), e23;
  2045. }
  2046. _compileCustom(e23, t25) {
  2047. const { graphic: r24 } = this, { creator: i32, destroyer: o30 } = e23;
  2048. return this.contentViewModels[t25] = new l11({ graphic: r24, creator: i32, destroyer: o30 }), e23;
  2049. }
  2050. _compileTitleAndDesc({ title: e23, description: t25 }) {
  2051. const { _fieldInfoMap: r24, _sourceLayer: i32, graphic: o30, formattedAttributes: s30, _expressionAttributes: n34 } = this, { attributes: a34 } = o30, l27 = s30.global;
  2052. return { title: $({ attributes: a34, fieldInfoMap: r24, globalAttributes: l27, expressionAttributes: n34, layer: i32, text: e23 }), description: $({ attributes: a34, fieldInfoMap: r24, globalAttributes: l27, expressionAttributes: n34, layer: i32, text: t25 }) };
  2053. }
  2054. _createFieldsVMParams(e23, t25) {
  2055. const { _effectivePopupTemplate: r24, formattedAttributes: i32 } = this, o30 = { ...i32.global, ...i32.content[t25] }, s30 = (e23?.fieldInfos || r24?.fieldInfos)?.filter(({ fieldName: e24 }) => C2(e24) || ue(e24) || o30.hasOwnProperty(e24)), n34 = r24?.expressionInfos, { description: a34, title: l27 } = e23;
  2056. return { attributes: o30, expressionInfos: n34, fieldInfos: s30, ...this._compileTitleAndDesc({ title: l27, description: a34 }) };
  2057. }
  2058. _compileFields(e23, t25) {
  2059. const r24 = e23.clone(), i32 = new n14(this._createFieldsVMParams(e23, t25));
  2060. return this.contentViewModels[t25] = i32, r24.fieldInfos = i32.formattedFieldInfos.slice(0), r24;
  2061. }
  2062. _createMediaVMParams(e23, t25) {
  2063. const { abilities: r24, graphic: i32, _fieldInfoMap: o30, formattedAttributes: s30, _effectivePopupTemplate: n34, relatedInfos: a34, _sourceLayer: l27, _expressionAttributes: p36 } = this, { attributes: c42 } = i32, { description: d20, mediaInfos: u23, title: f14 } = e23;
  2064. return { abilities: { chartAnimation: r24.chartAnimation }, activeMediaInfoIndex: e23.activeMediaInfoIndex || 0, attributes: c42, layer: l27, fieldInfoMap: o30, formattedAttributes: { ...s30.global, ...s30.content[t25] }, expressionAttributes: p36, mediaInfos: u23, popupTemplate: n34, relatedInfos: a34, ...this._compileTitleAndDesc({ title: f14, description: d20 }) };
  2065. }
  2066. _compileMedia(e23, t25) {
  2067. const r24 = e23.clone(), i32 = new b6(this._createMediaVMParams(e23, t25));
  2068. return r24.mediaInfos = i32.formattedMediaInfos.slice(0), this.contentViewModels[t25] = i32, r24;
  2069. }
  2070. _createTextVMParams(e23) {
  2071. const { graphic: t25, _fieldInfoMap: r24, _sourceLayer: i32, _expressionAttributes: o30 } = this;
  2072. if (e23 && e23.text) {
  2073. const { attributes: s30 } = t25, n34 = this.formattedAttributes.global;
  2074. e23.text = $({ attributes: s30, fieldInfoMap: r24, globalAttributes: n34, expressionAttributes: o30, layer: i32, text: e23.text });
  2075. }
  2076. return { graphic: t25, creator: e23.text };
  2077. }
  2078. _compileText(e23, t25) {
  2079. const r24 = e23.clone();
  2080. return this.contentViewModels[t25] = new l11(this._createTextVMParams(r24)), r24;
  2081. }
  2082. _compileLastEditInfo() {
  2083. const { _effectivePopupTemplate: e23, _sourceLayer: t25, graphic: r24 } = this;
  2084. if (!e23)
  2085. return;
  2086. const { lastEditInfoEnabled: i32 } = e23, o30 = t25?.editFieldsInfo;
  2087. return i32 && o30 ? W(o30, r24.attributes) : void 0;
  2088. }
  2089. _compileTitle(e23) {
  2090. const { _fieldInfoMap: t25, _sourceLayer: r24, graphic: i32, _expressionAttributes: o30 } = this, { attributes: s30 } = i32, n34 = this.formattedAttributes.global;
  2091. return $({ attributes: s30, fieldInfoMap: t25, globalAttributes: n34, expressionAttributes: o30, layer: r24, text: e23 });
  2092. }
  2093. async _getTitle() {
  2094. const { _effectivePopupTemplate: e23, graphic: t25 } = this, r24 = e23?.title;
  2095. return x2(r24, { graphic: t25 });
  2096. }
  2097. async _getContent() {
  2098. const { _effectivePopupTemplate: e23, graphic: t25 } = this, r24 = e23?.content;
  2099. return x2(r24, { graphic: t25 });
  2100. }
  2101. async _queryFeature(e23) {
  2102. const { _featureAbortController: t25, _sourceLayer: r24, graphic: i32, _effectivePopupTemplate: o30, spatialReference: s30, map: n34, view: a34 } = this, { content: { value: p36 }, title: { value: c42 } } = await E({ content: this._getContent(), title: this._getTitle() });
  2103. if (t25 !== this._featureAbortController || !i32)
  2104. return;
  2105. await ae({ graphic: i32, popupTemplate: o30, layer: r24, spatialReference: s30 }, e23);
  2106. const { expressionAttributes: { value: d20 } } = await E({ checkForRelatedFeatures: this._checkForRelatedFeatures(e23), expressionAttributes: d8({ expressionInfos: o30?.expressionInfos, spatialReference: s30, graphic: i32, map: n34, interceptor: q3.interceptor, view: a34 }) });
  2107. t25 === this._featureAbortController && i32 && (this._expressionAttributes = d20, this._graphicExpressionAttributes = { ...i32.attributes, ...d20 }, this._set("formattedAttributes", this._createFormattedAttributes(p36)), this._set("title", this._compileTitle(c42)), this._set("lastEditInfo", this._compileLastEditInfo() || null), this._set("content", this._compileContent(p36) || null));
  2108. }
  2109. _createMediaFormattedAttributes({ contentElement: e23, contentElementIndex: t25, formattedAttributes: r24 }) {
  2110. const { _effectivePopupTemplate: i32, graphic: o30, relatedInfos: s30, _sourceLayer: n34, _fieldInfoMap: a34, _graphicExpressionAttributes: l27 } = this;
  2111. r24.content[t25] = ne({ fieldInfos: i32?.fieldInfos, graphic: o30, attributes: { ...l27, ...e23.attributes }, layer: n34, fieldInfoMap: a34, relatedInfos: s30 });
  2112. }
  2113. _createFieldsFormattedAttributes({ contentElement: e23, contentElementIndex: t25, formattedAttributes: r24 }) {
  2114. if (e23.fieldInfos) {
  2115. const { graphic: i32, relatedInfos: o30, _sourceLayer: s30, _fieldInfoMap: n34, _graphicExpressionAttributes: a34 } = this;
  2116. r24.content[t25] = ne({ fieldInfos: e23.fieldInfos, graphic: i32, attributes: { ...a34, ...e23.attributes }, layer: s30, fieldInfoMap: n34, relatedInfos: o30 });
  2117. }
  2118. }
  2119. _createFormattedAttributes(e23) {
  2120. const { _effectivePopupTemplate: t25, graphic: r24, relatedInfos: i32, _sourceLayer: o30, _fieldInfoMap: s30, _graphicExpressionAttributes: n34 } = this, a34 = t25?.fieldInfos, l27 = { global: ne({ fieldInfos: a34, graphic: r24, attributes: n34, layer: o30, fieldInfoMap: s30, relatedInfos: i32 }), content: [] };
  2121. return Array.isArray(e23) && e23.forEach((e24, t26) => {
  2122. e24.type === "fields" && this._createFieldsFormattedAttributes({ contentElement: e24, contentElementIndex: t26, formattedAttributes: l27 }), e24.type === "media" && this._createMediaFormattedAttributes({ contentElement: e24, contentElementIndex: t26, formattedAttributes: l27 });
  2123. }), l27;
  2124. }
  2125. _checkForRelatedFeatures(e23) {
  2126. const { graphic: t25, _effectivePopupTemplate: r24 } = this;
  2127. return this._queryRelatedInfos(t25, Y3(r24), e23);
  2128. }
  2129. async _queryRelatedInfos(e23, t25, r24) {
  2130. const { relatedInfos: i32, _sourceLayer: o30 } = this;
  2131. i32.clear();
  2132. const s30 = r(o30.associatedLayer) ? await o30.associatedLayer.load(r24) : o30;
  2133. if (!s30)
  2134. return;
  2135. const a34 = t25.filter((e24) => e24 && ue(e24.fieldName));
  2136. if (!a34 || !a34.length)
  2137. return;
  2138. t25.forEach((e24) => this._configureRelatedInfo(e24, s30));
  2139. const l27 = await b5({ relatedInfos: i32, layer: s30 }, r24);
  2140. Object.keys(l27).forEach((e24) => {
  2141. const t26 = i32.get(e24.toString()), r25 = l27[e24]?.value;
  2142. t26 && r25 && (t26.layerInfo = r25.data);
  2143. });
  2144. const p36 = await R4({ graphic: e23, relatedInfos: i32, layer: s30 }, r24);
  2145. Object.keys(p36).forEach((e24) => {
  2146. F2(p36[e24]?.value, i32.get(e24.toString()));
  2147. });
  2148. }
  2149. _configureRelatedInfo(e23, t25) {
  2150. const { relatedInfos: r24 } = this, i32 = d7(e23.fieldName);
  2151. if (!i32)
  2152. return;
  2153. const { layerId: o30, fieldName: s30 } = i32;
  2154. if (!o30)
  2155. return;
  2156. const n34 = r24.get(o30.toString()) || h9(o30, t25);
  2157. n34 && ($2({ relatedInfo: n34, fieldName: s30, fieldInfo: e23 }), this.relatedInfos.set(o30, n34));
  2158. }
  2159. };
  2160. z3.interceptor = new e14(pe, me), e([d()], z3.prototype, "_error", void 0), e([d()], z3.prototype, "_featureAbortController", void 0), e([d({ readOnly: true })], z3.prototype, "_effectivePopupTemplate", null), e([d({ readOnly: true })], z3.prototype, "_fieldInfoMap", null), e([d({ readOnly: true })], z3.prototype, "_sourceLayer", null), e([d()], z3.prototype, "abilities", void 0), e([s3("abilities")], z3.prototype, "castAbilities", null), e([d({ readOnly: true })], z3.prototype, "content", void 0), e([d({ readOnly: true })], z3.prototype, "contentViewModels", void 0), e([d({ type: Boolean })], z3.prototype, "defaultPopupTemplateEnabled", void 0), e([d({ readOnly: true })], z3.prototype, "state", null), e([d({ readOnly: true })], z3.prototype, "formattedAttributes", void 0), e([d({ type: g2, value: null })], z3.prototype, "graphic", null), e([d({ readOnly: true })], z3.prototype, "lastEditInfo", void 0), e([d({ readOnly: true })], z3.prototype, "relatedInfos", void 0), e([d()], z3.prototype, "spatialReference", null), e([d({ readOnly: true })], z3.prototype, "title", void 0), e([d()], z3.prototype, "map", null), e([d({ readOnly: true })], z3.prototype, "waitingForContent", null), e([d()], z3.prototype, "view", void 0), z3 = q3 = e([n3(B4)], z3);
  2161. var J3 = z3;
  2162. // node_modules/@arcgis/core/widgets/Feature/support/FeatureContentMixin.js
  2163. var i12 = (i32) => {
  2164. let c42 = class extends i32 {
  2165. constructor() {
  2166. super(...arguments), this.renderNodeContent = (e23) => e5(e23) && !e23.destroyed ? n6("div", { key: e23 }, e23.render()) : e23 instanceof HTMLElement ? n6("div", { key: e23, bind: e23, afterCreate: this._attachToNode }) : t9(e23) ? n6("div", { key: e23, bind: e23.domNode, afterCreate: this._attachToNode }) : null;
  2167. }
  2168. _attachToNode(e23) {
  2169. const r24 = this;
  2170. e23.appendChild(r24);
  2171. }
  2172. };
  2173. return c42 = e([n3("esri.widgets.Feature.ContentMixin")], c42), c42;
  2174. };
  2175. // node_modules/@arcgis/core/widgets/Feature.js
  2176. var _4 = { iconText: "esri-icon-font-fallback-text", iconLoading: "esri-icon-loading-indicator esri-rotating", esriTable: "esri-widget__table", esriWidget: "esri-widget", base: "esri-feature", container: "esri-feature__size-container", title: "esri-feature__title", main: "esri-feature__main-container", btn: "esri-feature__button", icon: "esri-feature__icon", content: "esri-feature__content", contentElement: "esri-feature__content-element", text: "esri-feature__text", lastEditedInfo: "esri-feature__last-edited-info", fields: "esri-feature__fields", fieldHeader: "esri-feature__field-header", fieldData: "esri-feature__field-data", fieldDataDate: "esri-feature__field-data--date", loadingSpinnerContainer: "esri-feature__loading-container", spinner: "esri-feature__loading-spinner" };
  2177. var w9 = { title: true, content: true, lastEditedInfo: true };
  2178. var M7 = class extends i12(O2) {
  2179. constructor(e23, t25) {
  2180. super(e23, t25), this._contentWidgets = [], this.graphic = null, this.defaultPopupTemplateEnabled = false, this.headingLevel = 2, this.label = void 0, this.messages = null, this.messagesCommon = null, this.messagesURIUtils = null, this.spatialReference = null, this.title = null, this.visibleElements = { ...w9 }, this.map = null, this.view = null, this.viewModel = new J3();
  2181. }
  2182. initialize() {
  2183. this.own(l4(() => this.viewModel?.contentViewModels, () => this._setupContentWidgets(), h2));
  2184. }
  2185. loadDependencies() {
  2186. return import("./calcite-notice-BQXO4DEI.js");
  2187. }
  2188. destroy() {
  2189. this._destroyContentWidgets();
  2190. }
  2191. castVisibleElements(e23) {
  2192. return { ...w9, ...e23 };
  2193. }
  2194. render() {
  2195. const { state: e23 } = this.viewModel, t25 = n6("div", { class: _4.container, key: "container" }, this.renderTitle(), e23 === "error" ? this.renderError() : e23 === "loading" ? this.renderLoading() : this.renderContentContainer());
  2196. return n6("div", { class: this.classes(_4.base, _4.esriWidget) }, t25);
  2197. }
  2198. setActiveMedia(e23, t25) {
  2199. this.viewModel.setActiveMedia(e23, t25);
  2200. }
  2201. nextMedia(e23) {
  2202. this.viewModel.nextMedia(e23);
  2203. }
  2204. previousMedia(e23) {
  2205. this.viewModel.previousMedia(e23);
  2206. }
  2207. renderError() {
  2208. const { messagesCommon: e23, messages: t25, visibleElements: s30 } = this;
  2209. return n6("calcite-notice", { active: true, color: "red", icon: "exclamation-mark-circle", scale: "s" }, s30.title ? n6("div", { key: "error-title", slot: "title" }, e23.errorMessage) : null, n6("div", { key: "error-message", slot: "message" }, t25.loadingError));
  2210. }
  2211. renderLoading() {
  2212. return n6("div", { key: "loading-container", class: _4.loadingSpinnerContainer }, n6("span", { class: this.classes(_4.iconLoading, _4.spinner) }));
  2213. }
  2214. renderContentContainer() {
  2215. const { visibleElements: e23 } = this;
  2216. return e23.content ? n6("div", { class: _4.main }, [this.renderContent(), this.renderLastEditInfo()]) : null;
  2217. }
  2218. renderTitle() {
  2219. const { visibleElements: e23, title: t25 } = this;
  2220. return e23.title ? n6(n12, { level: this.headingLevel, class: _4.title, innerHTML: t25 }) : null;
  2221. }
  2222. renderContent() {
  2223. const e23 = this.viewModel.content, t25 = "content";
  2224. if (!e23)
  2225. return null;
  2226. if (Array.isArray(e23))
  2227. return e23.length ? n6("div", { key: `${t25}-content-elements` }, e23.map(this.renderContentElement, this)) : null;
  2228. if (typeof e23 == "string") {
  2229. const e24 = this._contentWidgets[0];
  2230. return !e24 || e24.destroyed ? null : n6("div", { key: `${t25}-content` }, e24.render());
  2231. }
  2232. return this.renderNodeContent(e23);
  2233. }
  2234. renderContentElement(e23, t25) {
  2235. const { visibleElements: s30 } = this;
  2236. if (typeof s30.content != "boolean" && !s30.content[e23.type])
  2237. return null;
  2238. switch (e23.type) {
  2239. case "attachments":
  2240. return this.renderAttachments(t25);
  2241. case "custom":
  2242. return this.renderCustom(e23, t25);
  2243. case "fields":
  2244. return this.renderFields(t25);
  2245. case "media":
  2246. return this.renderMedia(t25);
  2247. case "text":
  2248. return this.renderText(e23, t25);
  2249. case "expression":
  2250. return this.renderExpression(t25);
  2251. default:
  2252. return null;
  2253. }
  2254. }
  2255. renderAttachments(e23) {
  2256. const t25 = this._contentWidgets[e23];
  2257. if (!t25 || t25.destroyed)
  2258. return null;
  2259. const { state: s30, attachmentInfos: i32 } = t25.viewModel;
  2260. return s30 === "loading" || i32.length > 0 ? n6("div", { key: this._buildKey("attachments-element", e23), class: this.classes(_4.contentElement) }, t25.render()) : null;
  2261. }
  2262. renderExpression(e23) {
  2263. const t25 = this._contentWidgets[e23];
  2264. return !t25 || t25.destroyed ? null : n6("div", { key: this._buildKey("expression-element", e23), class: _4.contentElement }, t25.render());
  2265. }
  2266. renderCustom(e23, t25) {
  2267. const { creator: s30 } = e23, i32 = this._contentWidgets[t25];
  2268. return !i32 || i32.destroyed ? null : s30 ? n6("div", { key: this._buildKey("custom-element", t25), class: _4.contentElement }, i32.render()) : null;
  2269. }
  2270. renderFields(e23) {
  2271. const t25 = this._contentWidgets[e23];
  2272. return !t25 || t25.destroyed ? null : n6("div", { key: this._buildKey("fields-element", e23), class: _4.contentElement }, t25.render());
  2273. }
  2274. renderMedia(e23) {
  2275. const t25 = this._contentWidgets[e23];
  2276. return !t25 || t25.destroyed ? null : n6("div", { key: this._buildKey("media-element", e23), class: _4.contentElement }, t25.render());
  2277. }
  2278. renderLastEditInfo() {
  2279. const { visibleElements: e23, messages: t25 } = this, { lastEditInfo: s30 } = this.viewModel;
  2280. if (!s30 || !e23.lastEditedInfo)
  2281. return null;
  2282. const { date: i32, user: n34 } = s30, r24 = s30.type === "edit" ? n34 ? t25.lastEditedByUser : t25.lastEdited : n34 ? t25.lastCreatedByUser : t25.lastCreated, o30 = s4(r24, { date: i32, user: n34 });
  2283. return n6("div", { key: "edit-info-element", class: this.classes(_4.lastEditedInfo, _4.contentElement) }, o30);
  2284. }
  2285. renderText(e23, t25) {
  2286. const s30 = e23.text, i32 = this._contentWidgets[t25];
  2287. return !i32 || i32.destroyed ? null : s30 ? n6("div", { key: this._buildKey("text-element", t25), class: this.classes(_4.contentElement, _4.text) }, i32.render()) : null;
  2288. }
  2289. _buildKey(e23, ...t25) {
  2290. return `${e23}__${this.get("viewModel.graphic.uid") || "0"}-${t25.join("-")}`;
  2291. }
  2292. _destroyContentWidget(e23) {
  2293. e23 && (e23.viewModel = null, !e23.destroyed && e23.destroy());
  2294. }
  2295. _destroyContentWidgets() {
  2296. this._contentWidgets.forEach((e23) => this._destroyContentWidget(e23)), this._contentWidgets = [];
  2297. }
  2298. _setupContentWidgets() {
  2299. this._destroyContentWidgets();
  2300. const { headingLevel: e23, visibleElements: t25 } = this, s30 = this.get("viewModel.content"), { contentViewModels: i32 } = this.viewModel;
  2301. if (Array.isArray(s30))
  2302. s30.forEach((s31, n34) => {
  2303. s31.type === "attachments" && (this._contentWidgets[n34] = new m12({ displayType: s31.displayType, headingLevel: t25.title ? e23 + 1 : e23, viewModel: i32[n34] })), s31.type === "fields" && (this._contentWidgets[n34] = new c17({ viewModel: i32[n34] })), s31.type === "media" && (this._contentWidgets[n34] = new F3({ viewModel: i32[n34] })), s31.type === "text" && (this._contentWidgets[n34] = new l12({ viewModel: i32[n34] })), s31.type === "custom" && (this._contentWidgets[n34] = new l12({ viewModel: i32[n34] })), s31.type === "expression" && (this._contentWidgets[n34] = new m16({ viewModel: i32[n34] }));
  2304. }, this);
  2305. else {
  2306. const e24 = i32[0];
  2307. e24 && !e24.destroyed && (this._contentWidgets[0] = new l12({ viewModel: e24 }));
  2308. }
  2309. this.scheduleRender();
  2310. }
  2311. };
  2312. e([o9("viewModel.graphic")], M7.prototype, "graphic", void 0), e([o9("viewModel.defaultPopupTemplateEnabled")], M7.prototype, "defaultPopupTemplateEnabled", void 0), e([d()], M7.prototype, "headingLevel", void 0), e([d({ aliasOf: { source: "messages.widgetLabel", overridable: true } })], M7.prototype, "label", void 0), e([d(), e4("esri/widgets/Feature/t9n/Feature")], M7.prototype, "messages", void 0), e([d(), e4("esri/t9n/common")], M7.prototype, "messagesCommon", void 0), e([d(), e4("esri/widgets/support/t9n/uriUtils")], M7.prototype, "messagesURIUtils", void 0), e([o9("viewModel.spatialReference")], M7.prototype, "spatialReference", void 0), e([o9("viewModel.title")], M7.prototype, "title", void 0), e([d()], M7.prototype, "visibleElements", void 0), e([s3("visibleElements")], M7.prototype, "castVisibleElements", null), e([o9("viewModel.map")], M7.prototype, "map", void 0), e([o9("viewModel.view")], M7.prototype, "view", void 0), e([d({ type: J3 })], M7.prototype, "viewModel", void 0), M7 = e([n3("esri.widgets.Feature")], M7);
  2313. var E5 = M7;
  2314. // node_modules/@arcgis/core/widgets/support/AnchorElementViewModel.js
  2315. var l15;
  2316. var d9 = Symbol("anchorHandles");
  2317. var m17 = class extends n5.EventedAccessor {
  2318. constructor(o30) {
  2319. super(o30), this[l15] = new u3(), this.location = null, this.screenLocationEnabled = false, this.view = null, this[d9].add([f2(() => o(this.screenLocationEnabled ? this.view : null, (o31) => [o31.size, o31.type === "3d" ? o31.camera : o31.viewpoint]), () => this.notifyChange("screenLocation")), l4(() => this.screenLocation, (o31, e23) => {
  2320. r(o31) && r(e23) && this.emit("view-change");
  2321. })]);
  2322. }
  2323. destroy() {
  2324. this.view = null, this[d9] = l(this[d9]);
  2325. }
  2326. get screenLocation() {
  2327. const { location: o30, view: e23, screenLocationEnabled: t25 } = this;
  2328. return t25 && r(o30) && r(e23) && e23.ready ? e23.toScreen(o30) : null;
  2329. }
  2330. };
  2331. l15 = d9, e([d()], m17.prototype, "location", void 0), e([d()], m17.prototype, "screenLocation", null), e([d()], m17.prototype, "screenLocationEnabled", void 0), e([d()], m17.prototype, "view", void 0), m17 = e([n3("esri.widgets.support.AnchorElementViewModel")], m17);
  2332. var h11 = m17;
  2333. // node_modules/@arcgis/core/widgets/Spinner/SpinnerViewModel.js
  2334. var t13 = "esri.widgets.CompassViewModel";
  2335. var p13 = class extends h11 {
  2336. constructor(s30) {
  2337. super(s30), this.visible = false;
  2338. }
  2339. };
  2340. e([d()], p13.prototype, "visible", void 0), p13 = e([n3(t13)], p13);
  2341. var c23 = p13;
  2342. // node_modules/@arcgis/core/widgets/Spinner.js
  2343. var c24 = { base: "esri-spinner", spinnerStart: "esri-spinner--start", spinnerFinish: "esri-spinner--finish" };
  2344. var h12 = class extends O2 {
  2345. constructor(i32, s30) {
  2346. super(i32, s30), this._animationDelay = 500, this._animationPromise = null, this.location = null, this.view = null, this.viewModel = new c23(), this.visible = false;
  2347. }
  2348. initialize() {
  2349. this.own([l4(() => this.visible, (i32) => this._visibleChange(i32))]);
  2350. }
  2351. destroy() {
  2352. this._animationPromise = null;
  2353. }
  2354. show(i32) {
  2355. const { location: s30, promise: e23 } = i32;
  2356. s30 && (this.viewModel.location = s30), this.visible = true;
  2357. const o30 = () => this.hide();
  2358. e23 && e23.catch(() => {
  2359. }).then(o30);
  2360. }
  2361. hide() {
  2362. this.visible = false;
  2363. }
  2364. render() {
  2365. const { visible: i32 } = this, { screenLocation: s30 } = this.viewModel, e23 = !!s30, o30 = i32 && e23, t25 = !i32 && e23, r24 = { [c24.spinnerStart]: o30, [c24.spinnerFinish]: t25 }, n34 = this._getPositionStyles();
  2366. return n6("div", { class: this.classes(c24.base, r24), styles: n34 });
  2367. }
  2368. _visibleChange(i32) {
  2369. if (i32)
  2370. return void (this.viewModel.screenLocationEnabled = true);
  2371. const s30 = L(this._animationDelay);
  2372. this._animationPromise = s30, s30.catch(() => {
  2373. }).then(() => {
  2374. this._animationPromise === s30 && (this.viewModel.screenLocationEnabled = false, this._animationPromise = null);
  2375. });
  2376. }
  2377. _getPositionStyles() {
  2378. const { screenLocation: i32, view: e23 } = this.viewModel;
  2379. if (t(e23) || t(i32))
  2380. return {};
  2381. const { padding: o30 } = e23;
  2382. return { left: i32.x - o30.left + "px", top: i32.y - o30.top + "px" };
  2383. }
  2384. };
  2385. e([o9("viewModel.location")], h12.prototype, "location", void 0), e([o9("viewModel.view")], h12.prototype, "view", void 0), e([d({ type: c23 })], h12.prototype, "viewModel", void 0), e([o9("viewModel.visible")], h12.prototype, "visible", void 0), h12 = e([n3("esri.widgets.Spinner")], h12);
  2386. var m18 = h12;
  2387. // node_modules/@arcgis/core/symbols/support/symbolUtils.js
  2388. function v9(e23) {
  2389. return e23 && "opacity" in e23 ? e23.opacity * v9(e23.parent) : 1;
  2390. }
  2391. async function x4(i32, s30) {
  2392. if (!i32)
  2393. return;
  2394. const o30 = i32.sourceLayer, a34 = (r(s30) && s30.useSourceLayer ? o30 : i32.layer) ?? o30, f14 = v9(a34);
  2395. if (r(i32.symbol) && (!r(s30) || s30.ignoreGraphicSymbol !== true)) {
  2396. const t25 = i32.symbol.type === "web-style" ? await i32.symbol.fetchSymbol({ ...s30, cache: r(s30) ? s30.webStyleCache : null }) : i32.symbol.clone();
  2397. return x(t25, null, f14), t25;
  2398. }
  2399. const h19 = r(s30) && s30.renderer || a34 && "renderer" in a34 && a34.renderer;
  2400. let y17 = h19 && "getSymbolAsync" in h19 ? await h19.getSymbolAsync(i32, s30) : null;
  2401. if (!y17)
  2402. return;
  2403. if (y17 = y17.type === "web-style" ? await y17.fetchSymbol({ ...s30, cache: r(s30) ? s30.webStyleCache : null }) : y17.clone(), !("visualVariables" in h19) || !h19.visualVariables || !h19.visualVariables.length)
  2404. return x(y17, null, f14), y17;
  2405. if ("arcadeRequiredForVisualVariables" in h19 && h19.arcadeRequiredForVisualVariables && (t(s30) || t(s30.arcade))) {
  2406. const e23 = { ...e2(s30) };
  2407. e23.arcade = await a10(), s30 = e23;
  2408. }
  2409. const p36 = await import("./visualVariableUtils-ABC432IV.js"), d20 = [], m29 = [], b10 = [], g20 = [];
  2410. for (const e23 of h19.visualVariables)
  2411. switch (e23.type) {
  2412. case "color":
  2413. d20.push(e23);
  2414. break;
  2415. case "opacity":
  2416. m29.push(e23);
  2417. break;
  2418. case "rotation":
  2419. g20.push(e23);
  2420. break;
  2421. case "size":
  2422. e23.target || b10.push(e23);
  2423. }
  2424. const w13 = !!d20.length && d20[d20.length - 1], S8 = w13 ? p36.getColor(w13, i32, s30) : null, x5 = !!m29.length && m29[m29.length - 1];
  2425. let V5 = x5 ? p36.getOpacity(x5, i32, s30) : null;
  2426. if (f14 != null && (V5 = V5 != null ? V5 * f14 : f14), x(y17, S8, V5), b10.length) {
  2427. const e23 = p36.getAllSizes(b10, i32, s30);
  2428. await M4(y17, e23);
  2429. }
  2430. for (const e23 of g20)
  2431. N(y17, p36.getRotationAngle(e23, i32, s30), e23.axis);
  2432. return y17;
  2433. }
  2434. // node_modules/@arcgis/core/views/support/layerViewUtils.js
  2435. function e15(n34) {
  2436. return n34 && typeof n34.highlight == "function";
  2437. }
  2438. // node_modules/@arcgis/core/widgets/Popup/actions.js
  2439. var s13 = { iconZoom: "esri-icon-zoom-in-magnifying-glass", iconTrash: "esri-icon-trash", iconBrowseClusteredFeatures: "esri-icon-table" };
  2440. var o17 = new a11({ id: "zoom-to-feature", title: "{messages.zoom}", className: s13.iconZoom });
  2441. var t15 = new a11({ id: "remove-selected-feature", title: "{messages.remove}", className: s13.iconTrash });
  2442. var r16 = new a11({ id: "zoom-to-clustered-features", title: "{messages.zoom}", className: s13.iconZoom });
  2443. var i13 = new a11({ id: "browse-clustered-features", title: "{messages.browseClusteredFeatures}", className: s13.iconBrowseClusteredFeatures });
  2444. // node_modules/@arcgis/core/widgets/Popup/actionUtils.js
  2445. var s14 = "esri.widgets.Popup.PopupViewModel";
  2446. var c25 = s.getLogger(s14);
  2447. var u12 = (t25) => {
  2448. const { event: s30, view: c42 } = t25, { action: u23 } = s30, d20 = c42 && c42.popup;
  2449. if (!u23)
  2450. return Promise.reject(new s2("trigger-action:missing-arguments", "Event has no action"));
  2451. if (!d20)
  2452. return Promise.reject(new s2("trigger-action:missing-arguments", "view.popup is missing"));
  2453. const { disabled: l27, id: g20 } = u23;
  2454. if (!g20)
  2455. return Promise.reject(new s2("trigger-action:invalid-action", "action.id is missing"));
  2456. if (l27)
  2457. return Promise.reject(new s2("trigger-action:invalid-action", "Action is disabled"));
  2458. if (g20 === o17.id)
  2459. return w10(d20.viewModel).catch(b);
  2460. if (g20 === r16.id)
  2461. return p14(d20.viewModel);
  2462. if (g20 === i13.id)
  2463. return d20.featureMenuOpen = !d20.featureMenuOpen, d20.viewModel.browseClusterEnabled = !d20.viewModel.browseClusterEnabled, Promise.resolve();
  2464. if (d20.viewModel.browseClusterEnabled = false, g20 === t15.id) {
  2465. d20.close();
  2466. const { selectedFeature: t26 } = d20;
  2467. if (!t26)
  2468. return Promise.reject(new s2(`trigger-action:${t15.id}`, "selectedFeature is required", { selectedFeature: t26 }));
  2469. const { sourceLayer: r24 } = t26;
  2470. return r24 ? r24.remove(t26) : c42.graphics.remove(t26), Promise.resolve();
  2471. }
  2472. return Promise.resolve();
  2473. };
  2474. function d10(e23) {
  2475. const { selectedFeature: t25, location: r24, view: o30 } = e23;
  2476. if (!o30)
  2477. return null;
  2478. if (o30.type === "3d")
  2479. return t25 || r24;
  2480. return e23.get("selectedFeature.geometry") || r24;
  2481. }
  2482. function l17(e23) {
  2483. return e23?.isAggregate && e23?.sourceLayer?.featureReduction?.type === "cluster";
  2484. }
  2485. function g11(t25, r24) {
  2486. if (r24?.type !== "3d" || !t25 || t25.declaredClass !== "esri.Graphic")
  2487. return true;
  2488. const o30 = r24.getViewForGraphic(t25);
  2489. if (o30 && "whenGraphicBounds" in o30) {
  2490. let r25 = false;
  2491. return o30.whenGraphicBounds(t25, { useViewElevation: true }).then((e23) => {
  2492. r25 = !e23 || !e23.boundingBox || e23.boundingBox[0] === e23.boundingBox[3] && e23.boundingBox[1] === e23.boundingBox[4] && e23.boundingBox[2] === e23.boundingBox[5];
  2493. }).catch(() => {
  2494. const r26 = new s2("zoom-to:invalid-graphic", "Could not zoom to the location of the graphic.", { graphic: t25 });
  2495. c25.error(r26);
  2496. }), r25;
  2497. }
  2498. return true;
  2499. }
  2500. async function w10(t25) {
  2501. const { location: r24, selectedFeature: i32, view: n34, zoomFactor: a34 } = t25, s30 = d10(t25);
  2502. if (!s30) {
  2503. const t26 = new s2("zoom-to:invalid-target-or-view", "Cannot zoom to location without a target and view.", { target: s30, view: n34 });
  2504. throw c25.error(t26), t26;
  2505. }
  2506. const u23 = n34.scale / a34, l27 = t25.get("selectedFeature.geometry") || r24, w13 = l27 && l27.type === "point" && g11(i32, n34);
  2507. o17.active = true, o17.disabled = true;
  2508. try {
  2509. await t25.view.goTo({ target: s30, scale: w13 ? u23 : void 0 });
  2510. } finally {
  2511. o17.active = false, o17.disabled = false, t25.zoomToLocation = null, w13 && (t25.location = l27);
  2512. }
  2513. }
  2514. async function p14(t25) {
  2515. const { selectedFeature: r24, view: o30 } = t25;
  2516. if (o30?.type !== "2d") {
  2517. const t26 = new s2("zoomToCluster:invalid-view", "View must be 2d MapView.", { view: o30 });
  2518. throw c25.error(t26), t26;
  2519. }
  2520. if (!l17(r24)) {
  2521. const t26 = new s2("zoomToCluster:invalid-selectedFeature", "Selected feature must represent an aggregate/cluster graphic.", { selectedFeature: r24 });
  2522. throw c25.error(t26), t26;
  2523. }
  2524. const n34 = r24.sourceLayer, a34 = await o30.whenLayerView(n34), s30 = a34.createQuery();
  2525. s30.aggregateIds = [r24.getObjectId()], r16.active = true, r16.disabled = true;
  2526. const { extent: u23 } = await a34.queryExtent(s30);
  2527. await o30.goTo({ target: u23 }), r16.active = false, r16.disabled = false;
  2528. }
  2529. async function f9(e23) {
  2530. const { selectedFeature: t25, view: r24 } = e23, o30 = t25.sourceLayer, i32 = await r24.whenLayerView(o30), n34 = i32.createQuery();
  2531. n34.aggregateIds = [t25.getObjectId()];
  2532. const { extent: a34 } = await i32.queryExtent(n34);
  2533. e23.selectedClusterBoundaryFeature.geometry = a34, r24.graphics.add(e23.selectedClusterBoundaryFeature);
  2534. }
  2535. async function v10(e23) {
  2536. const { selectedFeature: t25, view: r24 } = e23, o30 = t25.sourceLayer, i32 = await r24.whenLayerView(o30), a34 = i32.createQuery();
  2537. a34.aggregateIds = [t25.getObjectId()], i13.active = true, i13.disabled = true;
  2538. const { features: s30 } = await i32.queryFeatures(a34);
  2539. i13.active = false, i13.disabled = false, r24.popup.open({ features: [t25].concat(s30), featureMenuOpen: true });
  2540. }
  2541. function m19(e23) {
  2542. const t25 = e23.features.filter((e24) => l17(e24));
  2543. t25.length && (e23.features = t25);
  2544. }
  2545. // node_modules/@arcgis/core/widgets/support/GoTo.js
  2546. var e16 = (e23) => {
  2547. let t25 = class extends e23 {
  2548. constructor(...o30) {
  2549. super(...o30), this.goToOverride = null, this.view = null;
  2550. }
  2551. callGoTo(o30) {
  2552. const { view: r24 } = this;
  2553. return this.goToOverride ? this.goToOverride(r24, o30) : r24.goTo(o30.target, o30.options);
  2554. }
  2555. };
  2556. return e([d()], t25.prototype, "goToOverride", void 0), e([d()], t25.prototype, "view", void 0), t25 = e([n3("esri.widgets.support.GoTo")], t25), t25;
  2557. };
  2558. // node_modules/@arcgis/core/widgets/Popup/PopupViewModel.js
  2559. var S6 = j3.ofType({ key: "type", defaultKeyValue: "button", base: c10, typeMap: { button: a11, toggle: a12 } });
  2560. var B5 = () => [o17.clone()];
  2561. var R5 = () => [r16.clone(), i13.clone()];
  2562. var G3 = "esri.widgets.Popup.PopupViewModel";
  2563. var z4 = s.getLogger(G3);
  2564. var H4 = class extends e16(h11) {
  2565. constructor(e23) {
  2566. super(e23), this._handles = new u3(), this._pendingPromises = new Set(), this._fetchFeaturesController = null, this._selectedClusterFeature = null, this.featurePage = null, this.actions = new S6(), this.activeFeature = null, this.defaultPopupTemplateEnabled = false, this.autoCloseEnabled = false, this.autoOpenEnabled = true, this.browseClusterEnabled = false, this.content = null, this.featuresPerPage = 20, this.featureViewModelAbilities = null, this.featureViewModels = [], this.highlightEnabled = true, this.includeDefaultActions = true, this.selectedClusterBoundaryFeature = new g2({ symbol: new S3({ outline: { width: 1.5, color: "cyan" }, style: "none" }) }), this.title = null, this.updateLocationEnabled = false, this.view = null, this.visible = false, this.zoomFactor = 4, this.zoomToLocation = null;
  2567. }
  2568. get isLoadingFeature() {
  2569. return this.featureViewModels.some((e23) => e23.waitingForContent);
  2570. }
  2571. initialize() {
  2572. this._handles.add([l4(() => [this.autoOpenEnabled, this.view], () => this._autoOpenEnabledChange()), this.on("view-change", () => this._autoClose()), l4(() => [this.highlightEnabled, this.selectedFeature, this.visible, this.view], () => this._highlightSelectedFeature()), l4(() => [this.highlightEnabled, this.activeFeature, this.visible, this.view], () => this._highlightActiveFeature()), l4(() => this.view?.animation?.state, (e23) => this._animationStateChange(e23)), l4(() => this.location, (e23) => this._locationChange(e23)), l4(() => this.selectedFeature, (e23) => this._selectedFeatureChange(e23)), l4(() => [this.selectedFeatureIndex, this.featureCount, this.featuresPerPage], () => this._selectedFeatureIndexChange()), l4(() => [this.featurePage, this.selectedFeatureIndex, this.featureCount, this.featuresPerPage, this.featureViewModels], () => this._setGraphicOnFeatureViewModels()), l4(() => this.featureViewModels, () => this._featureViewModelsChange()), this.on("trigger-action", (e23) => u12({ event: e23, view: this.view })), f2(() => !this.waitingForResult, () => this._waitingForResultChange(), U), l4(() => [this.features, this.view?.map, this.view?.spatialReference], () => this._updateFeatureVMs()), l4(() => this.view?.scale, () => this._viewScaleChange()), f2(() => !this.visible, () => this.browseClusterEnabled = false), l4(() => this.browseClusterEnabled, (e23) => e23 ? this.enableClusterBrowsing() : this.disableClusterBrowsing())]);
  2573. }
  2574. destroy() {
  2575. this._cancelFetchingFeatures(), this._handles.destroy(), this._handles = null, this._pendingPromises.clear(), this.browseClusterEnabled = false, this.view = null;
  2576. }
  2577. get active() {
  2578. return !(!this.visible || this.waitingForResult);
  2579. }
  2580. get allActions() {
  2581. const e23 = this._get("allActions") || new S6();
  2582. e23.removeAll();
  2583. const { actions: t25, defaultActions: i32, defaultPopupTemplateEnabled: s30, includeDefaultActions: r24, selectedFeature: o30 } = this, n34 = r24 ? i32.concat(t25) : t25, a34 = o30 && (typeof o30.getEffectivePopupTemplate == "function" && o30.getEffectivePopupTemplate(s30) || o30.popupTemplate), l27 = a34 && a34.actions, u23 = a34 && a34.overwriteActions ? l27 : l27 ? l27.concat(n34) : n34;
  2584. return u23 && u23.filter(Boolean).forEach((t26) => e23.add(t26)), e23;
  2585. }
  2586. get defaultActions() {
  2587. const e23 = this._get("defaultActions") || new S6();
  2588. return e23.removeAll(), e23.addMany(l17(this.selectedFeature) ? R5() : B5()), e23;
  2589. }
  2590. get featureCount() {
  2591. return this.features.length;
  2592. }
  2593. get features() {
  2594. return this._get("features") || [];
  2595. }
  2596. set features(e23) {
  2597. const t25 = e23 || [];
  2598. this._set("features", t25);
  2599. const { pendingPromisesCount: i32, promiseCount: s30, selectedFeatureIndex: r24 } = this, o30 = s30 && t25.length;
  2600. o30 && i32 && r24 === -1 ? this.selectedFeatureIndex = 0 : o30 && r24 !== -1 || (this.selectedFeatureIndex = t25.length ? 0 : -1);
  2601. }
  2602. get location() {
  2603. return this._get("location") || null;
  2604. }
  2605. set location(e23) {
  2606. const t25 = this.get("view.spatialReference.isWebMercator");
  2607. e23 && e23.get("spatialReference.isWGS84") && t25 && (e23 = R(e23)), this._set("location", e23);
  2608. }
  2609. get pendingPromisesCount() {
  2610. return this._pendingPromises.size;
  2611. }
  2612. get waitingForResult() {
  2613. return !(!(!!this._fetchFeaturesController || this.pendingPromisesCount > 0) || this.featureCount !== 0);
  2614. }
  2615. get promiseCount() {
  2616. return this.promises.length;
  2617. }
  2618. get promises() {
  2619. return this._get("promises") || [];
  2620. }
  2621. set promises(e23) {
  2622. if (this._pendingPromises.clear(), this.features = [], !Array.isArray(e23) || !e23.length)
  2623. return this._set("promises", []), void this.notifyChange("pendingPromisesCount");
  2624. this._set("promises", e23), (e23 = e23.slice(0)).forEach((e24) => {
  2625. this._pendingPromises.add(e24);
  2626. const t25 = (t26) => {
  2627. this._pendingPromises.has(e24) && this._updateFeatures(t26), this._updatePendingPromises(e24);
  2628. }, i32 = () => this._updatePendingPromises(e24);
  2629. e24.then(t25, i32);
  2630. }), this.notifyChange("pendingPromisesCount");
  2631. }
  2632. get selectedFeature() {
  2633. const { features: e23, selectedFeatureIndex: t25 } = this;
  2634. if (t25 === -1)
  2635. return null;
  2636. return e23[t25] || null;
  2637. }
  2638. get selectedFeatureIndex() {
  2639. const e23 = this._get("selectedFeatureIndex");
  2640. return typeof e23 == "number" ? e23 : -1;
  2641. }
  2642. set selectedFeatureIndex(e23) {
  2643. const { featureCount: t25 } = this;
  2644. e23 = isNaN(e23) || e23 < -1 || !t25 ? -1 : (e23 + t25) % t25, this.activeFeature = null, this._set("selectedFeatureIndex", e23);
  2645. }
  2646. get selectedFeatureViewModel() {
  2647. return this.featureViewModels[this.selectedFeatureIndex] || null;
  2648. }
  2649. get state() {
  2650. return this.get("view.ready") ? "ready" : "disabled";
  2651. }
  2652. centerAtLocation() {
  2653. const { view: e23 } = this, t25 = d10(this);
  2654. if (!t25) {
  2655. const i32 = new s2("center-at-location:invalid-target-or-view", "Cannot center at a location without a target and view.", { target: t25, view: e23 });
  2656. return z4.error(i32), Promise.reject(i32);
  2657. }
  2658. return this.callGoTo({ target: { target: t25, scale: e23.scale } });
  2659. }
  2660. clear() {
  2661. this.set({ promises: [], features: [], content: null, title: null, location: null, activeFeature: null });
  2662. }
  2663. fetchFeatures(e23, t25) {
  2664. const { view: i32 } = this;
  2665. if (!i32 || !e23) {
  2666. const t26 = new s2("fetch-features:invalid-screenpoint-or-view", "Cannot fetch features without a screenPoint and view.", { screenPoint: e23, view: i32 });
  2667. return z4.error(t26), Promise.reject(t26);
  2668. }
  2669. return i32.fetchPopupFeatures(e23, { event: t25 && t25.event, defaultPopupTemplateEnabled: this.defaultPopupTemplateEnabled, signal: t25 && t25.signal });
  2670. }
  2671. open(e23) {
  2672. const t25 = { updateLocationEnabled: false, promises: [], fetchFeatures: false, ...e23, visible: true }, { fetchFeatures: i32 } = t25;
  2673. delete t25.fetchFeatures, i32 && this._setFetchFeaturesPromises(t25.location);
  2674. const s30 = ["actionsMenuOpen", "collapsed", "featureMenuOpen"];
  2675. for (const r24 of s30)
  2676. delete t25[r24];
  2677. this.set(t25);
  2678. }
  2679. triggerAction(e23) {
  2680. const t25 = this.allActions.getItemAt(e23);
  2681. t25 && !t25.disabled && this.emit("trigger-action", { action: t25 });
  2682. }
  2683. next() {
  2684. return this.selectedFeatureIndex = this.selectedFeatureIndex + 1, this;
  2685. }
  2686. previous() {
  2687. return this.selectedFeatureIndex = this.selectedFeatureIndex - 1, this;
  2688. }
  2689. disableClusterBrowsing() {
  2690. m19(this), this._clearBrowsedClusterGraphics();
  2691. }
  2692. async enableClusterBrowsing() {
  2693. const { view: e23, selectedFeature: t25 } = this;
  2694. e23?.type === "2d" ? l17(t25) ? (await f9(this), await v10(this)) : z4.warn("enableClusterBrowsing:invalid-selectedFeature: Selected feature must represent an aggregate/cluster graphic.", t25) : z4.warn("enableClusterBrowsing:invalid-view: View must be 2d MapView.", t25);
  2695. }
  2696. _animationStateChange(e23) {
  2697. this.zoomToLocation || (o17.disabled = e23 === "waiting-for-target");
  2698. }
  2699. _clearBrowsedClusterGraphics() {
  2700. const e23 = this.view?.graphics;
  2701. e23 && (e23.remove(this.selectedClusterBoundaryFeature), e23.remove(this._selectedClusterFeature)), this._selectedClusterFeature = null, this.selectedClusterBoundaryFeature.geometry = null;
  2702. }
  2703. _viewScaleChange() {
  2704. if (l17(this.selectedFeature))
  2705. return this.browseClusterEnabled = false, this.visible = false, void this.clear();
  2706. this.browseClusterEnabled && (this.features = [this.selectedFeature]);
  2707. }
  2708. _locationChange(e23) {
  2709. const { selectedFeature: t25, updateLocationEnabled: i32 } = this;
  2710. i32 && e23 && (!t25 || t25.geometry) && this.centerAtLocation();
  2711. }
  2712. _selectedFeatureIndexChange() {
  2713. this.featurePage = this.featureCount > 1 ? Math.floor(this.selectedFeatureIndex / this.featuresPerPage) + 1 : null;
  2714. }
  2715. _featureViewModelsChange() {
  2716. this.featurePage = this.featureCount > 1 ? 1 : null;
  2717. }
  2718. _setGraphicOnFeatureViewModels() {
  2719. const { features: e23, featureCount: t25, featurePage: i32, featuresPerPage: s30, featureViewModels: r24 } = this;
  2720. if (i32 === null)
  2721. return;
  2722. const o30 = ((i32 - 1) * s30 + t25) % t25, n34 = o30 + s30;
  2723. r24.slice(o30, n34).forEach((t26, i33) => {
  2724. t26 && !t26.graphic && (t26.graphic = e23[o30 + i33]);
  2725. });
  2726. }
  2727. async _selectedFeatureChange(e23) {
  2728. if (!e23)
  2729. return;
  2730. const { location: t25, updateLocationEnabled: i32, view: s30 } = this;
  2731. if (this.browseClusterEnabled) {
  2732. if (this._selectedClusterFeature && (s30.graphics.remove(this._selectedClusterFeature), this._selectedClusterFeature = null), l17(e23))
  2733. return;
  2734. return e23.symbol = await x4(e23), this._selectedClusterFeature = e23, void s30.graphics.add(this._selectedClusterFeature);
  2735. }
  2736. !i32 && t25 || !e23.geometry ? i32 && !e23.geometry && this.centerAtLocation().then(() => {
  2737. this.location = s30.center.clone();
  2738. }) : this.location = e2(this._getPointFromGeometry(e23.geometry));
  2739. }
  2740. _waitingForResultChange() {
  2741. !this.featureCount && this.promises && (this.visible = false);
  2742. }
  2743. _setFetchFeaturesPromises(e23) {
  2744. return this._fetchFeaturesWithController(this._getScreenPoint(e23 || this.location)).then((e24) => {
  2745. const { clientOnlyGraphics: t25, promisesPerLayerView: i32 } = e24, s30 = Promise.resolve(t25), r24 = i32.map((e25) => e25.promise);
  2746. this.promises = [s30, ...r24];
  2747. });
  2748. }
  2749. _destroyFeatureVMs() {
  2750. this.featureViewModels.forEach((e23) => e23 && !e23.destroyed && e23.destroy()), this._set("featureViewModels", []);
  2751. }
  2752. _updateFeatureVMs() {
  2753. const { selectedFeature: e23, features: t25, featureViewModels: i32 } = this;
  2754. if (l17(e23) || (this.browseClusterEnabled = false), this._destroyFeatureVMs(), !t25 || !t25.length)
  2755. return;
  2756. const s30 = i32.slice(0), r24 = [];
  2757. t25.forEach((t26, i33) => {
  2758. if (!t26)
  2759. return;
  2760. let o30 = null;
  2761. if (s30.some((e24, i34) => (e24 && e24.graphic === t26 && (o30 = e24, s30.splice(i34, 1)), !!o30)), o30)
  2762. r24[i33] = o30;
  2763. else {
  2764. const s31 = new J3({ abilities: this.featureViewModelAbilities, defaultPopupTemplateEnabled: this.defaultPopupTemplateEnabled, spatialReference: this.view?.spatialReference, graphic: t26 === e23 ? t26 : null, map: this.view?.map, view: this.view });
  2765. r24[i33] = s31;
  2766. }
  2767. }), s30.forEach((e24) => e24 && !e24.destroyed && e24.destroy()), this._set("featureViewModels", r24);
  2768. }
  2769. _getScreenPoint(e23) {
  2770. const { view: t25 } = this;
  2771. return t25 && e23 && typeof t25.toScreen == "function" ? t25.toScreen(e23) : null;
  2772. }
  2773. _autoOpenEnabledChange() {
  2774. const e23 = "auto-fetch-features", { _handles: t25, autoOpenEnabled: i32 } = this;
  2775. if (t25.remove(e23), i32 && this.view) {
  2776. const i33 = this.view.on("click", (e24) => {
  2777. e24.pointerType === "mouse" && e24.button !== 0 || this._fetchFeaturesAndOpen(e24);
  2778. }, g3.WIDGET);
  2779. t25.add(i33, e23);
  2780. }
  2781. }
  2782. _cancelFetchingFeatures() {
  2783. const e23 = this._fetchFeaturesController;
  2784. e23 && e23.abort(), this._fetchFeaturesController = null, this.notifyChange("waitingForResult");
  2785. }
  2786. _fetchFeaturesWithController(e23, t25) {
  2787. this._cancelFetchingFeatures();
  2788. const i32 = new AbortController(), { signal: s30 } = i32;
  2789. this._fetchFeaturesController = i32, this.notifyChange("waitingForResult");
  2790. const r24 = this.fetchFeatures(e23, { signal: s30, event: t25 });
  2791. return r24.catch(() => {
  2792. }).then(() => {
  2793. this._fetchFeaturesController = null, this.notifyChange("waitingForResult");
  2794. }), r24;
  2795. }
  2796. _fetchFeaturesAndOpen(e23) {
  2797. const { screenPoint: t25, mapPoint: i32 } = e23, { view: s30 } = this;
  2798. this._fetchFeaturesWithController(t25, e23).then((e24) => {
  2799. const { clientOnlyGraphics: t26, promisesPerLayerView: r24, location: o30 } = e24, n34 = [Promise.resolve(t26), ...r24.map((e25) => e25.promise)];
  2800. return s30.popup.open({ location: o30 || i32, promises: n34 }), e24;
  2801. });
  2802. }
  2803. _updatePendingPromises(e23) {
  2804. e23 && this._pendingPromises.has(e23) && (this._pendingPromises.delete(e23), this.notifyChange("pendingPromisesCount"));
  2805. }
  2806. _autoClose() {
  2807. this.autoCloseEnabled && (this.visible = false);
  2808. }
  2809. _getPointFromGeometry(e23) {
  2810. return t(e23) ? null : e23.type === "point" ? e23 : e23.type === "extent" ? e23.center : e23.type === "polygon" ? e23.centroid : e23.type === "multipoint" || e23.type === "polyline" ? e23.extent.center : null;
  2811. }
  2812. async _getLayerView(e23, t25) {
  2813. return await e23.when(), e23.whenLayerView(t25);
  2814. }
  2815. _getHighlightLayer(e23) {
  2816. const { layer: t25, sourceLayer: i32 } = e23;
  2817. return i32?.type === "map-notes" || i32?.type === "subtype-group" ? i32 : t25;
  2818. }
  2819. _getHighlightTarget(e23, t25) {
  2820. const i32 = t25.type === "imagery" ? void 0 : "objectIdField" in t25 && t25.objectIdField, s30 = e23.attributes;
  2821. return s30 && i32 && s30[i32] || e23;
  2822. }
  2823. async _highlightActiveFeature() {
  2824. const e23 = "highlight-active-feature";
  2825. this._handles.remove(e23);
  2826. const { highlightEnabled: t25, view: i32, activeFeature: s30, visible: r24 } = this;
  2827. if (!(s30 && i32 && t25 && r24))
  2828. return;
  2829. const o30 = this._getHighlightLayer(s30);
  2830. if (!(o30 && o30 instanceof b3))
  2831. return;
  2832. const n34 = this._getLayerView(i32, o30);
  2833. this._highlightActiveFeaturePromise = n34;
  2834. const a34 = await n34;
  2835. if (!(a34 && e15(a34) && this._highlightActiveFeaturePromise === n34 && this.activeFeature && this.highlightEnabled))
  2836. return;
  2837. const l27 = a34.highlight(this._getHighlightTarget(s30, o30));
  2838. this._handles.add(l27, e23);
  2839. }
  2840. async _highlightSelectedFeature() {
  2841. const e23 = "highlight-selected-feature";
  2842. this._handles.remove(e23);
  2843. const { selectedFeature: t25, highlightEnabled: i32, view: s30, visible: r24 } = this;
  2844. if (!(t25 && s30 && i32 && r24))
  2845. return;
  2846. const o30 = this._getHighlightLayer(t25);
  2847. if (!(o30 && o30 instanceof b3))
  2848. return;
  2849. const n34 = this._getLayerView(s30, o30);
  2850. this._highlightSelectedFeaturePromise = n34;
  2851. const a34 = await n34;
  2852. if (!(a34 && e15(a34) && this._highlightSelectedFeaturePromise === n34 && this.selectedFeature && this.highlightEnabled && this.visible))
  2853. return;
  2854. const l27 = a34.highlight(this._getHighlightTarget(t25, o30));
  2855. this._handles.add(l27, e23);
  2856. }
  2857. _updateFeatures(e23) {
  2858. const { features: t25 } = this;
  2859. if (!e23 || !e23.length)
  2860. return;
  2861. if (!t25.length)
  2862. return void (this.features = e23);
  2863. const i32 = e23.filter((e24) => !t25.includes(e24));
  2864. this.features = t25.concat(i32);
  2865. }
  2866. };
  2867. e([d()], H4.prototype, "featurePage", void 0), e([d()], H4.prototype, "isLoadingFeature", null), e([d({ type: S6 })], H4.prototype, "actions", void 0), e([d({ readOnly: true })], H4.prototype, "active", null), e([d()], H4.prototype, "activeFeature", void 0), e([d({ readOnly: true })], H4.prototype, "allActions", null), e([d({ type: Boolean })], H4.prototype, "defaultPopupTemplateEnabled", void 0), e([d()], H4.prototype, "autoCloseEnabled", void 0), e([d()], H4.prototype, "autoOpenEnabled", void 0), e([d()], H4.prototype, "browseClusterEnabled", void 0), e([d()], H4.prototype, "content", void 0), e([d({ type: S6, readOnly: true })], H4.prototype, "defaultActions", null), e([d({ readOnly: true })], H4.prototype, "featureCount", null), e([d()], H4.prototype, "features", null), e([d()], H4.prototype, "featuresPerPage", void 0), e([d()], H4.prototype, "featureViewModelAbilities", void 0), e([d({ readOnly: true })], H4.prototype, "featureViewModels", void 0), e([d()], H4.prototype, "highlightEnabled", void 0), e([d()], H4.prototype, "includeDefaultActions", void 0), e([d({ type: j2 })], H4.prototype, "location", null), e([d({ readOnly: true })], H4.prototype, "pendingPromisesCount", null), e([d({ readOnly: true })], H4.prototype, "selectedClusterBoundaryFeature", void 0), e([d({ readOnly: true })], H4.prototype, "waitingForResult", null), e([d({ readOnly: true })], H4.prototype, "promiseCount", null), e([d()], H4.prototype, "promises", null), e([d({ value: null, readOnly: true })], H4.prototype, "selectedFeature", null), e([d({ value: -1 })], H4.prototype, "selectedFeatureIndex", null), e([d({ readOnly: true })], H4.prototype, "selectedFeatureViewModel", null), e([d({ readOnly: true })], H4.prototype, "state", null), e([d()], H4.prototype, "title", void 0), e([d()], H4.prototype, "updateLocationEnabled", void 0), e([d()], H4.prototype, "view", void 0), e([d()], H4.prototype, "visible", void 0), e([d()], H4.prototype, "zoomFactor", void 0), e([d()], H4.prototype, "zoomToLocation", void 0), e([d()], H4.prototype, "centerAtLocation", null), H4 = e([n3(G3)], H4);
  2868. var U5 = H4;
  2869. // node_modules/@arcgis/core/widgets/Popup.js
  2870. var N4 = "selected-index";
  2871. var T5 = 0;
  2872. var B6 = "popup-spinner";
  2873. var D3 = { iconLeftTriangleArrow: "esri-icon-left-triangle-arrow", iconRightTriangleArrow: "esri-icon-right-triangle-arrow", iconDockToTop: "esri-icon-maximize", iconDockToBottom: "esri-icon-dock-bottom", iconDockToLeft: "esri-icon-dock-left", iconDockToRight: "esri-icon-dock-right", iconClose: "esri-icon-close", iconUndock: "esri-icon-minimize", iconCheckMark: "esri-icon-check-mark", iconLoading: "esri-icon-loading-indicator", iconDefaultAction: "esri-icon-default-action", iconActionsMenu: "esri-icon-handle-horizontal", rotating: "esri-rotating", base: "esri-popup", widget: "esri-widget", main: "esri-popup__main-container", loadingContainer: "esri-popup__loading-container", isCollapsible: "esri-popup--is-collapsible", isCollapsed: "esri-popup--is-collapsed", shadow: "esri-popup--shadow", isDocked: "esri-popup--is-docked", isDockedTopLeft: "esri-popup--is-docked-top-left", isDockedTopCenter: "esri-popup--is-docked-top-center", isDockedTopRight: "esri-popup--is-docked-top-right", isDockedBottomLeft: "esri-popup--is-docked-bottom-left", isDockedBottomCenter: "esri-popup--is-docked-bottom-center", isDockedBottomRight: "esri-popup--is-docked-bottom-right", alignTopCenter: "esri-popup--aligned-top-center", alignBottomCenter: "esri-popup--aligned-bottom-center", alignTopLeft: "esri-popup--aligned-top-left", alignBottomLeft: "esri-popup--aligned-bottom-left", alignTopRight: "esri-popup--aligned-top-right", alignBottomRight: "esri-popup--aligned-bottom-right", isFeatureMenuOpen: "esri-popup--feature-menu-open", isActionsMenuOpen: "esri-popup--actions-menu-open", hasFeatureUpdated: "esri-popup--feature-updated", header: "esri-popup__header", headerButtons: "esri-popup__header-buttons", headerContainer: "esri-popup__header-container", headerContainerButton: "esri-popup__header-container--button", headerTitle: "esri-popup__header-title", content: "esri-popup__content", footer: "esri-popup__footer", footerHasPagination: "esri-popup__footer--has-pagination", footerHasActions: "esri-popup__footer--has-actions", footerHasActionsMenu: "esri-popup__footer--has-actions-menu", button: "esri-popup__button", buttonDisabled: "esri-popup__button--disabled", buttonDock: "esri-popup__button--dock", icon: "esri-popup__icon", iconDock: "esri-popup__icon--dock-icon", inlineActionsContainer: "esri-popup__inline-actions-container", actionsMenuButton: "esri-popup__actions-menu-button", actions: "esri-popup__actions", action: "esri-popup__action", actionImage: "esri-popup__action-image", actionText: "esri-popup__action-text", actionToggle: "esri-popup__action-toggle", actionToggleOn: "esri-popup__action-toggle--on", pointer: "esri-popup__pointer", pointerDirection: "esri-popup__pointer-direction", navigation: "esri-popup__navigation", paginationPrevious: "esri-popup__pagination-previous", paginationNext: "esri-popup__pagination-next", paginationPreviousIconLTR: "esri-popup__pagination-previous-icon", paginationPreviousIconRTL: "esri-popup__pagination-previous-icon--rtl", paginationNextIconLTR: "esri-popup__pagination-next-icon", paginationNextIconRTL: "esri-popup__pagination-next-icon--rtl", featureMenu: "esri-popup__feature-menu", featureMenuList: "esri-popup__feature-menu-list", featureMenuItem: "esri-popup__feature-menu-item", featureMenuViewport: "esri-popup__feature-menu-viewport", featureMenuHeader: "esri-popup__feature-menu-header", featureMenuNote: "esri-popup__feature-menu-note", featureMenuSelected: "esri-popup__feature-menu-item--selected", featureMenuButton: "esri-popup__feature-menu-button", featureMenuTitle: "esri-popup__feature-menu-title", featureMenuObserver: "esri-popup__feature-menu-observer", featureMenuLoader: "esri-popup__feature-menu-loader", collapseButton: "esri-popup__collapse-button" };
  2874. var E6 = { buttonEnabled: true, position: "auto", breakpoint: { width: 544 } };
  2875. var P2 = "esri-popup";
  2876. function L8(e23, t25) {
  2877. return t25 === void 0 ? `${P2}__${e23}` : `${P2}__${e23}-${t25}`;
  2878. }
  2879. var S7 = "esri.widgets.Popup";
  2880. var V2 = s.getLogger(S7);
  2881. var U6 = { closeButton: true, featureNavigation: true };
  2882. var R6 = class extends i12(O2) {
  2883. constructor(e23, t25) {
  2884. super(e23, t25), this._blurClose = false, this._blurContainer = false, this._containerNode = null, this._mainContainerNode = null, this._featureMenuNode = null, this._actionsMenuNode = null, this._focusClose = false, this._focusContainer = false, this._focusDockButton = false, this._focusFeatureMenuButton = false, this._focusActionsMenuButton = false, this._focusFirstFeature = false, this._focusFirstAction = false, this._handles = new u3(), this._pointerOffsetInPx = 16, this._spinner = null, this._feature = null, this._featureMenuIntersectionObserverCallback = ([e24]) => {
  2885. e24?.isIntersecting && this.viewModel.featurePage++;
  2886. }, this._featureMenuIntersectionObserver = new IntersectionObserver(this._featureMenuIntersectionObserverCallback, { root: window.document }), this._displaySpinnerThrottled = e7(() => this._displaySpinner(), T5), this.actions = null, this.alignment = "auto", this.autoCloseEnabled = null, this.autoOpenEnabled = null, this.defaultPopupTemplateEnabled = null, this.content = null, this.collapsed = false, this.collapseEnabled = true, this.dockEnabled = false, this.featureCount = null, this.featureMenuOpen = false, this.features = null, this.goToOverride = null, this.headingLevel = 2, this.highlightEnabled = null, this.location = null, this.label = void 0, this.maxInlineActions = 3, this.messages = null, this.messagesCommon = null, this.promises = null, this.selectedFeature = null, this.selectedFeatureIndex = null, this.spinnerEnabled = true, this.title = null, this.updateLocationEnabled = null, this.view = null, this.viewModel = new U5(), this.visible = null, this.visibleElements = { ...U6 }, this._addSelectedFeatureIndexHandle(), this.own([l4(() => this.viewModel?.screenLocation, () => this._positionContainer()), l4(() => [this.viewModel?.active, this.dockEnabled], () => this._toggleScreenLocationEnabled()), l4(() => this.viewModel?.screenLocation, (e24, t26) => {
  2887. !!e24 != !!t26 && this.reposition();
  2888. }), l4(() => [this.viewModel?.view?.padding, this.viewModel?.view?.size, this.viewModel?.active, this.viewModel?.location, this.alignment], () => this.reposition()), l4(() => this.spinnerEnabled, (e24) => this._spinnerEnabledChange(e24)), l4(() => this.viewModel?.view?.size, (e24, t26) => this._updateDockEnabledForViewSize(e24, t26)), l4(() => this.viewModel?.view, (e24, t26) => this._viewChange(e24, t26)), l4(() => this.viewModel?.view?.ready, (e24, t26) => this._viewReadyChange(e24, t26)), l4(() => [this.viewModel?.waitingForResult, this.viewModel?.location], () => {
  2889. this._hideSpinner(), this._displaySpinnerThrottled();
  2890. }), l4(() => [this.selectedFeatureWidget?.viewModel?.title, this.selectedFeatureWidget?.viewModel?.state], () => this._setTitleFromFeatureWidget()), l4(() => [this.selectedFeatureWidget?.viewModel?.content, this.selectedFeatureWidget?.viewModel?.state], () => this._setContentFromFeatureWidget()), f2(() => !this.collapsed, () => {
  2891. this.viewModel?.view?.widthBreakpoint === "xsmall" && this.viewModel.active && this.collapseEnabled && this.viewModel.centerAtLocation();
  2892. }), a3(() => this.viewModel?.allActions, "change", () => this._watchActions()), l4(() => this.viewModel?.allActions, () => this._watchActions(), h2), l4(() => this.viewModel?.featureViewModels, () => this._featureMenuViewportScrollTop())]);
  2893. }
  2894. destroy() {
  2895. this._destroySelectedFeatureWidget(), this._destroySpinner(), this._handles?.destroy(), this._unobserveFeatureMenuObserver(), this._featureMenuIntersectionObserver?.disconnect(), this._handles = null;
  2896. }
  2897. get actionsMenuId() {
  2898. return `${this.id}-actions-menu`;
  2899. }
  2900. get actionsMenuButtonId() {
  2901. return `${this.id}-actions-menu-button`;
  2902. }
  2903. get featureMenuId() {
  2904. return `${this.id}-feature-menu`;
  2905. }
  2906. get titleId() {
  2907. return `${this.id}-popup-title`;
  2908. }
  2909. get contentId() {
  2910. return `${this.id}-popup-content`;
  2911. }
  2912. get hasContent() {
  2913. return !!(this.selectedFeatureWidget ? this.selectedFeatureWidget?.viewModel?.waitingForContent || this.selectedFeatureWidget?.viewModel?.state === "error" || this.selectedFeatureWidget?.viewModel?.content : this.viewModel?.content);
  2914. }
  2915. get featureNavigationVisible() {
  2916. return this.viewModel.active && this.viewModel.featureCount > 1 && this.visibleElements.featureNavigation;
  2917. }
  2918. get collapsible() {
  2919. return !!(this.collapseEnabled && this.viewModel.title && this.hasContent);
  2920. }
  2921. get featureMenuVisible() {
  2922. return this.featureNavigationVisible && this.featureMenuOpen;
  2923. }
  2924. get contentCollapsed() {
  2925. return this.collapsible && !this.featureMenuVisible && this.collapsed;
  2926. }
  2927. get dividedActions() {
  2928. return this._divideActions();
  2929. }
  2930. set actionsMenuOpen(e23) {
  2931. this._set("actionsMenuOpen", !!e23);
  2932. }
  2933. get actionsMenuOpen() {
  2934. return !!this.viewModel.active && this._get("actionsMenuOpen");
  2935. }
  2936. get currentAlignment() {
  2937. return this._getCurrentAlignment();
  2938. }
  2939. get currentDockPosition() {
  2940. return this._getCurrentDockPosition();
  2941. }
  2942. get dockOptions() {
  2943. return this._get("dockOptions") || E6;
  2944. }
  2945. set dockOptions(e23) {
  2946. const t25 = { ...E6 }, i32 = this.get("viewModel.view.breakpoints"), o30 = {};
  2947. i32 && (o30.width = i32.xsmall, o30.height = i32.xsmall);
  2948. const n34 = { ...t25, ...e23 }, s30 = { ...t25.breakpoint, ...o30 }, { breakpoint: r24 } = n34;
  2949. r24 === true ? n34.breakpoint = s30 : typeof r24 == "object" && (n34.breakpoint = { ...s30, ...r24 }), this._set("dockOptions", n34), this._setCurrentDockPosition(), this.reposition();
  2950. }
  2951. get selectedFeatureWidget() {
  2952. const { _feature: e23, visibleElements: t25, headingLevel: i32 } = this, { selectedFeatureViewModel: o30 } = this.viewModel, n34 = { ...t25, title: false };
  2953. return o30 ? (e23 ? (e23.viewModel = o30, e23.visibleElements = n34) : this._feature = new E5({ headingLevel: i32 + 1, viewModel: o30, visibleElements: n34 }), this._feature) : null;
  2954. }
  2955. castVisibleElements(e23) {
  2956. return { ...U6, ...e23 };
  2957. }
  2958. blur() {
  2959. const { active: e23 } = this.viewModel;
  2960. e23 || V2.warn("Popup can only be blurred when currently active."), this.visibleElements.closeButton ? this._blurClose = true : this._blurContainer = true, this.scheduleRender();
  2961. }
  2962. clear() {
  2963. this.viewModel.clear();
  2964. }
  2965. close() {
  2966. this.visible = false;
  2967. }
  2968. fetchFeatures(e23, t25) {
  2969. return this.viewModel.fetchFeatures(e23, t25);
  2970. }
  2971. focus() {
  2972. const { active: e23 } = this.viewModel;
  2973. e23 || V2.warn("Popup can only be focused when currently active."), this.visibleElements.closeButton ? this._focusClose = true : this._focusContainer = true, this.scheduleRender();
  2974. }
  2975. next() {
  2976. return this.viewModel.next();
  2977. }
  2978. open(e23) {
  2979. this._handles.remove(N4);
  2980. const t25 = !!e23 && !!e23.featureMenuOpen, i32 = !!e23 && !!e23.actionsMenuOpen, o30 = { collapsed: !!e23 && !!e23.collapsed, actionsMenuOpen: i32, featureMenuOpen: t25 };
  2981. this.viewModel?.view?.widthBreakpoint === "xsmall" && (o30.collapsed = true), this.set(o30), this.viewModel.open(e23), this._shouldFocus(e23), this._addSelectedFeatureIndexHandle();
  2982. }
  2983. previous() {
  2984. return this.viewModel.previous();
  2985. }
  2986. reposition() {
  2987. this.renderNow(), this._positionContainer(), this._setCurrentAlignment();
  2988. }
  2989. triggerAction(e23) {
  2990. this.viewModel.triggerAction(e23);
  2991. }
  2992. render() {
  2993. const { actionsMenuOpen: e23, dockEnabled: t25, featureMenuVisible: i32, dividedActions: o30, currentAlignment: n34, currentDockPosition: s30 } = this, { active: r24 } = this.viewModel, { menuActions: a34 } = o30, l27 = r24 && a34.length > 1 && e23, u23 = r24 && t25, c42 = r24 && !t25, d20 = this.selectedFeature?.layer?.title, p36 = this.selectedFeature?.layer?.id, h19 = { [D3.alignTopCenter]: n34 === "top-center", [D3.alignBottomCenter]: n34 === "bottom-center", [D3.alignTopLeft]: n34 === "top-left", [D3.alignBottomLeft]: n34 === "bottom-left", [D3.alignTopRight]: n34 === "top-right", [D3.alignBottomRight]: n34 === "bottom-right", [D3.isDocked]: u23, [D3.shadow]: c42, [D3.isDockedTopLeft]: s30 === "top-left", [D3.isDockedTopCenter]: s30 === "top-center", [D3.isDockedTopRight]: s30 === "top-right", [D3.isDockedBottomLeft]: s30 === "bottom-left", [D3.isDockedBottomCenter]: s30 === "bottom-center", [D3.isDockedBottomRight]: s30 === "bottom-right", [D3.isFeatureMenuOpen]: i32, [D3.isActionsMenuOpen]: l27 };
  2994. return n6("div", { class: this.classes(D3.base, h19), role: "presentation", "data-layer-title": d20, "data-layer-id": p36, bind: this, afterCreate: this._positionContainer, afterUpdate: this._positionContainer }, r24 ? [this.renderMainContainer(), this.renderPointer()] : null);
  2995. }
  2996. renderLoadingIcon() {
  2997. return n6("span", { "aria-hidden": "true", class: this.classes(D3.icon, D3.iconLoading, D3.rotating) });
  2998. }
  2999. renderNavigationLoading() {
  3000. const { messagesCommon: e23 } = this;
  3001. return this.viewModel.pendingPromisesCount ? n6("div", { key: L8("loading-container"), role: "presentation", class: D3.loadingContainer, "aria-label": e23.loading, title: e23.loading }, this.renderLoadingIcon()) : null;
  3002. }
  3003. renderPreviousIcon() {
  3004. const e23 = f3(this.container), t25 = { [D3.iconRightTriangleArrow]: e23, [D3.paginationPreviousIconRTL]: e23, [D3.iconLeftTriangleArrow]: !e23, [D3.paginationPreviousIconLTR]: !e23 };
  3005. return n6("span", { "aria-hidden": "true", class: this.classes(D3.icon, t25) });
  3006. }
  3007. renderPreviousButton() {
  3008. const { messages: e23 } = this;
  3009. return n6("div", { role: "button", tabIndex: 0, bind: this, onclick: this._previous, onkeydown: this._previous, class: this.classes(D3.button, D3.paginationPrevious), "aria-label": e23.previous, title: e23.previous }, this.renderPreviousIcon());
  3010. }
  3011. renderNextIcon() {
  3012. const e23 = f3(this.container), t25 = { [D3.iconLeftTriangleArrow]: e23, [D3.paginationNextIconRTL]: e23, [D3.iconRightTriangleArrow]: !e23, [D3.paginationNextIconLTR]: !e23 };
  3013. return n6("span", { "aria-hidden": "true", class: this.classes(D3.icon, t25) });
  3014. }
  3015. renderNextButton() {
  3016. const { messages: e23 } = this;
  3017. return n6("div", { role: "button", tabIndex: 0, bind: this, onclick: this._next, onkeydown: this._next, class: this.classes(D3.button, D3.paginationNext), "aria-label": e23.next, title: e23.next }, this.renderNextIcon());
  3018. }
  3019. renderFeatureMenuButton() {
  3020. const { featureMenuOpen: e23, featureMenuId: t25, messagesCommon: i32 } = this, { featureCount: o30, selectedFeatureIndex: n34 } = this.viewModel;
  3021. return n6("div", { role: "button", tabIndex: 0, bind: this, onclick: this._toggleFeatureMenu, onkeydown: this._toggleFeatureMenu, afterCreate: this._focusFeatureMenuButtonNode, afterUpdate: this._focusFeatureMenuButtonNode, class: this.classes(D3.button, D3.featureMenuButton), "aria-haspopup": "true", "aria-controls": t25, "aria-expanded": e23.toString(), "aria-label": i32.menu, title: i32.menu }, this._getPageText(o30, n34));
  3022. }
  3023. renderNavigationButtons() {
  3024. return this.featureNavigationVisible ? [this.renderPreviousButton(), this.renderNavigationLoading() || this.renderFeatureMenuButton(), this.renderNextButton()] : null;
  3025. }
  3026. renderDockIcon() {
  3027. const { dockEnabled: e23 } = this, t25 = this._wouldDockTo(), i32 = { [D3.iconUndock]: e23, [D3.iconDock]: !e23, [D3.iconDockToRight]: !e23 && (t25 === "top-right" || t25 === "bottom-right"), [D3.iconDockToLeft]: !e23 && (t25 === "top-left" || t25 === "bottom-left"), [D3.iconDockToTop]: !e23 && t25 === "top-center", [D3.iconDockToBottom]: !e23 && t25 === "bottom-center" };
  3028. return n6("span", { "aria-hidden": "true", class: this.classes(i32, D3.icon) });
  3029. }
  3030. renderDockButton() {
  3031. const { dockEnabled: e23, messages: t25 } = this, i32 = this.viewModel?.view?.widthBreakpoint, o30 = e23 ? t25.undock : t25.dock;
  3032. return i32 !== "xsmall" && this.dockOptions?.buttonEnabled ? n6("div", { role: "button", "aria-label": o30, title: o30, tabIndex: 0, bind: this, onclick: this._toggleDockEnabled, onkeydown: this._toggleDockEnabled, afterCreate: this._focusDockButtonNode, afterUpdate: this._focusDockButtonNode, class: this.classes(D3.button, D3.buttonDock) }, this.renderDockIcon()) : null;
  3033. }
  3034. renderTitle() {
  3035. const { title: e23 } = this.viewModel, { titleId: t25, collapsible: i32, contentCollapsed: o30, messagesCommon: n34 } = this, s30 = { [D3.headerContainerButton]: i32 }, r24 = n6(n12, { level: this.headingLevel, class: D3.headerTitle, innerHTML: e23 }), a34 = i32 ? n6("button", { key: `${e23}--collapsible`, id: t25, title: o30 ? n34.expand : n34.collapse, bind: this, enterAnimation: this._createFeatureUpdatedAnimation(), class: this.classes(D3.headerContainer, s30), "aria-expanded": o30 ? "false" : "true", onclick: this._toggleCollapsed, type: "button" }, r24) : n6("div", { key: e23, id: t25, bind: this, enterAnimation: this._createFeatureUpdatedAnimation(), class: this.classes(D3.headerContainer, s30) }, r24);
  3036. return e23 ? a34 : null;
  3037. }
  3038. renderCloseIcon() {
  3039. return n6("span", { "aria-hidden": "true", class: this.classes(D3.icon, D3.iconClose) });
  3040. }
  3041. renderCloseButton() {
  3042. const { visibleElements: e23, messagesCommon: t25 } = this;
  3043. return e23.closeButton ? n6("div", { role: "button", tabIndex: 0, bind: this, onclick: this._close, onkeydown: this._close, class: D3.button, "aria-label": t25.close, title: t25.close, afterCreate: this._closeButtonNodeUpdated, afterUpdate: this._closeButtonNodeUpdated }, this.renderCloseIcon()) : null;
  3044. }
  3045. renderHeader() {
  3046. return n6("header", { class: D3.header }, this.renderTitle(), n6("div", { class: D3.headerButtons }, this.renderDockButton(), this.renderCloseButton()));
  3047. }
  3048. renderContentContainer() {
  3049. const { contentId: e23, hasContent: t25, contentCollapsed: i32 } = this, { content: o30 } = this.viewModel;
  3050. return t25 && !i32 ? n6("article", { key: o30, enterAnimation: this._createFeatureUpdatedAnimation(), id: e23, class: D3.content }, this.renderContent()) : null;
  3051. }
  3052. renderActionsMenuButton() {
  3053. const { actionsMenuId: e23, actionsMenuButtonId: t25, actionsMenuOpen: i32, dividedActions: o30, messagesCommon: n34 } = this, s30 = i32 ? n34.close : n34.open, { menuActions: r24 } = o30;
  3054. return r24.length ? n6("div", { key: L8("actions-menu-button"), class: this.classes(D3.button, D3.actionsMenuButton), role: "button", id: t25, "aria-haspopup": "true", "aria-controls": i32 ? e23 : null, tabIndex: 0, bind: this, onclick: this._toggleActionsMenu, onkeydown: this._toggleActionsMenu, afterCreate: this._focusActionsMenuButtonNode, afterUpdate: this._focusActionsMenuButtonNode, "aria-label": s30, title: s30 }, n6("span", { "aria-hidden": "true", class: D3.iconActionsMenu })) : null;
  3055. }
  3056. renderMenuActions() {
  3057. const { actionsMenuId: e23, actionsMenuButtonId: t25, actionsMenuOpen: i32, dividedActions: o30 } = this, { menuActions: n34 } = o30;
  3058. return n34.length && i32 ? n6("ul", { id: e23, role: "menu", "aria-labelledby": t25, key: L8("actions"), class: D3.actions, bind: this, onkeyup: this._handleActionMenuKeyup, afterCreate: this._actionsMenuNodeUpdated, afterUpdate: this._actionsMenuNodeUpdated }, n34.toArray().map((e24) => this.renderAction({ action: e24, type: "menu-item" }))) : null;
  3059. }
  3060. renderInlineActions() {
  3061. const { inlineActions: e23 } = this.dividedActions;
  3062. return !!e23.length && e23.toArray().map((e24) => this.renderAction({ action: e24, type: "inline" }));
  3063. }
  3064. renderInlineActionsContainer() {
  3065. const { inlineActions: e23, menuActions: t25 } = this.dividedActions, i32 = !!e23.length, o30 = !!t25.length;
  3066. return i32 || o30 ? n6("div", { key: "inline-actions-container", "data-inline-actions": i32.toString(), "data-menu-actions": o30.toString(), class: D3.inlineActionsContainer }, this.renderInlineActions(), this.renderActionsMenuButton(), this.renderMenuActions()) : null;
  3067. }
  3068. renderNavigation() {
  3069. return this.featureNavigationVisible ? n6("section", { key: L8("navigation"), class: this.classes(D3.navigation) }, this.renderNavigationButtons()) : null;
  3070. }
  3071. renderFooter() {
  3072. const { featureNavigationVisible: e23, dividedActions: t25 } = this, { inlineActions: i32, menuActions: o30 } = t25, n34 = !!i32.length, s30 = !!o30.length, r24 = { [D3.footerHasPagination]: e23, [D3.footerHasActions]: n34, [D3.footerHasActionsMenu]: s30 };
  3073. return e23 || n34 ? n6("div", { key: L8("feature-buttons"), class: this.classes(D3.footer, r24) }, this.renderInlineActionsContainer(), this.renderNavigation()) : null;
  3074. }
  3075. renderFeatureMenuContainer() {
  3076. const { messages: e23 } = this, { featureViewModels: t25, isLoadingFeature: i32 } = this.viewModel, o30 = s4(e23.selectedFeatures, { total: t25.length });
  3077. return n6("section", { key: L8("menu"), class: D3.featureMenu }, n6("strong", { class: D3.featureMenuHeader }, o30), n6("nav", { bind: this, class: D3.featureMenuViewport, "data-node-ref": "_featureMenuViewportNode", afterCreate: v4 }, this.renderFeatureMenu(), n6("div", { class: D3.featureMenuObserver, bind: this, afterCreate: this._featureMenuIntersectionObserverCreated }), i32 ? n6("div", { class: D3.featureMenuLoader }, this.renderLoadingIcon()) : null));
  3078. }
  3079. renderPointer() {
  3080. return this.dockEnabled ? null : n6("div", { key: L8("pointer"), class: D3.pointer, role: "presentation" }, n6("div", { class: this.classes(D3.pointerDirection, D3.shadow) }));
  3081. }
  3082. renderMainContainer() {
  3083. const { dockEnabled: e23, currentAlignment: t25, currentDockPosition: i32, titleId: o30, contentId: n34, collapsible: s30, hasContent: r24, contentCollapsed: a34, visibleElements: l27 } = this, { title: u23 } = this.viewModel, c42 = t25 === "bottom-left" || t25 === "bottom-center" || t25 === "bottom-right" || i32 === "top-left" || i32 === "top-center" || i32 === "top-right", d20 = t25 === "top-left" || t25 === "top-center" || t25 === "top-right" || i32 === "bottom-left" || i32 === "bottom-center" || i32 === "bottom-right", p36 = { [D3.shadow]: e23, [D3.isCollapsible]: s30, [D3.isCollapsed]: a34 };
  3084. return n6("div", { class: this.classes(D3.main, D3.widget, p36), tabIndex: l27.closeButton ? null : -1, role: "dialog", "aria-labelledby": u23 ? o30 : "", "aria-describedby": r24 && !a34 ? n34 : "", bind: this, onkeyup: this._handleMainKeyup, afterCreate: this._mainContainerNodeUpdated, afterUpdate: this._mainContainerNodeUpdated }, c42 ? this.renderFooter() : null, c42 ? this.renderFeatureMenuContainer() : null, this.renderHeader(), this.renderContentContainer(), d20 ? this.renderFooter() : null, d20 ? this.renderFeatureMenuContainer() : null);
  3085. }
  3086. renderContent() {
  3087. const e23 = this.viewModel?.content;
  3088. return e23 ? typeof e23 == "string" ? n6("div", { key: e23, innerHTML: e23 }) : this.renderNodeContent(e23) : null;
  3089. }
  3090. renderActionText(e23) {
  3091. return n6("span", { key: "text", class: D3.actionText }, e23);
  3092. }
  3093. renderActionIcon(e23) {
  3094. const t25 = this._getActionClass(e23), i32 = this._getActionImage(e23), o30 = { [D3.iconLoading]: e23.active, [D3.rotating]: e23.active, [D3.icon]: !!t25, [D3.actionImage]: !e23.active && !!i32 };
  3095. return t25 && (o30[t25] = !e23.active), n6("span", { key: "icon", "aria-hidden": "true", class: this.classes(D3.icon, o30), styles: this._getIconStyles(i32) });
  3096. }
  3097. renderAction(e23) {
  3098. const { action: t25, type: i32 } = e23, o30 = this._getActionTitle(t25), n34 = { [D3.action]: t25.type !== "toggle", [D3.actionToggle]: t25.type === "toggle", [D3.actionToggleOn]: t25.type === "toggle" && t25.value, [D3.buttonDisabled]: t25.disabled }, s30 = [this.renderActionIcon(t25), this.renderActionText(o30)], r24 = i32 === "menu-item" ? n6("li", { key: t25.uid, role: "menuitem", tabIndex: 0, title: o30, "aria-label": o30, class: this.classes(D3.button, n34), onkeyup: this._handleActionMenuItemKeyup, bind: this, "data-action-uid": t25.uid, onclick: this._triggerAction, onkeydown: this._triggerAction }, s30) : n6("div", { key: t25.uid, role: "button", tabIndex: 0, title: o30, "aria-label": o30, class: this.classes(D3.button, n34), onkeyup: this._handleActionMenuItemKeyup, bind: this, "data-action-uid": t25.uid, onclick: this._triggerAction, onkeydown: this._triggerAction }, s30);
  3099. return t25.visible ? r24 : null;
  3100. }
  3101. renderFeatureMenuItem(e23, t25) {
  3102. const { messages: i32, messagesCommon: o30 } = this, { selectedFeatureIndex: n34, selectedFeatureViewModel: s30 } = this.viewModel, r24 = e23 === s30, a34 = { [D3.featureMenuSelected]: r24 }, l27 = r24 ? n6("span", { key: L8(`feature-menu-selected-feature-${n34}`), title: i32.selectedFeature, "aria-label": i32.selectedFeature, class: D3.iconCheckMark }) : null, u23 = n6("span", { innerHTML: e23.title || o30.untitled });
  3103. return n6("li", { role: "menuitem", tabIndex: -1, key: L8(`feature-menu-feature-${n34}`), class: this.classes(a34, D3.featureMenuItem), bind: this, "data-feature-index": t25, onblur: this._removeActiveFeature, onfocus: this._setActiveFeature, onkeyup: this._handleFeatureMenuItemKeyup, onclick: this._selectFeature, onkeydown: this._selectFeature, onmouseover: this._setActiveFeature, onmouseleave: this._removeActiveFeature }, n6("span", { class: D3.featureMenuTitle }, u23, l27));
  3104. }
  3105. renderFeatureMenu() {
  3106. const { featureMenuId: e23 } = this, { featureViewModels: t25 } = this.viewModel;
  3107. return t25.length > 1 ? n6("ol", { class: D3.featureMenuList, id: e23, bind: this, afterCreate: this._featureMenuNodeUpdated, afterUpdate: this._featureMenuNodeUpdated, onkeyup: this._handleFeatureMenuKeyup, role: "menu" }, t25.filter((e24) => !!e24.graphic).map((e24, t26) => this.renderFeatureMenuItem(e24, t26))) : null;
  3108. }
  3109. _getActionTitle(e23) {
  3110. const { messages: t25, selectedFeature: i32, messagesCommon: o30 } = this, { id: n34 } = e23, s30 = i32?.attributes, r24 = n34 === "zoom-to-feature" ? s4(e23.title, { messages: t25 }) : n34 === "remove-selected-feature" ? s4(e23.title, { messages: o30 }) : n34 === "zoom-to-clustered-features" || n34 === "browse-clustered-features" ? s4(e23.title, { messages: t25 }) : e23.title;
  3111. return r24 && s30 ? s4(r24, s30) : r24;
  3112. }
  3113. _getActionClass(e23) {
  3114. const { selectedFeature: t25 } = this, i32 = t25?.attributes, { className: o30, image: n34 } = e23, s30 = n34 || o30 ? o30 : D3.iconDefaultAction;
  3115. return s30 && i32 ? s4(s30, i32) : s30;
  3116. }
  3117. _getActionImage(e23) {
  3118. const { selectedFeature: t25 } = this, i32 = t25?.attributes, { image: o30 } = e23;
  3119. return o30 && i32 ? s4(o30, i32) : o30;
  3120. }
  3121. _createFeatureUpdatedAnimation() {
  3122. return w2("enter", D3.hasFeatureUpdated);
  3123. }
  3124. _getInlineActionCount() {
  3125. const { maxInlineActions: e23, featureNavigationVisible: t25 } = this;
  3126. if (typeof e23 != "number")
  3127. return null;
  3128. const i32 = Math.round(e23);
  3129. return Math.max(t25 ? i32 - 1 : i32, 0);
  3130. }
  3131. _watchActions() {
  3132. const { allActions: e23 } = this.viewModel;
  3133. this.notifyChange("dividedActions");
  3134. const t25 = "actions";
  3135. this._handles.remove(t25), e23 && e23.forEach((e24) => {
  3136. this._handles.add(l4(() => [e24.uid, e24.active, e24.className, e24.disabled, e24.id, e24.title, e24.image, e24.visible], () => this.scheduleRender()), t25);
  3137. });
  3138. }
  3139. _divideActions() {
  3140. const { allActions: e23 } = this.viewModel, i32 = e23.filter((e24) => e24.visible), o30 = this._getInlineActionCount(), n34 = o30 === null, s30 = o30 === 0;
  3141. return { inlineActions: n34 ? i32.slice(0) : s30 ? new j3() : i32.slice(0, o30), menuActions: n34 ? new j3() : s30 ? i32.slice(0) : i32.slice(o30) };
  3142. }
  3143. _featureMenuOpenChanged(e23) {
  3144. e23 ? this._focusFirstFeature = true : this._focusFeatureMenuButton = true;
  3145. }
  3146. _actionsMenuOpenChanged(e23) {
  3147. e23 ? this._focusFirstAction = true : this._focusActionsMenuButton = true;
  3148. }
  3149. _setTitleFromFeatureWidget() {
  3150. const { selectedFeatureWidget: e23, messagesCommon: t25 } = this;
  3151. e23 && (this.viewModel.title = e23.viewModel?.state === "error" ? t25.errorMessage : e23.viewModel?.title || "");
  3152. }
  3153. _setContentFromFeatureWidget() {
  3154. const { selectedFeatureWidget: e23 } = this;
  3155. e23 && (this.viewModel.content = e23);
  3156. }
  3157. _unobserveFeatureMenuObserver() {
  3158. this._featureMenuIntersectionObserverNode && this._featureMenuIntersectionObserver.unobserve(this._featureMenuIntersectionObserverNode);
  3159. }
  3160. _featureMenuIntersectionObserverCreated(e23) {
  3161. this._unobserveFeatureMenuObserver(), this._featureMenuIntersectionObserver.observe(e23), this._featureMenuIntersectionObserverNode = e23;
  3162. }
  3163. _handleFeatureMenuKeyup(e23) {
  3164. i(e23) === "Escape" && (e23.stopPropagation(), this._focusFeatureMenuButton = true, this.featureMenuOpen = false, this.scheduleRender());
  3165. }
  3166. _handleActionMenuKeyup(e23) {
  3167. i(e23) === "Escape" && (e23.stopPropagation(), this._focusActionsMenuButton = true, this.actionsMenuOpen = false, this.scheduleRender());
  3168. }
  3169. _setActiveFeature(e23) {
  3170. const { viewModel: t25 } = this, i32 = e23.currentTarget["data-feature-index"];
  3171. t25.activeFeature = t25.features[i32] || null;
  3172. }
  3173. _removeActiveFeature() {
  3174. this.viewModel.activeFeature = null;
  3175. }
  3176. _handleFeatureMenuItemKeyup(e23) {
  3177. const t25 = i(e23), { _featureMenuNode: o30 } = this, n34 = e23.currentTarget["data-feature-index"];
  3178. if (!o30)
  3179. return;
  3180. const s30 = o30.querySelectorAll("li"), r24 = s30.length;
  3181. if (t25 !== "ArrowUp")
  3182. if (t25 !== "ArrowDown")
  3183. if (t25 !== "Home")
  3184. if (t25 !== "End")
  3185. ;
  3186. else {
  3187. e23.stopPropagation();
  3188. s30[s30.length - 1].focus();
  3189. }
  3190. else {
  3191. e23.stopPropagation();
  3192. s30[0].focus();
  3193. }
  3194. else {
  3195. e23.stopPropagation();
  3196. s30[(n34 + 1 + r24) % r24].focus();
  3197. }
  3198. else {
  3199. e23.stopPropagation();
  3200. s30[(n34 - 1 + r24) % r24].focus();
  3201. }
  3202. }
  3203. _handleActionMenuItemKeyup(e23) {
  3204. const t25 = i(e23), { _actionsMenuNode: o30 } = this, n34 = e23.currentTarget.dataset.actionUid, { menuActions: s30 } = this.dividedActions, r24 = s30.findIndex((e24) => e24.uid === n34);
  3205. if (!o30)
  3206. return;
  3207. const a34 = o30.querySelectorAll("li"), l27 = a34.length;
  3208. if (t25 !== "ArrowUp")
  3209. if (t25 !== "ArrowDown")
  3210. if (t25 !== "Home")
  3211. if (t25 !== "End")
  3212. ;
  3213. else {
  3214. e23.stopPropagation();
  3215. a34[a34.length - 1].focus();
  3216. }
  3217. else {
  3218. e23.stopPropagation();
  3219. a34[0].focus();
  3220. }
  3221. else {
  3222. e23.stopPropagation();
  3223. a34[(r24 + 1 + l27) % l27].focus();
  3224. }
  3225. else {
  3226. e23.stopPropagation();
  3227. a34[(r24 - 1 + l27) % l27].focus();
  3228. }
  3229. }
  3230. _handleMainKeyup(e23) {
  3231. const t25 = i(e23);
  3232. t25 === "ArrowLeft" && (e23.stopPropagation(), this.previous()), t25 === "ArrowRight" && (e23.stopPropagation(), this.next());
  3233. }
  3234. _spinnerEnabledChange(e23) {
  3235. if (this._destroySpinner(), !e23)
  3236. return;
  3237. const t25 = this.get("viewModel.view");
  3238. this._createSpinner(t25);
  3239. }
  3240. _hideSpinner() {
  3241. const { _spinner: e23 } = this;
  3242. e23 && (e23.location = null, e23.hide());
  3243. }
  3244. _displaySpinner() {
  3245. const { _spinner: e23 } = this;
  3246. if (!e23)
  3247. return;
  3248. const { location: t25, waitingForResult: i32 } = this.viewModel;
  3249. i32 ? e23.show({ location: t25 }) : e23.hide();
  3250. }
  3251. _getIconStyles(e23) {
  3252. return { "background-image": e23 ? `url(${e23})` : "" };
  3253. }
  3254. async _shouldFocus(e23) {
  3255. e23.shouldFocus && (await j4(() => this.viewModel?.active === true), this.focus());
  3256. }
  3257. _addSelectedFeatureIndexHandle() {
  3258. const e23 = l4(() => this.viewModel?.selectedFeatureIndex, (e24, t25) => this._selectedFeatureIndexUpdated(e24, t25));
  3259. this._handles.add(e23, N4);
  3260. }
  3261. _selectedFeatureIndexUpdated(e23, t25) {
  3262. const { featureCount: i32 } = this;
  3263. i32 && e23 !== t25 && e23 !== -1 && (this.actionsMenuOpen = false, this.featureMenuOpen = false);
  3264. }
  3265. _destroySelectedFeatureWidget() {
  3266. const { _feature: e23 } = this;
  3267. e23 && (e23.viewModel = null, e23 && !e23.destroyed && e23.destroy()), this._feature = null;
  3268. }
  3269. _isScreenLocationWithinView(e23, t25) {
  3270. return e23.x > -1 && e23.y > -1 && e23.x <= t25.width && e23.y <= t25.height;
  3271. }
  3272. _isOutsideView(e23) {
  3273. const { popupHeight: t25, popupWidth: i32, screenLocation: o30, side: n34, view: s30 } = e23;
  3274. if (isNaN(i32) || isNaN(t25) || !s30 || !o30)
  3275. return false;
  3276. const r24 = s30.padding;
  3277. return n34 === "right" && o30.x + i32 / 2 > s30.width - r24.right || (n34 === "left" && o30.x - i32 / 2 < r24.left || (n34 === "top" && o30.y - t25 < r24.top || n34 === "bottom" && o30.y + t25 > s30.height - r24.bottom));
  3278. }
  3279. _calculateAutoAlignment(e23) {
  3280. if (e23 !== "auto")
  3281. return e23;
  3282. const { _pointerOffsetInPx: t25, _containerNode: i32, _mainContainerNode: o30, viewModel: n34 } = this, { screenLocation: r24, view: a34 } = n34;
  3283. if (t(r24) || !a34 || !i32)
  3284. return "top-center";
  3285. if (!this._isScreenLocationWithinView(r24, a34))
  3286. return this._get("currentAlignment") || "top-center";
  3287. function l27(e24) {
  3288. return parseInt(e24.replace(/[^-\d\.]/g, ""), 10);
  3289. }
  3290. const u23 = o30 ? window.getComputedStyle(o30, null) : null, c42 = u23 ? l27(u23.getPropertyValue("max-height")) : 0, d20 = u23 ? l27(u23.getPropertyValue("height")) : 0, { height: p36, width: h19 } = i32.getBoundingClientRect(), g20 = h19 + t25, _9 = Math.max(p36, c42, d20) + t25, f14 = this._isOutsideView({ popupHeight: _9, popupWidth: g20, screenLocation: r24, side: "right", view: a34 }), v15 = this._isOutsideView({ popupHeight: _9, popupWidth: g20, screenLocation: r24, side: "left", view: a34 }), m29 = this._isOutsideView({ popupHeight: _9, popupWidth: g20, screenLocation: r24, side: "top", view: a34 }), b10 = this._isOutsideView({ popupHeight: _9, popupWidth: g20, screenLocation: r24, side: "bottom", view: a34 });
  3291. return v15 ? m29 ? "bottom-right" : "top-right" : f14 ? m29 ? "bottom-left" : "top-left" : m29 ? b10 ? "top-center" : "bottom-center" : "top-center";
  3292. }
  3293. _callCurrentAlignment(e23) {
  3294. return typeof e23 == "function" ? e23.call(this) : e23;
  3295. }
  3296. _getCurrentAlignment() {
  3297. const { alignment: e23, dockEnabled: t25 } = this;
  3298. return t25 || !this.viewModel.active ? null : this._calculatePositionResult(this._calculateAutoAlignment(this._callCurrentAlignment(e23)));
  3299. }
  3300. _setCurrentAlignment() {
  3301. this._set("currentAlignment", this._getCurrentAlignment());
  3302. }
  3303. _setCurrentDockPosition() {
  3304. this._set("currentDockPosition", this._getCurrentDockPosition());
  3305. }
  3306. _calculatePositionResult(e23) {
  3307. const t25 = ["left", "right"];
  3308. return f3(this.container) && t25.reverse(), e23.replace(/leading/gi, t25[0]).replace(/trailing/gi, t25[1]);
  3309. }
  3310. _callDockPosition(e23) {
  3311. return typeof e23 == "function" ? e23.call(this) : e23;
  3312. }
  3313. _getDockPosition() {
  3314. return this._calculatePositionResult(this._calculateAutoDockPosition(this._callDockPosition(this.dockOptions?.position)));
  3315. }
  3316. _getCurrentDockPosition() {
  3317. return this.dockEnabled && this.viewModel.active ? this._getDockPosition() : null;
  3318. }
  3319. _wouldDockTo() {
  3320. return this.dockEnabled ? null : this._getDockPosition();
  3321. }
  3322. _calculateAutoDockPosition(e23) {
  3323. if (e23 !== "auto")
  3324. return e23;
  3325. const t25 = this.viewModel?.view, i32 = f3(this.container) ? "top-left" : "top-right";
  3326. if (!t25)
  3327. return i32;
  3328. const o30 = t25.padding || { left: 0, right: 0, top: 0, bottom: 0 }, n34 = t25.width - o30.left - o30.right, { breakpoints: s30 } = t25;
  3329. return s30 && n34 <= s30.xsmall ? "bottom-center" : i32;
  3330. }
  3331. _positionContainer(e23 = this._containerNode) {
  3332. if (e23 && (this._containerNode = e23), !e23)
  3333. return;
  3334. const { screenLocation: t25 } = this.viewModel, { width: i32 } = e23.getBoundingClientRect(), o30 = this._calculatePositionStyle(t25, i32);
  3335. o30 && (e23.style.top = o30.top, e23.style.left = o30.left, e23.style.bottom = o30.bottom, e23.style.right = o30.right);
  3336. }
  3337. _calculateFullWidth(e23) {
  3338. const { currentAlignment: t25, _pointerOffsetInPx: i32 } = this;
  3339. return t25 === "top-left" || t25 === "bottom-left" || t25 === "top-right" || t25 === "bottom-right" ? e23 + i32 : e23;
  3340. }
  3341. _calculateAlignmentPosition(e23, t25, i32, o30) {
  3342. const { currentAlignment: n34, _pointerOffsetInPx: s30 } = this, r24 = o30 / 2, a34 = i32.height - t25, l27 = i32.width - e23, { padding: u23 } = this.view;
  3343. return n34 === "bottom-center" ? { top: t25 + s30 - u23.top, left: e23 - r24 - u23.left } : n34 === "top-left" ? { bottom: a34 + s30 - u23.bottom, right: l27 + s30 - u23.right } : n34 === "bottom-left" ? { top: t25 + s30 - u23.top, right: l27 + s30 - u23.right } : n34 === "top-right" ? { bottom: a34 + s30 - u23.bottom, left: e23 + s30 - u23.left } : n34 === "bottom-right" ? { top: t25 + s30 - u23.top, left: e23 + s30 - u23.left } : n34 === "top-center" ? { bottom: a34 + s30 - u23.bottom, left: e23 - r24 - u23.left } : void 0;
  3344. }
  3345. _calculatePositionStyle(e23, t25) {
  3346. const { dockEnabled: i32, view: o30 } = this;
  3347. if (!o30)
  3348. return;
  3349. if (i32)
  3350. return { left: "", top: "", right: "", bottom: "" };
  3351. if (t(e23) || !t25)
  3352. return;
  3353. const n34 = this._calculateFullWidth(t25), r24 = this._calculateAlignmentPosition(e23.x, e23.y, o30, n34);
  3354. return r24 ? { top: r24.top !== void 0 ? `${r24.top}px` : "auto", left: r24.left !== void 0 ? `${r24.left}px` : "auto", bottom: r24.bottom !== void 0 ? `${r24.bottom}px` : "auto", right: r24.right !== void 0 ? `${r24.right}px` : "auto" } : void 0;
  3355. }
  3356. _viewChange(e23, t25) {
  3357. e23 && t25 && (this.close(), this.clear());
  3358. }
  3359. _viewReadyChange(e23, t25) {
  3360. if (e23) {
  3361. const e24 = this.get("viewModel.view");
  3362. this._wireUpView(e24);
  3363. } else
  3364. t25 && (this.close(), this.clear());
  3365. }
  3366. _wireUpView(e23) {
  3367. if (this._destroySpinner(), !e23)
  3368. return;
  3369. const { spinnerEnabled: t25 } = this;
  3370. t25 && this._createSpinner(e23), this._setDockEnabledForViewSize(this.dockOptions);
  3371. }
  3372. _dockingThresholdCrossed(e23, t25, i32) {
  3373. const [o30, n34] = e23, [s30, r24] = t25, { width: a34, height: l27 } = i32;
  3374. return o30 <= a34 && s30 > a34 || o30 > a34 && s30 <= a34 || n34 <= l27 && r24 > l27 || n34 > l27 && r24 <= l27;
  3375. }
  3376. _updateDockEnabledForViewSize(e23, t25) {
  3377. if (!e23 || !t25)
  3378. return;
  3379. const i32 = this.get("viewModel.view.padding") || { left: 0, right: 0, top: 0, bottom: 0 }, o30 = i32.left + i32.right, n34 = i32.top + i32.bottom, s30 = [], r24 = [];
  3380. s30[0] = e23[0] - o30, s30[1] = e23[1] - n34, r24[0] = t25[0] - o30, r24[1] = t25[1] - n34;
  3381. const { dockOptions: a34 } = this, l27 = a34.breakpoint;
  3382. this._dockingThresholdCrossed(s30, r24, l27) && this._setDockEnabledForViewSize(a34), this._setCurrentDockPosition();
  3383. }
  3384. _focusDockButtonNode(e23) {
  3385. this._focusDockButton && (this._focusDockButton = false, e23.focus());
  3386. }
  3387. _closeButtonNodeUpdated(e23) {
  3388. return this._focusClose ? (this._focusClose = false, void e23.focus()) : this._blurClose ? (this._blurClose = false, void e23.blur()) : void 0;
  3389. }
  3390. _mainContainerNodeUpdated(e23) {
  3391. return this._mainContainerNode = e23, this._focusContainer ? (this._focusContainer = false, void e23.focus()) : this._blurContainer ? (this._blurContainer = false, void e23.blur()) : void 0;
  3392. }
  3393. _featureMenuNodeUpdated(e23) {
  3394. if (this._featureMenuNode = e23, !e23 || !this._focusFirstFeature)
  3395. return;
  3396. this._focusFirstFeature = false;
  3397. const t25 = e23.querySelectorAll("li");
  3398. if (t25.length) {
  3399. t25[0].focus();
  3400. }
  3401. }
  3402. _actionsMenuNodeUpdated(e23) {
  3403. if (this._actionsMenuNode = e23, !e23 || !this._focusFirstAction)
  3404. return;
  3405. this._focusFirstAction = false;
  3406. const t25 = e23.querySelectorAll("li");
  3407. if (t25.length) {
  3408. t25[0].focus();
  3409. }
  3410. }
  3411. _focusFeatureMenuButtonNode(e23) {
  3412. this._focusFeatureMenuButton && (this._focusFeatureMenuButton = false, e23.focus());
  3413. }
  3414. _focusActionsMenuButtonNode(e23) {
  3415. this._focusActionsMenuButton && (this._focusActionsMenuButton = false, e23.focus());
  3416. }
  3417. _featureMenuViewportScrollTop() {
  3418. this._featureMenuViewportNode && (this._featureMenuViewportNode.scrollTop = 0);
  3419. }
  3420. _toggleScreenLocationEnabled() {
  3421. const { dockEnabled: e23, viewModel: t25 } = this;
  3422. if (!t25)
  3423. return;
  3424. const i32 = t25.active && !e23;
  3425. t25.screenLocationEnabled = i32;
  3426. }
  3427. _shouldDockAtCurrentViewSize(e23) {
  3428. const t25 = e23.breakpoint, i32 = this.viewModel?.view?.ui;
  3429. if (!i32)
  3430. return false;
  3431. const { width: o30, height: n34 } = i32;
  3432. if (isNaN(o30) || isNaN(n34))
  3433. return false;
  3434. const s30 = t25.hasOwnProperty("width") && o30 <= t25.width, r24 = t25.hasOwnProperty("height") && n34 <= t25.height;
  3435. return s30 || r24;
  3436. }
  3437. _setDockEnabledForViewSize(e23) {
  3438. e23.breakpoint && (this.dockEnabled = this._shouldDockAtCurrentViewSize(e23));
  3439. }
  3440. _getPageText(e23, t25) {
  3441. return this.featureNavigationVisible ? s4(this.messages.pageText, { index: t25 + 1, total: e23 }) : null;
  3442. }
  3443. _destroySpinner() {
  3444. const { _spinner: e23, view: t25 } = this;
  3445. e23 && (t25 && t25.ui && t25.ui.remove(this._spinner, B6), e23.destroy(), this._spinner = null);
  3446. }
  3447. _createSpinner(e23) {
  3448. e23 && (this._spinner = new m18({ view: e23 }), e23.ui.add(this._spinner, { key: B6, position: "manual" }));
  3449. }
  3450. _toggleCollapsed() {
  3451. this.collapsed = !this.collapsed;
  3452. }
  3453. _close() {
  3454. this.close(), this.view && this.view.focus();
  3455. }
  3456. _toggleDockEnabled() {
  3457. this.dockEnabled = !this.dockEnabled, this._focusDockButton = true, this.scheduleRender();
  3458. }
  3459. _toggleFeatureMenu() {
  3460. const e23 = !this.featureMenuOpen;
  3461. this._featureMenuOpenChanged(e23), this.actionsMenuOpen = false, this.featureMenuOpen = e23;
  3462. }
  3463. _toggleActionsMenu() {
  3464. const e23 = !this.actionsMenuOpen;
  3465. this._actionsMenuOpenChanged(e23), this.featureMenuOpen = false, this.actionsMenuOpen = e23;
  3466. }
  3467. _triggerAction(e23) {
  3468. const t25 = e23.currentTarget.dataset.actionUid, { allActions: i32 } = this.viewModel, o30 = i32.findIndex((e24) => e24.uid === t25), n34 = i32.getItemAt(o30);
  3469. n34 && n34.type === "toggle" && (n34.value = !n34.value), this.actionsMenuOpen = false, this.viewModel.triggerAction(o30);
  3470. }
  3471. _selectFeature(e23) {
  3472. const t25 = e23.currentTarget["data-feature-index"];
  3473. isNaN(t25) || (this.viewModel.selectedFeatureIndex = t25), this.featureMenuOpen = false, this._focusFeatureMenuButton = true, this.scheduleRender();
  3474. }
  3475. _next() {
  3476. this.next();
  3477. }
  3478. _previous() {
  3479. this.previous();
  3480. }
  3481. };
  3482. e([d({ readOnly: true })], R6.prototype, "actionsMenuId", null), e([d({ readOnly: true })], R6.prototype, "actionsMenuButtonId", null), e([d({ readOnly: true })], R6.prototype, "featureMenuId", null), e([d({ readOnly: true })], R6.prototype, "titleId", null), e([d({ readOnly: true })], R6.prototype, "contentId", null), e([d({ readOnly: true })], R6.prototype, "hasContent", null), e([d({ readOnly: true })], R6.prototype, "featureNavigationVisible", null), e([d({ readOnly: true })], R6.prototype, "collapsible", null), e([d({ readOnly: true })], R6.prototype, "featureMenuVisible", null), e([d({ readOnly: true })], R6.prototype, "contentCollapsed", null), e([d({ readOnly: true })], R6.prototype, "dividedActions", null), e([o9("viewModel.actions")], R6.prototype, "actions", void 0), e([d()], R6.prototype, "actionsMenuOpen", null), e([d()], R6.prototype, "alignment", void 0), e([o9("viewModel.autoCloseEnabled")], R6.prototype, "autoCloseEnabled", void 0), e([o9("viewModel.autoOpenEnabled")], R6.prototype, "autoOpenEnabled", void 0), e([o9("viewModel.defaultPopupTemplateEnabled")], R6.prototype, "defaultPopupTemplateEnabled", void 0), e([o9("viewModel.content")], R6.prototype, "content", void 0), e([d()], R6.prototype, "collapsed", void 0), e([d()], R6.prototype, "collapseEnabled", void 0), e([d({ readOnly: true })], R6.prototype, "currentAlignment", null), e([d({ readOnly: true })], R6.prototype, "currentDockPosition", null), e([d()], R6.prototype, "dockOptions", null), e([d()], R6.prototype, "dockEnabled", void 0), e([o9("viewModel.featureCount")], R6.prototype, "featureCount", void 0), e([d()], R6.prototype, "featureMenuOpen", void 0), e([o9("viewModel.features")], R6.prototype, "features", void 0), e([o9("viewModel.goToOverride")], R6.prototype, "goToOverride", void 0), e([d()], R6.prototype, "headingLevel", void 0), e([o9("viewModel.highlightEnabled")], R6.prototype, "highlightEnabled", void 0), e([o9("viewModel.location")], R6.prototype, "location", void 0), e([d({ aliasOf: { source: "messages.widgetLabel", overridable: true } })], R6.prototype, "label", void 0), e([d()], R6.prototype, "maxInlineActions", void 0), e([d(), e4("esri/widgets/Popup/t9n/Popup")], R6.prototype, "messages", void 0), e([d(), e4("esri/t9n/common")], R6.prototype, "messagesCommon", void 0), e([o9("viewModel.promises")], R6.prototype, "promises", void 0), e([o9("viewModel.selectedFeature")], R6.prototype, "selectedFeature", void 0), e([o9("viewModel.selectedFeatureIndex")], R6.prototype, "selectedFeatureIndex", void 0), e([d({ readOnly: true })], R6.prototype, "selectedFeatureWidget", null), e([d()], R6.prototype, "spinnerEnabled", void 0), e([o9("viewModel.title")], R6.prototype, "title", void 0), e([o9("viewModel.updateLocationEnabled")], R6.prototype, "updateLocationEnabled", void 0), e([o9("viewModel.view")], R6.prototype, "view", void 0), e([d({ type: U5 }), t8(["triggerAction", "trigger-action"])], R6.prototype, "viewModel", void 0), e([o9("viewModel.visible")], R6.prototype, "visible", void 0), e([d()], R6.prototype, "visibleElements", void 0), e([s3("visibleElements")], R6.prototype, "castVisibleElements", null), e([t7()], R6.prototype, "_close", null), e([t7()], R6.prototype, "_toggleDockEnabled", null), e([t7()], R6.prototype, "_toggleFeatureMenu", null), e([t7()], R6.prototype, "_toggleActionsMenu", null), e([t7()], R6.prototype, "_triggerAction", null), e([t7()], R6.prototype, "_selectFeature", null), e([t7()], R6.prototype, "_next", null), e([t7()], R6.prototype, "_previous", null), R6 = e([n3(S7)], R6);
  3483. var j10 = R6;
  3484. // node_modules/@arcgis/core/views/DOMContainer.js
  3485. var l18 = [0, 0];
  3486. function p15(e23) {
  3487. const t25 = (e23.ownerDocument || window.document).defaultView, s30 = e23.getBoundingClientRect();
  3488. return l18[0] = s30.left + t25.pageXOffset, l18[1] = s30.top + t25.pageYOffset, l18;
  3489. }
  3490. function c26(e23) {
  3491. e23 && (t6(e23), e23.parentNode && e23.parentNode.removeChild(e23));
  3492. }
  3493. function m20(e23) {
  3494. const t25 = document.createElement("div");
  3495. return e23.appendChild(t25), t25;
  3496. }
  3497. var f10 = 16;
  3498. var y11 = 750;
  3499. var v11 = 512;
  3500. var _5 = 2;
  3501. var g12 = (i32) => {
  3502. let l27 = class extends i32 {
  3503. constructor(...e23) {
  3504. super(...e23), this._freqInfo = { freq: f10, time: y11 }, this._overlayRenderTaskHandle = null, this.height = 0, this.position = null, this.resizing = false, this.root = null, this.surface = null, this.suspended = true, this.ui = null, this.userContent = null, this.width = 0, this.widthBreakpoint = null, this.handles.add([l4(() => this.cursor, (e24) => {
  3505. const { surface: t25 } = this;
  3506. t25 && t25.setAttribute("data-cursor", e24);
  3507. }), l4(() => this.interacting, (e24) => {
  3508. const { surface: t25 } = this;
  3509. t25 && t25.setAttribute("data-interacting", e24.toString());
  3510. })]);
  3511. }
  3512. initialize() {
  3513. this.handles.add(l4(() => this.ui, (e23, t25) => this._handleUIChange(e23, t25))), this._wireUI(this.ui), this.handles.add([this.on("focus", () => this.notifyChange("focused")), this.on("blur", () => this.notifyChange("focused"))]);
  3514. }
  3515. destroy() {
  3516. this.destroyed || (this.ui && (this.ui.destroy(), this.ui = null), this.popup && !this.popup.destroyed && this.popup.destroy(), this.container = null);
  3517. }
  3518. set container(e23) {
  3519. const s30 = this._get("container");
  3520. if (s30 === e23)
  3521. return;
  3522. const i33 = "dom-size";
  3523. if (this.handles.remove(i33), this._stopMeasuring(), s30 && (s30.classList.remove("esri-view"), this._overlayRenderTaskHandle && (this._overlayRenderTaskHandle.remove(), this._overlayRenderTaskHandle = null), this.overlay.destroy(), this._set("overlay", null), c26(this.root), this._set("root", null), r5(this.userContent, s30), c26(this.userContent), this._set("userContent", null)), e23) {
  3524. e23.classList.add("esri-view");
  3525. const s31 = document.createElement("div");
  3526. s31.className = "esri-view-user-storage", r5(e23, s31), e23.appendChild(s31), this._set("userContent", s31);
  3527. const h19 = document.createElement("div");
  3528. h19.className = "esri-view-root", e23.insertBefore(h19, e23.firstChild), this._set("root", h19);
  3529. const a34 = document.createElement("div");
  3530. a34.className = "esri-view-surface", a34.setAttribute("role", "application"), a34.tabIndex = 0, h19.appendChild(a34), this._set("surface", a34);
  3531. const u23 = new n11();
  3532. h19.appendChild(u23.surface), this._set("overlay", u23), l4(() => u23.needsRender, (e24) => {
  3533. e24 && !this._overlayRenderTaskHandle ? this._overlayRenderTaskHandle = A({ render: () => {
  3534. this.overlay.render();
  3535. } }) : this._overlayRenderTaskHandle && (this._overlayRenderTaskHandle.remove(), this._overlayRenderTaskHandle = null);
  3536. }), this.forceDOMReadyCycle(), this.handles.add(l4(() => this.size, (e24) => {
  3537. const [t25, s32] = e24, i34 = "esri-view-surface--inset-outline";
  3538. t25 >= document.body.clientWidth || s32 >= document.body.clientHeight ? a34.classList.add(i34) : a34.classList.remove(i34);
  3539. }, h2), i33), this._set("container", e23), this._startMeasuring();
  3540. } else
  3541. this._set("width", 0), this._set("height", 0), this._set("position", null), this._set("suspended", true), this._set("surface", null), this._set("container", null);
  3542. }
  3543. get focused() {
  3544. const e23 = document.activeElement === this.surface;
  3545. return document.hasFocus() && e23;
  3546. }
  3547. get popup() {
  3548. return this._get("popup") || new j10({ view: this });
  3549. }
  3550. set popup(e23) {
  3551. const t25 = this._get("popup");
  3552. t25 && t25 !== e23 && t25.destroy(), this._set("popup", e23);
  3553. }
  3554. get size() {
  3555. return [this.width, this.height];
  3556. }
  3557. blur() {
  3558. this.surface && this.surface.blur();
  3559. }
  3560. focus() {
  3561. this.surface && this.surface.focus();
  3562. }
  3563. pageToContainer(e23, t25, s30) {
  3564. const i33 = this.position;
  3565. return e23 -= i33[0], t25 -= i33[1], s30 ? (s30[0] = e23, s30[1] = t25) : s30 = [e23, t25], s30;
  3566. }
  3567. containerToPage(e23, t25, s30) {
  3568. const i33 = this.position;
  3569. return e23 += i33[0], t25 += i33[1], s30 ? (s30[0] = e23, s30[1] = t25) : s30 = [e23, t25], s30;
  3570. }
  3571. _handleUIChange(e23, t25) {
  3572. t25 && (this.handles.remove("ui"), t25.destroy()), e23 && this._wireUI(e23), this._set("ui", e23);
  3573. }
  3574. _wireUI(e23) {
  3575. this.handles.remove("ui"), e23 && (e23.view = this, this.handles.add([l4(() => this.root, (t25) => {
  3576. e23.container = t25 ? m20(t25) : null;
  3577. }, h2), l4(() => this.popup, (t25, s30) => {
  3578. const i33 = "popup", o30 = "manual";
  3579. s30 && e23.remove(s30, i33), t25 && (t25.view = e23.view, e23.add(t25, { key: i33, position: o30 }));
  3580. }, h2)], "ui"));
  3581. }
  3582. _stopMeasuring() {
  3583. this.handles.remove("measuring"), this._get("resizing") && this._set("resizing", false);
  3584. }
  3585. _startMeasuring() {
  3586. const e23 = this._freqInfo;
  3587. e23.freq = f10, e23.time = y11, this.handles.add([(() => {
  3588. const t25 = () => {
  3589. e23.freq = f10, e23.time = y11;
  3590. };
  3591. return window.addEventListener("resize", t25), { remove() {
  3592. window.removeEventListener("resize", t25);
  3593. } };
  3594. })(), A({ prepare: (e24) => {
  3595. const t25 = this._measure(), s30 = this._freqInfo;
  3596. if (s30.time += e24.deltaTime, t25 && (s30.freq = f10, this._get("resizing") || this._set("resizing", true)), s30.time < s30.freq)
  3597. return;
  3598. s30.time = 0;
  3599. const i33 = this._position();
  3600. s30.freq = i33 || t25 ? f10 : Math.min(y11, s30.freq * _5), !t25 && s30.freq >= v11 && this._get("resizing") && this._set("resizing", false);
  3601. } })], "measuring"), this._measure(), this._position();
  3602. }
  3603. _measure() {
  3604. const e23 = this.container, t25 = e23 ? e23.clientWidth : 0, s30 = e23 ? e23.clientHeight : 0;
  3605. if (t25 === 0 || s30 === 0)
  3606. return this.suspended || this._set("suspended", true), false;
  3607. const i33 = this.width, o30 = this.height;
  3608. return t25 === i33 && s30 === o30 ? (this.suspended && this._set("suspended", false), false) : (this._set("width", t25), this._set("height", s30), this.suspended && this._set("suspended", false), this.emit("resize", { oldWidth: i33, oldHeight: o30, width: t25, height: s30 }), true);
  3609. }
  3610. _position() {
  3611. const e23 = this.container, t25 = this.position, s30 = p15(e23);
  3612. return (!t25 || s30[0] !== t25[0] || s30[1] !== t25[1]) && (this._set("position", [s30[0], s30[1]]), true);
  3613. }
  3614. forceDOMReadyCycle() {
  3615. }
  3616. };
  3617. return e([d({ value: null, cast: (e23) => e3(e23) })], l27.prototype, "container", null), e([d({ readOnly: true })], l27.prototype, "focused", null), e([d({ readOnly: true })], l27.prototype, "height", void 0), e([d({ type: j10 })], l27.prototype, "popup", null), e([d({ type: n11 })], l27.prototype, "overlay", void 0), e([d({ readOnly: true })], l27.prototype, "position", void 0), e([d({ readOnly: true })], l27.prototype, "resizing", void 0), e([d({ readOnly: true })], l27.prototype, "root", void 0), e([d({ value: null, readOnly: true })], l27.prototype, "size", null), e([d({ readOnly: true })], l27.prototype, "surface", void 0), e([d({ readOnly: true })], l27.prototype, "suspended", void 0), e([d()], l27.prototype, "ui", void 0), e([d({ readOnly: true })], l27.prototype, "userContent", void 0), e([d({ readOnly: true })], l27.prototype, "width", void 0), e([d()], l27.prototype, "widthBreakpoint", void 0), l27 = e([n3("esri.views.DOMContainer")], l27), l27;
  3618. };
  3619. // node_modules/@arcgis/core/views/PopupView.js
  3620. var p16 = (p36) => {
  3621. let a34 = class extends p36 {
  3622. async fetchPopupFeatures(e23, r24) {
  3623. await this.when();
  3624. const { location: i32, queryArea: p37, layerViewsAndGraphics: a35, clientOnlyGraphics: t25 } = await this._prepareFetchPopupFeatures(e23, r24), o30 = Promise.resolve(t25), c42 = this._queryLayerPopupFeatures(p37, a35, r24), n34 = c42.map((e24) => e24.promise);
  3625. return { location: i32, clientOnlyGraphics: t25, allGraphicsPromise: C([o30, ...n34]).then((e24) => Array.from(new Set(e24.flat()))), promisesPerLayerView: c42 };
  3626. }
  3627. _queryLayerPopupFeatures(e23, s30, i32) {
  3628. return s30.map(({ layerView: s31, graphics: p37 }) => {
  3629. const a35 = { clientGraphics: p37, event: r(i32) ? i32.event : null, signal: r(i32) ? i32.signal : null, defaultPopupTemplateEnabled: !!r(i32) && !!i32.defaultPopupTemplateEnabled }, t25 = s31.fetchPopupFeatures(e23, a35);
  3630. return { layerView: s31, promise: t25 };
  3631. });
  3632. }
  3633. _isValidPopupGraphic(e23, s30) {
  3634. return e23 && !!e23.getEffectivePopupTemplate(r(s30) && s30.defaultPopupTemplateEnabled);
  3635. }
  3636. async _prepareFetchPopupFeatures(e23, r24) {
  3637. const { clientGraphics: s30, queryArea: i32, location: p37 } = await this._popupHitTestGraphics(e23, r24), a35 = this._getFetchPopupLayerViews(), { layerViewsAndGraphics: t25, clientOnlyGraphics: o30 } = this._graphicsPerFetchPopupLayerView(s30, a35);
  3638. return { clientOnlyGraphics: o30, layerViewsAndGraphics: t25, queryArea: i32, location: p37 };
  3639. }
  3640. async _popupHitTestGraphics(e23, r24) {
  3641. const { results: s30, mapPoint: i32 } = await this.popupHitTest(e23), p37 = s30.filter((e24) => e24.type === "graphic" && this._isValidPopupGraphic(e24.graphic, r24)), a35 = p37.length ? p37[0].mapPoint : null;
  3642. return { clientGraphics: p37.map((e24) => e24.graphic), queryArea: i32, location: i32 || a35 };
  3643. }
  3644. _getFetchPopupLayerViews() {
  3645. const e23 = [];
  3646. return this.allLayerViews.forEach((r24) => {
  3647. this._isValidPopupLayerView(r24) && e23.push(r24);
  3648. }), r(this.graphicsView) && this._isValidPopupLayerView(this.graphicsView) && e23.push(this.graphicsView), e23.reverse();
  3649. }
  3650. _isValidPopupLayerView(e23) {
  3651. return r(e23) && (!("layer" in e23) || !e23.suspended) && "fetchPopupFeatures" in e23;
  3652. }
  3653. _graphicsPerFetchPopupLayerView(e23, r24) {
  3654. const s30 = [], i32 = new Map(), p37 = r24.map((e24) => {
  3655. const r25 = [];
  3656. return "layer" in e24 ? i32.set(e24.layer, r25) : i32.set(e24.graphics, r25), { layerView: e24, graphics: r25 };
  3657. });
  3658. for (const a35 of e23) {
  3659. const e24 = i32.get(a35.layer) || i32.get(a35.sourceLayer) || null;
  3660. e24 ? e24.push(a35) : s30.push(a35);
  3661. }
  3662. return { layerViewsAndGraphics: p37, clientOnlyGraphics: s30 };
  3663. }
  3664. };
  3665. return a34 = e([n3("esri.views.PopupView")], a34), a34;
  3666. };
  3667. // node_modules/@arcgis/core/support/AnalysesCollection.js
  3668. var i14 = s.getLogger("esri.support.AnalysesCollection");
  3669. var n18 = class extends m9 {
  3670. constructor(e23) {
  3671. super(e23), this.handles.add(this.on("before-add", (e24) => {
  3672. t(e24.item) || e24.item.parent === this.owner && (i14.warn("Analysis inside the collection must be unique. Not adding this element again."), e24.preventDefault());
  3673. }));
  3674. }
  3675. _own(e23) {
  3676. e23.parent = this.owner;
  3677. }
  3678. _release(e23) {
  3679. e23.parent = null;
  3680. }
  3681. };
  3682. n18 = e([n3("esri.support.AnalysesCollection")], n18);
  3683. // node_modules/@arcgis/core/views/BasemapView.js
  3684. var p17 = class extends y {
  3685. constructor(e23) {
  3686. super(e23), this.view = null, this.baseLayerViews = new j3(), this.referenceLayerViews = new j3(), this._loadingHandle = l4(() => this.view?.map?.basemap, (e24) => {
  3687. e24 && e24.load().catch(() => {
  3688. });
  3689. }, h2);
  3690. }
  3691. destroy() {
  3692. this._set("view", null), this._loadingHandle && (this._loadingHandle.remove(), this._loadingHandle = null);
  3693. }
  3694. get suspended() {
  3695. return !this.view || this.view.suspended;
  3696. }
  3697. get updating() {
  3698. if (this.view && this.view.suspended)
  3699. return false;
  3700. const e23 = this.view?.map?.basemap;
  3701. return !!e23 && (!!e23.loaded && (this.baseLayerViews.some((e24) => e24.updating) || this.referenceLayerViews.some((e24) => e24.updating)));
  3702. }
  3703. };
  3704. e([d({ constructOnly: true })], p17.prototype, "view", void 0), e([d({ readOnly: true })], p17.prototype, "baseLayerViews", void 0), e([d({ readOnly: true })], p17.prototype, "referenceLayerViews", void 0), e([d({ readOnly: true })], p17.prototype, "suspended", null), e([d({ type: Boolean, readOnly: true })], p17.prototype, "updating", null), p17 = e([n3("esri.views.BasemapView")], p17);
  3705. // node_modules/@arcgis/core/views/LayerViewManager.js
  3706. var v12 = s.getLogger("esri.views.LayerViewManager");
  3707. var V3 = class {
  3708. constructor(e23, r24, i32) {
  3709. this.layer = e23, this.view = r24, this.layerViewImporter = i32, this._controller = new AbortController(), this._deferred = T(), this._started = false, this.done = false, v(this._controller.signal, () => {
  3710. const r25 = new s2("cancelled:layerview-create", "layerview creation cancelled", { layer: e23 });
  3711. this._deferred.reject(r25);
  3712. });
  3713. }
  3714. get promise() {
  3715. return this._deferred.promise;
  3716. }
  3717. destroy() {
  3718. this._controller.abort();
  3719. const { layerView: e23 } = this;
  3720. if (!e23)
  3721. return;
  3722. const { layer: r24, view: t25 } = this;
  3723. r24.emit("layerview-destroy", { view: t25, layerView: e23 }), t25.emit("layerview-destroy", { layer: r24, layerView: e23 }), this.done = true, this.layer = null, this.layerView = null, this.view = null, this.layerViewImporter = null;
  3724. }
  3725. async start() {
  3726. if (this._started)
  3727. return;
  3728. this._started = true;
  3729. const { _controller: { signal: e23 }, layer: r24, view: i32 } = this;
  3730. this._map = i32.map;
  3731. try {
  3732. let s30, o30;
  3733. if (await r24.load({ signal: e23 }), "prefetchResources" in r24 && await r24.prefetchResources({ signal: e23 }), r24.createLayerView)
  3734. s30 = await r24.createLayerView(i32, { signal: e23 });
  3735. else {
  3736. if (!this.layerViewImporter.hasLayerViewModule(r24))
  3737. throw new s2("layer:view-not-supported", "No layerview implementation was found");
  3738. const a34 = await this.layerViewImporter.importLayerView(r24);
  3739. f(e23), s30 = "default" in a34 ? new a34.default({ layer: r24, view: i32 }) : new a34({ layer: r24, view: i32 });
  3740. }
  3741. const l27 = () => {
  3742. o30 = a2(o30), s30.destroyed || s30.destroy(), s30.layer = null, s30.parent = null, s30.view = null, this.done = true;
  3743. };
  3744. o30 = v(e23, l27), f(e23);
  3745. try {
  3746. await s30.when();
  3747. } catch (a34) {
  3748. throw l27(), a34;
  3749. }
  3750. const y17 = this._map?.allLayers?.includes(r24);
  3751. if (!y17)
  3752. return l27(), void this._deferred.reject(new s2("view:no-layerview-for-layer", "The layer has been removed from the map", { layer: r24 }));
  3753. this.layerView = s30, r24.emit("layerview-create", { view: i32, layerView: s30 }), i32.emit("layerview-create", { layer: r24, layerView: s30 }), this.done = true, this._deferred.resolve(s30);
  3754. } catch (a34) {
  3755. r24.emit("layerview-create-error", { view: i32, error: a34 }), i32.emit("layerview-create-error", { layer: r24, error: a34 }), this.done = true, this._deferred.reject(new s2("layerview:create-error", "layerview creation failed", { layer: r24, error: a34 }));
  3756. }
  3757. }
  3758. };
  3759. var L9 = class extends d2 {
  3760. constructor(e23) {
  3761. super(e23), this._layerLayerViewInfoMap = new Map(), this._watchUpdatingTracking = new c3(), this.supportsGround = true, this._preloadLayerViewModules = () => {
  3762. const e24 = this.view.map?.allLayers;
  3763. if (e24)
  3764. for (const r24 of e24)
  3765. this.layerViewImporter.hasLayerViewModule(r24) && this.layerViewImporter.importLayerView(r24);
  3766. }, this._reschedule = () => (t(this._workPromise) && (this._workPromise = T()), this.handles.remove("reschedule"), this.handles.add(v2(this._doWork), "reschedule"), this._workPromise.promise), this._doWork = () => {
  3767. const e24 = this.view.map;
  3768. if (this._map !== e24 && (this.clear(), this._map = e24), t(this._workPromise))
  3769. return void this.notifyChange("updating");
  3770. this.handles.remove("reschedule"), this.handles.remove("collection-change");
  3771. const t25 = new p4({ getCollections: () => this._rootCollectionNames.map((e25) => this.get(e25)), getChildrenFunction: (e25) => e25 && "layers" in e25 ? e25.layers : null });
  3772. if (!t25)
  3773. return this._workPromise.resolve(), void (this._workPromise = null);
  3774. for (const r24 of t25)
  3775. this._createLayerView(r24);
  3776. this._refreshCollections();
  3777. for (const [r24, s30] of this._layerLayerViewInfoMap)
  3778. t25.includes(r24) || (this._layerLayerViewInfoMap.delete(s30.layer), s30.destroy());
  3779. const i32 = t25.filter((e25) => e25.type === "group").map((e25) => e25.layers), a34 = [e24?.ground?.layers, e24?.basemap?.baseLayers, e24?.basemap?.referenceLayers, e24?.layers, ...i32].filter((e25) => !!e25);
  3780. this.handles.add(a34.map((e25) => this._watchUpdatingTracking.addOnCollectionChange(() => e25, this._reschedule)), "collection-change"), this._workPromise.resolve(), this._workPromise = null;
  3781. };
  3782. }
  3783. initialize() {
  3784. this.handles.add([a3(() => this.view?.map?.allLayers, "change", this._preloadLayerViewModules, { onListenerAdd: this._preloadLayerViewModules }), l4(() => {
  3785. const e23 = this.view, r24 = e23?.map;
  3786. return [r24?.basemap, r24?.ground, r24?.layers, e23?.ready];
  3787. }, () => this._reschedule(), w)]), this._preloadLayerViewModules(), this._reschedule();
  3788. }
  3789. destroy() {
  3790. this.clear(), this._watchUpdatingTracking.destroy(), this._map = null;
  3791. }
  3792. get _layersToLayerViews() {
  3793. const e23 = [["view.map.basemap.baseLayers", "view.basemapView.baseLayerViews"], ["view.map.layers", "view.layerViews"], ["view.map.basemap.referenceLayers", "view.basemapView.referenceLayerViews"]];
  3794. return this.supportsGround && e23.push(["view.map.ground.layers", "view.groundView.layerViews"]), new Map(e23);
  3795. }
  3796. get _rootCollectionNames() {
  3797. return Array.from(this._layersToLayerViews.keys());
  3798. }
  3799. get updating() {
  3800. return r(this._workPromise) || this._watchUpdatingTracking.updating || n(this._layerLayerViewInfoMap, (e23) => !e23.done);
  3801. }
  3802. get updatingRemaining() {
  3803. let e23 = 0;
  3804. for (const r24 of this._layerLayerViewInfoMap.values())
  3805. r24.done || ++e23;
  3806. return e23;
  3807. }
  3808. clear() {
  3809. if (!this.destroyed) {
  3810. for (const e23 of this._layerLayerViewInfoMap.values())
  3811. e23.destroy();
  3812. this._layerLayerViewInfoMap.clear(), this._refreshCollections();
  3813. }
  3814. }
  3815. async whenLayerView(e23) {
  3816. if (await this._reschedule(), !this._layerLayerViewInfoMap.has(e23))
  3817. throw new s2("view:no-layerview-for-layer", "No layerview has been found for the layer", { layer: e23 });
  3818. return this._layerLayerViewInfoMap.get(e23).promise;
  3819. }
  3820. _refreshCollections() {
  3821. for (const [e23, r24] of this._layersToLayerViews)
  3822. this._populateLayerViewsOwners(this.get(e23), this.get(r24), this.view);
  3823. this.notifyChange("updating"), this.notifyChange("updatingRemaining");
  3824. }
  3825. _populateLayerViewsOwners(e23, r24, t25) {
  3826. if (!e23 || !r24)
  3827. return void (r24 && r24.removeAll());
  3828. let i32 = 0;
  3829. for (const a34 of e23) {
  3830. const e24 = this._layerLayerViewInfoMap.get(a34);
  3831. if (!e24 || !e24.layerView)
  3832. continue;
  3833. const s30 = e24.layerView;
  3834. s30.layer = a34, s30.parent = t25, r24.getItemAt(i32) !== s30 && r24.splice(i32, 0, s30), a34.layers && this._populateLayerViewsOwners(a34.layers, s30.layerViews, s30), i32 += 1;
  3835. }
  3836. i32 < r24.length && r24.splice(i32, r24.length);
  3837. }
  3838. _createLayerView(e23) {
  3839. if (this._layerLayerViewInfoMap.has(e23))
  3840. return this.view.ready && this._layerLayerViewInfoMap.get(e23).start(), this.notifyChange("updating"), void this.notifyChange("updatingRemaining");
  3841. e23.load().catch(() => {
  3842. }), this.layerViewImporter.hasLayerViewModule(e23) && this.layerViewImporter.importLayerView(e23);
  3843. const r24 = new V3(e23, this.view, this.layerViewImporter);
  3844. r24.promise.then(() => this._refreshCollections(), (r25) => {
  3845. r25 && (g(r25) || r25.name === "cancelled:layerview-create") || v12.error(`Failed to create layerview for layer title:'${e23.title ?? "no title"}', id:'${e23.id ?? "no id"}' of type '${e23.type}'.`, { layer: e23, error: r25 }), this._refreshCollections();
  3846. }), this._layerLayerViewInfoMap.set(e23, r24), this.view.ready && r24.start(), this.notifyChange("updating"), this.notifyChange("updatingRemaining");
  3847. }
  3848. };
  3849. e([d()], L9.prototype, "_workPromise", void 0), e([d({ readOnly: true })], L9.prototype, "_watchUpdatingTracking", void 0), e([d({ readOnly: true })], L9.prototype, "_layersToLayerViews", null), e([d({ readOnly: true })], L9.prototype, "_rootCollectionNames", null), e([d()], L9.prototype, "layerViewImporter", void 0), e([d()], L9.prototype, "supportsGround", void 0), e([d({ readOnly: true })], L9.prototype, "updating", null), e([d({ readOnly: true })], L9.prototype, "updatingRemaining", null), e([d({ constructOnly: true })], L9.prototype, "view", void 0), L9 = e([n3("esri.views.LayerViewManager")], L9);
  3850. var M8 = L9;
  3851. // node_modules/@arcgis/core/views/Magnifier.js
  3852. var i15 = class extends y {
  3853. constructor(o30) {
  3854. super(o30), this.factor = 1.5, this.offset = c2(0, 0), this.position = null, this.size = 120, this.maskUrl = null, this.maskEnabled = true, this.overlayUrl = null, this.overlayEnabled = true, this.visible = true;
  3855. }
  3856. get version() {
  3857. return this.commitProperty("factor"), this.commitProperty("offset"), this.commitProperty("position"), this.commitProperty("visible"), this.commitProperty("size"), this.commitProperty("maskUrl"), this.commitProperty("maskEnabled"), this.commitProperty("overlayUrl"), this.commitProperty("overlayEnabled"), (this._get("version") || 0) + 1;
  3858. }
  3859. };
  3860. e([d({ type: Number })], i15.prototype, "factor", void 0), e([d({ nonNullable: true })], i15.prototype, "offset", void 0), e([d()], i15.prototype, "position", void 0), e([d({ type: Number, range: { min: 0 } })], i15.prototype, "size", void 0), e([d()], i15.prototype, "maskUrl", void 0), e([d()], i15.prototype, "maskEnabled", void 0), e([d()], i15.prototype, "overlayUrl", void 0), e([d()], i15.prototype, "overlayEnabled", void 0), e([d({ readOnly: true })], i15.prototype, "version", null), e([d({ type: Boolean })], i15.prototype, "visible", void 0), i15 = e([n3("esri.views.Magnifier")], i15);
  3861. var p18 = i15;
  3862. // node_modules/@arcgis/core/views/3d/support/TextureCollection.js
  3863. var i16 = class extends y {
  3864. constructor(e23, t25) {
  3865. super({}), this._stage = e23, this._textureRequests = new Map(), this._frameTask = t25?.registerTask(L3.TEXTURE_UNLOAD) ?? Q;
  3866. }
  3867. normalizeCtorArgs() {
  3868. return {};
  3869. }
  3870. destroy() {
  3871. super.destroy(), this._frameTask.remove(), this._textureRequests.forEach((e23) => this._releaseTextureRequest(e23)), this._textureRequests.clear();
  3872. }
  3873. get updating() {
  3874. return this._frameTask.updating;
  3875. }
  3876. fromData(e23, t25, r24) {
  3877. const s30 = this.makeUid(e23);
  3878. let o30 = this._textureRequests.get(s30);
  3879. return o30 || (o30 = { referenceCount: 0, texture: t25(), textureAsync: null, abortController: null, onRemove: r24 }, this._stage && (this._stage.add(o30.texture), this._stage.loadImmediate(o30.texture)), this._textureRequests.set(s30, o30)), o30.referenceCount++, { uid: s30, texture: o30.texture, release: () => this._release(s30) };
  3880. }
  3881. _release(e23) {
  3882. const t25 = this._textureRequests.get(e23);
  3883. t25 ? (t25.referenceCount < 1 && console.warn("TextureCollection: reference count is < 1 for " + e23), t25.referenceCount--, t25.referenceCount < 1 && this._frameTask.schedule(() => this._releaseNow(e23))) : console.warn(`TextureCollection: texture doesn't exist: '${e23}'`);
  3884. }
  3885. get test() {
  3886. return { textureRequests: this._textureRequests };
  3887. }
  3888. _releaseNow(e23) {
  3889. if (!this._textureRequests)
  3890. return;
  3891. const t25 = this._textureRequests.get(e23);
  3892. !t25 || t25.referenceCount > 0 || (this._releaseTextureRequest(t25), this._textureRequests.delete(e23));
  3893. }
  3894. _releaseTextureRequest(e23) {
  3895. e23.onRemove && e23.onRemove(), e23.texture ? this._stage?.remove(e23.texture) : e23.abortController && (e23.abortController.abort(), e23.abortController = null);
  3896. }
  3897. makeUid(e23, t25 = null) {
  3898. return r(t25) ? `${e23}.${t25}px` : e23;
  3899. }
  3900. };
  3901. e([d()], i16.prototype, "_frameTask", void 0), e([d()], i16.prototype, "updating", null), i16 = e([n3("esri.views.3d.support.TextureCollection")], i16);
  3902. // node_modules/@arcgis/core/views/input/IViewEvents.js
  3903. var t16;
  3904. !function(t25) {
  3905. t25[t25.Left = 0] = "Left", t25[t25.Middle = 1] = "Middle", t25[t25.Right = 2] = "Right";
  3906. }(t16 || (t16 = {}));
  3907. // node_modules/@arcgis/core/views/input/ViewEvents.js
  3908. var r17 = ["click", "double-click", "immediate-click", "immediate-double-click", "hold", "drag", "key-down", "key-up", "pointer-down", "pointer-move", "pointer-up", "pointer-drag", "mouse-wheel", "pointer-enter", "pointer-leave", "gamepad", "focus", "blur"];
  3909. var i17 = {};
  3910. function o18(t25) {
  3911. return !!i17[t25];
  3912. }
  3913. function s15(t25) {
  3914. for (const e23 of t25)
  3915. if (!o18(e23))
  3916. return false;
  3917. return true;
  3918. }
  3919. r17.forEach((t25) => {
  3920. i17[t25] = true;
  3921. });
  3922. var p19 = class {
  3923. constructor(t25) {
  3924. this.handlers = new Map(), this.counter = 0, this.handlerCounts = new Map(), this.view = t25, this.inputManager = null;
  3925. }
  3926. connect(t25) {
  3927. t25 && this.disconnect(), this.inputManager = t25, this.handlers.forEach(({ handler: t26, priority: e23 }, a34) => this.inputManager.installHandlers(a34, [t26], e23));
  3928. }
  3929. disconnect() {
  3930. this.inputManager && this.handlers.forEach((t25, e23) => this.inputManager.uninstallHandlers(e23)), this.inputManager = null;
  3931. }
  3932. destroy() {
  3933. this.disconnect(), this.handlers.clear(), this.view = null;
  3934. }
  3935. on(t25, e23, a34, r24) {
  3936. const i32 = Array.isArray(t25) ? t25 : t25.split(",");
  3937. if (!s15(i32))
  3938. return i32.some(o18) && console.error("Error: registering input events and other events on the view at the same time is not supported."), null;
  3939. let p36, l27;
  3940. Array.isArray(e23) ? l27 = e23 : (p36 = e23, l27 = []), typeof a34 == "function" ? p36 = a34 : r24 = a34, r24 = r24 != null ? r24 : g3.DEFAULT;
  3941. const u23 = this._createUniqueGroupName(), m29 = new c27(this.view, i32, l27, p36);
  3942. this.handlers.set(u23, { handler: m29, priority: r24 });
  3943. for (const n34 of i32) {
  3944. const t26 = this.handlerCounts.get(n34) || 0;
  3945. this.handlerCounts.set(n34, t26 + 1);
  3946. }
  3947. return this.inputManager && this.inputManager.installHandlers(u23, [m29], r24), { remove: () => this._removeHandler(u23, i32) };
  3948. }
  3949. hasHandler(t25) {
  3950. return !!this.handlerCounts.get(t25);
  3951. }
  3952. _removeHandler(t25, e23) {
  3953. if (this.handlers.has(t25)) {
  3954. this.handlers.delete(t25);
  3955. for (const t26 of e23) {
  3956. const e24 = this.handlerCounts.get(t26);
  3957. e24 === void 0 ? console.error("Trying to remove handler for event that has no handlers registered: ", t26) : e24 === 1 ? this.handlerCounts.delete(t26) : this.handlerCounts.set(t26, e24 - 1);
  3958. }
  3959. }
  3960. this.inputManager && this.inputManager.uninstallHandlers(t25);
  3961. }
  3962. _createUniqueGroupName() {
  3963. return this.counter += 1, `viewEvents_${this.counter}`;
  3964. }
  3965. };
  3966. var c27 = class extends i8 {
  3967. constructor(t25, e23, a34, n34) {
  3968. super(true), this.view = t25;
  3969. for (const r24 of e23)
  3970. switch (r24) {
  3971. case "click":
  3972. this.registerIncoming("click", a34, (t26) => n34(this._wrapClick(t26)));
  3973. break;
  3974. case "double-click":
  3975. this.registerIncoming("double-click", a34, (t26) => n34(this._wrapDoubleClick(t26)));
  3976. break;
  3977. case "immediate-click":
  3978. this.registerIncoming("immediate-click", a34, (t26) => n34(this._wrapImmediateClick(t26)));
  3979. break;
  3980. case "immediate-double-click":
  3981. this.registerIncoming("immediate-double-click", a34, (t26) => n34(this._wrapImmediateDoubleClick(t26)));
  3982. break;
  3983. case "hold":
  3984. this.registerIncoming("hold", a34, (t26) => n34(this._wrapHold(t26)));
  3985. break;
  3986. case "drag":
  3987. this.registerIncoming("drag", a34, (t26) => {
  3988. const e24 = this._wrapDrag(t26);
  3989. e24 && n34(e24);
  3990. });
  3991. break;
  3992. case "key-down":
  3993. this.registerIncoming("key-down", a34, (t26) => n34(this._wrapKeyDown(t26)));
  3994. break;
  3995. case "key-up":
  3996. this.registerIncoming("key-up", a34, (t26) => n34(this._wrapKeyUp(t26)));
  3997. break;
  3998. case "pointer-down":
  3999. this.registerIncoming("pointer-down", a34, (t26) => n34(this._wrapPointer(t26, "pointer-down")));
  4000. break;
  4001. case "pointer-move":
  4002. this.registerIncoming("pointer-move", a34, (t26) => n34(this._wrapPointer(t26, "pointer-move")));
  4003. break;
  4004. case "pointer-up":
  4005. this.registerIncoming("pointer-up", a34, (t26) => n34(this._wrapPointer(t26, "pointer-up")));
  4006. break;
  4007. case "pointer-drag":
  4008. this.registerIncoming("pointer-drag", a34, (t26) => n34(this._wrapPointerDrag(t26)));
  4009. break;
  4010. case "mouse-wheel":
  4011. this.registerIncoming("mouse-wheel", a34, (t26) => n34(this._wrapMouseWheel(t26)));
  4012. break;
  4013. case "pointer-enter":
  4014. this.registerIncoming("pointer-enter", a34, (t26) => n34(this._wrapPointer(t26, "pointer-enter")));
  4015. break;
  4016. case "pointer-leave":
  4017. this.registerIncoming("pointer-leave", a34, (t26) => n34(this._wrapPointer(t26, "pointer-leave")));
  4018. break;
  4019. case "gamepad":
  4020. this.registerIncoming("gamepad", a34, (t26) => {
  4021. n34(this._wrapGamepad(t26));
  4022. });
  4023. break;
  4024. case "focus":
  4025. this.registerIncoming("focus", a34, (t26) => {
  4026. n34(this._wrapFocus(t26));
  4027. });
  4028. break;
  4029. case "blur":
  4030. this.registerIncoming("blur", a34, (t26) => {
  4031. n34(this._wrapBlur(t26));
  4032. });
  4033. }
  4034. }
  4035. _wrapFocus(t25) {
  4036. return { type: "focus", timestamp: t25.timestamp, native: t25.data.native, cancelable: t25.cancelable, stopPropagation: () => t25.stopPropagation(), async: (e23) => t25.async(e23), preventDefault: () => t25.preventDefault() };
  4037. }
  4038. _wrapBlur(t25) {
  4039. return { type: "blur", timestamp: t25.timestamp, native: t25.data.native, cancelable: t25.cancelable, stopPropagation: () => t25.stopPropagation(), async: (e23) => t25.async(e23), preventDefault: () => t25.preventDefault() };
  4040. }
  4041. _wrapClick(t25) {
  4042. const { pointerType: a34, button: n34, buttons: r24, x: i32, y: o30, native: s30, eventId: p36 } = t25.data, { cancelable: c42, timestamp: l27 } = t25;
  4043. return { type: "click", pointerType: a34, button: n34, buttons: r24, x: i32, y: o30, native: s30, timestamp: l27, screenPoint: c2(i32, o30), mapPoint: this._getMapPoint(i32, o30), eventId: p36, cancelable: c42, stopPropagation: () => t25.stopPropagation(), async: (e23) => t25.async(e23), preventDefault: () => t25.preventDefault() };
  4044. }
  4045. _wrapDoubleClick(t25) {
  4046. const { pointerType: e23, button: a34, buttons: n34, x: r24, y: i32, native: o30, eventId: s30 } = t25.data, { cancelable: p36, timestamp: c42 } = t25;
  4047. return { type: "double-click", pointerType: e23, button: a34, buttons: n34, x: r24, y: i32, native: o30, timestamp: c42, mapPoint: this._getMapPoint(r24, i32), eventId: s30, cancelable: p36, stopPropagation: () => t25.stopPropagation(), async: (e24) => t25.async(e24), preventDefault: () => t25.preventDefault() };
  4048. }
  4049. _wrapImmediateClick(t25) {
  4050. const { pointerType: e23, button: a34, buttons: n34, x: r24, y: i32, native: o30, eventId: s30 } = t25.data, p36 = o30.pointerId, { cancelable: c42, timestamp: l27 } = t25;
  4051. return { type: "immediate-click", pointerId: p36, pointerType: e23, button: a34, buttons: n34, x: r24, y: i32, native: o30, timestamp: l27, mapPoint: this._getMapPoint(r24, i32), eventId: s30, cancelable: c42, stopPropagation: () => t25.stopPropagation(), async: (e24) => t25.async(e24), preventDefault: () => t25.preventDefault() };
  4052. }
  4053. _wrapImmediateDoubleClick(t25) {
  4054. const { pointerType: e23, button: a34, buttons: n34, x: r24, y: i32, native: o30, eventId: s30 } = t25.data, p36 = o30.pointerId, { cancelable: c42, timestamp: l27 } = t25;
  4055. return { type: "immediate-double-click", pointerId: p36, pointerType: e23, button: a34, buttons: n34, x: r24, y: i32, native: o30, timestamp: l27, mapPoint: this._getMapPoint(r24, i32), eventId: s30, cancelable: c42, stopPropagation: () => t25.stopPropagation(), async: (e24) => t25.async(e24), preventDefault: () => t25.preventDefault() };
  4056. }
  4057. _wrapHold(t25) {
  4058. const { pointerType: e23, button: a34, buttons: n34, x: r24, y: i32, native: o30 } = t25.data, { cancelable: s30, timestamp: p36 } = t25;
  4059. return { type: "hold", pointerType: e23, button: a34, buttons: n34, x: r24, y: i32, native: o30, timestamp: p36, mapPoint: this._getMapPoint(r24, i32), cancelable: s30, stopPropagation: () => t25.stopPropagation(), async: (e24) => t25.async(e24), preventDefault: () => t25.preventDefault() };
  4060. }
  4061. _getMapPoint(t25, a34) {
  4062. return this.view.toMap(c2(t25, a34), { exclude: [] });
  4063. }
  4064. _wrapDrag(e23) {
  4065. const a34 = e23.data, { x: n34, y: r24 } = a34.center, { action: i32, pointerType: o30, button: s30 } = a34;
  4066. if (i32 === "start" && (this.latestDragStart = a34), !this.latestDragStart)
  4067. return;
  4068. const p36 = a34.pointer.native, c42 = a34.buttons, { cancelable: l27, timestamp: u23 } = e23, m29 = { x: this.latestDragStart.center.x, y: this.latestDragStart.center.y };
  4069. return i32 === "end" && (this.latestDragStart = void 0), { type: "drag", action: i32, x: n34, y: r24, origin: m29, pointerType: o30, button: s30, buttons: c42, radius: a34.radius, angle: m4(a34.angle), native: p36, timestamp: u23, cancelable: l27, stopPropagation: () => e23.stopPropagation(), async: (t25) => e23.async(t25), preventDefault: () => e23.preventDefault() };
  4070. }
  4071. _wrapKeyDown(t25) {
  4072. const { key: e23, repeat: a34, native: n34 } = t25.data, { cancelable: r24, timestamp: i32 } = t25;
  4073. return { type: "key-down", key: e23, repeat: a34, native: n34, timestamp: i32, cancelable: r24, stopPropagation: () => t25.stopPropagation(), async: (e24) => t25.async(e24), preventDefault: () => t25.preventDefault() };
  4074. }
  4075. _wrapKeyUp(t25) {
  4076. const { key: e23, native: a34 } = t25.data, { cancelable: n34, timestamp: r24 } = t25;
  4077. return { type: "key-up", key: e23, native: a34, timestamp: r24, cancelable: n34, stopPropagation: () => t25.stopPropagation(), async: (e24) => t25.async(e24), preventDefault: () => t25.preventDefault() };
  4078. }
  4079. _wrapPointer(t25, e23) {
  4080. const { x: a34, y: n34, button: r24, buttons: i32, native: o30, eventId: s30 } = t25.data, p36 = o30.pointerId, c42 = o30.pointerType, { cancelable: l27, timestamp: u23 } = t25;
  4081. return { type: e23, x: a34, y: n34, pointerId: p36, pointerType: c42, button: r24, buttons: i32, native: o30, timestamp: u23, eventId: s30, cancelable: l27, stopPropagation: () => t25.stopPropagation(), async: (e24) => t25.async(e24), preventDefault: () => t25.preventDefault() };
  4082. }
  4083. _wrapPointerDrag(t25) {
  4084. const { x: e23, y: a34, buttons: n34, native: r24, eventId: i32 } = t25.data.currentEvent, { button: o30 } = t25.data.startEvent, s30 = t25.data.startEvent.native.pointerId, p36 = t25.data.startEvent.native.pointerType, c42 = t25.data.action, l27 = { x: t25.data.startEvent.x, y: t25.data.startEvent.y }, { cancelable: u23, timestamp: m29 } = t25;
  4085. return { type: "pointer-drag", x: e23, y: a34, pointerId: s30, pointerType: p36, button: o30, buttons: n34, action: c42, origin: l27, native: r24, timestamp: m29, eventId: i32, cancelable: u23, stopPropagation: () => t25.stopPropagation(), async: (e24) => t25.async(e24), preventDefault: () => t25.preventDefault() };
  4086. }
  4087. _wrapMouseWheel(t25) {
  4088. const { cancelable: e23, data: a34, timestamp: n34 } = t25, { x: r24, y: i32, deltaY: o30, native: s30 } = a34;
  4089. return { type: "mouse-wheel", x: r24, y: i32, deltaY: o30, native: s30, timestamp: n34, cancelable: e23, stopPropagation: () => t25.stopPropagation(), async: (e24) => t25.async(e24), preventDefault: () => t25.preventDefault() };
  4090. }
  4091. _wrapGamepad(t25) {
  4092. const { action: e23, state: a34, device: n34 } = t25.data, { cancelable: r24, timestamp: i32 } = t25, { buttons: o30, axes: s30 } = a34;
  4093. return { type: "gamepad", device: n34, timestamp: i32, action: e23, buttons: o30, axes: s30, cancelable: r24, stopPropagation: () => t25.stopPropagation(), async: (e24) => t25.async(e24), preventDefault: () => t25.preventDefault() };
  4094. }
  4095. };
  4096. // node_modules/@arcgis/core/views/interactive/interfaces.js
  4097. var o19;
  4098. var t17;
  4099. var u13;
  4100. !function(o30) {
  4101. o30[o30.USER = 0] = "USER", o30[o30.MANAGER = 1] = "MANAGER";
  4102. }(o19 || (o19 = {})), function(o30) {
  4103. o30[o30.None = 0] = "None", o30[o30.Unfocused = 1] = "Unfocused", o30[o30.Focused = 2] = "Focused", o30[o30.Unselected = 4] = "Unselected", o30[o30.Selected = 8] = "Selected", o30[o30.All = 15] = "All";
  4104. }(t17 || (t17 = {})), function(o30) {
  4105. o30[o30.None = 0] = "None", o30[o30.Custom1 = 16] = "Custom1", o30[o30.Custom2 = 32] = "Custom2", o30[o30.Custom3 = 64] = "Custom3", o30[o30.Custom4 = 128] = "Custom4", o30[o30.Custom5 = 256] = "Custom5", o30[o30.Custom6 = 512] = "Custom6", o30[o30.Custom7 = 1024] = "Custom7", o30[o30.Custom8 = 2048] = "Custom8", o30[o30.Custom9 = 4096] = "Custom9", o30[o30.Custom10 = 8192] = "Custom10", o30[o30.Custom11 = 16384] = "Custom11", o30[o30.Custom12 = 32768] = "Custom12", o30[o30.All = 65520] = "All";
  4106. }(u13 || (u13 = {}));
  4107. // node_modules/@arcgis/core/views/interactive/interactiveToolUtils.js
  4108. var o20 = s.getLogger("esri.views.interactive.interactiveToolUtils");
  4109. function i18(e23) {
  4110. return [e23.on("before-add", (t25) => {
  4111. const i32 = t25.item;
  4112. if (i32 == null || e23.includes(i32))
  4113. return o20.warn("Tool is either already in the list of tools or tool is `null`. Not adding tool."), void t25.preventDefault();
  4114. i32.onAdd();
  4115. }), e23.on("after-remove", (e24) => {
  4116. const t25 = e24.item;
  4117. t25.visible = false, t25.active && (t25.view.activeTool = null), t25.destroy();
  4118. })];
  4119. }
  4120. function r18(e23) {
  4121. return e23.visible && e23.getEditableFlag(o19.USER) && e23.getEditableFlag(o19.MANAGER);
  4122. }
  4123. // node_modules/@arcgis/core/views/support/screenUtils.js
  4124. function n19(t25) {
  4125. return c2(t25.x, t25.y);
  4126. }
  4127. function i20(t25, n34) {
  4128. const c42 = (t25 instanceof HTMLElement ? t25 : t25.surface).getBoundingClientRect();
  4129. return c2(n34.clientX - c42.left, n34.clientY - c42.top);
  4130. }
  4131. function r19(e23, t25) {
  4132. return t25 instanceof Event ? i20(e23, t25) : n19(t25);
  4133. }
  4134. function o21(e23) {
  4135. if (e23 instanceof Event)
  4136. return true;
  4137. if (typeof e23 == "object" && "type" in e23) {
  4138. switch (e23.type) {
  4139. case "click":
  4140. case "double-click":
  4141. case "pointer-down":
  4142. case "pointer-drag":
  4143. case "pointer-enter":
  4144. case "pointer-leave":
  4145. case "pointer-up":
  4146. case "pointer-move":
  4147. case "immediate-click":
  4148. case "immediate-double-click":
  4149. case "hold":
  4150. case "drag":
  4151. case "mouse-wheel":
  4152. return true;
  4153. default:
  4154. return false;
  4155. }
  4156. }
  4157. return false;
  4158. }
  4159. // node_modules/@arcgis/core/views/interactive/ToolViewManagerManipulatorState.js
  4160. var p20 = class {
  4161. constructor() {
  4162. this._pointerLocations = new Map(), this._hoveredManipulators = new Map(), this._grabbedManipulators = new Map(), this._draggedManipulators = new Map(), this._stopDrag = false, this._currentlyActiveTool = null, this._revertToActiveTool = false, this._cursor = null;
  4163. }
  4164. get cursor() {
  4165. return this._cursor;
  4166. }
  4167. handleInputEvent(t25, a34) {
  4168. const s30 = () => t25.stopPropagation();
  4169. switch (t25.type) {
  4170. case "pointer-move":
  4171. c28(t25.pointerType) && this._pointerLocations.set(t25.pointerId, { x: t25.x, y: t25.y, pointerType: t25.pointerType });
  4172. break;
  4173. case "drag":
  4174. this._grabbedManipulators.size > 0 && (this._stopDrag = true), this._stopDrag && (s30(), t25.action === "end" && (this._stopDrag = false));
  4175. break;
  4176. case "pointer-down": {
  4177. if (!u14(t25))
  4178. break;
  4179. const e23 = n19(t25), n34 = this._intersect(e23, t25.pointerType, a34.forEachTool);
  4180. if (t(n34))
  4181. break;
  4182. const p36 = this._findToolAndManipulatorByKey(n34, a34.forEachTool, h13), c42 = o(p36, (t26) => t26.manipulator), d20 = o(p36, (t26) => t26.tool);
  4183. !(r(c42) && r(d20) && c42.interactive) || c42.grabbable && c42.grabbableForEvent(t25) || !c42.grabbing || c42.dragging || this._ungrabManipulatorBeforeDragging(c42, d20, t25), r(c42) && c42.interactive && c42.grabbable && c42.grabbableForEvent(t25) && !c42.grabbing && (this._grabbedManipulators.set(t25.pointerId, { key: n34, start: e23, pointerType: t25.pointerType }), this._grabbedManipulators.size === 1 && a34.activeTool !== n34.tool && (this._currentlyActiveTool = a34.activeTool, this._revertToActiveTool = true, a34.setActiveTool(n34.tool)), c42.grabbing = true, c42.events.emit("grab-changed", { action: "start", pointerType: t25.pointerType, screenPoint: e23 }), s30());
  4184. break;
  4185. }
  4186. case "pointer-up":
  4187. this._handlePointerEnd(t25, a34);
  4188. break;
  4189. case "pointer-drag": {
  4190. if (!u14(t25))
  4191. break;
  4192. const i32 = this._grabbedManipulators.get(t25.pointerId), p36 = this._draggedManipulators.get(t25.pointerId), c42 = o(i32 || p36, ({ key: t26 }) => t26), d20 = this._findManipulatorByKey(c42, a34.forEachTool);
  4193. if (t(d20))
  4194. break;
  4195. const h19 = n19(t25);
  4196. h19.x = o5(h19.x, 0, a34.view.width), h19.y = o5(h19.y, 0, a34.view.height);
  4197. const g20 = e2(i32 || p36).start;
  4198. switch (t25.action) {
  4199. case "start":
  4200. case "update":
  4201. t25.action !== "update" && this._grabbedManipulators.size !== 1 || (d20.dragging = true, p36 ? d20.events.emit("drag", { action: "update", start: g20, screenPoint: h19 }) : d20.events.emit("drag", { action: "start", start: g20, screenPoint: h19, pointerType: t25.pointerType }), this._draggedManipulators.set(t25.pointerId, { key: e2(c42), start: g20 }));
  4202. break;
  4203. case "end":
  4204. d20.dragging = false, p36 && d20.events.emit("drag", { action: "end", start: g20, screenPoint: h19 }), this._draggedManipulators.delete(t25.pointerId), this._handlePointerEnd(t25, a34);
  4205. }
  4206. s30();
  4207. break;
  4208. }
  4209. case "immediate-click": {
  4210. const e23 = n19(t25), r24 = this._intersect(e23, t25.pointerType, a34.forEachTool), n34 = this._findToolAndManipulatorByKey(r24, a34.forEachTool, h13);
  4211. if (d11(t25) || a34.forEachTool((t26) => {
  4212. if ((!r(n34) || n34.tool !== t26 || t26.automaticManipulatorSelection) && t26.manipulators) {
  4213. let e24 = false;
  4214. t26.manipulators.forEach(({ manipulator: t27 }) => {
  4215. t27.selected && (t27.selected = false, e24 = true);
  4216. }), e24 && t26.manipulatorSelectionChanged && t26.manipulatorSelectionChanged();
  4217. }
  4218. }), t(n34))
  4219. break;
  4220. const { manipulator: p36, tool: c42 } = n34;
  4221. if (!p36.interactive)
  4222. break;
  4223. p36.selectable && c42.automaticManipulatorSelection && (p36.selected = !p36.selected, c42.manipulatorSelectionChanged && c42.manipulatorSelectionChanged());
  4224. const u23 = t25.native.shiftKey;
  4225. p36.events.emit("immediate-click", { screenPoint: e23, button: t25.button, pointerType: t25.pointerType, shiftKey: u23, stopPropagation: s30 });
  4226. break;
  4227. }
  4228. case "click": {
  4229. const e23 = n19(t25), i32 = this._intersect(e23, t25.pointerType, a34.forEachTool), r24 = this._findManipulatorByKey(i32, a34.forEachTool);
  4230. if (t(r24) || !r24.interactive)
  4231. break;
  4232. const n34 = t25.native.shiftKey;
  4233. r24.events.emit(t25.type, { screenPoint: e23, button: t25.button, pointerType: t25.pointerType, shiftKey: n34 }), s30();
  4234. break;
  4235. }
  4236. case "double-click": {
  4237. const e23 = n19(t25), i32 = this._intersect(e23, t25.pointerType, a34.forEachTool), r24 = this._findManipulatorByKey(i32, a34.forEachTool);
  4238. if (t(r24) || !r24.interactive)
  4239. break;
  4240. const n34 = t25.native.shiftKey;
  4241. r24.events.emit("double-click", { screenPoint: e23, button: t25.button, pointerType: t25.pointerType, shiftKey: n34, stopPropagation: s30 });
  4242. break;
  4243. }
  4244. case "immediate-double-click": {
  4245. const e23 = n19(t25), i32 = this._intersect(e23, t25.pointerType, a34.forEachTool), r24 = this._findManipulatorByKey(i32, a34.forEachTool);
  4246. if (t(r24) || !r24.interactive)
  4247. break;
  4248. const n34 = t25.native.shiftKey;
  4249. r24.events.emit("immediate-double-click", { screenPoint: e23, button: t25.button, pointerType: t25.pointerType, shiftKey: n34, stopPropagation: s30 });
  4250. break;
  4251. }
  4252. }
  4253. this._onFocusChange(a34.forEachTool);
  4254. }
  4255. _ungrabManipulatorBeforeDragging(t25, e23, o30) {
  4256. t25.grabbing = false, t25.events.emit("grab-changed", { action: "end", pointerType: o30.pointerType, screenPoint: n19(o30) }), this._grabbedManipulators.forEach(({ key: o31 }, i32) => {
  4257. o31.tool === e23 && e23.manipulators.findById(o31.manipulatorId) === t25 && this._grabbedManipulators.delete(i32);
  4258. });
  4259. }
  4260. _handlePointerEnd(t25, e23) {
  4261. const o30 = o(this._grabbedManipulators.get(t25.pointerId), ({ key: t26 }) => t26), n34 = this._findManipulatorByKey(o30, e23.forEachTool);
  4262. r(n34) && !n34.dragging && (this._grabbedManipulators.size === 1 && this._draggedManipulators.size === 0 && this._revertToActiveTool && (e23.setActiveTool(this._currentlyActiveTool), this._revertToActiveTool = false, this._currentlyActiveTool = null), n34.grabbing && (n34.grabbing = false, n34.events.emit("grab-changed", { action: "end", pointerType: t25.pointerType, screenPoint: n19(t25) })), this._grabbedManipulators.delete(t25.pointerId));
  4263. }
  4264. _cursorFromMap(e23, o30) {
  4265. let r24 = null;
  4266. return n(e23, ({ key: t25 }) => {
  4267. const e24 = this._findManipulatorByKey(t25, o30);
  4268. return !!(r(e24) && e24.interactive && "cursor" in e24 && e24.cursor) && (r24 = e24.cursor, true);
  4269. }), r24;
  4270. }
  4271. _onFocusChange(t25) {
  4272. this._updateCursor(t25), this._updateFocusedManipulatorTools(t25);
  4273. }
  4274. _updateCursor(t25) {
  4275. this._grabbedManipulators.size > 0 ? this._cursor = this._cursorFromMap(this._grabbedManipulators, t25) || "grabbing" : this._hoveredManipulators.size > 0 ? this._cursor = this._cursorFromMap(this._hoveredManipulators, t25) || "pointer" : this._cursor = null;
  4276. }
  4277. _updateFocusedManipulatorTools(t25) {
  4278. const e23 = new Set();
  4279. this._grabbedManipulators.forEach(({ key: { tool: t26 } }) => {
  4280. e23.add(t26);
  4281. }), this._hoveredManipulators.forEach(({ key: { tool: t26 } }) => {
  4282. e23.add(t26);
  4283. }), t25((t26) => {
  4284. t26.hasFocusedManipulators = e23.has(t26);
  4285. });
  4286. }
  4287. clearPointers(t25, e23, r24 = true, n34) {
  4288. const a34 = (e24) => e24.tool === t25 && (t(n34) || e24.manipulatorId === n34);
  4289. this._grabbedManipulators.forEach(({ key: t26, pointerType: o30 }, r25) => {
  4290. if (a34(t26)) {
  4291. this._grabbedManipulators.delete(r25);
  4292. const n35 = this._findManipulatorByKey(t26, e23);
  4293. r(n35) && (n35.grabbing = false, n35.events.emit("grab-changed", { action: "end", screenPoint: null, pointerType: o30 }));
  4294. }
  4295. }), this._draggedManipulators.forEach(({ key: t26 }, o30) => {
  4296. if (a34(t26)) {
  4297. this._draggedManipulators.delete(o30);
  4298. const r25 = this._findManipulatorByKey(t26, e23);
  4299. r(r25) && (r25.dragging = false, r25.events.emit("drag", { action: "cancel" }));
  4300. }
  4301. }), r24 && this._hoveredManipulators.forEach(({ key: t26 }, o30) => {
  4302. if (a34(t26)) {
  4303. this._hoveredManipulators.delete(o30);
  4304. const r25 = this._findManipulatorByKey(t26, e23);
  4305. r(r25) && (r25.hovering = false);
  4306. }
  4307. }), this._onFocusChange(e23);
  4308. }
  4309. _intersect(t25, e23, i32) {
  4310. let r24 = null;
  4311. return i32((i33) => {
  4312. if (i33.manipulators == null || !r18(i33))
  4313. return false;
  4314. const n34 = i33.manipulators.intersect(t25, e23);
  4315. return !t(n34) && (r24 = { manipulatorId: n34.id, tool: i33 }, true);
  4316. }), r24;
  4317. }
  4318. updateHoveredStateFromKnownPointers(t25) {
  4319. this._pointerLocations.forEach((e23, o30) => {
  4320. this._updateHoveredStateForPointerAtScreenPosition(c2(e23.x, e23.y), o30, e23.pointerType, t25);
  4321. });
  4322. }
  4323. handleHoverEvent(t25, e23) {
  4324. t25.type !== "pointer-up" && t25.type !== "immediate-click" && t25.type !== "pointer-move" || !c28(t25.pointerType) || this._updateHoveredStateForPointerAtScreenPosition(n19(t25), t25.pointerId, t25.pointerType, e23);
  4325. }
  4326. _updateHoveredStateForPointerAtScreenPosition(t25, e23, o30, a34) {
  4327. const s30 = this._intersect(t25, o30, a34);
  4328. let l27 = this._findManipulatorByKey(s30, a34);
  4329. const p36 = o(this._hoveredManipulators.get(e23), ({ key: t26 }) => t26), c42 = this._findManipulatorByKey(p36, a34);
  4330. r(l27) && !l27.interactive && (l27 = null), c42 !== l27 && (r(c42) && (c42.hovering = false), r(l27) ? (l27.hovering = true, this._hoveredManipulators.set(e23, { key: e2(s30) })) : this._hoveredManipulators.delete(e23), this._onFocusChange(a34));
  4331. }
  4332. _findManipulatorByKey(t25, e23) {
  4333. return this._findToolAndManipulatorByKey(t25, e23, h13) ? h13.manipulator : null;
  4334. }
  4335. _findToolAndManipulatorByKey(t25, e23, r24) {
  4336. return t(t25) ? null : (r24.tool = null, r24.manipulator = null, e23((e24) => {
  4337. if (e24 !== t25.tool || e24.manipulators == null || !r18(e24))
  4338. return false;
  4339. const o30 = e24.manipulators.findById(t25.manipulatorId);
  4340. return !!r(o30) && (r24.manipulator = o30, r24.tool = e24, true);
  4341. }), r24.manipulator ? r24 : null);
  4342. }
  4343. };
  4344. function c28(t25) {
  4345. return t25 === "mouse";
  4346. }
  4347. function u14(t25) {
  4348. return t25.pointerType !== "mouse" || t25.button === 0;
  4349. }
  4350. function d11(t25) {
  4351. return !!t25.native.shiftKey;
  4352. }
  4353. var h13 = { manipulator: null, tool: null };
  4354. // node_modules/@arcgis/core/views/ToolViewManager.js
  4355. var E7 = s.getLogger("esri.views.ToolViewManager");
  4356. var g13 = "attached";
  4357. var w11 = "tools";
  4358. var y12 = class extends d2 {
  4359. constructor(t25) {
  4360. super(t25), this._manipulatorState = new p20(), this.tools = new j3(), this.cursor = null, this._forEachTool = (t26) => {
  4361. for (const o30 of this.tools.items)
  4362. if (t26(o30))
  4363. return;
  4364. };
  4365. }
  4366. initialize() {
  4367. this.handles.add([this.view.on(r17, (t25) => {
  4368. this._handleInputEvent(t25);
  4369. }, g3.TOOL), ...i18(this.tools), this.tools.on("before-remove", ({ item: t25 }) => {
  4370. this._manipulatorState.clearPointers(t25, this._forEachTool);
  4371. }), this.tools.on("change", () => {
  4372. this._refreshToolWatchers();
  4373. })]);
  4374. }
  4375. destroy() {
  4376. this.detach(), this.handles.removeAll();
  4377. }
  4378. set activeTool(t25) {
  4379. if (r(t25) && !this.view.ready)
  4380. return void E7.error("Cannot set active tool while view is not ready.");
  4381. if (t25 === this.activeTool)
  4382. return;
  4383. const o30 = this.activeTool;
  4384. this._set("activeTool", t25), r(o30) && o30.deactivate(), r(t25) && t25.activate(), this._removeIncompleteTools(t25);
  4385. const e23 = t(this.activeTool);
  4386. for (const i32 of this.tools) {
  4387. i32.setEditableFlag(o19.MANAGER, e23 || i32 === this.activeTool);
  4388. const t26 = r18(i32);
  4389. !e23 && t26 || this._manipulatorState.clearPointers(i32, this._forEachTool, !t26);
  4390. }
  4391. this._updateCursor();
  4392. }
  4393. get updating() {
  4394. return this.updatingHandles.updating || this.tools.some((t25) => t25.updating) || (this.textures?.updating ?? false);
  4395. }
  4396. attach() {
  4397. this.view.type === "3d" ? (this._set("textures", new i16(this.view._stage, this.view.resourceController.scheduler)), this.handles.add([l4(() => {
  4398. const { state: t25 } = this.view;
  4399. return "camera" in t25 && t25.camera;
  4400. }, () => {
  4401. this._forEachManipulator((t25) => {
  4402. t25.onViewChange != null && t25.onViewChange();
  4403. });
  4404. }), this.view.elevationProvider.on("elevation-change", (t25) => {
  4405. this._forEachManipulator((o30) => {
  4406. o30.onElevationChange != null && o30.onElevationChange(t25);
  4407. });
  4408. }), n2(() => this._set("textures", l(this.textures)))], g13)) : this.handles.add(l4(() => this.view.extent, () => {
  4409. this._forEachManipulator((t25) => {
  4410. t25.onViewChange != null && t25.onViewChange();
  4411. });
  4412. }));
  4413. }
  4414. detach() {
  4415. r(this.activeTool) && (this.activeTool = null), this.tools.removeAll(), this.handles.remove(g13);
  4416. }
  4417. _forEachManipulator(t25) {
  4418. this._forEachTool((o30) => {
  4419. o30.manipulators && o30.manipulators.forEach(({ manipulator: e23 }) => t25(e23, o30));
  4420. });
  4421. }
  4422. _handleInputEvent(t25) {
  4423. let o30 = false;
  4424. const e23 = { ...t25, stopPropagation: () => {
  4425. o30 = true, t25.stopPropagation();
  4426. } };
  4427. r(this.activeTool) ? this.activeTool.handleInputEvent && this.activeTool.handleInputEvent(e23) : this._forEachTool((t26) => {
  4428. !o30 && t26.visible && t26.handleInputEvent(e23);
  4429. }), !o30 && t25.type === "key-down" && t25.key === "Escape" && this.activeTool && (t25.stopPropagation(), this.activeTool = null), this._manipulatorState.handleInputEvent(e23, { forEachTool: this._forEachTool, activeTool: this.activeTool, setActiveTool: (t26) => {
  4430. this.activeTool = t26;
  4431. }, view: this.view }), !o30 && r(this.activeTool) && this.activeTool.handleInputEventAfter(e23), this._manipulatorState.handleHoverEvent(e23, this._forEachTool), this._updateCursor();
  4432. }
  4433. _refreshToolWatchers() {
  4434. this.handles.remove(w11), this._forEachTool((t25) => {
  4435. if (t25 instanceof y) {
  4436. const o30 = l4(() => [t25.cursor, t25.visible, t25.editable], () => {
  4437. r18(t25) || this._manipulatorState.clearPointers(t25, this._forEachTool), this._updateCursor();
  4438. });
  4439. this.handles.add(o30, w11);
  4440. }
  4441. t25.manipulators && this.handles.add(t25.manipulators.on("change", (o30) => {
  4442. o30.removed.forEach(({ id: o31 }) => {
  4443. this._manipulatorState.clearPointers(t25, this._forEachTool, true, o31);
  4444. }), this._manipulatorState.updateHoveredStateFromKnownPointers(this._forEachTool), this._updateCursor();
  4445. }), w11);
  4446. }), this._manipulatorState.updateHoveredStateFromKnownPointers(this._forEachTool), this._updateCursor();
  4447. }
  4448. _updateCursor() {
  4449. const t25 = this._manipulatorState.cursor;
  4450. let o30 = t25;
  4451. this._forEachTool((e23) => !(!r(e23.cursor) || !e23.visible || !t(t25) && e23.preferManipulatorCursor) && (o30 = e23.cursor, true)), this._get("cursor") !== o30 && this._set("cursor", o30);
  4452. }
  4453. _removeIncompleteTools(t25) {
  4454. this.tools.filter((o30) => (t(t25) || o30 !== t25) && !o30.created && o30.removeIncompleteOnCancel).forEach((t26) => {
  4455. this.tools.remove(t26);
  4456. });
  4457. }
  4458. };
  4459. e([d({ constructOnly: true, nonNullable: true })], y12.prototype, "view", void 0), e([d({ readOnly: true, nonNullable: true })], y12.prototype, "textures", void 0), e([d({ value: null })], y12.prototype, "activeTool", null), e([d({ readOnly: true, type: j3 })], y12.prototype, "tools", void 0), e([d({ readOnly: true })], y12.prototype, "cursor", void 0), e([d({ readOnly: true })], y12.prototype, "updating", null), y12 = e([n3("esri.views.ToolViewManager")], y12);
  4460. var j11 = y12;
  4461. // node_modules/@arcgis/core/views/input/gamepad/GamepadInputDevice.js
  4462. var o22 = class extends y {
  4463. constructor(e23) {
  4464. super(), this.nativeIndex = null, this._detectedDeviceType = "unknown", e23.mapping === "standard" ? this._detectedDeviceType = "standard" : n20.test(e23.id) ? this._detectedDeviceType = "spacemouse" : this._detectedDeviceType = "unknown", this.nativeIndex = e23.index;
  4465. }
  4466. get native() {
  4467. return (navigator.getGamepads ? navigator.getGamepads() : [])[this.nativeIndex];
  4468. }
  4469. get deviceType() {
  4470. return this._detectedDeviceType;
  4471. }
  4472. get axisThreshold() {
  4473. return a16[this.deviceType];
  4474. }
  4475. };
  4476. e([d({ nonNullable: true, readOnly: true })], o22.prototype, "nativeIndex", void 0), e([d({ type: String, readOnly: true })], o22.prototype, "deviceType", null), e([d({ type: Number, readOnly: true })], o22.prototype, "axisThreshold", null), o22 = e([n3("esri.views.input.gamepad.GamepadInputDevice")], o22);
  4477. var n20 = new RegExp("^(3dconnexion|space(mouse|navigator|pilot|explorer))", "i");
  4478. var a16 = { standard: 0.15, spacemouse: 0.025, unknown: 0 };
  4479. var i21 = o22;
  4480. // node_modules/@arcgis/core/views/input/gamepad/GamepadSettings.js
  4481. var c29 = class extends y {
  4482. constructor(...e23) {
  4483. super(...e23), this.devices = new j3(), this.enabledFocusMode = "document";
  4484. }
  4485. };
  4486. e([d({ type: j3.ofType(i21), readOnly: true })], c29.prototype, "devices", void 0), e([d({ type: ["document", "view", "none"] })], c29.prototype, "enabledFocusMode", void 0), c29 = e([n3("esri.views.input.gamepad.GamepadSettings")], c29);
  4487. var i22 = c29;
  4488. // node_modules/@arcgis/core/views/input/Input.js
  4489. var p21 = class extends y {
  4490. constructor() {
  4491. super(...arguments), this.gamepad = new i22();
  4492. }
  4493. };
  4494. e([d({ readOnly: true })], p21.prototype, "gamepad", void 0), p21 = e([n3("esri.views.input.Input")], p21);
  4495. var a17 = p21;
  4496. // node_modules/@arcgis/core/views/navigation/gamepad/GamepadSettings.js
  4497. var s16 = class extends y {
  4498. constructor(o30) {
  4499. super(o30), this.enabled = true, this.device = null, this.mode = "pan", this.tiltDirection = "forward-down", this.velocityFactor = 1;
  4500. }
  4501. };
  4502. e([d({ type: Boolean, nonNullable: true })], s16.prototype, "enabled", void 0), e([d({ type: i21 })], s16.prototype, "device", void 0), e([d({ type: ["pan", "zoom"], nonNullable: true })], s16.prototype, "mode", void 0), e([d({ type: ["forward-down", "forward-up"], nonNullable: true })], s16.prototype, "tiltDirection", void 0), e([d({ type: Number, nonNullable: true })], s16.prototype, "velocityFactor", void 0), s16 = e([n3("esri.views.navigation.gamepad.GamepadSettings")], s16);
  4503. var a18 = s16;
  4504. // node_modules/@arcgis/core/views/navigation/Navigation.js
  4505. var a19 = class extends y {
  4506. constructor(o30) {
  4507. super(o30), this.browserTouchPanEnabled = true, this.gamepad = new a18(), this.momentumEnabled = true, this.mouseWheelZoomEnabled = true;
  4508. }
  4509. };
  4510. e([d({ type: Boolean })], a19.prototype, "browserTouchPanEnabled", void 0), e([d({ type: a18, nonNullable: true })], a19.prototype, "gamepad", void 0), e([d({ type: Boolean })], a19.prototype, "momentumEnabled", void 0), e([d({ type: Boolean })], a19.prototype, "mouseWheelZoomEnabled", void 0), a19 = e([n3("esri.views.navigation.Navigation")], a19);
  4511. var p22 = a19;
  4512. // node_modules/@arcgis/core/geometry/support/heightModelInfoUtils.js
  4513. var s17;
  4514. function h14(e23) {
  4515. const r24 = e23.url && m7(e23.url);
  4516. return !((e23.spatialReference && e23.spatialReference.vcsWkid) == null && r(r24) && r24.serverType === "ImageServer") && u15(e23) && e23.heightModelInfo ? e23.heightModelInfo : d12(e23) ? v5.deriveUnitFromSR(m21, e23.spatialReference) : null;
  4517. }
  4518. function u15(e23) {
  4519. return "heightModelInfo" in e23;
  4520. }
  4521. function f11(e23) {
  4522. if (e23.type === "unknown" || !("capabilities" in e23))
  4523. return false;
  4524. switch (e23.type) {
  4525. case "csv":
  4526. case "feature":
  4527. case "geojson":
  4528. case "subtype-group":
  4529. case "ogc-feature":
  4530. case "wfs":
  4531. return true;
  4532. default:
  4533. return false;
  4534. }
  4535. }
  4536. function d12(e23) {
  4537. return f11(e23) ? !!(e23.capabilities && e23.capabilities.data && e23.capabilities.data.supportsZ) : p23(e23);
  4538. }
  4539. function g14(e23) {
  4540. return e23.layers != null || p23(e23) || f11(e23) || u15(e23);
  4541. }
  4542. function p23(e23) {
  4543. switch (e23.type) {
  4544. case "building-scene":
  4545. case "elevation":
  4546. case "integrated-mesh":
  4547. case "point-cloud":
  4548. case "scene":
  4549. case "voxel":
  4550. return true;
  4551. case "line-of-sight":
  4552. case "base-dynamic":
  4553. case "base-elevation":
  4554. case "base-tile":
  4555. case "bing-maps":
  4556. case "csv":
  4557. case "geojson":
  4558. case "feature":
  4559. case "subtype-group":
  4560. case "geo-rss":
  4561. case "graphics":
  4562. case "group":
  4563. case "imagery":
  4564. case "imagery-tile":
  4565. case "kml":
  4566. case "map-image":
  4567. case "map-notes":
  4568. case "media":
  4569. case "ogc-feature":
  4570. case "open-street-map":
  4571. case "route":
  4572. case "stream":
  4573. case "tile":
  4574. case "unknown":
  4575. case "unsupported":
  4576. case "vector-tile":
  4577. case "wcs":
  4578. case "web-tile":
  4579. case "wfs":
  4580. case "wms":
  4581. case "wmts":
  4582. case null:
  4583. return false;
  4584. }
  4585. return false;
  4586. }
  4587. !function(e23) {
  4588. e23[e23.Ok = 0] = "Ok", e23[e23.Units = 1] = "Units", e23[e23.HeightModel = 2] = "HeightModel", e23[e23.CRS = 3] = "CRS", e23[e23.Unsupported = 4] = "Unsupported";
  4589. }(s17 || (s17 = {}));
  4590. var m21 = new v5({ heightModel: "gravity-related-height" });
  4591. // node_modules/@arcgis/core/views/support/projectionUtils.js
  4592. var n21;
  4593. var s18 = null;
  4594. async function c30(r24) {
  4595. s18 || (s18 = import("./geometryServiceUtils-Y6PPGAUO.js").then((e23) => n21 = e23)), await s18, f(r24);
  4596. }
  4597. async function p24(e23, s30, a34, m29) {
  4598. if (!e23)
  4599. return null;
  4600. const l27 = e23.spatialReference;
  4601. return en() || An(l27, s30) ? rn(e23, s30) : n21 ? n21.projectGeometry(e23, s30, a34, m29) : (await Promise.race([c30(m29), tn(m29)]), p24(e23, s30, a34, m29));
  4602. }
  4603. // node_modules/@arcgis/core/views/support/DefaultsFromMap.js
  4604. var h15 = class extends y {
  4605. constructor(e23) {
  4606. super(e23), this.required = { tileInfo: false, heightModelInfo: false, extent: false }, this.defaultSpatialReference = null, this.userSpatialReference = null, this.sourcePreloadCount = 10, this.priorityCollection = null, this.requiresExtentInSpatialReference = true, this.suspended = false, this._projectExtentTask = { task: null, input: null, output: null, spatialReference: null };
  4607. }
  4608. destroy() {
  4609. this._projectExtentTask.task && (this._projectExtentTask.task = h(this._projectExtentTask.task)), this._set("map", null);
  4610. }
  4611. get ready() {
  4612. return !this._spatialReferenceTask.updating && !this._tileInfoTask.updating && !this._extentTask.updating;
  4613. }
  4614. get heightModelInfoReady() {
  4615. return !this._heightModelInfoTask.updating;
  4616. }
  4617. get spatialReference() {
  4618. return r(this.userSpatialReference) ? this.userSpatialReference : e2(this._spatialReferenceTask.spatialReference);
  4619. }
  4620. get extent() {
  4621. return e2(this._extentTask.extent);
  4622. }
  4623. get heightModelInfo() {
  4624. return e2(this._heightModelInfoTask.heightModelInfo);
  4625. }
  4626. get vcsWkid() {
  4627. return e2(this._heightModelInfoTask.vcsWkid);
  4628. }
  4629. get latestVcsWkid() {
  4630. return e2(this._heightModelInfoTask.latestVcsWkid);
  4631. }
  4632. get viewingMode() {
  4633. return t(this.userSpatialReference) || this.userSpatialReference.equals(e2(this._spatialReferenceTask.spatialReference)) ? e2(this._spatialReferenceTask.viewingMode) : null;
  4634. }
  4635. get tileInfo() {
  4636. return e2(this._tileInfoTask.tileInfo);
  4637. }
  4638. get mapCollections() {
  4639. const e23 = this.map?.(), t25 = [];
  4640. return r(this.priorityCollection) && t25.push(this.priorityCollection), t25.push({ parent: e23?.basemap, layers: e23?.basemap?.baseLayers }, { layers: e23?.layers }, { parent: e23?.ground, layers: e23?.ground?.layers }, { parent: e23?.basemap, layers: e23?.basemap?.referenceLayers }), t25;
  4641. }
  4642. get _allLayers() {
  4643. return this._collectLayers(this.mapCollections);
  4644. }
  4645. get _spatialReferenceTask() {
  4646. if (this.suspended)
  4647. return this._get("_spatialReferenceTask") ?? { updating: false };
  4648. const { layers: e23, updating: t25 } = this._allLayers;
  4649. let a34 = null;
  4650. for (const i32 of e23) {
  4651. const e24 = this._getSupportedSpatialReferences(i32);
  4652. if (e24.length > 0) {
  4653. const t26 = this._narrowDownSpatialReferenceCandidates(a34, e24);
  4654. r(t26) && (a34 = t26);
  4655. }
  4656. if (r(a34) && a34.length === 1)
  4657. break;
  4658. }
  4659. if (t25 && (t(a34) || a34.length !== 1))
  4660. return { updating: true };
  4661. const s30 = this._pickSpatialReferenceCandidate(a34);
  4662. return { spatialReference: r(s30) ? s30.spatialReference : null, viewingMode: r(s30) ? s30.viewingMode : null, updating: false };
  4663. }
  4664. get _tileInfoTask() {
  4665. if (!this.required.tileInfo)
  4666. return this._get("_tileInfoTask") ?? { updating: false };
  4667. if (!this.spatialReference)
  4668. return { updating: this._spatialReferenceTask.updating };
  4669. const { layers: e23, updating: t25 } = this._collectLayers([{ parent: this.map?.()?.basemap, layers: this.map?.()?.basemap?.baseLayers }, { layers: this.map?.()?.layers }]);
  4670. if (e23 && e23.length > 0 && "tileInfo" in e23[0]) {
  4671. const t26 = e23[0].tileInfo;
  4672. return { tileInfo: t26 && t26.spatialReference.equals(this.spatialReference) ? t26 : null, updating: false };
  4673. }
  4674. return { updating: t25 };
  4675. }
  4676. get _heightModelInfoTask() {
  4677. if (!this.required.heightModelInfo || this.suspended && this._get("_heightModelInfoTask")?.heightModelInfo)
  4678. return this._get("_heightModelInfoTask") ?? { updating: false };
  4679. const { layers: e23, updating: t25 } = this._allLayers;
  4680. for (const a34 of e23)
  4681. if (g14(a34)) {
  4682. const e24 = h14(a34);
  4683. if (e24)
  4684. return { heightModelInfo: e24, vcsWkid: a34.spatialReference?.vcsWkid, latestVcsWkid: a34.spatialReference?.latestVcsWkid, updating: false };
  4685. }
  4686. return { updating: t25 };
  4687. }
  4688. get _extentCandidatesTask() {
  4689. if (this.suspended || !this.required.extent)
  4690. return this._get("_extentCandidatesTask") ?? { updating: false };
  4691. if (!this.spatialReference)
  4692. return { updating: this._spatialReferenceTask.updating };
  4693. const e23 = this._allLayers, t25 = e23.updating, a34 = [];
  4694. for (const s30 of e23.layers) {
  4695. const e24 = "fullExtents" in s30 && s30.fullExtents || (r(s30.fullExtent) ? [s30.fullExtent] : []), t26 = this.requiresExtentInSpatialReference ? null : e24[0], i32 = e24.find((e25) => e25.spatialReference.equals(this.spatialReference)) ?? t26;
  4696. if (i32)
  4697. return { candidates: [{ extent: i32, layer: s30 }], updating: false };
  4698. if (this._getSupportedSpatialReferences(s30).length > 0)
  4699. for (const n34 of e24)
  4700. a34.push({ extent: n34, layer: s30 });
  4701. }
  4702. return { candidates: a34, updating: t25 };
  4703. }
  4704. get _extentTask() {
  4705. const { candidates: e23, updating: t25 } = this._extentCandidatesTask;
  4706. if (t25)
  4707. return { updating: t25 };
  4708. if (t(e23) || e23.length === 0)
  4709. return { updating: false };
  4710. if (!this.spatialReference)
  4711. return { updating: this._spatialReferenceTask.updating };
  4712. const s30 = this._pickExtentCandidate(e23), l27 = this.spatialReference;
  4713. return s30.extent.equals(this._projectExtentTask.input) && l27.equals(this._projectExtentTask.spatialReference) ? { extent: this._projectExtentTask.output, updating: r(this._projectExtentTask.task) && !this._projectExtentTask.task.finished } : (r(this._projectExtentTask.task) && (this._projectExtentTask.task = h(this._projectExtentTask.task)), this._projectExtentTask = { input: s30.extent.clone(), output: null, spatialReference: l27.clone(), task: O(async (e24) => {
  4714. try {
  4715. const t26 = await p24(s30.extent, l27, s30.layer.portalItem, e24);
  4716. this._projectExtentTask = { ...this._projectExtentTask, task: null, output: t26 };
  4717. } catch (t26) {
  4718. if (p(e24))
  4719. return;
  4720. this._projectExtentTask = { ...this._projectExtentTask, task: null };
  4721. }
  4722. }) }, { updating: true });
  4723. }
  4724. _narrowDownSpatialReferenceCandidates(e23, t25) {
  4725. if (t(e23))
  4726. return t25;
  4727. const a34 = [], s30 = (e24, t26) => r(e24) ? r(t26) ? e24 === t26 && e24 : e24 : t26;
  4728. for (const n34 of e23)
  4729. for (const e24 of t25) {
  4730. if (!n34.spatialReference.equals(e24.spatialReference))
  4731. continue;
  4732. const t26 = s30(n34.viewingMode, e24.viewingMode);
  4733. if (t26 !== false) {
  4734. a34.push({ spatialReference: n34.spatialReference, viewingMode: t26 });
  4735. break;
  4736. }
  4737. }
  4738. return a34.length > 0 ? a34 : null;
  4739. }
  4740. _pickSpatialReferenceCandidate(e23) {
  4741. const t25 = this.defaultSpatialReference;
  4742. return t(e23) || e23.length < 1 ? r(t25) ? { spatialReference: t25, viewingMode: null } : null : (r(t25) && e23.length > 1 && e23.some(({ spatialReference: e24 }) => e24.equals(t25)) && (e23 = e23.filter(({ spatialReference: e24 }) => e24.equals(t25))), e23.length > 1 && e23.some(({ viewingMode: e24 }) => e24 !== l8.Local) && (e23 = e23.filter(({ viewingMode: e24 }) => e24 !== l8.Local)), e23[0]);
  4743. }
  4744. _getSupportedSpatialReferences(e23) {
  4745. const t25 = "supportedSpatialReferences" in e23 && e23.supportedSpatialReferences || (e23.spatialReference ? [e23.spatialReference] : []);
  4746. if (t25.length === 0)
  4747. return [];
  4748. const a34 = [];
  4749. for (const s30 of t25) {
  4750. const t26 = this.getSpatialReferenceSupport({ spatialReference: s30, layer: e23 });
  4751. if (r(t26)) {
  4752. const e24 = r(t26.constraints) ? t26.constraints : [{ spatialReference: s30, viewingMode: null }];
  4753. for (const { spatialReference: t27, viewingMode: n34 } of e24)
  4754. (!this.requiresExtentInSpatialReference || t(this.userSpatialReference) || t27.equals(this.userSpatialReference)) && a34.push({ spatialReference: t27, viewingMode: n34 });
  4755. }
  4756. }
  4757. return a34;
  4758. }
  4759. _pickExtentCandidate(e23) {
  4760. const t25 = this.spatialReference;
  4761. return e23.find(({ extent: e24 }) => t25.equals(e24.spatialReference)) || e23[0];
  4762. }
  4763. _collectLayers(e23) {
  4764. if (this._loadMaybe(this.map?.()) !== "loaded")
  4765. return { layers: [], updating: true };
  4766. const t25 = { layers: [], preloading: -1, updating: false };
  4767. for (const a34 of e23)
  4768. if (this._collectCollection(a34, t25), t25.preloading === this.sourcePreloadCount)
  4769. break;
  4770. return { layers: t25.layers, updating: t25.updating };
  4771. }
  4772. _collectCollection(e23, t25) {
  4773. if (e23.layers) {
  4774. switch (this._loadMaybe(e23.parent)) {
  4775. case "loading":
  4776. return t25.updating = true, void ++t25.preloading;
  4777. case "failed":
  4778. return;
  4779. }
  4780. for (const a34 of e23.layers) {
  4781. switch (this._loadMaybe(a34)) {
  4782. case "failed":
  4783. continue;
  4784. case "loading":
  4785. t25.updating = true, ++t25.preloading;
  4786. break;
  4787. case "loaded":
  4788. t25.updating || t25.layers.push(a34), "layers" in a34 && this._collectCollection({ layers: a34.layers }, t25);
  4789. }
  4790. if (t25.preloading === this.sourcePreloadCount)
  4791. break;
  4792. }
  4793. }
  4794. }
  4795. _loadMaybe(e23) {
  4796. return e23 && "loadStatus" in e23 ? e23.loadStatus === "not-loaded" ? (e23.load(), "loading") : e23.loadStatus : "loaded";
  4797. }
  4798. };
  4799. e([d()], h15.prototype, "required", void 0), e([d({ constructOnly: true })], h15.prototype, "map", void 0), e([d({ constructOnly: true })], h15.prototype, "getSpatialReferenceSupport", void 0), e([d()], h15.prototype, "defaultSpatialReference", void 0), e([d()], h15.prototype, "userSpatialReference", void 0), e([d()], h15.prototype, "sourcePreloadCount", void 0), e([d()], h15.prototype, "priorityCollection", void 0), e([d()], h15.prototype, "requiresExtentInSpatialReference", void 0), e([d()], h15.prototype, "suspended", void 0), e([d({ readOnly: true })], h15.prototype, "ready", null), e([d({ readOnly: true })], h15.prototype, "heightModelInfoReady", null), e([d({ readOnly: true })], h15.prototype, "spatialReference", null), e([d({ readOnly: true })], h15.prototype, "extent", null), e([d({ readOnly: true })], h15.prototype, "heightModelInfo", null), e([d({ readOnly: true })], h15.prototype, "vcsWkid", null), e([d({ readOnly: true })], h15.prototype, "latestVcsWkid", null), e([d({ readOnly: true })], h15.prototype, "viewingMode", null), e([d({ readOnly: true })], h15.prototype, "tileInfo", null), e([d({ readOnly: true })], h15.prototype, "mapCollections", null), e([d({ readOnly: true })], h15.prototype, "_allLayers", null), e([d({ readOnly: true })], h15.prototype, "_spatialReferenceTask", null), e([d({ readOnly: true })], h15.prototype, "_tileInfoTask", null), e([d({ readOnly: true })], h15.prototype, "_heightModelInfoTask", null), e([d({ readOnly: true })], h15.prototype, "_extentCandidatesTask", null), e([d()], h15.prototype, "_extentTask", null), e([d()], h15.prototype, "_projectExtentTask", void 0), h15 = e([n3("esri.views.support.DefaultsFromMap")], h15);
  4800. // node_modules/@arcgis/core/views/View.js
  4801. var U7;
  4802. var W2 = s.getLogger("esri.views.View");
  4803. var A6 = U7 = class extends a6(n5.EventedMixin(m3(y))) {
  4804. constructor(e23) {
  4805. super(e23), this._userSpatialReference = null, this._cursor = null, this.allLayerViews = new p4({ getCollections: () => [this.basemapView?.baseLayerViews, this.groundView?.layerViews, this.layerViews, this.basemapView?.referenceLayerViews], getChildrenFunction: (e24) => e24.layerViews }), this.groundView = null, this.animation = null, this.basemapView = null, this.fatalError = null, this.extent = null, this.graphics = new c8(), this.analyses = new n18(), this.navigating = false, this.typeSpecificPreconditionsReady = true, this.layerViews = new j3(), this.magnifier = new p18(), this.padding = { left: 0, top: 0, right: 0, bottom: 0 }, this.ready = false, this.spatialReferenceWarningDelay = 1e3, this.supportsGround = true, this.timeExtent = null, this.type = null, this.scale = null, this.updating = false, this.initialExtentRequired = true, this.input = new a17(), this.navigation = new p22(), this.layerViewManager = null, this.analysisViewManager = null, this.isHeightModelInfoRequired = false, this.width = null, this.height = null, this.resizing = false, this.suspended = false, this.viewEvents = new p19(this), this.persistableViewModels = new j3(), this._isValid = false, this._readyCycleForced = false, this.handles.add(l4(() => this.preconditionsReady, (e24) => {
  4806. e24 ? (this._currentSpatialReference = this.spatialReference, U7.views.add(this)) : (this._currentSpatialReference = null, U7.views.remove(this)), this.notifyChange("spatialReference"), !e24 && this.ready ? (this.layerViewManager?.clear(), this.toolViewManager?.detach(), r(this.analysisViewManager) && this.analysisViewManager.detach(), this._teardown()) : e24 && !this.ready && (this._startup(), r(this.analysisViewManager) && this.analysisViewManager.attach(), this.toolViewManager.attach());
  4807. }, U));
  4808. }
  4809. initialize() {
  4810. this.addResolvingPromise(this.validate().then(() => (this._isValid = true, j4(() => this.ready)))), this.basemapView = new p17({ view: this }), this.layerViewManager = new M8({ view: this, layerViewImporter: { importLayerView: (e23) => this.importLayerView(e23), hasLayerViewModule: (e23) => this.hasLayerViewModule(e23) }, supportsGround: this.supportsGround }), this.toolViewManager = new j11({ view: this }), this._setupSpatialReferenceLogger(), this.handles.add([l4(() => this.initialExtentRequired, (e23) => this.defaultsFromMap.required = { ...this.defaultsFromMap.required, extent: e23 }, { sync: true, initial: true }), l4(() => this.ready, (e23) => {
  4811. this.defaultsFromMap && (this.defaultsFromMap.suspended = e23, this.defaultsFromMap.userSpatialReference = e23 ? this.spatialReference : this._userSpatialReference);
  4812. }, { sync: true }), l4(() => this._userSpatialReference, (e23) => {
  4813. this.defaultsFromMap && (this.defaultsFromMap.userSpatialReference = e23);
  4814. }, { sync: true, initial: true })]);
  4815. }
  4816. _setupSpatialReferenceLogger() {
  4817. let e23 = null;
  4818. this.handles.add([l4(() => this.defaultsFromMap?.ready, (t25) => {
  4819. const i32 = this.map?.allLayers.length > 0;
  4820. if (t25 && !this.spatialReference && i32) {
  4821. if (r(e23))
  4822. return;
  4823. const t26 = n2(() => e23 = h(e23));
  4824. e23 = O(async (t27) => {
  4825. try {
  4826. await L(this.spatialReferenceWarningDelay, null, t27);
  4827. } catch {
  4828. return;
  4829. } finally {
  4830. e23 = null;
  4831. }
  4832. W2.warn("#spatialReference", "no spatial reference could be derived from the currently added map layers");
  4833. }), this.handles.add(t26, "spatial-reference-logger-task");
  4834. } else
  4835. this.handles.remove("spatial-reference-logger-task");
  4836. }, { sync: true })]);
  4837. }
  4838. destroy() {
  4839. if (this.destroyed)
  4840. return;
  4841. this.viewEvents.destroy(), this.allLayerViews.destroy(), this.navigation && (this.navigation.destroy(), this._set("navigation", null)), this.graphics = l(this.graphics), this.analyses = l(this.analyses), this.handles.remove("defaultsFromMap"), this.defaultsFromMap.destroy(), this._set("defaultsFromMap", null), l(this.analysisViewManager), this.toolViewManager = l(this.toolViewManager), this.layerViewManager = l(this.layerViewManager), this.basemapView = l(this.basemapView), this.invalidate(), this._emitter.clear(), this.handles.removeAll();
  4842. const e23 = this.map;
  4843. this.map = null, e23?.destroy();
  4844. }
  4845. _startup() {
  4846. this._set("ready", true);
  4847. }
  4848. _teardown() {
  4849. this._set("ready", false);
  4850. }
  4851. whenReady() {
  4852. return Promise.resolve(this);
  4853. }
  4854. toMap() {
  4855. return W2.error("#toMap()", "Not implemented on this instance of View"), null;
  4856. }
  4857. get _defaultsFromMapSettings() {
  4858. return {};
  4859. }
  4860. get defaultsFromMap() {
  4861. return new h15({ required: { tileInfo: false, heightModelInfo: false, extent: false }, map: () => this.map, getSpatialReferenceSupport: (e23) => this.getSpatialReferenceSupport(e23), ...this._defaultsFromMapSettings });
  4862. }
  4863. get heightModelInfo() {
  4864. return this.getDefaultHeightModelInfo();
  4865. }
  4866. get interacting() {
  4867. return this.navigating;
  4868. }
  4869. get preconditionsReady() {
  4870. return !(this.fatalError || !this._isValid || this._readyCycleForced || !this.map || m8.isLoadable(this.map) && !this.map.loaded || this.width === 0 || this.height === 0 || !this.spatialReference || !this._validateSpatialReference(this.spatialReference) || !this._currentSpatialReference && !this.defaultsFromMap?.ready || !this.typeSpecificPreconditionsReady);
  4871. }
  4872. set map(e23) {
  4873. e23 !== this._get("map") && (e23?.destroyed && (W2.warn("#map", "The provided map is already destroyed", { map: e23 }), e23 = null), m8.isLoadable(e23) && e23.load().catch(() => {
  4874. }), this.initialized && (this.forceReadyCycle(), this._currentSpatialReference = null), this._set("map", e23));
  4875. }
  4876. get spatialReference() {
  4877. let e23 = this._userSpatialReference || this._currentSpatialReference || this.getDefaultSpatialReference() || null;
  4878. return e23 && this.defaultsFromMap?.required?.heightModelInfo && (e23 = e23.clone(), e23.vcsWkid = this.defaultsFromMap.vcsWkid, e23.latestVcsWkid = this.defaultsFromMap.latestVcsWkid), e23;
  4879. }
  4880. set spatialReference(e23) {
  4881. const t25 = !E2(e23, this._get("spatialReference"));
  4882. this._set("_userSpatialReference", e23), t25 && (this._set("spatialReference", e23), this._spatialReferenceChanged(e23));
  4883. }
  4884. _spatialReferenceChanged(e23) {
  4885. }
  4886. get stationary() {
  4887. return !this.animation && !this.navigating && !this.resizing;
  4888. }
  4889. get initialExtent() {
  4890. return this.defaultsFromMap?.extent;
  4891. }
  4892. get cursor() {
  4893. const e23 = this.toolViewManager ? this.toolViewManager.cursor : null;
  4894. return r(e23) ? e23 : this._cursor || "default";
  4895. }
  4896. set cursor(e23) {
  4897. this._cursor = e23, this.notifyChange("cursor");
  4898. }
  4899. get size() {
  4900. return [this.width, this.height];
  4901. }
  4902. whenLayerView(e23) {
  4903. return this.layerViewManager.whenLayerView(e23);
  4904. }
  4905. getDefaultSpatialReference() {
  4906. return this.defaultsFromMap?.spatialReference;
  4907. }
  4908. getDefaultHeightModelInfo() {
  4909. return (this.map && "heightModelInfo" in this.map ? this.map.heightModelInfo : void 0) ?? this.defaultsFromMap?.heightModelInfo ?? null;
  4910. }
  4911. importLayerView(e23) {
  4912. throw new s2("importLayerView() not implemented");
  4913. }
  4914. hasLayerViewModule(e23) {
  4915. return false;
  4916. }
  4917. async validate() {
  4918. }
  4919. invalidate() {
  4920. this._isValid = false;
  4921. }
  4922. getSpatialReferenceSupport() {
  4923. return { constraints: null };
  4924. }
  4925. _validateSpatialReference(e23) {
  4926. return r(this.getSpatialReferenceSupport({ spatialReference: e23 }));
  4927. }
  4928. when(e23, t25) {
  4929. return this.isResolved() && !this.ready && W2.warn("#when()", "Calling view.when() while the view is no longer ready but was already resolved once will resolve immediately. Use reactiveUtils.whenOnce(() => view.ready).then(...) instead."), super.when(e23, t25);
  4930. }
  4931. forceReadyCycle() {
  4932. this.ready && (f2(() => this.preconditionsReady === false, () => this._readyCycleForced = false, { once: true }), this._readyCycleForced = true);
  4933. }
  4934. addAndActivateTool(e23) {
  4935. this.toolViewManager.tools.add(e23), this.activeTool = e23;
  4936. }
  4937. tryFatalErrorRecovery() {
  4938. this.fatalError = null;
  4939. }
  4940. };
  4941. A6.views = new j3(), e([d()], A6.prototype, "_userSpatialReference", void 0), e([o9("toolViewManager.activeTool")], A6.prototype, "activeTool", void 0), e([d({ readOnly: true })], A6.prototype, "allLayerViews", void 0), e([d()], A6.prototype, "groundView", void 0), e([d()], A6.prototype, "animation", void 0), e([d()], A6.prototype, "basemapView", void 0), e([d({ readOnly: true })], A6.prototype, "_defaultsFromMapSettings", null), e([d()], A6.prototype, "defaultsFromMap", null), e([d()], A6.prototype, "fatalError", void 0), e([d({ type: M2 })], A6.prototype, "extent", void 0), e([d(a9(c8, "graphics"))], A6.prototype, "graphics", void 0), e([d(a9(n18, "analyses"))], A6.prototype, "analyses", void 0), e([d({ readOnly: true, type: v5 })], A6.prototype, "heightModelInfo", null), e([d({ readOnly: true })], A6.prototype, "interacting", null), e([d({ readOnly: true })], A6.prototype, "navigating", void 0), e([d({ readOnly: true, dependsOn: ["fatalError", "_isValid", "_readyCycleForced", "map", "map.loaded?", "width", "height", "spatialReference", "_currentSpatialReference", "defaultsFromMap.ready", "typeSpecificPreconditionsReady"] })], A6.prototype, "preconditionsReady", null), e([d({ readOnly: true })], A6.prototype, "typeSpecificPreconditionsReady", void 0), e([d({ type: j3, readOnly: true })], A6.prototype, "layerViews", void 0), e([d({ type: p18 })], A6.prototype, "magnifier", void 0), e([d({ value: null, type: L4 })], A6.prototype, "map", null), e([d()], A6.prototype, "padding", void 0), e([d({ readOnly: true })], A6.prototype, "ready", void 0), e([d({ type: k2 })], A6.prototype, "spatialReference", null), e([d()], A6.prototype, "spatialReferenceWarningDelay", void 0), e([d()], A6.prototype, "stationary", null), e([d({ readOnly: true })], A6.prototype, "supportsGround", void 0), e([d({ type: y2 })], A6.prototype, "timeExtent", void 0), e([o9("toolViewManager.tools")], A6.prototype, "tools", void 0), e([d()], A6.prototype, "toolViewManager", void 0), e([d({ readOnly: true })], A6.prototype, "type", void 0), e([d({ type: Number })], A6.prototype, "scale", void 0), e([d({ readOnly: true })], A6.prototype, "updating", void 0), e([d({ readOnly: true })], A6.prototype, "initialExtentRequired", void 0), e([d({ readOnly: true })], A6.prototype, "initialExtent", null), e([d()], A6.prototype, "cursor", null), e([d({ readOnly: true })], A6.prototype, "input", void 0), e([d({ type: p22, nonNullable: true })], A6.prototype, "navigation", void 0), e([d()], A6.prototype, "layerViewManager", void 0), e([d()], A6.prototype, "analysisViewManager", void 0), e([d()], A6.prototype, "width", void 0), e([d()], A6.prototype, "height", void 0), e([d({ readOnly: true })], A6.prototype, "resizing", void 0), e([d({ value: null, readOnly: true })], A6.prototype, "size", null), e([d({ readOnly: true })], A6.prototype, "suspended", void 0), e([d({ readOnly: true })], A6.prototype, "viewEvents", void 0), e([d({ readOnly: true })], A6.prototype, "persistableViewModels", void 0), e([d()], A6.prototype, "_isValid", void 0), e([d()], A6.prototype, "_readyCycleForced", void 0), e([d()], A6.prototype, "_currentSpatialReference", void 0), A6 = U7 = e([n3("esri.views.View")], A6);
  4942. var G4 = A6;
  4943. // node_modules/@arcgis/core/views/ViewAnimation.js
  4944. var p25 = class extends _ {
  4945. constructor(t25) {
  4946. super(t25), this.state = "running", this.target = null;
  4947. }
  4948. initialize() {
  4949. this.addResolvingPromise(new Promise((t25, s30) => this._dfd = { resolve: t25, reject: s30 }));
  4950. }
  4951. get done() {
  4952. return this.state === "finished" || this.state === "stopped";
  4953. }
  4954. stop() {
  4955. this.state !== "stopped" && this.state !== "finished" && (this._set("state", "stopped"), this._dfd.reject(new s2("ViewAnimation stopped")));
  4956. }
  4957. finish() {
  4958. this.state !== "stopped" && this.state !== "finished" && (this._set("state", "finished"), this._dfd.resolve());
  4959. }
  4960. update(t25, s30) {
  4961. s30 || (s30 = k(t25) ? "waiting-for-target" : "running"), this._set("target", t25), this._set("state", s30);
  4962. }
  4963. };
  4964. e([d({ readOnly: true })], p25.prototype, "done", null), e([d({ readOnly: true, type: String })], p25.prototype, "state", void 0), e([d()], p25.prototype, "target", void 0), p25 = e([n3("esri.views.ViewAnimation")], p25), function(t25) {
  4965. t25.State = { RUNNING: "running", STOPPED: "stopped", FINISHED: "finished", WAITING_FOR_TARGET: "waiting-for-target" };
  4966. }(p25 || (p25 = {}));
  4967. var n22 = p25;
  4968. // node_modules/@arcgis/core/views/2d/AnimationManager.js
  4969. var m22 = class {
  4970. constructor(t25, i32, s30, e23) {
  4971. const o30 = t25.targetGeometry, n34 = i32.targetGeometry;
  4972. e23 ? typeof e23 == "string" && (e23 = r11(e23) || t11.ease) : e23 = t11.ease, this.easing = e23, this.duration = s30, this.sCenterX = o30.x, this.sCenterY = o30.y, this.sScale = t25.scale, this.sRotation = t25.rotation, this.tCenterX = n34.x, this.tCenterY = n34.y, this.tScale = i32.scale, this.tRotation = i32.rotation, this.dCenterX = this.tCenterX - this.sCenterX, this.dCenterY = this.tCenterY - this.sCenterY, this.dScale = this.tScale - this.sScale, this.dRotation = this.tRotation - this.sRotation, this.dRotation > 180 ? this.dRotation -= 360 : this.dRotation < -180 && (this.dRotation += 360);
  4973. }
  4974. applyRatio(t25, i32) {
  4975. const s30 = this.easing(i32);
  4976. let e23, o30, n34, a34;
  4977. i32 >= 1 ? (e23 = this.tCenterX, o30 = this.tCenterY, n34 = this.tRotation, a34 = this.tScale) : (e23 = this.sCenterX + s30 * this.dCenterX, o30 = this.sCenterY + s30 * this.dCenterY, n34 = this.sRotation + s30 * this.dRotation, a34 = this.sScale + s30 * this.dScale), t25.targetGeometry.x = e23, t25.targetGeometry.y = o30, t25.scale = a34, t25.rotation = n34;
  4978. }
  4979. };
  4980. var u16 = class extends y {
  4981. constructor(t25) {
  4982. super(t25), this.duration = 200, this.transition = null, this.easing = t11.ease, this.view = null, this.viewpoint = null, this.viewpoint = new u5({ targetGeometry: new j2(), scale: 0, rotation: 0 }), this._updateTask = A({ postRender: this._postRender.bind(this) }), this._updateTask.pause();
  4983. }
  4984. destroy() {
  4985. this._updateTask.remove(), this._updateTask = null;
  4986. }
  4987. animate(t25, i32, s30) {
  4988. this.stop();
  4989. const e23 = this.viewpoint;
  4990. Z(e23, i32), this.transition = new m22(this.viewpoint, t25.target, s30 && s30.duration || this.duration, s30 && s30.easing || this.easing);
  4991. const o30 = () => {
  4992. this.animation === t25 && this._updateTask && (t25.state === "finished" && (this.transition.applyRatio(this.viewpoint, 1), this.view.state && (this.view.state.viewpoint = this.viewpoint.clone())), this.animation = null, this.updateFunction = null);
  4993. };
  4994. return t25.when(o30, o30), this._startTime = performance.now(), this._updateTask.resume(), this.animation = t25, t25;
  4995. }
  4996. animateContinous(t25, i32) {
  4997. this.stop(), this.updateFunction = i32, this.viewpoint = t25;
  4998. const s30 = new n22({ target: t25.clone() }), e23 = () => {
  4999. this.animation === s30 && this._updateTask && (this.animation = null, this.updateFunction = null);
  5000. };
  5001. return s30.when(e23, e23), this._startTime = performance.now(), this._updateTask.resume(), this.animation = s30, s30;
  5002. }
  5003. stop() {
  5004. this.animation && (this.animation.stop(), this.animation = null, this.updateFunction = null);
  5005. }
  5006. _postRender(t25) {
  5007. const i32 = this.animation;
  5008. if (i32 && i32.state !== n22.State.STOPPED) {
  5009. if (this.updateFunction)
  5010. this.updateFunction(this.viewpoint, t25.deltaTime);
  5011. else {
  5012. const t26 = (performance.now() - this._startTime) / this.transition.duration, i33 = t26 >= 1;
  5013. this.transition.applyRatio(this.viewpoint, t26), i33 && this.animation.finish();
  5014. }
  5015. this.view.state && (this.view.state.viewpoint = this.viewpoint.clone());
  5016. } else
  5017. this._updateTask.pause();
  5018. }
  5019. };
  5020. e([d()], u16.prototype, "animation", void 0), e([d()], u16.prototype, "duration", void 0), e([d()], u16.prototype, "transition", void 0), e([d()], u16.prototype, "easing", void 0), e([d()], u16.prototype, "view", void 0), e([d()], u16.prototype, "viewpoint", void 0), u16 = e([n3("esri.views.2d.AnimationManager")], u16);
  5021. var d13 = u16;
  5022. // node_modules/@arcgis/core/views/2d/FrameTask.js
  5023. var s19 = class {
  5024. constructor(t25) {
  5025. this.view = t25, this._frameTaskHandle = null, this._updateRequested = false, this.stationary = true, this.animationInProgress = false, this.prepare = () => {
  5026. this._updateParameters.state = this.view.state, this._updateParameters.stationary = this.view.stationary, this._updateParameters.pixelRatio = window.devicePixelRatio, this._updateParameters.renderingOptions = this.view.renderingOptions;
  5027. }, this.update = () => {
  5028. this._updateRequested = false;
  5029. const { basemapView: t26, graphicsView: a34, labelManager: s30, layerViews: i32, state: { id: r24 } } = this.view;
  5030. t26.baseLayerViews.forEach(this._updateLayerView, this), i32.forEach(this._updateLayerView, this), t26.referenceLayerViews.forEach(this._updateLayerView, this), r(s30) && (s30.lastUpdateId !== r24 && (s30.viewChange(), s30.lastUpdateId = r24), s30.updateRequested && s30.processUpdate(this._updateParameters)), r(a34) && (a34.lastUpdateId !== r24 && (a34.viewChange(), a34.lastUpdateId = r24), a34.updateRequested && a34.processUpdate(this._updateParameters)), this.view.graphicsTileStore.setViewState(this._updateParameters.state), this.animationInProgress || this._updateRequested || this._frameTaskHandle.pause();
  5031. };
  5032. }
  5033. destroy() {
  5034. this.stop();
  5035. }
  5036. start() {
  5037. if (this._frameTaskHandle)
  5038. return;
  5039. const e23 = this.view;
  5040. this.stationary = e23.stationary, this._updateParameters = { state: e23.state, pixelRatio: window.devicePixelRatio, stationary: this.stationary, renderingOptions: e23.renderingOptions }, this._stationaryHandle = l4(() => e23.stationary, (e24) => {
  5041. this.stationary = e24, this.requestFrame();
  5042. }), this._frameTaskHandle = A(this), this.requestUpdate();
  5043. }
  5044. stop() {
  5045. this._frameTaskHandle && (this._updateRequested = false, this._stationaryHandle.remove(), this._frameTaskHandle.remove(), this._updateParameters = this._stationaryHandle = this._frameTaskHandle = null, this.stationary = true, this.animationInProgress = false);
  5046. }
  5047. requestUpdate() {
  5048. this._updateRequested || (this._updateRequested = true, this.requestFrame());
  5049. }
  5050. requestFrame() {
  5051. this._frameTaskHandle && this._frameTaskHandle.resume();
  5052. }
  5053. _updateLayerView(e23) {
  5054. const t25 = this.view.state, a34 = e23.lastUpdateId;
  5055. a34 != null && (this.stationary || e23.moving) || (e23.moving = true, e23.moveStart()), a34 !== t25.id && e23.viewChange(), this.stationary && e23.moving && (e23.moving = false, e23.moveEnd()), e23.lastUpdateId = t25.id, e23.updateRequested && e23.processUpdate(this._updateParameters), "layerViews" in e23 && e23.layerViews.forEach(this._updateLayerView, this);
  5056. }
  5057. };
  5058. // node_modules/@arcgis/core/views/2d/layerViewModuleImportUtils.js
  5059. function s20() {
  5060. return Promise.all([import("./webglDeps-KBPNVQNX.js"), import("./mapViewDeps-56OJ7M5D.js")]);
  5061. }
  5062. var a20 = () => s20().then(() => import("./TileLayerView2D-4NJG3IPF.js"));
  5063. var i23 = () => s20().then(() => import("./FeatureLayerView2D-T24YVAML.js"));
  5064. var o23 = { "base-dynamic": () => s20().then(() => import("./BaseDynamicLayerView2D-RTE2HFAS.js")), "base-tile": a20, "bing-maps": a20, csv: i23, "geo-rss": () => s20().then(() => import("./GeoRSSLayerView2D-R3EIYHG2.js")), feature: i23, geojson: i23, graphics: () => s20().then(() => import("./GraphicsLayerView2D-TX2RGTD7.js")), group: () => s20().then(() => import("./GroupLayerView2D-VIMXGFZB.js")), imagery: () => s20().then(() => import("./ImageryLayerView2D-MZIFSUX7.js")), "imagery-tile": () => s20().then(() => import("./ImageryTileLayerView2D-HWIZTOT3.js")), kml: () => s20().then(() => import("./KMLLayerView2D-DY5PTMK4.js")), "map-image": () => s20().then(() => import("./MapImageLayerView2D-FYICZIN6.js")), "map-notes": () => s20().then(() => import("./MapNotesLayerView2D-LZWRGLL4.js")), media: () => s20().then(() => import("./MediaLayerView2D-5BSK3PWF.js")), "ogc-feature": () => s20().then(() => import("./OGCFeatureLayerView2D-5V6JYQHI.js")), "open-street-map": a20, route: () => s20().then(() => import("./RouteLayerView2D-JVBXSG6N.js")), stream: () => s20().then(() => import("./StreamLayerView2D-5TYMSFCF.js")), "subtype-group": () => s20().then(() => import("./SubtypeGroupLayerView2D-I4YXTADP.js")), tile: a20, "vector-tile": () => s20().then(() => import("./VectorTileLayerView2D-CYC5MZOG.js")), wcs: () => s20().then(() => import("./ImageryTileLayerView2D-HWIZTOT3.js")), "web-tile": a20, wfs: i23, wms: () => s20().then(() => import("./WMSLayerView2D-YJQTLBD4.js")), wmts: () => s20().then(() => import("./WMTSLayerView2D-TR327MSG.js")), "line-of-sight": null, "base-elevation": null, "building-scene": null, elevation: null, "integrated-mesh": null, "point-cloud": null, voxel: null, scene: null, unknown: null, unsupported: null };
  5065. function l19(r24) {
  5066. const t25 = r24.declaredClass ? r24.declaredClass.slice(r24.declaredClass.lastIndexOf(".") + 1) : "Unknown", s30 = t25.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
  5067. return new s2(`${s30}:view-not-supported`, `${t25} is not supported in 2D`);
  5068. }
  5069. var n23 = { hasLayerViewModule: (e23) => r(o23[e23.type]), importLayerView: (e23) => {
  5070. const r24 = o23[e23.type];
  5071. if (t(r24))
  5072. throw l19(e23);
  5073. return r24(e23);
  5074. } };
  5075. // node_modules/@arcgis/core/geometry/support/near.js
  5076. function o24(o30, m29) {
  5077. const { spatialReference: r24 } = m29, i32 = [m29.x, m29.y];
  5078. let s30 = Number.POSITIVE_INFINITY, x5 = 0, c42 = 0;
  5079. const a34 = [0, 0], f14 = o30.type === "extent" ? [[[o30.xmin, o30.ymin], [o30.xmin, o30.ymax], [o30.xmax, o30.ymax], [o30.xmax, o30.ymin], [o30.xmin, o30.ymin]]] : o30.rings;
  5080. for (const n34 of f14)
  5081. for (let o31 = 0; o31 < n34.length - 1; o31++) {
  5082. o2(a34, i32, n34, o31);
  5083. const m30 = m5(i32, a34);
  5084. m30 < s30 && (s30 = m30, x5 = a34[0], c42 = a34[1]);
  5085. }
  5086. return { coordinate: new j2({ x: x5, y: c42, spatialReference: r24 }), distance: s30 };
  5087. }
  5088. // node_modules/@arcgis/core/views/2d/constraints/GeometryConstraint.js
  5089. var p26;
  5090. var l20 = s.getLogger("esri.views.MapView");
  5091. var y13 = p26 = class extends y {
  5092. constructor(e23) {
  5093. super(e23), this.geometry = null, this.spatialReference = null;
  5094. }
  5095. get normalizedGeometry() {
  5096. if (t(this.geometry) || !this.spatialReference)
  5097. return null;
  5098. if (!this.spatialReference.equals(this.geometry.spatialReference))
  5099. try {
  5100. return rn(this.geometry, this.spatialReference);
  5101. } catch (e23) {
  5102. return l20.error("#constraints.geometry", "could not project the geometry to the view's spatial reference", { geometry: this.geometry, spatialReference: this.spatialReference, error: e23 }), null;
  5103. }
  5104. return this.geometry;
  5105. }
  5106. constrain(e23, r24) {
  5107. if (t(this.normalizedGeometry))
  5108. return e23;
  5109. const t25 = e23.targetGeometry;
  5110. if (this.normalizedGeometry.type === "extent" ? r4(this.normalizedGeometry, t25) : c(this.normalizedGeometry, t25))
  5111. return e23;
  5112. const { coordinate: s30 } = o24(this.normalizedGeometry, t25);
  5113. return s30 ? (e23.targetGeometry = s30, e23) : e23;
  5114. }
  5115. clone() {
  5116. return new p26({ geometry: this.geometry?.clone(), spatialReference: this.spatialReference?.clone() });
  5117. }
  5118. };
  5119. e([d({ constructOnly: true })], y13.prototype, "geometry", void 0), e([d({ readOnly: true })], y13.prototype, "normalizedGeometry", null), e([d({ constructOnly: true })], y13.prototype, "spatialReference", void 0), y13 = p26 = e([n3("esri.views.2d.constraints.GeometryConstraint")], y13);
  5120. // node_modules/@arcgis/core/views/2d/constraints/RotationConstraint.js
  5121. var s21;
  5122. var a21 = s21 = class extends y {
  5123. constructor() {
  5124. super(...arguments), this.enabled = true, this.rotationEnabled = true;
  5125. }
  5126. constrain(o30, r24) {
  5127. return this.enabled && r24 ? (this.rotationEnabled || (o30.rotation = r24.rotation), o30) : o30;
  5128. }
  5129. clone() {
  5130. return new s21({ enabled: this.enabled, rotationEnabled: this.rotationEnabled });
  5131. }
  5132. };
  5133. e([d()], a21.prototype, "enabled", void 0), e([d()], a21.prototype, "rotationEnabled", void 0), a21 = s21 = e([n3("esri.views.2d.constraints.RotationConstraint")], a21);
  5134. var n24 = a21;
  5135. // node_modules/@arcgis/core/views/2d/constraints/ZoomConstraint.js
  5136. var i24;
  5137. var a22 = i24 = class extends y {
  5138. constructor(e23) {
  5139. super(e23), this._lodByScale = {}, this._scales = [], this.effectiveLODs = null, this.effectiveMinZoom = -1, this.effectiveMaxZoom = -1, this.effectiveMinScale = 0, this.effectiveMaxScale = 0, this.lods = null, this.minZoom = -1, this.maxZoom = -1, this.minScale = 0, this.maxScale = 0, this.snapToZoom = true;
  5140. }
  5141. initialize() {
  5142. let e23, { lods: t25, minScale: o30, maxScale: s30, minZoom: i32, maxZoom: a34 } = this, c42 = -1, r24 = -1, l27 = false, n34 = false;
  5143. if (o30 !== 0 && s30 !== 0 && o30 < s30 && ([o30, s30] = [s30, o30]), !t25 || !t25.length)
  5144. return this._set("effectiveMinScale", o30), void this._set("effectiveMaxScale", s30);
  5145. t25 = t25.map((e24) => e24.clone()), t25.sort((e24, t26) => t26.scale - e24.scale), t25.forEach((e24, t26) => e24.level = t26);
  5146. for (const f14 of t25)
  5147. !l27 && o30 > 0 && o30 >= f14.scale && (c42 = f14.level, l27 = true), !n34 && s30 > 0 && s30 >= f14.scale && (r24 = e23 ? e23.level : -1, n34 = true), e23 = f14;
  5148. i32 === -1 && (i32 = o30 === 0 ? 0 : c42), a34 === -1 && (a34 = s30 === 0 ? t25.length - 1 : r24), i32 = Math.max(i32, 0), i32 = Math.min(i32, t25.length - 1), a34 = Math.max(a34, 0), a34 = Math.min(a34, t25.length - 1), i32 > a34 && ([i32, a34] = [a34, i32]), o30 = t25[i32].scale, s30 = t25[a34].scale, t25.splice(0, i32), t25.splice(a34 - i32 + 1, t25.length), t25.forEach((e24, t26) => {
  5149. this._lodByScale[e24.scale] = e24, this._scales[t26] = e24.scale;
  5150. }), this._set("effectiveLODs", t25), this._set("effectiveMinZoom", i32), this._set("effectiveMaxZoom", a34), this._set("effectiveMinScale", o30), this._set("effectiveMaxScale", s30);
  5151. }
  5152. constrain(e23, t25) {
  5153. if (t25 && e23.scale === t25.scale)
  5154. return e23;
  5155. const o30 = this.effectiveMinScale, s30 = this.effectiveMaxScale, i32 = e23.targetGeometry, a34 = t25 && t25.targetGeometry, c42 = s30 !== 0 && e23.scale < s30, r24 = o30 !== 0 && e23.scale > o30;
  5156. if (c42 || r24) {
  5157. const c43 = r24 ? o30 : s30;
  5158. if (a34) {
  5159. const o31 = (c43 - t25.scale) / (e23.scale - t25.scale);
  5160. i32.x = a34.x + (i32.x - a34.x) * o31, i32.y = a34.y + (i32.y - a34.y) * o31;
  5161. }
  5162. e23.scale = c43;
  5163. }
  5164. return this.snapToZoom && this.effectiveLODs && (e23.scale = this._getClosestScale(e23.scale)), e23;
  5165. }
  5166. fit(e23) {
  5167. if (!this.effectiveLODs || !this.snapToZoom)
  5168. return this.constrain(e23, null);
  5169. const t25 = this.scaleToZoom(e23.scale), o30 = Math.abs(t25 - Math.floor(t25));
  5170. return e23.scale = this.zoomToScale(o30 > 0.99 ? Math.round(t25) : Math.floor(t25)), e23;
  5171. }
  5172. zoomToScale(e23) {
  5173. if (!this.effectiveLODs)
  5174. return 0;
  5175. e23 -= this.effectiveMinZoom, e23 = Math.max(0, e23);
  5176. const t25 = this._scales;
  5177. if (e23 <= 0)
  5178. return t25[0];
  5179. if (e23 >= t25.length)
  5180. return t25[t25.length - 1];
  5181. const o30 = Math.round(e23 - 0.5), s30 = Math.round(e23);
  5182. return t25[s30] + (s30 - e23) * (t25[o30] - t25[s30]);
  5183. }
  5184. scaleToZoom(e23) {
  5185. if (!this.effectiveLODs)
  5186. return -1;
  5187. const t25 = this._scales;
  5188. let o30, s30;
  5189. if (e23 >= t25[0])
  5190. return this.effectiveMinZoom;
  5191. if (e23 <= t25[t25.length - 1])
  5192. return this.effectiveMaxZoom;
  5193. for (let i32 = 0; i32 < t25.length - 1; i32++) {
  5194. if (o30 = t25[i32], s30 = t25[i32 + 1], s30 === e23) {
  5195. return i32 + this.effectiveMinZoom + 1;
  5196. }
  5197. if (o30 > e23 && s30 < e23) {
  5198. return i32 + this.effectiveMinZoom + 1 - (e23 - s30) / (o30 - s30);
  5199. }
  5200. }
  5201. }
  5202. snapToClosestScale(e23) {
  5203. if (!this.effectiveLODs)
  5204. return e23;
  5205. const t25 = this.scaleToZoom(e23);
  5206. return this.zoomToScale(Math.round(t25));
  5207. }
  5208. snapToNextScale(e23, t25 = 0.5) {
  5209. if (!this.effectiveLODs)
  5210. return e23 * t25;
  5211. const o30 = Math.round(this.scaleToZoom(e23));
  5212. return this.zoomToScale(o30 + 1);
  5213. }
  5214. snapToPreviousScale(e23, t25 = 2) {
  5215. if (!this.effectiveLODs)
  5216. return e23 * t25;
  5217. const o30 = Math.round(this.scaleToZoom(e23));
  5218. return this.zoomToScale(o30 - 1);
  5219. }
  5220. clone() {
  5221. return new i24({ lods: this.lods, minZoom: this.minZoom, maxZoom: this.maxZoom, minScale: this.minScale, maxScale: this.maxScale });
  5222. }
  5223. _getClosestScale(e23) {
  5224. return this._lodByScale[e23] || (e23 = this._scales.reduce((t25, o30) => Math.abs(o30 - e23) <= Math.abs(t25 - e23) ? o30 : t25, this._scales[0])), this._lodByScale[e23].scale;
  5225. }
  5226. };
  5227. e([d({ readOnly: true })], a22.prototype, "effectiveLODs", void 0), e([d({ readOnly: true })], a22.prototype, "effectiveMinZoom", void 0), e([d({ readOnly: true })], a22.prototype, "effectiveMaxZoom", void 0), e([d({ readOnly: true })], a22.prototype, "effectiveMinScale", void 0), e([d({ readOnly: true })], a22.prototype, "effectiveMaxScale", void 0), e([d()], a22.prototype, "lods", void 0), e([d()], a22.prototype, "minZoom", void 0), e([d()], a22.prototype, "maxZoom", void 0), e([d()], a22.prototype, "minScale", void 0), e([d()], a22.prototype, "maxScale", void 0), e([d()], a22.prototype, "snapToZoom", void 0), a22 = i24 = e([n3("esri.views.2d.constraints.ZoomConstraint")], a22);
  5228. var c31 = a22;
  5229. // node_modules/@arcgis/core/views/2d/MapViewConstraints.js
  5230. var p27 = { base: null, key: "type", typeMap: { extent: M2, polygon: v3 } };
  5231. var c32 = class extends y {
  5232. constructor(o30) {
  5233. super(o30), this.lods = null, this.minScale = 0, this.maxScale = 0, this.minZoom = -1, this.maxZoom = -1, this.rotationEnabled = true, this.snapToZoom = true;
  5234. }
  5235. destroy() {
  5236. this.view = null, this._set("_zoom", null), this._set("_rotation", null), this._set("_geometry", null);
  5237. }
  5238. set geometry(o30) {
  5239. o30 ? this._set("geometry", o30) : this._set("geometry", null);
  5240. }
  5241. get version() {
  5242. return this.commitProperty("_zoom"), this.commitProperty("_rotation"), this.commitProperty("_geometry"), (this._get("version") ?? 0) + 1;
  5243. }
  5244. get _defaultLODs() {
  5245. const o30 = this.view?.defaultsFromMap?.tileInfo, t25 = this.view?.spatialReference;
  5246. return o30 && t25 && o30.spatialReference.equals(t25) ? o30.lods : null;
  5247. }
  5248. get _geometry() {
  5249. return new y13({ geometry: this.geometry, spatialReference: this.view?.spatialReference });
  5250. }
  5251. get _rotation() {
  5252. return new n24({ rotationEnabled: this.rotationEnabled });
  5253. }
  5254. get _zoom() {
  5255. const o30 = this._get("_zoom"), t25 = this.lods || this._defaultLODs, e23 = this.minZoom, r24 = this.maxZoom, s30 = this.minScale, i32 = this.maxScale, n34 = this.snapToZoom;
  5256. return o30 && o30.lods === t25 && o30.minZoom === e23 && o30.maxZoom === r24 && o30.minScale === s30 && o30.maxScale === i32 && o30.snapToZoom === n34 ? o30 : new c31({ lods: t25, minZoom: e23, maxZoom: r24, minScale: s30, maxScale: i32, snapToZoom: n34 });
  5257. }
  5258. canZoomInTo(o30) {
  5259. const t25 = this.effectiveMaxScale;
  5260. return t25 === 0 || o30 >= t25;
  5261. }
  5262. canZoomOutTo(o30) {
  5263. const t25 = this.effectiveMinScale;
  5264. return t25 === 0 || o30 <= t25;
  5265. }
  5266. constrain(o30, t25) {
  5267. return this._zoom.constrain(o30, t25), this._rotation.constrain(o30, t25), this._geometry.constrain(o30, t25), o30;
  5268. }
  5269. constrainByGeometry(o30) {
  5270. return this._geometry.constrain(o30);
  5271. }
  5272. fit(o30) {
  5273. return this._zoom.fit(o30);
  5274. }
  5275. zoomToScale(o30) {
  5276. return this._zoom.zoomToScale(o30);
  5277. }
  5278. scaleToZoom(o30) {
  5279. return this._zoom.scaleToZoom(o30);
  5280. }
  5281. snapScale(o30) {
  5282. return this._zoom.snapToClosestScale(o30);
  5283. }
  5284. snapToNextScale(o30) {
  5285. return this._zoom.snapToNextScale(o30);
  5286. }
  5287. snapToPreviousScale(o30) {
  5288. return this._zoom.snapToPreviousScale(o30);
  5289. }
  5290. };
  5291. e([d({ readOnly: true, aliasOf: "_zoom.effectiveLODs" })], c32.prototype, "effectiveLODs", void 0), e([d({ readOnly: true, aliasOf: "_zoom.effectiveMinScale" })], c32.prototype, "effectiveMinScale", void 0), e([d({ readOnly: true, aliasOf: "_zoom.effectiveMaxScale" })], c32.prototype, "effectiveMaxScale", void 0), e([d({ readOnly: true, aliasOf: "_zoom.effectiveMinZoom" })], c32.prototype, "effectiveMinZoom", void 0), e([d({ readOnly: true, aliasOf: "_zoom.effectiveMaxZoom" })], c32.prototype, "effectiveMaxZoom", void 0), e([d({ types: p27, value: null })], c32.prototype, "geometry", null), e([d({ type: [p3] })], c32.prototype, "lods", void 0), e([d()], c32.prototype, "minScale", void 0), e([d()], c32.prototype, "maxScale", void 0), e([d()], c32.prototype, "minZoom", void 0), e([d()], c32.prototype, "maxZoom", void 0), e([d()], c32.prototype, "rotationEnabled", void 0), e([d()], c32.prototype, "snapToZoom", void 0), e([d()], c32.prototype, "view", void 0), e([d({ readOnly: true })], c32.prototype, "version", null), e([d()], c32.prototype, "_defaultLODs", null), e([d({ type: y13 })], c32.prototype, "_geometry", null), e([d({ type: n24 })], c32.prototype, "_rotation", null), e([d({ readOnly: true, type: c31 })], c32.prototype, "_zoom", null), c32 = e([n3("esri.views.2d.MapViewConstraints")], c32);
  5292. var y14 = c32;
  5293. // node_modules/@arcgis/core/core/libs/gl-matrix-2/types/vec2.js
  5294. function n25(n34) {
  5295. return n34 instanceof Float32Array && n34.length >= 2;
  5296. }
  5297. function r20(n34) {
  5298. return Array.isArray(n34) && n34.length >= 2;
  5299. }
  5300. function t18(t25) {
  5301. return n25(t25) || r20(t25);
  5302. }
  5303. // node_modules/@arcgis/core/views/2d/ViewState.js
  5304. var V4;
  5305. var G5 = [0, 0];
  5306. var O4 = V4 = class extends l2 {
  5307. constructor(t25) {
  5308. super(t25), this._viewpoint2D = { center: n9(), rotation: 0, scale: 0, spatialReference: null }, this.center = [0, 0], this.extent = new M2(), this.id = 0, this.inverseTransform = e8(), this.resolution = 0, this.rotation = 0, this.scale = 0, this.transform = e8(), this.transformNoRotation = e8(), this.displayMat3 = e9(), this.displayViewMat3 = e9(), this.viewMat3 = e9(), this.viewMat2d = n8(), this.worldScreenWidth = 0, this.size = [0, 0];
  5309. }
  5310. set pixelRatio(t25) {
  5311. this._set("pixelRatio", t25), this._update();
  5312. }
  5313. set size(t25) {
  5314. this._set("size", t25), this._update();
  5315. }
  5316. set viewpoint(t25) {
  5317. if (t25) {
  5318. const s30 = this._viewpoint2D, i32 = t25.targetGeometry;
  5319. s30.center[0] = i32.x, s30.center[1] = i32.y, s30.rotation = t25.rotation, s30.scale = t25.scale, s30.spatialReference = i32.spatialReference;
  5320. }
  5321. this._update();
  5322. }
  5323. copy(t25) {
  5324. const s30 = this.size, i32 = this.viewpoint;
  5325. return i32 && s30 ? (this.viewpoint = Z(i32, t25.viewpoint), this._set("size", a5(s30, t25.size))) : (this.viewpoint = t25.viewpoint.clone(), this._set("size", [t25.size[0], t25.size[1]])), this._set("pixelRatio", t25.pixelRatio), this;
  5326. }
  5327. clone() {
  5328. return new V4({ size: this.size, viewpoint: this.viewpoint.clone(), pixelRatio: this.pixelRatio });
  5329. }
  5330. toMap(t25, s30, i32) {
  5331. return t18(s30) ? z(t25, s30, this.inverseTransform) : (G5[0] = s30, G5[1] = i32, z(t25, G5, this.inverseTransform));
  5332. }
  5333. toScreen(t25, s30, i32) {
  5334. return t18(s30) ? z(t25, s30, this.transform) : (G5[0] = s30, G5[1] = i32, z(t25, G5, this.transform));
  5335. }
  5336. toScreenNoRotation(t25, s30, i32) {
  5337. return t18(s30) ? z(t25, s30, this.transformNoRotation) : (G5[0] = s30, G5[1] = i32, z(t25, G5, this.transformNoRotation));
  5338. }
  5339. getScreenTransform(t25, s30) {
  5340. const { center: i32 } = this._viewpoint2D, e23 = this._get("pixelRatio") || 1, o30 = this._get("size");
  5341. return ut(t25, i32, o30, s30, 0, e23), t25;
  5342. }
  5343. _update() {
  5344. const { center: t25, spatialReference: i32, scale: e23, rotation: o30 } = this._viewpoint2D, c42 = this._get("pixelRatio") || 1, m29 = this._get("size"), d20 = new u5({ targetGeometry: new j2(t25[0], t25[1], i32), scale: e23, rotation: o30 });
  5345. if (this._set("viewpoint", d20), !m29 || !i32 || !e23)
  5346. return;
  5347. this.resolution = ot(d20), this.rotation = o30, this.scale = e23, this.spatialReference = i32, a5(this.center, t25);
  5348. const y17 = m29[0] !== 0 ? 2 / m29[0] : 0, _9 = m29[1] !== 0 ? -2 / m29[1] : 0;
  5349. s5(this.displayMat3, y17, 0, 0, 0, _9, 0, -1, 1, 1);
  5350. const x5 = r8(this.viewMat3), z6 = t10(m29[0] / 2, m29[1] / 2), g20 = t10(-m29[0] / 2, -m29[1] / 2), b10 = o4(o30);
  5351. M3(x5, x5, z6), h4(x5, x5, b10), M3(x5, x5, g20), i3(this.displayViewMat3, this.displayMat3, x5);
  5352. const V5 = f4(this.viewMat2d, z6);
  5353. return e6(V5, V5, b10), i4(V5, V5, g20), _2(this.extent, d20, m29), ft(this.transform, d20, m29, c42), r9(this.inverseTransform, this.transform), lt(this.transformNoRotation, d20, m29, c42), this.worldScreenWidth = yt(this.spatialReference, this.resolution), this._set("id", this.id + 1), this;
  5354. }
  5355. };
  5356. e([d({ readOnly: true })], O4.prototype, "id", void 0), e([d({ value: 1, json: { write: true } })], O4.prototype, "pixelRatio", null), e([d({ json: { write: true } })], O4.prototype, "size", null), e([d()], O4.prototype, "spatialReference", void 0), e([d({ type: u5, json: { write: true } })], O4.prototype, "viewpoint", null), O4 = V4 = e([n3("esri.views.2d.ViewState")], O4);
  5357. var U8 = O4;
  5358. // node_modules/@arcgis/core/views/2d/PaddedViewState.js
  5359. var l21;
  5360. var m23;
  5361. var w12 = l21 = class extends y {
  5362. constructor() {
  5363. super(...arguments), this.left = 0, this.top = 0, this.right = 0, this.bottom = 0;
  5364. }
  5365. clone() {
  5366. return new l21({ left: this.left, top: this.top, right: this.right, bottom: this.bottom });
  5367. }
  5368. };
  5369. e([d()], w12.prototype, "left", void 0), e([d()], w12.prototype, "top", void 0), e([d()], w12.prototype, "right", void 0), e([d()], w12.prototype, "bottom", void 0), w12 = l21 = e([n3("esri.views.2d.PaddedViewState.Padding")], w12);
  5370. var u17 = m23 = class extends U8 {
  5371. constructor(...t25) {
  5372. super(...t25), this.paddedViewState = new U8(), this._updateContent = (() => {
  5373. const t26 = n9();
  5374. return () => {
  5375. const e23 = this._get("size"), i32 = this._get("padding");
  5376. if (!e23 || !i32)
  5377. return;
  5378. const o30 = this.paddedViewState;
  5379. r7(t26, i32.left + i32.right, i32.top + i32.bottom), o6(t26, e23, t26), a5(o30.size, t26);
  5380. const s30 = o30.viewpoint;
  5381. s30 && (this.viewpoint = s30);
  5382. };
  5383. })(), this.own(l4(() => [this.size, this.padding], () => this._updateContent(), U)), this.padding = new w12(), this.size = [0, 0];
  5384. }
  5385. set padding(t25) {
  5386. this._set("padding", t25 || new w12());
  5387. }
  5388. set viewpoint(t25) {
  5389. if (t25) {
  5390. const e23 = t25.clone();
  5391. this.paddedViewState.viewpoint = t25, gt(e23, t25, this._get("size"), this._get("padding"));
  5392. const i32 = this._viewpoint2D, o30 = e23.targetGeometry;
  5393. i32.center[0] = o30.x, i32.center[1] = o30.y, i32.rotation = e23.rotation, i32.scale = e23.scale, i32.spatialReference = o30.spatialReference, this._update();
  5394. }
  5395. }
  5396. clone() {
  5397. return new m23({ padding: this.padding.clone(), size: this.size.slice(), viewpoint: this.paddedViewState.viewpoint.clone(), pixelRatio: this.pixelRatio });
  5398. }
  5399. };
  5400. e([d()], u17.prototype, "paddedViewState", void 0), e([d({ type: w12 })], u17.prototype, "padding", null), e([d()], u17.prototype, "viewpoint", null), u17 = m23 = e([n3("esri.views.2d.PaddedViewState")], u17);
  5401. var g15 = u17;
  5402. // node_modules/@arcgis/core/views/input/handlers/support.js
  5403. function t19(t25, r24) {
  5404. switch (r24) {
  5405. case "primary":
  5406. return t25.pointerType === "touch" || t25.button === 0;
  5407. case "secondary":
  5408. return t25.pointerType !== "touch" && t25.button === 2;
  5409. case "tertiary":
  5410. return t25.pointerType !== "touch" && t25.button === 1;
  5411. }
  5412. }
  5413. // node_modules/@arcgis/core/views/2d/input/handlers/DoubleClickZoom.js
  5414. var a23 = class extends i8 {
  5415. constructor(t25, i32) {
  5416. super(true), this.view = t25, this.registerIncoming("double-click", i32, (t26) => this._handleDoubleClick(t26, i32));
  5417. }
  5418. _handleDoubleClick(t25, a34) {
  5419. t19(t25.data, "primary") && (t25.stopPropagation(), a34 ? this.view.mapViewNavigation.zoomOut([t25.data.x, t25.data.y]) : this.view.mapViewNavigation.zoomIn([t25.data.x, t25.data.y]));
  5420. }
  5421. };
  5422. // node_modules/@arcgis/core/views/2d/input/handlers/DoubleTapDragZoom.js
  5423. var e17 = class extends i8 {
  5424. constructor(t25, e23, a34) {
  5425. super(true), this.view = t25, this.pointerType = e23, this.registerIncoming("double-tap-drag", a34, (t26) => this._handleDoubleTapDrag(t26));
  5426. }
  5427. _handleDoubleTapDrag(t25) {
  5428. const { data: e23 } = t25, { pointerType: a34 } = e23;
  5429. if (a34 !== this.pointerType)
  5430. return;
  5431. t25.stopPropagation();
  5432. const { action: s30, delta: i32 } = e23, { view: r24 } = this, { mapViewNavigation: n34 } = r24;
  5433. switch (s30) {
  5434. case "begin": {
  5435. const { scale: t26 } = r24;
  5436. this._startScale = t26, this._currentScale = t26, this._previousDelta = i32, n34.begin();
  5437. break;
  5438. }
  5439. case "update": {
  5440. if (this._previousDelta.y === i32.y)
  5441. return;
  5442. this._previousDelta = i32;
  5443. const t26 = 1.015 ** i32.y, e24 = this._startScale * t26, a35 = e24 / this._currentScale;
  5444. n34.setViewpointImmediate(a35), this._currentScale = e24;
  5445. break;
  5446. }
  5447. case "end": {
  5448. const { constraints: t26 } = r24, { effectiveLODs: e24, snapToZoom: a35 } = t26;
  5449. if (!a35 || !e24)
  5450. return void n34.end();
  5451. const s31 = t26.snapScale(this._currentScale), o30 = (i32.y > 0 ? Math.max(s31, t26.snapToPreviousScale(this._startScale)) : Math.min(s31, t26.snapToNextScale(this._startScale))) / this._currentScale;
  5452. n34.zoom(o30);
  5453. break;
  5454. }
  5455. }
  5456. }
  5457. };
  5458. // node_modules/@arcgis/core/views/input/DragEventSeparator.js
  5459. var t20 = class {
  5460. constructor(t25) {
  5461. this.callbacks = t25, this.currentCount = 0, this.callbacks.condition || (this.callbacks.condition = () => true);
  5462. }
  5463. handle(t25) {
  5464. const s30 = t25.data, i32 = s30.pointers.size;
  5465. switch (s30.action) {
  5466. case "start":
  5467. this.currentCount = i32, this._emitStart(t25);
  5468. break;
  5469. case "added":
  5470. this._emitEnd(this.previousEvent), this.currentCount = i32, this._emitStart(t25);
  5471. break;
  5472. case "update":
  5473. this._emitUpdate(t25);
  5474. break;
  5475. case "removed":
  5476. this.startEvent && this._emitEnd(this.previousEvent), this.currentCount = i32, this._emitStart(t25);
  5477. break;
  5478. case "end":
  5479. this._emitEnd(t25), this.currentCount = 0;
  5480. }
  5481. this.previousEvent = t25;
  5482. }
  5483. _emitStart(t25) {
  5484. this.startEvent = t25, this.callbacks.condition(this.currentCount, t25) && this.callbacks.start(this.currentCount, t25, this.startEvent);
  5485. }
  5486. _emitUpdate(t25) {
  5487. this.callbacks.condition(this.currentCount, t25) && this.callbacks.update(this.currentCount, t25, this.startEvent);
  5488. }
  5489. _emitEnd(t25) {
  5490. this.callbacks.condition(this.currentCount, t25) && this.callbacks.end(this.currentCount, t25, this.startEvent), this.startEvent = null;
  5491. }
  5492. };
  5493. // node_modules/@arcgis/core/views/2d/input/handlers/DragPan.js
  5494. var n26 = class extends i8 {
  5495. constructor(t25, i32, a34) {
  5496. super(true), this.view = t25, this.pointerAction = i32, this.registerIncoming("drag", a34, (t26) => this._handleDrag(t26)), this.registerIncoming("pointer-down", () => this.stopMomentumNavigation());
  5497. }
  5498. onInstall(i32) {
  5499. super.onInstall(i32), this.dragEventSeparator = new t20({ start: (t25, i33) => {
  5500. this.view.mapViewNavigation.pan.begin(this.view, i33.data), i33.stopPropagation();
  5501. }, update: (t25, i33) => {
  5502. this.view.mapViewNavigation.pan.update(this.view, i33.data), i33.stopPropagation();
  5503. }, end: (t25, i33) => {
  5504. this.view.mapViewNavigation.pan.end(this.view, i33.data), i33.stopPropagation();
  5505. }, condition: (t25, i33) => t25 === 1 && t19(i33.data, this.pointerAction) });
  5506. }
  5507. _handleDrag(t25) {
  5508. const i32 = this.view.mapViewNavigation;
  5509. i32.pinch.zoomMomentum || i32.pinch.rotateMomentum ? this.stopMomentumNavigation() : this.dragEventSeparator.handle(t25);
  5510. }
  5511. stopMomentumNavigation() {
  5512. this.view.mapViewNavigation.pan.stopMomentumNavigation();
  5513. }
  5514. };
  5515. // node_modules/@arcgis/core/views/2d/input/handlers/DragRotate.js
  5516. var o25 = class extends i8 {
  5517. constructor(a34, o30, r24) {
  5518. super(true), this.view = a34, this.pointerAction = o30;
  5519. const e23 = this.view.mapViewNavigation;
  5520. this.dragEventSeparator = new t20({ start: (t25, a35) => {
  5521. e23.rotate.begin(this.view, a35.data), a35.stopPropagation();
  5522. }, update: (t25, a35) => {
  5523. e23.rotate.update(this.view, a35.data), a35.stopPropagation();
  5524. }, end: (t25, a35) => {
  5525. e23.rotate.end(), a35.stopPropagation();
  5526. }, condition: (t25, a35) => t25 === 1 && t19(a35.data, this.pointerAction) }), this.registerIncoming("drag", r24, (t25) => this.dragEventSeparator.handle(t25));
  5527. }
  5528. };
  5529. // node_modules/@arcgis/core/views/navigation/gamepadAndKeyboardUtils.js
  5530. function n27(t25) {
  5531. let n34 = t25 * t25;
  5532. return t25 < 0 && (n34 *= -1), n34;
  5533. }
  5534. function a24(t25) {
  5535. return t25.translation[0] = 0, t25.translation[1] = 0, t25.translation[2] = 0, t25.heading = 0, t25.tilt = 0, t25;
  5536. }
  5537. function i25(a34, i32, o30) {
  5538. const s30 = o30, e23 = a34.state, r24 = a34.device, l27 = i32.tiltDirection === "forward-down" ? 1 : -1, c42 = 1;
  5539. return r24.deviceType === "standard" ? (s30.translation[0] = n27(e23.axes[0]), s30.translation[1] = n27(e23.axes[1]), s30.translation[2] = n27(e23.buttons[7]) - n27(e23.buttons[6]), s30.heading = n27(e23.axes[2]), s30.tilt = n27(e23.axes[3])) : r24.deviceType === "spacemouse" && (s30.translation[0] = 1.2 * n27(e23.axes[0]), s30.translation[1] = 1.2 * n27(e23.axes[1]), s30.translation[2] = 2 * -n27(e23.axes[2]), s30.heading = 1.2 * n27(e23.axes[5]), s30.tilt = 1.2 * n27(e23.axes[3])), s30.tilt *= l27, q(s30.translation, s30.translation, c42), s30;
  5540. }
  5541. function s22(t25) {
  5542. return t25.translation[0] === 0 && t25.translation[1] === 0 && t25.translation[2] === 0 && t25.heading === 0 && t25.tilt === 0 && t25.zoom === 0;
  5543. }
  5544. // node_modules/@arcgis/core/views/2d/input/handlers/GamepadNavigation.js
  5545. var d14 = class extends i8 {
  5546. constructor(i32) {
  5547. super(true), this.view = i32, this.frameTask = null, this.watchHandles = new u3(), this.currentDevice = null, this.transformation = { translation: [0, 0, 0], heading: 0, tilt: 0, zoom: 0 }, this.handle = this.registerIncoming("gamepad", (t25) => this._handleGamePadEvent(t25)), this.handle.pause();
  5548. }
  5549. onInstall(t25) {
  5550. super.onInstall(t25), this.watchHandles.add([l4(() => this.view.navigation.gamepad?.enabled, (t26) => {
  5551. t26 ? (this.handle.resume(), this.frameTask || (this.frameTask = A({ update: (t27) => this._frameUpdate(t27.deltaTime) }))) : (this.handle.pause(), this.frameTask && (this.frameTask.remove(), this.frameTask = null));
  5552. }, h2)]);
  5553. }
  5554. onUninstall() {
  5555. this.watchHandles.removeAll(), this.frameTask && (this.frameTask.remove(), this.frameTask = null), super.onUninstall();
  5556. }
  5557. _handleGamePadEvent(t25) {
  5558. const i32 = this.view.navigation.gamepad.device;
  5559. i32 && t25.data.device !== i32 || this.currentDevice && this.currentDevice !== t25.data.device || (t25.data.action === "end" ? (this.currentDevice = null, a24(this.transformation)) : (this.currentDevice = t25.data.device, i25(t25.data, this.view.navigation.gamepad, this.transformation)));
  5560. }
  5561. _frameUpdate(t25) {
  5562. const i32 = this.transformation;
  5563. if (s22(i32))
  5564. return;
  5565. const e23 = this.view.viewpoint.clone(), a34 = this.view.navigation.gamepad.velocityFactor, r24 = c33 * a34 * t25;
  5566. St(e23, e23, [i32.translation[0] * r24, -i32.translation[1] * r24]);
  5567. const o30 = 1 + i32.translation[2] * v13 * t25, h19 = this.view.constraints.rotationEnabled ? -i32.heading * m24 * t25 : 0, d20 = this.view.size, p36 = [d20[0] / 2, d20[1]];
  5568. Gt(e23, e23, o30, h19, p36, d20);
  5569. const f14 = this.view.constraints.constrain(e23, this.view.viewpoint);
  5570. this.view.viewpoint = f14;
  5571. }
  5572. };
  5573. var m24 = 0.06;
  5574. var c33 = 0.7;
  5575. var v13 = 6e-4;
  5576. // node_modules/@arcgis/core/views/2d/input/handlers/KeyPan.js
  5577. var i26 = class extends i8 {
  5578. constructor(e23, i32, t25) {
  5579. super(true), this.view = e23, this.keys = i32, this._pressed = false, this._keyMap = { [i32.left]: "left", [i32.right]: "right", [i32.up]: "up", [i32.down]: "down" }, this.registerIncoming("key-down", t25, (e24) => this._handleKeyDown(e24)), this.registerIncoming("key-up", t25, (e24) => this._handleKeyUp(e24)), this.registerIncoming("blur", t25, () => this._handleBlur());
  5580. }
  5581. _handleKeyDown(e23) {
  5582. e23.data.repeat || this._handleKey(e23, true);
  5583. }
  5584. _handleKeyUp(e23) {
  5585. this._handleKey(e23, false);
  5586. }
  5587. _handleBlur() {
  5588. this._pressed && (this._pressed = false, this.view.mapViewNavigation.stop());
  5589. }
  5590. _handleKey(e23, i32) {
  5591. const t25 = this._keyMap[e23.data.key];
  5592. if (this._pressed = t25 != null, this._pressed) {
  5593. if (i32)
  5594. switch (this.view.mapViewNavigation.begin(), t25) {
  5595. case "left":
  5596. this.view.mapViewNavigation.continousPanLeft();
  5597. break;
  5598. case "right":
  5599. this.view.mapViewNavigation.continousPanRight();
  5600. break;
  5601. case "up":
  5602. this.view.mapViewNavigation.continousPanUp();
  5603. break;
  5604. case "down":
  5605. this.view.mapViewNavigation.continousPanDown();
  5606. }
  5607. else
  5608. this._pressed = false, this.view.mapViewNavigation.stop();
  5609. e23.stopPropagation();
  5610. }
  5611. }
  5612. };
  5613. // node_modules/@arcgis/core/views/2d/input/handlers/KeyRotate.js
  5614. var i27 = class extends i8 {
  5615. constructor(e23, i32, t25) {
  5616. super(true), this.view = e23, this.keys = i32, this._pressed = false, this._keyToDirection = { [i32.clockwiseOption1]: "clockwise", [i32.clockwiseOption2]: "clockwise", [i32.counterClockwiseOption1]: "counterClockwise", [i32.counterClockwiseOption2]: "counterClockwise", [i32.resetOption1]: "reset", [i32.resetOption2]: "reset" }, this.registerIncoming("key-down", t25, (e24) => this._handleKeyDown(e24)), this.registerIncoming("key-up", t25, (e24) => this._handleKeyUp(e24)), this.registerIncoming("blur", t25, () => this._handleBlur());
  5617. }
  5618. _handleKeyDown(e23) {
  5619. e23.data.repeat || this._handleKey(e23, true);
  5620. }
  5621. _handleKeyUp(e23) {
  5622. this._handleKey(e23, false);
  5623. }
  5624. _handleBlur() {
  5625. this._pressed && (this._pressed = false, this.view.mapViewNavigation.stop());
  5626. }
  5627. _handleKey(e23, i32) {
  5628. const t25 = e23.modifiers;
  5629. if (t25.size > 0 && !t25.has("Shift") || !this.view.constraints.rotationEnabled)
  5630. return;
  5631. const s30 = this._keyToDirection[e23.data.key];
  5632. if (this._pressed = s30 != null, this._pressed) {
  5633. if (i32)
  5634. switch (this.view.mapViewNavigation.begin(), s30) {
  5635. case "clockwise":
  5636. this.view.mapViewNavigation.continousRotateClockwise();
  5637. break;
  5638. case "counterClockwise":
  5639. this.view.mapViewNavigation.continousRotateCounterclockwise();
  5640. break;
  5641. case "reset":
  5642. this.view.mapViewNavigation.resetRotation();
  5643. }
  5644. else
  5645. this._pressed = false, this.view.mapViewNavigation.stop();
  5646. e23.stopPropagation();
  5647. }
  5648. }
  5649. };
  5650. // node_modules/@arcgis/core/views/2d/input/handlers/KeyZoom.js
  5651. var t21;
  5652. !function(o30) {
  5653. o30[o30.IN = 0] = "IN", o30[o30.OUT = 1] = "OUT";
  5654. }(t21 || (t21 = {}));
  5655. var e18 = class extends i8 {
  5656. constructor(o30, e23, i32) {
  5657. super(true), this.view = o30, this.keys = e23, this._keysToZoomAction = {}, this.registerIncoming("key-down", i32, (o31) => this._handleKeyDown(o31)), e23.zoomIn.forEach((o31) => this._keysToZoomAction[o31] = t21.IN), e23.zoomOut.forEach((o31) => this._keysToZoomAction[o31] = t21.OUT);
  5658. }
  5659. _handleKeyDown(o30) {
  5660. this._handleKey(o30);
  5661. }
  5662. _handleKey(o30) {
  5663. const e23 = o30.modifiers;
  5664. if (e23.size > 0 && !e23.has("Shift"))
  5665. return;
  5666. const { key: i32 } = o30.data;
  5667. if (!(i32 in this._keysToZoomAction))
  5668. return;
  5669. const n34 = this._keysToZoomAction[i32], { mapViewNavigation: s30 } = this.view;
  5670. let r24 = null;
  5671. switch (n34) {
  5672. case t21.IN:
  5673. r24 = s30.zoomIn();
  5674. break;
  5675. case t21.OUT:
  5676. r24 = s30.zoomOut();
  5677. break;
  5678. default:
  5679. return;
  5680. }
  5681. s30.begin(), r24.then(() => s30.end()), o30.stopPropagation();
  5682. }
  5683. };
  5684. // node_modules/@arcgis/core/views/2d/input/handlers/MouseWheelZoom.js
  5685. var t22 = 0.6;
  5686. var o26 = class extends i8 {
  5687. constructor(e23, t25) {
  5688. super(true), this.view = e23, this._canZoom = true, this.registerIncoming("mouse-wheel", t25, (e24) => this._handleMouseWheel(e24));
  5689. }
  5690. _handleMouseWheel(e23) {
  5691. if (!this.view.navigation.mouseWheelZoomEnabled)
  5692. return;
  5693. if (e23.preventDefault(), e23.stopPropagation(), !this._canZoom)
  5694. return;
  5695. const o30 = this.view.mapViewNavigation, { x: n34, y: i32, deltaY: s30 } = e23.data, a34 = 1 / t22 ** (1 / 60 * s30), h19 = o30.zoom(a34, [n34, i32]);
  5696. h19 && (this._canZoom = false, h19.catch(() => {
  5697. }).then(() => {
  5698. this._canZoom = true, o30.end();
  5699. }));
  5700. }
  5701. };
  5702. // node_modules/@arcgis/core/views/2d/input/handlers/PinchAction.js
  5703. var a25 = class extends i8 {
  5704. constructor(i32) {
  5705. super(true), this.view = i32, this.registerIncoming("drag", (t25) => this._handleDrag(t25)), this.registerIncoming("pointer-down", () => this._stopMomentumNavigation());
  5706. const a34 = this.view.mapViewNavigation;
  5707. this.dragEventSeparator = new t20({ start: (t25, i33) => {
  5708. a34.pinch.begin(this.view, i33.data), i33.stopPropagation();
  5709. }, update: (t25, i33) => {
  5710. a34.pinch.update(this.view, i33.data), i33.stopPropagation();
  5711. }, end: (t25, i33) => {
  5712. a34.pinch.end(this.view), i33.stopPropagation();
  5713. }, condition: (t25) => t25 >= 2 });
  5714. }
  5715. _handleDrag(t25) {
  5716. this.dragEventSeparator.handle(t25);
  5717. }
  5718. _stopMomentumNavigation() {
  5719. this.view.mapViewNavigation.pinch.stopMomentumNavigation();
  5720. }
  5721. };
  5722. // node_modules/@arcgis/core/views/input/gamepad/GamepadState.js
  5723. function t23(t25) {
  5724. const n34 = t25.native;
  5725. return n34 ? { buttons: n34.buttons.map((t26) => t26.pressed ? t26.value ? t26.value : 1 : 0), axes: n34.axes.map((n35) => s23(n35, t25.axisThreshold)) } : { buttons: [], axes: [] };
  5726. }
  5727. function n28(t25, n34) {
  5728. if (t25.axes.length !== n34.axes.length)
  5729. return false;
  5730. if (t25.buttons.length !== n34.buttons.length)
  5731. return false;
  5732. for (let e23 = 0; e23 < t25.axes.length; e23++)
  5733. if (t25.axes[e23] !== n34.axes[e23])
  5734. return false;
  5735. for (let e23 = 0; e23 < t25.buttons.length; e23++)
  5736. if (t25.buttons[e23] !== n34.buttons[e23])
  5737. return false;
  5738. return true;
  5739. }
  5740. function e19(t25) {
  5741. for (let n34 = 0; n34 < t25.axes.length; n34++)
  5742. if (t25.axes[n34] !== 0)
  5743. return false;
  5744. for (let n34 = 0; n34 < t25.buttons.length; n34++)
  5745. if (t25.buttons[n34] !== 0)
  5746. return false;
  5747. return true;
  5748. }
  5749. function s23(t25, n34) {
  5750. const e23 = Math.abs(t25);
  5751. return e23 < n34 ? 0 : Math.sign(t25) * (e23 - n34) / (1 - n34);
  5752. }
  5753. // node_modules/@arcgis/core/views/input/gamepad/GamepadSource.js
  5754. var a26 = class {
  5755. constructor(e23, t25) {
  5756. this.element = e23, this.input = t25, this._hasEventListeners = false, this._onConnectGamepad = (e24) => {
  5757. this._connectGamepad(e24.gamepad);
  5758. }, this._onDisconnectGamepad = (e24) => {
  5759. const t26 = e24.gamepad, i33 = t26.index, n35 = this.inputDevices[i33];
  5760. n35 && (this._emitGamepadEvent(t26, t23(n35), false), this.inputDevices.splice(i33, 1), this.latestUpdate.splice(i33, 1), this.input.gamepad.devices.remove(n35), this.ensurePollingState());
  5761. }, this.frameTask = null, this.latestUpdate = new Array(), this.inputDevices = new Array(), this.callback = null;
  5762. const i32 = "getGamepads" in window.navigator, n34 = window.isSecureContext;
  5763. this.supported = i32 && n34, this.supported && (this._forEachGamepad((e24) => this._connectGamepad(e24)), window.addEventListener("gamepadconnected", this._onConnectGamepad), window.addEventListener("gamepaddisconnected", this._onDisconnectGamepad), this.ensurePollingState());
  5764. }
  5765. destroy() {
  5766. this.hasEventListeners = false, this.supported && (window.removeEventListener("gamepadconnected", this._onConnectGamepad), window.removeEventListener("gamepaddisconnected", this._onDisconnectGamepad));
  5767. }
  5768. set hasEventListeners(e23) {
  5769. this._hasEventListeners !== e23 && (this._hasEventListeners = e23, this.ensurePollingState());
  5770. }
  5771. get eventsEnabled() {
  5772. return this.supported && this.inputDevices.length > 0 && this._hasEventListeners;
  5773. }
  5774. set onEvent(e23) {
  5775. this.callback = e23;
  5776. }
  5777. _connectGamepad(e23) {
  5778. const s30 = new i21(e23);
  5779. s30.deviceType !== "unknown" && (this.inputDevices[e23.index] = s30, this.input.gamepad.devices.add(s30)), this.ensurePollingState();
  5780. }
  5781. ensurePollingState() {
  5782. this.eventsEnabled ? this._startPolling() : this._stopPolling();
  5783. }
  5784. _startPolling() {
  5785. this.frameTask == null && (this.frameTask = A({ update: () => this._readGamepadState() }));
  5786. }
  5787. _stopPolling() {
  5788. this.frameTask != null && (this.frameTask.remove(), this.frameTask = null, this.latestUpdate = new Array());
  5789. }
  5790. _readGamepadState() {
  5791. const e23 = document.hasFocus(), t25 = this.element.contains(document.activeElement), a34 = this.input.gamepad.enabledFocusMode === "document" && !e23 || this.input.gamepad.enabledFocusMode === "view" && !t25;
  5792. this._forEachGamepad((e24) => {
  5793. const t26 = this.inputDevices[e24.index];
  5794. if (!t26)
  5795. return;
  5796. const d20 = this.latestUpdate[e24.index], o30 = t23(t26), r24 = a34 || e19(o30);
  5797. if (d20) {
  5798. if (d20.timestamp === e24.timestamp)
  5799. return;
  5800. if (!d20.active && r24)
  5801. return;
  5802. if (n28(d20.state, o30))
  5803. return;
  5804. }
  5805. this._emitGamepadEvent(e24, o30, !r24);
  5806. });
  5807. }
  5808. _forEachGamepad(e23) {
  5809. const t25 = window.navigator.getGamepads();
  5810. for (let s30 = 0; s30 < t25.length; s30++) {
  5811. const i32 = t25[s30];
  5812. this._validate(i32) && e23(i32);
  5813. }
  5814. }
  5815. _emitGamepadEvent(e23, t25, s30) {
  5816. const i32 = this.latestUpdate[e23.index], n34 = i32 && i32.active;
  5817. if (!n34 && !s30)
  5818. return;
  5819. const a34 = !n34 && s30 ? "start" : n34 && s30 ? "update" : "end";
  5820. this.latestUpdate[e23.index] = { timestamp: e23.timestamp, state: t25, active: s30 }, this.callback && this.callback({ device: this.inputDevices[e23.index], state: t25, action: a34 });
  5821. }
  5822. _validate(e23) {
  5823. if (!e23)
  5824. return false;
  5825. if (!e23.connected)
  5826. return false;
  5827. for (let t25 = 0; t25 < e23.axes.length; t25++)
  5828. if (isNaN(e23.axes[t25]))
  5829. return false;
  5830. return true;
  5831. }
  5832. };
  5833. // node_modules/@arcgis/core/views/input/BrowserEventSource.js
  5834. var o27 = a("trident");
  5835. var a27 = a("edge");
  5836. var s24 = a("chrome");
  5837. var r21 = a("ff");
  5838. var h16 = a("safari");
  5839. var l22 = { touchNone: "esri-view-surface--touch-none", touchPan: "esri-view-surface--touch-pan" };
  5840. var u18 = class {
  5841. constructor(e23, t25) {
  5842. this.input = t25, this._active = {}, this._activePointerCaptures = new Set(), this._keyDownState = new Set(), this._eventId = 1, this._browserTouchPanningEnabled = false, this._element = e23, e23.getAttribute("tabindex") || e23.setAttribute("tabindex", "0"), this._eventHandlers = { "key-down": this._handleKey, "key-up": this._handleKey, "pointer-down": this._handlePointer, "pointer-move": this._handlePointerPreventDefault, "pointer-up": this._handlePointerPreventDefault, "pointer-enter": this._handlePointer, "pointer-leave": this._handlePointer, "pointer-cancel": this._handlePointer, "mouse-wheel": this._handleMouseWheel, "pointer-capture-lost": this._handlePointerCaptureLost }, this._updateTouchAction(), this._element.addEventListener("keydown", this._preventAltKeyDefault), this._gamepadSource = new a26(e23, this.input), this._gamepadSource.onEvent = (e24) => this._callback("gamepad", e24);
  5843. }
  5844. destroy() {
  5845. this._callback = null, this.activeEvents = null, this._activePointerCaptures.forEach((e23) => {
  5846. this._releasePointerCaptureSafe(e23);
  5847. }), this._gamepadSource && (this._gamepadSource.destroy(), this._gamepadSource = null), this._activePointerCaptures = null, this._removeTouchAction(), this._element.removeEventListener("keydown", this._preventAltKeyDefault);
  5848. }
  5849. get browserTouchPanningEnabled() {
  5850. return this._browserTouchPanningEnabled;
  5851. }
  5852. set browserTouchPanningEnabled(e23) {
  5853. this._browserTouchPanningEnabled = e23, this._updateTouchAction(), this._updateTouchEventHandling();
  5854. }
  5855. set onEventReceived(e23) {
  5856. this._callback = e23;
  5857. }
  5858. set activeEvents(e23) {
  5859. for (const t25 in this._active)
  5860. if (!e23 || !e23.has(t25)) {
  5861. const e24 = this._active[t25];
  5862. this._element.removeEventListener(c34[t25], e24), delete this._active[t25];
  5863. }
  5864. e23 && e23.forEach((e24) => {
  5865. if (!this._active[e24] && c34[e24]) {
  5866. const t25 = (this._eventHandlers[e24] || this._handleDefault).bind(this, e24);
  5867. this._element.addEventListener(c34[e24], t25), this._active[e24] = t25;
  5868. }
  5869. }), this._gamepadSource.hasEventListeners = e23 && e23.has("gamepad");
  5870. }
  5871. setPointerCapture(e23, t25) {
  5872. t25 ? (this._element.setPointerCapture(e23.pointerId), this._activePointerCaptures.add(e23.pointerId)) : (this._releasePointerCaptureSafe(e23.pointerId), this._activePointerCaptures.delete(e23.pointerId));
  5873. }
  5874. _updateTouchAction() {
  5875. this._element.classList.remove(this._browserTouchPanningEnabled ? l22.touchNone : l22.touchPan), this._element.classList.add(this._browserTouchPanningEnabled ? l22.touchPan : l22.touchNone);
  5876. }
  5877. _updateTouchEventHandling() {
  5878. this._browserTouchPanningEnabled ? this._element.addEventListener("touchmove", this._preventMultiTouchPanning) : this._element.removeEventListener("touchmove", this._preventMultiTouchPanning);
  5879. }
  5880. _removeTouchAction() {
  5881. this._element.classList.remove(l22.touchNone), this._element.classList.remove(l22.touchPan), this._element.removeEventListener("touchmove", this._preventMultiTouchPanning);
  5882. }
  5883. _releasePointerCaptureSafe(e23) {
  5884. try {
  5885. if (this._element.hasPointerCapture && !this._element.hasPointerCapture(e23))
  5886. return;
  5887. this._element.releasePointerCapture(e23);
  5888. } catch (t25) {
  5889. }
  5890. }
  5891. _updateNormalizedPointerLikeEvent(e23, t25) {
  5892. const n34 = i20(this._element, e23);
  5893. return u18.test.disableSubpixelCoordinates && (n34.x = Math.round(n34.x), n34.y = Math.round(n34.y)), t25.x = n34.x, t25.y = n34.y, t25;
  5894. }
  5895. _handleKey(e23, n34) {
  5896. const i32 = a13(n34);
  5897. i32 && e23 === "key-up" && this._keyDownState.delete(i32);
  5898. const o30 = { native: n34, key: i32, repeat: i32 && this._keyDownState.has(i32) };
  5899. i32 && e23 === "key-down" && this._keyDownState.add(o30.key), this._callback(e23, o30);
  5900. }
  5901. _handlePointer(e23, t25) {
  5902. const n34 = this._updateNormalizedPointerLikeEvent(t25, { native: t25, x: 0, y: 0, pointerType: t25.pointerType, button: t25.button, buttons: t25.buttons, eventId: this._eventId++ });
  5903. this._callback(e23, n34);
  5904. }
  5905. _handlePointerPreventDefault(e23, t25) {
  5906. const n34 = this._updateNormalizedPointerLikeEvent(t25, { native: t25, x: 0, y: 0, pointerType: t25.pointerType, button: t25.button, buttons: t25.buttons, eventId: this._eventId++ });
  5907. t25.preventDefault(), this._callback(e23, n34);
  5908. }
  5909. _handleMouseWheel(e23, t25) {
  5910. let n34 = t25.deltaY;
  5911. switch (t25.deltaMode) {
  5912. case 0:
  5913. (o27 || a27) && (n34 = n34 / document.documentElement.clientHeight * 600);
  5914. break;
  5915. case 1:
  5916. n34 *= 30;
  5917. break;
  5918. case 2:
  5919. n34 *= 900;
  5920. }
  5921. o27 || a27 ? n34 *= 0.7 : s24 || h16 ? n34 *= 0.6 : r21 && (n34 *= 1.375);
  5922. const i32 = 100, l27 = Math.abs(n34);
  5923. if (l27 > i32) {
  5924. const e24 = 0.02;
  5925. n34 = n34 / l27 * 200 / (1 + Math.exp(-e24 * (l27 - i32)));
  5926. }
  5927. const u23 = this._updateNormalizedPointerLikeEvent(t25, { native: t25, x: 0, y: 0, deltaY: n34 });
  5928. this._callback(e23, u23);
  5929. }
  5930. _handlePointerCaptureLost(e23, t25) {
  5931. this._activePointerCaptures.delete(t25.pointerId), this._handleDefault(e23, t25);
  5932. }
  5933. _handleDefault(e23, t25) {
  5934. const n34 = { native: t25 };
  5935. t25.preventDefault(), this._callback(e23, n34);
  5936. }
  5937. _preventAltKeyDefault(e23) {
  5938. e23.key === "Alt" && e23.preventDefault();
  5939. }
  5940. _preventMultiTouchPanning(e23) {
  5941. e23.touches.length > 1 && e23.preventDefault();
  5942. }
  5943. };
  5944. u18.test = { disableSubpixelCoordinates: false };
  5945. var c34 = { "key-down": "keydown", "key-up": "keyup", "pointer-down": "pointerdown", "pointer-up": "pointerup", "pointer-move": "pointermove", "mouse-wheel": "wheel", "pointer-capture-got": "gotpointercapture", "pointer-capture-lost": "lostpointercapture", "context-menu": "contextmenu", "pointer-enter": "pointerenter", "pointer-leave": "pointerleave", "pointer-cancel": "pointercancel", focus: "focus", blur: "blur" };
  5946. // node_modules/@arcgis/core/views/input/handlers/PreventContextMenu.js
  5947. var e20 = class extends i8 {
  5948. constructor() {
  5949. super(true), this.registerIncoming("context-menu", (t25) => {
  5950. t25.data.native.preventDefault();
  5951. });
  5952. }
  5953. };
  5954. // node_modules/@arcgis/core/views/input/recognizers/support.js
  5955. function e21(t25, e23) {
  5956. return Math.abs(e23.x - t25.x) + Math.abs(e23.y - t25.y);
  5957. }
  5958. function n29(t25, e23) {
  5959. const n34 = e23.x - t25.x, r24 = e23.y - t25.y;
  5960. return Math.sqrt(n34 * n34 + r24 * r24);
  5961. }
  5962. function r22(e23, n34) {
  5963. if (n34 ? (n34.radius = 0, n34.center.x = 0, n34.center.y = 0) : n34 = { radius: 0, center: c2() }, e23.length === 0)
  5964. return n34;
  5965. if (e23.length === 1)
  5966. return n34.center.x = e23[0].x, n34.center.y = e23[0].y, n34;
  5967. if (e23.length === 2) {
  5968. const [t25, r25] = e23, [c43, s31] = [r25.x - t25.x, r25.y - t25.y];
  5969. return n34.radius = Math.sqrt(c43 * c43 + s31 * s31) / 2, n34.center.x = (t25.x + r25.x) / 2, n34.center.y = (t25.y + r25.y) / 2, n34;
  5970. }
  5971. let r24 = 0, c42 = 0;
  5972. for (let t25 = 0; t25 < e23.length; t25++)
  5973. r24 += e23[t25].x, c42 += e23[t25].y;
  5974. r24 /= e23.length, c42 /= e23.length;
  5975. const s30 = e23.map((t25) => t25.x - r24), x5 = e23.map((t25) => t25.y - c42);
  5976. let o30 = 0, y17 = 0, a34 = 0, h19 = 0, l27 = 0, u23 = 0, i32 = 0;
  5977. for (let t25 = 0; t25 < s30.length; t25++) {
  5978. const e24 = s30[t25], n35 = x5[t25], r25 = e24 * e24, c43 = n35 * n35;
  5979. o30 += r25, y17 += c43, a34 += e24 * n35, h19 += r25 * e24, l27 += c43 * n35, u23 += e24 * c43, i32 += n35 * r25;
  5980. }
  5981. const f14 = 0.5 * (h19 + u23), g20 = 0.5 * (l27 + i32), M9 = o30 * y17 - a34 * a34, d20 = (f14 * y17 - g20 * a34) / M9, m29 = (o30 * g20 - a34 * f14) / M9, p36 = c2(d20 + r24, m29 + c42);
  5982. return { radius: Math.sqrt(d20 * d20 + m29 * m29 + (o30 + y17) / e23.length), center: p36 };
  5983. }
  5984. // node_modules/@arcgis/core/views/input/recognizers/SingleAndDoubleClick.js
  5985. var s25 = { maximumDoubleClickDelay: 250, maximumDoubleClickDistance: 10, maximumDoubleTouchDelay: 350, maximumDoubleTouchDistance: 35 };
  5986. var a28 = class extends i8 {
  5987. constructor(t25 = s25.maximumDoubleClickDelay, i32 = s25.maximumDoubleClickDistance, o30 = s25.maximumDoubleTouchDelay, l27 = s25.maximumDoubleTouchDistance, a34 = t5) {
  5988. super(false), this.maximumDoubleClickDelay = t25, this.maximumDoubleClickDistance = i32, this.maximumDoubleTouchDelay = o30, this.maximumDoubleTouchDistance = l27, this._clock = a34, this._pointerState = new Map(), this._click = this.registerOutgoing("click"), this._doubleClick = this.registerOutgoing("double-click"), this.registerIncoming("immediate-click", this._handleImmediateClick.bind(this)), this.registerIncoming("pointer-drag", this._handlePointerDrag.bind(this)), this.registerIncoming("drag", this._handleDrag.bind(this));
  5989. }
  5990. onUninstall() {
  5991. this._pointerState.forEach((e23) => e23.doubleClickTimeout = a2(e23.doubleClickTimeout));
  5992. }
  5993. get hasPendingInputs() {
  5994. return n(this._pointerState, (e23) => e23.doubleClickTimeout != null);
  5995. }
  5996. _pointerId(e23) {
  5997. const t25 = e23.native;
  5998. return t25.pointerType === "mouse" ? `${t25.pointerId}:${t25.button}` : `${t25.pointerType}`;
  5999. }
  6000. _handleImmediateClick(e23) {
  6001. const t25 = e23.data, i32 = this._pointerId(t25), o30 = this._pointerState.get(i32);
  6002. if (o30) {
  6003. const s30 = t25.native.pointerType === "touch" ? this.maximumDoubleTouchDistance : this.maximumDoubleClickDistance;
  6004. e21(o30.event.data, t25) > s30 ? (this._clearDoubleClickTimeout(i32, true), this._startClick(e23)) : (this._clearDoubleClickTimeout(i32, false), this._doubleClick.emit(o30.event.data, void 0, o30.event.modifiers));
  6005. } else
  6006. this._startClick(e23);
  6007. }
  6008. _startClick(e23) {
  6009. const t25 = this._pointerId(e23.data), i32 = e23.data.native.pointerType === "touch" ? this.maximumDoubleTouchDelay : this.maximumDoubleClickDelay;
  6010. this._pointerState.set(t25, { event: e23, doubleClickTimeout: this._clock.setTimeout(() => this._doubleClickTimeoutExceeded(t25), i32) }), this.refreshHasPendingInputs();
  6011. }
  6012. _handlePointerDrag(e23) {
  6013. const t25 = this._pointerId(e23.data.currentEvent);
  6014. this._clearDoubleClickTimeout(t25, true);
  6015. }
  6016. _handleDrag(e23) {
  6017. const t25 = this._pointerId(e23.data.pointer);
  6018. this._clearDoubleClickTimeout(t25, true);
  6019. }
  6020. _clearDoubleClickTimeout(e23, t25) {
  6021. const i32 = this._pointerState.get(e23);
  6022. i32 && (i32.doubleClickTimeout.remove(), i32.doubleClickTimeout = null, t25 && this._doubleClickTimeoutExceeded(e23), this._pointerState.delete(e23), this.refreshHasPendingInputs());
  6023. }
  6024. _doubleClickTimeoutExceeded(e23) {
  6025. const t25 = this._pointerState.get(e23);
  6026. this._click.emit(t25.event.data, void 0, t25.event.modifiers), t25.doubleClickTimeout = null, this._pointerState.delete(e23), this.refreshHasPendingInputs();
  6027. }
  6028. };
  6029. // node_modules/@arcgis/core/views/input/recognizers/DoubleTapDrag.js
  6030. var s26 = class extends i8 {
  6031. constructor(e23 = s25.maximumDoubleClickDelay, o30 = s25.maximumDoubleClickDistance, n34 = s25.maximumDoubleTouchDelay, s30 = s25.maximumDoubleTouchDistance, u23 = t5) {
  6032. super(false), this.maximumDoubleClickDelay = e23, this.maximumDoubleClickDistance = o30, this.maximumDoubleTouchDelay = n34, this.maximumDoubleTouchDistance = s30, this._clock = u23, this._doubleTapDragReady = false, this._doubleTapDragActive = false, this._dragStartCenter = c2(0, 0), this._pointerState = new Map(), this._doubleTapDrag = this.registerOutgoing("double-tap-drag"), this._dragEventSeparator = new t20({ start: (t25, e24) => this._dragStart(t25, e24), update: (t25, e24) => this._dragUpdate(e24), end: (t25, e24) => this._dragEnd(e24) }), this.registerIncoming("drag", (t25) => this._dragEventSeparator.handle(t25)), this.registerIncoming("pointer-down", (t25) => this._handlePointerDown(t25)), this.registerIncoming("pointer-up", () => this._handlePointerUp());
  6033. }
  6034. onUninstall() {
  6035. this._pointerState.forEach((t25) => {
  6036. t25.doubleTapTimeout != null && (t25.doubleTapTimeout.remove(), t25.doubleTapTimeout = null);
  6037. });
  6038. }
  6039. get hasPendingInputs() {
  6040. return n(this._pointerState, (t25) => t25.doubleTapTimeout != null);
  6041. }
  6042. _clearPointerDown(t25) {
  6043. const e23 = this._pointerState.get(t25);
  6044. e23 && (e23.doubleTapTimeout.remove(), e23.doubleTapTimeout = null, this._pointerState.delete(t25), this.refreshHasPendingInputs());
  6045. }
  6046. _createDoubleTapDragData(t25, e23, i32) {
  6047. const { button: a34, buttons: o30, pointer: r24, pointers: n34, pointerType: s30, timestamp: u23 } = i32;
  6048. return { action: t25, delta: e23, button: a34, buttons: o30, pointer: r24, pointers: n34, pointerType: s30, timestamp: u23 };
  6049. }
  6050. _dragStart(t25, e23) {
  6051. if (!this._doubleTapDragReady || t25 !== 1)
  6052. return;
  6053. this._doubleTapDragReady = false, this._doubleTapDragActive = true;
  6054. const { data: a34, modifiers: o30 } = e23, { center: r24 } = a34;
  6055. this._dragStartCenter = r24;
  6056. const n34 = this._createDoubleTapDragData("begin", c2(0, 0), a34);
  6057. this._doubleTapDrag.emit(n34, void 0, o30), e23.stopPropagation();
  6058. }
  6059. _dragUpdate(t25) {
  6060. if (!this._doubleTapDragActive)
  6061. return;
  6062. const { data: e23, modifiers: a34 } = t25, { center: o30 } = e23, r24 = c2(o30.x - this._dragStartCenter.x, o30.y - this._dragStartCenter.y), n34 = this._createDoubleTapDragData("update", r24, e23);
  6063. this._doubleTapDrag.emit(n34, void 0, a34), t25.stopPropagation();
  6064. }
  6065. _dragEnd(t25) {
  6066. if (!this._doubleTapDragActive)
  6067. return;
  6068. const { data: e23, modifiers: a34 } = t25, { center: o30 } = e23, r24 = c2(o30.x - this._dragStartCenter.x, o30.y - this._dragStartCenter.y), n34 = this._createDoubleTapDragData("end", r24, e23);
  6069. this._doubleTapDrag.emit(n34, void 0, a34), this._doubleTapDragActive = false, t25.stopPropagation();
  6070. }
  6071. _handlePointerDown(t25) {
  6072. const { data: e23 } = t25, i32 = this._pointerId(e23), a34 = this._pointerState.get(i32), { pointerType: o30 } = e23.native;
  6073. if (a34) {
  6074. const r24 = o30 === "touch" ? this.maximumDoubleTouchDistance : this.maximumDoubleClickDistance;
  6075. this._clearPointerDown(i32), e21(a34.event.data, e23) > r24 ? this._storePointerDown(t25) : this._doubleTapDragReady = true;
  6076. } else
  6077. this._storePointerDown(t25);
  6078. }
  6079. _handlePointerUp() {
  6080. this._doubleTapDragReady = false;
  6081. }
  6082. _pointerId(t25) {
  6083. const { native: e23 } = t25, { pointerId: i32, button: a34, pointerType: o30 } = e23;
  6084. return o30 === "mouse" ? `${i32}:${a34}` : `${o30}`;
  6085. }
  6086. _storePointerDown(t25) {
  6087. const { data: e23 } = t25, { pointerType: i32 } = e23.native, a34 = this._pointerId(e23), o30 = i32 === "touch" ? this.maximumDoubleTouchDelay : this.maximumDoubleClickDelay, r24 = this._clock.setTimeout(() => this._clearPointerDown(a34), o30);
  6088. this._pointerState.set(a34, { event: t25, doubleTapTimeout: r24 }), this.refreshHasPendingInputs();
  6089. }
  6090. };
  6091. // node_modules/@arcgis/core/views/input/recognizers/Drag.js
  6092. var s27 = class extends i8 {
  6093. constructor(t25) {
  6094. super(false), this.navigationTouch = t25, this.startStateModifiers = new Set(), this.activePointerMap = new Map(), this.isDragging = false, this.isCurrentDragSuppressed = false, this.drag = this.registerOutgoing("drag"), this.registerIncoming("pointer-drag", this._handlePointerDrag.bind(this)), this.registerIncoming("pointer-up", this._handlePointerUpAndPointerLost.bind(this)), this.registerIncoming("pointer-capture-lost", this._handlePointerUpAndPointerLost.bind(this)), this.registerIncoming("pointer-cancel", this._handlePointerUpAndPointerLost.bind(this));
  6095. }
  6096. _createPayload(t25, e23, i32, n34) {
  6097. return { action: t25, pointerType: this.pointerType, button: this.mouseButton, buttons: e23.buttons, timestamp: n34, pointers: o28(this.activePointerMap), pointer: e23, angle: i32.angle, radius: i32.radius, center: i32.center };
  6098. }
  6099. _addPointer(t25) {
  6100. const e23 = t25.native.pointerId, i32 = a29(this.activePointerMap).angle, n34 = { event: t25, initialAngle: 0, lastAngle: 0 };
  6101. this.activePointerMap.set(e23, n34);
  6102. const s30 = h17(n34, r23(this.activePointerMap));
  6103. n34.initialAngle = s30, n34.lastAngle = s30, this._updatePointerAngles(i32);
  6104. }
  6105. _updatePointer(t25) {
  6106. if (t25 && t25.x == null && t25.y == null)
  6107. return;
  6108. const e23 = t25.native.pointerId, i32 = this.activePointerMap.get(e23);
  6109. i32 ? i32.event = t25 : this._addPointer(t25);
  6110. }
  6111. _removePointer(t25) {
  6112. const e23 = a29(this.activePointerMap).angle;
  6113. this.activePointerMap.delete(t25), this._updatePointerAngles(e23);
  6114. }
  6115. _updatePointerAngles(t25) {
  6116. const e23 = a29(this.activePointerMap);
  6117. this.activePointerMap.forEach((i32) => {
  6118. i32.initialAngle = h17(i32, e23) - t25, i32.lastAngle = h17(i32, e23) - t25;
  6119. });
  6120. }
  6121. _emitEvent(t25, e23, i32) {
  6122. const n34 = a29(this.activePointerMap);
  6123. this.drag.emit(this._createPayload(t25, e23, n34, i32), void 0, this.startStateModifiers);
  6124. }
  6125. _handlePointerUpAndPointerLost(t25) {
  6126. const i32 = t25.data.native.pointerId, n34 = n4(t25.timestamp);
  6127. this.activePointerMap.get(i32) && (this.activePointerMap.size === 1 ? (this._updatePointer(t25.data), !this.isCurrentDragSuppressed && this._emitEvent("end", t25.data, n34), this.isDragging = false, this.isCurrentDragSuppressed = false, this._removePointer(i32)) : (this._removePointer(i32), this._emitEvent("removed", t25.data, n4(t25.timestamp))));
  6128. }
  6129. _handlePointerDrag(t25) {
  6130. const i32 = t25.data, n34 = i32.currentEvent, s30 = n4(t25.timestamp);
  6131. switch (i32.action) {
  6132. case "start":
  6133. case "update":
  6134. this.isDragging ? this.activePointerMap.has(n34.native.pointerId) ? (this._updatePointer(n34), !this.isCurrentDragSuppressed && this._emitEvent("update", n34, s30)) : (this._addPointer(n34), this._emitEvent("added", n34, s30), this.isCurrentDragSuppressed = this.isSuppressed) : (this._updatePointer(n34), this.pointerType = t25.data.startEvent.pointerType, this.mouseButton = t25.data.startEvent.button, this.startStateModifiers = t25.modifiers, this.isDragging = true, this.isCurrentDragSuppressed = this.isSuppressed, !this.isCurrentDragSuppressed && this._emitEvent("start", n34, s30));
  6135. }
  6136. }
  6137. get isSuppressed() {
  6138. return this.navigationTouch && !this.navigationTouch.browserTouchPanEnabled && this.pointerType === "touch" && this.activePointerMap.size === 1;
  6139. }
  6140. };
  6141. function r23(e23) {
  6142. const i32 = [];
  6143. return e23.forEach((e24) => {
  6144. i32.push(c2(e24.event.x, e24.event.y));
  6145. }), r22(i32);
  6146. }
  6147. function a29(t25) {
  6148. const e23 = r23(t25);
  6149. let i32 = 0;
  6150. return t25.forEach((t26) => {
  6151. let n34 = h17(t26, e23), s30 = n34 - t26.lastAngle;
  6152. for (; s30 > Math.PI; )
  6153. s30 -= 2 * Math.PI;
  6154. for (; s30 < -Math.PI; )
  6155. s30 += 2 * Math.PI;
  6156. n34 = t26.lastAngle + s30, t26.lastAngle = n34;
  6157. const r24 = n34 - t26.initialAngle;
  6158. i32 += r24;
  6159. }), i32 /= t25.size || 1, { angle: i32, radius: e23.radius, center: e23.center };
  6160. }
  6161. function o28(t25) {
  6162. const e23 = new Map();
  6163. return t25.forEach((t26, i32) => e23.set(i32, t26.event)), e23;
  6164. }
  6165. function h17(t25, e23) {
  6166. const i32 = t25.event, n34 = i32.x - e23.center.x, s30 = i32.y - e23.center.y;
  6167. return Math.atan2(s30, n34);
  6168. }
  6169. var p28;
  6170. !function(t25) {
  6171. t25[t25.Left = 0] = "Left", t25[t25.Middle = 1] = "Middle", t25[t25.Right = 2] = "Right", t25[t25.Back = 3] = "Back", t25[t25.Forward = 4] = "Forward", t25[t25.Undefined = -1] = "Undefined";
  6172. }(p28 || (p28 = {}));
  6173. // node_modules/@arcgis/core/views/input/recognizers/ImmediateDoubleClick.js
  6174. var n30 = class extends i8 {
  6175. constructor(e23 = s25.maximumDoubleClickDelay, o30 = s25.maximumDoubleClickDistance, n34 = s25.maximumDoubleTouchDelay, a34 = s25.maximumDoubleTouchDistance, s30 = t5) {
  6176. super(false), this.maximumDoubleClickDelay = e23, this.maximumDoubleClickDistance = o30, this.maximumDoubleTouchDelay = n34, this.maximumDoubleTouchDistance = a34, this._clock = s30, this._pointerState = new Map(), this._immediateDoubleClick = this.registerOutgoing("immediate-double-click"), this.registerIncoming("pointer-down", this._handlePointerDown.bind(this)), this.registerIncoming("pointer-up", (t25) => {
  6177. this._handlePointerLoss(t25, "pointer-up");
  6178. }), this.registerIncoming("pointer-capture-lost", (t25) => {
  6179. this._handlePointerLoss(t25, "pointer-capture-lost");
  6180. }), this.registerIncoming("pointer-cancel", (t25) => {
  6181. this._handlePointerLoss(t25, "pointer-cancel");
  6182. });
  6183. }
  6184. onUninstall() {
  6185. this._pointerState.forEach((t25) => {
  6186. t25.immediateDoubleClick && t25.immediateDoubleClick.timeoutHandle.remove();
  6187. }), super.onUninstall();
  6188. }
  6189. _handlePointerDown(t25) {
  6190. const e23 = t25.data, i32 = this._pointerId(e23);
  6191. if (!this._pointerState.has(i32)) {
  6192. const t26 = { downButton: e23.native.button, immediateDoubleClick: null };
  6193. this._pointerState.set(i32, t26), this.startCapturingPointer(e23.native);
  6194. }
  6195. }
  6196. _handlePointerLoss(t25, e23) {
  6197. const i32 = t25.data, n34 = this._pointerId(i32), a34 = this._pointerState.get(n34);
  6198. if (a34 && e23 === "pointer-up" && a34.downButton === i32.native.button) {
  6199. const e24 = a34.immediateDoubleClick;
  6200. if (e24) {
  6201. e24.timeoutHandle.remove();
  6202. const n35 = t25.data.native.pointerType === "touch" ? this.maximumDoubleTouchDistance : this.maximumDoubleClickDistance;
  6203. e21(e24, t25.data) > n35 ? this._startImmediateDoubleClick(t25, a34) : (this._immediateDoubleClick.emit(t25.data, void 0, e24.modifiers), this._removeState(i32));
  6204. } else
  6205. this._startImmediateDoubleClick(t25, a34);
  6206. }
  6207. }
  6208. _startImmediateDoubleClick(t25, e23) {
  6209. const i32 = t25.data.native.pointerType === "touch" ? this.maximumDoubleTouchDelay : this.maximumDoubleClickDelay;
  6210. e23.immediateDoubleClick = { x: t25.data.x, y: t25.data.y, modifiers: t25.modifiers, timeoutHandle: this._clock.setTimeout(() => this._removeState(t25.data), i32) };
  6211. }
  6212. _pointerId(t25) {
  6213. const e23 = t25.native;
  6214. return e23.pointerType === "mouse" ? `${e23.pointerId}:${e23.button}` : `${e23.pointerType}`;
  6215. }
  6216. _removeState(t25) {
  6217. const e23 = this._pointerId(t25);
  6218. this._pointerState.delete(e23), this.stopCapturingPointer(t25.native), this.refreshHasPendingInputs();
  6219. }
  6220. };
  6221. // node_modules/@arcgis/core/views/input/recognizers/PointerClickHoldAndDrag.js
  6222. var n31 = { maximumClickDelay: 300, movementUntilMouseDrag: 1.5, movementUntilPenDrag: 6, movementUntilTouchDrag: 6, holdDelay: 500 };
  6223. var o29 = class extends i8 {
  6224. constructor(e23 = n31.maximumClickDelay, i32 = n31.movementUntilMouseDrag, o30 = n31.movementUntilPenDrag, r24 = n31.movementUntilTouchDrag, s30 = n31.holdDelay, a34 = t5) {
  6225. super(false), this.maximumClickDelay = e23, this.movementUntilMouseDrag = i32, this.movementUntilPenDrag = o30, this.movementUntilTouchDrag = r24, this.holdDelay = s30, this._clock = a34, this._pointerState = new Map(), this._pointerDrag = this.registerOutgoing("pointer-drag"), this._immediateClick = this.registerOutgoing("immediate-click"), this._pointerHold = this.registerOutgoing("hold"), this.registerIncoming("pointer-down", this._handlePointerDown.bind(this)), this.registerIncoming("pointer-up", (t25) => {
  6226. this._handlePointerLoss(t25, "pointer-up");
  6227. }), this.registerIncoming("pointer-capture-lost", (t25) => {
  6228. this._handlePointerLoss(t25, "pointer-capture-lost");
  6229. }), this.registerIncoming("pointer-cancel", (t25) => {
  6230. this._handlePointerLoss(t25, "pointer-cancel");
  6231. }), this._moveHandle = this.registerIncoming("pointer-move", this._handlePointerMove.bind(this)), this._moveHandle.pause();
  6232. }
  6233. onUninstall() {
  6234. this._pointerState.forEach((t25) => {
  6235. t25.holdTimeout != null && (t25.holdTimeout.remove(), t25.holdTimeout = null);
  6236. }), super.onUninstall();
  6237. }
  6238. _handlePointerDown(t25) {
  6239. const e23 = t25.data, i32 = e23.native.pointerId;
  6240. let n34 = null;
  6241. this._pointerState.size === 0 && (n34 = this._clock.setTimeout(() => {
  6242. const e24 = this._pointerState.get(i32);
  6243. if (e24) {
  6244. if (!e24.isDragging) {
  6245. const i33 = e24.previousEvent;
  6246. this._pointerHold.emit(i33, void 0, t25.modifiers), e24.holdEmitted = true;
  6247. }
  6248. e24.holdTimeout = null;
  6249. }
  6250. }, this.holdDelay));
  6251. const o30 = { startEvent: e23, previousEvent: e23, startTimestamp: t25.timestamp, isDragging: false, downButton: e23.native.button, holdTimeout: n34, modifiers: new Set() };
  6252. this._pointerState.set(i32, o30), this.startCapturingPointer(e23.native), this._moveHandle.resume(), this._pointerState.size > 1 && this._startDragging(t25);
  6253. }
  6254. _createPointerDragData(t25, e23, i32) {
  6255. return { action: t25, startEvent: e23.startEvent, previousEvent: e23.previousEvent, currentEvent: i32 };
  6256. }
  6257. _handlePointerMove(t25) {
  6258. const e23 = t25.data, n34 = e23.native.pointerId, o30 = this._pointerState.get(n34);
  6259. if (o30) {
  6260. if (o30.isDragging)
  6261. this._pointerDrag.emit(this._createPointerDragData("update", o30, e23), void 0, o30.modifiers);
  6262. else {
  6263. n29(e23, o30.startEvent) > this._getDragThreshold(e23.native.pointerType) && this._startDragging(t25);
  6264. }
  6265. o30.previousEvent = e23;
  6266. }
  6267. }
  6268. _getDragThreshold(t25) {
  6269. switch (t25) {
  6270. case "touch":
  6271. return this.movementUntilTouchDrag;
  6272. case "pen":
  6273. return this.movementUntilPenDrag;
  6274. default:
  6275. return this.movementUntilMouseDrag;
  6276. }
  6277. }
  6278. _startDragging(t25) {
  6279. const e23 = t25.data, i32 = e23.native.pointerId;
  6280. this._pointerState.forEach((n34) => {
  6281. n34.holdTimeout != null && (n34.holdTimeout.remove(), n34.holdTimeout = null), n34.isDragging || (n34.modifiers = t25.modifiers, n34.isDragging = true, i32 === n34.startEvent.native.pointerId ? this._pointerDrag.emit(this._createPointerDragData("start", n34, e23)) : this._pointerDrag.emit(this._createPointerDragData("start", n34, n34.previousEvent), t25.timestamp));
  6282. });
  6283. }
  6284. _handlePointerLoss(t25, e23) {
  6285. const i32 = t25.data, n34 = i32.native.pointerId, o30 = this._pointerState.get(n34);
  6286. if (o30) {
  6287. if (o30.holdTimeout != null && (o30.holdTimeout.remove(), o30.holdTimeout = null), o30.isDragging)
  6288. this._pointerDrag.emit(this._createPointerDragData("end", o30, e23 === "pointer-up" ? i32 : o30.previousEvent), void 0, o30.modifiers);
  6289. else if (e23 === "pointer-up" && o30.downButton === i32.native.button) {
  6290. t25.timestamp - o30.startTimestamp <= this.maximumClickDelay && !o30.holdEmitted && this._immediateClick.emit(i32);
  6291. }
  6292. this._pointerState.delete(n34), this.stopCapturingPointer(i32.native), this._pointerState.size === 0 && this._moveHandle.pause();
  6293. }
  6294. }
  6295. };
  6296. // node_modules/@arcgis/core/views/2d/input/MapViewInputManager.js
  6297. var z5 = { counter: "Ctrl", pan: { left: "ArrowLeft", right: "ArrowRight", up: "ArrowUp", down: "ArrowDown" }, zoom: { zoomIn: ["=", "+"], zoomOut: ["-", "_"] }, rotate: { clockwiseOption1: "a", clockwiseOption2: "A", counterClockwiseOption1: "d", counterClockwiseOption2: "D", resetOption1: "n", resetOption2: "N" } };
  6298. var T6 = class extends y {
  6299. constructor() {
  6300. super(...arguments), this._handles = new u3();
  6301. }
  6302. initialize() {
  6303. const e23 = () => this.view?.ready;
  6304. this._handles.add([f2(() => !e23(), () => this._disconnect()), f2(e23, () => this._connect())]);
  6305. }
  6306. destroy() {
  6307. this._handles && (this._handles.removeAll(), this._handles = null), this._disconnect();
  6308. }
  6309. get latestPointerType() {
  6310. return this._inputManager?.latestPointerType;
  6311. }
  6312. get latestPointerLocation() {
  6313. return this._inputManager?.latestPointerLocation;
  6314. }
  6315. _disconnect() {
  6316. this._inputManager && (this.view.viewEvents.disconnect(), this._inputManager.destroy(), this._inputManager = null, this._source.destroy(), this._source = null);
  6317. }
  6318. _connect() {
  6319. const e23 = this.view.surface, t25 = new u18(e23, this.view.input), o30 = [new n30(), new o29(), new a28(), new s27(this.view.navigation), new s26()], r24 = new c11({ eventSource: t25, recognizers: o30 });
  6320. r24.installHandlers("prevent-context-menu", [new e20()], g3.INTERNAL), r24.installHandlers("navigation", [new a25(this.view), new d14(this.view), new o26(this.view), new a23(this.view), new a23(this.view, [z5.counter]), new n26(this.view, "primary"), new i26(this.view, z5.pan), new e18(this.view, z5.zoom), new i27(this.view, z5.rotate), new o25(this.view, "secondary"), new e17(this.view, "touch")], g3.INTERNAL), this.view.viewEvents.connect(r24), this._source = t25, this._inputManager = r24, l4(() => this.view?.navigation?.browserTouchPanEnabled, (e24) => {
  6321. this._source && (this._source.browserTouchPanningEnabled = !e24);
  6322. }, h2);
  6323. }
  6324. get test() {
  6325. return { inputManager: this._inputManager };
  6326. }
  6327. };
  6328. e([d()], T6.prototype, "view", void 0), e([d()], T6.prototype, "latestPointerType", null), e([d()], T6.prototype, "latestPointerLocation", null), T6 = e([n3("esri.views.2d.input.MapViewInputManager")], T6);
  6329. var k4 = T6;
  6330. // node_modules/@arcgis/core/views/2d/support/HighlightOptions.js
  6331. var p29 = 0;
  6332. var i28 = class extends y {
  6333. constructor() {
  6334. super(...arguments), this.color = new l5([0, 255, 255]), this.haloOpacity = 1, this.fillOpacity = 0.25;
  6335. }
  6336. get version() {
  6337. return p29++;
  6338. }
  6339. };
  6340. e([d({ readOnly: true })], i28.prototype, "version", null), e([d({ type: l5 })], i28.prototype, "color", void 0), e([d({ type: l5 })], i28.prototype, "haloColor", void 0), e([d()], i28.prototype, "haloOpacity", void 0), e([d()], i28.prototype, "fillOpacity", void 0), i28 = e([n3("esri.views.2d.support.HighlightOptions")], i28);
  6341. var c35 = i28;
  6342. // node_modules/@arcgis/core/views/support/createScreenshotPlan.js
  6343. function t24(t25, h19, i32, e23, d20, l27, n34, o30) {
  6344. let u23;
  6345. t25.ignorePadding && (e23 = { left: 0, right: 0, top: 0, bottom: 0 }), t25.width != null && t25.height != null ? u23 = [t25.width, t25.height] : t25.width == null && t25.height != null ? u23 = [t25.height, t25.height] : t25.width != null && t25.height == null ? u23 = [t25.width, t25.width] : t25.width == null && t25.height == null && (u23 = null);
  6346. const r24 = i32[0] - (e23.left + e23.right), a34 = i32[1] - (e23.top + e23.bottom);
  6347. let g20, w13, c42 = t25.area || { x: 0, y: 0, width: r24, height: a34 };
  6348. if (u23) {
  6349. const t26 = r24 / a34, h20 = u23[0] / u23[1];
  6350. if (h20 > t26) {
  6351. const t27 = c42.width / h20;
  6352. c42 = { x: c42.x, y: Math.round(c42.y + (c42.height - t27) / 2), width: c42.width, height: Math.round(t27) };
  6353. } else {
  6354. const t27 = c42.height * h20;
  6355. c42 = { x: Math.round(c42.x + (c42.width - t27) / 2), y: c42.y, width: Math.round(t27), height: c42.height };
  6356. }
  6357. } else
  6358. u23 = [c42.width, c42.height];
  6359. u23[0] > c42.width ? (g20 = Math.min(u23[0] / c42.width, h19), w13 = u23[0] / c42.width / g20) : (g20 = 1, w13 = u23[0] / c42.width);
  6360. return { resolutionScale: g20, cropArea: { x: Math.round((c42.x + e23.left) * g20), y: Math.round((c42.y + e23.top) * g20), width: Math.round(c42.width * g20), height: Math.round(c42.height * g20) }, outputScale: w13, format: d20, quality: l27, children: n34, rotation: o30 };
  6361. }
  6362. // node_modules/@arcgis/core/views/support/WebGLRequirements.js
  6363. function i29(i32) {
  6364. const s30 = l9(i32);
  6365. if (!s30.available)
  6366. return new s2("webgl:required", "WebGL is required but not supported.");
  6367. if (i32 === "3d" && s30.majorPerformanceCaveat)
  6368. return new s2("webgl:major-performance-caveat-detected", "Your WebGL implementation doesn't seem to support hardware accelerated rendering. Check your browser settings or if your GPU is in a blocklist.");
  6369. if (!s30.supportsHighPrecisionFragment)
  6370. return new s2("webgl:high-precision-fragment-required", "WebGL support for high precision fragment shaders is required but not supported.");
  6371. if (!s30.supportsVertexShaderSamplers)
  6372. return new s2("webgl:vertex-shader-samplers-required", "WebGL support for vertex shader samplers is required but not supported.");
  6373. if (s30.type === o8.WEBGL1) {
  6374. if (!s30.supportsElementIndexUint)
  6375. return new s2("webgl:element-index-uint-required", "WebGL support for uint vertex indices is required but not supported.");
  6376. if (!s30.supportsStandardDerivatives)
  6377. return new s2("webgl:standard-derivatives-required", "WebGL support for standard derivatives is required but not supported.");
  6378. if (!s30.supportsInstancedArrays)
  6379. return new s2("webgl:instanced-arrays-required", "WebGL support for instanced rendering is required but not supported.");
  6380. }
  6381. return null;
  6382. }
  6383. // node_modules/@arcgis/core/views/ui/Component.js
  6384. function i30(t25) {
  6385. return t25 && "nodeType" in t25;
  6386. }
  6387. function d15(t25) {
  6388. return t25 && typeof t25.render == "function";
  6389. }
  6390. var c36 = { component: "esri-component" };
  6391. var p30 = class extends y {
  6392. constructor() {
  6393. super(...arguments), this.widget = null;
  6394. }
  6395. destroy() {
  6396. this.widget && this.widget.destroy(), this.node = null;
  6397. }
  6398. get id() {
  6399. return this.get("widget.id") || this.get("node.id");
  6400. }
  6401. set node(t25) {
  6402. const o30 = this._get("node");
  6403. t25 !== o30 && (t25 && t25.classList.add(c36.component), o30 && o30.classList.remove(c36.component), this._set("node", t25));
  6404. }
  6405. castNode(t25) {
  6406. return t25 ? typeof t25 == "string" || i30(t25) ? (this._set("widget", null), e3(t25)) : (d15(t25) && !t25.domNode && (t25.domNode = document.createElement("div")), this._set("widget", t25), t25.domNode) : (this._set("widget", null), null);
  6407. }
  6408. };
  6409. e([d({ dependsOn: [] })], p30.prototype, "id", null), e([d()], p30.prototype, "node", null), e([s3("node")], p30.prototype, "castNode", null), e([d({ readOnly: true })], p30.prototype, "widget", void 0), p30 = e([n3("esri.views.ui.Component")], p30);
  6410. var l23 = p30;
  6411. // node_modules/@arcgis/core/views/ui/UI.js
  6412. var m25 = { left: 0, top: 0, bottom: 0, right: 0 };
  6413. var u19 = { bottom: 30, top: 15, right: 15, left: 15 };
  6414. var f12 = "manual";
  6415. var _6 = { ui: "esri-ui", corner: "esri-ui-corner", innerContainer: "esri-ui-inner-container", manualContainer: "esri-ui-manual-container", cornerContainer: "esri-ui-corner-container", topLeft: "esri-ui-top-left", topRight: "esri-ui-top-right", bottomLeft: "esri-ui-bottom-left", bottomRight: "esri-ui-bottom-right" };
  6416. function g16(t25) {
  6417. return t25 && !t25._started && typeof t25.postMixInProperties == "function" && typeof t25.buildRendering == "function" && typeof t25.postCreate == "function" && typeof t25.startup == "function";
  6418. }
  6419. function y15(t25) {
  6420. const o30 = t25, i32 = typeof o30 == "object" && o30 !== null && Object.getPrototypeOf(o30);
  6421. return (i32 === null || i32 === Object.prototype) && ("component" in o30 || "index" in o30 || "position" in o30) ? t25 : null;
  6422. }
  6423. function C4(t25, { top: o30, bottom: i32, left: e23, right: n34 }) {
  6424. t25.style.top = o30, t25.style.bottom = i32, t25.style.left = e23, t25.style.right = n34;
  6425. }
  6426. var v14 = class extends n5.EventedAccessor {
  6427. constructor(t25) {
  6428. super(t25), this._cornerNameToContainerLookup = {}, this._positionNameToContainerLookup = {}, this._components = new Array(), this._componentToKey = new Map(), this._handles = new u3(), this.view = null, this._applyViewPadding = () => {
  6429. const t26 = this.container;
  6430. t26 && C4(t26, this._toPxPosition(this._getViewPadding()));
  6431. }, this._applyUIPadding = () => {
  6432. const t26 = this._innerContainer;
  6433. t26 && C4(t26, this._toPxPosition(this.padding));
  6434. }, this._initContainers();
  6435. }
  6436. initialize() {
  6437. this._handles.add([l4(() => [this.view?.padding, this.container], this._applyViewPadding, h2), l4(() => this.padding, this._applyUIPadding, h2)]);
  6438. }
  6439. destroy() {
  6440. this.container = null;
  6441. for (const t25 of this._components)
  6442. t25.destroy();
  6443. this._components.length = 0, this._handles.destroy(), this._componentToKey.clear();
  6444. }
  6445. set container(t25) {
  6446. const i32 = this._get("container");
  6447. t25 !== i32 && (t25 && (t25.classList.add(_6.ui), n7(t25), this._attachContainers(t25)), i32 && (i32.classList.remove(_6.ui), C4(i32, { top: "", bottom: "", left: "", right: "" }), t6(i32)), this._set("container", t25));
  6448. }
  6449. get height() {
  6450. const t25 = this.get("view.height") || 0;
  6451. if (t25 === 0)
  6452. return t25;
  6453. const o30 = this._getViewPadding(), i32 = o30.top + o30.bottom;
  6454. return Math.max(t25 - i32, 0);
  6455. }
  6456. get padding() {
  6457. return this._get("padding");
  6458. }
  6459. set padding(t25) {
  6460. t25 ? this._override("padding", t25) : this._clearOverride("padding");
  6461. }
  6462. castPadding(t25) {
  6463. return typeof t25 == "number" ? { bottom: t25, top: t25, right: t25, left: t25 } : { ...u19, ...t25 };
  6464. }
  6465. get width() {
  6466. const t25 = this.get("view.width") || 0;
  6467. if (t25 === 0)
  6468. return t25;
  6469. const o30 = this._getViewPadding(), i32 = o30.left + o30.right;
  6470. return Math.max(t25 - i32, 0);
  6471. }
  6472. add(t25, o30) {
  6473. let i32, e23;
  6474. if (Array.isArray(t25))
  6475. return void t25.forEach((t26) => this.add(t26, o30));
  6476. const n34 = y15(t25);
  6477. n34 && ({ index: i32, position: o30, component: t25, key: e23 } = n34), o30 && typeof o30 == "object" && ({ index: i32, key: e23, position: o30 } = o30), !t25 || o30 && !this._isValidPosition(o30) || this._add(t25, o30, i32, e23);
  6478. }
  6479. remove(t25, o30) {
  6480. if (!t25)
  6481. return;
  6482. if (Array.isArray(t25))
  6483. return t25.map((t26) => this.remove(t26, o30));
  6484. const i32 = this._find(t25);
  6485. if (i32) {
  6486. const e23 = this._componentToKey;
  6487. if (e23.has(t25) && e23.get(t25) !== o30)
  6488. return;
  6489. const n34 = this._components.indexOf(i32);
  6490. return i32.node.parentNode && i32.node.parentNode.removeChild(i32.node), this._componentToKey.delete(t25), this._components.splice(n34, 1)[0];
  6491. }
  6492. }
  6493. empty(t25) {
  6494. if (Array.isArray(t25))
  6495. return t25.map((t26) => this.empty(t26)).reduce((t26, o30) => t26.concat(o30));
  6496. if ((t25 = t25 || f12) === f12) {
  6497. return Array.prototype.slice.call(this._manualContainer.children).filter((t26) => !t26.classList.contains(_6.corner)).map((t26) => this.remove(t26));
  6498. }
  6499. return this._isValidPosition(t25) ? Array.prototype.slice.call(this._cornerNameToContainerLookup[t25].children).map(this.remove, this) : null;
  6500. }
  6501. move(t25, o30) {
  6502. if (Array.isArray(t25) && t25.forEach((t26) => this.move(t26, o30)), !t25)
  6503. return;
  6504. let i32;
  6505. const e23 = y15(t25) || y15(o30);
  6506. if (e23 && (i32 = e23.index, o30 = e23.position, t25 = e23.component || t25), o30 && !this._isValidPosition(o30))
  6507. return;
  6508. const n34 = this.remove(t25);
  6509. n34 && this.add(n34, { position: o30, index: i32 });
  6510. }
  6511. find(t25) {
  6512. if (!t25)
  6513. return null;
  6514. const o30 = this._findById(t25);
  6515. return o30 && (o30.widget || o30.node);
  6516. }
  6517. getPosition(t25) {
  6518. for (const o30 in this._positionNameToContainerLookup) {
  6519. if (this._positionNameToContainerLookup[o30].contains(t25))
  6520. return o30;
  6521. }
  6522. return null;
  6523. }
  6524. _add(t25, o30, i32, e23) {
  6525. t25 instanceof l23 || (t25 = new l23({ node: t25 })), this._place({ component: t25, position: o30, index: i32 }), this._components.push(t25), e23 && this._componentToKey.set(t25, e23);
  6526. }
  6527. _find(t25) {
  6528. return t25 ? t25 instanceof l23 ? this._findByComponent(t25) : typeof t25 == "string" ? this._findById(t25) : this._findByNode(t25.domNode || t25) : null;
  6529. }
  6530. _getViewPadding() {
  6531. return this.get("view.padding") || m25;
  6532. }
  6533. _attachContainers(t25) {
  6534. t25.appendChild(this._innerContainer), t25.appendChild(this._manualContainer);
  6535. }
  6536. _initContainers() {
  6537. const t25 = document.createElement("div");
  6538. t25.classList.add(_6.innerContainer), t25.classList.add(_6.cornerContainer);
  6539. const o30 = document.createElement("div");
  6540. o30.classList.add(_6.innerContainer), o30.classList.add(_6.manualContainer);
  6541. const i32 = document.createElement("div");
  6542. i32.classList.add(_6.topLeft), i32.classList.add(_6.corner), t25.appendChild(i32);
  6543. const e23 = document.createElement("div");
  6544. e23.classList.add(_6.topRight), e23.classList.add(_6.corner), t25.appendChild(e23);
  6545. const n34 = document.createElement("div");
  6546. n34.classList.add(_6.bottomLeft), n34.classList.add(_6.corner), t25.appendChild(n34);
  6547. const r24 = document.createElement("div");
  6548. r24.classList.add(_6.bottomRight), r24.classList.add(_6.corner), t25.appendChild(r24), this._innerContainer = t25, this._manualContainer = o30;
  6549. const s30 = f3();
  6550. this._cornerNameToContainerLookup = { "top-left": i32, "top-right": e23, "bottom-left": n34, "bottom-right": r24, "top-leading": s30 ? e23 : i32, "top-trailing": s30 ? i32 : e23, "bottom-leading": s30 ? r24 : n34, "bottom-trailing": s30 ? n34 : r24 }, this._positionNameToContainerLookup = { manual: o30, ...this._cornerNameToContainerLookup };
  6551. }
  6552. _isValidPosition(t25) {
  6553. return !!this._positionNameToContainerLookup[t25];
  6554. }
  6555. _place(t25) {
  6556. const o30 = t25.component, e23 = t25.position || f12, n34 = t25.index, r24 = this._positionNameToContainerLookup[e23], s30 = n34 > -1;
  6557. if (g16(o30.widget) && o30.widget.startup(), !s30)
  6558. return void r24.appendChild(o30.node);
  6559. const a34 = Array.prototype.slice.call(r24.children);
  6560. if (n34 === 0)
  6561. return void (r24.firstChild ? o3(o30.node, r24.firstChild) : r24.appendChild(o30.node));
  6562. n34 >= a34.length ? r24.appendChild(o30.node) : o3(o30.node, a34[n34]);
  6563. }
  6564. _toPxPosition(t25) {
  6565. return { top: this._toPxUnit(t25.top), left: this._toPxUnit(t25.left), right: this._toPxUnit(t25.right), bottom: this._toPxUnit(t25.bottom) };
  6566. }
  6567. _toPxUnit(t25) {
  6568. return t25 === 0 ? "0" : t25 + "px";
  6569. }
  6570. _findByComponent(t25) {
  6571. let o30, i32 = null;
  6572. return this._components.some((e23) => (o30 = e23 === t25, o30 && (i32 = e23), o30)), i32;
  6573. }
  6574. _findById(t25) {
  6575. let o30, i32 = null;
  6576. return this._components.some((e23) => (o30 = e23.id === t25, o30 && (i32 = e23), o30)), i32;
  6577. }
  6578. _findByNode(t25) {
  6579. let o30, i32 = null;
  6580. return this._components.some((e23) => (o30 = e23.node === t25, o30 && (i32 = e23), o30)), i32;
  6581. }
  6582. };
  6583. e([d()], v14.prototype, "container", null), e([d()], v14.prototype, "height", null), e([d({ value: u19 })], v14.prototype, "padding", null), e([s3("padding")], v14.prototype, "castPadding", null), e([d()], v14.prototype, "view", void 0), e([d()], v14.prototype, "width", null), v14 = e([n3("esri.views.ui.UI")], v14);
  6584. var L10 = v14;
  6585. // node_modules/@arcgis/core/widgets/Attribution/AttributionViewModel.js
  6586. function d16(t25, e23) {
  6587. return t25 && "copyright" in t25 && (!e23 || typeof t25.originOf == "function" && t25.originOf("copyright") === "user");
  6588. }
  6589. function m26(t25, e23) {
  6590. return t25.length !== e23.length || t25.some((t26, i32) => t26.text !== e23[i32].text);
  6591. }
  6592. function f13(t25, e23, i32) {
  6593. if (!i32 || !e23)
  6594. return;
  6595. t25.find((t26) => t26.layerView === e23 && t26.text === i32) || t25.push({ text: i32, layerView: e23 });
  6596. }
  6597. function y16(t25) {
  6598. return t25.type === "bing-maps";
  6599. }
  6600. var b9 = [];
  6601. var g17 = class extends d2 {
  6602. constructor(t25) {
  6603. super(t25), this._clear = () => {
  6604. this._fetchedAttributionData.clear(), this._pendingAttributions.clear(), this.handles.remove("suspension"), this.notifyChange("state");
  6605. }, this._pendingAttributions = new Set(), this._fetchedAttributionData = new Map(), this.items = new j3(), this.view = null, this._allLayerViewsChange = (t26) => {
  6606. this.handles.remove("suspension");
  6607. const e23 = this.get("view.allLayerViews");
  6608. e23 && this.handles.add(e23.map((t27) => l4(() => [t27.suspended, t27.layer?.attributionVisible], () => this._updateAttributionItems())), "suspension"), t26 && t26.removed && t26.removed.forEach((t27) => {
  6609. this._pendingAttributions.delete(t27), this._fetchedAttributionData.delete(t27);
  6610. }), this._updateAttributionItems();
  6611. }, this.handles.add([a3(() => this.view?.allLayerViews, "change", (t26) => this._allLayerViewsChange(t26), { onListenerAdd: () => this._allLayerViewsChange(), onListenerRemove: this._clear }), f2(() => this.view?.stationary === true, () => this._updateAttributionItems())]);
  6612. }
  6613. destroy() {
  6614. this.view = null, this._fetchedAttributionData.clear(), this._pendingAttributions.clear(), this.items.removeAll();
  6615. }
  6616. get state() {
  6617. return this.get("view.ready") ? this._pendingAttributions.size > 0 ? "loading" : "ready" : "disabled";
  6618. }
  6619. _updateAttributionItems() {
  6620. const t25 = this.get("view.allLayerViews");
  6621. b9.length = 0, t25 ? (t25.forEach((t26) => {
  6622. if (t26.suspended || !t26.layer?.attributionVisible)
  6623. return;
  6624. const e23 = t26.layer;
  6625. if (d16(e23, "user"))
  6626. return void f13(b9, t26, e23.copyright);
  6627. if (e23.hasAttributionData) {
  6628. if (this._fetchedAttributionData.has(t26)) {
  6629. const i33 = this._fetchedAttributionData.get(t26);
  6630. return void (i33 ? f13(b9, t26, this._getDynamicAttribution(i33, this.view, e23)) : d16(e23) && f13(b9, t26, e23.copyright));
  6631. }
  6632. return void this._fetchAttributionData(t26);
  6633. }
  6634. const i32 = e23.get("portalItem.accessInformation");
  6635. f13(b9, t26, i32 || e23.copyright);
  6636. }), m26(this.items, b9) && (this.items.removeAll(), this.items.addMany(b9)), b9.length = 0, this.notifyChange("state")) : this._clear();
  6637. }
  6638. async _fetchAttributionData(t25) {
  6639. if (this._pendingAttributions.has(t25))
  6640. return;
  6641. this._pendingAttributions.add(t25);
  6642. const i32 = await a7(t25.layer.fetchAttributionData());
  6643. if (this._pendingAttributions.has(t25)) {
  6644. const e23 = i32.ok ? this._createContributionIndex(i32.value, y16(t25.layer)) : null;
  6645. this._pendingAttributions.delete(t25), this._fetchedAttributionData.set(t25, e23);
  6646. }
  6647. this._updateAttributionItems();
  6648. }
  6649. _createContributionIndex(t25, e23) {
  6650. const i32 = t25.contributors, r24 = {};
  6651. if (!i32)
  6652. return r24;
  6653. for (let s30 = 0; s30 < i32.length; s30++) {
  6654. const t26 = i32[s30], o30 = t26.coverageAreas;
  6655. if (!o30)
  6656. return;
  6657. for (const i33 of o30) {
  6658. const o31 = i33.bbox, n34 = i33.zoomMin - (e23 && i33.zoomMin ? 1 : 0), a34 = i33.zoomMax - (e23 && i33.zoomMax ? 1 : 0), c42 = { xmin: o31[1], ymin: o31[0], xmax: o31[3], ymax: o31[2], spatialReference: k2.WGS84 }, u23 = { extent: R(c42), attribution: t26.attribution || "", score: i33.score != null ? i33.score : 100, id: s30 };
  6659. for (let t27 = n34; t27 <= a34; t27++)
  6660. r24[t27] = r24[t27] || [], r24[t27].push(u23);
  6661. }
  6662. }
  6663. return r24.maxKey = Math.max.apply(null, Object.keys(r24)), r24;
  6664. }
  6665. _getDynamicAttribution(t25, e23, i32) {
  6666. const { extent: r24, scale: s30 } = e23;
  6667. let o30 = i32.tileInfo.scaleToZoom(s30);
  6668. if (o30 = Math.min(t25.maxKey, Math.round(o30)), !r24 || o30 == null || o30 <= -1)
  6669. return "";
  6670. const n34 = t25[o30], a34 = M(r24.center.clone().normalize(), e23.spatialReference), c42 = {};
  6671. return n34 ? n34.filter((t26) => {
  6672. const e24 = !c42[t26.id] && a34 && r4(t26.extent, a34);
  6673. return e24 && (c42[t26.id] = true), e24;
  6674. }).sort((t26, e24) => e24.score - t26.score || t26.objectId - e24.objectId).map((t26) => t26.attribution).join(", ") : "";
  6675. }
  6676. };
  6677. e([d({ readOnly: true, type: j3 })], g17.prototype, "items", void 0), e([d({ readOnly: true })], g17.prototype, "state", null), e([d()], g17.prototype, "view", void 0), g17 = e([n3("esri.widgets.Attribution.AttributionViewModel")], g17);
  6678. var _7 = g17;
  6679. // node_modules/@arcgis/core/widgets/Attribution.js
  6680. var d17 = { base: "esri-attribution esri-widget", poweredBy: "esri-attribution__powered-by", sources: "esri-attribution__sources", open: "esri-attribution--open", sourcesOpen: "esri-attribution__sources--open", link: "esri-attribution__link", widgetIcon: "esri-icon-description", interactive: "esri-interactive" };
  6681. var l24 = class extends O2 {
  6682. constructor(e23, t25) {
  6683. super(e23, t25), this._isOpen = false, this._attributionTextOverflowed = false, this._prevSourceNodeHeight = 0, this._resizeObserver = new ResizeObserver((e24) => e24.forEach(({ target: e25 }) => this._checkSourceTextOverflow(e25))), this.iconClass = d17.widgetIcon, this.itemDelimiter = " | ", this.label = void 0, this.messages = null, this.view = null, this.viewModel = new _7();
  6684. }
  6685. initialize() {
  6686. this.own(a3(() => this.viewModel?.items, "change", () => this.scheduleRender()));
  6687. }
  6688. destroy() {
  6689. this._resizeObserver?.disconnect();
  6690. }
  6691. get _isInteractive() {
  6692. return this._isOpen || this._attributionTextOverflowed;
  6693. }
  6694. get attributionText() {
  6695. return this.viewModel.items.reduce((e23, t25) => (e23.includes(t25.text) || e23.push(t25.text), e23), []).join(this.itemDelimiter);
  6696. }
  6697. render() {
  6698. const e23 = { [d17.open]: this._isOpen };
  6699. return n6("div", { bind: this, class: this.classes(d17.base, e23), dir: "ltr", onclick: this._toggleState, onkeydown: this._toggleState }, this.renderSourcesNode(), this.renderPoweredBy());
  6700. }
  6701. renderPoweredBy() {
  6702. return n6("div", { class: d17.poweredBy }, "Powered by", " ", n6("a", { class: d17.link, href: "http://www.esri.com/", target: "_blank", rel: "noreferrer" }, "Esri"));
  6703. }
  6704. renderSourcesNode() {
  6705. const e23 = this._isOpen, t25 = this._isInteractive, i32 = t25 ? "0" : "", { attributionText: r24 } = this, s30 = { [d17.sourcesOpen]: e23, [d17.interactive]: t25 };
  6706. return n6("div", { afterCreate: this._afterSourcesNodeCreate, bind: this, class: this.classes(d17.sources, s30), innerHTML: r24, tabindex: i32 });
  6707. }
  6708. _afterSourcesNodeCreate(e23) {
  6709. this._prevSourceNodeHeight = e23.clientWidth, this._resizeObserver.observe(e23);
  6710. }
  6711. _checkSourceTextOverflow(e23) {
  6712. let t25 = false;
  6713. const { clientHeight: i32, clientWidth: r24, scrollWidth: s30 } = e23, o30 = s30 > r24, n34 = this._attributionTextOverflowed !== o30;
  6714. if (this._attributionTextOverflowed = o30, n34 && (t25 = true), this._isOpen) {
  6715. const e24 = i32 < this._prevSourceNodeHeight;
  6716. this._prevSourceNodeHeight = i32, e24 && (this._isOpen = false, t25 = true);
  6717. }
  6718. t25 && this.scheduleRender();
  6719. }
  6720. _toggleState() {
  6721. this._isInteractive && (this._isOpen = !this._isOpen);
  6722. }
  6723. };
  6724. e([d()], l24.prototype, "_isOpen", void 0), e([d()], l24.prototype, "_isInteractive", null), e([d()], l24.prototype, "_attributionTextOverflowed", void 0), e([d()], l24.prototype, "_prevSourceNodeHeight", void 0), e([d({ readOnly: true, dependsOn: ["viewModel.items.length", "itemDelimiter"] })], l24.prototype, "attributionText", null), e([d()], l24.prototype, "iconClass", void 0), e([d()], l24.prototype, "itemDelimiter", void 0), e([d({ aliasOf: { source: "messages.widgetLabel", overridable: true } })], l24.prototype, "label", void 0), e([d(), e4("esri/widgets/Attribution/t9n/Attribution")], l24.prototype, "messages", void 0), e([o9("viewModel.view")], l24.prototype, "view", void 0), e([d({ type: _7 })], l24.prototype, "viewModel", void 0), e([t7()], l24.prototype, "_toggleState", null), l24 = e([n3("esri.widgets.Attribution")], l24);
  6725. var u20 = l24;
  6726. // node_modules/@arcgis/core/widgets/Compass/CompassViewModel.js
  6727. var p31 = "esri.widgets.CompassViewModel";
  6728. var d18 = class extends e16(y) {
  6729. constructor(t25) {
  6730. super(t25), this._handles = new u3(), this.orientation = { x: 0, y: 0, z: 0 }, this.view = null, this._updateForCamera = this._updateForCamera.bind(this), this._updateForRotation = this._updateForRotation.bind(this), this._updateRotationWatcher = this._updateRotationWatcher.bind(this);
  6731. }
  6732. initialize() {
  6733. this._handles.add(l4(() => this.view, this._updateRotationWatcher, h2));
  6734. }
  6735. destroy() {
  6736. this._handles = a2(this._handles), this.view = null;
  6737. }
  6738. get canShowNorth() {
  6739. const t25 = this.get("view.spatialReference");
  6740. return !(!t25 || !t25.isWebMercator && !t25.isGeographic);
  6741. }
  6742. get state() {
  6743. return this.get("view.ready") ? this.canShowNorth ? "compass" : "rotation" : "disabled";
  6744. }
  6745. reset() {
  6746. if (!this.get("view.ready"))
  6747. return;
  6748. const t25 = {};
  6749. this.view.type === "2d" ? t25.rotation = 0 : t25.heading = 0, this.callGoTo({ target: t25 });
  6750. }
  6751. _updateForRotation(t25) {
  6752. t25 != null && (this.orientation = { z: t25 });
  6753. }
  6754. _updateForCamera(t25) {
  6755. if (!t25)
  6756. return;
  6757. const o30 = -t25.heading;
  6758. this.orientation = { x: 0, y: 0, z: o30 };
  6759. }
  6760. _updateRotationWatcher(t25) {
  6761. this._handles.removeAll(), t25 && this._handles.add(t25.type === "2d" ? l4(() => t25?.rotation, this._updateForRotation, h2) : l4(() => t25?.camera, this._updateForCamera, h2));
  6762. }
  6763. };
  6764. e([d({ readOnly: true })], d18.prototype, "canShowNorth", null), e([d()], d18.prototype, "orientation", void 0), e([d({ readOnly: true })], d18.prototype, "state", null), e([d()], d18.prototype, "view", void 0), d18 = e([n3(p31)], d18);
  6765. var c37 = d18;
  6766. // node_modules/@arcgis/core/widgets/Compass.js
  6767. var p32 = { base: "esri-compass esri-widget--button esri-widget", text: "esri-icon-font-fallback-text", icon: "esri-compass__icon", rotationIcon: "esri-icon-dial", northIcon: "esri-icon-compass", widgetIcon: "esri-icon-locate-circled", interactive: "esri-interactive", disabled: "esri-disabled" };
  6768. var l25 = class extends O2 {
  6769. constructor(s30, e23) {
  6770. super(s30, e23), this.goToOverride = null, this.iconClass = p32.widgetIcon, this.label = void 0, this.messages = null, this.view = null, this.viewModel = new c37();
  6771. }
  6772. reset() {
  6773. return this.viewModel.reset();
  6774. }
  6775. render() {
  6776. const { orientation: s30, state: e23 } = this.viewModel, o30 = e23 === "disabled", t25 = (e23 === "rotation" ? "rotation" : "compass") === "compass", r24 = o30 ? -1 : 0, i32 = { [p32.disabled]: o30, [p32.interactive]: !o30 }, a34 = { [p32.northIcon]: t25, [p32.rotationIcon]: !t25 }, { messages: c42 } = this;
  6777. return n6("div", { bind: this, class: this.classes(p32.base, i32), onclick: this._reset, onkeydown: this._reset, role: "button", tabIndex: r24, "aria-label": c42.reset, title: c42.reset }, n6("span", { "aria-hidden": "true", class: this.classes(p32.icon, a34), styles: this._toRotationTransform(s30) }), n6("span", { class: p32.text }, c42.reset));
  6778. }
  6779. _reset() {
  6780. this.viewModel.reset();
  6781. }
  6782. _toRotationTransform(s30) {
  6783. return { transform: `rotateZ(${s30.z}deg)` };
  6784. }
  6785. };
  6786. e([o9("viewModel.goToOverride")], l25.prototype, "goToOverride", void 0), e([d()], l25.prototype, "iconClass", void 0), e([d({ aliasOf: { source: "messages.widgetLabel", overridable: true } })], l25.prototype, "label", void 0), e([d(), e4("esri/widgets/Compass/t9n/Compass")], l25.prototype, "messages", void 0), e([o9("viewModel.view")], l25.prototype, "view", void 0), e([d({ type: c37 })], l25.prototype, "viewModel", void 0), e([t7()], l25.prototype, "_reset", null), l25 = e([n3("esri.widgets.Compass")], l25);
  6787. var d19 = l25;
  6788. // node_modules/@arcgis/core/widgets/NavigationToggle/NavigationToggleViewModel.js
  6789. var a30 = class extends y {
  6790. constructor(t25) {
  6791. super(t25), this._handles = new u3(), this.navigationMode = "pan", this.view = null;
  6792. }
  6793. initialize() {
  6794. this._handles.add(f2(() => this.view?.inputManager, () => this._setNavigationMode()));
  6795. }
  6796. destroy() {
  6797. this._handles.destroy(), this._handles = null, this.view = null;
  6798. }
  6799. get state() {
  6800. return this.get("view.ready") && this.view.type === "3d" ? "ready" : "disabled";
  6801. }
  6802. toggle() {
  6803. this.state !== "disabled" && (this.navigationMode = this.navigationMode !== "pan" ? "pan" : "rotate", this._setNavigationMode());
  6804. }
  6805. _setNavigationMode() {
  6806. this.get("view.inputManager").primaryDragAction = this.navigationMode === "pan" ? "pan" : "rotate";
  6807. }
  6808. };
  6809. e([d({ readOnly: true })], a30.prototype, "state", null), e([d()], a30.prototype, "navigationMode", void 0), e([d()], a30.prototype, "view", void 0), a30 = e([n3("esri.widgets.NavigationToggleViewModel")], a30);
  6810. var n32 = a30;
  6811. // node_modules/@arcgis/core/widgets/NavigationToggle.js
  6812. var g18 = { base: "esri-navigation-toggle esri-widget", button: "esri-navigation-toggle__button esri-widget--button", activeButton: "esri-navigation-toggle__button--active", panButton: "esri-navigation-toggle__button--pan", rotateButton: "esri-navigation-toggle__button--rotate", isLayoutHorizontal: "esri-navigation-toggle--horizontal", rotationIcon: "esri-icon-rotate", panIcon: "esri-icon-pan", widgetIcon: "esri-icon-pan2", disabled: "esri-disabled" };
  6813. var p33 = class extends O2 {
  6814. constructor(t25, o30) {
  6815. super(t25, o30), this.iconClass = g18.widgetIcon, this.label = void 0, this.messages = null, this.view = null, this.viewModel = new n32();
  6816. }
  6817. set layout(t25) {
  6818. t25 !== "horizontal" && (t25 = "vertical"), this._set("layout", t25);
  6819. }
  6820. toggle() {
  6821. return this.viewModel.toggle();
  6822. }
  6823. render() {
  6824. const t25 = this.get("viewModel.state") === "disabled", o30 = this.get("viewModel.navigationMode") === "pan", e23 = { [g18.disabled]: t25, [g18.isLayoutHorizontal]: this.layout === "horizontal" }, s30 = { [g18.activeButton]: o30 }, i32 = { [g18.activeButton]: !o30 }, a34 = t25 ? -1 : 0, r24 = this.messages.toggle;
  6825. return n6("div", { bind: this, class: this.classes(g18.base, e23), onclick: this._toggle, onkeydown: this._toggle, tabIndex: a34, "aria-label": r24, title: r24 }, n6("div", { class: this.classes(g18.button, g18.panButton, s30) }, n6("span", { class: g18.panIcon })), n6("div", { class: this.classes(g18.button, g18.rotateButton, i32) }, n6("span", { class: g18.rotationIcon })));
  6826. }
  6827. _toggle() {
  6828. this.toggle();
  6829. }
  6830. };
  6831. e([d()], p33.prototype, "iconClass", void 0), e([d({ aliasOf: { source: "messages.widgetLabel", overridable: true } })], p33.prototype, "label", void 0), e([d({ value: "vertical" })], p33.prototype, "layout", null), e([d(), e4("esri/widgets/NavigationToggle/t9n/NavigationToggle")], p33.prototype, "messages", void 0), e([o9("viewModel.view")], p33.prototype, "view", void 0), e([d({ type: n32 })], p33.prototype, "viewModel", void 0), e([t7()], p33.prototype, "_toggle", null), p33 = e([n3("esri.widgets.NavigationToggle")], p33);
  6832. var c38 = p33;
  6833. // node_modules/@arcgis/core/widgets/Zoom/IconButton.js
  6834. var c39 = { button: "esri-widget--button esri-widget", disabled: "esri-disabled", interactive: "esri-interactive", iconText: "esri-icon-font-fallback-text", icon: "esri-icon" };
  6835. var n33 = class extends O2 {
  6836. constructor() {
  6837. super(...arguments), this.enabled = true, this.iconClass = "", this.title = "";
  6838. }
  6839. render() {
  6840. const t25 = this.enabled ? 0 : -1, s30 = { [c39.disabled]: !this.enabled, [c39.interactive]: this.enabled }, i32 = { [this.iconClass]: !!this.iconClass };
  6841. return n6("div", { bind: this, class: this.classes(c39.button, s30), onclick: this._triggerAction, onkeydown: this._triggerAction, role: "button", tabIndex: t25, title: this.title }, n6("span", { "aria-hidden": "true", role: "presentation", class: this.classes(c39.icon, i32) }), n6("span", { class: c39.iconText }, this.title));
  6842. }
  6843. _triggerAction() {
  6844. this.action.call(this);
  6845. }
  6846. };
  6847. e([d()], n33.prototype, "action", void 0), e([d()], n33.prototype, "enabled", void 0), e([d()], n33.prototype, "iconClass", void 0), e([d()], n33.prototype, "title", void 0), e([t7()], n33.prototype, "_triggerAction", null), n33 = e([n3("esri.widgets.IconButton")], n33);
  6848. var a31 = n33;
  6849. // node_modules/@arcgis/core/widgets/Zoom/ZoomConditions2D.js
  6850. var s28 = class extends y {
  6851. get canZoomIn() {
  6852. if (!this.get("view.ready"))
  6853. return false;
  6854. const e23 = this.get("view.animation.target.scale") || this.get("view.scale"), t25 = this.get("view.constraints.effectiveMaxScale");
  6855. return t25 === 0 || e23 > t25;
  6856. }
  6857. get canZoomOut() {
  6858. if (!this.get("view.ready"))
  6859. return false;
  6860. const e23 = this.get("view.animation.target.scale") || this.get("view.scale"), t25 = this.get("view.constraints.effectiveMinScale");
  6861. return t25 === 0 || e23 < t25;
  6862. }
  6863. };
  6864. e([d({ readOnly: true })], s28.prototype, "canZoomIn", null), e([d({ readOnly: true })], s28.prototype, "canZoomOut", null), e([d()], s28.prototype, "view", void 0), s28 = e([n3("esri.widgets.Zoom.ZoomConditions2D")], s28);
  6865. var i31 = s28;
  6866. // node_modules/@arcgis/core/widgets/Zoom/ZoomConditions3D.js
  6867. var s29 = class extends y {
  6868. get canZoomIn() {
  6869. return !!this.get("view.ready");
  6870. }
  6871. get canZoomOut() {
  6872. return !!this.get("view.ready");
  6873. }
  6874. };
  6875. e([d({ readOnly: true })], s29.prototype, "canZoomIn", null), e([d({ readOnly: true })], s29.prototype, "canZoomOut", null), e([d()], s29.prototype, "view", void 0), s29 = e([n3("esri.widgets.Zoom.ZoomConditions3D")], s29);
  6876. var c40 = s29;
  6877. // node_modules/@arcgis/core/widgets/Zoom/ZoomViewModel.js
  6878. var m27 = class extends y {
  6879. constructor(o30) {
  6880. super(o30), this.canZoomIn = false, this.canZoomOut = false;
  6881. }
  6882. destroy() {
  6883. this.view = null;
  6884. }
  6885. get state() {
  6886. return this.get("view.ready") ? "ready" : "disabled";
  6887. }
  6888. set view(o30) {
  6889. o30 ? o30.type === "2d" ? this._zoomConditions = new i31({ view: o30 }) : o30.type === "3d" && (this._zoomConditions = new c40({ view: o30 })) : this._zoomConditions = null, this._set("view", o30);
  6890. }
  6891. zoomIn() {
  6892. if (!this.canZoomIn)
  6893. return;
  6894. const o30 = this.view;
  6895. o30.type === "2d" ? o30.mapViewNavigation.zoomIn() : j(o30.goTo({ zoomFactor: 2 }));
  6896. }
  6897. zoomOut() {
  6898. if (!this.canZoomOut)
  6899. return;
  6900. const o30 = this.view;
  6901. o30.type === "2d" ? o30.mapViewNavigation.zoomOut() : j(o30.goTo({ zoomFactor: 0.5 }));
  6902. }
  6903. };
  6904. e([d()], m27.prototype, "_zoomConditions", void 0), e([d({ aliasOf: "_zoomConditions.canZoomIn", readOnly: true })], m27.prototype, "canZoomIn", void 0), e([d({ aliasOf: "_zoomConditions.canZoomOut", readOnly: true })], m27.prototype, "canZoomOut", void 0), e([d({ readOnly: true })], m27.prototype, "state", null), e([d()], m27.prototype, "view", null), m27 = e([n3("esri.widgets.Zoom.ZoomViewModel")], m27);
  6905. var a32 = m27;
  6906. // node_modules/@arcgis/core/widgets/Zoom.js
  6907. var l26 = { base: "esri-zoom esri-widget", horizontalLayout: "esri-zoom--horizontal", zoomInIcon: "esri-icon-plus", zoomOutIcon: "esri-icon-minus", widgetIcon: "esri-icon-zoom-in-magnifying-glass" };
  6908. var u21 = class extends O2 {
  6909. constructor(o30, t25) {
  6910. super(o30, t25), this.iconClass = l26.widgetIcon, this.label = void 0, this.messages = null, this.view = null, this.viewModel = new a32();
  6911. }
  6912. initialize() {
  6913. this._zoomInButton = new a31({ action: this.zoomIn.bind(this), iconClass: l26.zoomInIcon }), this._zoomOutButton = new a31({ action: this.zoomOut.bind(this), iconClass: l26.zoomOutIcon });
  6914. }
  6915. destroy() {
  6916. this._zoomInButton.destroy(), this._zoomOutButton.destroy(), this._zoomInButton = null, this._zoomOutButton = null;
  6917. }
  6918. set layout(o30) {
  6919. o30 !== "horizontal" && (o30 = "vertical"), this._set("layout", o30);
  6920. }
  6921. render() {
  6922. const o30 = this.viewModel, t25 = { [l26.horizontalLayout]: this.layout === "horizontal" };
  6923. return this._zoomInButton.enabled = o30.state === "ready" && o30.canZoomIn, this._zoomOutButton.enabled = o30.state === "ready" && o30.canZoomOut, this._zoomInButton.title = this.messages.zoomIn, this._zoomOutButton.title = this.messages.zoomOut, n6("div", { class: this.classes(l26.base, t25) }, this._zoomInButton.render(), this._zoomOutButton.render());
  6924. }
  6925. zoomIn() {
  6926. return this.viewModel.zoomIn();
  6927. }
  6928. zoomOut() {
  6929. return this.viewModel.zoomOut();
  6930. }
  6931. };
  6932. e([d()], u21.prototype, "iconClass", void 0), e([d({ aliasOf: { source: "messages.widgetLabel", overridable: true } })], u21.prototype, "label", void 0), e([d({ value: "vertical" })], u21.prototype, "layout", null), e([d(), e4("esri/widgets/Zoom/t9n/Zoom")], u21.prototype, "messages", void 0), e([o9("viewModel.view")], u21.prototype, "view", void 0), e([d({ type: a32 })], u21.prototype, "viewModel", void 0), u21 = e([n3("esri.widgets.Zoom")], u21);
  6933. var c41 = u21;
  6934. // node_modules/@arcgis/core/views/ui/DefaultUI.js
  6935. var h18 = "esri.views.ui.DefaultUI";
  6936. function u22(t25) {
  6937. return t25 && t25.view !== void 0;
  6938. }
  6939. s.getLogger(h18);
  6940. var g19 = class extends L10 {
  6941. constructor(t25) {
  6942. super(t25), this._defaultPositionLookup = { attribution: "manual", compass: "top-left", "navigation-toggle": "top-left", zoom: "top-left" }, this.components = [];
  6943. }
  6944. initialize() {
  6945. this._handles.add([l4(() => this.components, this._componentsWatcher.bind(this), h2), l4(() => this.view, this._updateViewAwareWidgets.bind(this), h2)]);
  6946. }
  6947. _add(t25, o30, e23, i32) {
  6948. if (typeof t25 == "string" && this._defaultPositionLookup[t25]) {
  6949. if (this._find(t25))
  6950. return;
  6951. t25 = this._createComponent(t25);
  6952. }
  6953. super._add(t25, o30, e23, i32);
  6954. }
  6955. _removeComponents(t25) {
  6956. t25.forEach((t26) => {
  6957. const o30 = this._find(t26);
  6958. o30 && (this.remove(o30), o30.destroy());
  6959. });
  6960. }
  6961. _updateViewAwareWidgets(t25) {
  6962. this.components.forEach((o30) => {
  6963. const e23 = this._find(o30), i32 = e23 && e23.widget;
  6964. u22(i32) && (i32.view = t25);
  6965. });
  6966. }
  6967. _componentsWatcher(t25, o30) {
  6968. this._removeComponents(o30), this._addComponents(t25), this._adjustPadding(t25);
  6969. }
  6970. _adjustPadding(t25) {
  6971. if (!t25.includes("attribution") && !this._isOverridden("padding")) {
  6972. const { top: t26 } = this.padding;
  6973. this.padding = t26;
  6974. }
  6975. }
  6976. _addComponents(t25) {
  6977. this.initialized && t25.forEach((t26) => this.add(this._createComponent(t26), this._defaultPositionLookup[t26]));
  6978. }
  6979. _createComponent(t25) {
  6980. const o30 = this._createWidget(t25);
  6981. if (o30)
  6982. return new l23({ id: t25, node: o30 });
  6983. }
  6984. _createWidget(t25) {
  6985. return t25 === "attribution" ? this._createAttribution() : t25 === "compass" ? this._createCompass() : t25 === "navigation-toggle" ? this._createNavigationToggle() : t25 === "zoom" ? this._createZoom() : void 0;
  6986. }
  6987. _createAttribution() {
  6988. return new u20({ view: this.view });
  6989. }
  6990. _createCompass() {
  6991. return new d19({ view: this.view });
  6992. }
  6993. _createNavigationToggle() {
  6994. return new c38({ view: this.view });
  6995. }
  6996. _createZoom() {
  6997. return new c41({ view: this.view });
  6998. }
  6999. };
  7000. e([d()], g19.prototype, "components", void 0), g19 = e([n3(h18)], g19);
  7001. var _8 = g19;
  7002. // node_modules/@arcgis/core/views/ui/2d/DefaultUI2D.js
  7003. var e22 = class extends _8 {
  7004. constructor(o30) {
  7005. super(o30), this.components = ["attribution", "zoom"];
  7006. }
  7007. };
  7008. e([d()], e22.prototype, "components", void 0), e22 = e([n3("esri.views.ui.2d.DefaultUI2D")], e22);
  7009. var p34 = e22;
  7010. // node_modules/@arcgis/core/webmap/background/ColorBackground.js
  7011. var p35;
  7012. var a33 = p35 = class extends l2 {
  7013. constructor(o30) {
  7014. super(o30), this.color = new l5([0, 0, 0, 1]);
  7015. }
  7016. clone() {
  7017. return new p35(m({ color: this.color }));
  7018. }
  7019. };
  7020. e([d({ type: l5, json: { write: true } })], a33.prototype, "color", void 0), a33 = p35 = e([n3("esri.webmap.background.ColorBackground")], a33);
  7021. var m28 = a33;
  7022. // node_modules/@arcgis/core/views/MapView.js
  7023. var he = s.getLogger("esri.views.MapView");
  7024. var ce2;
  7025. var de3;
  7026. var ue2;
  7027. var me2;
  7028. var ge;
  7029. var fe2;
  7030. async function ye2() {
  7031. const [, { GraphicsView2D: e23, GraphicContainer: t25, LabelManager: i32, MapViewNavigation: s30, MagnifierView2D: r24, Stage: n34 }] = await Promise.all([import("./webglDeps-KBPNVQNX.js"), import("./mapViewDeps-56OJ7M5D.js")]);
  7032. de3 = e23, ue2 = t25, me2 = i32, ge = s30, fe2 = r24, ce2 = n34;
  7033. }
  7034. var we = 160;
  7035. function _e(e23) {
  7036. return e23 && e23.declaredClass === "esri.Viewpoint";
  7037. }
  7038. var ve = class extends w4(g12(p16(G4))) {
  7039. constructor(e23) {
  7040. super(e23), this._magnifierView = null, this._stage = null, this._resolveWhenReady = [], this.rootLayerViews = new p4({ getCollections: () => [this.basemapView?.baseLayerViews, this.layerViews, this.basemapView?.referenceLayerViews], getChildrenFunction: () => null }), this.featuresTilingScheme = null, this.fullOpacity = 1, this.graphicsView = null, this.labelManager = null, this.mapViewNavigation = null, this.renderingOptions = { samplingMode: "dynamic", edgeLabelsVisible: true, labelsAnimationTime: 125, labelCollisionsEnabled: true }, this.rendering = false, this.supersampleScreenshotsEnabled = false, this.supportsGround = false, this._stationaryTimer = null, this.frameTask = new s19(this), this._pePromise = null, this.floors = new j3(), this.highlightOptions = new c35(), this.inputManager = new k4({ view: this }), this.map = null, this.resizeAlign = "center", this.spatialReferenceLocked = false, this.timeline = new e10(), this.type = "2d", this.ui = new p34(), this._pixelFormat = { flipY: true, premultipliedAlpha: true }, this.constraints = new y14(), this.padding = { top: 0, right: 0, bottom: 0, left: 0 }, this.handles.add([l4(() => this.viewpoint, () => {
  7041. this._lastStationaryEventTimestamp = performance.now(), this._flipStationary(we);
  7042. }, U), this.on("resize", (e24) => this._resizeHandler(e24)), l4(() => this.animationManager?.animation, (e24) => {
  7043. this.animation = e24;
  7044. })]), c9();
  7045. }
  7046. destroy() {
  7047. this._set("preconditionsReady", false), this._gotoTask = this.frameTask = null, this.rootLayerViews.destroy(), this.inputManager.destroy(), this._set("inputManager", null);
  7048. }
  7049. get graphicsTileStore() {
  7050. return new l10(this.featuresTilingScheme);
  7051. }
  7052. get initialExtentRequired() {
  7053. const { scale: e23, constraints: t25, center: i32, viewpoint: s30, extent: r24 } = this;
  7054. let n34 = this.zoom;
  7055. return !(this.map && "initialViewProperties" in this.map && this.map.initialViewProperties?.viewpoint) && (!r24 && (t25?.effectiveLODs || (n34 = -1), (!i32 || e23 === 0 && n34 === -1) && (!s30 || !r(s30.targetGeometry) || s30.targetGeometry.type !== "extent" && !s30.scale)));
  7056. }
  7057. get resourceManager() {
  7058. return this._stage.resourceManager;
  7059. }
  7060. get textureManager() {
  7061. return this._stage.painter.textureManager;
  7062. }
  7063. get _defaultsFromMapSettings() {
  7064. return { required: { tileInfo: true, heightModelInfo: false, extent: false }, requiresExtentInSpatialReference: this.spatialReferenceLocked };
  7065. }
  7066. get _projectionEngineLoaded() {
  7067. return !!en() || (this._pePromise || (this._pePromise = tn().finally(() => {
  7068. this._pePromise = null;
  7069. })), false);
  7070. }
  7071. get typeSpecificPreconditionsReady() {
  7072. const e23 = this._getDefaultViewpoint();
  7073. if (!e23)
  7074. return false;
  7075. const t25 = this.spatialReference, i32 = e2(e23.targetGeometry);
  7076. return !!An(i32.spatialReference, t25) || this._projectionEngineLoaded;
  7077. }
  7078. set animation(e23) {
  7079. const t25 = this._get("animation");
  7080. if (e23 === t25)
  7081. return;
  7082. if (t25 && t25.stop(), !e23 || e23.isFulfilled())
  7083. return void this._set("animation", null);
  7084. this._set("animation", e23), this.frameTask.animationInProgress = true;
  7085. const i32 = () => {
  7086. e23 === this._get("animation") && (this._set("animation", null), this.frameTask.requestFrame()), this.frameTask.animationInProgress = false;
  7087. };
  7088. e23.when(i32, i32);
  7089. }
  7090. get background() {
  7091. return this.get("map.initialViewProperties.background") || null;
  7092. }
  7093. set background(e23) {
  7094. e23 === void 0 ? this._clearOverride("background") : this._override("background", e23);
  7095. }
  7096. get center() {
  7097. if (!this.ready)
  7098. return this._get("center");
  7099. const { center: e23, spatialReference: t25 } = this.state.paddedViewState;
  7100. return new j2({ x: e23[0], y: e23[1], spatialReference: t25 });
  7101. }
  7102. set center(e23) {
  7103. if (e23 == null)
  7104. return;
  7105. if (!this.ready)
  7106. return this._set("center", e23), void this.notifyChange("initialExtentRequired");
  7107. let t25;
  7108. try {
  7109. t25 = this._project(e23, this.spatialReference);
  7110. } catch (s30) {
  7111. return void he.error(new s2("mapview:invalid-center", "could not project the value in the view's spatial reference", { input: e23, error: s30 }));
  7112. }
  7113. const i32 = this.viewpoint;
  7114. xt(i32, i32, t25), this.viewpoint = i32;
  7115. }
  7116. set constraints(e23) {
  7117. const t25 = this._get("constraints");
  7118. t25 && (this.handles.remove("map-view-constraints"), t25.destroy()), this._set("constraints", e23), e23 && (e23.view = this, this.ready && (this.state.viewpoint = e23.fit(this.state.paddedViewState.viewpoint)), this.handles.add(l4(() => e23.version, () => {
  7119. this.ready && this.state && (this.state.viewpoint = e23.fit(this.state.paddedViewState.viewpoint));
  7120. }, U), "map-view-constraints"));
  7121. }
  7122. get extent() {
  7123. return this.ready ? this.state.paddedViewState.extent.clone() : this._get("extent");
  7124. }
  7125. set extent(e23) {
  7126. if (e23 == null)
  7127. return;
  7128. if (!e23.width || !e23.height)
  7129. return void he.error(new s2("mapview:invalid-extent", "invalid extent size"));
  7130. if (!this.ready)
  7131. return this._set("extent", e23), this._set("center", null), this._set("viewpoint", null), this._set("scale", 0), this._set("zoom", -1), void this.notifyChange("initialExtentRequired");
  7132. let t25;
  7133. try {
  7134. t25 = this._project(e23, this.spatialReference);
  7135. } catch (s30) {
  7136. return void he.error(new s2("mapview:invalid-extent", "could not project the value in the view's spatial reference", { error: s30 }));
  7137. }
  7138. const i32 = this.viewpoint;
  7139. tt(i32, i32, t25, this.size, { constraints: this.constraints }), this.viewpoint = i32;
  7140. }
  7141. get padding() {
  7142. return this.ready ? this.state.padding : this._get("padding");
  7143. }
  7144. set padding(e23) {
  7145. this.ready ? (this.state.padding = e23, this._set("padding", this.state.padding)) : this._set("padding", e23);
  7146. }
  7147. get resolution() {
  7148. return this.state ? this.state.resolution : 0;
  7149. }
  7150. get rotation() {
  7151. return this.ready ? this.state.rotation : this._get("rotation");
  7152. }
  7153. set rotation(e23) {
  7154. if (isNaN(e23))
  7155. return;
  7156. if (!this.ready)
  7157. return void this._set("rotation", e23);
  7158. const t25 = this.viewpoint;
  7159. wt(t25, t25, e23), this.viewpoint = t25;
  7160. }
  7161. get scale() {
  7162. return this.ready ? this.state.scale : this._get("scale");
  7163. }
  7164. set scale(e23) {
  7165. if (!e23 || isNaN(e23))
  7166. return;
  7167. if (!this.ready) {
  7168. this._set("scale", e23), this._set("zoom", -1);
  7169. const t26 = this._get("extent");
  7170. return t26 && (this._set("extent", null), this._set("center", t26.center)), void this.notifyChange("initialExtentRequired");
  7171. }
  7172. const t25 = this.viewpoint;
  7173. jt(t25, t25, e23), this.viewpoint = t25;
  7174. }
  7175. get stationary() {
  7176. return !(this.animation || this.navigating || this.resizing || this._stationaryTimer);
  7177. }
  7178. get updating() {
  7179. return !this.destroyed && (!this.layerViewManager || !this.labelManager || !this.graphicsView || this.layerViewManager.updating === true || this.labelManager.updating === true || this.graphicsView.updating === true || this.allLayerViews.some((e23) => !e23.destroyed && !("layerViews" in e23) && e23.updating === true));
  7180. }
  7181. get viewpoint() {
  7182. if (!this.ready)
  7183. return this._get("viewpoint");
  7184. const e23 = this.state.paddedViewState;
  7185. return e23 && e23.viewpoint.clone();
  7186. }
  7187. set viewpoint(e23) {
  7188. if (e23 == null)
  7189. return;
  7190. if (!this.ready)
  7191. return this._set("viewpoint", e23), this._set("extent", null), this._set("center", null), this._set("zoom", -1), this._set("scale", 0), void this.notifyChange("initialExtentRequired");
  7192. let t25, s30;
  7193. try {
  7194. t25 = this._project(e23, this.spatialReference), !e23.scale || isNaN(e23.scale) ? s30 = new s2("mapview:invalid-viewpoint", `invalid scale value of ${e23.scale}`) : t(e23.targetGeometry) && (s30 = new s2("mapview:invalid-viewpoint", "geometry not defined"));
  7195. } catch (a34) {
  7196. s30 = new s2("mapview:invalid-viewpoint", "could not project the value in the view's spatial reference", { error: a34 });
  7197. }
  7198. if (s30)
  7199. return void he.error(s30);
  7200. this._scaleBeforeChangingSpatialReference = null;
  7201. const r24 = new u5({ targetGeometry: new j2(), scale: 0, rotation: 0 });
  7202. Z(r24, t25), this.constraints.constrain(r24, this.state.paddedViewState.viewpoint), this.state.viewpoint = r24, this.frameTask.requestFrame(), this._set("viewpoint", r24);
  7203. }
  7204. get zoom() {
  7205. return this.ready ? this.constraints.scaleToZoom(this.scale) : this._get("zoom");
  7206. }
  7207. set zoom(e23) {
  7208. if (e23 == null)
  7209. return;
  7210. if (!this.ready) {
  7211. this._set("zoom", e23), this._set("scale", 0);
  7212. const t26 = this._get("extent");
  7213. return t26 && (this._set("extent", null), this._set("center", t26.center)), void this.notifyChange("initialExtentRequired");
  7214. }
  7215. if (!this.constraints.effectiveLODs)
  7216. return void this._set("zoom", -1);
  7217. const t25 = this.viewpoint;
  7218. jt(t25, t25, this.constraints.zoomToScale(e23)), this.viewpoint = t25, this._set("zoom", this.constraints.scaleToZoom(this.scale));
  7219. }
  7220. get navigating() {
  7221. return !(!this.mapViewNavigation || !this.mapViewNavigation.interacting);
  7222. }
  7223. goTo(e23, t25) {
  7224. if (e23)
  7225. return this.animation && (this.animation = null), this._createAnimation(), j4(() => this.ready, t25).then(() => {
  7226. const i32 = { animate: true, ...t25 }, s30 = Y(e23, this);
  7227. return this.animation.update(s30), this._gotoTask = {}, i32.animate ? this._gotoAnimated(s30, i32) : this._gotoImmediate(s30, i32);
  7228. });
  7229. he.error("#goTo()", "target cannot be null or undefined");
  7230. }
  7231. async hitTest(e23, t25) {
  7232. const i32 = o21(e23) ? r19(this, e23) : e23;
  7233. if (!this.ready || isNaN(i32.x) || isNaN(i32.y))
  7234. return { screenPoint: i32, results: [] };
  7235. let s30 = new Set(), r24 = false, n34 = null, a34 = null;
  7236. t25?.include ? Te(t25.include, je(this, (e24) => s30.add(e24), (e24) => {
  7237. n34 || (n34 = new Set()), n34.add(e24);
  7238. }, (e24) => s30.add(e24), () => r24 = true)) : (r24 = true, s30 = new Set(this.allLayerViews)), t25?.exclude && Te(t25.exclude, je(this, (e24) => s30.delete(e24), (e24) => {
  7239. a34 || (a34 = new Set()), a34.add(e24);
  7240. }));
  7241. const o30 = this.allLayerViews.filter((e24) => !e24.suspended && s30.has(e24)).reverse(), l27 = this.toMap(i32);
  7242. let h19 = [...r24 ? this.graphicsView.hitTest(l27).map((e24) => ({ type: "graphic", graphic: e24, layer: null, mapPoint: l27 })) : [], ...await Promise.all(o30.map((e24) => e24.hitTest(l27, i32)).toArray())].filter(r).flat().filter(r);
  7243. return n34 && (h19 = h19.filter((e24) => !("graphic" in e24) || !e24.graphic || n34.has(Se(e24.graphic)))), a34 && (h19 = h19.filter((e24) => !("graphic" in e24) || !e24.graphic || a34.has(Se(e24.graphic)))), { screenPoint: i32, results: h19 };
  7244. }
  7245. async takeScreenshot(e23) {
  7246. const t25 = this._createScreenshotPlan(e23), i32 = await this._stage.takeScreenshot(t25);
  7247. return r10(i32, { format: t25.format, quality: t25.quality, rotation: 0, disableDecorations: false }, this._pixelFormat);
  7248. }
  7249. async _takeScreenshot(e23) {
  7250. const t25 = this._createScreenshotPlan(e23), i32 = await this._stage.takeScreenshot(t25);
  7251. return l7(i32, this._pixelFormat);
  7252. }
  7253. _createScreenshotPlan(e23) {
  7254. e23 = e23 || {};
  7255. const t25 = this.supersampleScreenshotsEnabled ? Math.min(4, w3(this.size, Math.min(4096, this._stage.context.parameters.maxTextureSize))) : 1;
  7256. let i32;
  7257. e23.layers ? (i32 = [], e23.layers.forEach((e24) => {
  7258. const t26 = this.allLayerViews.find((t27) => t27.layer.id === e24.id);
  7259. t26 && "container" in t26 && t26.container && i32.push(t26.container);
  7260. })) : i32 = this._stage.children;
  7261. const { format: s30, quality: r24 } = s7(e23.format, e23.quality);
  7262. return t24(e23, t25, this.size, this.padding, s30, r24, i32, e23.rotation);
  7263. }
  7264. get test() {
  7265. return { takeScreenshot: (e23) => this._takeScreenshot(e23) };
  7266. }
  7267. toMap(e23) {
  7268. if (!this.ready)
  7269. return null;
  7270. const t25 = o21(e23) ? r19(this, e23) : e23, i32 = [0, 0], [s30, r24] = this.state.toMap(i32, [t25.x, t25.y]), n34 = this.spatialReference;
  7271. return new j2({ x: s30, y: r24, spatialReference: n34 });
  7272. }
  7273. toScreen(e23) {
  7274. if (!this.ready)
  7275. return null;
  7276. const t25 = this._project(e23, this.spatialReference), i32 = [t25.x, t25.y];
  7277. return this.state.toScreen(i32, i32), c2(i32[0], i32[1]);
  7278. }
  7279. on(e23, t25, i32, s30) {
  7280. const r24 = this.inputManager && this.viewEvents.on(e23, t25, i32, s30);
  7281. return r24 || super.on(e23, t25);
  7282. }
  7283. hasEventListener(e23) {
  7284. return super.hasEventListener(e23) || this.viewEvents.hasHandler(e23);
  7285. }
  7286. whenLayerView(e23) {
  7287. return super.whenLayerView(e23);
  7288. }
  7289. graphicChanged(e23) {
  7290. if (this.graphicsView) {
  7291. this.graphicsView.graphicUpdateHandler(e23);
  7292. }
  7293. }
  7294. whenReady() {
  7295. return new Promise((e23) => {
  7296. this.ready ? e23(this) : this._resolveWhenReady.push(e23);
  7297. });
  7298. }
  7299. forceDOMReadyCycle() {
  7300. this.forceReadyCycle();
  7301. }
  7302. getDefaultSpatialReference() {
  7303. return this.map && "initialViewProperties" in this.map && this.map?.initialViewProperties?.spatialReference || this.defaultsFromMap?.spatialReference || null;
  7304. }
  7305. hasLayerViewModule(e23) {
  7306. return n23.hasLayerViewModule(e23);
  7307. }
  7308. importLayerView(e23) {
  7309. return n23.importLayerView(e23);
  7310. }
  7311. pixelSizeAt() {
  7312. return this.ready ? this.state.resolution : (he.error("#pixelSizeAt()", "Map view cannot be used before it is ready"), null);
  7313. }
  7314. popupHitTest(e23) {
  7315. return this.hitTest(e23).then((t25) => ({ ...t25, mapPoint: this.toMap(e23) }));
  7316. }
  7317. requestUpdate() {
  7318. this.ready && this.frameTask.requestUpdate();
  7319. }
  7320. validate() {
  7321. let e23 = i29(this.type);
  7322. return a("safari") && a("safari") < 9 && (e23 = new s2("mapview:browser-not-supported", "This browser is not supported by MapView (Safari < 9)", { type: "safari", requiredVersion: 9, detectedVersion: a("safari") })), r(e23) ? (he.warn("#validate()", e23.message), Promise.reject(e23)) : ye2();
  7323. }
  7324. _createAnimation() {
  7325. return this.animation && !this.animation.done || (this.animation = new n22()), this.animation;
  7326. }
  7327. _cancellableGoTo(e23, t25, i32) {
  7328. const s30 = () => e23 === this._gotoTask, r24 = i32.then(() => {
  7329. s30() && (this.animation = null);
  7330. }).catch((e24) => {
  7331. throw s30() && (this.animation = null, t25.done || (t25.stop(), this.frameTask.animationInProgress = false)), e24;
  7332. }), n34 = new Promise((e24) => e24(r24));
  7333. return t25.when().catch(() => {
  7334. s30() && n34.cancel && n34.cancel();
  7335. }), n34;
  7336. }
  7337. _gotoImmediate(e23, t25) {
  7338. const i32 = this._gotoTask, s30 = this.animation, r24 = e23.then((e24) => {
  7339. if (f(t25), i32 !== this._gotoTask)
  7340. throw new s2("view:goto-interrupted", "Goto was interrupted");
  7341. this.viewpoint = s30.target = e24, s30.finish();
  7342. });
  7343. return this._cancellableGoTo(i32, s30, r24);
  7344. }
  7345. _flipStationary(e23) {
  7346. return this._stationaryTimer !== null || (this._stationaryTimer = setTimeout(() => {
  7347. this._stationaryTimer = null;
  7348. const e24 = performance.now() - this._lastStationaryEventTimestamp;
  7349. e24 < we && (this._stationaryTimer = this._flipStationary(e24));
  7350. }, e23)), this._stationaryTimer;
  7351. }
  7352. _getDefaultViewpoint() {
  7353. const { constraints: e23, initialExtent: t25, map: s30, padding: r24, size: n34 } = this;
  7354. if (!e23)
  7355. return null;
  7356. const a34 = s30 && "initialViewProperties" in s30 && s30.initialViewProperties, o30 = { zoom: this._get("zoom"), scale: this._get("scale"), center: this._get("center"), extent: this._get("extent"), rotation: this._get("rotation"), viewpoint: this._get("viewpoint"), spatialReference: this._userSpatialReference };
  7357. e23.effectiveLODs ? o30.zoom !== -1 && (o30.scale = e23.zoomToScale(o30.zoom)) : o30.zoom = -1;
  7358. let l27 = null, c42 = null, d20 = 0;
  7359. const u23 = o30.viewpoint && o30.viewpoint.rotation, m29 = o30.viewpoint && o30.viewpoint.targetGeometry;
  7360. r(m29) && (m29.type === "extent" ? l27 = m29 : m29.type === "point" && (c42 = m29, d20 = o30.viewpoint.scale));
  7361. const g20 = o30.extent || l27 || e2(a34?.viewpoint?.targetGeometry)?.extent || t25, f14 = o30.center || c42 || g20?.center, y17 = o30.scale || d20 || a34?.viewpoint?.scale || g20 && H(g20, [n34[0] - r24.left - r24.right, n34[1] - r24.top - r24.bottom]), w13 = o30.rotation || u23 || a34?.viewpoint?.rotation || 0;
  7362. return f14 && y17 ? new u5({ targetGeometry: f14, scale: y17, rotation: w13 }) : null;
  7363. }
  7364. _gotoAnimated(e23, t25) {
  7365. const i32 = this._gotoTask, s30 = this.animation, r24 = e23.then((e24) => {
  7366. if (f(t25), i32 !== this._gotoTask)
  7367. throw new s2("view:goto-interrupted", "Goto was interrupted");
  7368. return s30.update(e24), this.animationManager.animate(s30, this.viewpoint, t25), s30.when().then(() => {
  7369. }, () => {
  7370. });
  7371. });
  7372. return this._cancellableGoTo(i32, s30, r24);
  7373. }
  7374. _project(e23, t25) {
  7375. const i32 = e23 && e23.targetGeometry || e23;
  7376. if (!t25)
  7377. return e23;
  7378. if (!i32)
  7379. return null;
  7380. if (t25.imageCoordinateSystem || i32.spatialReference?.imageCoordinateSystem)
  7381. return e23;
  7382. if (E2(t25, i32.spatialReference))
  7383. return e23;
  7384. const s30 = rn(i32, t25);
  7385. if (!s30)
  7386. throw new s2("mapview:projection-not-possible", "projecting input geometry to target spatial reference returned a null value", { geometry: i32, spatialReference: t25 });
  7387. return _e(e23) ? (e23.targetGeometry = s30, e23) : s30;
  7388. }
  7389. _resizeHandler(e23) {
  7390. if (!this.ready)
  7391. return;
  7392. const t25 = this.state;
  7393. let i32 = this.state.paddedViewState.viewpoint;
  7394. const s30 = this.state.paddedViewState.size.concat();
  7395. t25.size = [e23.width, e23.height], ht(i32, i32, s30, this.state.paddedViewState.size, this.resizeAlign), i32 = this.constraints.constrain(i32, null), this.state.viewpoint = i32;
  7396. }
  7397. _startup() {
  7398. this.timeline.begin("MapView Startup");
  7399. const e23 = this._getDefaultViewpoint(), t25 = e23.targetGeometry;
  7400. try {
  7401. this._project(e23, this.spatialReference);
  7402. } catch (o30) {
  7403. he.warn(new t2("mapview:startup-projection-error", "projection of initial viewpoint to the view's spatial reference, defaulting to the initial viewpoint.", { center: t25.toJSON(), spatialReference: this.spatialReference, error: o30 })), e23.targetGeometry = this.defaultsFromMap.extent?.center || new j2({ x: 0, y: 0, spatialReference: this.spatialReference });
  7404. }
  7405. this.constraints?.fit(e23), this._set("state", new g15({ padding: this._get("padding"), size: this.size, viewpoint: e23 })), this.graphics.owner = this;
  7406. const i32 = new ce2(this.surface, { canvas: this.renderCanvas, supersampleScreenshots: this.supersampleScreenshotsEnabled, contextOptions: { disabledExtensions: this.deactivatedWebGLExtensions, debugWebGLExtensions: this.debugWebGLExtensions }, renderingOptions: this.renderingOptions, timeline: this.timeline });
  7407. this._stage = i32, this._magnifierView = new fe2(), this._magnifierView.magnifier = this.magnifier;
  7408. const s30 = new me2({ view: this });
  7409. this._set("labelManager", s30);
  7410. const r24 = new d13({ view: this });
  7411. this._set("animationManager", r24);
  7412. const n34 = new ge({ view: this, animationManager: r24 });
  7413. this._set("mapViewNavigation", n34), this._setupSpatialReferenceDependentProperties(), this.handles.add([this.rootLayerViews.on("change", () => this._updateStageChildren()), i32.on("post-render", () => this._set("rendering", i32.renderRequested)), i32.on("will-render", () => this._set("rendering", i32.renderRequested)), i32.on("webgl-error", (e24) => this.fatalError = e24.error), l4(() => this.stationary, (e24) => i32.stationary = e24, w), l4(() => this.background, (e24) => {
  7414. i32.background = e24, this._magnifierView.background = e24;
  7415. }, w), l4(() => this.magnifier, (e24) => this._magnifierView.magnifier = e24, w), l4(() => this.renderingOptions, (e24) => i32.renderingOptions = e24, w), l4(() => this.highlightOptions, (e24) => i32.highlightOptions = e24, w), l4(() => this.state.id, () => i32.state = this.state, w)], "map-view"), this._updateStageChildren();
  7416. const a34 = this._resolveWhenReady;
  7417. this._resolveWhenReady = [], a34.forEach((e24) => e24(this)), this.timeline.end("MapView Startup"), this.frameTask && this.frameTask.start(), this._set("ready", true);
  7418. }
  7419. _teardown() {
  7420. this._destroySpatialReferenceDependentProperties(), this.handles.remove("map-view"), this.mapViewNavigation.destroy(), this._set("mapViewNavigation", null), this.animationManager.destroy(), this._set("animationManager", null), this.layerViewManager.clear(), this.labelManager.destroy(), this._magnifierView.destroy(), this._stage.destroy(), this._stage = null, this._set("graphicsView", null), this._magnifierView = null, this._set("labelManager", null), this._set("mapViewNavigation", null), this.graphics.owner = null, this.frameTask && this.frameTask.stop(), this._stationaryTimer && (clearTimeout(this._stationaryTimer), this._stationaryTimer = null), this._set("ready", false);
  7421. const { center: [e23, t25], spatialReference: i32, rotation: s30, scale: r24 } = this.state.paddedViewState, n34 = new j2({ x: e23, y: t25, spatialReference: i32 });
  7422. this._set("viewpoint", null), this._set("extent", null), this._set("center", n34), this._set("zoom", -1), this._set("rotation", s30), this._set("scale", r24), this._set("spatialReference", i32), this._set("state", null), this.animation = null;
  7423. }
  7424. _updateStageChildren() {
  7425. this._stage.removeAllChildren(), this.rootLayerViews.forEach((e24) => {
  7426. this._stage.addChild(e24.container);
  7427. });
  7428. const e23 = this.graphicsView;
  7429. this._stage.addChild(e23.container), this._stage.addChild(this._magnifierView);
  7430. }
  7431. _setupSpatialReferenceDependentProperties() {
  7432. const e23 = new h5(S2.create({ spatialReference: this.spatialReference, size: 512, numLODs: 36 }));
  7433. this._set("featuresTilingScheme", e23);
  7434. const t25 = new de3({ view: this, graphics: this.graphics, requestUpdateCallback: () => this.requestUpdate(), container: new ue2(e23) });
  7435. this.frameTask.graphicsView = t25, this._set("graphicsView", t25);
  7436. }
  7437. _destroySpatialReferenceDependentProperties() {
  7438. const e23 = this.graphicsView;
  7439. this._set("graphicsView", null), this.frameTask.graphicsView = null, e23.destroy(), this._set("featuresTilingScheme", null);
  7440. }
  7441. _spatialReferenceChanged(e23) {
  7442. if (!this.ready)
  7443. return;
  7444. this.frameTask.stop();
  7445. for (const i32 of this.allLayerViews)
  7446. i32.processDetach();
  7447. this._destroySpatialReferenceDependentProperties();
  7448. const t25 = this.state.paddedViewState.clone();
  7449. if (t(this._scaleBeforeChangingSpatialReference))
  7450. this._scaleBeforeChangingSpatialReference = t25.scale;
  7451. else {
  7452. const e24 = t25.viewpoint.clone();
  7453. e24.scale = this._scaleBeforeChangingSpatialReference, t25.viewpoint = e24;
  7454. }
  7455. const s30 = t25.clone(), [r24, n34] = t25.center;
  7456. let o30 = null;
  7457. try {
  7458. o30 = this._project(new j2({ x: r24, y: n34, spatialReference: t25.spatialReference }), e23);
  7459. } catch (p36) {
  7460. en() || he.warn(new t2("mapview:spatial-reference-change", "could not project the view's center to the new spatial reference", { center: o30.toJSON(), spatialReference: e23, error: p36 }));
  7461. }
  7462. o30 || (o30 = new j2({ x: 0, y: 0, spatialReference: e23 }));
  7463. const l27 = xt(new u5({ targetGeometry: new j2(), scale: 0, rotation: 0 }), t25.viewpoint, o30);
  7464. s30.viewpoint = l27;
  7465. try {
  7466. const i32 = 20, r25 = [t25.size[0] / 2, t25.size[1] / 2], n35 = [r25[0] + i32, r25[1]], o31 = t25.toMap([0, 0], n35), { x: p36, y: h19 } = this._project(new j2({ x: o31[0], y: o31[1], spatialReference: t25.spatialReference }), e23);
  7467. o31[0] = p36, o31[1] = h19, s30.toScreen(o31, o31);
  7468. const c42 = pt(r25, o31, n35), d20 = Math.hypot(o31[0] - r25[0], o31[1] - r25[1]) / i32;
  7469. !Number.isFinite(d20) || Math.abs(d20) > 4 ? (l27.rotation = 0, l27.targetGeometry = new j2({ x: 0, y: 0, spatialReference: e23 })) : (l27.scale *= d20, l27.scale > a("mapview-srswitch-adjust-rotation-scale-threshold") ? l27.rotation = 0 : l27.rotation += Number.isFinite(c42) ? c42 : 0);
  7470. } catch {
  7471. }
  7472. this._get("constraints").constrain(l27, null), this._get("state").viewpoint = l27, this._stage.state = this.state, this._setupSpatialReferenceDependentProperties();
  7473. for (const i32 of this.allLayerViews)
  7474. i32.processAttach();
  7475. this.frameTask.requestFrame(), this.frameTask.start(), this._updateStageChildren();
  7476. }
  7477. };
  7478. ve.type = "2d", e([d({ readOnly: true })], ve.prototype, "animationManager", void 0), e([d({ constructOnly: true })], ve.prototype, "deactivatedWebGLExtensions", void 0), e([d({ constructOnly: true })], ve.prototype, "debugWebGLExtensions", void 0), e([d({ readOnly: true })], ve.prototype, "featuresTilingScheme", void 0), e([d({ readOnly: true })], ve.prototype, "fullOpacity", void 0), e([d({ readOnly: true })], ve.prototype, "graphicsTileStore", null), e([d()], ve.prototype, "graphicsView", void 0), e([d({ readOnly: true })], ve.prototype, "state", void 0), e([d()], ve.prototype, "initialExtentRequired", null), e([d()], ve.prototype, "labelManager", void 0), e([d({ readOnly: true })], ve.prototype, "resourceManager", null), e([d({ readOnly: true })], ve.prototype, "textureManager", null), e([d({ readOnly: true })], ve.prototype, "mapViewNavigation", void 0), e([d({ constructOnly: true })], ve.prototype, "renderCanvas", void 0), e([d()], ve.prototype, "renderingOptions", void 0), e([d({ readOnly: true })], ve.prototype, "rendering", void 0), e([d({ constructOnly: true })], ve.prototype, "supersampleScreenshotsEnabled", void 0), e([d({ readOnly: true })], ve.prototype, "supportsGround", void 0), e([d()], ve.prototype, "_stationaryTimer", void 0), e([d()], ve.prototype, "_defaultsFromMapSettings", null), e([d()], ve.prototype, "_pePromise", void 0), e([d({ readOnly: true })], ve.prototype, "typeSpecificPreconditionsReady", null), e([d()], ve.prototype, "animation", null), e([d({ type: m28 })], ve.prototype, "background", null), e([d({ value: null, type: j2, dependsOn: ["state.id", "ready"] })], ve.prototype, "center", null), e([d({ type: y14 })], ve.prototype, "constraints", null), e([d({ value: null, type: M2, dependsOn: ["state.id", "ready"] })], ve.prototype, "extent", null), e([d()], ve.prototype, "floors", void 0), e([d({ type: c35 })], ve.prototype, "highlightOptions", void 0), e([d({ readOnly: true })], ve.prototype, "inputManager", void 0), e([d()], ve.prototype, "map", void 0), e([d({ value: { top: 0, right: 0, bottom: 0, left: 0 }, cast: (e23) => ({ top: 0, right: 0, bottom: 0, left: 0, ...e23 }) })], ve.prototype, "padding", null), e([d()], ve.prototype, "resizeAlign", void 0), e([d({ readOnly: true, dependsOn: ["state.id"] })], ve.prototype, "resolution", null), e([d({ value: 0, type: Number, dependsOn: ["state.id", "ready"] })], ve.prototype, "rotation", null), e([d({ value: 0, type: Number, dependsOn: ["state.id", "ready"] })], ve.prototype, "scale", null), e([d({ constructOnly: true })], ve.prototype, "spatialReferenceLocked", void 0), e([d()], ve.prototype, "stationary", null), e([d({ type: e10, readOnly: true })], ve.prototype, "timeline", void 0), e([d({ readOnly: true })], ve.prototype, "type", void 0), e([d({ readOnly: true })], ve.prototype, "updating", null), e([d({ value: null, type: u5, dependsOn: ["state.id", "ready"] })], ve.prototype, "viewpoint", null), e([d({ value: -1, dependsOn: ["state.id", "ready"] })], ve.prototype, "zoom", null), e([d({ type: Boolean })], ve.prototype, "navigating", null), e([d({ type: p34 })], ve.prototype, "ui", void 0), ve = e([n3("esri.views.MapView")], ve);
  7479. var Ve = ve;
  7480. function Se(e23) {
  7481. const t25 = e23.getObjectId();
  7482. return t25 ? `${e23.layer?.uid ?? e23.sourceLayer?.uid ?? "MapView"}/${t25}` : `"MapView/${e23.uid}`;
  7483. }
  7484. function je(e23, i32, s30, r24, n34) {
  7485. return (a34) => {
  7486. if (a34 instanceof g2) {
  7487. if (a34.layer === e23)
  7488. n34?.();
  7489. else {
  7490. const t25 = e23.allLayerViews.find((e24) => e24.layer === a34.layer);
  7491. t25 && r24?.(t25);
  7492. }
  7493. s30(Se(a34));
  7494. } else {
  7495. const t25 = e23.allLayerViews.find((e24) => e24.layer === a34);
  7496. t25 && i32(t25);
  7497. }
  7498. };
  7499. }
  7500. function Te(e23, t25) {
  7501. if (e23)
  7502. if (t3(e23))
  7503. for (const i32 of e23)
  7504. if (t3(i32))
  7505. for (const e24 of i32)
  7506. t25(e24);
  7507. else
  7508. t25(i32);
  7509. else
  7510. t25(e23);
  7511. }
  7512. // dep:@arcgis_core_views_MapView
  7513. var arcgis_core_views_MapView_default = Ve;
  7514. export {
  7515. arcgis_core_views_MapView_default as default
  7516. };
  7517. //# sourceMappingURL=@arcgis_core_views_MapView.js.map